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

🔨 engineering: refactor upserts to MySQL #3236

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Conversation

Marigold
Copy link
Collaborator

@Marigold Marigold commented Sep 3, 2024

Refactor upserts to MySQL from grapher:// step. This allows us to compare checksums of data & metadata by indicator and skip upserts to variables table in MySQL if metadata doesn't change (previously we only skipped uploading to R2). This should speed up cases where you only work on a single indicator.

It's not going to be any faster than our current solution if checksums differ. I'll try tackling that in the next PR where I switch from threads to asyncio.

Changes

  • Data & metadata checksums are now computed from dataframe and VariableMeta dataclass instead of the final JSON that we upload to R2.
  • Use hash_any to calculate checksums instead of md5 that we usually use.
  • Minimize set_index and reset_index operations.
  • Start using catalogPath more.
  • Deprecate old code.

@owidbot
Copy link
Contributor

owidbot commented Sep 3, 2024

Quick links (staging server):

Site Admin Wizard

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

chart-diff: ✅ No charts for review.
data-diff: ❌ Found differences
= Dataset garden/ahdi/2023-09-08/augmented_hdi
  = Table augmented_hdi
    ~ Column ahdi (changed metadata)
-       -     $schema: https://files.ourworldindata.org/schemas/grapher-schema.003.json
+       +     title: Augmented Human Development Index
+       +     subtitle: |-
+       +       The Augmented Human Development Index (AHDI) is a summary measure of historical achievement in four key dimensions of human development: a long and healthy life, being knowledgeable, being free and having a decent standard of living.
+       +     tab: map
+       +     originUrl: https://ourworldindata.org/human-development-index
+       +     yAxis:
+       +       min: 0
+       +       time: latest
-       -       time: latest
-       -     originUrl: https://ourworldindata.org/human-development-index
+       +     $schema: https://files.ourworldindata.org/schemas/grapher-schema.003.json
-       -     subtitle: |-
-       -       The Augmented Human Development Index (AHDI) is a summary measure of historical achievement in four key dimensions of human development: a long and healthy life, being knowledgeable, being free and having a decent standard of living.
-       -     tab: map
-       -     title: Augmented Human Development Index
-       -     yAxis:
-       -       min: 0
    ~ Column ahdi_excluding_income (changed metadata)
-       -     $schema: https://files.ourworldindata.org/schemas/grapher-schema.003.json
+       +     title: Augmented Human Development Index (excluding income)
+       +     subtitle: |-
+       +       The Augmented Human Development Index (AHDI) is a summary measure of historical achievement in three key dimensions of human development: a long and healthy life, being knowledgeable, and being free. This version of the indicator excludes national income estimations.
+       +     tab: map
+       +     originUrl: https://ourworldindata.org/human-development-index
+       +     yAxis:
+       +       min: 0
+       +       time: latest
-       -       time: latest
-       -     originUrl: https://ourworldindata.org/human-development-index
+       +     $schema: https://files.ourworldindata.org/schemas/grapher-schema.003.json
-       -     subtitle: |-
-       -       The Augmented Human Development Index (AHDI) is a summary measure of historical achievement in three key dimensions of human development: a long and healthy life, being knowledgeable, and being free. This version of the indicator excludes national income estimations.
-       -     tab: map
-       -     title: Augmented Human Development Index (excluding income)
-       -     yAxis:
-       -       min: 0
= Dataset garden/animal_welfare/2023-08-01/global_hen_inventory
  = Table global_hen_inventory
    ~ Column number_of_hens_cage_free (changed metadata)
+       +     hideTimeline: true
-       -     hideTimeline: true
    ~ Column number_of_hens_in_cages (changed metadata)
+       +     hideTimeline: true
-       -     hideTimeline: true
    ~ Column share_of_hens_free_range_not_organic (changed metadata)
+       +     hideTimeline: true
-       -     hideTimeline: true
= Dataset garden/animal_welfare/2023-08-03/share_of_cage_free_eggs
  = Table share_of_cage_free_eggs
    ~ Column share_of_eggs_cage_free (changed metadata)
+       +     subtitle: |-
+       +       Share of all eggs that are produced in cage-free housing systems. This includes barns, pasture and free-range (non-organic and organic) eggs.
-       -     subtitle: |-
-       -       Share of all eggs that are produced in cage-free housing systems. This includes barns, pasture and free-range (non-organic and organic) eggs.
    ~ Column share_of_eggs_in_cages (changed metadata)
+       +     subtitle: |-
+       +       Share of all eggs that are produced in cage-free housing systems. This includes barns, pasture and free-range (non-organic and organic) eggs.
-       -     subtitle: |-
-       -       Share of all eggs that are produced in cage-free housing systems. This includes barns, pasture and free-range (non-organic and organic) eggs.
= Dataset garden/animal_welfare/2023-08-14/number_of_farmed_fish
  = Table number_of_farmed_fish
    ~ Column n_farmed_fish (changed metadata)
+       +     subtitle: |-
+       +       This data does not include lobsters, farmed fish used as bait, and species without an estimated mean weight (which were an additional 17% of reported global fish production).
-       -     subtitle: |-
-       -       This data does not include lobsters, farmed fish used as bait, and species without an estimated mean weight (which were an additional 17% of reported global fish production).
    ~ Column n_farmed_fish_per_capita (changed metadata)
