Giter Site home page Giter Site logo

bk75r / nrsdeaths Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 53.24 MB

Calculating and reformatting National Records of Scotland weekly deaths data for all available age categories

License: The Unlicense

R 100.00%
covid-19 scotland deaths excess-deaths excess-mortality nrs age

nrsdeaths's Introduction

NRSDeaths

Calculating and reformatting National Records of Scotland (NRS) weekly deaths data for all available detailed age categories.

This code and data are being made available here because the National Records of Scotland (NRS) doesn't make excess deaths data available in a more detailed format for presenting and analysing deaths by age group in Scotland.

These data are now available here.

NRS Death Data

The data used in the excess deaths calculations are available here: https://www.nrscotland.gov.uk/statistics-and-data/statistics/statistics-by-theme/vital-events/general-publications/weekly-and-monthly-data-on-births-and-deaths/deaths-involving-coronavirus-covid-19-in-scotland/related-statistics

Two datasets were used to calculate excess deaths:

Where is the detailed excess deaths dataset from NRS?

Unfortunately, excess deaths are only available from the Public Health Scotland Shiny dashboard and these are grouped into "Under 65" and "65 and over" age groups only. This isn't helpful for tracking the effect of COVID-19, vaccination programmes and lockdowns on all causes deaths and COVID-19 deaths in more detail.

Which age groups are covered?

The calculations in this code allows the calculation of the following age groups:

0 1 to 4 5 to 9 10 to 14
15 to 19 20 to 24 25 to 29 30 to 34
35 to 39 40 to 44 45 to 49 50 to 54
55 to 59 60 to 64 65 to 69 70 to 74
75 to 79 80 to 84 85 to 89 90+

The "Weekly deaths by sex and age group in NHS health boards, 2020 - 2022" has "90 to 94" and "95+" age groups too. What happened to them?

The oldest age group in the "Weekly deaths by sex and age group, 2000 to 2019" data is 90+. To allow a comparison between the 2000-2019 and 2020-2022 datasets the "90 to 94" and "95+" age groups were summed to create a "90+" age group in the "...2020 - 2022" dataset.

How were excess deaths calculated?

Excess deaths were calculated in this way.

Average deaths for 2015 to 2019 were calculated

2022-02-28 NRS Weekly Deaths by Age (2015-2019, average) - faceted These data were used as the "baseline" expected death rate for 2020 to 2021.

Average deaths for 2016 to 2019 plus 2021 were calculated

2022-02-28 NRS Weekly Deaths by Age (2016-2019 plus 2021, average) - faceted NRS use 2016-2019 plus 2021 deaths as the baseline for 2022 (https://nrscotland.gov.uk/files/statistics/covid19/covid-deaths-methodology-excess-deaths-in-2022.pdf). The same baseline as NRS was used to calculate 2022 excess deaths.

Excess deaths were then calculated using the average deaths as the baseline

Excess deaths were calculated by subtracting the 2015 to 2019 average weekly deaths baseline data from the 2020 and 2021 weekly deaths data, and the 2016 to 2019 plus 2021 average weekly deaths baseline data from the 2022 weekly deaths data, for each age group. 2022-03-02 Excess Deaths in Scotland (2020-2022 using updated baseline) - faceted

Cumulative excess deaths

Cumulative excess deaths were also calculated. Graphing cumulative excess deaths can show more clearly when their weekly rate has changed over the year.

2022-02-28 Cumulative Excess Deaths in Scotland, 2020 and 2021 (faceted by age group)

2023-01-12 Cumulative Excess Deaths in Scotland, 2020 to 2022 (revised 2022 baseline)

Data format

The data are available in a .xlsx file in the /data folder.

Excess deaths

NRSExcessDeaths excel sheet - excess

All cause deaths

NRSExcessDeaths excel sheet - all cause

Baseline deaths

NRSExcessDeaths excel sheet - baseline

Mean deaths 2015 to 2019

NRSExcessDeaths excel sheet - mean 2015-2019

Mean deaths 2016 to 2019 plus 2021

NRSExcessDeaths excel sheet - mean 2016-2019 + 2021

Licensing

The data shared here available from the National Records Scotland website is made available under the Open Government License. The NRS provides more information on how their data is made available here: https://www.nrscotland.gov.uk/about-us/corporate-information#open%20data

nrsdeaths's People

Contributors

bk75r avatar

Stargazers

 avatar

Watchers

 avatar  avatar

nrsdeaths's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.