Advanced Octave A77 — Demographic surfaces by age, time and mortality
Advanced GNU Octave with GX-TXT · Module 13
Behind each point of these graphs there is a person, a family, a story. We use ISTAT data on the deaths of residents in Italy to understand how to read a demographic series, respecting what data can and cannot say.
Source and preparation
The source is the table ISTAT definitive of the provincial deaths per month, sex and age classes 2015–2024, available from ISTAT page on the production of mortality data. They are deaths for all causes, referring to the resident population, not only deaths caused by COVID-19.
We have added the 107 provinces, the twelve months and the two sexes for four classes: 0–49, 50–64, 65–79 and 80 years or more. The prepara_istat.py preparation script checks for each month that the sum of the classes coincides with the Italy line of the regional table. The CSV derivative and the source information are stored with the course.
2D Series: the main reference
The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import and execute serie_eta.m; create four created-only annual datasets, then use a new session or change the IDs to repeat. The chart shows the class counts:
In 2020 the four classes recorded respectively 17,431, 56,791, 182.865 and 483,230 deaths: in total 740,317 people. These counts do not attribute the cause of death. Classes have different widths and populations; the highest curve is not automatically the highest risk and the chart is not a comparison of rates.
Exploratory surface
dati_annuali.m publishes the same table as Dataset XYZ and creates a surface. The age_group axis uses indices 1 = 0–49, 2 = 50–64, 3 = 65–79, 4 = 80+:
The surface connects discrete classes of different size: the positions between the indices are not observed age and do not represent measured values. The prospect can also hide the less numerous classes. To compare trends, use graph 2D and table; to compare risks, they need consistent population denominators and, when appropriate, age standardization.
Exercise
- Are the counts decessed COVID-19 certificates?
- What is the 4th of the surface?
- Why can’t we interpret heights as mortality rates?
Worked solution
- No, they’re dead for all causes.
- The class of 80 years or more.
- Population denominators are missing and classes differ by size and structure.
Other steps of this project
- Advanced Octave A75 — Dynamical systems in phase space
- Advanced Octave A81 — Geography of the waves and a 3D surface
- Advanced Octave A82 — Age, sex and demographic inequalities
- Advanced Octave A83 — All-cause mortality, certified COVID deaths and surveillance
- Advanced Octave A84 — A reproducible public account
- Advanced Octave A73 — Optimization landscapes and 3D trajectories