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

📊 Update WB poverty projections #3843

Merged
merged 12 commits into from
Jan 20, 2025
Merged

Conversation

paarriagadap
Copy link
Contributor

@paarriagadap paarriagadap commented Jan 15, 2025

The WB team has updated the poverty projections replication package, due to an error we found

@owidbot
Copy link
Contributor

owidbot commented Jan 15, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-data-wb-poverty-projections

chart-diff: ✅
  • 5/5 reviewed charts
  • Modified: 5/5
  • New: 0/0
  • Rejected: 0
  • Data changes: 0
  • Metadata changes: 0
data-diff: ✅ No differences found
+ Dataset garden/wb/2025-01-15/poverty_projections
+ + Table poverty_projections
+   + Column fgt0
+   + Column poorpop


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|garden/ihme_gbd/2019/gbd_risk are not included

Edited: 2025-01-20 10:07:22 UTC
Execution time: 17.43 seconds

@paarriagadap
Copy link
Contributor Author

paarriagadap commented Jan 17, 2025

Hi @lucasrodes! There is another weird thing with this update: when I run this new snapshot in the same pipeline as before I get these long numbers as dimensions (dataset), when they should be 2.15, 3.65, 6.85. Even weirder is that if I un-archive the steps from version 2024-12-03 I get the same error (dataset). Do you know if this is due to a change in the libraries we use? I haven't been able to fix it anyway, I ran the steps with --grapher and can't see changes (Maybe it takes longer to reflect changes, @Marigold?).
image

@Marigold
Copy link
Collaborator

Marigold commented Jan 20, 2025

@paarriagadap floats can sometimes introduce precision errors. I'm not sure why this started happening, perhaps an update to new pandas types? Anyway, rounding to 2 decimals fixed that (another way would be to use decimal.Decimal, but that would be more complex).

A slightly different question for discussion - does it make sense to create a new version of a dataset if there was no change to code and only snapshot has been corrected? I'd personally just update the snapshot and keep all other channels as they are, but others might have a different opinion.

@Marigold Marigold force-pushed the data-wb-poverty-projections branch from cef4393 to ffd79f1 Compare January 20, 2025 07:49
@Marigold Marigold force-pushed the data-wb-poverty-projections branch from ffd79f1 to e00e49d Compare January 20, 2025 07:50
@paarriagadap
Copy link
Contributor Author

Thanks @Marigold! I only applied changes to the garden step, thinking that it was enough to fix it.

I created a new version to use Anomalist and also check the new values in Indicator Upgrader. If there is another way to do this by just replacing the snapshot please let me know.

@Marigold
Copy link
Collaborator

I created a new version to use Anomalist and also check the new values in Indicator Upgrader. If there is another way to do this by just replacing the snapshot please let me know.

If you're doing all quality checks, then you need to bump the version. If you only wanted to compare charts, it'd be enough to re-run the snapshot and then check chart-diff with Show all charts turned on. You'd see all data or metadata changes side by side.

@paarriagadap paarriagadap marked this pull request as ready for review January 20, 2025 10:44
@paarriagadap paarriagadap merged commit a88c456 into master Jan 20, 2025
8 of 9 checks passed
@paarriagadap paarriagadap deleted the data-wb-poverty-projections branch January 20, 2025 10:44
antea04 pushed a commit that referenced this pull request Feb 5, 2025
* 📊 Update WB poverty projections

* ✨ new version

* ✨ snapshot

* update snapshot

* ✨ use more efficient zip load

* 🐛 fix poverty lines being in a long format

* 🚧 delete povertyline edit

* 📊 Round povertyline to 2 decimal places

* 🐛 correct old steps

* 🐛 update grapher step in old version

* 🐝 archive old steps

---------

Co-authored-by: lucasrodes <lucasrodes@users.noreply.github.com>
Co-authored-by: Marigold <mojmir.vinkler@gmail.com>
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.

4 participants