ons_mortality | R Documentation |
Provisional counts of the number of deaths registered in England and Wales, by age, sex and region, from week commencing 8th January 2010 to 3rd April 202.
data(ons_mortality)
Data frame with five columns
character, containing the names of the groups for counts, for example "Total deaths", "all ages".
character, subcategory of names of groups where necessary, for example details of region: "East", details of age bands "15-44".
numeric, numbers of deaths in whole numbers and average numbers with decimal points. To retain the integrity of the format this column data is left as character.
date, format is yyyy-mm-dd; all dates are a Friday.
integer, each week in a year is numbered sequentially.
Source and licence acknowledgement
This data has been made available through Office of National Statistics under the Open Government Licence http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
Collected by Zoƫ Turner, Apr-2020 from https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales
data(ons_mortality)
library(dplyr)
library(tidyr)
# create a dataset that is "wide" with each date as a column
ons_mortality |>
select(-week_no) |>
pivot_wider(
names_from = date,
values_from = counts
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.