Publications by Anthony B. Masters

ONS Monthly Mortality Analysis England

02.11.2021

Purpose The purpose of this code is to make graphs showing age-standardised and age-specific mortality rates in England across time. A second graph shows the age-standardised components. These graphs use the Office for National Statistics’ monthly mortality analyses for England and Wales. The latest version is for September 2021. Packages and ...

1095 sym R (7008 sym/16 pcs) 2 img

Rapid and Confirmatory Tests

19.10.2021

Purpose The purpose of this R code is to produce a graph showing the impacts on infection probabilities following different test results. Packages and Themes First, we install the packages we need: library(tidyverse) library(scales) Next, we set the plotting theme: theme_clean5 <- theme_bw(base_family = "Gill Sans Nova") + theme(legend.positi...

669 sym R (3356 sym/8 pcs) 1 img

StatsWales Vaccine Not Suitable for Use

30.09.2021

Purpose The purpose of this code is to produce a graph of cumulative vaccine wastage by vaccine type in Wales. This open data comes from StatsWales. Packages and Themes First, we install the packages we need. library(httr) library(jsonlite) library(tidyverse) library(lubridate) library(scales) Next, I set the plotting theme. theme_clean4 <- them...

506 sym R (3623 sym/7 pcs) 1 img

NHS England Data Wrangling II

20.09.2021

Purpose The purpose of this code is produce population estimate and vaccine coverage graphs for England by age group. This code directly wrangles data from the NHS England Covid-19 vaccine weekly report. Packages and Themes First, we install the packages we need: library(tidyverse) library(readxl) library(curl) library(scales) Next, we set the p...

975 sym R (7327 sym/21 pcs) 2 img

NHS England Covid Hospital Beds II

29.12.2021

Purpose The purpose of this code is show total Covid-19 beds in London, by primary diagnosis. This is given in two data files on the NHS England website. Packages and Themes First, we install the packages we need: library(tidyverse) library(readxl) library(curl) library(scales) library(janitor) library(lubridate) library(patchwork) Next, we set ...

817 sym R (6909 sym/17 pcs) 1 img

NISRA Northern Ireland Weekly Deaths

29.01.2022

Purpose The purpose of this code is to consider how to show other series on stacked bar graphs. As an example, we use weekly registered deaths in Northern Ireland, published by NISRA. Packages and Themes First, we download the packages we need: library(tidyverse) library(readxl) library(curl) library(janitor) library(lubridate) Next, set the plo...

1022 sym R (6076 sym/15 pcs) 3 img

ONS Relative Age-Standardised Mortality

03.04.2022

Purpose The purpose of this code is to produce a graph showing relative age-standardised mortality rates in selected European countries. The Office for National Statistics published this analysis on 18th November 2021. Packages and Themes First, install the packages we need: library(tidyverse) library(curl) library(readxl) library(lubridate) lib...

736 sym R (4738 sym/9 pcs) 1 img

Australian Deaths and Mortality Rates

30.03.2022

Purpose The purpose of this code is to create graphs showing mortality statistics in Australia. The figures come from the Australian Bureau of Statistics API and a published online file. The ABS provisional mortality report for January 2020 to December 2021 is available online. Packages and Themes First, install the packages we need: library(tid...

961 sym R (8739 sym/15 pcs) 2 img

RSS Public Survey 2021

27.03.2022

Purpose The purpose to create a graph showing posterior distributions for estimates in an RSS-commission survey of the public. Market research company Opinium conducted this survey. Packages and Themes First, load the packages we need: library(tidyverse) library(curl) library(readxl) library(DirichletReg) library(scales) library(ggdist) library(...

779 sym R (4553 sym/11 pcs) 1 img

RSS MP Survey 2021

12.02.2022

Purpose The purpose is to create a graph showing simultaneous confidence intervals for estimates in RSS-commmisioned surveys of MPs. The two surveys were by Savanta ComRes (Winter 2021) and Ipsos MORI (Winter 2011). Packages and Themes First, we download the packages we need: library(tidyverse) library(sysfonts) library(showtext) library(curl) l...

918 sym R (6124 sym/11 pcs) 1 img