This repository contains code and data used to measure excess mortality in Mexico City in the context of the COVID-19 epidemic. This information was published as a series of articles in the magazine Nexos.
Different commits correspond to the different articles as follows:
-
¿Qué nos dicen las actas de defunción de la CDMX? published on May 26, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 31 de mayo de 2020: published on June 6, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 7 de junio 2020 y seguimiento semanal published on June 15, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 28 de junio 2020 published on July 3, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 5 de julio 2020 published on July 13, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 12 de julio 2020 published on July 20, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 19 de julio 2020 published on July 27, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 26 de julio 2020 published on August 6, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 2 de agosto 2020 published on August 13, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 9 de agosto 2020 published on August 20, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 23 de agosto 2020 published on September 3, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 20 de septiembre 2020 published on October 12, 2020 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 20 de diciembre 2020 published on January 7, 2021 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 27 de diciembre 2020 published on January 18, 2021 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 3 de enero 2021 published on January 25, 2021 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 31 de enero 2021 published on February 8, 2021 -> commit
-
¿Qué nos dicen las actas de defunción de la CDMX? Actualización al 14 de febrero 2021 published on February 22, 2021 -> commit
The data for 2019 and 2020 consist of a count of deaths certificates registered in the Civil Registry Tribunals of Mexico City.
To obtain this data, we developed a program to determine the total number of death certificates available for consultation on the web platform of the Civil Registry Tribunals of Mexico City. Each death certificate is indexed according to the year of registry, the tribunal in which it was registered, and a unique ID number. These IDs are consecutive and they reset at the start of the year for each tribunal, meaning that the first death registered in every tribunal each year has an ID of “1”, the second one has an ID of “2”, and so on until registering the last death certificate for the period. Our program ran a binary search for each of the 52 tribunals to determine the total number of certificated registered for a specific time period. After the publication of the first article mentioned above a CAPTCHA was added to the site, which prevented us from using our program to obtain subsequent updates. We have since transitioned to obtaining further updates by performing the binary searches manually.
For years prior to 2018, the information is available on the National Institute of Statistics, Geography and Informatics (INEGI) webpage. Note: The day of registry of the death certificates is not specified for a limited number of cases and “99” appears instead. To adjust for it, we uniformly distributed the total number of deaths reported with a “99” day within their respective months.
Weeks used for the following files correspond to the ISO week system. Each week starting on a Monday and closing on a Sunday.
inegi-days.csv
: Number of daily deaths and acumulated deaths registered every day of the period 2016 - 2018 using information from the National Institute of Statistics, Geography and Informatics (INEGI).weeks.csv
: Number of weekly deaths registered in 2016, 2017, 2018 from INEGI, and total death certificate counts for 2019 and 2020 using our methodology.
months2019.csv
: Highest death certificate ID number by tribunal for each month in 2019.months2020.csv
: Highest death certificate ID number by tribunal for each month in 2020.
In order to verify our methodology, we drew three random samples of ID numbers for the three largest tribunals, which account for over 75% of the registered certificates, to confirm that they actually existed and that the date of deaths occurred within the expected period. The samples for Tribunal 14, 18, and 51 are available here: Sample-juzgado14.csv
, Sample-juzgado18.csv
, Sample-juzgado51.csv
.
As an additional sanity check, we counted the total number of registered certificates for each tribunal in 2016, 2017 and 2018 and compared those numbers against the officially published mortality data for those years. In all three cases, our methodology returned results higher than the official data, but all were below 0.6%, within our acceptable margin of error. The results of our certificate count for each of these years are in cy2016.edn
, cy2017.edn
and cy2018.edn
files.
The data collected and analyzed is available under the Creative Commons Attribution 4.0 International License.
The data and files that we have generated from official sources are freely available for public use, as long as we are cited cited as a source.
How to cite? --- Romero Zavala, Mario & Despeghel, Laurianne. (2020). Excess mortality data for Mexico City 2020. https://github.com/mariorz/folio-deceso
This data has been collected and analyzed by Mario Romero Zavala and Laurianne Despeghel.
If you have any questions or suggestions, please email [email protected] or [email protected]