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

💄 Add dynamic links in MPI data pages #3643

Merged
merged 6 commits into from
Nov 28, 2024
Merged

Conversation

paarriagadap
Copy link
Contributor

@owidbot
Copy link
Contributor

owidbot commented Nov 27, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-mpi-add-dynamic-links

chart-diff: ✅ No charts for review.
data-diff: ❌ Found differences
= Dataset garden/demography/2023-06-27/world_population_comparison
  = Table world_population_comparison
= Dataset garden/health/latest/global_health_mpox
  = Table global_health_mpox
    ~ Dim country
-       - Removed values: 1 / 138 (0.72%)
                date country
          2024-11-10  Rwanda
    ~ Dim date
-       - Removed values: 1 / 138 (0.72%)
          country       date
           Rwanda 2024-11-10
    ~ Column reported_cases (changed data)
-       - Removed values: 1 / 138 (0.72%)
          country       date  reported_cases
           Rwanda 2024-11-10             153
    ~ Column suspected_cases_cumulative (changed data)
-       - Removed values: 1 / 138 (0.72%)
          country       date  suspected_cases_cumulative
           Rwanda 2024-11-10                        4078
= Dataset garden/ophi/2024-10-28/multidimensional_poverty_index
  = Table multidimensional_poverty_index
    ~ Column censored_headcount_ratio (changed metadata)
-       -     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country. Look for the harmonized over time (HOT) estimate to see trends over time.
        ?                                                                                                                                         --------------------------------------------------------------------------
+       +     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country.
-       -     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey. Look for the current margin estimate (CME) to see the most recent survey data.
        ?                                                                                                                                                                                         -------------------------------------------------------------------------------
+       +     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey.
    ~ Column headcount_ratio (changed metadata)
-       -     <% if flavor == "Current margin estimate" %>
-       -     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country. Look for the harmonized over time (HOT) estimate to see trends over time.
+       +     <% set cme_link = "https://ourworldindata.org/grapher/share-multi-poverty" %> <% set hot_link = "https://ourworldindata.org/grapher/share-of-population-multidimensionally-poor-hot" %><% if flavor == "Current margin estimate" %>
+       +     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country.<% if flavor == "Current margin estimate" and area == "National" %>
+       +     Look for the (<<hot_link>>) to see trends over time.
+       +     <% elif flavor == "Harmonized over time" and area == "National" %>
+       +     Look for the (<<cme_link>>) to see the most recent survey data.
+       +     <%- endif -%>
-       -     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey. Look for the current margin estimate (CME) to see the most recent survey data.
        ?                                                                                                                                                                                         ^^^^^^ ^^^^^^^^                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       +     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey.<% if flavor == "Current margin estimate" and area == "National" %>
        ?                                                                                                                                                                                         ^^^^ ^^^^^^^^^^^^^                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       +     Look for the (<<hot_link>>) to see trends over time.
+       +     <% elif flavor == "Harmonized over time" and area == "National" %>
+       +     Look for the (<<cme_link>>) to see the most recent survey data.
+       +     <%- endif -%>
    ~ Column intensity (changed metadata)
-       -     <% if flavor == "Current margin estimate" %>
-       -     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country. Look for the harmonized over time (HOT) estimate to see trends over time.
+       +     <% set cme_link = "https://ourworldindata.org/grapher/intensity-of-multidimensional-poverty" %> <% set hot_link = "https://ourworldindata.org/grapher/intensity-of-multidimensional-poverty-hot" %><% if flavor == "Current margin estimate" %>
+       +     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country.<% if flavor == "Current margin estimate" and area == "National" %>
+       +     Look for the (<<hot_link>>) to see trends over time.
+       +     <% elif flavor == "Harmonized over time" and area == "National" %>
+       +     Look for the (<<cme_link>>) to see the most recent survey data.
+       +     <%- endif -%>
-       -     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey. Look for the current margin estimate (CME) to see the most recent survey data.
        ?                                                                                                                                                                                         ^^^^^^ ^^^^^^^^                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       +     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey.<% if flavor == "Current margin estimate" and area == "National" %>
        ?                                                                                                                                                                                         ^^^^ ^^^^^^^^^^^^^                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       +     Look for the (<<hot_link>>) to see trends over time.
+       +     <% elif flavor == "Harmonized over time" and area == "National" %>
+       +     Look for the (<<cme_link>>) to see the most recent survey data.
+       +     <%- endif -%>
    ~ Column mpi (changed metadata)
-       -     <% if flavor == "Current margin estimate" %>
-       -     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country. Look for the harmonized over time (HOT) estimate to see trends over time.
+       +     <% set cme_link = "https://ourworldindata.org/grapher/multidimensional-poverty-index-mpi" %> <% set hot_link = "https://ourworldindata.org/grapher/multidimensional-poverty-index-mpi-hot" %><% if flavor == "Current margin estimate" %>
+       +     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country.<% if flavor == "Current margin estimate" and area == "National" %>
+       +     Look for the (<<hot_link>>) to see trends over time.
+       +     <% elif flavor == "Harmonized over time" and area == "National" %>
+       +     Look for the (<<cme_link>>) to see the most recent survey data.
+       +     <%- endif -%>
-       -     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey. Look for the current margin estimate (CME) to see the most recent survey data.
        ?                                                                                                                                                                                         ^^^^^^ ^^^^^^^^                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       +     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey.<% if flavor == "Current margin estimate" and area == "National" %>
        ?                                                                                                                                                                                         ^^^^ ^^^^^^^^^^^^^                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       +     Look for the (<<hot_link>>) to see trends over time.
