• Stars
    star
    459
  • Rank 94,776 (Top 2 %)
  • Language
    R
  • License
    MIT License
  • Created over 3 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Economist's model to estimate excess deaths to the covid-19 pandemic

The Economist's excess deaths model

update

This repository contains the replication code and data for The Economist's excess deaths model, used to estimate excess deaths due to the covid-19 pandemic.

Chart of total deaths over time

Getting started

Before running the R scripts, please install all the dependencies listed in this file.

Keep in mind that you need to use a modified development version of agtboost, which has been rewritten to load machine learning ensembles faster (our approach requires loading 210 of these).

To install it, first install the devtools package:

install.packages('devtools')

And then install the development version from GitHub:

devtools::install_github("sondreus/agtboost/R-package")

Running the models

To update the model dynamically on a daily basis, run scripts/0_excess_deaths_global_estimates_autoupdater.R (from the main directory). This will generate update excess deaths estimates for every country and territory from Jan 1st 2020 until the present.

To replicate the model and export estimated excess deaths for a locality, please run the scripts 1, 2, and 3, in the scripts folder. As the model draws most of its data dynamically, you can also use these scripts to generate updated estimates and models as time passes.

Interpreting estimates

Estimating excess deaths for every country every day since the pandemic began is a complex and difficult task. Rather than being overly confident in a single number, limited data means that we can often only give a very very wide range of plausible values. Focusing on central estimates in such cases would be misleading: unless ranges are very narrow, the 95% range should be reported when possible. The ranges assume that the conditions for bootstrap confidence intervals are met. Please see our tracker page and methodology for more information.

New variants

The Omicron variant, first detected in southern Africa in November 2021, appears to have characteristics that are different to earlier versions of sars-cov-2. Where this variant is now dominant, this change makes estimates uncertain beyond the ranges indicated. Other new variants may do the same. As more data is incorporated from places where new variants are dominant, predictions improve.

Non-reporting countries

Turkmenistan and the Democratic People's Republic of Korea have not reported any covid-19 figures since the start of the pandemic. They also have not published all-cause mortality data. Exports of estimates for the Democratic People's Republic of Korea have been temporarily disabled as it now issues contradictory data: reporting a significant outbreak through its state media, but zero confirmed covid-19 cases/deaths to the WHO.

Acknowledgements

A special thanks to all our sources and to those who have made the data to create these estimates available. We list all our sources in our methodology. Within script 1, the source for each variable is also given as the data is loaded, with the exception of our sources for excess deaths data, which we detail in on our free-to-read excess deaths tracker as well as on GitHub. The gradient booster implementation used to fit the models is aGTBoost, detailed here.

Calculating excess deaths for the entire world over multiple years is both complex and imprecise. We welcome any suggestions on how to improve the model, be it data, algorithm, or logic. If you have one, please open an issue.

The Economist would also like to acknowledge the many people who have helped us refine the model so far, be it through discussions, facilitating data access, or offering coding assistance. A special thanks to Ariel Karlinsky, Philip Schellekens, Oliver Watson, Lukas Appelhans, Berent Ã…. S. Lunde, Gideon Wakefield, Johannes Hunger, Carol D'Souza, Yun Wei, Mehran Hosseini, Samantha Dolan, Mollie Van Gordon, Rahul Arora, Austin Teda Atmaja, Dirk Eddelbuettel and Tom Wenseleers.

All coding and data collection to construct these models (and make them update dynamically) was done by Sondre Ulvund Solstad. Should you have any questions about them after reading the methodology, please open an issue or contact him at [email protected].

Suggested citation

The Economist and Solstad, S. (corresponding author), 2021. The pandemic’s true death toll. [online] The Economist. Available at: https://www.economist.com/graphic-detail/coronavirus-excess-deaths-estimates [Accessed ---]. First published in the article "Counting the dead", The Economist, issue 20, 2021.

(See also our citation file)

More Repositories

1

big-mac-data

Data and methodology for the Big Mac index
Jupyter Notebook
1,581
star
2

us-potus-model

Code for a dynamic multilevel Bayesian model to predict US presidential elections. Written in R and Stan.
HTML
1,231
star
3

covid-19-excess-deaths-tracker

Source code and data for The Economist's covid-19 excess deaths tracker
R
641
star
4

graphic-detail-data

Data and code behind the Economist's Graphic Detail section.
Jupyter Notebook
398
star
5

the-economist-war-fire-model

Source code and data for The Economist's Ukraine war-fire model
R
234
star
6

the-economist-gdp-per-hour-estimates

Code and data for Graphic detail on GDP and productivity
R
81
star
7

2022-france-election-model

R
74
star
8

covid-19-risk-estimator

Diagnostic code mappings and replication code for the covid-19-risk-estimator
Jupyter Notebook
35
star
9

oecd_regional_inequality

Regional inequality data and analysis
34
star
10

normalcy-index-data

The Economist's "normalcy index" data repository
20
star
11

the-economist-conquests

Source code and data for "Vladimir Putin is dragging the world back to a bloodier time"
R
14
star
12

banana-index-data

Data and methodology for the Banana index
9
star
13

covid-19-italy-herd-immunity-GD

R
8
star
14

covid-19-us-seroprevalence-model

The Economist's seroprevalence model estimating American weekly covid-19 infections based on a combination of death by age and sex, IFR by age and sex, and confirmed cases.
R
8
star
15

fires-in-sudan

Code and data to analyse fire events in Sudan
R
7
star
16

2021-germany-election-model-PUBLIC

An election-forecasting model for the German federal parliament
R
7
star
17

Grim-Tallies

Replication data and code for "Briefing: Grim Tallies", including The Economist's estimate of global infections up to September 15, 2020.
R
6
star
18

dark

Chrome extension to read economist.com in dark mode
CSS
3
star
19

covid-19-age-adjusted-ifr

Estimated IFR based on country's population age distributions
R
3
star
20

nutrition

The Economist's modelling of nutritional outcomes, informed in part by demographic projections
R
3
star
21

the-economist-nationalism-and-corruption

R
3
star
22

us-midterms-2022-change-data

2
star
23

GraphicDetail_WagesAndPlaces

From the graphic detail 15.01.22
R
2
star
24

covid-19-wuhan-excess-deaths

Estimates of excess deaths in Wuhan for The Economist "Daily Chart"
R
2
star
25

britain-mrp-2024-estimates

Estimates of 2024 voting intention by constituency from our MRP model with We Think
2
star
26

GraphicDetail_GlobalGrain

Data and code for the Graphic Detail dated 25.06.22
R
1
star
27

moving_democrats

HTML
1
star
28

vbm-turnout-analysis

R
1
star
29

2022-iran-protests

Replication data for "Protest movements as deadly as Iran’s often end in revolution or civil war"
R
1
star
30

malaria-eradication-estimates

A repository containing The Economist's estimates of effects of a successful malaria eradication campaign.
R
1
star
31

HPV

R
1
star
32

covid-19-uk-seroprevalence-model

The Economist's seroprevalence model estimating weekly covid-19 infections in England and Wales based on a combination of death by age and sex, IFR by age and sex, and confirmed cases.
R
1
star