Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📊 update life expectancy dependencies #3675

Merged
merged 37 commits into from
Dec 3, 2024

Conversation

lucasrodes
Copy link
Member

@lucasrodes lucasrodes commented Dec 2, 2024

Continue work from #3642.

Tracking: https://github.com/owid/owid-issues/issues/1693

  • un_wp_lt
  • life_tables (grapher)
  • broken_limits
  • phi_gender_le
  • gini_le
  • OMM

@owidbot
Copy link
Contributor

owidbot commented Dec 2, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-data-life-expectancy-dependencies

chart-diff: ✅
  • 41/41 reviewed charts
  • Modified: 41/41
  • New: 0/0
  • Rejected: 0
data-diff: ❌ Found differences
= Dataset garden/demography/2024-12-02/survivor_percentiles
  = Table survivor_percentiles
    ~ Dim country
-       - Removed values: 18381 / 143682 (12.79%)
           year    sex  percentile                       country
           1861 female          30 England and Wales (Civilians)
           1932   male          50 England and Wales (Civilians)
           1896  total          80            France (Civilians)
           1938   male          60            France (Civilians)
           2001 female          70           New Zealand (Maori)
    ~ Dim year
-       - Removed values: 18381 / 143682 (12.79%)
                                country    sex  percentile  year
          England and Wales (Civilians) female          30  1861
          England and Wales (Civilians)   male          50  1932
                     France (Civilians)  total          80  1896
                     France (Civilians)   male          60  1938
                    New Zealand (Maori) female          70  2001
    ~ Dim sex
-       - Removed values: 18381 / 143682 (12.79%)
                                country  year  percentile    sex
          England and Wales (Civilians)  1861          30 female
          England and Wales (Civilians)  1932          50   male
                     France (Civilians)  1896          80  total
                     France (Civilians)  1938          60   male
                    New Zealand (Maori)  2001          70 female
    ~ Dim percentile
-       - Removed values: 18381 / 143682 (12.79%)
                                country  year    sex  percentile
          England and Wales (Civilians)  1861 female          30
          England and Wales (Civilians)  1932   male          50
                     France (Civilians)  1896  total          80
                     France (Civilians)  1938   male          60
                    New Zealand (Maori)  2001 female          70
    ~ Column age (changed data)
-       - Removed values: 18381 / 143682 (12.79%)
                                country  year    sex  percentile        age
          England and Wales (Civilians)  1861 female          30  27.110001
          England and Wales (Civilians)  1932   male          50  67.959999
                     France (Civilians)  1896  total          80  76.239998
                     France (Civilians)  1938   male          60  68.800003
                    New Zealand (Maori)  2001 female          70  82.540001
+ Dataset garden/demography/2024-12-03/broken_limits_le
+ + Table broken_limits_le
+   + Column life_expectancy
+   + Column country_with_max_le
+ Dataset garden/demography/2024-12-03/gini_le
+ + Table gini_le
+   + Column life_expectancy_gini
+ Dataset garden/demography/2024-12-03/life_expectancy
+ + Table life_expectancy
+   + Column life_expectancy
+   + Column life_expectancy_0
+ + Table life_expectancy_only_proj
+   + Column life_expectancy_only_proj
+   + Column life_expectancy_0_only_proj
+ + Table life_expectancy_with_proj
+   + Column life_expectancy_with_proj
+   + Column life_expectancy_0_with_proj
+ Dataset garden/demography/2024-12-03/life_tables
+ + Table diff_ratios
+   + Column life_expectancy_fm_diff
+   + Column life_expectancy_fm_ratio
+   + Column central_death_rate_mf_ratio
+ + Table life_tables
+   + Column central_death_rate
+   + Column probability_of_death
+   + Column average_survival_length
+   + Column number_survivors
+   + Column number_deaths
+   + Column number_person_years_lived
+   + Column number_person_years_remaining
+   + Column life_expectancy
+   + Column probability_of_survival
+   + Column survivorship_ratio
+ Dataset garden/demography/2024-12-03/phi_gender_le
+ + Table phi_gender_le
+   + Column phi
= Dataset garden/hmd/2024-12-01/hmd
  = Table life_tables
    ~ Dim country