+       +     <% elif flavor == "Harmonized over time" and area == "National" %>
+       +     Look for the (<<cme_link>>) to see the most recent survey data.
+       +     <%- endif -%>
    ~ Column severe (changed metadata)
-       -     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country. Look for the harmonized over time (HOT) estimate to see trends over time.
        ?                                                                                                                                         --------------------------------------------------------------------------
+       +     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country.
-       -     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey. Look for the current margin estimate (CME) to see the most recent survey data.
        ?                                                                                                                                                                                         -------------------------------------------------------------------------------
+       +     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey.
    ~ Column uncensored_headcount_ratio (changed metadata)
-       -     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country. Look for the harmonized over time (HOT) estimate to see trends over time.
        ?                                                                                                                                         --------------------------------------------------------------------------
+       +     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country.
-       -     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey. Look for the current margin estimate (CME) to see the most recent survey data.
        ?                                                                                                                                                                                         -------------------------------------------------------------------------------
+       +     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey.
    ~ Column vulnerable (changed metadata)
-       -     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country. Look for the harmonized over time (HOT) estimate to see trends over time.
        ?                                                                                                                                         --------------------------------------------------------------------------
+       +     This indicator is a current margin estimate (CME), meaning that it relies on the most recent survey data available for each country.
-       -     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey. Look for the current margin estimate (CME) to see the most recent survey data.
        ?                                                                                                                                                                                         -------------------------------------------------------------------------------
+       +     This indicator is a harmonized over time (HOT) estimate. This harmonization seeks to make two or more MPI estimates comparable by aligning the indicator definitions in each survey.
= Dataset garden/who/2023-06-01/cholera
  = Table cholera
    ~ Column cholera_case_fatality_rate (changed data)
        ~ Changed values: 2 / 2992 (0.07%)
          country  year  cholera_case_fatality_rate -  cholera_case_fatality_rate +
          Somalia  2017                          1.34                          1.33
           Africa  2017                       1.79053                      1.788862
    ~ Column cholera_deaths (changed data)
        ~ Changed values: 3 / 2992 (0.10%)
          country  year  cholera_deaths -  cholera_deaths +
          Somalia  2017              1007              1004
            World  2017              5650              5654
           Africa  2017              3220              3217
= Dataset garden/who/2024-09-09/flu_test
  = Table flu_test
    ~ Dim country
-       - Removed values: 10 / 72332 (0.01%)
                date  country
          2024-11-18 Cameroon
          2024-11-18   Canada
          2024-11-18    Ghana
          2024-11-18    Niger
          2024-11-18     Togo
    ~ Dim date
-       - Removed values: 10 / 72332 (0.01%)
           country       date
          Cameroon 2024-11-18
            Canada 2024-11-18
             Ghana 2024-11-18
             Niger 2024-11-18
              Togo 2024-11-18
    ~ Column denomcombined (changed data)
-       - Removed values: 10 / 72332 (0.01%)
           country       date  denomcombined
          Cameroon 2024-11-18             60
            Canada 2024-11-18          28725
             Ghana 2024-11-18            258
             Niger 2024-11-18             31
              Togo 2024-11-18             12
        ~ Changed values: 23 / 72332 (0.03%)
          country       date  denomcombined -  denomcombined +
            Nepal 2024-09-16              160              158
            Nepal 2024-09-23              151              150
            Nepal 2024-10-14              150              145
             Togo 2024-10-28               69               59
             Togo 2024-11-04               45               43
    ~ Column pcnt_poscombined (changed data)
-       - Removed values: 10 / 72332 (0.01%)
           country       date  pcnt_poscombined
          Cameroon 2024-11-18         28.333334
            Canada 2024-11-18          1.141863
             Ghana 2024-11-18         24.418604
             Niger 2024-11-18           9.67742
              Togo 2024-11-18          8.333333
        ~ Changed values: 23 / 72332 (0.03%)
          country       date  pcnt_poscombined -  pcnt_poscombined +
            Nepal 2024-09-16               21.25           21.518988
            Nepal 2024-09-23            19.86755           19.333334
            Nepal 2024-10-14           23.333334           22.758621
             Togo 2024-10-28           11.594203           13.559322
             Togo 2024-11-04            8.888889            9.302325
= Dataset garden/who/latest/monkeypox
  = Table monkeypox
    ~ Column suspected_cases_cumulative (changed data)
        ~ Changed values: 1 / 97705 (0.00%)
          country       date  suspected_cases_cumulative -  suspected_cases_cumulative +
           Rwanda 2024-11-10                          4078                          <NA>


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-11-28 16:10:22 UTC
Execution time: 15.28 seconds

@paarriagadap paarriagadap marked this pull request as ready for review November 28, 2024 16:18
@paarriagadap paarriagadap merged commit eb54d8d into master Nov 28, 2024
8 checks passed
@paarriagadap paarriagadap deleted the mpi-add-dynamic-links branch November 28, 2024 16:19
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