owid / etl

A compute graph for loading and transforming OWID's data
https://docs.owid.io/projects/etl
MIT License
58 stars 18 forks source link

🎉 harmonize: interactive shell #2870

Closed lucasrodes closed 6 days ago

lucasrodes commented 1 week ago

Based on the form recently shared with the team, it was suggested that the Harmonizer was easily accessible also from the Interactive Shell in VS Code.

This PR adds this, along with its corresponding documentation. Essentially, one can run the following from the interactive shell now:

from etl.harmonize import harmonize_ipython
harmonize_ipython(
  tb,
  "country",
  paths.country_mapping_path
)

A form will be displayed and the user will be able to generate the harmonized country mappings.

Additionally, I've re-factored the code so that all our endpoints (Wizard, terminal, and now interactive shell) use the same code.

owidbot commented 1 week ago
Quick links (staging server): Site Admin Wizard

Login: ssh owid@staging-site-interactive-shell-harm

chart-diff: ✅ No charts for review.
data-diff: ✅ No differences found ```diff 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: 2024-06-22 00:10:46 UTC Execution time: 12.34 seconds

lucasrodes commented 1 week ago

cc @pabloarosado, hopefully this is closer to your needs! You can see a quick demo in this GIF file.