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

🔨 Refactor mdims #3945

Merged
merged 22 commits into from
Feb 14, 2025
Merged

🔨 Refactor mdims #3945

merged 22 commits into from
Feb 14, 2025

Conversation

Marigold
Copy link
Collaborator

@Marigold Marigold commented Feb 7, 2025

  • Allow referencing indicators with table#indicator instead of full catalogPath
    • E.g. grapher/energy/2024-06-20/energy_mix/energy_mix#coal__twh -> energy_mix#coal__twh
    • It's expanded dynamically in multidim.upsert_multidim_data_page, but you have to pass dependencies=paths.dependencies (I couldn't think a more elegant way, but I'm all ears if you do)
  • Add argument .read(..., load_data: bool) which doesn't load data when used. This significantly reduces loading times for huge datasets like GBD

@owidbot
Copy link
Contributor

owidbot commented Feb 7, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-refactor-mdims

chart-diff: ✅ No charts for review.
data-diff: ✅ No differences found
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-02-14 09:42:52 UTC
Execution time: 18.67 seconds

@lucasrodes
Copy link
Member

lucasrodes commented Feb 10, 2025

Thanks for looking into this.

Couple of things:

@lucasrodes lucasrodes changed the base branch from master to mdim-schema-display February 10, 2025 14:35
lucasrodes added a commit that referenced this pull request Feb 10, 2025
* Update multidim-schema.json

* Restore definitions

* support display setting in upsert check, add other dimensions than y

* format

* integrate changes proposed in #3945

* integrate changes proposed in #3945 (pt 2)

* format

* wip

* add comments, remove deprecate code

* minor typo

---------

Co-authored-by: lucasrodes <lucasrodes@users.noreply.github.com>
Base automatically changed from mdim-schema-display to master February 10, 2025 15:58
@Marigold Marigold marked this pull request as ready for review February 14, 2025 09:41
@Marigold Marigold requested a review from lucasrodes February 14, 2025 09:41
@Marigold Marigold merged commit e7b3bed into master Feb 14, 2025
8 of 9 checks passed
@Marigold Marigold deleted the refactor-mdims branch February 14, 2025 09:59
Copy link
Member

@lucasrodes lucasrodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

lucasrodes added a commit that referenced this pull request Feb 14, 2025
* 📊 covid: mdims

* snapshot

* clean

* add schema

* wip

* improve description

* ✨ covid mdims maintenance

* remove titleVariant

* 📊 Update origin URL for COVID cases data

* Test update of covid.cases.yml

* Update multidim-schema.json

* Restore definitions

* 📊 work on covid mdims

* wip

* wip

* support display setting in upsert check, add other dimensions than y

* format

* add descriptions

* rollback

* interval -> period

* fix publication date

* fix publication date

* interval -> period

* fix publication date

* fix year type

* undo debug change in topic url

* integrate changes proposed in #3945

* integrate changes proposed in #3945 (pt 2)

* format

* wip

* add comments, remove deprecate code

* fix

* wip

* roll-back

* add missing descriptions

* 🎉 Let export steps execute implicit grapher://grapher steps

* wip

* Let export steps execute implicit grapher://grapher steps

* Hide causes of death mdim, which is causing issues

* Improve format

* suggestions by Ed

* fix missing description

* cases/deaths metadata

* use data steps

* hospital mdim

* fix date publication

* custom changes to boosters MDIM

* Reference only a subset of the grapher schema

Also, none of the properties are requiered.

* adapt vaccinations

* wip

* xm

* fix _expand for new API

* wip models

* support expand path for dict-defined indicators

* adding support for all dimensions

* infections model

* format

* format

* covax

* 🔨 Refactor indicator path handling in multidimensional config

* 📊 Update COVAX configuration with sorting options and improved titles

* style

* covax mdim

* set value in df with .loc

* update xm URLs

* wip: xm models mdim

* look for table-to-uri mapping also in private steps

* add help text

* 📊 Remove xm_who data reference from COVID DAG

* undo commented dependencies

* fix minor metadata typo

* add more help texts to MDIMs dropdown options

* typo

* add description

* cases_tests

* add missing dependency regions

* fix map brackets

* add description key in vax by manuf

* add description key to testing

* fix map bracket sin xm

* remove unnecessary schema reference

* wip vax breakdown

* wip

* wip

* wip

* change function, deprecate it

* wip: expand_views

* wip: automate view generation

* wip

* MDIM config auto-generate improvements

* automate mobility covid MDIM

* MDIM on vax breakdown can't really be used atm

---------

Co-authored-by: Martin Račák <rakyi@users.noreply.github.com>
Co-authored-by: Martin Račák <martin.racak@ourworldindata.org>
Co-authored-by: Pablo Rosado <pabloarosado@gmail.com>
lucasrodes added a commit that referenced this pull request Feb 14, 2025
* 📊 covid: mdims

* snapshot

* clean

* add schema

* wip

* improve description

* ✨ covid mdims maintenance

* remove titleVariant

* 📊 Update origin URL for COVID cases data

* Test update of covid.cases.yml

* Update multidim-schema.json

* Restore definitions

* 📊 work on covid mdims

* wip

* wip

* support display setting in upsert check, add other dimensions than y

* format

* add descriptions

* rollback

* interval -> period

* fix publication date

* fix publication date

* interval -> period

* fix publication date

* fix year type

* undo debug change in topic url

* integrate changes proposed in #3945

* integrate changes proposed in #3945 (pt 2)

* format

* wip

* add comments, remove deprecate code

* fix

* wip

* roll-back

* add missing descriptions

* 🎉 Let export steps execute implicit grapher://grapher steps

* wip

* Let export steps execute implicit grapher://grapher steps

* Hide causes of death mdim, which is causing issues

* Improve format

* suggestions by Ed

* fix missing description

* cases/deaths metadata

* use data steps

* hospital mdim

* fix date publication

* custom changes to boosters MDIM

* Reference only a subset of the grapher schema

Also, none of the properties are requiered.

* adapt vaccinations

* wip

* xm

* fix _expand for new API

* wip models

* support expand path for dict-defined indicators

* adding support for all dimensions

* infections model

* format

* format

* covax

* 🔨 Refactor indicator path handling in multidimensional config

* 📊 Update COVAX configuration with sorting options and improved titles

* style

* covax mdim

* set value in df with .loc

* update xm URLs

* wip: xm models mdim

* look for table-to-uri mapping also in private steps

* add help text

* 📊 Remove xm_who data reference from COVID DAG

* undo commented dependencies

* fix minor metadata typo

* add more help texts to MDIMs dropdown options

* typo

* add description

* cases_tests

* add missing dependency regions

* fix map brackets

* add description key in vax by manuf

* add description key to testing

* fix map bracket sin xm

* remove unnecessary schema reference

* wip vax breakdown

* wip

* wip

* wip

* change function, deprecate it

* wip: expand_views

* wip: automate view generation

* wip

* MDIM config auto-generate improvements

* automate mobility covid MDIM

* MDIM on vax breakdown can't really be used atm

* minor cleaning

* minor fix

* minor fix

* remove unnecessary dependency

---------

Co-authored-by: Martin Račák <rakyi@users.noreply.github.com>
Co-authored-by: Martin Račák <martin.racak@ourworldindata.org>
Co-authored-by: Pablo Rosado <pabloarosado@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