+       +     subtitle: |-
+       +       This data does not include lobsters, farmed fish used as bait, and species without an estimated mean weight (which were an additional 17% of reported global fish production).
-       -     subtitle: |-
-       -       This data does not include lobsters, farmed fish used as bait, and species without an estimated mean weight (which were an additional 17% of reported global fish production).
= Dataset garden/animal_welfare/2023-08-15/number_of_farmed_decapod_crustaceans
  = Table number_of_farmed_decapod_crustaceans
    ~ Column n_farmed_decapod_crustaceans (changed metadata)
+       +     subtitle: |-
+       +       Decapod crustaceans are animals such as shrimps, crabs, lobsters, prawns, and crayfish. This data does not include species without an estimated mean weight (which were an additional 6% of reported global production).
-       -     subtitle: |-
-       -       Decapod crustaceans are animals such as shrimps, crabs, lobsters, prawns, and crayfish. This data does not include species without an estimated mean weight (which were an additional 6% of reported global production).
    ~ Column n_farmed_decapod_crustaceans_low (changed metadata)
-       -     note: Upper and lower-bound estimates are shown due to large uncertainties. The map shows midpoint values.
+       +     note: Upper and lower-bound estimates are shown due to large uncertainties. The map shows midpoint values.
    ~ Column n_farmed_decapod_crustaceans_low_per_capita (changed metadata)
-       -     note: Upper and lower-bound estimates are shown due to large uncertainties. The map shows midpoint values.
+       +     note: Upper and lower-bound estimates are shown due to large uncertainties. The map shows midpoint values.
    ~ Column n_farmed_decapod_crustaceans_per_capita (changed metadata)
+       +     subtitle: |-
+       +       Decapod crustaceans are animals such as shrimps, crabs, lobsters, prawns, and crayfish. This data does not include species without an estimated mean weight (which were an additional 6% of reported global production).
-       -     subtitle: |-
-       -       Decapod crustaceans are animals such as shrimps, crabs, lobsters, prawns, and crayfish. This data does not include species without an estimated mean weight (which were an additional 6% of reported global production).
= Dataset garden/animal_welfare/2023-08-16/number_of_wild_fish_killed_for_food
  = Table number_of_wild_fish_killed_for_food
    ~ Column n_wild_fish (changed metadata)
+       +     subtitle: |-
+       +       This data is based on the average tonnage of annual catch from 2007 to 2016, and estimated mean weights for fish species. It does not include unrecorded fish capture, such as fish caught illegally and those caught as bycatch and discards.
-       -     subtitle: |-
-       -       This data is based on the average tonnage of annual catch from 2007 to 2016, and estimated mean weights for fish species. It does not include unrecorded fish capture, such as fish caught illegally and those caught as bycatch and discards.
    ~ Column n_wild_fish_per_capita (changed metadata)
+       +     subtitle: |-
+       +       This data is calculated based on annual catch figures from 2007 to 2016 in tonnes, and estimated mean weights for fish species. It does not include unrecorded fish capture, such as fish caught illegally and those caught as bycatch and discards.
-       -     subtitle: |-
-       -       This data is calculated based on annual catch figures from 2007 to 2016 in tonnes, and estimated mean weights for fish species. It does not include unrecorded fish capture, such as fish caught illegally and those caught as bycatch and discards.
= Dataset garden/animal_welfare/2023-09-01/chick_culling_laws
  = Table chick_culling_laws
    ~ Column status (changed metadata)
+       +     title: Which countries have banned chick culling?
-       -     title: Which countries have banned chick culling?
= Dataset garden/animal_welfare/2023-10-24/fur_laws
  = Table fur_laws
    ~ Column fur_farming_status (changed metadata)
+       +     title: Which countries have banned fur farming?
-       -     title: Which countries have banned fur farming?
    ~ Column fur_farms_active (changed metadata)
+       +     title: Which countries have active fur farms?
-       -     title: Which countries have active fur farms?
    ~ Column fur_trading_status (changed metadata)
+       +     title: Which countries have banned fur trading?
-       -     title: Which countries have banned fur trading?
= Dataset garden/animal_welfare/2024-06-04/bullfighting_laws
  = Table bullfighting_laws
    ~ Column status (changed metadata)
+       +     title: Which countries have banned bullfighting?
-       -     hasChartTab: false
-       -     hasMapTab: true
+       +       hideTimeline: true
+       +         customNumericColorsActive: true
-       -         customNumericColorsActive: true
-       -       hideTimeline: true
+       +     hasChartTab: false
+       +     hasMapTab: true
-       -     title: Which countries have banned bullfighting?
= Dataset garden/animal_welfare/2024-09-13/fur_laws
  = Table fur_laws
    ~ Column fur_farming_status (changed metadata)
+       +     title: Which countries have banned fur farming?
-       -     title: Which countries have banned fur farming?
    ~ Column fur_farms_active (changed metadata)
+       +     title: Which countries have active fur farms?
-       -     title: Which countries have active fur farms?
    ~ Column fur_trading_status (changed metadata)
+       +     title: Which countries have banned fur trading?
-       -     title: Which countries have banned fur trading?
= Dataset garden/artificial_intelligence/2023-06-14/ai_gender_representation
  = Table ai_gender_representation
    ~ Column new_ai_phd_graduates__pct_of_total (changed metadata)
+       +   numDecimalPlaces: 0
-       -   numDecimalPlaces: 0
    ~ Column new_cs_phd_graduates__pct_of_total (changed metadata)
+       +   numDecimalPlaces: 0
-       -   numDecimalPlaces: 0
= Dataset garden/artificial_intelligence/2023-07-25/cset
  = Table cset
    ~ Column citations_per_article (changed metadata)
+       +   name: << field >>
    ~ Column disclosed_investment (changed metadata)
+       +   name: << field >>
    ~ Column disclosed_investment_summary (changed metadata)
+       +   name: << field >>
    ~ Column estimated_investment_summary (changed metadata)
+       +   name: << field >>
    ~ Column investment_estimated (changed metadata)
+       +   name: << field >>
    ~ Column num_articles (changed metadata)
+       +   name: << field >>
    ~ Column num_articles_per_mil (changed metadata)
+       +   name: << field >>
    ~ Column num_articles_summary (changed metadata)
+       +   name: << field >>
    ~ Column num_citations (changed metadata)
+       +   name: << field >>
    ~ Column num_citations_summary (changed metadata)
+       +   name: << field >>
    ~ Column num_patent_applications (changed metadata)
+       +   name: << field >>
    ~ Column num_patent_applications_per_mil (changed metadata)
+       +   name: << field >>
    ~ Column num_patent_applications_summary (changed metadata)
+       +   name: << field >>
    ~ Column num_patent_granted (changed metadata)
+       +   name: << field >>
    ~ Column num_patent_granted_per_mil (changed metadata)
+       +   name: << field >>
    ~ Column num_patent_granted_summary (changed metadata)
+       +   name: << field >>
    ~ Column proportion_patents_granted (changed metadata)
+       +   name: << field >>
= Dataset garden/artificial_intelligence/2024-03-22/papers_with_code_coding
  = Table papers_with_code_coding
    ~ Column performance_code_any_competition (changed metadata)
+       +   zeroDay: '2019-01-01'
-       -   zeroDay: '2019-01-01'
    ~ Column performance_code_any_interview (changed metadata)
+       +   zeroDay: '2019-01-01'
-       -   zeroDay: '2019-01-01'
= Dataset garden/artificial_intelligence/2024-03-22/papers_with_code_language
  = Table papers_with_code_language
    ~ Column performance_language_average (changed metadata)
+       +   zeroDay: '2019-01-01'
-       -   zeroDay: '2019-01-01'
= Dataset garden/artificial_intelligence/2024-03-22/papers_with_code_math
  = Table papers_with_code_math
    ~ Column performance_math (changed metadata)
+       +   zeroDay: '2019-01-01'
-       -   zeroDay: '2019-01-01'
= Dataset garden/artificial_intelligence/2024-06-06/epoch_compute_cost
  = Table epoch_compute_cost
    ~ Column cost__inflation_adjusted (changed metadata)
