Advanced Octave A77 — Demographic surfaces by age, time and mortality

by Giux GX-TXT, octave-en, scripts-en 2 min read

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

  1. Are the counts decessed COVID-19 certificates?
  2. What is the 4th of the surface?
  3. Why can’t we interpret heights as mortality rates?

Worked solution

  1. No, they’re dead for all causes.
  2. The class of 80 years or more.
  3. Population denominators are missing and classes differ by size and structure.

Download the Module 13 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *