This repository contains a Python script along with PNG charts and CSV datasets it creates, showing all-cause mortality compared to COVID-19 mortality for a given country and year, in the context of restrictions stringency, vaccinations count, virus testing, and the country's all-cause mortality in preceding years.
- To see all charts on a single page click this CHARTS.md link. Updates are uploaded every few days when I decide enough new data are available. Here are few example charts:
Poland 2020 | Israel 2021 | Sweden 2021 | Australia 2020 | Latvia 2021 |
---|---|---|---|---|
-
To see only a single chart or dataset for a given country and year:
-
Enter directory covid_toll_ALL which contains charts (in PNG format) and data (in CSV format) for countries which have had their data in both the excess_mortality.csv and the owid-covid-data.csv.
-
Click on any file. E.g. on the covid_toll_ALL/Poland_2021.png to see the chart for Poland in 2021, or the covid_toll_ALL/Poland_2021.csv to see the chart's input data.
-
Charts were rendered using covid_toll_tool.py with --interpolate
switch set on. By default, this
interpolation is disabled - please see covid_toll_tool.py --help
and code for more details.
-
Make sure you have
Python
3.9 or newer withPandas
andmatplotlib
libraries installed. -
git clone
this repository. -
cd
to a directory where you have cloned it. -
Download these 2 datasets from the OWID's GitHub repository into that same directory: excess_mortality.csv and owid-covid-data.csv.
-
Run
./covid_toll_tool.py --help
to figure out how to proceed. The final product will be a PNG chart and a CSV dataset for the--country
and--year
specified on the command line. E.g.Poland_2020.png
andPoland_2020.csv
, ifPoland
and2020
were specified, respectively.
All input data are provided by the Our World in Data (OWID) project under the Creative Commons BY license.
covid_toll_tool.py
doesn't alter the OWID's data in a meaningful way. It mainly aggregates those that I find most
relevant and combines them on one chart per country/year, for a convenient visual analysis. You can verify the
identity of my charts' data against the original OWID's data using their Data explorer.
The only data presented on covid_toll_tool.py
's charts that you won't find directly in OWID's Data explorer,
but which were derived from those nevertheless, are:
-
Death count from all causes excluding deaths attributed to COVID-19 (black dashed line). It's calculated as the all-cause mortality minus the number of deaths attributed to COVID-19. Viewed together with the all-cause mortality (black solid line) it allows to assess the actual contribution of COVID-19 to country's total mortality in a given period. This metric should be taken with a grain of salt however, as deaths are commonly attributed to COVID-19 according to COVID-19 test results alone, while the count of positive COVID-19 test results is an artifact of the total number of tests conducted, which fluctuates in time a lot: The more tests - the more test results, the more test results - the more positive test results (aka "cases"), the more positive test results ("cases") - the more deaths attributed to covid.
-
Percent of people vaccinated in country's populace - partially, fully and booster doses.
OWID obtains their data from official sources like government healthcare agencies and academic institutions. For more information, please visit their README on the all-cause mortality data, README about the data on COVID-19 and the following resources those READMEs refer to:
- All-cause mortality:
- COVID-19 mortality:
- Restrictions stringency index:
- Hale, T. et al. A global panel database of pandemic policies (Oxford COVID-19 Government Response Tracker). Nature Human Behaviour (2021). https://doi.org/10.1038/s41562-021-01079-8
- Vaccinations:
- Mathieu, E. et al. A global database of COVID-19 vaccinations. Nature Human Behaviour (2021). https://doi.org/10.1038/s41562-021-01122-8
- Testing:
- Hasell, J., Mathieu, E., Beltekian, D. et al. A cross-country database of COVID-19 testing. Sci Data 7, 345 (2020). https://doi.org/10.1038/s41597-020-00688-8