-       - Removed values: 304437 / 2136227 (14.25%)
           year    sex     age   type                       country
           1867  total 100-104 cohort England and Wales (Civilians)
           1839   male      87 period            France (Civilians)
           1904 female      79 period            France (Civilians)
           1972 female      62 period           New Zealand (Maori)
           1976  total      26 period           New Zealand (Maori)
    ~ Dim year
-       - Removed values: 304437 / 2136227 (14.25%)
                                country    sex     age   type  year
          England and Wales (Civilians)  total 100-104 cohort  1867
                     France (Civilians)   male      87 period  1839
                     France (Civilians) female      79 period  1904
                    New Zealand (Maori) female      62 period  1972
                    New Zealand (Maori)  total      26 period  1976
    ~ Dim sex
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year     age   type    sex
          England and Wales (Civilians)  1867 100-104 cohort  total
                     France (Civilians)  1839      87 period   male
                     France (Civilians)  1904      79 period female
                    New Zealand (Maori)  1972      62 period female
                    New Zealand (Maori)  1976      26 period  total
    ~ Dim age
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex   type     age
          England and Wales (Civilians)  1867  total cohort 100-104
                     France (Civilians)  1839   male period      87
                     France (Civilians)  1904 female period      79
                    New Zealand (Maori)  1972 female period      62
                    New Zealand (Maori)  1976  total period      26
    ~ Dim type
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type
          England and Wales (Civilians)  1867  total 100-104 cohort
                     France (Civilians)  1839   male      87 period
                     France (Civilians)  1904 female      79 period
                    New Zealand (Maori)  1972 female      62 period
                    New Zealand (Maori)  1976  total      26 period
    ~ Column average_survival_length (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  average_survival_length
          England and Wales (Civilians)  1867  total 100-104 cohort                     1.61
                     France (Civilians)  1839   male      87 period                      0.5
                     France (Civilians)  1904 female      79 period                      0.5
                    New Zealand (Maori)  1972 female      62 period                      0.5
                    New Zealand (Maori)  1976  total      26 period                      0.5
    ~ Column central_death_rate (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  central_death_rate
          England and Wales (Civilians)  1867  total 100-104 cohort           533.47998
                     France (Civilians)  1839   male      87 period          221.800003
                     France (Civilians)  1904 female      79 period          131.759995
                    New Zealand (Maori)  1972 female      62 period           38.389999
                    New Zealand (Maori)  1976  total      26 period                1.29
    ~ Column life_expectancy (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  life_expectancy
          England and Wales (Civilians)  1867  total 100-104 cohort             1.86
                     France (Civilians)  1839   male      87 period             4.06
                     France (Civilians)  1904 female      79 period             5.12
                    New Zealand (Maori)  1972 female      62 period            13.19
                    New Zealand (Maori)  1976  total      26 period            41.73
    ~ Column number_deaths (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  number_deaths
          England and Wales (Civilians)  1867  total 100-104 cohort             67
                     France (Civilians)  1839   male      87 period            459
                     France (Civilians)  1904 female      79 period           1997
                    New Zealand (Maori)  1972 female      62 period           2504
                    New Zealand (Maori)  1976  total      26 period            123
    ~ Column number_person_years_lived (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  number_person_years_lived
          England and Wales (Civilians)  1867  total 100-104 cohort                        126
                     France (Civilians)  1839   male      87 period                       2071
                     France (Civilians)  1904 female      79 period                      15157
                    New Zealand (Maori)  1972 female      62 period                      65233
                    New Zealand (Maori)  1976  total      26 period                      95711
    ~ Column number_person_years_remaining (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  number_person_years_remaining
          England and Wales (Civilians)  1867  total 100-104 cohort                            132
                     France (Civilians)  1839   male      87 period                           9342
                     France (Civilians)  1904 female      79 period                          82652
                    New Zealand (Maori)  1972 female      62 period                         876954
                    New Zealand (Maori)  1976  total      26 period                        3996308
    ~ Column number_survivors (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  number_survivors
          England and Wales (Civilians)  1867  total 100-104 cohort                71
                     France (Civilians)  1839   male      87 period              2301
                     France (Civilians)  1904 female      79 period             16156
                    New Zealand (Maori)  1972 female      62 period             66486
                    New Zealand (Maori)  1976  total      26 period             95773
    ~ Column probability_of_death (changed data)
-       - Removed values: 304437 / 2136227 (14.25%)
                                country  year    sex     age   type  probability_of_death
          England and Wales (Civilians)  1867  total 100-104 cohort             95.020004
                     France (Civilians)  1839   male      87 period                19.966
                     France (Civilians)  1904 female      79 period                12.362
                    New Zealand (Maori)  1972 female      62 period                 3.767
                    New Zealand (Maori)  1976  total      26 period                 0.129
  = Table exposures
    ~ Dim country
-       - Removed values: 428064 / 3271455 (13.08%)
           year    sex age   type                       country
           1867 female  30 cohort England and Wales (Civilians)
           1899   male  41 cohort            France (Civilians)
           2018  total  39 period            France (Civilians)
           2020  total  62 period            France (Civilians)
           1987 female  75 period           New Zealand (Maori)
    ~ Dim year
-       - Removed values: 428064 / 3271455 (13.08%)
                                country    sex age   type  year
          England and Wales (Civilians) female  30 cohort  1867
                     France (Civilians)   male  41 cohort  1899
                     France (Civilians)  total  39 period  2018
                     France (Civilians)  total  62 period  2020
                    New Zealand (Maori) female  75 period  1987
    ~ Dim sex
-       - Removed values: 428064 / 3271455 (13.08%)
                                country  year age   type    sex
          England and Wales (Civilians)  1867  30 cohort female
                     France (Civilians)  1899  41 cohort   male
                     France (Civilians)  2018  39 period  total
                     France (Civilians)  2020  62 period  total
                    New Zealand (Maori)  1987  75 period female
    ~ Dim age
-       - Removed values: 428064 / 3271455 (13.08%)
                                country  year    sex   type age
          England and Wales (Civilians)  1867 female cohort  30
                     France (Civilians)  1899   male cohort  41
                     France (Civilians)  2018  total period  39
                     France (Civilians)  2020  total period  62
                    New Zealand (Maori)  1987 female period  75
    ~ Dim type
-       - Removed values: 428064 / 3271455 (13.08%)
                                country  year    sex age   type
          England and Wales (Civilians)  1867 female  30 cohort
                     France (Civilians)  1899   male  41 cohort
                     France (Civilians)  2018  total  39 period
                     France (Civilians)  2020  total  62 period
                    New Zealand (Maori)  1987 female  75 period
    ~ Column exposure (changed data)
-       - Removed values: 428064 / 3271455 (13.08%)
                                country  year    sex age   type      exposure
          England and Wales (Civilians)  1867 female  30 cohort     251530.25
                     France (Civilians)  1899   male  41 cohort  272527.78125
                     France (Civilians)  2018  total  39 period    793355.375
                     France (Civilians)  2020  total  62 period   797636.0625
                    New Zealand (Maori)  1987 female  75 period    184.179993
  = Table births
    ~ Dim country
-       - Removed values: 1398 / 14763 (9.47%)
           year    sex                       country
           1934 female England and Wales (Civilians)
           1943  total England and Wales (Civilians)
           2003 female England and Wales (Civilians)
           1915 female            France (Civilians)
           2005   male       New Zealand (Non-Maori)
    ~ Dim year
-       - Removed values: 1398 / 14763 (9.47%)
                                country    sex  year
          England and Wales (Civilians) female  1934
          England and Wales (Civilians)  total  1943
          England and Wales (Civilians) female  2003
                     France (Civilians) female  1915
                New Zealand (Non-Maori)   male  2005
    ~ Dim sex
-       - Removed values: 1398 / 14763 (9.47%)
                                country  year    sex
          England and Wales (Civilians)  1934 female
          England and Wales (Civilians)  1943  total
          England and Wales (Civilians)  2003 female
                     France (Civilians)  1915 female
                New Zealand (Non-Maori)  2005   male
    ~ Column birth_rate (changed data)
-       - Removed values: 1398 / 14763 (9.47%)
                                country  year    sex  birth_rate
          England and Wales (Civilians)  1934 female    6.959682
          England and Wales (Civilians)  1943  total    9.072053
          England and Wales (Civilians)  2003 female    5.656828
                     France (Civilians)  1915 female    5.628813
                New Zealand (Non-Maori)  2005   male    6.098083
    ~ Column births (changed data)
-       - Removed values: 1398 / 14763 (9.47%)
                                country  year    sex  births
          England and Wales (Civilians)  1934 female  290768
          England and Wales (Civilians)  1943  total  684334
          England and Wales (Civilians)  2003 female  303041
                     France (Civilians)  1915 female  190141
                New Zealand (Non-Maori)  2005   male   20756
  = Table diff_ratios
    ~ Dim country
-       - Removed values: 101212 / 708943 (14.28%)
           year   age   type                       country
           1871    76 period England and Wales (Civilians)
           1906    18 period England and Wales (Civilians)
           1857    93 period            France (Civilians)
           1920    17 cohort            France (Civilians)
           1924 70-74 period            France (Civilians)
    ~ Dim year
-       - Removed values: 101212 / 708943 (14.28%)
                                country   age   type  year
          England and Wales (Civilians)    76 period  1871
          England and Wales (Civilians)    18 period  1906
                     France (Civilians)    93 period  1857
                     France (Civilians)    17 cohort  1920
                     France (Civilians) 70-74 period  1924
    ~ Dim age
-       - Removed values: 101212 / 708943 (14.28%)
                                country  year   type   age
          England and Wales (Civilians)  1871 period    76
          England and Wales (Civilians)  1906 period    18
                     France (Civilians)  1857 period    93
                     France (Civilians)  1920 cohort    17
                     France (Civilians)  1924 period 70-74
    ~ Dim type
-       - Removed values: 101212 / 708943 (14.28%)
                                country  year   age   type
          England and Wales (Civilians)  1871    76 period
          England and Wales (Civilians)  1906    18 period
                     France (Civilians)  1857    93 period
                     France (Civilians)  1920    17 cohort
                     France (Civilians)  1924 70-74 period
    ~ Column central_death_rate_mf_ratio (changed data)
-       - Removed values: 101212 / 708943 (14.28%)
                                country  year   age   type  central_death_rate_mf_ratio
          England and Wales (Civilians)  1871    76 period                     1.076823
          England and Wales (Civilians)  1906    18 period                     1.187919
                     France (Civilians)  1857    93 period                     1.005175
                     France (Civilians)  1920    17 cohort                     1.087301
                     France (Civilians)  1924 70-74 period                     1.282162
    ~ Column life_expectancy_fm_diff (changed data)
-       - Removed values: 101212 / 708943 (14.28%)
                                country  year   age   type  life_expectancy_fm_diff
          England and Wales (Civilians)  1871    76 period                     0.47
          England and Wales (Civilians)  1906    18 period                 2.859997
                     France (Civilians)  1857    93 period                     0.03
                     France (Civilians)  1920    17 cohort                 8.510002
                     France (Civilians)  1924 70-74 period                     1.19
    ~ Column life_expectancy_fm_ratio (changed metadata, changed data)
-       - {}
+       + title: Life expectancy ratio (f/m)
+       + description_short: The ratio of the << type >> life expectancy (females to males) at age << age >>.
+       + description_key:
+       +   - Higher values indicate longer life expectancy among females than males.
+       +   - |-
+       +     <%- if type == "period" -%>
+       +     Period life expectancy is a metric that summarizes death rates across all age groups in one particular year.
+       +     <%- else -%>
+       +     Cohort life expectancy is the average lifespan of a group of people, usually a birth cohort – people born in the same year.
+       +     <%- endif -%>
+       +   - |-
+       +     <%- if type == "period" -%>
+       +     <%- if age == '0' -%>
+       +     For a given year, it represents the average lifespan for a hypothetical group of people, if they experienced the same age-specific death rates throughout their whole lives as the age-specific death rates seen in that particular year.
+       +     <%- else -%>
+       +     For a given year, it represents the remaining average lifespan for a hypothetical group of people, if they experienced the same age-specific death rates throughout the rest of their lives as the age-specific death rates seen in that particular year.
+       +     <%- endif -%>
+       +     <%- else -%>
+       +     <%- if age == '0' -%>
+       +     It is calculated by tracking individuals from that cohort throughout their lives until death, and calculating their average lifespan.
+       +     <%- else -%>
+       +     It is calculated by tracking individuals from that cohort throughout the rest of their lives until death, and calculating their average remaining lifespan.
+       +     <%- endif -%>
+       +     <%- endif -%>
+       + origins:
+       +   - producer: Human Mortality Database
+       +     title: Human Mortality Database
+       +     description: |-
+       +       The Human Mortality Database (HMD) contains original calculations of all-cause 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
+       + 
+       +       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 configurations.
+       + 
+       +       It is reasonable to ask whether a single procedure is the best method for treating the data from a variety of populations. Here, two points must be considered. First, the authors' uniform methodology is based on procedures that were developed separately, though following similar principles, for various countries and by different researchers. Earlier methods were synthesized by choosing what they considered the best among alternative procedures and by eliminating superficial inconsistencies. The second point is that a uniform procedure is possible only because the authors have not attempted to correct the data for reporting and coverage errors. Although some general principles could be followed, such problems would have to be addressed individually for each population.
+       + 
+       +       Although the authors adhere strictly to a uniform procedure, the data for each population also receive significant individualized attention. Each country or area is assigned to an individual researcher, who takes responsibility for assembling and checking the data for errors. In addition, the person assigned to each country/area checks the authors' data against other available sources. These procedures help to assure a high level of data quality, but assistance from database users in identifying problems is always appreciated!
+       +     citation_full: |-
+       +       HMD. Human Mortality Database. Max Planck Institute for Demographic Research (Germany), University of California, Berkeley (USA), and French Institute for Demographic Studies (France). Available at www.mortality.org.
+       + 
+       +       See also the methods protocol:
+       +       Wilmoth, J. R., Andreev, K., Jdanov, D., Glei, D. A., Riffe, T., Boe, C., Bubenheim, M., Philipov, D., Shkolnikov, V., Vachon, P., Winant, C., & Barbieri, M. (2021). Methods protocol for the human mortality database (v6). [Available online](https://www.mortality.org/File/GetDocument/Public/Docs/MethodsProtocolV6.pdf) (needs log in to mortality.org).
+       +     attribution_short: HMD
+       +     url_main: https://www.mortality.org/Data/ZippedDataFiles
+       +     date_accessed: '2024-11-27'
+       +     date_published: '2024-11-13'
+       +     license:
+       +       name: CC BY 4.0
+       +       url: https://www.mortality.org/Data/UserAgreement
+       + unit: ''
+       + short_unit: ''
+       + display:
+       +   numDecimalPlaces: 1
+       +   name: Life expectancy (female-to-male ratio) at << 'birth' if (age == '0') else age >>, << type >>
+       + processing_level: major
+       + presentation:
+       +   title_public: Life expectancy at << age if age != '0' else 'birth'>>
+       +   title_variant: female-to-male ratio, << type >> tables
+       +   attribution_short: HMD
+       +   topic_tags:
+       +     - Life Expectancy
+       +     - Gender Ratio

-       - Removed values: 101212 / 708943 (14.28%)
                                country  year   age   type  life_expectancy_fm_ratio
          England and Wales (Civilians)  1871    76 period                       NaN
          England and Wales (Civilians)  1906    18 period                       NaN
                     France (Civilians)  1857    93 period                       NaN
                     France (Civilians)  1920    17 cohort                       NaN
                     France (Civilians)  1924 70-74 period                       NaN
        ~ Changed values: 706787 / 708943 (99.70%)
              country  year   age   type  life_expectancy_fm_ratio -  life_expectancy_fm_ratio +
              Denmark  1896    79 period                         NaN                    1.103512
           Luxembourg  2015 15-19 period                         NaN                     1.06461
               Sweden  1776    25 cohort                         NaN                    1.094012
          Switzerland  1948   103 period                         NaN                    1.059603
              Ukraine  1975 55-59 period                         NaN                    1.250394
    ~ Column life_expectancy_mf_ratio (changed metadata, changed data)
+       + {}
-       - title: Life expectancy ratio (f/m)
-       - description_short: The ratio of the << type >> life expectancy (males to females) at age << age >>.
-       - description_key:
-       -   - Higher values indicate longer life expectancy among females than males.
-       -   - |-
-       -     <%- if type == "period" -%>
-       -     Period life expectancy is a metric that summarizes death rates across all age groups in one particular year.
-       -     <%- else -%>
-       -     Cohort life expectancy is the average lifespan of a group of people, usually a birth cohort – people born in the same year.
-       -     <%- endif -%>
-       -   - |-
-       -     <%- if type == "period" -%>
-       -     <%- if age == '0' -%>
-       -     For a given year, it represents the average lifespan for a hypothetical group of people, if they experienced the same age-specific death rates throughout their whole lives as the age-specific death rates seen in that particular year.
-       -     <%- else -%>
-       -     For a given year, it represents the remaining average lifespan for a hypothetical group of people, if they experienced the same age-specific death rates throughout the rest of their lives as the age-specific death rates seen in that particular year.
-       -     <%- endif -%>
-       -     <%- else -%>
-       -     <%- if age == '0' -%>
-       -     It is calculated by tracking individuals from that cohort throughout their lives until death, and calculating their average lifespan.
-       -     <%- else -%>
-       -     It is calculated by tracking individuals from that cohort throughout the rest of their lives until death, and calculating their average remaining lifespan.
-       -     <%- endif -%>
-       -     <%- endif -%>
-       - origins:
-       -   - producer: Human Mortality Database
-       -     title: Human Mortality Database
-       -     description: |-
-       -       The Human Mortality Database (HMD) contains original calculations of all-cause 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
-       - 
-       -       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 configurations.
-       - 
-       -       It is reasonable to ask whether a single procedure is the best method for treating the data from a variety of populations. Here, two points must be considered. First, the authors' uniform methodology is based on procedures that were developed separately, though following similar principles, for various countries and by different researchers. Earlier methods were synthesized by choosing what they considered the best among alternative procedures and by eliminating superficial inconsistencies. The second point is that a uniform procedure is possible only because the authors have not attempted to correct the data for reporting and coverage errors. Although some general principles could be followed, such problems would have to be addressed individually for each population.
-       - 
-       -       Although the authors adhere strictly to a uniform procedure, the data for each population also receive significant individualized attention. Each country or area is assigned to an individual researcher, who takes responsibility for assembling and checking the data for errors. In addition, the person assigned to each country/area checks the authors' data against other available sources. These procedures help to assure a high level of data quality, but assistance from database users in identifying problems is always appreciated!
-       -     citation_full: |-
-       -       HMD. Human Mortality Database. Max Planck Institute for Demographic Research (Germany), University of California, Berkeley (USA), and French Institute for Demographic Studies (France). Available at www.mortality.org.
-       - 
-       -       See also the methods protocol:
-       -       Wilmoth, J. R., Andreev, K., Jdanov, D., Glei, D. A., Riffe, T., Boe, C., Bubenheim, M., Philipov, D., Shkolnikov, V., Vachon, P., Winant, C., & Barbieri, M. (2021). Methods protocol for the human mortality database (v6). [Available online](https://www.mortality.org/File/GetDocument/Public/Docs/MethodsProtocolV6.pdf) (needs log in to mortality.org).
-       -     attribution_short: HMD
-       -     url_main: https://www.mortality.org/Data/ZippedDataFiles
-       -     date_accessed: '2024-11-27'
-       -     date_published: '2024-11-13'
-       -     license:
-       -       name: CC BY 4.0
-       -       url: https://www.mortality.org/Data/UserAgreement
-       - unit: ''
-       - short_unit: ''
-       - display:
-       -   numDecimalPlaces: 1
-       -   name: Life expectancy (female-to-male ratio) at << 'birth' if (age == '0') else age >>, << type >>
-       - processing_level: major
-       - presentation:
-       -   title_public: Life expectancy at << age if age != '0' else 'birth'>>
-       -   title_variant: female-to-male ratio, << type >> tables
-       -   attribution_short: HMD
-       -   topic_tags:
-       -     - Life Expectancy
-       -     - Gender Ratio

-       - Removed values: 101212 / 708943 (14.28%)
                                country  year   age   type  life_expectancy_mf_ratio
          England and Wales (Civilians)  1871    76 period                  0.927692
          England and Wales (Civilians)  1906    18 period                  0.939916
                     France (Civilians)  1857    93 period                  0.988372
                     France (Civilians)  1920    17 cohort                  0.863731
                     France (Civilians)  1924 70-74 period                  0.874207
        ~ Changed values: 706806 / 708943 (99.70%)
                 country  year   age   type  life_expectancy_mf_ratio -  life_expectancy_mf_ratio +
                 Czechia  2017    47 period                     0.85834                         NaN
                 Denmark  1912    67 cohort                    0.768724                         NaN
                   Italy  1965    62 period                    0.842524                         NaN
                   Spain  1949    31 period                    0.894974                         NaN
          United Kingdom  1976 50-54 period                    0.817639                         NaN
  = Table deaths
    ~ Dim country
-       - Removed values: 222243 / 1739241 (12.78%)
           year   sex age                       country
           1992  male   6 England and Wales (Civilians)
           1942 total  79            France (Civilians)
           1975  male  90           New Zealand (Maori)
           1987  male 102           New Zealand (Maori)
           1990  male  57           New Zealand (Maori)
    ~ Dim year
-       - Removed values: 222243 / 1739241 (12.78%)
                                country   sex age  year
          England and Wales (Civilians)  male   6  1992
                     France (Civilians) total  79  1942
                    New Zealand (Maori)  male  90  1975
                    New Zealand (Maori)  male 102  1987
                    New Zealand (Maori)  male  57  1990
    ~ Dim sex
-       - Removed values: 222243 / 1739241 (12.78%)
                                country  year age   sex
          England and Wales (Civilians)  1992   6  male
                     France (Civilians)  1942  79 total
                    New Zealand (Maori)  1975  90  male
                    New Zealand (Maori)  1987 102  male
                    New Zealand (Maori)  1990  57  male
    ~ Dim age
-       - Removed values: 222243 / 1739241 (12.78%)
                                country  year   sex age
          England and Wales (Civilians)  1992  male   6
                     France (Civilians)  1942 total  79
                    New Zealand (Maori)  1975  male  90
                    New Zealand (Maori)  1987  male 102
                    New Zealand (Maori)  1990  male  57
    ~ Column deaths (changed data)
-       - Removed values: 222243 / 1739241 (12.78%)
                                country  year   sex age        deaths
          England and Wales (Civilians)  1992  male   6          60.0
                     France (Civilians)  1942 total  79  17490.279297
                    New Zealand (Maori)  1975  male  90           0.0
                    New Zealand (Maori)  1987  male 102           0.0
                    New Zealand (Maori)  1990  male  57          23.5
  = Table population
    ~ Dim country
-       - Removed values: 223839 / 1757595 (12.74%)
           year    sex age                       country
           1856 female  25 England and Wales (Civilians)
           1856 female  81            France (Civilians)
           1866  total  82            France (Civilians)
           1961   male  85            France (Civilians)
           2021   male  32            France (Civilians)
    ~ Dim year
-       - Removed values: 223839 / 1757595 (12.74%)
                                country    sex age  year
          England and Wales (Civilians) female  25  1856
                     France (Civilians) female  81  1856
                     France (Civilians)  total  82  1866
                     France (Civilians)   male  85  1961
                     France (Civilians)   male  32  2021
    ~ Dim sex
-       - Removed values: 223839 / 1757595 (12.74%)
                                country  year age    sex
          England and Wales (Civilians)  1856  25 female
                     France (Civilians)  1856  81 female
                     France (Civilians)  1866  82  total
                     France (Civilians)  1961  85   male
                     France (Civilians)  2021  32   male
    ~ Dim age
-       - Removed values: 223839 / 1757595 (12.74%)
                                country  year    sex age
          England and Wales (Civilians)  1856 female  25
                     France (Civilians)  1856 female  81
                     France (Civilians)  1866  total  82
                     France (Civilians)  1961   male  85
                     France (Civilians)  2021   male  32
    ~ Column population (changed data)
-       - Removed values: 223839 / 1757595 (12.74%)
                                country  year    sex age    population
          England and Wales (Civilians)  1856 female  25   165890.8125
                     France (Civilians)  1856 female  81  24078.210938
                     France (Civilians)  1866  total  82  40966.199219
                     France (Civilians)  1961   male  85       23960.0
                     France (Civilians)  2021   male  32      392991.0
+ Dataset garden/un/2024-12-02/un_wpp_lt
+ + Table un_wpp_lt
+   + Column central_death_rate
+   + Column probability_of_death
+   + Column probability_of_survival
+   + Column number_survivors
+   + Column number_deaths
+   + Column number_person_years_lived
+   + Column survivorship_ratio
+   + Column number_person_years_remaining
+   + Column life_expectancy
+   + Column average_survival_length


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-12-03 16:23:19 UTC
Execution time: 1130.20 seconds

@lucasrodes lucasrodes marked this pull request as ready for review December 3, 2024 14:11
@lucasrodes lucasrodes mentioned this pull request Dec 3, 2024
6 tasks
@lucasrodes lucasrodes merged commit f860f1d into master Dec 3, 2024
8 checks passed
@lucasrodes lucasrodes deleted the data-life-expectancy-dependencies branch December 3, 2024 16:29
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.

2 participants