+       +   numDecimalPlaces: 0
-       -   numDecimalPlaces: 0
    ~ Column domain (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
= Dataset garden/artificial_intelligence/2024-07-11/epoch_gpus
  = Table epoch_gpus
    ~ Column comp_performance_per_dollar (changed metadata)
+       +   zeroDay: '2000-01-01'
+       +   yearIsDay: true
-       -   yearIsDay: true
-       -   zeroDay: '2000-01-01'
    ~ Column fp32__single_precision__performance__flop_s (changed metadata)
+       +   zeroDay: '2000-01-01'
+       +   yearIsDay: true
-       -   yearIsDay: true
-       -   zeroDay: '2000-01-01'
    ~ Column manufacturer (changed metadata)
+       +   zeroDay: '2000-01-01'
+       +   yearIsDay: true
-       -   yearIsDay: true
-       -   zeroDay: '2000-01-01'
    ~ Column release_price__usd (changed metadata)
+       +   zeroDay: '2000-01-01'
+       +   yearIsDay: true
-       -   yearIsDay: true
-       -   zeroDay: '2000-01-01'
= Dataset garden/artificial_intelligence/2024-09-09/epoch
  = Table epoch
    ~ Column domain (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
    ~ Column parameters (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
    ~ Column training_computation_petaflop (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
    ~ Column training_dataset_size__datapoints (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
= Dataset garden/artificial_intelligence/2024-09-09/epoch_aggregates_domain
  = Table epoch_aggregates_domain
    ~ Column cumulative_count (changed metadata)
-       -   Describes the specific area, application, or field in which an AI system is designed to operate. An AI system can operate in more than one domain, thus contributing to the count for multiple domains. The 2024 data is incomplete and was last updated 10 September 2024.
        ?                                                                                                                                                                                                                                                            ^
+       +   Describes the specific area, application, or field in which an AI system is designed to operate. An AI system can operate in more than one domain, thus contributing to the count for multiple domains. The 2024 data is incomplete and was last updated 30 September 2024.
        ?                                                                                                                                                                                                                                                            ^
    ~ Column yearly_count (changed metadata)
-       -   Describes the specific area, application, or field in which an AI system is designed to operate. An AI system can operate in more than one domain, thus contributing to the count for multiple domains. The 2024 data is incomplete and was last updated 10 September 2024.
        ?                                                                                                                                                                                                                                                            ^
+       +   Describes the specific area, application, or field in which an AI system is designed to operate. An AI system can operate in more than one domain, thus contributing to the count for multiple domains. The 2024 data is incomplete and was last updated 30 September 2024.
        ?                                                                                                                                                                                                                                                            ^
= Dataset garden/artificial_intelligence/2024-09-09/epoch_compute_intensive
  = Table epoch_compute_intensive
    ~ Column domain (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
    ~ Column parameters (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
    ~ Column training_computation_petaflop (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
    ~ Column training_dataset_size__datapoints (changed metadata)
+       +   zeroDay: '1949-01-01'
-       -   zeroDay: '1949-01-01'
= Dataset garden/artificial_intelligence/2024-09-09/epoch_compute_intensive_countries
  = Table epoch_compute_intensive_countries
    ~ Column cumulative_count (changed metadata)
-       -   Refers to the location of the primary organization with which the authors of a large-scale AI systems are affiliated. The 2024 data is incomplete and was last updated 10 September 2024.
        ?                                                                                                                                                                          ^
+       +   Refers to the location of the primary organization with which the authors of a large-scale AI systems are affiliated. The 2024 data is incomplete and was last updated 30 September 2024.
        ?                                                                                                                                                                          ^
    ~ Column yearly_count (changed metadata)
-       -   Refers to the location of the primary organization with which the authors of a large-scale AI systems are affiliated. The 2024 data is incomplete and was last updated 10 September 2024.
        ?                                                                                                                                                                          ^
+       +   Refers to the location of the primary organization with which the authors of a large-scale AI systems are affiliated. The 2024 data is incomplete and was last updated 30 September 2024.
        ?                                                                                                                                                                          ^
= Dataset garden/artificial_intelligence/2024-09-09/epoch_compute_intensive_domain
  = Table epoch_compute_intensive_domain
    ~ Column cumulative_count (changed metadata)
-       -   Describes the specific area, application, or field in which a large-scale AI model is designed to operate. The 2024 data is incomplete and was last updated 10 September 2024.
        ?                                                                                                                                                               ^
+       +   Describes the specific area, application, or field in which a large-scale AI model is designed to operate. The 2024 data is incomplete and was last updated 30 September 2024.
        ?                                                                                                                                                               ^
    ~ Column yearly_count (changed metadata)
-       -   Describes the specific area, application, or field in which a large-scale AI model is designed to operate. The 2024 data is incomplete and was last updated 10 September 2024.
        ?                                                                                                                                                               ^
+       +   Describes the specific area, application, or field in which a large-scale AI model is designed to operate. The 2024 data is incomplete and was last updated 30 September 2024.
        ?                                                                                                                                                               ^
= Dataset garden/biodiversity/2023-01-11/cherry_blossom
  = Table cherry_blossom
    ~ Column average_20_years (changed metadata)
+       +     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
+       +     subtitle: |-
+       +       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
+       +     yAxis:
+       +       min: 70
-       -     subtitle: |-
-       -       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
-       -     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
-       -     yAxis:
-       -       min: 70
    ~ Column full_flowering_date (changed metadata)
+       +     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
+       +     subtitle: |-
+       +       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
+       +     yAxis:
+       +       min: 70
-       -     subtitle: |-
-       -       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
-       -     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
-       -     yAxis:
-       -       min: 70
= Dataset garden/biodiversity/2024-01-25/cherry_blossom
  = Table cherry_blossom
    ~ Column average_20_years (changed metadata)
+       +     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
+       +     subtitle: |-
+       +       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
+       +     yAxis:
+       +       min: 70
-       -     subtitle: |-
-       -       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
-       -     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
-       -     yAxis:
-       -       min: 70
    ~ Column full_flowering_date (changed metadata)
+       +     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
+       +     subtitle: |-
+       +       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
+       +     yAxis:
+       +       min: 70
-       -     subtitle: |-
-       -       The vertical axis shows the date of peak blossom, expressed as the number of days since 1st January. The timing of the peak cherry blossom is influenced by spring temperatures. Higher temperatures due to climate change have caused the peak blossom to gradually move earlier in the year since the early 20th century.
-       -     title: Day of the year with peak cherry tree blossom in Kyoto, Japan
-       -     yAxis:
-       -       min: 70
= Dataset garden/cancer/2024-09-13/diagnosis_routes_by_route
  = Table diagnosis_routes_by_route
    ~ Column count_by_route (changed metadata)
+       +   numDecimalPlaces: 0
-       -   numDecimalPlaces: 0
    ~ Column percentage_by_route (changed metadata)
+       +   numDecimalPlaces: 1
-       -   numDecimalPlaces: 1
= Dataset garden/cancer/2024-09-13/diagnosis_routes_by_stage
  = Table diagnosis_routes_by_stage
    ~ Column count_by_stage (changed metadata)
+       +   numDecimalPlaces: 0
-       -   numDecimalPlaces: 0
    ~ Column percentage_by_stage (changed metadata)
+       +   numDecimalPlaces: 1
-       -   numDecimalPlaces: 1
= Dataset garden/cancer/2024-09-13/diagnosis_routes_survival
  = Table diagnosis_routes_survival
    ~ Column patients (changed metadata)
+       +   numDecimalPlaces: 0
-       -   numDecimalPlaces: 0
    ~ Column survival (changed metadata)
+       +   numDecimalPlaces: 1
-       -   numDecimalPlaces: 1
= Dataset garden/cedlas/2024-03-08/sedlac
  = Table sedlac_no_spells
    ~ Column _10_1_ratio (changed metadata)
-       -   name: A10/A1 ratio (<<table>>)
+       +   name: A10/A1 ratio (<<table>>)
    ~ Column _50_5_ratio (changed metadata)
-       -   name: A50/A5 ratio (<<table>>)
+       +   name: A50/A5 ratio (<<table>>)
    ~ Column _90_10_ratio (changed metadata)
-       -   name: A90/A10 ratio (<<table>>)
+       +   name: A90/A10 ratio (<<table>>)
    ~ Column _95_50_ratio (changed metadata)
-       -   name: A95/A50 ratio (<<table>>)
+       +   name: A95/A50 ratio (<<table>>)
    ~ Column _95_5_ratio (changed metadata)
-       -   name: A95/A5 ratio (<<table>>)
+       +   name: A95/A5 ratio (<<table>>)
    ~ Column _95_80_ratio (changed metadata)
-       -   name: A95/A80 ratio (<<table>>)
+       +   name: A95/A80 ratio (<<table>>)
    ~ Column a_05 (changed metadata)
-       -   name: Atkinson index (<<table>>)
+       +   name: Atkinson index (<<table>>)
    ~ Column a_1 (changed metadata)
-       -   name: Atkinson index (<<table>>)
+       +   name: Atkinson index (<<table>>)
    ~ Column a_2 (changed metadata)
-       -   name: Atkinson index (<<table>>)
+       +   name: Atkinson index (<<table>>)
    ~ Column cv (changed metadata)
-       -   name: Coefficient of variation (<<table>>)
+       +   name: Coefficient of variation (<<table>>)
    ~ Column decile10_share (changed metadata)
-       -   name: Richest decile - Share (<<table>>)
+       +   name: Richest decile - Share (<<table>>)
    ~ Column decile1_share (changed metadata)
-       -   name: Poorest decile - Share (<<table>>)
+       +   name: Poorest decile - Share (<<table>>)
    ~ Column decile2_share (changed metadata)
-       -   name: 2nd decile - Share (<<table>>)
+       +   name: 2nd decile - Share (<<table>>)
    ~ Column decile3_share (changed metadata)
-       -   name: 3rd decile - Share (<<table>>)
+       +   name: 3rd decile - Share (<<table>>)
    ~ Column decile4_share (changed metadata)
-       -   name: 4th decile - Share (<<table>>)
+       +   name: 4th decile - Share (<<table>>)
    ~ Column decile5_share (changed metadata)
-       -   name: 5th decile - Share (<<table>>)
+       +   name: 5th decile - Share (<<table>>)
    ~ Column decile6_share (changed metadata)
-       -   name: 6th decile - Share (<<table>>)
+       +   name: 6th decile - Share (<<table>>)
    ~ Column decile7_share (changed metadata)
-       -   name: 7th decile - Share (<<table>>)
+       +   name: 7th decile - Share (<<table>>)
    ~ Column decile8_share (changed metadata)
-       -   name: 8th decile - Share (<<table>>)
+       +   name: 8th decile - Share (<<table>>)
    ~ Column decile9_share (changed metadata)
-       -   name: 9th decile - Share (<<table>>)
+       +   name: 9th decile - Share (<<table>>)
    ~ Column e_0 (changed metadata)
-       -   name: Mean log deviation (<<table>>)
+       +   name: Mean log deviation (<<table>>)
    ~ Column gini (changed metadata)
-       -   name: Gini coefficient (<<table>>)
+       +   name: Gini coefficient (<<table>>)
    ~ Column national_fgt2 (changed metadata)
-       -   name: <<table>> - Poverty severity index
+       +   name: <<table>> - Poverty severity index
    ~ Column national_headcount_ratio (changed metadata)
-       -   name: <<table>> - Share of population in poverty
+       +   name: <<table>> - Share of population in poverty
    ~ Column national_poverty_gap_index (changed metadata)
-       -   name: <<table>> - Poverty gap index
+       +   name: <<table>> - Poverty gap index
    ~ Column theil (changed metadata)
-       -   name: Theil index (<<table>>)
+       +   name: Theil index (<<table>>)
  = Table sedlac
    ~ Column _10_1_ratio (changed metadata)
-       -   name: A10/A1 ratio (<<table>>)
+       +   name: A10/A1 ratio (<<table>>)
    ~ Column _50_5_ratio (changed metadata)
-       -   name: A50/A5 ratio (<<table>>)
+       +   name: A50/A5 ratio (<<table>>)
    ~ Column _90_10_ratio (changed metadata)
-       -   name: A90/A10 ratio (<<table>>)
+       +   name: A90/A10 ratio (<<table>>)
    ~ Column _95_50_ratio (changed metadata)
-       -   name: A95/A50 ratio (<<table>>)
+       +   name: A95/A50 ratio (<<table>>)
    ~ Column _95_5_ratio (changed metadata)
-       -   name: A95/A5 ratio (<<table>>)
+       +   name: A95/A5 ratio (<<table>>)
    ~ Column _95_80_ratio (changed metadata)
-       -   name: A95/A80 ratio (<<table>>)
+       +   name: A95/A80 ratio (<<table>>)
    ~ Column a_05 (changed metadata)
-       -   name: Atkinson index (<<table>>)
+       +   name: Atkinson index (<<table>>)
    ~ Column a_1 (changed metadata)
-       -   name: Atkinson index (<<table>>)
+       +   name: Atkinson index (<<table>>)
    ~ Column a_2 (changed metadata)
-       -   name: Atkinson index (<<table>>)
+       +   name: Atkinson index (<<table>>)
    ~ Column cv (changed metadata)
-       -   name: Coefficient of variation (<<table>>)
+       +   name: Coefficient of variation (<<table>>)
    ~ Column decile10_share (changed metadata)
-       -   name: Richest decile - Share (<<table>>)
+       +   name: Richest decile - Share (<<table>>)
    ~ Column decile1_share (changed metadata)
-       -   name: Poorest decile - Share (<<table>>)
+       +   name: Poorest decile - Share (<<table>>)
    ~ Column decile2_share (changed metadata)
-       -   name: 2nd decile - Share (<<table>>)
+       +   name: 2nd decile - Share (<<table>>)
    ~ Column decile3_share (changed metadata)
-       -   name: 3rd decile - Share (<<table>>)
+       +   name: 3rd decile - Share (<<table>>)
    ~ Column decile4_share (changed metadata)
-       -   name: 4th decile - Share (<<table>>)
+       +   name: 4th decile - Share (<<table>>)
    ~ Column decile5_share (changed metadata)
-       -   name: 5th decile - Share (<<table>>)
+       +   name: 5th decile - Share (<<table>>)
    ~ Column decile6_share (changed metadata)
-       -   name: 6th decile - Share (<<table>>)
+       +   name: 6th decile - Share (<<table>>)
    ~ Column decile7_share (changed metadata)
-       -   name: 7th decile - Share (<<table>>)
+       +   name: 7th decile - Share (<<table>>)
    ~ Column decile8_share (changed metadata)
-       -   name: 8th decile - Share (<<table>>)
+       +   name: 8th decile - Share (<<table>>)
    ~ Column decile9_share (changed metadata)
-       -   name: 9th decile - Share (<<table>>)
+       +   name: 9th decile - Share (<<table>>)
    ~ Column e_0 (changed metadata)
-       -   name: Mean log deviation (<<table>>)
+       +   name: Mean log deviation (<<table>>)
    ~ Column gini (changed metadata)
-       -   name: Gini coefficient (<<table>>)
+       +   name: Gini coefficient (<<table>>)
    ~ Column national_fgt2 (changed metadata)
-       -   name: <<table>> - Poverty severity index
+       +   name: <<table>> - Poverty severity index
    ~ Column national_headcount_ratio (changed metadata)
-       -   name: <<table>> - Share of population in poverty
+       +   name: <<table>> - Share of population in poverty
    ~ Column national_poverty_gap_index (changed metadata)
-       -   name: <<table>> - Poverty gap index
+       +   name: <<table>> - Poverty gap index
    ~ Column theil (changed metadata)
-       -   name: Theil index (<<table>>)
+       +   name: Theil index (<<table>>)
= Dataset garden/cedlas/2024-07-31/sedlac_poverty_2016
  = Table sedlac_no_spells
    ~ Column national_headcount_ratio (changed metadata)
-       -   name: <<table>> - Share of population in poverty
+       +   name: <<table>> - Share of population in poverty
  = Table sedlac
    ~ Column national_headcount_ratio (changed metadata)
-       -   name: <<table>> - Share of population in poverty
+       +   name: <<table>> - Share of population in poverty
= Dataset garden/cedlas/2024-07-31/sedlac_poverty_2018
  = Table sedlac_no_spells
    ~ Column national_headcount_ratio (changed metadata)
-       -   name: <<table>> - Share of population in poverty
+       +   name: <<table>> - Share of population in poverty
  = Table sedlac
    ~ Column national_headcount_ratio (changed metadata)
-       -   name: <<table>> - Share of population in poverty
+       +   name: <<table>> - Share of population in poverty
= Dataset garden/climate_watch/2023-10-31/emissions_by_sector
  = Table carbon_dioxide_emissions_by_sector
    ~ Column aviation_and_shipping_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column buildings_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column electricity_and_heat_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column energy_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column fugitive_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column industry_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column land_use_change_and_forestry_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column manufacturing_and_construction_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column other_fuel_combustion_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_co2_emissions_excluding_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_co2_emissions_including_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column transport_co2_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
  = Table fluorinated_gas_emissions_by_sector
    ~ Column industry_fgas_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_fgas_emissions_excluding_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_fgas_emissions_including_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
  = Table nitrous_oxide_emissions_by_sector
    ~ Column agriculture_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column aviation_and_shipping_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column buildings_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column electricity_and_heat_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column energy_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column fugitive_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column industry_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column land_use_change_and_forestry_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column manufacturing_and_construction_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column other_fuel_combustion_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_n2o_emissions_excluding_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_n2o_emissions_including_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column transport_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column waste_n2o_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
  = Table greenhouse_gas_emissions_by_sector
    ~ Column agriculture_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column aviation_and_shipping_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column buildings_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column electricity_and_heat_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column energy_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column fugitive_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column industry_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column land_use_change_and_forestry_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column manufacturing_and_construction_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column other_fuel_combustion_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_ghg_emissions_excluding_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_ghg_emissions_including_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column transport_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column waste_ghg_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
  = Table methane_emissions_by_sector
    ~ Column agriculture_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column aviation_and_shipping_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column buildings_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column electricity_and_heat_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column energy_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column fugitive_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column industry_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column land_use_change_and_forestry_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column manufacturing_and_construction_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column other_fuel_combustion_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_ch4_emissions_excluding_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column total_ch4_emissions_including_lucf_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column transport_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
    ~ Column waste_ch4_emissions_per_capita (changed metadata)
+       +   unit: tonnes
-       -   unit: tonnes
= Dataset garden/cow/2024-07-26/national_material_capabilities
  = Table national_material_capabilities
    ~ Column cinc (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
    ~ Column irst (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
    ~ Column milex (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
    ~ Column milper (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
    ~ Column milper_share (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
    ~ Column pec (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
    ~ Column tpop (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
    ~ Column upop (changed metadata)
+       +   tolerance: 5
-       -   tolerance: 5
= Dataset garden/democracy/2024-03-07/ert
  = Table ert
    ~ Column regime_ert (changed metadata)
+       +     subtitle: |-
+       +       Based on the (#dod:regimes-episodes-regime-transformation-expanded) by Episodes of Regime Transformation and the estimates by [V-Dem](#dod:v-dem)'s experts.
+       +     note: Numeric values range from 0 for hardening autocracies to 5 for deepening democracies.
+       +     tab: map
+       +     selectedFacetStrategy: entity
+       +     selectedEntityNames:
+       +       - Argentina
+       +       - Australia
+       +       - Botswana
+       +       - China
+       +         binningStrategy: manual
-       -         binningStrategy: manual
-       -         customNumericColors:
        ?                      ^^ ^^
+       +         customNumericValues:
        ?                      ^^ ^^
+       +           - 0
-       -           - '#d7191c'
        ?             ---- ----
+       +           - 1
+       +           - 2
+       +           - 3
+       +           - 4
-       -           - '#bc8e5a'
        ?             ------ --
+       +           - 5
-       -         customNumericValues:
        ?                      ^^ ^^
+       +         customNumericColors:
        ?                      ^^ ^^
-       -           - 0
-       -           - 1
+       +           - '#d7191c'
        ?             ++++ ++++
-       -           - 2
-       -           - 3
-       -           - 4
-       -           - 5
+       +           - '#bc8e5a'
        ?             ++++++ ++
-       -     note: Numeric values range from 0 for hardening autocracies to 5 for deepening democracies.
-       -     selectedEntityNames:
-       -       - Argentina
-       -       - Australia
-       -       - Botswana
-       -       - China
-       -     selectedFacetStrategy: entity
-       -     subtitle: |-
-       -       Based on the (#dod:regimes-episodes-regime-transformation-expanded) by Episodes of Regime Transformation and the estimates by [V-Dem](#dod:v-dem)'s experts.
-       -     tab: map
  = Table region_aggregates
= Dataset garden/democracy/2024-03-07/vdem
  = Table vdem_population
  = Table vdem_num_countries
  = Table vdem_multi_without_regions
  = Table vdem_multi_with_regions
    ~ Column civ_libs_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column civ_soc_str_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column corr_exec_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column corr_jud_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column corr_leg_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column corr_publsec_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column corruption_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column delibdem_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column dom_auton_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column egaldem_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column electdem_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column int_auton_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column libdem_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column participdem_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column personalism_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column phys_integr_libs_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column pol_libs_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column priv_libs_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column public_admin_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column rule_of_law_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column socgr_civ_libs_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column socgr_pow_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column terr_contr_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column wom_civ_libs_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column wom_civ_soc_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column wom_emp_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column wom_parl_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
    ~ Column wom_pol_par_vdem (changed metadata)
+       +     selectedEntityNames:
+       +       - Africa
+       +       - Asia
+       +       - Europe
+       +       - North America
+       +       - Oceania
+       +       - South America
-       -     selectedEntityNames:
-       -       - Africa
-       -       - Asia
-       -       - Europe
-       -       - North America
-       -       - Oceania
-       -       - South America
  = Table vdem
= Dataset garden/demography/2022-12-08/population
  = Table population
    ~ Column population (changed metadata)
+       +   name: Population
-       -   name: Population
    ~ Column world_pop_share (changed metadata)
+       +   name: Share of world population
-       -   name: Share of world population
= Dataset garden/demography/2023-09-27/survivor_percentiles
  ~ Table survivor_percentiles (changed metadata)
+     + title: Human Mortality Database
+     + description: |-
+     +   The Human Mortality Database (HMD) contains original calculations of death rates and life tables for national populations (countries or areas), as well as the input data used in constructing those tables. The input data consist of death counts from vital statistics, plus census counts, birth counts, and population estimates from various sources.
+     + 
+     + 
+     +   # Scope and basic principles
+     + 
+     +   New data series to this collection. However, the database is limited by design to populations where death registration and census data are virtually complete, since this type of information is required for the uniform method used to reconstruct historical data series. As a result, the countries and areas included here are relatively wealthy and for the most part highly industrialized.
+     + 
+     +   The main goal of the Human Mortality Database is to document the longevity revolution of the modern era and to facilitate research into its causes and consequences. As much as possible, the authors of the database have followed four guiding principles: comparability, flexibility, accessibility, reproducibility.
+     + 
+     + 
+     +   # Computing death rates and life tables
+     + 
+     +   Their process for computing mortality rates and life tables can be described in terms of six steps, corresponding to six data types that are available from the HMD. Here is an overview of the process:
+     + 
+     +   1. Births. Annual counts of live births by sex are collected for each population over the longest possible time period. These counts are used mainly for making population estimates at younger ages.
+     +   2. Deaths. Death counts are collected at the finest level of detail available. If raw data are aggregated, uniform methods are used to estimate death counts by completed age (i.e., age-last-birthday at time of death), calendar year of death, and calendar year of birth.
+     +   3. Population size. Annual estimates of population size on January 1st are either obtained from another source or are derived from census data plus birth and death counts.
+     +   4. Exposure-to-risk. Estimates of the population exposed to the risk of death during some age-time interval are based on annual (January 1st) population estimates, with a small correction that reflects the timing of deaths within the interval.
+     +   5. Death rates. Death rates are always a ratio of the death count for a given age-time interval divided by an estimate of the exposure-to-risk in the same interval.
+     +   6. Life tables. To build a life table, probabilities of death are computed from death rates. These probabilities are used to construct life tables, which include life expectancies and other useful indicators of mortality and longevity.
+     + 
+     + 
+     +   # Corrections to the data
+     + 
+     +   The data presented here have been corrected for gross errors (e.g., a processing error whereby 3,800 becomes 38,000 in a published statistical table would be obvious in most cases, and it would be corrected). However, the authors have not attempted to correct the data for systematic age misstatement (misreporting of age) or coverage errors (over- or under-enumeration of people or events).
+     + 
+     +   Some available studies assess the completeness of census coverage or death registration in the various countries, and more work is needed in this area. However, in developing the database thus far, the authors did not consider it feasible or desirable to attempt corrections of this sort, especially since it would be impossible to correct the data by a uniform method across all countries.
+     + 
+     + 
+     +   # Age misreporting
+     + 
+     +   Populations are included here if there is a well-founded belief that the coverage of their census and vital registration systems is relatively high, and thus, that fruitful analyses by both specialists and non-specialists should be possible with these data. Nevertheless, there is evidence of both age heaping (overreporting ages ending in "0" or "5") and age exaggeration in these data.
+     + 
+     +   In general, the degree of age heaping in these data varies by the time period and population considered, but it is usually no burden to scientific analysis. In most cases, it is sufficient to analyze data in five-year age groups in order to avoid the false impressions created by this particular form of age misstatement.
+     + 
+     +   Age exaggeration, on the other hand, is a more insidious problem. The authors' approach is guided by the conventional wisdom that age reporting in death registration systems is typically more reliable than in census counts or official population estimates. For this reason, the authors derive population estimates at older ages from the death counts themselves, employing extinct cohort methods. Such methods eliminate some, but certainly not all, of the biases in old-age mortality estimates due to age exaggeration.
+     + 
+     + 
+     +   # Uniform set of procedures
+     + 
+     +   A key goal of this project is to follow a uniform set of procedures for each population. This approach does not guarantee the cross-national comparability of the data. Rather, it ensures only that the authors have not introduced biases by the authors' own manipulations. The desire of the authors for uniformity had to face the challenge that raw data come in a variety of formats (for example, 1-year versus 5-year age groups). The authors' general approach to this problem is that the available raw data are used first to estimate two quantities: 1) the number of deaths by completed age, year of birth, and year of death; and 2) population estimates by single years of age on January 1 of each year. For each population, these calculations are performed separately by sex. From these two pieces of information, they compute death rates and life tables in a variety of age-time configuration

...diff too long, truncated...

Automatically updated datasets matching weekly_wildfires|excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included

Edited: 2024-09-30 12:28:43 UTC
Execution time: 1615.04 seconds

@Marigold Marigold force-pushed the grapher-refactor branch 3 times, most recently from 5a6ae23 to e7f32b7 Compare September 9, 2024 07:01
@Marigold Marigold marked this pull request as ready for review September 9, 2024 07:54
@lucasrodes lucasrodes changed the title 🔨 Refactor upserts to MySQL 🔨 engineering: refactor upserts to MySQL Sep 10, 2024
Copy link
Contributor

@pabloarosado pabloarosado left a comment

Choose a reason for hiding this comment

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

Looks good (although I can't quite follow all the logic, I'd need more context to understand the process). Thanks for doing this!
Can I simply fetch this branch and execute a few grapher steps to see if it works as expected?

lib/catalog/owid/catalog/utils.py Show resolved Hide resolved
@Marigold
Copy link
Collaborator Author

Can I simply fetch this branch and execute a few grapher steps to see if it works as expected?

That'd be very helpful 🙏

@Marigold Marigold force-pushed the grapher-refactor branch 4 times, most recently from 41a13a8 to e62a17d Compare September 30, 2024 09:24
@Marigold Marigold merged commit b97985c into master Sep 30, 2024
1 of 7 checks passed
@Marigold Marigold deleted the grapher-refactor branch September 30, 2024 15:45
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.

3 participants