-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update EMDAT VARNAMES for version 2023 #701
Conversation
Update the EMDAT variables names to meet data structure criteria of the year 2023
@@ -114,7 +114,57 @@ | |||
"Reconstruction Costs ('000 US$)": "Reconstruction Costs ('000 US$)", | |||
"Insured Damages ('000 US$)": "Insured Damages ('000 US$)", | |||
"Total Damages ('000 US$)": "Total Damages ('000 US$)", | |||
'CPI': 'CPI'}} | |||
'CPI': 'CPI'}, | |||
2023: {'Dis No': 'Dis No', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure that all key-value pairs here are exactly the same, you could do something like this:
VARNAMES_EMDAT_2023 = ["Dis No", "Year", ...] # List every variable only once
VARNAMES_EMDAT = {
2018: {...},
2020: {...},
2023: dict(zip(VARNAMES_EMDAT_2023, VARNAMES_EMDAT_2023)),
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Don't know. With the current change it is at least uniform. After introducing VARNAMES_EMDAT_2023
it's partly less redundant but loses uniformity. Which looks like an increase of entropy to me. 😁
Imho we should keep it uniform or get rid of all the redundancy when we start in this direction. E.g. by making a dictionary for only the values that are different from the keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much like your last suggestion! Let's get back to this when the actual issue is resolved ✌️
After manually checking the tutorial, I leave it as it is for now. But the module should be refactored at some point: #708 |
Work in progress!
Update the EMDAT variables names to meet the EMDAT data structure criteria of the year 2023
to do:
Changes proposed in this PR:
This PR fixes #690
PR Author Checklist
develop
)PR Reviewer Checklist