Skip to content
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

📊 grapher/regions/latest: Add income group information #2571

Closed
wants to merge 1 commit into from

Conversation

marcelgerber
Copy link
Member

@marcelgerber marcelgerber commented Apr 27, 2024

This is working towards owid/owid-grapher#3517.

This is adding the 4 WB income groups as rows to the regions.csv file which is only consumed by owid-grapher.
These rows get the new entity type income_group, which we will then handle in grapher. We mostly care about the members of these income groups; and for these to be up to date, we will want to update this step to use the latest wb/.../income_groups classification once a new one becomes available.

This also assigns new entity codes to these four regions: OWID_WB_LIC, OWID_WB_LMC, OWID_WB_UMC, OWID_WB_HIC. The last part of these are the official 3-letter codes that the WB uses for these entities.

Changing these entity codes in the future is going to be a major pain, so please let me know if you would want to use different ones instead.

@owidbot
Copy link
Contributor

owidbot commented Apr 27, 2024

Staging server:
etl diff: ✅ No differences found
= Dataset garden/un/2023-10-30/un_members
  = Table un_members
= Dataset garden/war/2024-01-23/nuclear_weapons_treaties
  = Table nuclear_weapons_treaties
  = Table nuclear_weapons_treaties_country_counts


Legend: +New  ~Modified  -Removed  =Identical  Details
Hint: Run this locally with etl diff REMOTE data/ --include yourdataset --verbose --snippet

Automatically updated datasets matching weekly_wildfires|excess_mortality|covid|fluid|flunet|country_profile are not included

Edited: 2024-04-27 14:43:03 UTC
Execution time: 15.95 seconds

@marcelgerber
Copy link
Member Author

@pabloarosado
Copy link
Contributor

Hi @marcelgerber, regarding codes for income groups, in other places of OWID I have seen "OWID_LIC", "OWID_LMC", "OWID_UMC", "OWID_HIC", for example in FAOSTAT. I don't think those codes are relevant, but it makes me think that maybe these codes have been used also elsewhere, so maybe it's safer to stick to them.

This PR is in conflict with #2534. So let me think about both proposals and decide about a good solution.

@marcelgerber
Copy link
Member Author

Sure, I'll change the entity codes then to keep them consistent. Let me know how you want to proceed in regards to #2534.

@pabloarosado
Copy link
Contributor

Sure, I'll change the entity codes then to keep them consistent. Let me know how you want to proceed in regards to #2534.

Don't worry about it. I've created another PR with a different logic: #2587
I'll discuss it tomorrow in the data architecture call and then decide which approach to take.

@pabloarosado pabloarosado mentioned this pull request May 2, 2024
3 tasks
@pabloarosado
Copy link
Contributor

I'd suggest closing this PR, and instead go with #2587 (we can discuss it later).
Note that the resulting file you could use in grapher would be http://staging-site-create-external-channel:8881/external/owid_grapher/latest/regions/regions.csv

@marcelgerber
Copy link
Member Author

Nice. I've read through your proposal, and all of it makes a lot of sense to me. Thank you for thinking this through!

@pabloarosado
Copy link
Contributor

Hey @marcelgerber you can now access the regions data in https://catalog.ourworldindata.org/external/owid_grapher/latest/regions/regions.csv
Please let me know if there's any issue or you want to change anything there, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants