Determine 1: Whole Weekly Deaths in England & Wales.
The crimson curve is an equally-weighted common of weekly deaths in a given area for the previous 5 years, as much as and together with 2019.
Weeks are outlined by the ONS to finish on Fridays. Which means that a given week doesn’t essentially correspond to the identical days of the yr throughout years, however at all times precisely one in every of every day of the week: Monday, Tuesday, and so on. This eliminates seasonality from day-of-the-week results, however creates the potential of uncared for seasonality from holidays that transfer throughout weeks throughout completely different years, e.g. Easter.
For every level on the crimson curve, we’ve added easy error bars: (pm 2 instances textual content{SE}) the place SE is the same old normal error for a imply, ignoring any potential dependence between deaths in the identical week throughout completely different years.
The blue curve depicts weekly deaths in 2020.
From week 12 or 13, relying on area, we see a dramatic uptick in deaths throughout England and Wales, properly outdoors the 2 normal error bars. R supply code for this plot follows beneath.
library(tidyverse)
library(rcovidUK)
#Set the latest week of knowledge for 2020
week_2020 <- 16 # unique model of this publish solely had knowledge as much as week 16
#week_2020 <- ONSweekly %>%
# filter(yr == 2020, !is.na(deaths)) %>%
# pull(week) %>%
# max
df_2020 <- ONSweekly %>%
filter(yr == 2020)
df_prev5 <- ONSweekly %>%
filter(yr < 2020 & yr >= 2015)
df_prev5 %>%
group_by(reg_nm, week) %>%
summarise(deaths_mean = imply(deaths),
deaths_sd = sd(deaths),
n = n(),
se = deaths_sd/sqrt(n)) %>%
mutate(yr = "2015-2019") %>%
rename(deaths = deaths_mean) %>%
bind_rows(df_2020) %>%
filter(week%
ggplot(aes(x=week, y = deaths, col = yr,
group = reg_id)) +
geom_errorbar(aes(ymin=deaths - 2 * se,
ymax = deaths + 2 * se),
width=.2, color="black") +
geom_line(dimension = 1) +
facet_wrap(~reg_nm, ncol = 2) +
scale_color_brewer(palette = "Set1",
labels = c("Avg Previous 5 Yrs", "2020")) +
labs(x= "Week from Begin of 12 months",
y = "Deaths per Week") +
theme_bw()+
theme(legend.place = 'high',
legend.title = element_blank(),
legend.key.dimension = unit(1, "cm"))
