Member-only story

Lines in the sand

How do we show past averages and other series on graphs?

Anthony B. Masters
3 min readJan 29, 2022

The past often provides context for present events. Through understanding previous commonality and rarity, we throw an anchor into current tides.

Weekly reports from the Office for National Statistics show death registration counts. These figures separate into whether those deaths involve Covid-19. The disease was either an underlying cause, or contributed to that person’s death. For deaths not involving Covid-19, there was no mention on the death certificate.

(Image: Office for National Statistics)

There is a need to . To do this, the ONS show an average of five previous years. Deaths in 2020 and 2021 have the past average of 2015 to 2019 as a comparison. For the latest year, the benchmark is an average of 2016 to 2019, and 2021.

Reusing the initial average of 2015–2019 becomes less robust over time. The population grows, ages, and changes its structure.

How should we show the past?

The basic plot starts with the stacked bar graph, coloured by two groups:

nisra_deaths_tidy_df %>%
ggplot(aes(x = date)) +
geom_col(aes(y = count, fill = nisra_measure),
position = "stack")

There is a second data frame, which shows the past average by week. Plotting…

--

--

Anthony B. Masters
Anthony B. Masters

Written by Anthony B. Masters

This blog looks at the use of statistics in Britain and beyond. It is written by RSS Statistical Ambassador and Chartered Statistician @anthonybmasters.

No responses yet