GFDRR / rdl-jkan

A lightweight, backend-free open data portal, powered by Jekyll
http://jkan.riskdatalibrary.org/
MIT License
1 stars 0 forks source link

Update sidebar filter categories, new branch #19

Closed matamadio closed 3 months ago

matamadio commented 4 months ago

Changes to the sidebar filters:

The filters reflect some of the core attributes of v0.2 - specific attribute names will be added here when template rdl-0.2.md will be ready. Suggesting to create a new branch rdl-0.2 for all proposed updates. Currently, the JKAN is deployed from branch rdl-0.1 into GH pages (https://github.com/GFDRR/rdl-jkan/settings), however in GH pages there seems to be a mixup of empty raw source content and deployed content (e.g. dataset folder). Please revise / clean deploy.

lydiascarf commented 3 months ago

everything's in rdl-0.2 so this should be good to close! i recommend making rdl-0.2 the default branch and deleting the gh-pages branch since none of the GH actions workflows use that branch and there's nothing really in it. it was a pleasure working together! let me know if i can be of service in the future

matamadio commented 3 months ago

Few more final changes to implement:

WEBSITE:

IMPORT SCRIPT:

lydiascarf commented 3 months ago

@matamadio thanks for summarizing these for me! i'll post an update around noon

lydiascarf commented 3 months ago

@matamadio how would you like the disaster ids to render? there's a scheme and an ID. should both be displayed? e.g. 2005-0370-TJK (EM-DAT International Disaster Database) for the "Central Asia flood scenarios" dataset

Also, the new hazard sidebar filter is based on the particular hazard's ID, not the hazard type or some other property, right?

matamadio commented 3 months ago

@matamadio how would you like the disaster ids to render? there's a scheme and an ID. should both be displayed? e.g. 2005-0370-TJK (EM-DAT International Disaster Database) for the "Central Asia flood scenarios" dataset

Yes that is fine for disaster, e.g. Disaster ID: 2005-0370-TJK (EM-DAT International Disaster Database)

Also, the new hazard sidebar filter is based on the particular hazard's ID, not the hazard type or some other property, right?

We want to use "hazard_type" as filter (flood, drought, etc).

lydiascarf commented 3 months ago

@matamadio just drawing your attention to some broken looking files:

i snuck in a few other tweaks and fixes, but here's what i've completed so far this morning from your list:

feel free to test and look through the diff on any of my commits!

matamadio commented 3 months ago

Thanks for the update!

three datasets have some stuff that conforms to other models but not dataset models, e.g. this one, this one, and this one; they're getting read as datasets without a title, causing errors that could be confusing in the future; how should i resolve this in each case?

What do you mean they do not conform on the model? They follow the same schema template, they have a title attribute. Previously the script managed to convert those, so it's not clear to me where the problem lies.

i'm also seeing newlines added to the project field on all of the datasets with a project of the following:

SFRARR - Strengthening Financial Resilience and Accelerating Risk Reduction in Central Asia program. (https://www.gfdrr.org/en/program/SFRARR-Central-Asia)

Yeah, I'm fixing this one in the jsons making it shorter, so it doesn't add a line break.

Countries filter options should be in alphabetical order (i did this for all of the filters)

Actually for the Geo scale it was good to follow the zoom logic from global > regional > national > sub-national

Script fails to translate hazard dataset where disaster id is specified

Script is now failing :( with this error:

  File "C:\Users\matti\Documents\GitHub\rdl-jkan-0.2\import\rdl2jkan.py", line 115
    props_to_summarize["disaster_identifiers"].append(f"{di.get("id")}; {di.get("scheme")}")
                                                                 ^^
SyntaxError: f-string: unmatched '('
lydiascarf commented 3 months ago

@matamadio

lydiascarf commented 3 months ago

@matamadio countries filter is fixed! i think i also got the following issue done:

Fix linking of hzd, exp and vln in the loss metadata

can you confirm that the only issue here was that on datasets like this one, the vulnerability field was actually linking to the related exposure? if so, that should be fixed as of my last push!

matamadio commented 3 months ago

Brilliant work, thanks!

lydiascarf commented 3 months ago

@matamadio you should officially have everything but the hazard type filter! i have that almost done but i have some other work to get to now for another client. if i get a second i'll try to finish that up for you over the weekend! if we don't chat again beforehand, i hope your workshop goes great :)

lydiascarf commented 3 months ago

done! check out the PR linked above. please ignore the GitHub Action failing, that's just some half set-up linting. i can get that running smoothly and fix all the errors in a couple weeks if you decide to do another scope together. that would really help with stability in the future!