Repository: VictimOfMaths/COVID-19
Branch: master
Commit: 715e7c0abe04
Files: 115
Total size: 2.6 MB
Directory structure:
gitextract_eebvnxd3/
├── All Cause Mortality/
│ ├── All Cause Deaths France.R
│ ├── All Cause Deaths Italy.R
│ ├── AllCauseDeaths.R
│ ├── AllCauseDeaths2021.R
│ ├── AllCauseDeathsxAge.R
│ ├── COVIDAgeMortPred.R
│ ├── COVIDCareHomeDeaths.R
│ ├── COVIDDeathsMSOA.R
│ ├── COVIDDeathsxAgeEW.R
│ ├── COVIDDeathsxRegion.R
│ ├── COVIDExcessxLAxCause.R
│ ├── COVIDTotalDeathsPyramid.R
│ ├── EWUSACOVIDDeathsxAgeComparison.R
│ ├── LA All Cause Deaths.R
│ ├── MSOA Deaths.R
│ ├── NRS Excess Deaths by Cause.R
│ ├── ONSDeathsxVaxStatus.R
│ ├── ScottishAllCauseDeathsDetail.R
│ └── readme.md
├── Exposure mapping/
│ ├── COVIDExposures.R
│ ├── SheffieldCOVIDRiskxLSOA.R
│ └── readme.md
├── Heatmaps/
│ ├── COVIDAdmissionsLTLAPhasePlot.R
│ ├── COVIDAdmissionsWithFor.R
│ ├── COVIDAdmissionsxAge.R
│ ├── COVIDAdmissionsxAgeDashboard.R
│ ├── COVIDAgeTrends.R
│ ├── COVIDBivariateCasesxIMD.R
│ ├── COVIDBivariateCasesxVax.R
│ ├── COVIDBoosters.R
│ ├── COVIDBoosters2.R
│ ├── COVIDCFRs.R
│ ├── COVIDCanadaHeatmap.R
│ ├── COVIDCaseCartograms.R
│ ├── COVIDCasesDeathsxIMD.R
│ ├── COVIDCasesLTLAPhasePlot.R
│ ├── COVIDCasesOctHalfTerm.R
│ ├── COVIDCasesPhasePlotHighights.R
│ ├── COVIDCasesSGTFNew.R
│ ├── COVIDCasesSince100k.R
│ ├── COVIDCasesVaxxIMD.R
│ ├── COVIDCasesvsCFR.R
│ ├── COVIDCasesxAgeContours.R
│ ├── COVIDCasesxSex.R
│ ├── COVIDCasesxVaxTadpoles.R
│ ├── COVIDCasesxVaxxAge.R
│ ├── COVIDCycle.R
│ ├── COVIDCycle_US.R
│ ├── COVIDDeathsWithFrom.R
│ ├── COVIDHFRs.R
│ ├── COVIDHKVaxxAge.R
│ ├── COVIDLACaseData.R
│ ├── COVIDLineages.R
│ ├── COVIDMSOACaseRatexIMD.R
│ ├── COVIDMetricsNormalised.R
│ ├── COVIDNHSAbsences.R
│ ├── COVIDNHSAdmissions.R
│ ├── COVIDNHSBolton.R
│ ├── COVIDNHSTrustLakePlots.R
│ ├── COVIDONSDeathIneq.R
│ ├── COVIDONSInfectionSurvey.R
│ ├── COVIDONSInfectionSurveyVariants.R
│ ├── COVIDPHECasesxAgev2.R
│ ├── COVIDPHEPositivity.R
│ ├── COVIDPHESurveillance.R
│ ├── COVIDPHESurveillance2.R
│ ├── COVIDPHEVaxSurveillance.R
│ ├── COVIDPHEVaxxAgexSex.R
│ ├── COVIDPillars.R
│ ├── COVIDReinfections.R
│ ├── COVIDSGTF.R
│ ├── COVIDSpiral.R
│ ├── COVIDSpiralEurope.R
│ ├── COVIDTestingData.R
│ ├── COVIDTotalDeathsPyramid.R
│ ├── COVIDUKUSADeathsxAge.R
│ ├── COVIDUnvaxRisk.R
│ ├── COVIDVaccinationAnimations.R
│ ├── COVIDVaccinationInequalityGB.R
│ ├── COVIDVaccinationMSOACartogram.R
│ ├── COVIDVaccinationPopAndIMD.R
│ ├── COVIDVaccinationStaffCartogram.R
│ ├── COVIDVaccinations.R
│ ├── COVIDVaxHeatmap.R
│ ├── COVIDVaxPyramidxRegion.R
│ ├── COVIDVaxUptakexAge.R
│ ├── COVIDVaxUptakexReg.R
│ ├── COVIDVaxxAgeUKUSA.R
│ ├── COVIDVaxxEthnicityEngScot.R
│ ├── COVIDWaveComparisons.R
│ ├── English LA Heatmaps.R
│ ├── German State Heatmaps.R
│ ├── Irish County Heatmaps.R
│ ├── Misc Case Analysis.R
│ ├── ONSInfectionSurvey.R
│ ├── ScotlandCOVIDCasesxAge.R
│ ├── ScotlandCOVIDHouseParties.R
│ ├── Scottish HB Heatmaps.R
│ ├── UK Hex Animations.R
│ ├── UKIRELA.geojson
│ ├── UKLA.geojson
│ ├── Welsh LA Heatmaps.R
│ ├── WelshLAHeatmap.R
│ ├── YorkshireVaxCartogram.R
│ ├── la_trust_lk.csv
│ └── readme.md
├── Initial Inequality Estimates/
│ ├── Estimated Cases by IMD.R
│ └── readme.md
├── Observed Inequality/
│ ├── COVID-19 vs. Brexit.R
│ ├── COVIDIneqDataSetup.R
│ ├── COVIDScotlandDeathsIneq.R
│ ├── ONS Deaths Ineq 2.R
│ ├── ONS Deaths Ineq.R
│ └── readme.md
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: All Cause Mortality/All Cause Deaths France.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(forcats)
library(ggtext)
library(HMDHFDplus)
library(paletteer)
library(ggthemes)
#Read in historic French mortality data for 2010-18
#Source: https://www.insee.fr/fr/information/4190491
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.insee.fr/fr/statistiques/fichier/4769950/deces-2010-2018-csv.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
data10 <- read.csv(file.path(temp2, "deces-2010.csv"), sep=";")
data11 <- read.csv(file.path(temp2, "deces-2011.csv"), sep=";")
data12 <- read.csv(file.path(temp2, "deces-2012.csv"), sep=";")
data13 <- read.csv(file.path(temp2, "deces-2013.csv"), sep=";")
data14 <- read.csv(file.path(temp2, "deces-2014.csv"), sep=";")
data15 <- read.csv(file.path(temp2, "deces-2015.csv"), sep=";")
data16 <- read.csv(file.path(temp2, "deces-2016.csv"), sep=";")
data17 <- read.csv(file.path(temp2, "deces-2017.csv"), sep=";")
data <- bind_rows(data10, data11, data12, data13, data14, data15, data16, data17)[,c(2,3,7)]
colnames(data) <- c("sex", "dob", "dod")
#Some dates of Birth, particularly older ones are missing days and months. Allocate these randomly.
data$dob <- as.character(data$dob)
data$yob <- as.numeric(substr(data$dob, 1, 4))
data$dob <- as.Date(data$dob, format=c("%Y%m%d"))
data$temp <- as.Date(paste0(data$yob, "-01-01"))
data$temp2 <- data$temp+round(runif(nrow(data), min=-0.49, max=365.49))
data$dob <- if_else(is.na(data$dob) & data$yob!=0, data$temp2, data$dob)
data$dod <- as.character(data$dod)
#remove very small number of dates of death which are too short
data <- subset(data, nchar(data$dod, type="chars")==8)[,c(1:3)]
data$dod <- as.Date(data$dod, format=c("%Y%m%d"))
data$age <- floor(time_length(difftime(data$dod, data$dob), "years"))
#remove a few other weird cases
data <- subset(data, age>=-1 & age<=120)
#categorise age
data$ageband <- case_when(
data$age<15 ~ "0-14",
data$age<65 ~ "15-64",
data$age<75 ~ "65-74",
data$age<85 ~ "75-84",
TRUE ~ "85+")
#Tidy up sex variable
data$sex <- if_else(data$sex==1, "Male", "Female")
#Bring in deaths data for 2020 from https://www.insee.fr/en/statistiques/4493808?sommaire=4493845 (updated on Fridays)
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.insee.fr/en/statistiques/fichier/4493808/2020-12-18_detail.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
data18 <- read.csv(file.path(temp2, "DC_2018_det.csv"), sep=";")
data19 <- read.csv(file.path(temp2, "DC_2019_det.csv"), sep=";")
data20 <- read.csv(file.path(temp2, "DC_2020_det.csv"), sep=";")
data1820 <- bind_rows(data18, data19, data20)
#Set up dates
data1820$MNAIS <- as.character(formatC(data1820$MNAIS, width=2, format="d", flag="0"))
data1820$JNAIS <- as.character(formatC(data1820$JNAIS, width=2, format="d", flag="0"))
data1820$dob <- as.Date(paste0(data1820$ANAIS, data1820$MNAIS, data1820$JNAIS), format=c("%Y%m%d"))
data1820$MDEC <- as.character(formatC(data1820$MDEC, width=2, format="d", flag="0"))
data1820$JDEC <- as.character(formatC(data1820$JDEC, width=2, format="d", flag="0"))
data1820$dod <- as.Date(paste0(data1820$ADEC, data1820$MDEC, data1820$JDEC), format=c("%Y%m%d"))
data1820$age <- floor(time_length(difftime(data1820$dod, data1820$dob), "years"))
data1820$sex <- if_else(data1820$SEXE=="M", "Male", "Female")
data1820 <- data1820[,c(12:15)]
#categorise age
data1820$ageband <- case_when(
data1820$age<15 ~ "0-14",
data1820$age<65 ~ "15-64",
data1820$age<75 ~ "65-74",
data1820$age<85 ~ "75-84",
TRUE ~ "85+")
#Check latest date in deaths data aligns with the end of a week
maxdate <- max(data1820$dod)
maxweek <- week(maxdate)
#Merge all years
fulldata <- bind_rows(data, data1820)
fulldata$year <- year(fulldata$dod)
fulldata$week <- week(fulldata$dod+days(1))
#Aggregate to weekly data
aggdata <- fulldata %>%
group_by(ageband, year, week, sex) %>%
filter(year>=2010) %>%
summarise(deaths=n())
#Combines sexes for saving later
data.FR <- aggdata %>%
group_by(ageband, year, week) %>%
summarise(deaths=sum(deaths))
#Save data
write.csv(data.FR, "Data/deaths_age_France.csv")
#Draw overall plot
data.full <- aggdata %>%
group_by(year, week) %>%
summarise(deaths=sum(deaths))
hist.full <- data.full %>%
filter(year!=2020) %>%
group_by(week) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))
data.full <- merge(hist.full, subset(data.full, year==2020 & week<=maxweek), all.x=TRUE, all.y=TRUE)
#Calculate excess deaths in 2020 vs. historic mean
excess.full <- data.full %>%
filter(!is.na(deaths)) %>%
summarise(deaths=sum(deaths), mean=sum(mean_d))
excess.full$excess <- excess.full$deaths-excess.full$mean
excess.full$prop <- excess.full$excess/excess.full$mean
tiff("Outputs/ExcessDeathsFrance.tiff", units="in", width=8, height=6, res=300)
ggplot(subset(data.full, week<53))+
geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_d), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=deaths), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths recorded")+
annotate(geom="text", x=19, y=17000, label=paste0("+", round(excess.full$excess, 0),
" more deaths in 2020 than average (+",
round(excess.full$prop*100, 0),"%)"), colour="Red", hjust=0)+
annotate(geom="text", x=30, y=12000, label="Historic maximum", colour="Skyblue4")+
annotate(geom="text", x=30, y=9200, label="Historic minimum", colour="Skyblue4")+
annotate(geom="text", x=46, y=9200, label="Historic mean", colour="grey30")+
geom_curve(aes(x=48, y=9400, xend=47, yend=11200), colour="grey30", curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
theme_classic()+
theme(plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="France's 'second wave' has been as deadly as the first",
subtitle="Weekly deaths in 2020 compared to the range in 2010-19.",
caption="Date from Insee | Plot by @VictimOfMaths")
dev.off()
#Calculate 2010-19 average, min and max
hist.data <- aggdata %>%
filter(year!=2020) %>%
group_by(ageband, sex, week) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))
aggdata <- merge(hist.data, subset(aggdata, year==2020 & week<=maxweek), all.x=TRUE, all.y=TRUE)
#Calculate excess deaths in 2020 vs. historic mean
excess <- aggdata %>%
group_by(ageband, sex) %>%
filter(!is.na(deaths)) %>%
summarise(deaths=sum(deaths), mean=sum(mean_d))
excess$excess <- excess$deaths-excess$mean
excess$prop <- excess$excess/excess$mean
ann_text <- data.frame(week=rep(18, times=10),
position=c(600,300,1000,1700,1100,1600,1800,2000,5000,3300),
sex=rep(c("Female", "Male"), times=5),
ageband=rep(c("0-14", "15-64", "65-74", "75-84", "85+"), each=2))
tiff("Outputs/ExcessDeathsFrancexAge.tiff", units="in", width=14, height=8, res=300)
ggplot(aggdata)+
geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_d), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=deaths), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths recorded")+
facet_grid(sex~ageband, scales="free_y")+
geom_text(data=ann_text, aes(x=week, y=position), label=c(
paste0(round(excess[1,5],0)," excess deaths in 2020\nvs. 2010-19 mean (", round(excess[1,6]*100,0),"%)"),
paste0(round(excess[2,5],0)," deaths (", round(excess[2,6]*100,0),"%)"),
paste0(round(excess[3,5],0)," deaths (", round(excess[3,6]*100,0),"%)"),
paste0(round(excess[4,5],0)," deaths (", round(excess[4,6]*100,0),"%)"),
paste0("+",round(excess[5,5],0)," deaths (+", round(excess[5,6]*100,0),"%)"),
paste0("+",round(excess[6,5],0)," deaths (+", round(excess[6,6]*100,0),"%)"),
paste0(round(excess[7,5],0)," deaths (", round(excess[7,6]*100,0),"%)"),
paste0("+",round(excess[8,5],0)," deaths (+", round(excess[8,6]*100,0),"%)"),
paste0("+",round(excess[9,5],0)," deaths (+", round(excess[9,6]*100,0),"%)"),
paste0("+",round(excess[10,5],0)," deaths (+", round(excess[10,6]*100,0),"%)")),
size=3.5, colour="Red", hjust=0)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face="bold"),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Both 'waves' in France high the oldest age groups hardest",
subtitle="Weekly deaths in 2020 compared to the range in 2010-19.",
caption="Date from Insee | Plot by @VictimOfMaths")
dev.off()
#Find latest year in 2020 data
temp <- fulldata %>%
filter(year==2020) %>%
summarise (maxweek2020=max(week))
maxweek20 <- temp[1,1]
#Collapse data for the pandemic period only
agedata <- fulldata %>%
filter(year>=2010 & week>9 & week<=maxweek20 & age>=0 & age<100) %>%
group_by(age, year, sex) %>%
summarise(deaths=n())
#Import population size
#Bring in French population from HMD (need to register and put your details in here)
username <- ""
password <- ""
FraPop <- readHMDweb(CNTRY="FRATNP", "Exposures_1x1", username, password)
FraPop <- subset(FraPop, Year>=2010)
#Replicate 2017 populations for 2018+
temp <- subset(FraPop, Year==2017)
temp2 <- temp
temp3 <- temp
temp$Year <- 2018
temp2$Year <- 2019
temp3$Year <- 2020
FraPop <- bind_rows(FraPop, temp, temp2, temp3)
FraPop_long <- gather(FraPop, sex, pop, c(3,4))
agedata <- merge(agedata, FraPop_long[,-c(3,4)], by.x=c("sex", "age", "year"), by.y=c("sex", "Age", "Year"))
agedata$mortrate <- agedata$deaths*100000/agedata$pop
#Look at 2010-19 data
olddata <- agedata %>%
filter(year<2020) %>%
group_by(age, sex) %>%
summarise(mean_d=mean(deaths), min_d=min(deaths), max_d=max(deaths), mean_r=mean(mortrate),
min_r=min(mortrate), max_r=max(mortrate))
newdata <- merge(olddata, subset(agedata, year==2020))
newdata$excess <- newdata$mortrate-newdata$mean_r
newdata$propexcess <- newdata$excess/newdata$mean_r
write.csv(newdata, "Data/FrenchDeathsByAge.csv")
newdata <- read.csv("Data/FrenchDeathsByAge.csv")
tiff("Outputs/AgeSpecificDeathsFr.tiff", units="in", width=12, height=7, res=300)
ggplot(newdata)+
geom_ribbon(aes(x=age, ymin=log10(min_r), ymax=log10(max_r)), fill="Skyblue2")+
geom_line(aes(x=age, y=log10(mean_r)), colour="Grey50", linetype=2)+
geom_point(aes(x=age, y=log10(mortrate)), colour="red")+
scale_x_continuous(name="Age", breaks=seq(0,100, by=10))+
scale_y_continuous(name="Log mortality rate\n(deaths/100,000 | base 10)")+
facet_wrap(~sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Age-specific mortality rates in France during the pandemic",
subtitle=paste0("Deaths in weeks 9-", maxweek, " in 2020 compared to the range in 2010-19."),
caption="Data from Insee and Human Mortality Database | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/AgeSpecificDeathsPropFr.tiff", units="in", width=12, height=7, res=300)
ggplot(newdata)+
geom_bar(stat="identity", aes(x=age, y=propexcess, fill=propexcess), show.legend=FALSE)+
scale_fill_paletteer_c("ggthemes::Classic Red-White-Green", direction=-1, limit=c(-1,1)*max(abs(newdata$propexcess)))+
scale_x_continuous(name="Age", breaks=seq(0,100, by=10))+
scale_y_continuous(name="Proportional change in mortality rate in 2020 vs. 2010-19 average",
breaks=seq(-0.5, 1, by=0.5), labels=c("-50%", "0%", "+50%", "+100%"))+
facet_wrap(~sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Age-specific variation in mortality rates in France during the pandemic",
subtitle=paste0("Relative change in all-cause mortality rates in weeks 9-", maxweek, " of 2020 versus the average between 2010-19"),
caption="Data from Insee and Human Mortality Database | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/All Cause Deaths Italy.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(lubridate)
library(ggtext)
#Download Italian deaths data from Istat (link helpfully provided by @MazzucoStefano)
#From this web page: https://www.istat.it/it/archivio/240401
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.istat.it/it/files//2020/03/Dataset-decessi-comunali-giornalieri_dati_mortalita_fino_31Ottobre2020.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
rawdata <- read.csv(file.path(temp2, "Dataset decessi comunali giornalieri e tracciato record/comuni_giornaliero_31ottobre.csv"))
#Tidy up data
rawdata$age <- case_when(
rawdata$CL_ETA==0 ~ "0",
rawdata$CL_ETA==1 ~ "1-4",
rawdata$CL_ETA==2 ~ "5-9",
rawdata$CL_ETA==3 ~ "10-14",
rawdata$CL_ETA==4 ~ "15-19",
rawdata$CL_ETA==5 ~ "20-24",
rawdata$CL_ETA==6 ~ "25-29",
rawdata$CL_ETA==7 ~ "30-34",
rawdata$CL_ETA==8 ~ "35-39",
rawdata$CL_ETA==9 ~ "40-44",
rawdata$CL_ETA==10 ~ "45-49",
rawdata$CL_ETA==11 ~ "50-54",
rawdata$CL_ETA==12 ~ "55-59",
rawdata$CL_ETA==13 ~ "60-64",
rawdata$CL_ETA==14 ~ "65-69",
rawdata$CL_ETA==15 ~ "70-74",
rawdata$CL_ETA==16 ~ "75-79",
rawdata$CL_ETA==17 ~ "80-84",
rawdata$CL_ETA==18 ~ "85-89",
rawdata$CL_ETA==19 ~ "90-94",
rawdata$CL_ETA==20 ~ "95-99",
rawdata$CL_ETA==21 ~ "100+")
rawdata$day <- if_else(nchar(rawdata$GE)==3, as.integer(substr(rawdata$GE, 2,3)), as.integer(substr(rawdata$GE, 3,4)))
rawdata$month <- if_else(nchar(rawdata$GE)==3, as.integer(substr(rawdata$GE, 1,1)), as.integer(substr(rawdata$GE, 1,2)))
#Set missing values to NA
rawdata$M_20 <- as.numeric(as.character(rawdata$M_20))
rawdata$F_20 <- as.numeric(as.character(rawdata$F_20))
rawdata$T_20 <- as.numeric(as.character(rawdata$T_20))
data <- pivot_longer(rawdata, c(10:27), names_to=c("sex", "year"), names_sep="_", values_to="deaths")
data$year <- as.numeric(paste0("20", data$year))
data$date <- as.Date(paste0(data$year,"-", data$month, "-", data$day), format="%Y-%m-%d")
#Remove missing dates (weirdly the data has a load of 29th of Februarys in non-leap years)
data <- subset(data, !is.na(data$date))
data$week <- week(data$date)
data$sex <- case_when(
data$sex=="M" ~ "Male",
data$sex=="F" ~ "Female",
TRUE ~ "Total"
)
data$sex <- factor(data$sex, levels=c("Male", "Female", "Total"))
data$age <- factor(data$age, levels=c("0", "1-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34", "35-39", "40-44",
"45-49", "50-54", "55-59", "60-64", "65-69", "70-74", "75-79", "80-84", "85-89",
"90-94", "95-99", "100+"))
#Explore missingness in the deaths data
test <- as.data.frame(data)
test$test <- if_else(is.na(data$deaths),0,1)
test <- test %>%
select(date, test) %>%
group_by(date) %>%
summarise(measure=mean(test))
#Looking at this, a clear jump in missingness after 31st October 2020, so censor the data here
cut <- week(as.Date("2020-11-01"))-1
data_prov <- data %>%
filter(sex!="Total" & !(year==2020 & week>cut)) %>%
group_by(age, sex, year, week, NOME_REGIONE, NOME_PROVINCIA) %>%
summarise(deaths=sum(deaths, na.rm=TRUE))
data_reg <- data_prov %>%
group_by(age, sex, year, week, NOME_REGIONE) %>%
summarise(deaths=sum(deaths, na.rm=TRUE))
data_nat <- data_prov %>%
group_by(age, sex, year, week) %>%
summarise(deaths=sum(deaths, na.rm=TRUE))
#Save national level data
write.csv(data_nat, "Data/deaths_age_Italy.csv")
#National plots
tempdata <- data_nat %>%
group_by(year, week) %>%
summarise(deaths=sum(deaths))
#Calculate 2010-19 average, min and max
hist.data <- tempdata %>%
filter(year!=2020) %>%
group_by(week) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))
tempdata <- merge(hist.data, subset(tempdata, year==2020), all.x=TRUE, all.y=TRUE)
#Calculate excess deaths in 2020 vs. historic mean
excess <- tempdata %>%
filter(!is.na(deaths)) %>%
summarise(deaths=sum(deaths), mean=sum(mean_d))
excess$excess <- excess$deaths-excess$mean
excess$prop <- excess$excess/excess$mean
#Overall plot
tiff("Outputs/ExcessDeathsItaly.tiff", units="in", width=10, height=8, res=300)
ggplot(subset(tempdata, week<53))+
geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_d), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=deaths), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths recorded")+
theme_classic()+
theme(plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
expand_limits(y=0)+
labs(title="All-cause mortality in Italy during the pandemic",
subtitle="Weekly deaths in 2020 compared to the range in 2010-19.
Data up to 31st August 2020.",
caption="Date from ISTAT | Plot by @VictimOfMaths")+
annotate(geom="text", x=20, y=18000, label=paste0("+", round(excess$excess, 0),
" more deaths in 2020 than average (+",
round(excess$prop*100, 0),"%)"), colour="Red", hjust=0)+
annotate(geom="text", x=32, y=15000, label="Historic maximum", colour="Skyblue4")+
annotate(geom="text", x=32, y=10000, label="Historic minimum", colour="Skyblue4")+
annotate(geom="text", x=48, y=11000, label="Historic mean", colour="grey30")+
geom_curve(aes(x=50, y=11300, xend=49, yend=12500), colour="grey30", curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")
dev.off()
#Plot by sex
tempdata.sex <- data_nat %>%
group_by(year, week, sex) %>%
summarise(deaths=sum(deaths))
#Calculate 2010-19 average, min and max
hist.data.sex <- tempdata.sex %>%
filter(year!=2020) %>%
group_by(week, sex) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))
tempdata.sex <- merge(hist.data.sex, subset(tempdata.sex, year==2020), all.x=TRUE, all.y=TRUE)
#Calculate excess deaths in 2020 vs. historic mean
excess.sex <- tempdata.sex %>%
filter(!is.na(deaths)) %>%
group_by(sex) %>%
summarise(deaths=sum(deaths), mean=sum(mean_d))
excess.sex$excess <- excess.sex$deaths-excess.sex$mean
excess.sex$prop <- excess.sex$excess/excess.sex$mean
ann_text <- data.frame(week=rep(cut-20.5, times=2), sex=as.factor(c("Male", "Female")), position=c(9000,9000))
tiff("Outputs/ExcessDeathsItalyxSex.tiff", units="in", width=10, height=8, res=300)
ggplot(subset(tempdata.sex, week<53))+
geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_d), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=deaths), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths recorded")+
facet_wrap(~sex)+
theme_classic()+
theme(plot.subtitle =element_markdown(), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)))+
expand_limits(y=0)+
labs(title="Excess deaths are almost twice as high in Italian men compared to women",
subtitle="Weekly deaths in 2020 compared to the range in 2010-19.
Data up to 24th June 2020.",
caption="Date from ISTAT | Plot by @VictimOfMaths")+
geom_text(data=ann_text, aes(x=week, y=position),
label=c(paste0(round(excess.sex[1,4],0)," excess deaths in 2020\nvs. 2010-19 mean (+", round(excess.sex[1,5]*100,0),"%)"),
paste0(round(excess.sex[2,4],0)," deaths (+", round(excess.sex[2,5]*100,0),"%)")), colour="Red", size=3.5, hjust=0)
dev.off()
#Plot by region
tempdata.reg <- data_reg %>%
group_by(year, week, NOME_REGIONE) %>%
summarise(deaths=sum(deaths))
#Calculate 2010-19 average, min and max
hist.data.reg <- tempdata.reg %>%
filter(year!=2020) %>%
group_by(week, NOME_REGIONE) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))
tempdata.reg <- merge(hist.data.reg, subset(tempdata.reg, year==2020), all.x=TRUE, all.y=TRUE)
#Calculate excess deaths in 2020 vs. historic mean
excess.reg <- tempdata.reg %>%
filter(!is.na(deaths)) %>%
group_by(NOME_REGIONE) %>%
summarise(deaths=sum(deaths), mean=sum(mean_d))
excess.reg$excess <- excess.reg$deaths-excess.reg$mean
excess.reg$prop <- excess.reg$excess/excess.reg$mean
excess.reg$NOME_REGIONE <- fct_reorder(excess.reg$NOME_REGIONE, -excess.reg$prop)
excess.reg <- arrange(excess.reg, NOME_REGIONE)
tempdata.reg$NOME_REGIONE <- factor(tempdata.reg$NOME_REGIONE, levels=levels(excess.reg$NOME_REGIONE))
tempdata.reg <- arrange(tempdata.reg, NOME_REGIONE)
#labpos <- tempdata.reg$mean_d[tempdata.reg$week==cut]*1.5
labpos <- tempdata.reg$mean_d[tempdata.reg$week==cut]*1.5+400
ann_text2 <- data.frame(week=rep(22, times=20), NOME_REGIONE=as.factor(levels(tempdata.reg$NOME_REGIONE)), position=labpos)
tiff("Outputs/ExcessDeathsItalyxReg.tiff", units="in", width=16, height=9, res=300)
ggplot(subset(tempdata.reg, week<53))+
geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_d), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=deaths), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths recorded")+
#facet_wrap(~NOME_REGIONE, scales="free_y")+
facet_wrap(~NOME_REGIONE)+
theme_classic()+
theme(plot.subtitle =element_markdown(), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)))+
expand_limits(y=0)+
labs(title="Excess deaths in Italy are very heavily concentrated in the Northern regions",
subtitle="Weekly deaths in 2020 compared to the range in 2010-19.
Data up to 24th June 2020.",
caption="Date from ISTAT | Plot by @VictimOfMaths")+
geom_text(data=ann_text2, aes(x=week, y=position),
label=c(paste0(round(excess.reg[1,4],0)," excess deaths in 2020\nvs. 2010-19 mean (+", round(excess.reg[1,5]*100,0),"%)"),
paste0(round(excess.reg[2,4],0)," deaths (+", round(excess.reg[2,5]*100,0),"%)"),
paste0(round(excess.reg[3,4],0)," deaths (+", round(excess.reg[3,5]*100,0),"%)"),
paste0(round(excess.reg[4,4],0)," deaths (+", round(excess.reg[4,5]*100,0),"%)"),
paste0(round(excess.reg[5,4],0)," deaths (+", round(excess.reg[5,5]*100,0),"%)"),
paste0(round(excess.reg[6,4],0)," deaths (+", round(excess.reg[6,5]*100,0),"%)"),
paste0(round(excess.reg[7,4],0)," deaths (+", round(excess.reg[7,5]*100,0),"%)"),
paste0(round(excess.reg[8,4],0)," deaths (+", round(excess.reg[8,5]*100,0),"%)"),
paste0(round(excess.reg[9,4],0)," deaths (", round(excess.reg[9,5]*100,0),"%)"),
paste0(round(excess.reg[10,4],0)," deaths (", round(excess.reg[10,5]*100,0),"%)"),
paste0(round(excess.reg[11,4],0)," deaths (", round(excess.reg[11,5]*100,0),"%)"),
paste0(round(excess.reg[12,4],0)," deaths (", round(excess.reg[12,5]*100,0),"%)"),
paste0(round(excess.reg[13,4],0)," deaths (", round(excess.reg[13,5]*100,0),"%)"),
paste0(round(excess.reg[14,4],0)," deaths (", round(excess.reg[14,5]*100,0),"%)"),
paste0(round(excess.reg[15,4],0)," deaths (", round(excess.reg[15,5]*100,0),"%)"),
paste0(round(excess.reg[16,4],0)," deaths (", round(excess.reg[16,5]*100,0),"%)"),
paste0(round(excess.reg[17,4],0)," deaths (", round(excess.reg[17,5]*100,0),"%)"),
paste0(round(excess.reg[18,4],0)," deaths (", round(excess.reg[18,5]*100,0),"%)"),
paste0(round(excess.reg[19,4],0)," deaths (", round(excess.reg[19,5]*100,0),"%)"),
paste0(round(excess.reg[20,4],0)," deaths (", round(excess.reg[20,5]*100,0),"%)")),
colour="Red", size=3, hjust=0)
dev.off()
#Extract Lazio only
tiff("Outputs/ExcessDeathsLazio.tiff", units="in", width=10, height=8, res=300)
ggplot(subset(tempdata.reg, week<53 & NOME_REGIONE=="Lazio"))+
geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_d), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=deaths), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths recorded")+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_markdown())+
expand_limits(y=0)+
labs(title="All-cause deaths in the Italian capital are lower than in previous years",
subtitle="Weekly deaths in the Lazio region in 2020 compared to the range in 2010-19.
Data up to 31st May 2020.",
caption="Date from ISTAT | Plot by @VictimOfMaths")+
annotate(geom="text", x=cut-10, y=850, label=paste0(abs(round(excess.reg[7,4], 0)),
" fewer deaths in 2020 than average (",
round(excess.reg[7,5]*100, 0),"%)"), colour="Red", hjust=0)
dev.off()
================================================
FILE: All Cause Mortality/AllCauseDeaths.R
================================================
rm(list=ls())
library(tidyverse)
library(paletteer)
library(curl)
library(readxl)
library(lubridate)
library(forcats)
library(ggtext)
#A gold star to anyone who can make the range updates for the 3 different Excel files for E&W, Scotland & NI automatic.
#Latest date in the country-specific data
EWDate <- "1st January"
ScotDate <- "3rd January"
NIDate <- "1st January"
#Locations for latest data. Links for historical data don't move, so keep them further down
Eng2020 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx"
Scot2020 <- "https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-53.xlsx"
#https://data.gov.scot/coronavirus-covid-19/data.html
Scot2020v2 <- "https://data.gov.scot/coronavirus-covid-19/download/Scottish%20Government%20COVID-19%20data%20(28%20October%202020).xlsx"
NI2020 <- "https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly_Deaths.xlsx"
#Stupid Excel range controls
EngRange <- "BC" #increment by one letter each week
ScotRange <- "BC" #
#These next two bookend the range for the weeks inbetween NRS's now monthly reports
ScotRangev2.1 <- "46" #update after each new monthly report
ScotRangev2.2 <- "47" #increment by one number each week
NIRange <- "57" #increment by one number each week
#Flag weeks with an NRS report
NRSweek <- TRUE
#Also need to manually add the next row of data for the deaths by location at the end.
####################################
#Read in English & Welsh data first#
####################################
#The ONS published weekly all-cause deaths data into a new Excel file each week on a Tuesday here:
#https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales
#Start with 2020 - data up to 8th May, updated on 19th May
temp <- tempfile()
temp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2020.age.EW <- read_excel(temp, sheet="Weekly figures 2020", range=paste0("B22:", EngRange, "41"), col_names=FALSE)
colnames(data2020.age.EW) <- c("Age", format(seq.Date(from=as.Date("2020-01-03"), by="7 days",
length.out=ncol(data2020.age.EW)-1), "%d/%m/%y"))
#Compress age bands to match earlier years
data2020.age.EW$age <- case_when(
data2020.age.EW$Age=="<1" ~ "Under 1 year",
data2020.age.EW$Age %in% c("1-4", "5-9", "10-14") ~ "01-14",
data2020.age.EW$Age %in% c("15-19", "20-24", "25-29", "30-34", "35-39", "40-44") ~ "15-44",
data2020.age.EW$Age %in% c("45-49", "50-54", "55-59", "60-64") ~ "45-64",
data2020.age.EW$Age %in% c("65-69", "70-74") ~ "65-74",
data2020.age.EW$Age %in% c("75-79", "80-84") ~ "75-84",
TRUE ~ "85+"
)
data2020.age.EW <- data2020.age.EW %>%
group_by(age) %>%
summarise_at(c(2:(ncol(data2020.age.EW)-1)), sum)
data2020.age.EW$age <- factor(data2020.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2020.age.EW <- arrange(data2020.age.EW, age)
#By sex
data2020.male.EW <- read_excel(temp, sheet="Weekly figures 2020", range=paste0("B44:", EngRange,"63"), col_names=FALSE)
colnames(data2020.male.EW) <- c("Age", format(seq.Date(from=as.Date("2020-01-03"), by="7 days",
length.out=ncol(data2020.male.EW)-1), "%d/%m/%y"))
data2020.male.EW$sex <- "Male"
data2020.female.EW <- read_excel(temp, sheet="Weekly figures 2020", range=paste0("B66:", EngRange, "85"), col_names=FALSE)
colnames(data2020.female.EW) <- c("Age", format(seq.Date(from=as.Date("2020-01-03"), by="7 days",
length.out=ncol(data2020.female.EW)-1), "%d/%m/%y"))
data2020.female.EW$sex <- "Female"
data2020.sex.EW <- bind_rows(data2020.male.EW, data2020.female.EW)
#Compress age bands to match earlier years
data2020.sex.EW$age <- case_when(
data2020.sex.EW$Age=="<1" ~ "Under 1 year",
data2020.sex.EW$Age %in% c("1-4", "5-9", "10-14") ~ "01-14",
data2020.sex.EW$Age %in% c("15-19", "20-24", "25-29", "30-34", "35-39", "40-44") ~ "15-44",
data2020.sex.EW$Age %in% c("45-49", "50-54", "55-59", "60-64") ~ "45-64",
data2020.sex.EW$Age %in% c("65-69", "70-74") ~ "65-74",
data2020.sex.EW$Age %in% c("75-79", "80-84") ~ "75-84",
TRUE ~ "85+"
)
data2020.sex.EW <- data2020.sex.EW %>%
group_by(age, sex) %>%
summarise_at(c(2:(ncol(data2020.sex.EW)-2)), sum)
data2020.sex.EW$age <- factor(data2020.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2020.sex.EW$sex <- factor(data2020.sex.EW$sex, levels=c("Male", "Female"))
data2020.sex.EW <- arrange(data2020.sex.EW, age, sex)
#Add total rows
data2020.sex.EW <- data2020.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2020.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2020.sex.EW)
#By region
data2020.reg.EW <- read_excel(temp, sheet="Weekly figures 2020", range=paste0("B87:", EngRange, "96"), col_names=FALSE)
colnames(data2020.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2020-01-03"), by="7 days",
length.out=ncol(data2020.reg.EW)-1), "%d/%m/%y"))
#2019 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2019/publishedweek522019.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2019.age.EW <- read_excel(temp, sheet="Weekly figures 2019", range="B16:BB22", col_names=FALSE)
colnames(data2019.age.EW) <- c("age", format(seq.Date(from=as.Date("2019-01-04"), by="7 days",
length.out=ncol(data2019.age.EW)-1), "%d/%m/%y"))
data2019.age.EW$age <- factor(data2019.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2019.age.EW <- arrange(data2019.age.EW, age)
#By sex
data2019.male.EW <- read_excel(temp, sheet="Weekly figures 2019", range="B25:BB31", col_names=FALSE)
colnames(data2019.male.EW) <- c("age", format(seq.Date(from=as.Date("2019-01-04"), by="7 days",
length.out=ncol(data2019.male.EW)-1), "%d/%m/%y"))
data2019.male.EW$sex <- "Male"
data2019.female.EW <- read_excel(temp, sheet="Weekly figures 2019", range="B34:BB40", col_names=FALSE)
colnames(data2019.female.EW) <- c("age", format(seq.Date(from=as.Date("2019-01-04"), by="7 days",
length.out=ncol(data2019.female.EW)-1), "%d/%m/%y"))
data2019.female.EW$sex <- "Female"
data2019.sex.EW <- bind_rows(data2019.male.EW, data2019.female.EW)
data2019.sex.EW$age <- factor(data2019.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2019.sex.EW$sex <- factor(data2019.sex.EW$sex, levels=c("Male", "Female"))
data2019.sex.EW <- arrange(data2019.sex.EW, age, sex)
#Add total rows
data2019.sex.EW <- data2019.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2019.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2019.sex.EW)
#By region
data2019.reg.EW <- read_excel(temp, sheet="Weekly figures 2019", range="B43:BB52", col_names=FALSE)
colnames(data2019.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2019-01-04"), by="7 days",
length.out=ncol(data2019.reg.EW)-1), "%d/%m/%y"))
#2018 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2018/publishedweek522018withupdatedrespiratoryrow.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2018.age.EW <- read_excel(temp, sheet="Weekly figures 2018", range="B16:BB22", col_names=FALSE)
colnames(data2018.age.EW) <- c("age", format(seq.Date(from=as.Date("2018-01-05"), by="7 days",
length.out=ncol(data2018.age.EW)-1), "%d/%m/%y"))
data2018.age.EW$age <- factor(data2018.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2018.age.EW <- arrange(data2018.age.EW, age)
#By sex
data2018.male.EW <- read_excel(temp, sheet="Weekly figures 2018", range="B25:BB31", col_names=FALSE)
colnames(data2018.male.EW) <- c("age", format(seq.Date(from=as.Date("2018-01-05"), by="7 days",
length.out=ncol(data2018.male.EW)-1), "%d/%m/%y"))
data2018.male.EW$sex <- "Male"
data2018.female.EW <- read_excel(temp, sheet="Weekly figures 2018", range="B34:BB40", col_names=FALSE)
colnames(data2018.female.EW) <- c("age", format(seq.Date(from=as.Date("2018-01-05"), by="7 days",
length.out=ncol(data2018.female.EW)-1), "%d/%m/%y"))
data2018.female.EW$sex <- "Female"
data2018.sex.EW <- bind_rows(data2018.male.EW, data2018.female.EW)
data2018.sex.EW$age <- factor(data2018.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2018.sex.EW$sex <- factor(data2018.sex.EW$sex, levels=c("Male", "Female"))
data2018.sex.EW <- arrange(data2018.sex.EW, age, sex)
#Add total rows
data2018.sex.EW <- data2018.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2018.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2018.sex.EW)
#By region
data2018.reg.EW <- read_excel(temp, sheet="Weekly figures 2018", range="B43:BB52", col_names=FALSE)
colnames(data2018.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2018-01-05"), by="7 days",
length.out=ncol(data2018.reg.EW)-1), "%d/%m/%y"))
#2017 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2017/publishedweek522017.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2017.age.EW <- read_excel(temp, sheet="Weekly figures 2017", range="B16:BB22", col_names=FALSE)
colnames(data2017.age.EW) <- c("age", format(seq.Date(from=as.Date("2017-01-06"), by="7 days",
length.out=ncol(data2017.age.EW)-1), "%d/%m/%y"))
data2017.age.EW$age <- factor(data2017.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2017.age.EW <- arrange(data2017.age.EW, age)
#By sex
data2017.male.EW <- read_excel(temp, sheet="Weekly figures 2017", range="B25:BB31", col_names=FALSE)
colnames(data2017.male.EW) <- c("age", format(seq.Date(from=as.Date("2017-01-06"), by="7 days",
length.out=ncol(data2017.male.EW)-1), "%d/%m/%y"))
data2017.male.EW$sex <- "Male"
data2017.female.EW <- read_excel(temp, sheet="Weekly figures 2017", range="B34:BB40", col_names=FALSE)
colnames(data2017.female.EW) <- c("age", format(seq.Date(from=as.Date("2017-01-06"), by="7 days",
length.out=ncol(data2017.female.EW)-1), "%d/%m/%y"))
data2017.female.EW$sex <- "Female"
data2017.sex.EW <- bind_rows(data2017.male.EW, data2017.female.EW)
data2017.sex.EW$age <- factor(data2017.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2017.sex.EW$sex <- factor(data2017.sex.EW$sex, levels=c("Male", "Female"))
data2017.sex.EW <- arrange(data2017.sex.EW, age, sex)
#Add total rows
data2017.sex.EW <- data2017.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2017.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2017.sex.EW)
#By region
data2017.reg.EW <- read_excel(temp, sheet="Weekly figures 2017", range="B43:BB52", col_names=FALSE)
colnames(data2017.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2017-01-06"), by="7 days",
length.out=ncol(data2017.reg.EW)-1), "%d/%m/%y"))
#2016 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2016/publishedweek522016.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2016.age.EW <- read_excel(temp, sheet="Weekly figures 2016", range="B16:BB22", col_names=FALSE)
colnames(data2016.age.EW) <- c("age", format(seq.Date(from=as.Date("2016-01-08"), by="7 days",
length.out=ncol(data2016.age.EW)-1), "%d/%m/%y"))
data2016.age.EW$age <- factor(data2016.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2016.age.EW <- arrange(data2016.age.EW, age)
#By sex
data2016.male.EW <- read_excel(temp, sheet="Weekly figures 2016", range="B25:BB31", col_names=FALSE)
colnames(data2016.male.EW) <- c("age", format(seq.Date(from=as.Date("2016-01-08"), by="7 days",
length.out=ncol(data2016.male.EW)-1), "%d/%m/%y"))
data2016.male.EW$sex <- "Male"
data2016.female.EW <- read_excel(temp, sheet="Weekly figures 2016", range="B34:BB40", col_names=FALSE)
colnames(data2016.female.EW) <- c("age", format(seq.Date(from=as.Date("2016-01-08"), by="7 days",
length.out=ncol(data2016.female.EW)-1), "%d/%m/%y"))
data2016.female.EW$sex <- "Female"
data2016.sex.EW <- bind_rows(data2016.male.EW, data2016.female.EW)
data2016.sex.EW$age <- factor(data2016.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2016.sex.EW$sex <- factor(data2016.sex.EW$sex, levels=c("Male", "Female"))
data2016.sex.EW <- arrange(data2016.sex.EW, age, sex)
#Add total rows
data2016.sex.EW <- data2016.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2016.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2016.sex.EW)
#By region
data2016.reg.EW <- read_excel(temp, sheet="Weekly figures 2016", range="B43:BB52", col_names=FALSE)
colnames(data2016.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2016-01-08"), by="7 days",
length.out=ncol(data2016.reg.EW)-1), "%d/%m/%y"))
#2015 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2015/publishedweek2015.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2015.age.EW <- read_excel(temp, sheet="Weekly Figures 2015", range="A16:BB22", col_names=FALSE)
colnames(data2015.age.EW) <- c("age", format(seq.Date(from=as.Date("2015-01-02"), by="7 days",
length.out=ncol(data2015.age.EW)-1), "%d/%m/%y"))
data2015.age.EW$age <- factor(data2015.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2015.age.EW <- arrange(data2015.age.EW, age)
#By sex
data2015.male.EW <- read_excel(temp, sheet="Weekly Figures 2015", range="A25:BB31", col_names=FALSE)
colnames(data2015.male.EW) <- c("age", format(seq.Date(from=as.Date("2015-01-02"), by="7 days",
length.out=ncol(data2015.male.EW)-1), "%d/%m/%y"))
data2015.male.EW$sex <- "Male"
data2015.female.EW <- read_excel(temp, sheet="Weekly Figures 2015", range="A34:BB40", col_names=FALSE)
colnames(data2015.female.EW) <- c("age", format(seq.Date(from=as.Date("2015-01-02"), by="7 days",
length.out=ncol(data2015.female.EW)-1), "%d/%m/%y"))
data2015.female.EW$sex <- "Female"
data2015.sex.EW <- bind_rows(data2015.male.EW, data2015.female.EW)
data2015.sex.EW$age <- factor(data2015.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2015.sex.EW$sex <- factor(data2015.sex.EW$sex, levels=c("Male", "Female"))
data2015.sex.EW <- arrange(data2015.sex.EW, age, sex)
#Add total rows
data2015.sex.EW <- data2015.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2015.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2015.sex.EW)
#By region
data2015.reg.EW <- read_excel(temp, sheet="Weekly Figures 2015", range="A43:BB52", col_names=FALSE)
colnames(data2015.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2015-01-02"), by="7 days",
length.out=ncol(data2015.reg.EW)-1), "%d/%m/%y"))
#2014 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2014/publishedweek2014.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2014.age.EW <- read_excel(temp, sheet="Weekly Figures 2014", range="A16:BA22", col_names=FALSE)
colnames(data2014.age.EW) <- c("age", format(seq.Date(from=as.Date("2014-01-03"), by="7 days",
length.out=ncol(data2014.age.EW)-1), "%d/%m/%y"))
data2014.age.EW$age <- factor(data2014.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2014.age.EW <- arrange(data2014.age.EW, age)
#By sex
data2014.male.EW <- read_excel(temp, sheet="Weekly Figures 2014", range="A25:BA31", col_names=FALSE)
colnames(data2014.male.EW) <- c("age", format(seq.Date(from=as.Date("2014-01-03"), by="7 days",
length.out=ncol(data2014.male.EW)-1), "%d/%m/%y"))
data2014.male.EW$sex <- "Male"
data2014.female.EW <- read_excel(temp, sheet="Weekly Figures 2014", range="A34:BA40", col_names=FALSE)
colnames(data2014.female.EW) <- c("age", format(seq.Date(from=as.Date("2014-01-03"), by="7 days",
length.out=ncol(data2014.female.EW)-1), "%d/%m/%y"))
data2014.female.EW$sex <- "Female"
data2014.sex.EW <- bind_rows(data2014.male.EW, data2014.female.EW)
data2014.sex.EW$age <- factor(data2014.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2014.sex.EW$sex <- factor(data2014.sex.EW$sex, levels=c("Male", "Female"))
data2014.sex.EW <- arrange(data2014.sex.EW, age, sex)
#Add total rows
data2014.sex.EW <- data2014.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2014.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2014.sex.EW)
#By region
data2014.reg.EW <- read_excel(temp, sheet="Weekly Figures 2014", range="A43:BA52", col_names=FALSE)
colnames(data2014.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2014-01-03"), by="7 days",
length.out=ncol(data2014.reg.EW)-1), "%d/%m/%y"))
#2013 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2013/publishedweek2013.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2013.age.EW <- read_excel(temp, sheet="Weekly Figures 2013", range="A16:BA22", col_names=FALSE)
colnames(data2013.age.EW) <- c("age", format(seq.Date(from=as.Date("2013-01-04"), by="7 days",
length.out=ncol(data2013.age.EW)-1), "%d/%m/%y"))
data2013.age.EW$age <- factor(data2013.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2013.age.EW <- arrange(data2013.age.EW, age)
#By sex
data2013.male.EW <- read_excel(temp, sheet="Weekly Figures 2013", range="A25:BA31", col_names=FALSE)
colnames(data2013.male.EW) <- c("age", format(seq.Date(from=as.Date("2013-01-04"), by="7 days",
length.out=ncol(data2013.male.EW)-1), "%d/%m/%y"))
data2013.male.EW$sex <- "Male"
data2013.female.EW <- read_excel(temp, sheet="Weekly Figures 2013", range="A34:BA40", col_names=FALSE)
colnames(data2013.female.EW) <- c("age", format(seq.Date(from=as.Date("2013-01-04"), by="7 days",
length.out=ncol(data2013.female.EW)-1), "%d/%m/%y"))
data2013.female.EW$sex <- "Female"
data2013.sex.EW <- bind_rows(data2013.male.EW, data2013.female.EW)
data2013.sex.EW$age <- factor(data2013.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2013.sex.EW$sex <- factor(data2013.sex.EW$sex, levels=c("Male", "Female"))
data2013.sex.EW <- arrange(data2013.sex.EW, age, sex)
#Add total rows
data2013.sex.EW <- data2013.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2013.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2013.sex.EW)
#By region
data2013.reg.EW <- read_excel(temp, sheet="Weekly Figures 2013", range="A43:BA52", col_names=FALSE)
colnames(data2013.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2013-01-04"), by="7 days",
length.out=ncol(data2013.reg.EW)-1), "%d/%m/%y"))
#2012 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2012/publishedweek2012.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2012.age.EW <- read_excel(temp, sheet="Weekly Figures 2012", range="A16:BA22", col_names=FALSE)
colnames(data2012.age.EW) <- c("age", format(seq.Date(from=as.Date("2012-01-06"), by="7 days",
length.out=ncol(data2012.age.EW)-1), "%d/%m/%y"))
data2012.age.EW$age <- factor(data2012.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2012.age.EW <- arrange(data2012.age.EW, age)
#By sex
data2012.male.EW <- read_excel(temp, sheet="Weekly Figures 2012", range="A25:BA31", col_names=FALSE)
colnames(data2012.male.EW) <- c("age", format(seq.Date(from=as.Date("2012-01-06"), by="7 days",
length.out=ncol(data2012.male.EW)-1), "%d/%m/%y"))
data2012.male.EW$sex <- "Male"
data2012.female.EW <- read_excel(temp, sheet="Weekly Figures 2012", range="A34:BA40", col_names=FALSE)
colnames(data2012.female.EW) <- c("age", format(seq.Date(from=as.Date("2012-01-06"), by="7 days",
length.out=ncol(data2012.female.EW)-1), "%d/%m/%y"))
data2012.female.EW$sex <- "Female"
data2012.sex.EW <- bind_rows(data2012.male.EW, data2012.female.EW)
data2012.sex.EW$age <- factor(data2012.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2012.sex.EW$sex <- factor(data2012.sex.EW$sex, levels=c("Male", "Female"))
data2012.sex.EW <- arrange(data2012.sex.EW, age, sex)
#Add total rows
data2012.sex.EW <- data2012.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2012.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2012.sex.EW)
#By region
data2012.reg.EW <- read_excel(temp, sheet="Weekly Figures 2012", range="A43:BA52", col_names=FALSE)
colnames(data2012.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2012-01-06"), by="7 days",
length.out=ncol(data2012.reg.EW)-1), "%d/%m/%y"))
#2011 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2011/publishedweek2011.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2011.age.EW <- read_excel(temp, sheet="Weekly Figures 2011", range="A17:BA23", col_names=FALSE)
colnames(data2011.age.EW) <- c("age", format(seq.Date(from=as.Date("2011-01-07"), by="7 days",
length.out=ncol(data2011.age.EW)-1), "%d/%m/%y"))
data2011.age.EW$age <- factor(data2011.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2011.age.EW <- arrange(data2011.age.EW, age)
#By sex
data2011.male.EW <- read_excel(temp, sheet="Weekly Figures 2011", range="A26:BA32", col_names=FALSE)
colnames(data2011.male.EW) <- c("age", format(seq.Date(from=as.Date("2011-01-07"), by="7 days",
length.out=ncol(data2011.male.EW)-1), "%d/%m/%y"))
data2011.male.EW$sex <- "Male"
data2011.female.EW <- read_excel(temp, sheet="Weekly Figures 2011", range="A35:BA41", col_names=FALSE)
colnames(data2011.female.EW) <- c("age", format(seq.Date(from=as.Date("2011-01-07"), by="7 days",
length.out=ncol(data2011.female.EW)-1), "%d/%m/%y"))
data2011.female.EW$sex <- "Female"
data2011.sex.EW <- bind_rows(data2011.male.EW, data2011.female.EW)
data2011.sex.EW$age <- factor(data2011.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2011.sex.EW$sex <- factor(data2011.sex.EW$sex, levels=c("Male", "Female"))
data2011.sex.EW <- arrange(data2011.sex.EW, age, sex)
#Add total rows
data2011.sex.EW <- data2011.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2011.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2011.sex.EW)
#By region
data2011.reg.EW <- read_excel(temp, sheet="Weekly Figures 2011", range="A44:BA53", col_names=FALSE)
colnames(data2011.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2011-01-07"), by="7 days",
length.out=ncol(data2011.reg.EW)-1), "%d/%m/%y"))
#2010 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2010/publishedweek2010.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age
data2010.age.EW <- read_excel(temp, sheet="Weekly Figures 2010", range="A16:BA22", col_names=FALSE)
colnames(data2010.age.EW) <- c("age", format(seq.Date(from=as.Date("2010-01-08"), by="7 days",
length.out=ncol(data2010.age.EW)-1), "%d/%m/%y"))
data2010.age.EW$age <- factor(data2010.age.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
data2010.age.EW <- arrange(data2010.age.EW, age)
#By sex
data2010.male.EW <- read_excel(temp, sheet="Weekly Figures 2010", range="A25:BA31", col_names=FALSE)
colnames(data2010.male.EW) <- c("age", format(seq.Date(from=as.Date("2010-01-08"), by="7 days",
length.out=ncol(data2010.male.EW)-1), "%d/%m/%y"))
data2010.male.EW$sex <- "Male"
data2010.female.EW <- read_excel(temp, sheet="Weekly Figures 2010", range="A34:BA40", col_names=FALSE)
colnames(data2010.female.EW) <- c("age", format(seq.Date(from=as.Date("2010-01-08"), by="7 days",
length.out=ncol(data2010.female.EW)-1), "%d/%m/%y"))
data2010.female.EW$sex <- "Female"
data2010.sex.EW <- bind_rows(data2010.male.EW, data2010.female.EW)
data2010.sex.EW$age <- factor(data2010.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64",
"65-74", "75-84", "85+"))
data2010.sex.EW$sex <- factor(data2010.sex.EW$sex, levels=c("Male", "Female"))
data2010.sex.EW <- arrange(data2010.sex.EW, age, age)
#Add total rows
data2010.sex.EW <- data2010.sex.EW %>%
group_by(sex) %>%
summarise_at(c(2:(ncol(data2010.sex.EW)-1)), sum) %>%
mutate(age="Total") %>%
bind_rows(data2010.sex.EW)
#By region
data2010.reg.EW <- read_excel(temp, sheet="Weekly Figures 2010", range="A43:BA52", col_names=FALSE)
colnames(data2010.reg.EW) <- c("reg", format(seq.Date(from=as.Date("2010-01-08"), by="7 days",
length.out=ncol(data2010.reg.EW)-1), "%d/%m/%y"))
#Combine into overall 2010-20 datasets
#For age
data_wide.age.EW <- bind_cols(data2010.age.EW, data2011.age.EW[,-c(1)], data2012.age.EW[,-c(1)], data2013.age.EW[,-c(1)], data2014.age.EW[,-c(1)],
data2015.age.EW[,-c(1)], data2016.age.EW[,-c(1)], data2017.age.EW[,-c(1)], data2018.age.EW[,-c(1)], data2019.age.EW[,-c(1)],
data2020.age.EW[,-c(1)])
data.age.EW <- gather(data_wide.age.EW, week, deaths, c(2:ncol(data_wide.age.EW)))
data.age.EW <- subset(data.age.EW, substr(data.age.EW$week,1,3)!="age")
data.age.EW$deaths <- as.numeric(data.age.EW$deaths)
#Add total row
data.age.EW <- data.age.EW %>%
group_by(week) %>%
summarise(deaths=sum(deaths)) %>%
mutate(age="Total") %>%
bind_rows(data.age.EW)
data.age.EW$week <- as.Date(data.age.EW$week, "%d/%m/%y")
data.age.EW$year <- as.numeric(format(data.age.EW$week, "%Y"))
data.age.EW$weekno <- week(data.age.EW$week)
data.age.EW$reg <- "England & Wales"
#For sex
data2010.sex.EW <- data2010.sex.EW %>%
select(age, everything())
data_wide.sex.EW <- bind_cols(data2010.sex.EW, data2011.sex.EW[,-c(1,54)], data2012.sex.EW[,-c(1,54)], data2013.sex.EW[,-c(1,54)], data2014.sex.EW[,-c(1,54)],
data2015.sex.EW[,-c(1,55)], data2016.sex.EW[,-c(1,54)], data2017.sex.EW[,-c(1,54)], data2018.sex.EW[,-c(1,54)], data2019.sex.EW[,-c(1,54)],
data2020.sex.EW[,-c(1,ncol(data2020.sex.EW))])
data.sex.EW <- gather(data_wide.sex.EW, week, deaths, c(3:ncol(data_wide.sex.EW)))
data.sex.EW <- subset(data.sex.EW, !substr(data.sex.EW$week,1,3) %in% c("age", "sex"))
data.sex.EW$deaths <- as.numeric(data.sex.EW$deaths)
data.sex.EW$week <- as.Date(data.sex.EW$week, "%d/%m/%y")
data.sex.EW$year <- as.numeric(format(data.sex.EW$week, "%Y"))
data.sex.EW$weekno <- week(data.sex.EW$week)
data.sex.EW$reg <- "England & Wales"
data.sex.EW$age <- factor(data.sex.EW$age, levels=c("Under 1 year", "01-14", "15-44", "45-64", "65-74", "75-84", "85+", "Total"))
#For region
data_wide.reg.EW <- bind_cols(data2010.reg.EW, data2011.reg.EW[,-c(1)], data2012.reg.EW[,-c(1)], data2013.reg.EW[,-c(1)], data2014.reg.EW[,-c(1)],
data2015.reg.EW[,-c(1)], data2016.reg.EW[,-c(1)], data2017.reg.EW[,-c(1)], data2018.reg.EW[,-c(1)], data2019.reg.EW[,-c(1)],
data2020.reg.EW[,-c(1)])
data.reg.EW <- gather(data_wide.reg.EW, week, deaths, c(2:ncol(data_wide.reg.EW)))
data.reg.EW <- subset(data.reg.EW, substr(data.reg.EW$week,1,3)!="reg")
data.reg.EW$deaths <- as.numeric(data.reg.EW$deaths)
data.reg.EW$date <- as.Date(data.reg.EW$week, "%d/%m/%y")
data.reg.EW$year <- as.numeric(format(data.reg.EW$date, "%Y"))
data.reg.EW$weekno <- week(data.reg.EW$date)
data.reg.EW <- data.reg.EW[,-c(2)]
#Tidy up
rm(data_wide.age.EW, data_wide.reg.EW, data_wide.sex.EW, data2010.age.EW, data2010.female.EW, data2010.male.EW, data2010.reg.EW, data2010.sex.EW,
data2011.age.EW, data2011.female.EW, data2011.male.EW, data2011.reg.EW, data2011.sex.EW,
data2012.age.EW, data2012.female.EW, data2012.male.EW, data2012.reg.EW, data2012.sex.EW,
data2013.age.EW, data2013.female.EW, data2013.male.EW, data2013.reg.EW, data2013.sex.EW,
data2014.age.EW, data2014.female.EW, data2014.male.EW, data2014.reg.EW, data2014.sex.EW,
data2015.age.EW, data2015.female.EW, data2015.male.EW, data2015.reg.EW, data2015.sex.EW,
data2016.age.EW, data2016.female.EW, data2016.male.EW, data2016.reg.EW, data2016.sex.EW,
data2017.age.EW, data2017.female.EW, data2017.male.EW, data2017.reg.EW, data2017.sex.EW,
data2018.age.EW, data2018.female.EW, data2018.male.EW, data2018.reg.EW, data2018.sex.EW,
data2019.age.EW, data2019.female.EW, data2019.male.EW, data2019.reg.EW, data2019.sex.EW,
data2020.age.EW, data2020.female.EW, data2020.male.EW, data2020.reg.EW, data2020.sex.EW)
#######################
#Read in Scottish data#
#######################
#Historic weekly deaths data for Scotland is published by National Records of Scotland
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/weekly-monthly-births-deaths-data/2020/mar/weekly-march-20.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data2004.S <- read_excel(temp, sheet="2004", range="A6:D57", col_names=FALSE)
data2005.S <- read_excel(temp, sheet="2005", range="A6:D58", col_names=FALSE)
data2006.S <- read_excel(temp, sheet="2006", range="A6:D57", col_names=FALSE)
data2007.S <- read_excel(temp, sheet="2007", range="A6:D57", col_names=FALSE)
data2008.S <- read_excel(temp, sheet="2008", range="A6:D57", col_names=FALSE)
data2009.S <- read_excel(temp, sheet="2009", range="A6:D57", col_names=FALSE)
data2010.S <- read_excel(temp, sheet="2010", range="A6:D57", col_names=FALSE)
data2011.S <- read_excel(temp, sheet="2011", range="A6:D58", col_names=FALSE)
data2012.S <- read_excel(temp, sheet="2012", range="A6:D57", col_names=FALSE)
data2013.S <- read_excel(temp, sheet="2013", range="A6:D57", col_names=FALSE)
data2014.S <- read_excel(temp, sheet="2014", range="A6:D57", col_names=FALSE)
data2015.S <- read_excel(temp, sheet="2015 ", range="A6:D58", col_names=FALSE)
data2016.S <- read_excel(temp, sheet="2016", range="E6:G57", col_names=FALSE)
data2017.S <- read_excel(temp, sheet="2017", range="E6:G57", col_names=FALSE)
data2018.S <- read_excel(temp, sheet="2018", range="E6:G57", col_names=FALSE)
data2019.S <- read_excel(temp, sheet="2019", range="E6:G57", col_names=FALSE)
#Weekly data for 2020 is published in a different Excel file each week on a Wednesday,
#so need to update the link each time from this page https://www.nrscotland.gov.uk/covid19stats
#Need to manually update the cell range when reading data in.
#Take 2020 data from dedicated COVID-19 page, which is updated more regularly
temp <- tempfile()
temp <- curl_download(url=Scot2020, destfile=temp, quiet=FALSE, mode="wb")
data2020.S <- data.frame(t(read_excel(temp, sheet="Table 2 ", range=paste0("C6:", ScotRange, "7"), col_names=FALSE))[,c(2)])
date <- data.frame(date=format(seq.Date(from=as.Date("2019-12-30"), by="7 days", length.out=nrow(data2020.S)), "%d/%m/%y"))
data2020.S <- cbind(date, data2020.S)
colnames(data2020.S) <- c("date", "deaths")
data2020.S$date <- as.Date(data2020.S$date, "%d/%m/%y")
data2020.S$weekno <- week(data2020.S$date)
#Stick together 2004-15 which share the same structure
data0415.S <- bind_rows(data2004.S, data2005.S, data2006.S, data2007.S, data2008.S, data2009.S, data2010.S,
data2011.S, data2012.S, data2013.S, data2014.S, data2015.S)
colnames(data0415.S) <- c("weekno", "date", "births", "deaths")
data0415.S$date <- as.Date(data0415.S$date)
#Then 2016-19 data
data1619.S <- bind_rows(data2016.S, data2017.S, data2018.S, data2019.S)
colnames(data1619.S) <- c("weekno", "date", "deaths")
data1619.S$date <- as.Date(data1619.S$date)
data.S <- bind_rows(data0415.S, data1619.S, data2020.S)
#Recalculate dates to align with ONS data (which uses week to, not w/c)
data.S$date <- data.S$date+days(6)
data.S$weekno <- week(data.S$date)
data.S$year <- year(data.S$date)
data.S$reg <- "Scotland"
data.S <- data.S[,-c(3)]
if(NRSweek==FALSE){
#NRS stopped publishing detailed weekly deaths data after week 32,
#so get data after that from elsewhere:
#https://data.gov.scot/coronavirus-covid-19/data.html
temp <- tempfile()
temp <- curl_download(url=Scot2020v2, destfile=temp, quiet=FALSE, mode="wb")
data.Sv2 <- read_excel(temp, sheet="2.2_excess", range=paste0("A", ScotRangev2.1,":C", ScotRangev2.2), col_names=FALSE)
colnames(data.Sv2) <- c("weekno", "date", "deaths")
data.Sv2$date <- data.Sv2$date+days(6)
data.Sv2$year <- rep(2020, times=length(data.Sv2$weekno))
data.Sv2$reg <- rep("Scotland", times=length(data.Sv2$weekno))
data.S <- bind_rows(data.S, data.Sv2)
rm(data.Sv2)
}
#Tidy up
rm(date, data2004.S, data2005.S, data2006.S, data2007.S, data2008.S, data2009.S, data2010.S, data2011.S,
data2012.S, data2013.S, data2014.S, data2015.S, data2016.S, data2017.S, data2018.S, data2019.S,
data2020.S, data0415.S, data1619.S)
#############################
#Read in Northern Irish data#
#############################
#NI data from NISRA is published to the same Excel file (so no need to update link) each Friday
temp <- tempfile()
temp <- curl_download(url=NI2020, destfile=temp, quiet=FALSE, mode="wb")
data2020.NI <- read_excel(temp, sheet="Table 1", range=paste0("B6:C", NIRange), col_names=FALSE)
colnames(data2020.NI) <- c("date", "deaths")
temp <- tempfile()
source <- "https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly%20Deaths%20by%20Age%20and%20Respiratory%20Deaths%2C%202011-2019.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data2019.NI <- read_excel(temp, sheet="Weekly Deaths_2019", range="C5:D56", col_names=FALSE)
colnames(data2019.NI) <- c("date", "deaths")
data2018.NI <- read_excel(temp, sheet="Weekly Deaths_2018", range="C5:D56", col_names=FALSE)
colnames(data2018.NI) <- c("date", "deaths")
data2017.NI <- read_excel(temp, sheet="Weekly Deaths_2017", range="C5:D57", col_names=FALSE)
colnames(data2017.NI) <- c("date", "deaths")
data2016.NI <- read_excel(temp, sheet="Weekly Deaths_2016", range="C5:D56", col_names=FALSE)
colnames(data2016.NI) <- c("date", "deaths")
data2015.NI <- read_excel(temp, sheet="Weekly Deaths_2015", range="C5:D57", col_names=FALSE)
colnames(data2015.NI) <- c("date", "deaths")
data2014.NI <- read_excel(temp, sheet="Weekly Deaths_2014", range="C5:D56", col_names=FALSE)
colnames(data2014.NI) <- c("date", "deaths")
data2013.NI <- read_excel(temp, sheet="Weekly Deaths_2013", range="C5:D56", col_names=FALSE)
colnames(data2013.NI) <- c("date", "deaths")
data2012.NI <- read_excel(temp, sheet="Weekly Deaths_2012", range="C5:D56", col_names=FALSE)
colnames(data2012.NI) <- c("date", "deaths")
data2011.NI <- read_excel(temp, sheet="Weekly Deaths_2011", range="C5:D56", col_names=FALSE)
colnames(data2011.NI) <- c("date", "deaths")
data.NI <- bind_rows(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI, data2016.NI,
data2017.NI, data2018.NI, data2019.NI, data2020.NI)
data.NI$date <- as.Date(data.NI$date)
data.NI$weekno <- week(data.NI$date)
data.NI$year <- year(data.NI$date)
data.NI$reg <- "Northern Ireland"
#Tidy up
rm(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI, data2016.NI, data2017.NI,
data2018.NI, data2019.NI, data2020.NI)
#Stick regional data together for whole of UK
data.reg.UK <- bind_rows(data.reg.EW, data.S, data.NI)
#Temporary hack until I work out a propoer solution for the 2020-201 bridge
data.reg.UK <- data.reg.UK %>%
mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),
year=if_else(year==2021, 2020, year))
data.age.EW <- data.age.EW %>%
mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),
year=if_else(year==2021, 2020, year))
data.sex.EW <- data.sex.EW %>%
mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),
year=if_else(year==2021, 2020, year))
data.reg.EW <- data.reg.EW %>%
mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),
year=if_else(year==2021, 2020, year))
data.S <- data.S %>%
mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),
year=if_else(year==2021, 2020, year))
data.NI <- data.NI %>%
mutate(weekno=if_else(year==2021 & weekno==1, 53, as.double(weekno)),
year=if_else(year==2021, 2020, as.double(year)))
#Pull out latest week numbers for label placement
EWmaxweek <- max(subset(data.reg.UK, reg=="London" & year==2020)$weekno)
Scotmaxweek <- max(subset(data.reg.UK, reg=="Scotland" & year==2020)$weekno)
NImaxweek <- max(subset(data.reg.UK, reg=="Northern Ireland" & year==2020)$weekno)
###########
#Save data#
###########
#E&W data by age
write.csv(data.age.EW, "Data/deaths_age_EW.csv")
#E&W data by sex
write.csv(data.sex.EW, "Data/deaths_sex_EW.csv")
#UK data by region
write.csv(data.reg.UK, "Data/deaths_reg_UK.csv")
################
#E&W only plots#
################
#Overall plot
#Extract max/min values
#split off 2020 data
data.age.EW.new <- subset(data.age.EW, year==2020 & age=="Total")
data.age.EW.old <- subset(data.age.EW, year<2020 & age=="Total")
data.age.EW.old <- data.age.EW.old %>%
group_by(weekno, reg) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
data.age.EW.new <- merge(data.age.EW.new, data.age.EW.old, by=c("weekno"))
#Calculate excess deaths vs. mean so far this year
data.age.EW.new$excess <- data.age.EW.new$deaths-data.age.EW.new$mean
EW.excess <- data.age.EW.new %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract y=axis placement for excess deaths figure
labpos <- 14000
tiff("Outputs/ONSWeeklyDeaths.tiff", units="in", width=10, height=8, res=300)
ggplot()+
geom_ribbon(data=data.age.EW.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.age.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.age.EW.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.age.EW.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="All-cause deaths in England & Wales are still higher than 'normal'",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2010-19. Data up to ", EWDate, "."),
caption="Data from ONS | Plot by @VictimOfMaths")+
annotate(geom="text", x=22, y=labpos, label=paste0("+", round(EW.excess$excess, 0),
" more deaths in 2020 than average (+",
round(EW.excess$percexcess*100, 0),"%)"), colour="Red", hjust=0)+
annotate(geom="text", x=9, y=13600, label="Historic maximum", colour="Skyblue4")+
annotate(geom="text", x=9, y=9100, label="Historic minimum", colour="Skyblue4")+
annotate(geom="text", x=48, y=8800, label="Historic mean", colour="grey30")+
geom_curve(aes(x=48, y=9000, xend=47, yend=9800), colour="grey30", curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
theme(plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
#Plot by sex
#Extract max/min values
#split off 2020 data
data.sex.EW.new <- subset(data.sex.EW, year==2020 & age=="Total")
data.sex.EW.old <- subset(data.sex.EW, year<2020 & age=="Total")
data.sex.EW.old <- data.sex.EW.old %>%
group_by(weekno, sex) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
data.sex.EW.new <- merge(data.sex.EW.new, data.sex.EW.old, by=c("weekno", "sex"))
#Calculate excess deaths vs. mean so far this year
data.sex.EW.new$excess <- data.sex.EW.new$deaths-data.sex.EW.new$mean
sex.EW.excess <- data.sex.EW.new %>%
group_by(sex) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract label positions for excess deaths
labpos <- data.sex.EW.new %>%
filter(weekno==EWmaxweek) %>%
group_by(sex) %>%
summarise(pos=max(deaths, max+1000))
ann_text1 <- data.frame(weekno=rep(26, times=2), deaths=labpos$pos, sex=c("Male", "Female"))
tiff("Outputs/ONSWeeklyDeathsxSex.tiff", units="in", width=12, height=8, res=300)
ggplot()+
geom_ribbon(data=data.sex.EW.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.sex.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.sex.EW.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.sex.EW.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
facet_wrap(~sex)+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="Excess deaths are currently higher among men",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2010-19. Data up to ", EWDate, "."),
caption="Data from ONS | Plot by @VictimOfMaths")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
geom_text(data=ann_text1, aes(x=weekno, y=deaths), label=c(paste0("+", round(sex.EW.excess[1,2],0)," excess deaths in 2020\nvs. 2010-19 average (+",
round(sex.EW.excess[1,4]*100, 0),"%)"),
paste0("+", round(sex.EW.excess[2,2],0)," deaths (+",
round(sex.EW.excess[2,4]*100, 0),"%)")),
size=3, colour=c("Red", "Red"), hjust=0)
dev.off()
#By sex and age
#Extract max/min values
#split off 2020 data
data.sex.age.EW.new <- subset(data.sex.EW, year==2020 & !age %in% c("Total", "Under 1 year", "01-14", "15-44"))
data.sex.age.EW.old <- subset(data.sex.EW, year<2020 & !age %in% c("Total", "Under 1 year", "01-14", "15-44"))
data.sex.age.EW.old <- data.sex.age.EW.old %>%
group_by(weekno, sex, age) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
data.sex.age.EW.new <- merge(data.sex.age.EW.new, data.sex.age.EW.old, by=c("weekno", "sex", "age"))
#Calculate excess deaths vs. mean so far this year
data.sex.age.EW.new$excess <- data.sex.age.EW.new$deaths-data.sex.age.EW.new$mean
sex.age.EW.excess <- data.sex.age.EW.new %>%
group_by(sex, age) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract label positions for excess deaths
labpos <- data.sex.age.EW.new %>%
filter(weekno==EWmaxweek) %>%
group_by(sex, age) %>%
summarise(pos=max(deaths, max+500))
ann_text2 <- data.frame(weekno=rep(25, times=8), deaths=labpos$pos,
sex=rep(c("Male", "Female"), each=4),
age=rep(c("45-64", "65-74", "75-84", "85+"), times=2))
tiff("Outputs/ONSWeeklyDeathsxSexxAge.tiff", units="in", width=12, height=8, res=300)
ggplot()+
geom_ribbon(data=data.sex.age.EW.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.sex.age.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.sex.age.EW.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.sex.age.EW.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
facet_grid(age~sex)+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="Excess deaths are clearest among men over 75",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2010-19. Data up to ", EWDate, "."),
caption="Data from ONS | Plot by @VictimOfMaths")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
geom_text(data=ann_text2, aes(x=weekno, y=deaths), label=c(paste0(round(sex.age.EW.excess[1,3],0)," excess deaths in 2020 vs. 2010-19 average (+",
round(sex.age.EW.excess[1,5]*100, 0),"%)"),
paste0("+", round(sex.age.EW.excess[2,3],0)," deaths (+",
round(sex.age.EW.excess[2,5]*100, 0),"%)"),
paste0("+", round(sex.age.EW.excess[3,3],0)," deaths (+",
round(sex.age.EW.excess[3,5]*100, 0),"%)"),
paste0("+", round(sex.age.EW.excess[4,3],0)," deaths (+",
round(sex.age.EW.excess[4,5]*100, 0),"%)"),
paste0("+", round(sex.age.EW.excess[5,3],0)," deaths (+",
round(sex.age.EW.excess[5,5]*100, 0),"%)"),
paste0("+", round(sex.age.EW.excess[6,3],0)," deaths (+",
round(sex.age.EW.excess[6,5]*100, 0),"%)"),
paste0("+", round(sex.age.EW.excess[7,3],0)," deaths (+",
round(sex.age.EW.excess[7,5]*100, 0),"%)"),
paste0("+", round(sex.age.EW.excess[8,3],0)," deaths (+",
round(sex.age.EW.excess[8,5]*100, 0),"%)")),
size=3, colour=rep("red", times=8), hjust=0)
dev.off()
#Plot by age
#Compress age groups under 45
data.age.EW$age2 <- case_when(
data.age.EW$age %in% c("Under 1 year", "01-14", "15-44") ~ "Under 45",
data.age.EW$age!="Total" ~ data.age.EW$age
)
data.age.EW$age2 <- factor(data.age.EW$age2, levels=c("Under 45", "45-64", "65-74", "75-84", "85+"))
data.age.EW <- data.age.EW %>%
group_by(weekno, age2, year) %>%
mutate(deaths=sum(deaths))
#Extract max/min values
#split off 2020 data
data.age.EW.new <- subset(data.age.EW, year==2020 & !is.na(age2))
data.age.EW.old <- subset(data.age.EW, year<2020 & !is.na(age2))
data.age.EW.old <- data.age.EW.old %>%
group_by(weekno, age2) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
data.age.EW.new <- merge(data.age.EW.new, data.age.EW.old, by=c("weekno", "age2"))
#Calculate excess deaths vs. mean so far this year
data.age.EW.new$excess <- data.age.EW.new$deaths-data.age.EW.new$mean
age.EW.excess <- data.age.EW.new %>%
group_by(age2) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract label positions for excess deaths
labpos <- data.age.EW.new %>%
filter(weekno==EWmaxweek) %>%
group_by(age2) %>%
summarise(pos=max(mean+(deaths-mean)/1.4, max+600))
#Manually adjust up Under45s label to handle text wrapping
labpos[1,2] <- labpos[1,2]+500
ann_text3 <- data.frame(weekno=rep(26, times=5), deaths=labpos$pos,
age2=c("Under 45", "45-64", "65-74", "75-84", "85+")) %>%
mutate(age2=factor(age2, levels=c("Under 45", "45-64", "65-74", "75-84", "85+")))
tiff("Outputs/ONSWeeklyDeathsxAge.tiff", units="in", width=12, height=8, res=300)
ggplot()+
geom_ribbon(data=data.age.EW.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.age.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.age.EW.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.age.EW.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
facet_wrap(~age2)+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="All-cause mortality remains further above 'normal' in the oldest age groups",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2010-19. Data up to ", EWDate, "."),
caption="Data from ONS | Plot by @VictimOfMaths")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
geom_text(data=ann_text3, aes(x=weekno, y=deaths), label=c(paste0(round(age.EW.excess[1,2],0)," excess deaths in 2020\nvs. 2010-19 average (",
round(age.EW.excess[1,4]*100, 1),"%)"),
paste0("+", round(age.EW.excess[2,2],0)," deaths (+",
round(age.EW.excess[2,4]*100, 0),"%)"),
paste0("+", round(age.EW.excess[3,2],0)," deaths (+",
round(age.EW.excess[3,4]*100, 0),"%)"),
paste0("+", round(age.EW.excess[4,2],0)," deaths (+",
round(age.EW.excess[4,4]*100, 0),"%)"),
paste0("+", round(age.EW.excess[5,2],0)," deaths (+",
round(age.EW.excess[5,4]*100, 0),"%)")),
size=3, colour=rep("red", times=5), hjust=0)
dev.off()
###################
#Plot for Scotland#
###################
#Overall plot
#Extract max/min values
#split off 2020 data
data.S.new <- subset(data.S, year>=2020)
data.S.old <- subset(data.S, year<2020 & year>=2010)
data.S.old <- data.S.old %>%
group_by(weekno) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
data.S.new <- merge(data.S.new, data.S.old, by=c("weekno"))
#Calculate excess deaths vs. mean so far this year
data.S.new$excess <- data.S.new$deaths-data.S.new$mean
S.excess <- data.S.new %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract y=axis placement for excess deaths figure
labpos <- 1700
tiff("Outputs/NRSWeeklyDeaths.tiff", units="in", width=10, height=8, res=300)
ggplot()+
geom_ribbon(data=data.S.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.S.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.S.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.S.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="All-cause deaths in Scotland have stayed within 'normal' levels",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2010-19. Data up to ", ScotDate, "."),
caption="Data from NRS | Plot by @VictimOfMaths")+
annotate(geom="text", x=22, y=labpos, label=paste0(round(S.excess$excess, 0),
" more deaths in 2020 than average (+", round(S.excess$percexcess*100, 0),"%)"), colour="Red", hjust=0)+
annotate(geom="text", x=30, y=1150, label="Historic maximum", colour="Skyblue4")+
annotate(geom="text", x=30, y=800, label="Historic minimum", colour="Skyblue4")+
annotate(geom="text", x=48, y=850, label="Historic mean", colour="grey30")+
geom_curve(aes(x=48, y=900, xend=47, yend=1050), colour="grey30", curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
theme(plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
###########################
#Plot for Northern Ireland#
###########################
#Overall plot
#Extract max/min values
#split off 2020 data
data.NI.new <- subset(data.NI, year==2020)
data.NI.old <- subset(data.NI, year<2020)
data.NI.old <- data.NI.old %>%
group_by(weekno) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
data.NI.new <- merge(data.NI.new, data.NI.old, by=c("weekno"))
#Calculate excess deaths vs. mean so far this year
data.NI.new$excess <- data.NI.new$deaths-data.NI.new$mean
NI.excess <- data.NI.new %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract y=axis placement for excess deaths figure
labpos <- max(data.NI.new$mean[data.NI.new$weekno==NImaxweek]+(data.NI.new$deaths[data.NI.new$weekno==NImaxweek]-
data.NI.new$mean[data.NI.new$weekno==NImaxweek])/1.4, 400)
tiff("Outputs/NISRAWeeklyDeaths.tiff", units="in", width=10, height=8, res=300)
ggplot()+
geom_ribbon(data=data.NI.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.NI.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.NI.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.NI.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="Deaths in Northern Ireland are still above average",
subtitle=paste0("Weekly all-cause deaths in 2020 compared to the range in 2011-19. Data up to ", NIDate, "."),
caption="Data from NISRA | Plot by @VictimOfMaths")+
annotate(geom="text", x=23, y=labpos, label=paste0(round(NI.excess$excess, 0),
" more deaths in 2020 than average (+",
round(NI.excess$percexcess*100, 0),"%)"),
colour="Red", hjust=0)+
annotate(geom="text", x=30, y=320, label="Historic maximum", colour="Skyblue4")+
annotate(geom="text", x=30, y=160, label="Historic minimum", colour="Skyblue4")+
annotate(geom="text", x=47, y=220, label="Historic mean", colour="grey30")+
geom_curve(aes(x=48, y=230, xend=47, yend=285), colour="grey30", curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
theme(plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.5)))
dev.off()
###############################
#Plots for the whole of the UK#
###############################
#Extract max/min values
#split off 2020 data
data.reg.UK.new <- subset(data.reg.UK, year==2020)
data.reg.UK.old <- subset(data.reg.UK, year<2020 & year>=2010)
data.reg.UK.old <- data.reg.UK.old %>%
group_by(weekno, reg) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
data.reg.UK.new <- merge(data.reg.UK.new, data.reg.UK.old, by=c("weekno", "reg"))
#Calculate excess deaths vs. mean so far this year
data.reg.UK.new$excess <- data.reg.UK.new$deaths-data.reg.UK.new$mean
reg.UK.excess <- data.reg.UK.new %>%
group_by(reg) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
data.reg.UK.new <- data.reg.UK.new %>%
group_by(reg) %>%
mutate(maxexcess=max(excess))
data.reg.UK.new$reg <- fct_reorder(data.reg.UK.new$reg, -data.reg.UK.new$maxexcess)
data.reg.UK.old$reg <- factor(data.reg.UK.old$reg, levels=levels(data.reg.UK.new$reg))
reg.UK.excess$reg <-factor(reg.UK.excess$reg, levels=levels(data.reg.UK.new$reg))
reg.UK.excess <- arrange(reg.UK.excess, reg.UK.excess$reg)
#Extract label positions for excess deaths
labpos <- data.reg.UK.new %>%
filter(weekno==case_when(
reg=="Scotland" ~ if_else(Scotmaxweek%
group_by(reg) %>%
summarise(pos=max(mean+(deaths-mean)/1.6, max+800))
#Sort out subtitle
subtitle <- ifelse(EWDate==NIDate, paste0("Weekly deaths in 2020 compared to the range in 2010-19.
England, Wales and Northern Ireland data to ", EWDate, ".
Scotland data to ", ScotDate, "."),
paste0("Weekly deaths in 2020 compared to the range in 2010-19
England and Wales data to ", EWDate, ".
Northern Ireland data to ", NIDate, ".
Scotland data to ", ScotDate, "."))
#Add labels to each facet w/ excess deaths
ann_text4 <- data.frame(weekno=rep(24, times=12), deaths=labpos$pos, reg=unique(labpos$reg))
RegPlot <- ggplot()+
geom_ribbon(data=data.reg.UK.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.reg.UK.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.reg.UK.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.reg.UK.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
facet_wrap(~reg)+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="Regional variation in all-cause mortality in the UK",
subtitle=subtitle,
caption="Data from ONS, NRS & NISRA | Plot by @VictimOfMaths")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
geom_text(data=ann_text4, aes(x=weekno, y=deaths), label=c(paste0(round(reg.UK.excess[1,2], 0),
" excess deaths in 2020\nvs. 2010-19 average (+",
round(reg.UK.excess[1,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[2,2], 0),
" deaths (+",
round(reg.UK.excess[2,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[3,2], 0),
" deaths (+",
round(reg.UK.excess[3,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[4,2], 0),
" deaths (+",
round(reg.UK.excess[4,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[5,2], 0),
" deaths (+",
round(reg.UK.excess[5,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[6,2], 0),
" deaths (+",
round(reg.UK.excess[6,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[7,2], 0),
" deaths (+",
round(reg.UK.excess[7,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[8,2], 0),
" deaths (+",
round(reg.UK.excess[8,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[9,2], 0),
" deaths (+",
round(reg.UK.excess[9,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[10,2], 0),
" deaths (+",
round(reg.UK.excess[10,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[11,2], 0),
" deaths (+",
round(reg.UK.excess[11,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[12,2], 0),
" deaths (+",
round(reg.UK.excess[12,4]*100, 0),"%)")),
size=3, colour="Red", hjust=0)
tiff("Outputs/ONSNRSNISRAWeeklyDeathsxReg.tiff", units="in", width=12, height=9, res=300)
RegPlot
dev.off()
png("Outputs/ONSNRSNISRAWeeklyDeathsxReg.png", units="in", width=12, height=9, res=300)
RegPlot
dev.off()
RegPlot2 <- ggplot()+
geom_ribbon(data=data.reg.UK.old, aes(x=weekno, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(data=data.reg.UK.new, aes(x=weekno, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(data=data.reg.UK.old, aes(x=weekno, y=mean), colour="Grey50", linetype=2)+
geom_line(data=data.reg.UK.new, aes(x=weekno, y=deaths), colour="Red")+
theme_classic()+
facet_wrap(~reg, scales="free_y")+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="Regional variation in all-cause mortality in the UK",
subtitle=subtitle,
caption="Data from ONS, NRS & NISRA | Plot by @VictimOfMaths")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
geom_text(data=ann_text4, aes(x=weekno, y=deaths), label=c(paste0(round(reg.UK.excess[1,2], 0),
" excess deaths in 2020\nvs. 2010-19 average (+",
round(reg.UK.excess[1,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[2,2], 0),
" deaths (+",
round(reg.UK.excess[2,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[3,2], 0),
" deaths (+",
round(reg.UK.excess[3,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[4,2], 0),
" deaths (+",
round(reg.UK.excess[4,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[5,2], 0),
" deaths (+",
round(reg.UK.excess[5,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[6,2], 0),
" deaths (+",
round(reg.UK.excess[6,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[7,2], 0),
" deaths (+",
round(reg.UK.excess[7,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[8,2], 0),
" deaths (+",
round(reg.UK.excess[8,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[9,2], 0),
" deaths (+",
round(reg.UK.excess[9,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[10,2], 0),
" deaths (+",
round(reg.UK.excess[10,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[11,2], 0),
" deaths (+",
round(reg.UK.excess[11,4]*100, 0),"%)"),
paste0("+", round(reg.UK.excess[12,2], 0),
" deaths (+",
round(reg.UK.excess[12,4]*100, 0),"%)")),
size=3, colour="Red", hjust=0)
tiff("Outputs/ONSNRSNISRAWeeklyDeathsxReg2.tiff", units="in", width=13, height=9, res=300)
RegPlot2
dev.off()
#Generate cumulative death counts by year
data.reg.UK <- data.reg.UK %>%
group_by(reg, year) %>%
arrange(reg, year, weekno) %>%
mutate(cumul_deaths=cumsum(deaths))
ann_text5 <- data.frame(weekno=EWmaxweek,
cumul_deaths=data.reg.UK$cumul_deaths[data.reg.UK$reg=="London" & data.reg.UK$weekno==EWmaxweek & data.reg.UK$year==2020]+5000,
reg="London")
tiff("Outputs/ONSNRSNISRAWeeklyCumulDeaths_reg.tiff", units="in", width=12, height=8, res=300)
ggplot()+
geom_line(data=subset(data.reg.UK, year!=2020 & year>=2010), aes(x=weekno, y=cumul_deaths, group=as.factor(year)), colour="Grey80")+
geom_line(data=subset(data.reg.UK, year==2020), aes(x=weekno, y=cumul_deaths), colour="Red")+
theme_classic()+
facet_wrap(~reg)+
facet_wrap(~reg)+
scale_x_continuous(name="Week number")+
scale_y_continuous(name="Deaths registered")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold"),
plot.title =element_markdown())+
labs(title="Cumulative deaths from all causes in 2020 compared to the range in 2010-19",
caption="Data from ONS, NRS & NISRA | Plot by @VictimOfMaths")+
geom_text(data=ann_text5, aes(x=weekno, y=cumul_deaths), label=c("2020"), size=3, colour="Red")
dev.off()
###############################################################
#Plot similar charts for death by location for England & Wales#
###############################################################
#Read in historic average deaths by place
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/11622fiveyearaverageweeklydeathsbyplaceofdeathenglandandwalesdeathsoccurringbetween2015and2019/fiveyearavgweeklydeaths2015to2019podfinal.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data1519 <- read_excel(temp, sheet="Table", range="A4:G56")
data1519$week <- as.numeric(substr(data1519$...1, 6,7))
data1519_long <- gather(data1519, location, deaths, c(2:7))[,-c(1)]
data1519_long$year <- "hist"
#Read in 2020 figures, which are formatted in a *hideous* way, thanks ONS
temp <- tempfile()
temp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode="wb")
temp1 <- as.data.frame(t(read_excel(temp, sheet=11, range="A9:B14", col_names=FALSE)))
temp2 <- as.data.frame(t(read_excel(temp, sheet=11, range="H9:H14", col_names=FALSE)))
temp3 <- as.data.frame(t(read_excel(temp, sheet=11, range="N9:N14", col_names=FALSE)))
temp4 <- as.data.frame(t(read_excel(temp, sheet=11, range="T9:T14", col_names=FALSE)))
temp5 <- as.data.frame(t(read_excel(temp, sheet=11, range="Z9:Z14", col_names=FALSE)))
temp6 <- as.data.frame(t(read_excel(temp, sheet=11, range="AF9:AF14", col_names=FALSE)))
temp7 <- as.data.frame(t(read_excel(temp, sheet=11, range="AL9:AL14", col_names=FALSE)))
temp8 <- as.data.frame(t(read_excel(temp, sheet=11, range="AR9:AR14", col_names=FALSE)))
temp9 <- as.data.frame(t(read_excel(temp, sheet=11, range="AX9:AX14", col_names=FALSE)))
temp10 <- as.data.frame(t(read_excel(temp, sheet=11, range="BD9:BD14", col_names=FALSE)))
temp11 <- as.data.frame(t(read_excel(temp, sheet=11, range="BJ9:BJ14", col_names=FALSE)))
temp12 <- as.data.frame(t(read_excel(temp, sheet=11, range="BP9:BP14", col_names=FALSE)))
temp13 <- as.data.frame(t(read_excel(temp, sheet=11, range="BV9:BV14", col_names=FALSE)))
temp14 <- as.data.frame(t(read_excel(temp, sheet=11, range="CB9:CB14", col_names=FALSE)))
temp15 <- as.data.frame(t(read_excel(temp, sheet=11, range="CH9:CH14", col_names=FALSE)))
temp16 <- as.data.frame(t(read_excel(temp, sheet=11, range="CN9:CN14", col_names=FALSE)))
temp17 <- as.data.frame(t(read_excel(temp, sheet=11, range="CT9:CT14", col_names=FALSE)))
temp18 <- as.data.frame(t(read_excel(temp, sheet=11, range="CZ9:CZ14", col_names=FALSE)))
temp19 <- as.data.frame(t(read_excel(temp, sheet=11, range="DF9:DF14", col_names=FALSE)))
temp20 <- as.data.frame(t(read_excel(temp, sheet=11, range="DL9:DL14", col_names=FALSE)))
temp21 <- as.data.frame(t(read_excel(temp, sheet=11, range="DR9:DR14", col_names=FALSE)))
temp22 <- as.data.frame(t(read_excel(temp, sheet=11, range="DX9:DX14", col_names=FALSE)))
temp23 <- as.data.frame(t(read_excel(temp, sheet=11, range="ED9:ED14", col_names=FALSE)))
temp24 <- as.data.frame(t(read_excel(temp, sheet=11, range="EJ9:EJ14", col_names=FALSE)))
temp25 <- as.data.frame(t(read_excel(temp, sheet=11, range="EP9:EP14", col_names=FALSE)))
temp26 <- as.data.frame(t(read_excel(temp, sheet=11, range="EV9:EV14", col_names=FALSE)))
temp27 <- as.data.frame(t(read_excel(temp, sheet=11, range="FB9:FB14", col_names=FALSE)))
temp28 <- as.data.frame(t(read_excel(temp, sheet=11, range="FH9:FH14", col_names=FALSE)))
temp29 <- as.data.frame(t(read_excel(temp, sheet=11, range="FN9:FN14", col_names=FALSE)))
temp30 <- as.data.frame(t(read_excel(temp, sheet=11, range="FT9:FT14", col_names=FALSE)))
temp31 <- as.data.frame(t(read_excel(temp, sheet=11, range="FZ9:FZ14", col_names=FALSE)))
temp32 <- as.data.frame(t(read_excel(temp, sheet=11, range="GF9:GF14", col_names=FALSE)))
temp33 <- as.data.frame(t(read_excel(temp, sheet=11, range="GL9:GL14", col_names=FALSE)))
temp34 <- as.data.frame(t(read_excel(temp, sheet=11, range="GR9:GR14", col_names=FALSE)))
temp35 <- as.data.frame(t(read_excel(temp, sheet=11, range="GX9:GX14", col_names=FALSE)))
temp36 <- as.data.frame(t(read_excel(temp, sheet=11, range="HD9:HD14", col_names=FALSE)))
temp37 <- as.data.frame(t(read_excel(temp, sheet=11, range="HJ9:HJ14", col_names=FALSE)))
temp38 <- as.data.frame(t(read_excel(temp, sheet=11, range="HP9:HP14", col_names=FALSE)))
temp39 <- as.data.frame(t(read_excel(temp, sheet=11, range="HV9:HV14", col_names=FALSE)))
temp40 <- as.data.frame(t(read_excel(temp, sheet=11, range="IB9:IB14", col_names=FALSE)))
temp41 <- as.data.frame(t(read_excel(temp, sheet=11, range="IH9:IH14", col_names=FALSE)))
temp42 <- as.data.frame(t(read_excel(temp, sheet=11, range="IN9:IN14", col_names=FALSE)))
temp43 <- as.data.frame(t(read_excel(temp, sheet=11, range="IT9:IT14", col_names=FALSE)))
colnames(temp1) <- temp1 %>% slice(1) %>% unlist()
temp1 <- temp1 %>% slice(-1)
temp1$week <- 11
temp1 <- temp1 %>% mutate_if(is.factor, as.character) %>% mutate_if(is.character, as.numeric)
data20 <- bind_rows(temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10, temp11,
temp12, temp13, temp14, temp15, temp16, temp17, temp18, temp19, temp20,
temp21, temp22, temp23, temp24, temp25, temp26, temp27, temp28, temp29,
temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37, temp38,
temp39, temp40, temp41, temp42, temp43)
data20$week <- c(12:EWmaxweek)
colnames(data20) <- colnames(temp1)
data20 <- bind_rows(temp1, data20)
data20_long <- gather(data20, location, deaths, c(1:6))
data20_long$year <- "curr"
#Align location names
data20_long$location <- case_when(
data20_long$location=="Hospital (acute or community, not psychiatric)" ~ "Hospital",
data20_long$location=="Care Home" ~ "Care home",
TRUE ~ data20_long$location
)
#Merge old and 2020 data
data <- bind_rows(data1519_long, data20_long)
#extract peak deaths to order facets
data <- data %>%
group_by(location) %>%
mutate(max=max(deaths))
data$location <- fct_reorder(data$location, -data$max)
tiff("Outputs/ONSWeeklyDeathsxLocation.tiff", units="in", width=12, height=8, res=300)
ggplot()+
geom_line(data=subset(data, year=="hist"), aes(x=week, y=deaths), colour="skyblue4")+
geom_line(data=subset(data, year=="curr"), aes(x=week, y=deaths), colour="red")+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Deaths registered")+
facet_wrap(~location)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="All cause deaths have fallen across all settings",
subtitle=paste0("Registered weekly deaths in England & Wales in 2020 compared to the average for 2015-19. Data up to ", EWDate, "."),
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
##############################
#COVID vs. non-COVID excess deaths
temp <- tempfile()
temp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode="wb")
EngCause <- as.data.frame(t(read_excel(temp, sheet=5, range=paste0("C9:", EngRange, "19"),
col_names=FALSE)))[,c(1,3,11)]
colnames(EngCause) <- c("Total2020", "Mean1519", "COVID")
EngCause$week <- seq(1:nrow(EngCause))
EngCause$other <- EngCause$Total2020-EngCause$COVID
EngCause$excess <- EngCause$other-EngCause$Mean1519
EngCause$allexcess <- EngCause$Total2020-EngCause$Mean1519
EngCause_long <- gather(EngCause, cause, deaths, c(6,3,7))
tiff("Outputs/ONSExcessxCause.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_col(data=subset(EngCause_long, cause!="allexcess"),
aes(x=week, y=deaths, fill=cause), position="stack")+
geom_segment(aes(x=0.5, xend=max(EngCause$week)+0.5, y=0, yend=0), colour="Grey30")+
geom_line(data=subset(EngCause_long, cause=="allexcess"),
aes(x=week, y=deaths, colour=cause))+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Excess deaths vs. 2015-19 mean")+
scale_fill_paletteer_d("LaCroixColoR::PinaFraise", name="Cause", labels=c("COVID-19", "Other causes"))+
scale_colour_manual(values="NavyBlue", name="", labels="Net excess deaths")+
theme_classic()+
labs(title="The number of confirmed COVID-19 deaths rose while excess deaths fell overall",
subtitle="Excess deaths vs. 2015-19 average by cause for England & Wales",
caption="Data from ONS | Plot by @VictimOfMaths")+
theme(plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
================================================
FILE: All Cause Mortality/AllCauseDeaths2021.R
================================================
rm(list=ls())
library(tidyverse)
library(paletteer)
library(curl)
library(readxl)
library(lubridate)
library(forcats)
library(ggtext)
library(ragg)
library(extrafont)
#Latest date in the country-specific data
EWDate <- "29th October"
ScotDate <- "7th November"
NIDate <- "5th November"
#Locations for 2020/21 data
#England, released at 9:30 on Tuesday mornings
#https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales
Eng2021 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek432021.xlsx"
#Scotland, released at noon on Wednesdays
#https://www.nrscotland.gov.uk/covid19stats
Scot2021 <- "https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-21-data-week-44.xlsx"
#Northern Ireland, released on Fridays
#https://www.nisra.gov.uk/publications/weekly-deaths
NI2021 <- "https://www.nisra.gov.uk/system/files/statistics/Weekly_Deaths%20-%20w%20e%205th%20November%202021.XLSX"
#Stupid Excel range controls
#These need to be incremented by one letter each week
EngRange <- "AS"
ScotRange <- "AT"
NIRange <- "44"
##############################
#Read in English & Welsh data#
##############################
#Archive version with 2020 data in it
Eng2020 <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2020/publishedweek532020.xlsx"
#Start with 2021
temp <- tempfile()
temp <- curl_download(url=Eng2021, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data2021.as.EW <- read_excel(temp, sheet="Weekly figures 2021",
range=paste0("B40:", EngRange, "81"), col_names=FALSE) %>%
slice(-c(21,22)) %>%
mutate(sex=rep(c("Male", "Female"), each=20)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2021-01-08")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(1))) %>%
select(-index) %>%
mutate(age=case_when(
age=="<1" ~ "Under 1 year",
age %in% c("1-4", "5-9", "10-14") ~ "01-14",
age %in% c("15-19", "20-24", "25-29", "30-34", "35-39", "40-44") ~ "15-44",
age %in% c("45-49", "50-54", "55-59", "60-64") ~ "45-64",
age %in% c("65-69", "70-74") ~ "65-74",
age %in% c("75-79", "80-84") ~ "75-84",
TRUE ~ "85+"
)) %>%
group_by(date, week, year, sex, age) %>%
summarise(deaths=sum(deaths)) %>%
ungroup()
#By region
data2021.reg.EW <- read_excel(temp, sheet="Weekly figures 2021",
range=paste0("B83:", EngRange, "92"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2021-01-08")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(1))) %>%
select(-index)
#2020
temp <- tempfile()
temp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data2020.as.EW <- read_excel(temp, sheet="Weekly figures 2020",
range="B44:BC85", col_names=FALSE) %>%
slice(-c(21,22)) %>%
mutate(sex=rep(c("Male", "Female"), each=20)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2020-01-03")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(1))) %>%
select(-index) %>%
mutate(age=case_when(
age=="<1" ~ "Under 1 year",
age %in% c("1-4", "5-9", "10-14") ~ "01-14",
age %in% c("15-19", "20-24", "25-29", "30-34", "35-39", "40-44") ~ "15-44",
age %in% c("45-49", "50-54", "55-59", "60-64") ~ "45-64",
age %in% c("65-69", "70-74") ~ "65-74",
age %in% c("75-79", "80-84") ~ "75-84",
TRUE ~ "85+"
)) %>%
group_by(date, week, year, sex, age) %>%
summarise(deaths=sum(deaths)) %>%
ungroup()
#By region
data2020.reg.EW <- read_excel(temp, sheet="Weekly figures 2020",
range="B87:BC96", col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2020-01-03")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(1))) %>%
select(-index)
#2019
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2019/publishedweek522019.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data19.as.EW <- read_excel(temp, sheet="Weekly figures 2019",
range="B25:BB40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2019-01-04")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data19.reg.EW <- read_excel(temp, sheet="Weekly figures 2019",
range=paste0("B43:", EngRange, "52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2019-01-04")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2019
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2019/publishedweek522019.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data19.as.EW <- read_excel(temp, sheet="Weekly figures 2019",
range="B25:BB40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2019-01-04")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data19.reg.EW <- read_excel(temp, sheet="Weekly figures 2019",
range=paste0("B43:BB52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2019-01-04")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2018 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2018/publishedweek522018withupdatedrespiratoryrow.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data18.as.EW <- read_excel(temp, sheet="Weekly figures 2018",
range="B25:BB40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2018-01-05")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data18.reg.EW <- read_excel(temp, sheet="Weekly figures 2018",
range=paste0("B43:BB52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2018-01-05")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2017 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2017/publishedweek522017.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data17.as.EW <- read_excel(temp, sheet="Weekly figures 2017",
range="B25:BB40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2017-01-06")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data17.reg.EW <- read_excel(temp, sheet="Weekly figures 2017",
range=paste0("B43:BB52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2017-01-06")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2016 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2016/publishedweek522016.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data16.as.EW <- read_excel(temp, sheet="Weekly figures 2016",
range="B25:BB40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2016-01-08")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data16.reg.EW <- read_excel(temp, sheet="Weekly figures 2016",
range=paste0("B43:BB52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2016-01-08")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2015 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2015/publishedweek2015.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data15.as.EW <- read_excel(temp, sheet="Weekly Figures 2015",
range="A25:BB40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2015-01-02")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(1))) %>%
select(-index)
#By region
data15.reg.EW <- read_excel(temp, sheet="Weekly Figures 2015",
range=paste0("A43:BB52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2015-01-02")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(1))) %>%
select(-index)
#2014 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2014/publishedweek2014.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data14.as.EW <- read_excel(temp, sheet="Weekly Figures 2014",
range="A25:BA40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2014-01-03")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data14.reg.EW <- read_excel(temp, sheet="Weekly Figures 2014",
range=paste0("A43:BA52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2014-01-03")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2013 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2013/publishedweek2013.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data13.as.EW <- read_excel(temp, sheet="Weekly Figures 2013",
range="A25:BA40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2013-01-04")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data13.reg.EW <- read_excel(temp, sheet="Weekly Figures 2013",
range=paste0("A43:BA52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2013-01-04")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2012 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2012/publishedweek2012.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data12.as.EW <- read_excel(temp, sheet="Weekly Figures 2012",
range="A25:BA40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2012-01-06")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data12.reg.EW <- read_excel(temp, sheet="Weekly Figures 2012",
range=paste0("A43:BA52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2012-01-06")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2011 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2011/publishedweek2011.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data11.as.EW <- read_excel(temp, sheet="Weekly Figures 2011",
range="A26:BA41", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2011-01-07")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data11.reg.EW <- read_excel(temp, sheet="Weekly Figures 2011",
range=paste0("A44:BA53"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2011-01-07")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#2010 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2010/publishedweek2010.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#By age & sex
data10.as.EW <- read_excel(temp, sheet="Weekly Figures 2010",
range="A25:BA40", col_names=FALSE) %>%
slice(-c(8,9)) %>%
mutate(sex=rep(c("Male", "Female"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2010-01-08")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#By region
data10.reg.EW <- read_excel(temp, sheet="Weekly Figures 2010",
range=paste0("A43:BA52"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(region=`...1`) %>%
mutate(date=as.Date("2010-01-08")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date)) %>%
select(-index)
#Merge together
data.as.EW <- bind_rows(data10.as.EW, data11.as.EW, data12.as.EW, data13.as.EW,
data14.as.EW, data15.as.EW, data16.as.EW, data17.as.EW,
data18.as.EW, data19.as.EW, data2020.as.EW, data2021.as.EW) %>%
#Join <1 and 1-14 age bands
mutate(age=case_when(
age %in% c("Under 1 year", "01-14") ~ "Under 15",
TRUE ~ age)) %>%
group_by(age, sex, date, week, year) %>%
summarise(deaths=sum(deaths)) %>%
ungroup()
#Add total rows, by age, sex and overall
agetot <- data.as.EW %>%
group_by(age, date, week, year) %>%
summarise(deaths=sum(deaths)) %>%
mutate(sex="Total") %>%
ungroup()
sextot <- data.as.EW %>%
group_by(sex, date, week, year) %>%
summarise(deaths=sum(deaths)) %>%
mutate(age="Total") %>%
ungroup()
alltot <- data.as.EW %>%
group_by(date, week, year) %>%
summarise(deaths=sum(deaths)) %>%
mutate(age="Total", sex="Total") %>%
ungroup()
data.as.EW <- bind_rows(data.as.EW, agetot, sextot, alltot)
data.reg.EW <- bind_rows(data10.reg.EW, data11.reg.EW, data12.reg.EW, data13.reg.EW,
data14.reg.EW, data15.reg.EW, data16.reg.EW, data17.reg.EW,
data18.reg.EW, data19.reg.EW, data2020.reg.EW, data2021.reg.EW)
rm(data10.as.EW, data11.as.EW, data12.as.EW, data13.as.EW, data14.as.EW, data15.as.EW,
data16.as.EW, data17.as.EW, data18.as.EW, data19.as.EW, data2021.as.EW, data10.reg.EW,
data11.reg.EW, data12.reg.EW, data13.reg.EW, data14.reg.EW, data15.reg.EW,
data16.reg.EW, data17.reg.EW, data18.reg.EW, data19.reg.EW, data2021.reg.EW,
agetot, sextot, alltot, data2020.as.EW, data2020.reg.EW)
#Bring in data by location for 20/21 which is *horribly* formatted
temp <- tempfile()
temp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode="wb")
#2020
temp1 <- as.data.frame(t(read_excel(temp, sheet=11, range="B9:B14", col_names=FALSE)))
temp2 <- as.data.frame(t(read_excel(temp, sheet=11, range="H9:H14", col_names=FALSE)))
temp3 <- as.data.frame(t(read_excel(temp, sheet=11, range="N9:N14", col_names=FALSE)))
temp4 <- as.data.frame(t(read_excel(temp, sheet=11, range="T9:T14", col_names=FALSE)))
temp5 <- as.data.frame(t(read_excel(temp, sheet=11, range="Z9:Z14", col_names=FALSE)))
temp6 <- as.data.frame(t(read_excel(temp, sheet=11, range="AF9:AF14", col_names=FALSE)))
temp7 <- as.data.frame(t(read_excel(temp, sheet=11, range="AL9:AL14", col_names=FALSE)))
temp8 <- as.data.frame(t(read_excel(temp, sheet=11, range="AR9:AR14", col_names=FALSE)))
temp9 <- as.data.frame(t(read_excel(temp, sheet=11, range="AX9:AX14", col_names=FALSE)))
temp10 <- as.data.frame(t(read_excel(temp, sheet=11, range="BD9:BD14", col_names=FALSE)))
temp11 <- as.data.frame(t(read_excel(temp, sheet=11, range="BJ9:BJ14", col_names=FALSE)))
temp12 <- as.data.frame(t(read_excel(temp, sheet=11, range="BP9:BP14", col_names=FALSE)))
temp13 <- as.data.frame(t(read_excel(temp, sheet=11, range="BV9:BV14", col_names=FALSE)))
temp14 <- as.data.frame(t(read_excel(temp, sheet=11, range="CB9:CB14", col_names=FALSE)))
temp15 <- as.data.frame(t(read_excel(temp, sheet=11, range="CH9:CH14", col_names=FALSE)))
temp16 <- as.data.frame(t(read_excel(temp, sheet=11, range="CN9:CN14", col_names=FALSE)))
temp17 <- as.data.frame(t(read_excel(temp, sheet=11, range="CT9:CT14", col_names=FALSE)))
temp18 <- as.data.frame(t(read_excel(temp, sheet=11, range="CZ9:CZ14", col_names=FALSE)))
temp19 <- as.data.frame(t(read_excel(temp, sheet=11, range="DF9:DF14", col_names=FALSE)))
temp20 <- as.data.frame(t(read_excel(temp, sheet=11, range="DL9:DL14", col_names=FALSE)))
temp21 <- as.data.frame(t(read_excel(temp, sheet=11, range="DR9:DR14", col_names=FALSE)))
temp22 <- as.data.frame(t(read_excel(temp, sheet=11, range="DX9:DX14", col_names=FALSE)))
temp23 <- as.data.frame(t(read_excel(temp, sheet=11, range="ED9:ED14", col_names=FALSE)))
temp24 <- as.data.frame(t(read_excel(temp, sheet=11, range="EJ9:EJ14", col_names=FALSE)))
temp25 <- as.data.frame(t(read_excel(temp, sheet=11, range="EP9:EP14", col_names=FALSE)))
temp26 <- as.data.frame(t(read_excel(temp, sheet=11, range="EV9:EV14", col_names=FALSE)))
temp27 <- as.data.frame(t(read_excel(temp, sheet=11, range="FB9:FB14", col_names=FALSE)))
temp28 <- as.data.frame(t(read_excel(temp, sheet=11, range="FH9:FH14", col_names=FALSE)))
temp29 <- as.data.frame(t(read_excel(temp, sheet=11, range="FN9:FN14", col_names=FALSE)))
temp30 <- as.data.frame(t(read_excel(temp, sheet=11, range="FT9:FT14", col_names=FALSE)))
temp31 <- as.data.frame(t(read_excel(temp, sheet=11, range="FZ9:FZ14", col_names=FALSE)))
temp32 <- as.data.frame(t(read_excel(temp, sheet=11, range="GF9:GF14", col_names=FALSE)))
temp33 <- as.data.frame(t(read_excel(temp, sheet=11, range="GL9:GL14", col_names=FALSE)))
temp34 <- as.data.frame(t(read_excel(temp, sheet=11, range="GR9:GR14", col_names=FALSE)))
temp35 <- as.data.frame(t(read_excel(temp, sheet=11, range="GX9:GX14", col_names=FALSE)))
temp36 <- as.data.frame(t(read_excel(temp, sheet=11, range="HD9:HD14", col_names=FALSE)))
temp37 <- as.data.frame(t(read_excel(temp, sheet=11, range="HJ9:HJ14", col_names=FALSE)))
temp38 <- as.data.frame(t(read_excel(temp, sheet=11, range="HP9:HP14", col_names=FALSE)))
temp39 <- as.data.frame(t(read_excel(temp, sheet=11, range="HV9:HV14", col_names=FALSE)))
temp40 <- as.data.frame(t(read_excel(temp, sheet=11, range="IB9:IB14", col_names=FALSE)))
temp41 <- as.data.frame(t(read_excel(temp, sheet=11, range="IH9:IH14", col_names=FALSE)))
temp42 <- as.data.frame(t(read_excel(temp, sheet=11, range="IN9:IN14", col_names=FALSE)))
temp43 <- as.data.frame(t(read_excel(temp, sheet=11, range="IT9:IT14", col_names=FALSE)))
#2021
temp <- tempfile()
temp <- curl_download(url=Eng2021, destfile=temp, quiet=FALSE, mode="wb")
temp44 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="B10:B15", col_names=FALSE)))
temp45 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="H10:H15", col_names=FALSE)))
temp46 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="N10:N15", col_names=FALSE)))
temp47 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="T10:T15", col_names=FALSE)))
temp48 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="Z10:Z15", col_names=FALSE)))
temp49 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="AF10:AF15", col_names=FALSE)))
temp50 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="AL10:AL15", col_names=FALSE)))
temp51 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="AR10:AR15", col_names=FALSE)))
temp52 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="AX10:AX15", col_names=FALSE)))
temp53 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="BD10:BD15", col_names=FALSE)))
temp54 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="BJ10:BJ15", col_names=FALSE)))
temp55 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="BP10:BP15", col_names=FALSE)))
temp56 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="BV10:BV15", col_names=FALSE)))
temp57 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="CB10:CB15", col_names=FALSE)))
temp58 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="CH10:CH15", col_names=FALSE)))
temp59 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="CN10:CN15", col_names=FALSE)))
temp60 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="CT10:CT15", col_names=FALSE)))
temp61 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="CZ10:CZ15", col_names=FALSE)))
temp62 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="DF10:DF15", col_names=FALSE)))
temp63 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="DL10:DL15", col_names=FALSE)))
temp64 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="DR10:DR15", col_names=FALSE)))
temp65 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="DX10:DX15", col_names=FALSE)))
temp66 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="ED10:ED15", col_names=FALSE)))
temp67 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="EJ10:EJ15", col_names=FALSE)))
temp68 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="EP10:EP15", col_names=FALSE)))
temp69 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="EV10:EV15", col_names=FALSE)))
temp70 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="FB10:FB15", col_names=FALSE)))
temp71 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="FH10:FH15", col_names=FALSE)))
temp72 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="FN10:FN15", col_names=FALSE)))
temp73 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="FT10:FT15", col_names=FALSE)))
temp74 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="FZ10:FZ15", col_names=FALSE)))
temp75 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="GF10:GF15", col_names=FALSE)))
temp76 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="GL10:GL15", col_names=FALSE)))
temp77 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="GR10:GR15", col_names=FALSE)))
temp78 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="GX10:GX15", col_names=FALSE)))
temp79 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="HD10:HD15", col_names=FALSE)))
temp80 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="HJ10:HJ15", col_names=FALSE)))
temp81 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="HP10:HP15", col_names=FALSE)))
temp82 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="HV10:HV15", col_names=FALSE)))
temp83 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="IB10:IB15", col_names=FALSE)))
temp84 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="IH10:IH15", col_names=FALSE)))
temp85 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="IN10:IN15", col_names=FALSE)))
temp86 <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Place of occurrence ", range="IT10:IT15", col_names=FALSE)))
data2021.loc <- bind_rows(temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10,
temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18, temp19,
temp20, temp21, temp22, temp23, temp24, temp25, temp26, temp27, temp28,
temp29, temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37,
temp38, temp39, temp40, temp41, temp42, temp43, temp44, temp45, temp46,
temp47, temp48, temp49, temp50, temp51, temp52, temp53, temp54, temp55,
temp56, temp57, temp58, temp59, temp60, temp60, temp61, temp62, temp63,
temp64, temp65, temp66, temp67, temp68, temp69, temp70, temp71, temp72,
temp73, temp74, temp75, temp76, temp77, temp78, temp79, temp80, temp81,
temp82, temp83, temp84, temp85, temp86) %>%
mutate(week=c(11:(nrow(.)+10)),
year=if_else(week<=53, 2020, 2021),
week=if_else(week>53, week-53, as.double(week)),
"Home/Other"=(V1+V3+V5+V6)) %>%
rename("Care Home"=V4, "Hospital"=V2) %>%
select(-c(V1, V3, V5, V6)) %>%
gather(location, deaths, c(1,2,5))
#Data by location for 2015-19
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/11622fiveyearaverageweeklydeathsbyplaceofdeathenglandandwalesdeathsoccurringbetween2015and2019/fiveyearavgweeklydeaths2015to2019podfinal.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data1519.loc <- read_excel(temp, sheet="Table", range="A4:G56") %>%
mutate(week=as.numeric(substr(...1, 6,7)),
year=1519,
`Home/Other`=Elsewhere+Home+Hospice+`Other communal establishment`) %>%
select(-c(1, 3:5, 7)) %>%
rename(`Care Home`=`Care home`) %>%
gather(location, deaths, c(`Home/Other`, Hospital, `Care Home`))
#Join together
data.loc.EW <- bind_rows(data2021.loc, data1519.loc)
rm(data2021.loc, data1519.loc, temp1, temp2, temp3, temp4, temp5, temp6, temp7,
temp8, temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17,
temp18, temp19, temp20, temp21, temp22, temp23, temp24, temp25, temp26, temp27,
temp28, temp29, temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37,
temp38, temp39, temp40, temp41, temp42, temp43, temp44)
#By cause
#2020
temp <- tempfile()
temp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode="wb")
data2020.cause.EW <- read_excel(temp, sheet=5, range="C9:BC19",
col_names=FALSE) %>%
slice(c(1,3,11)) %>%
gather(week, deaths) %>%
mutate(cause=rep(c("Total2020", "Mean1519", "COVID2020"), times=(nrow(.)/3)),
week=as.numeric(substr(week, 4, 6))) %>%
spread(cause, deaths) %>%
mutate(other=Total2020-COVID2020, otherexcess=other-Mean1519,
netexcess=Total2020-Mean1519)
#2021 (this data is now very unhelpfully spread over multiple sheets)
temp <- tempfile()
temp <- curl_download(url=Eng2021, destfile=temp, quiet=FALSE, mode="wb")
#Grab total deaths
allcause2021.EW <- as.data.frame(t(read_excel(temp, sheet="Weekly figures 2021",
range=paste0("C9:", EngRange, "9"), col_names=FALSE))) %>%
mutate(week=seq(1:nrow(.))) %>%
rename(Total2021=V1)
#Grab COVID-19 deaths
COVID2021.EW <- as.data.frame(t(read_excel(temp, sheet="Covid-19 - Weekly registrations",
range=paste0("C9:", EngRange, "9"), col_names=FALSE))) %>%
mutate(week=seq(1:nrow(.))) %>%
rename(COVID2021=V1)
data2021.cause.EW <- data2020.cause.EW %>%
merge(allcause2021.EW, all.x=TRUE) %>%
merge(COVID2021.EW, all.x=TRUE) %>%
filter(!is.na(Total2021)) %>%
select(week, Mean1519, COVID2021, Total2021) %>%
mutate(other=Total2021-COVID2021, otherexcess=other-Mean1519,
netexcess=Total2021-Mean1519, year=2021) %>%
select(week, year, COVID2021, otherexcess, netexcess)
data.cause.EW <- data2020.cause.EW %>%
mutate(year=2020) %>%
select(week, year, COVID2020, otherexcess, netexcess) %>%
rename(COVID=COVID2020) %>%
bind_rows(data2021.cause.EW %>% rename(COVID=COVID2021))%>%
gather(cause, deaths, c(3:5))
rm(data2020.cause.EW, data2021.cause.EW, allcause2021.EW, COVID2021.EW)
#######################
#Read in Scottish data#
#######################
temp <- tempfile()
temp <- curl_download(url=Scot2021, destfile=temp, quiet=FALSE, mode="wb")
#Dowload 2020/21 data from the latest spreadsheet
#By age and sex
data20.as.S <- read_excel(temp, sheet="Table 2 (2020)",
range="B24:BC38", col_names=FALSE) %>%
slice(-c(8)) %>%
mutate(sex=rep(c("Female", "Male"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2020-01-05")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(4)),
deaths=as.numeric(deaths)) %>%
select(-index)
data21.as.S <- read_excel(temp, sheet="Table 2 (2021)",
range=paste0("B24:", ScotRange, "38"), col_names=FALSE) %>%
slice(-c(8)) %>%
mutate(sex=rep(c("Female", "Male"), each=7)) %>%
gather(index, deaths, c(2:(ncol(.)-1))) %>%
rename(age=`...1`) %>%
mutate(date=as.Date("2021-01-09")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date),
deaths=as.numeric(deaths)) %>%
select(-index)
#By Health Board
data20.HB.S <- read_excel(temp, sheet="Table 2 (2020)",
range="B40:BC53", col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(HB=`...1`) %>%
mutate(date=as.Date("2020-01-05")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(4)),
deaths=as.numeric(deaths)) %>%
select(-index)
data21.HB.S <- read_excel(temp, sheet="Table 2 (2021)",
range=paste0("B40:", ScotRange, "53"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(HB=`...1`) %>%
mutate(date=as.Date("2021-01-09")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date),
deaths=as.numeric(deaths)) %>%
select(-index)
#By place of death
data20.loc.S <- read_excel(temp, sheet="Table 2 (2020)",
range="B90:BC93", col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(loc=`...1`) %>%
mutate(date=as.Date("2020-01-05")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date-days(4)),
deaths=as.numeric(deaths)) %>%
select(-index)
data21.loc.S <- read_excel(temp, sheet="Table 2 (2021)",
range=paste0("B90:", ScotRange, "93"), col_names=FALSE) %>%
gather(index, deaths, c(2:ncol(.))) %>%
rename(loc=`...1`) %>%
mutate(date=as.Date("2021-01-09")+weeks(as.numeric(substr(index, 4,6))-2),
week=as.numeric(substr(index, 4,6))-1,
year=year(date),
deaths=as.numeric(deaths)) %>%
select(-index)
#Download historical data
#By sex and age
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-sex-age-2000-2019.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data10.as.S <- read_excel(temp, sheet="2010", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2010) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data11.as.S <- read_excel(temp, sheet="2011", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2011) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data12.as.S <- read_excel(temp, sheet="2012", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2012) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data13.as.S <- read_excel(temp, sheet="2013", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2013) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data14.as.S <- read_excel(temp, sheet="2014", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2014) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data15.as.S <- read_excel(temp, sheet="2015", range="B5:BD44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2015) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data16.as.S <- read_excel(temp, sheet="2016", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2016) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data17.as.S <- read_excel(temp, sheet="2017", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2017) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data18.as.S <- read_excel(temp, sheet="2018", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2018) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
data19.as.S <- read_excel(temp, sheet="2019", range="B5:BC44", col_names=FALSE) %>%
mutate(sex=rep(c("Female", "Male"), each=20), year=2019) %>%
select(-`...2`) %>%
rename(age=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-2))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2)
#By health board
#Read in 2015-19 health board data (pre-2015 data seemingly not available)
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-HB-and-CA-2015-2019.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data1519.HB.S <- read_excel(temp, sheet=1, range="A5:BC74", col_names=FALSE) %>%
rename(HB=`...1`, year=`...2`) %>%
fill(HB) %>%
gather(week, deaths, c(3:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-2) %>%
filter(!(week==53 & year!=2015))
#By location
#Read in 2015-19 location data (pre-2015 data seemingly not available)
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-location-2015-2019.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data1519.loc.S <- read_excel(temp, range="A4:BB31", col_names=FALSE) %>%
slice(-c(1,7,8,14,15,21,22,28)) %>%
mutate(loc=rep(c("Care Home", "Home / Non-institution", "Hospital", "Other institution"),
each=5)) %>%
rename(year=`...1`) %>%
gather(week, deaths, c(2:(ncol(.)-1))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=as.numeric(year)) %>%
filter(!(week==53 & year!=2015))
#By cause (and location)
temp <- curl_download(url=Scot2021, destfile=temp, quiet=FALSE, mode="wb")
#2015-19 data for all locations
data1519.all.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B7:BC12", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=1519, loc="All")
#2015-19 data for care homes
data1519.ch.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B31:BC36", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=1519, loc="Care Home")
#2015-19 data for home
data1519.home.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B55:BC60", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=1519, loc="Home")
#2015-19 data for hospital
data1519.hosp.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B79:BC84", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=1519, loc="Hospital")
#2015-19 data for other (to be combined with home)
data1519.oth.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B103:BC108", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=1519, loc="Other")
#Stick 15-19 data together
data1519.cause.S <- bind_rows(data1519.ch.cause.S, data1519.home.cause.S, data1519.hosp.cause.S,
data1519.oth.cause.S, data1519.all.cause.S)
#Read in 2020 data
#all locations
data2020.all.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B15:BC20", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2020, loc="All")
#care homes
data2020.ch.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B39:BC44", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2020, loc="Care Home")
#home
data2020.home.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B63:BC68", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2020, loc="Home")
#hospital
data2020.hosp.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B87:BC92", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2020, loc="Hospital")
#other (to be combined with home)
data2020.oth.cause.S <- read_excel(temp, sheet="Table 3 (2020)", range="B111:BC116", col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2020, loc="Other")
#Stick 2020 data together
data2020.cause.S <- bind_rows(data2020.ch.cause.S, data2020.home.cause.S, data2020.hosp.cause.S,
data2020.oth.cause.S, data2020.all.cause.S)
#Read in 2021 data
#all locations
data2021.all.cause.S <- read_excel(temp, sheet="Table 3 (2021)",
range=paste0("B15:", ScotRange, "20"), col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2021, loc="All")
#care homes
data2021.ch.cause.S <- read_excel(temp, sheet="Table 3 (2021)",
range=paste0("B39:", ScotRange, "44"), col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2021, loc="Care Home")
#home
data2021.home.cause.S <- read_excel(temp, sheet="Table 3 (2021)",
range=paste0("B63:", ScotRange, "68"), col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2021, loc="Home")
#hospital
data2021.hosp.cause.S <- read_excel(temp, sheet="Table 3 (2021)",
range=paste0("B87:",ScotRange, "92"), col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2021, loc="Hospital")
#other (to be combined with home)
data2021.oth.cause.S <- read_excel(temp, sheet="Table 3 (2021)",
range=paste0("B111:", ScotRange, "116"), col_names=FALSE) %>%
rename(cause=`...1`) %>%
gather(week, deaths, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4, 6))-1,
year=2021, loc="Other")
#Stick 2020 data together
data2021.cause.S <- bind_rows(data2021.ch.cause.S, data2021.home.cause.S, data2021.hosp.cause.S,
data2021.oth.cause.S, data2021.all.cause.S)
#Combine years
data.cause.S <- bind_rows(data1519.cause.S, data2020.cause.S, data2021.cause.S) %>%
mutate(loc=case_when(
loc %in% c("Home", "Other") ~ "Home/Other",
TRUE ~ loc),
cause=if_else(cause=="Circulatory (heart disease and stroke)", "Circulatory", cause)) %>%
group_by(cause, week, year, loc) %>%
summarise(deaths=sum(deaths)) %>%
ungroup() %>%
spread(year, deaths)
data2021.cause.excess.S <- data.cause.S %>%
filter(!is.na(`2021`)) %>%
mutate(excess=`2021`-`1519`, year=2021) %>%
select(cause, loc, week, year, excess)
data.cause.S <- data.cause.S %>%
mutate(excess=`2020`-`1519`, year=2020) %>%
select(cause, loc, week, year, excess) %>%
bind_rows(data2021.cause.excess.S)
#Merge together
data.as.S <- bind_rows(data10.as.S, data11.as.S, data12.as.S, data13.as.S,
data14.as.S, data15.as.S, data16.as.S, data17.as.S,
data18.as.S, data19.as.S) %>%
#Compress age bands to match 2020 data
mutate(age=case_when(
age %in% c("0", "1-4", "5-9", "10-14") ~ "Under 15",
age %in% c("15-19", "20-24", "25-29", "30-34", "35-39", "40-44") ~ "15-44",
age %in% c("45-49", "50-54", "55-59", "60-64") ~ "45-64",
age %in% c("65-69", "70-74") ~ "65-74",
age %in% c("75-79", "80-84") ~ "75-84",
TRUE ~ "85+")) %>%
group_by(age, sex, year, week) %>%
summarise(deaths=sum(deaths)) %>%
ungroup()
data.as.S <- bind_rows(data20.as.S, data21.as.S) %>%
mutate(age=case_when(
age %in% c("Under 1 year", "01-14") ~ "Under 15",
TRUE ~ age)) %>%
group_by(age, sex, year, week, date) %>%
summarise(deaths=sum(deaths)) %>%
ungroup() %>%
bind_rows(data.as.S)
#Add total rows, by age, sex and overall
agetot.S <- data.as.S %>%
group_by(age, date, week, year) %>%
summarise(deaths=sum(deaths)) %>%
mutate(sex="Total") %>%
ungroup()
sextot.S <- data.as.S %>%
group_by(sex, date, week, year) %>%
summarise(deaths=sum(deaths)) %>%
mutate(age="Total") %>%
ungroup()
alltot.S <- data.as.S %>%
group_by(date, week, year) %>%
summarise(deaths=sum(deaths)) %>%
mutate(age="Total", sex="Total") %>%
ungroup()
data.as.S <- bind_rows(data.as.S, agetot.S, sextot.S, alltot.S)
data.HB.S <- bind_rows(data1519.HB.S, data20.HB.S, data21.HB.S)
data.loc.S <- bind_rows(data1519.loc.S, data20.loc.S, data21.loc.S)
rm(data10.as.S, data11.as.S, data12.as.S, data13.as.S, data14.as.S, data15.as.S,
data16.as.S, data17.as.S, data18.as.S, data19.as.S, data20.as.S, data21.as.S,
data1519.HB.S, data20.HB.S, data21.HB.S, data1519.loc.S,
data20.loc.S, data21.loc.S, agetot.S, sextot.S, alltot.S, data1519.all.cause.S,
data1519.cause.S, data1519.ch.cause.S, data1519.home.cause.S, data1519.hosp.cause.S,
data1519.oth.cause.S, data2020.cause.S, data2020.all.cause.S, data2020.ch.cause.S,
data2020.home.cause.S, data2020.hosp.cause.S, data2020.oth.cause.S, data2021.cause.excess.S,
data2021.cause.S, data2021.all.cause.S, data2021.ch.cause.S, data2021.home.cause.S,
data2021.hosp.cause.S, data2021.oth.cause.S)
#############################
#Read in Northern Irish data#
#############################
#No data is (easily) available for Northern Ireland on historic deaths by age or place of death
temp <- tempfile()
temp <- curl_download(url=NI2021, destfile=temp, quiet=FALSE, mode="wb")
#Download 2021 data from the latest spreadsheet
data2021.NI <- read_excel(temp, sheet="Table 1", range=paste0("B5:C", NIRange), col_names=FALSE) %>%
mutate(week=c(54:(nrow(.)+53)), year=2021)
colnames(data2021.NI) <- c("date", "deaths", "week", "year")
data2021.cause.NI <- read_excel(temp, sheet="Table 10", range=paste0("A57:C", as.numeric(NIRange)+52),
col_names=FALSE) %>%
rename(week=`...1`, date=`...2`, COVID=`...3`) %>%
mutate(COVID=as.numeric(gsub("-", "0", COVID)),
week=week+53, year=2021)
#Read in 2020 data
temp <- tempfile()
source <- "https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly_Deaths%20-%20w%20e%201st%20January%202021.XLSX"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data2020.NI <- read_excel(temp, sheet="Table 1", range="B6:C57", col_names=FALSE) %>%
mutate(week=2:53, year=2020)
colnames(data2020.NI) <- c("date", "deaths", "week", "year")
data2020.cause.NI <- read_excel(temp, sheet="Table 10", range="A5:C56",
col_names=FALSE) %>%
rename(week=`...1`, date=`...2`, COVID=`...3`) %>%
mutate(COVID=as.numeric(gsub("-", "0", COVID)),
year=2020, week=week+1) %>%
bind_rows(data2021.cause.NI) %>%
bind_rows(data.frame(week=1, date=as.Date("2020-01-03"), COVID=0, year=2020))
#Read in historical data
temp <- tempfile()
source <- "https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly%20Deaths%20by%20Age%20and%20Respiratory%20Deaths%2C%202011-2019.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data2019.NI <- read_excel(temp, sheet="Weekly Deaths_2019", range="C5:D56", col_names=FALSE)
data2018.NI <- read_excel(temp, sheet="Weekly Deaths_2018", range="C5:D56", col_names=FALSE)
data2017.NI <- read_excel(temp, sheet="Weekly Deaths_2017", range="C5:D57", col_names=FALSE)
data2016.NI <- read_excel(temp, sheet="Weekly Deaths_2016", range="C5:D56", col_names=FALSE)
data2015.NI <- read_excel(temp, sheet="Weekly Deaths_2015", range="C5:D57", col_names=FALSE)
data2014.NI <- read_excel(temp, sheet="Weekly Deaths_2014", range="C5:D56", col_names=FALSE)
data2013.NI <- read_excel(temp, sheet="Weekly Deaths_2013", range="C5:D56", col_names=FALSE)
data2012.NI <- read_excel(temp, sheet="Weekly Deaths_2012", range="C5:D56", col_names=FALSE)
data2011.NI <- read_excel(temp, sheet="Weekly Deaths_2011", range="C5:D56", col_names=FALSE)
data.NI <- bind_rows(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI,
data2016.NI, data2017.NI, data2018.NI, data2019.NI) %>%
rename(date=`...1`, deaths=`...2`) %>%
mutate(week=week(date-days(1)), year=year(date-days(1))) %>%
bind_rows(data2020.NI, data2021.NI) %>%
arrange(date)
#Create cause dataset
data.cause.NI <- data.NI %>%
filter(year<2020) %>%
group_by(week) %>%
summarise(mean1119=mean(deaths))
data.cause.NI <- data.cause.NI %>%
filter(week<=max(data.NI$week)-53) %>%
mutate(week=week+53) %>%
bind_rows(data.cause.NI) %>%
merge(data.NI %>% filter(year>=2020), all.y=TRUE) %>%
merge(data2020.cause.NI, all.x=TRUE) %>%
mutate(other=deaths-COVID, otherexcess=other-mean1119,
netexcess=deaths-mean1119) %>%
select(week, year, COVID, otherexcess, netexcess)
rm(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI, data2016.NI,
data2017.NI, data2018.NI, data2019.NI, data2021.NI, data2021.cause.NI)
#Generate overall regional data for UK
data.reg.UK <- data.as.S %>%
filter(age=="Total" & sex=="Total") %>%
select(-c(age, sex)) %>%
mutate(region="Scotland") %>%
bind_rows(data.reg.EW, data.NI %>% mutate(region="Northern Ireland"))
#Save data
#data by age and sex
write.csv(data.as.EW, "Data/deaths_age_sex_EW.csv")
write.csv(data.as.S, "Data/deaths_age_sex_S.csv")
#data by region/Health Board
write.csv(data.reg.UK, "Data/deaths_reg_UK.csv")
write.csv(data.HB.S, "Data/deaths_HB_S.csv")
#data by location
write.csv(data.loc.EW, "Data/deaths_loc_EW.csv")
write.csv(data.loc.S, "Data/deaths_loc_S.csv")
#data by cause
write.csv(data.cause.EW, "Data/deaths_cause_EW.csv")
write.csv(data.cause.S, "Data/deaths_cause_S.csv")
write.csv(data.cause.NI, "Data/deaths_cause_NI.csv")
#Overall NI data
write.csv(data.NI, "Data/deaths_NI.csv")
###############################################################################################
###################
#Plots for England#
###################
#Overall plot
plot1 <- data.as.EW %>%
filter(age=="Total" & sex=="Total") %>%
select(-c(age, sex)) %>%
mutate(week=if_else(year==2021,week+53, week))
plot1.old <- plot1 %>%
filter(year<2020) %>%
group_by(week) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
Eng2021MaxWeek <- max((plot1 %>% filter(year==2021))$week)
#Add extra weeks to old data
plot1.old <- plot1.old %>%
filter(week<=Eng2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot1.old)
plot1 <- plot1 %>%
filter(year>=2020) %>%
merge(plot1.old, by="week") %>%
mutate(excess=deaths-mean)
#Calculate excess deaths vs. mean in 2020/21
EW.excess <- plot1 %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract y=axis placement for excess deaths figure
labpos <- 16000
agg_tiff("Outputs/ONSWeeklyDeaths.tiff", units="in", width=10, height=7, res=500)
ggplot(plot1)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", breaks=c(as.Date("2020-01-01"), as.Date("2020-04-01"), as.Date("2020-07-01"),
as.Date("2020-10-01"), as.Date("2021-01-01"), as.Date("2021-04-01"),
as.Date("2021-07-01")),
labels=c("Jan 2020", "Apr 2020", "Jul 2020", "Oct 2020", "Jan 2021", "Apr 2021",
"Jul 2021"))+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="England and Wales has seen excess mortality for the last 17 weeks",
subtitle=paste0("Weekly deaths registered in England & Wales in 2020/21 compared to the range in 2010-19. Data up to ", EWDate, " 2021."),
caption="Data from ONS | Plot by @VictimOfMaths")+
annotate(geom="text", x=as.Date("2020-06-01"), y=labpos,
label=paste0(round(EW.excess$excess, 0)," more deaths in 2020/21\nthan average (+",
round(EW.excess$percexcess*100, 0),"%)"), colour="Red", hjust=0,
family="Lato")+
annotate(geom="text", x=as.Date("2020-02-12"), y=16000, label="Historic maximum",
colour="Skyblue4", family="Lato", size=rel(3))+
annotate(geom="text", x=as.Date("2020-02-10"), y=9100, label="Historic minimum",
colour="Skyblue4", family="Lato", size=rel(3))+
annotate(geom="text", x=as.Date("2020-04-15"), y=7500, label="Historic mean", colour="grey30",
family="Lato", size=rel(3))+
geom_curve(aes(x=as.Date("2020-04-20"), y=7700, xend=as.Date("2020-04-30"), yend=9700),
colour="grey30", curvature=0.15, arrow=arrow(length=unit(0.1, "cm"), type="closed"),
lineend="round")
dev.off()
#Plot by sex
plot2 <- data.as.EW %>%
filter(age=="Total" & sex!="Total") %>%
select(-age) %>%
mutate(week=if_else(year==2021,week+53, week))
plot2.old <- plot2 %>%
filter(year<2020) %>%
group_by(week, sex) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
#Add extra weeks to old data
plot2.old <- plot2.old %>%
filter(week<=Eng2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot2.old)
plot2 <- plot2 %>%
filter(year>=2020) %>%
merge(plot2.old, by=c("sex", "week")) %>%
mutate(excess=deaths-mean,
sex=factor(sex, levels=c("Male", "Female")))
#Calculate excess deaths vs. mean in 2020/21
EW.excess.sex <- plot2 %>%
group_by(sex) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>%
ungroup()
ann_text2 <- data.frame(date=rep(as.Date("2020-05-20"), times=2), deaths=c(7500,7000),
sex=factor(c("Male", "Female"), levels=c("Male", "Female")))
agg_tiff("Outputs/ONSWeeklyDeathsxSex.tiff", units="in", width=12, height=8, res=500)
ggplot(plot2)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", breaks=c(as.Date("2020-01-01"), as.Date("2020-04-01"), as.Date("2020-07-01"),
as.Date("2020-10-01"), as.Date("2021-01-01"), as.Date("2021-04-01"),
as.Date("2021-07-01")),
labels=c("Jan 2020", "Apr 2020", "Jul 2020", "Oct 2020", "Jan 2021", "Apr 2021",
"Jul 2021"))+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~sex)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Both male and female deaths are above average",
subtitle=paste0("Weekly deaths registered in England & Wales in 2020/21 compared to the range in 2010-19. Data up to ", EWDate, " 2021."),
caption="Data from ONS | Plot by @VictimOfMaths")+
geom_text(data=ann_text2, aes(x=date, y=deaths), label=c(paste0("+", round(EW.excess.sex[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (+",
round(EW.excess.sex[1,4]*100, 0),"%)"),
paste0("+", round(EW.excess.sex[2,2],0)," deaths (+",
round(EW.excess.sex[2,4]*100, 0),"%)")),
size=rel(3), colour=c("Red", "Red"), hjust=0, family="Lato")
dev.off()
#Plot by age
plot3 <- data.as.EW %>%
filter(age!="Total" & sex=="Total") %>%
select(-sex) %>%
mutate(week=if_else(year==2021,week+53, week))
plot3.old <- plot3 %>%
filter(year<2020) %>%
group_by(week, age) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
#Add extra weeks to old data
plot3.old <- plot3.old %>%
filter(week<=Eng2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot3.old)
plot3 <- plot3 %>%
filter(year>=2020) %>%
merge(plot3.old, by=c("age", "week")) %>%
mutate(excess=deaths-mean,
age=factor(age, levels=c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+")))
#Calculate excess deaths vs. mean in 2020/21
EW.excess.age <- plot3 %>%
group_by(age) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>%
ungroup()
ann_text3 <- data.frame(date=rep(as.Date("2020-06-01"), times=6),
deaths=c(1300, 1400, 2300, 3500, 5700, 7800),
age=factor(c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+"),
levels=c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+")))
agg_tiff("Outputs/ONSWeeklyDeathsxAge.tiff", units="in", width=12, height=8, res=500)
ggplot(plot3)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~age)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Age groups over 75 have seen the highest numbers of excess deaths",
subtitle=paste0("Weekly deaths registered in England & Wales in 2020/21 compared to the range in 2010-19. Data up to ", EWDate, " 2021."),
caption="Data from ONS | Plot by @VictimOfMaths")+
geom_text(data=ann_text3, aes(x=date, y=deaths), label=c(paste0(round(EW.excess.age[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (",
round(EW.excess.age[1,4]*100, 1),"%)"),
paste0("+", round(EW.excess.age[2,2],0)," deaths (+",
round(EW.excess.age[2,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[3,2],0)," deaths (+",
round(EW.excess.age[3,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[4,2],0)," deaths (+",
round(EW.excess.age[4,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[5,2],0)," deaths (+",
round(EW.excess.age[5,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[6,2],0)," deaths (+",
round(EW.excess.age[6,4]*100, 0),"%)")),
size=3, colour=rep("red", times=6), hjust=0, family="Lato")
dev.off()
ann_text3 <- data.frame(date=rep(as.Date("2020-06-01"), times=6),
deaths=c(120, 400, 2000, 3000, 5000, 7000),
age=factor(c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+"),
levels=c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+")))
agg_tiff("Outputs/ONSWeeklyDeathsxAgev2.tiff", units="in", width=12, height=8, res=500)
ggplot(plot3)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="45-64 year olds have seen the biggest relative increase in mortality",
subtitle=paste0("Weekly deaths registered in England & Wales in 2020/21 compared to the range in 2010-19. Data up to ", EWDate, " 2021."),
caption="Data from ONS | Plot by @VictimOfMaths")+
geom_text(data=ann_text3, aes(x=date, y=deaths), label=c(paste0(round(EW.excess.age[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (",
round(EW.excess.age[1,4]*100, 1),"%)"),
paste0("+", round(EW.excess.age[2,2],0)," deaths (+",
round(EW.excess.age[2,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[3,2],0)," deaths (+",
round(EW.excess.age[3,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[4,2],0)," deaths (+",
round(EW.excess.age[4,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[5,2],0)," deaths (+",
round(EW.excess.age[5,4]*100, 0),"%)"),
paste0("+", round(EW.excess.age[6,2],0)," deaths (+",
round(EW.excess.age[6,4]*100, 0),"%)")),
size=3, colour=rep("red", times=6), hjust=0, family="Lato")
dev.off()
#Youngest age band only
agg_tiff("Outputs/ONSWeeklyDeathsxAgeu15.tiff", units="in", width=12, height=8, res=500)
ggplot(plot3 %>% filter(age=="Under 15"))+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="All cause deaths in under 15s have been consistently below average",
subtitle=paste0("Weekly deaths registered in England & Wales in 2020/21 compared to the range in 2010-19. Data up to ", EWDate, " 2021."),
caption="Data from ONS | Plot by @VictimOfMaths")+
annotate(geom="text", x=as.Date("2020-06-01"), y=30,
label=paste0(-1*round(EW.excess.age[1,2],0)," fewer deaths in 2020/21\nvs. 2010-19 average (",
round(EW.excess.age[1,4]*100, 1),"%)"), colour="Red", hjust=0,
family="Lato")+
annotate(geom="text", x=as.Date("2020-02-12"), y=110, label="Historic maximum",
colour="Skyblue4", family="Lato", size=rel(3))+
annotate(geom="text", x=as.Date("2020-02-10"), y=35, label="Historic minimum",
colour="Skyblue4", family="Lato", size=rel(3))+
annotate(geom="text", x=as.Date("2020-04-15"), y=85, label="Historic mean", colour="grey30",
family="Lato", size=rel(3))+
geom_curve(aes(x=as.Date("2020-04-20"), y=83, xend=as.Date("2020-04-30"), yend=75),
colour="grey30", curvature=0.15, arrow=arrow(length=unit(0.1, "cm"), type="closed"),
lineend="round")
dev.off()
#Excess deaths by age stacked
agg_tiff("Outputs/ONSWeeklyDeathsxAgeBars.tiff", units="in", width=9, height=6, res=500)
ggplot(plot3)+
geom_col(aes(x=date, y=excess, fill=age))+
scale_x_date(name="")+
scale_y_continuous(name="Excess deaths vs. 2010-19 average")+
scale_fill_paletteer_d(name="Age", "awtools::a_palette")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)),
text=element_text(family="Lato"))+
labs(title="Excess mortality in England & Wales by age",
subtitle=paste0("Weekly deaths registered in England & Wales by age compared to the 2010-19 average.\nData up to ", EWDate, " 2021."),
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Plot by location
plot4 <- data.loc.EW %>%
mutate(week=if_else(year==2021,week+53, week),
location=factor(location, levels=c("Hospital", "Care Home", "Home/Other")))
#Add extra weeks to old data
plot4 <- plot4 %>%
filter(week<=Eng2021MaxWeek-53 & year==1519) %>%
mutate(week=week+53) %>%
bind_rows(plot4) %>%
mutate(date=as.Date("2020-01-03")+weeks(week-1))
#agg_png("Outputs/ConversationPlot3.png", units="in", width=9, height=6, res=800)
#ggplot()+
# geom_line(data=subset(plot4, year==1519 & week<53), aes(x=date, y=deaths), colour="Skyblue2")+
# geom_line(data=subset(plot4, year==1519 & week>53), aes(x=date, y=deaths), colour="Skyblue2")+
# geom_line(data=subset(plot4, year>1519), aes(x=date, y=deaths), colour="Red")+
# scale_x_date(name="", date_labels="%b-%y")+
# scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
# facet_wrap(~location)+
# theme_classic()+
# theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
# strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
# text=element_text(family="Lato"))+
# labs(title="Deaths have shifted from hospitals to private homes",
# subtitle=paste0("Weekly deaths in England & Wales in 2020/21 compared to the range in 2015-19. Data up to ", EWDate, " 2021.
Historic data for week 53 is not available"),
# caption="Data from ONS | Plot and analysis by Colin Angus")
#
#dev.off()
agg_tiff("Outputs/ONSWeeklyDeathsxLocation.tiff", units="in", width=9, height=6, res=500)
ggplot()+
geom_line(data=subset(plot4, year==1519 & week<53), aes(x=date, y=deaths), colour="Skyblue2")+
geom_line(data=subset(plot4, year==1519 & week>53), aes(x=date, y=deaths), colour="Skyblue2")+
geom_line(data=subset(plot4, year>1519), aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~location)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Deaths in all settings are above 'normal' levels",
subtitle=paste0("Weekly deaths in England & Wales in 2020/21 compared to the range in 2010-19. Data up to ", EWDate, " 2021.
Historic data for week 53 is not available"),
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Plot by cause
plot5 <- data.cause.EW %>%
mutate(week=if_else(year==2021,week+53, week),
date=as.Date("2020-01-03")+weeks(week-1))
agg_tiff("Outputs/ONSExcessxCause.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_col(data=subset(plot5, cause!="netexcess"), aes(x=date, y=deaths, fill=cause))+
geom_hline(yintercept=0, colour="Grey30")+
geom_line(data=subset(plot5, cause=="netexcess"), aes(x=date, y=deaths, colour=cause))+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Excess deaths vs. 2015-19 mean")+
scale_fill_paletteer_d("LaCroixColoR::PinaFraise", name="Cause", labels=c("COVID-19", "Other causes"))+
scale_colour_manual(values="NavyBlue", name="", labels="Net excess deaths")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"))+
labs(title="Around half of recent excess deaths involved COVID",
subtitle="Excess deaths vs. 2015-19 average by cause for England & Wales",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
####################
#Plots for Scotland#
####################
#Overall plot
plot6 <- data.as.S %>%
filter(age=="Total" & sex=="Total") %>%
select(-c(age, sex)) %>%
mutate(week=if_else(year==2021,week+53, week))
plot6.old <- plot6 %>%
filter(year<2020) %>%
group_by(week) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
Scot2021MaxWeek <- max((plot6 %>% filter(year==2021))$week)
#Add extra weeks to old data
plot6.old <- plot6.old %>%
filter(week<=Scot2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot6.old)
plot6 <- plot6 %>%
filter(year>=2020) %>%
merge(plot6.old, by="week") %>%
mutate(excess=deaths-mean)
#Calculate excess deaths vs. mean in 2020/21
S.excess <- plot6 %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract y=axis placement for excess deaths figure
labpos <- 1600
agg_tiff("Outputs/NRSWeeklyDeaths.tiff", units="in", width=10, height=8, res=500)
ggplot(plot6)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="Scotland continues to see excess mortality",
subtitle=paste0("Weekly deaths in Scotland in 2020/21 compared to the range in 2010-19. Data up to ", ScotDate, " 2021."),
caption="Data from NRS | Plot by @VictimOfMaths")+
annotate(geom="text", x=as.Date("2020-06-01"), y=labpos,
label=paste0(round(S.excess$excess, 0)," more deaths in 2020/21\nthan average (+",
round(S.excess$percexcess*100, 0),"%)"), colour="Red", hjust=0,
family="Lato")+
annotate(geom="text", x=as.Date("2020-02-25"), y=1800, label="Historic maximum",
colour="Skyblue4", family="Lato")+
annotate(geom="text", x=as.Date("2020-02-11"), y=980, label="Historic minimum",
colour="Skyblue4", family="Lato")+
annotate(geom="text", x=as.Date("2020-04-15"), y=750, label="Historic mean", colour="grey30",
family="Lato")+
geom_curve(aes(x=as.Date("2020-04-20"), y=770, xend=as.Date("2020-04-30"), yend=1060),
colour="grey30", curvature=0.15, arrow=arrow(length=unit(0.1, "cm"), type="closed"),
lineend="round")
dev.off()
#Plot by sex
plot7 <- data.as.S %>%
filter(age=="Total" & sex!="Total") %>%
select(-age) %>%
mutate(week=if_else(year==2021,week+53, week))
plot7.old <- plot7 %>%
filter(year<2020) %>%
group_by(week, sex) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
#Add extra weeks to old data
plot7.old <- plot7.old %>%
filter(week<=Scot2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot7.old)
plot7 <- plot7 %>%
filter(year>=2020) %>%
merge(plot7.old, by=c("sex", "week")) %>%
mutate(excess=deaths-mean,
sex=factor(sex, levels=c("Male", "Female")))
#Calculate excess deaths vs. mean in 2020/21
S.excess.sex <- plot7 %>%
group_by(sex) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>%
ungroup()
ann_text7 <- data.frame(date=rep(as.Date("2020-05-20"), times=2), deaths=c(850,700),
sex=factor(c("Male", "Female"), levels=c("Male", "Female")))
agg_tiff("Outputs/NRSWeeklyDeathsxSex.tiff", units="in", width=10, height=7, res=500)
ggplot(plot7)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~sex)+
theme_classic()+
theme(plot.title=element_markdown(face="bold", size=rel(1.4)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Excess deaths are markedly higher in men",
subtitle=paste0("Weekly deaths in Scotland in 2020/21 compared to the range in 2010-19. Data up to ", ScotDate, " 2021."),
caption="Data from NRS | Plot by @VictimOfMaths")+
geom_text(data=ann_text7, aes(x=date, y=deaths), label=c(paste0("+", round(S.excess.sex[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (+",
round(S.excess.sex[1,4]*100, 0),"%)"),
paste0("+", round(S.excess.sex[2,2],0)," deaths (+",
round(S.excess.sex[2,4]*100, 0),"%)")),
size=3, colour=c("Red", "Red"), hjust=0, family="Lato")
dev.off()
#Plot by age
plot8 <- data.as.S %>%
filter(age!="Total" & sex=="Total") %>%
select(-sex) %>%
mutate(week=if_else(year==2021,week+53, week))
plot8.old <- plot8 %>%
filter(year<2020) %>%
group_by(week, age) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
#Add extra weeks to old data
plot8.old <- plot8.old %>%
filter(week<=Scot2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot8.old)
plot8 <- plot8 %>%
filter(year>=2020) %>%
merge(plot8.old, by=c("age", "week")) %>%
mutate(excess=deaths-mean,
age=factor(age, levels=c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+")))
#Calculate excess deaths vs. mean in 2020/21
S.excess.age <- plot8 %>%
group_by(age) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>%
ungroup()
ann_text8 <- data.frame(date=rep(as.Date("2020-06-01"), times=6),
deaths=c(100, 150, 270, 350, 500, 600),
age=factor(c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+"),
levels=c("Under 15", "15-44", "45-64", "65-74", "75-84", "85+")))
agg_tiff("Outputs/NRSWeeklyDeathsxAge.tiff", units="in", width=12, height=8, res=500)
ggplot(plot8)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~age)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="All age groups over 45 have seen excess mortality in recent weeks",
subtitle=paste0("Weekly deaths in Scotland in 2020/21 compared to the range in 2010-19. Data up to ", ScotDate, " 2021."),
caption="Data from NRS | Plot by @VictimOfMaths")+
geom_text(data=ann_text8, aes(x=date, y=deaths), label=c(paste0(round(S.excess.age[1,2],0)," excess deaths in 2020\nvs. 2010-19 average (",
round(S.excess.age[1,4]*100, 1),"%)"),
paste0("+", round(S.excess.age[2,2],0)," deaths (+",
round(S.excess.age[2,4]*100, 0),"%)"),
paste0("+", round(S.excess.age[3,2],0)," deaths (+",
round(S.excess.age[3,4]*100, 0),"%)"),
paste0("+", round(S.excess.age[4,2],0)," deaths (+",
round(S.excess.age[4,4]*100, 0),"%)"),
paste0("+", round(S.excess.age[5,2],0)," deaths (+",
round(S.excess.age[5,4]*100, 0),"%)"),
paste0("+", round(S.excess.age[6,2],0)," deaths (+",
round(S.excess.age[6,4]*100, 0),"%)")),
size=3, colour=rep("red", times=6), hjust=0, family="Lato")
dev.off()
#Plot by location
plot9 <- data.loc.S %>%
mutate(week=if_else(year==2021,week+53, week),
loc=case_when(
loc=="Hospital" ~ "Hospital",
loc=="Care Home" ~ "Care Home",
TRUE ~ "Home/Other"
)) %>%
group_by(year, loc, week, date) %>%
summarise(deaths=sum(deaths)) %>%
ungroup()
plot9.old <- plot9 %>%
filter(year<2020) %>%
group_by(week, loc) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
#Add extra weeks to old data
plot9.old <- plot9.old %>%
filter(week<=Scot2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot9.old)
plot9 <- plot9 %>%
filter(year>=2020) %>%
merge(plot9.old, by=c("loc", "week")) %>%
mutate(excess=deaths-mean,
loc=factor(loc, levels=c("Hospital", "Care Home", "Home/Other")))
#Calculate excess deaths vs. mean in 2020/21
S.excess.loc <- plot9 %>%
group_by(loc) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>%
ungroup()
ann_text9 <- data.frame(date=rep(as.Date("2020-05-10"), times=3), deaths=c(750,600, 500),
loc=factor(c("Hospital", "Care Home", "Home/Other"),
levels=c("Hospital", "Care Home", "Home/Other")))
agg_tiff("Outputs/NRSWeeklyDeathsxLocation.tiff", units="in", width=14, height=7, res=500)
ggplot(plot9)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~loc)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="All-cause deaths in hospitals and private homes are above 'normal' levels",
subtitle=paste0("Weekly deaths in Scotland in 2020/21 compared to the range in 2015-19. Data up to ", ScotDate, " 2021."),
caption="Data from NRS | Plot by @VictimOfMaths")+
geom_text(data=ann_text9, aes(x=date, y=deaths), label=c(paste0(round(S.excess.loc[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (",
round(S.excess.loc[1,4]*100, 0),"%)"),
paste0("+", round(S.excess.loc[2,2],0)," deaths (+",
round(S.excess.loc[2,4]*100, 0),"%)"),
paste0("+", round(S.excess.loc[3,2],0)," deaths (+",
round(S.excess.loc[3,4]*100, 0),"%)")),
size=3, colour=rep("Red", 3), hjust=0, family="Lato")
dev.off()
#Plot excess by location
agg_tiff("Outputs/NRSWeeklyDeathsExcessxLocation.tiff", units="in", width=12, height=8, res=500)
ggplot(plot9)+
geom_line(aes(x=date, y=excess, colour=loc))+
geom_hline(yintercept=0, colour="Grey30")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Excess deaths compared to 2015-19 average")+
scale_colour_paletteer_d(name="Place of death", "ggsci::planetexpress_futurama")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), text=element_text(family="Lato"))+
labs(title="Excess mortality remains highest in Scottish homes",
subtitle="Excess deaths by place of death in Scotland in 2020/21 compared to the 2015-19 average",
caption="Data from NRS | Plot by @VictimOfMaths")
dev.off()
#Plot by cause
plot10 <- data.cause.S %>%
filter(loc=="All") %>%
mutate(week=if_else(year==2021,week+53, week),
date=as.Date("2020-01-05")+weeks(week-1),
cause=factor(cause, levels=c("COVID-19", "Cancer", "Circulatory", "Dementia / Alzheimers",
"Respiratory", "Other")))
agg_tiff("Outputs/NRSExcessxcause.tiff", units="in", width=10, height=7, res=500)
ggplot(plot10)+
geom_col(aes(x=date, y=excess, fill=cause))+
geom_hline(yintercept=0, colour="Grey30")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Excess deaths compared to 2015-19 average")+
scale_fill_paletteer_d("LaCroixColoR::paired", name="Cause of death")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)),
text=element_text(family="Lato"))+
labs(title="The number of COVID deaths in Scotland has been fairly stable in recent weeks",
subtitle="Registered deaths by cause in Scotland in 2020/21 compared to the 2015-19 average",
caption="Data from NRS | Plot by @VictimOfMaths")
dev.off()
#Plot by cause *and* location
plot11 <- data.cause.S %>%
filter(loc!="All") %>%
mutate(week=if_else(year==2021,week+53, week),
date=as.Date("2020-01-05")+weeks(week-1),
cause=factor(cause, levels=c("COVID-19", "Cancer", "Circulatory", "Dementia / Alzheimers",
"Respiratory", "Other")),
loc=factor(loc, levels=c("Hospital", "Care Home", "Home/Other")))
agg_tiff("Outputs/NRSExcessxcausexloc.tiff", units="in", width=12, height=8, res=500)
ggplot(plot11)+
geom_col(aes(x=date, y=excess, fill=cause))+
geom_hline(yintercept=0, colour="Grey30")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Excess deaths compared to 2015-19 average")+
scale_fill_paletteer_d("LaCroixColoR::paired", name="Cause of death")+
facet_wrap(~loc)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Almost all COVID deaths in Scotland are taking place in hospital",
subtitle="Registered deaths by cause in Scotland in 2020/21 compared to the 2015-19 average",
caption="Data from NRS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/NRSExcessxlocxcause.tiff", units="in", width=12, height=8, res=500)
ggplot(plot11)+
geom_line(aes(x=date, y=excess, colour=loc))+
geom_hline(yintercept=0, colour="Grey30")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Excess deaths compared to 2015-19 average")+
scale_colour_paletteer_d("fishualize::Scarus_tricolor", name="Place of death")+
facet_wrap(~cause)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="COVID-19 deaths in Scotland are taking place mostly in hospitals",
subtitle="Registered deaths by cause and place of death in Scotland in 2020/21 compared to the 2015-19 average",
caption="Data from NRS | Plot by @VictimOfMaths")
dev.off()
#Plot by Health Board
plot12 <- data.HB.S %>%
mutate(week=if_else(year==2021,week+53, week))
plot12.old <- plot12 %>%
filter(year<2020) %>%
group_by(week, HB) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
#Add extra weeks to old data
plot12.old <- plot12.old %>%
filter(week<=Scot2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot12.old)
plot12 <- plot12 %>%
filter(year>=2020) %>%
merge(plot12.old, by=c("HB", "week")) %>%
mutate(excess=deaths-mean)
#Calculate excess deaths vs. mean in 2020/21
S.excess.HB <- plot12 %>%
group_by(HB) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>%
ungroup() %>%
mutate(HB=fct_reorder(HB, -percexcess)) %>%
arrange(-percexcess)
#Order HBs by total excess deaths
plot12 <- plot12 %>%
mutate(HB=factor(HB, levels=levels(S.excess.HB$HB))) %>%
arrange(HB)
ann_text12 <- data.frame(date=rep(as.Date("2020-05-15"), times=14),
deaths=c(350, 200, 250, 450, 300, 210, 150, 210, 80, 180, 250, 100,
80, 80),
HB=factor(S.excess.HB$HB, levels(S.excess.HB$HB)))
agg_tiff("Outputs/NRSWeeklyDeathsxHB.tiff", units="in", width=12, height=8, res=500)
ggplot(plot12)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~HB)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Excess mortality across Scotland",
subtitle=paste0("Weekly deaths in Scotland in 2020/21 compared to the range in 2015-19. Data up to ", ScotDate, " 2021."),
caption="Data from NRS | Plot by @VictimOfMaths")+
geom_text(data=ann_text12, aes(x=date, y=deaths), label=c(paste0("+", round(S.excess.HB[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (+",
round(S.excess.HB[1,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[2,2],0)," deaths (+",
round(S.excess.HB[2,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[3,2],0)," deaths (+",
round(S.excess.HB[3,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[4,2],0)," deaths (+",
round(S.excess.HB[4,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[5,2],0)," deaths (+",
round(S.excess.HB[5,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[6,2],0)," deaths (+",
round(S.excess.HB[6,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[7,2],0)," deaths (+",
round(S.excess.HB[7,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[8,2],0)," deaths (+",
round(S.excess.HB[8,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[9,2],0)," deaths (+",
round(S.excess.HB[9,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[10,2],0)," deaths (+",
round(S.excess.HB[10,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[11,2],0)," deaths (+",
round(S.excess.HB[11,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[12,2],0)," deaths (+",
round(S.excess.HB[12,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[13,2],0)," deaths (+",
round(S.excess.HB[13,4]*100, 0),"%)"),
paste0("+", round(S.excess.HB[14,2],0)," deaths (+",
round(S.excess.HB[14,4]*100, 0),"%)")),
size=3, colour=rep("Red", 14), hjust=0, family="Lato")
dev.off()
############################
#Plots for Northern Ireland#
############################
#Overall plot
plot13 <- data.NI %>%
mutate(date=as.Date(date))
plot13.old <- plot13 %>%
filter(year<2020) %>%
group_by(week) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
NI2021MaxWeek <- max((plot13 %>% filter(year==2021))$week)
#Add extra weeks to old data
plot13.old <- plot13.old %>%
filter(week<=NI2021MaxWeek-53) %>%
mutate(week=week+53) %>%
bind_rows(plot13.old)
plot13 <- plot13 %>%
filter(year>=2020) %>%
merge(plot13.old, by="week") %>%
mutate(excess=deaths-mean)
#Calculate excess deaths vs. mean in 2020/21
NI.excess <- plot13 %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)
#Extract y=axis placement for excess deaths figure
labpos <- 440
agg_tiff("Outputs/NISRAWeeklyDeaths.tiff", units="in", width=9, height=7, res=500)
ggplot(plot13)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="Northern Ireland has seen almost 2 months of above 'usual' deaths",
subtitle=paste0("Weekly deaths in Northern Ireland in 2020/21 compared to the range in 2010-19. Data up to ", NIDate, " 2021."),
caption="Data from NISRA | Plot by @VictimOfMaths")+
annotate(geom="text", x=as.Date("2020-06-01"), y=labpos,
label=paste0("+", round(NI.excess$excess, 0)," more deaths in 2020/21\nthan average (+",
round(NI.excess$percexcess*100, 0),"%)"), colour="Red", hjust=0,
family="Lato")+
annotate(geom="text", x=as.Date("2020-02-28"), y=450, label="Historic maximum",
colour="Skyblue4", family="Lato", size=rel(3))+
annotate(geom="text", x=as.Date("2020-02-16"), y=200, label="Historic minimum",
colour="Skyblue4", family="Lato", size=rel(3))+
annotate(geom="text", x=as.Date("2020-05-15"), y=170, label="Historic mean", colour="grey30",
family="Lato", size=rel(3))+
geom_curve(aes(x=as.Date("2020-05-20"), y=180, xend=as.Date("2020-05-08"), yend=273),
colour="grey30", curvature=-0.15, arrow=arrow(length=unit(0.1, "cm"), type="closed"),
lineend="round")
dev.off()
#Plot by cause
plot14 <- data.cause.NI %>%
mutate(date=as.Date("2020-01-03")+weeks(week-1)) %>%
gather(cause, deaths, c(3:5))
agg_tiff("Outputs/NISRAExcessxCause.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_col(data=subset(plot14, cause!="netexcess"), aes(x=date, y=deaths, fill=cause))+
geom_hline(yintercept=0, colour="Grey30")+
geom_line(data=subset(plot14, cause=="netexcess"), aes(x=date, y=deaths, colour=cause))+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Excess deaths vs. 2015-19 mean")+
scale_fill_paletteer_d("LaCroixColoR::PinaFraise", name="Cause", labels=c("COVID-19", "Other causes"))+
scale_colour_manual(values="NavyBlue", name="", labels="Net excess deaths")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"))+
labs(title="The number of COVID-19 deaths in Northern Ireland has remained stable",
subtitle="Excess deaths vs. 2015-19 average by cause for Northern Ireland",
caption="Data from NISRA | Plot by @VictimOfMaths")
dev.off()
#Regional plot for the whole of the UK
plot15 <- data.reg.UK %>%
mutate(week=case_when(
region!= "Northern Ireland" & year==2021 ~ week+53,
TRUE~week),
date=as.Date(date))
plot15.old <- plot15 %>%
filter(year<2020) %>%
group_by(week, region) %>%
summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>%
ungroup()
#Add extra weeks to old data
plot15.old <- plot15.old %>%
filter(week<=max(Eng2021MaxWeek-53, Scot2021MaxWeek-53, NI2021MaxWeek)) %>%
mutate(week=week+53) %>%
bind_rows(plot15.old)
plot15 <- plot15 %>%
filter(year>=2020) %>%
merge(plot15.old, by=c("region", "week")) %>%
mutate(excess=deaths-mean)
#Calculate excess deaths vs. mean in 2020/21
UK.excess.region <- plot15 %>%
group_by(region) %>%
summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>%
ungroup() %>%
mutate(region=fct_reorder(region, -percexcess)) %>%
arrange(-percexcess)
#Order HBs by total excess deaths
plot15 <- plot15 %>%
mutate(region=factor(region, levels=levels(UK.excess.region$region))) %>%
arrange(region)
ann_text15 <- data.frame(date=rep(as.Date("2020-05-15"), times=12),
deaths=c(2700, 2100, 1700, 2500, 2500, 3000, 1100, 2000, 650,
1300, 2000, 1900),
region=factor(UK.excess.region$region, levels(UK.excess.region$region)))
subtitle <- ifelse(EWDate==NIDate, paste0("Weekly deaths in 2020/21 compared to the range in 2010-19.
England, Wales and Northern Ireland data to ", EWDate, ".
Scotland data to ", ScotDate, "."),
paste0("Weekly deaths in 2020/21 compared to the range in 2010-19
England and Wales data to ", EWDate, ".
Northern Ireland data to ", NIDate, ".
Scotland data to ", ScotDate, "."))
RegPlot <- ggplot(plot15)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~region)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Regional variation in all-cause mortality across the UK",
subtitle=subtitle,
caption="Data from ONS, NRS & NISRA | Plot by @VictimOfMaths")+
geom_text(data=ann_text15, aes(x=date, y=deaths), label=c(paste0("+", round(UK.excess.region[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (+",
round(UK.excess.region[1,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[2,2],0)," deaths (+",
round(UK.excess.region[2,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[3,2],0)," deaths (+",
round(UK.excess.region[3,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[4,2],0)," deaths (+",
round(UK.excess.region[4,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[5,2],0)," deaths (+",
round(UK.excess.region[5,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[6,2],0)," deaths (+",
round(UK.excess.region[6,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[7,2],0)," deaths (+",
round(UK.excess.region[7,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[8,2],0)," deaths (+",
round(UK.excess.region[8,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[9,2],0)," deaths (+",
round(UK.excess.region[9,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[10,2],0)," deaths (+",
round(UK.excess.region[10,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[11,2],0)," deaths (+",
round(UK.excess.region[11,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[12,2],0)," deaths (+",
round(UK.excess.region[12,4]*100, 0),"%)")),
size=3, colour=rep("Red", 12), hjust=0, family="Lato")
agg_tiff("Outputs/ONSNRSNISRAWeeklyDeathsxReg.tiff", units="in", width=12, height=8, res=500)
RegPlot
dev.off()
agg_png("Outputs/ONSNRSNISRAWeeklyDeathsxReg.png", units="in", width=12, height=8, res=500)
RegPlot
dev.off()
RegPlot2 <- ggplot(plot15)+
geom_ribbon(aes(x=date, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=date, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=date, y=deaths), colour="Red")+
scale_x_date(name="", date_labels="%b-%y")+
scale_y_continuous(name="Weekly deaths registered", limits=c(0,NA))+
facet_wrap(~region, scales="free_y")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.6)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Regional variation in all-cause mortality across the UK",
subtitle=subtitle,
caption="Data from ONS, NRS & NISRA | Plot by @VictimOfMaths")+
geom_text(data=ann_text15, aes(x=date, y=deaths), label=c(paste0("+", round(UK.excess.region[1,2],0)," excess deaths in 2020/21\nvs. 2010-19 average (+",
round(UK.excess.region[1,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[2,2],0)," deaths (+",
round(UK.excess.region[2,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[3,2],0)," deaths (+",
round(UK.excess.region[3,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[4,2],0)," deaths (+",
round(UK.excess.region[4,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[5,2],0)," deaths (+",
round(UK.excess.region[5,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[6,2],0)," deaths (+",
round(UK.excess.region[6,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[7,2],0)," deaths (+",
round(UK.excess.region[7,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[8,2],0)," deaths (+",
round(UK.excess.region[8,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[9,2],0)," deaths (+",
round(UK.excess.region[9,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[10,2],0)," deaths (+",
round(UK.excess.region[10,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[11,2],0)," deaths (+",
round(UK.excess.region[11,4]*100, 0),"%)"),
paste0("+", round(UK.excess.region[12,2],0)," deaths (+",
round(UK.excess.region[12,4]*100, 0),"%)")),
size=2.6, colour=rep("Red", 12), hjust=0, family="Lato")
agg_tiff("Outputs/ONSNRSNISRAWeeklyDeathsxReg2.tiff", units="in", width=12, height=8, res=500)
RegPlot2
dev.off()
plot16 <- data.reg.UK %>%
group_by(region, year) %>%
arrange(region, year, date) %>%
mutate(cumul_deaths=cumsum(deaths),
week=if_else(region=="Northern Ireland" & year==2021, week-53, week))
agg_tiff("Outputs/ONSNRSNISRAWeeklyCumulDeaths_reg.tiff", units="in", width=12, height=8, res=350)
ggplot()+
geom_line(data=subset(plot16, year!=2020), aes(x=week, y=cumul_deaths, group=as.factor(year)), colour="Grey80")+
geom_line(data=subset(plot16, year==2020), aes(x=week, y=cumul_deaths), colour="Tomato")+
geom_line(data=subset(plot16, year==2021), aes(x=week, y=cumul_deaths), colour="darkorchid")+
theme_classic()+
facet_wrap(~region)+
scale_x_continuous(name="Week number")+
scale_y_continuous(name="Deaths registered")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold"),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.5)),
text=element_text(family="Lato"))+
labs(title="Some parts of the UK have seen almost as many excess deaths in 2021 as in 2020",
subtitle="Cumulative deaths from all causes in 2020 and 2021 compared to the range in 2010-19",
caption="Data from ONS, NRS & NISRA | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/AllCauseDeathsxAge.R
================================================
rm(list=ls())
library(tidyverse)
library(paletteer)
library(curl)
library(readxl)
library(lubridate)
library(forcats)
library(ggtext)
library(HMDHFDplus)
options(scipen=9999)
#Read in data for England & Wales (created by AllCauseMortality.R)
data.EW <- read.csv("Data/deaths_age_EW.csv")
#Tidy to match Scottish data
data.EW <- data.EW[,c(5,6,4,3,7)]
colnames(data.EW) <- c("year", "week", "age", "deaths", "country")
data.EW <- subset(data.EW, age!="Total")
data.EW$age <- if_else(data.EW$age=="Under 1 year", "0-14", as.character(data.EW$age))
data.EW$age <- if_else(data.EW$age=="01-14", "0-14", as.character(data.EW$age))
data.EW <- data.EW %>%
group_by(age, year, week, country) %>%
summarise(deaths=sum(deaths))
#Read in Scottish data
#Weekly age-specific data is published by NRS
temp <- tempfile()
temp <- curl_download(url="https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-51.xlsx", destfile=temp, quiet=FALSE, mode="wb")
data2020.S <- data.frame(t(read_excel(temp, sheet="Table 2 ", range="C15:BA21", col_names=FALSE)))
date <- data.frame(date=format(seq.Date(from=as.Date("2019-12-30"), by="7 days", length.out=nrow(data2020.S)), "%d/%m/%y"))
data2020.S <- cbind(date, data2020.S)
colnames(data2020.S) <- c("date", "Under 1 year", "01-14", "15-44", "45-64", "65-74", "75-84", "85+")
data2020.S$date <- as.Date(data2020.S$date, "%d/%m/%y")
data2020.S$weekno <- week(data2020.S$date)
data2020.S_long <- gather(data2020.S, age, deaths, c(2:8))
data2020.S_long$year <- 2020
data2020.S_long$deaths <- as.numeric(ifelse(data2020.S_long$deaths==".", 0, data2020.S_long$deaths))
#Recalculate dates to align with ONS data (which uses week to, not w/c)
data2020.S_long$date <- data2020.S_long$date+days(6)
data2020.S_long$week <- week(data2020.S_long$date)
data2020.S_long$age <- if_else(data2020.S_long$age=="Under 1 year", "0-14", data2020.S_long$age)
data2020.S_long$age <- if_else(data2020.S_long$age=="01-14", "0-14", data2020.S_long$age)
data2020.S_long$age <- as.factor(data2020.S_long$age)
data2020.S_long <- data2020.S_long %>%
group_by(week, year, age) %>%
summarise(deaths=sum(deaths))
#Bring in 2010-2019 data
temp <- tempfile()
temp <- curl_download(url="https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-sex-age-2000-2019.xlsx", destfile=temp, quiet=FALSE, mode="wb")
data2010.S <- read_excel(temp, sheet="2010", range="B4:BD44", col_names=TRUE)
data2010.S$sex <- rep(c("Female", "Male"), each=20)
data2010.S_long <- gather(data2010.S, week, deaths, c(3:55))[,-c(2)]
data2010.S_long$year <- 2010
data2011.S <- read_excel(temp, sheet="2011", range="B4:BD44", col_names=TRUE)
data2011.S$sex <- rep(c("Female", "Male"), each=20)
data2011.S_long <- gather(data2011.S, week, deaths, c(3:55))[,-c(2)]
data2011.S_long$year <- 2011
data2012.S <- read_excel(temp, sheet="2012", range="B4:BD44", col_names=TRUE)
data2012.S$sex <- rep(c("Female", "Male"), each=20)
data2012.S_long <- gather(data2012.S, week, deaths, c(3:55))[,-c(2)]
data2012.S_long$year <- 2012
data2013.S <- read_excel(temp, sheet="2013", range="B4:BD44", col_names=TRUE)
data2013.S$sex <- rep(c("Female", "Male"), each=20)
data2013.S_long <- gather(data2013.S, week, deaths, c(3:55))[,-c(2)]
data2013.S_long$year <- 2013
data2014.S <- read_excel(temp, sheet="2014", range="B4:BD44", col_names=TRUE)
data2014.S$sex <- rep(c("Female", "Male"), each=20)
data2014.S_long <- gather(data2014.S, week, deaths, c(3:55))[,-c(2)]
data2014.S_long$year <- 2014
data2015.S <- read_excel(temp, sheet="2015", range="B4:BD44", col_names=TRUE)
data2015.S$sex <- rep(c("Female", "Male"), each=20)
data2015.S_long <- gather(data2015.S, week, deaths, c(3:55))[,-c(2)]
data2015.S_long$year <- 2015
data2016.S <- read_excel(temp, sheet="2016", range="B4:BD44", col_names=TRUE)
data2016.S$sex <- rep(c("Female", "Male"), each=20)
data2016.S_long <- gather(data2016.S, week, deaths, c(3:55))[,-c(2)]
data2016.S_long$year <- 2016
data2017.S <- read_excel(temp, sheet="2017", range="B4:BD44", col_names=TRUE)
data2017.S$sex <- rep(c("Female", "Male"), each=20)
data2017.S_long <- gather(data2017.S, week, deaths, c(3:55))[,-c(2)]
data2017.S_long$year <- 2017
data2018.S <- read_excel(temp, sheet="2018", range="B4:BD44", col_names=TRUE)
data2018.S$sex <- rep(c("Female", "Male"), each=20)
data2018.S_long <- gather(data2018.S, week, deaths, c(3:55))[,-c(2)]
data2018.S_long$year <- 2018
data2019.S <- read_excel(temp, sheet="2019", range="B4:BD44", col_names=TRUE)
data2019.S$sex <- rep(c("Female", "Male"), each=20)
data2019.S_long <- gather(data2019.S, week, deaths, c(3:55))[,-c(2)]
data2019.S_long$year <- 2019
data1019.S_long <- bind_rows(data2010.S_long, data2011.S_long, data2012.S_long, data2013.S_long,
data2014.S_long, data2015.S_long, data2016.S_long, data2017.S_long,
data2018.S_long, data2019.S_long)
#Match age bands
data1019.S_long$age <- case_when(
data1019.S_long$Age=="0" ~ "0-14",
data1019.S_long$Age=="1-4" ~ "0-14",
data1019.S_long$Age=="5-9" ~ "0-14",
data1019.S_long$Age=="10-14" ~ "0-14",
data1019.S_long$Age=="15-19" ~ "15-44",
data1019.S_long$Age=="20-24" ~ "15-44",
data1019.S_long$Age=="25-29" ~ "15-44",
data1019.S_long$Age=="30-34" ~ "15-44",
data1019.S_long$Age=="35-39" ~ "15-44",
data1019.S_long$Age=="40-44" ~ "15-44",
data1019.S_long$Age=="45-49" ~ "45-64",
data1019.S_long$Age=="50-54" ~ "45-64",
data1019.S_long$Age=="55-59" ~ "45-64",
data1019.S_long$Age=="60-64" ~ "45-64",
data1019.S_long$Age=="65-69" ~ "65-74",
data1019.S_long$Age=="70-74" ~ "65-74",
data1019.S_long$Age=="75-79" ~ "75-84",
data1019.S_long$Age=="80-84" ~ "75-84",
data1019.S_long$Age=="85-89" ~ "85+",
data1019.S_long$Age=="90+" ~ "85+"
)
data1019.S <- data1019.S_long %>%
group_by(year, week, age) %>%
summarise(deaths=sum(deaths))
data1019.S$week <- as.integer(data1019.S$week)
data.S <- bind_rows(data1019.S, data2020.S_long)
data.S$country <- "Scotland"
data <- bind_rows(data.S, data.EW)
#Read in NI data (for 2020 only)
temp <- tempfile()
temp <- curl_download(url="https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly_Deaths.xls",
destfile=temp, quiet=FALSE, mode="wb")
data2020.NI <- read_excel(temp, sheet="Table 2", range="D7:BA14", col_names=FALSE)
colnames(data2020.NI) <- c(1:ncol(data2020.NI))
data2020.NI$year <- 2020
data2020.NI$age <- c("0-14", "0-14", "0-14", "15-44", "45-64", "65-74", "75-84", "85+")
data2020.NI_long <- gather(data2020.NI, week, deaths, c(1:(ncol(data2020.NI)-2)))
data2020.NI_long <- data2020.NI_long %>%
group_by(age, week, year) %>%
summarise(deaths=sum(deaths))
data2020.NI_long$country <- "Northern Ireland"
data2020.NI_long$week <- as.integer(data2020.NI_long$week)
data <- bind_rows(data, data2020.NI_long)
#Bring in populations
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2001tomid2019detailedtimeseries/myeb1.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
popdata <- read.csv(file.path(temp2,"MYEB1_detailed_population_estimates_series_UK_(2019_geog20).csv"))
popdata$age <- case_when(
popdata$age<15 ~ "0-14",
popdata$age<45 ~ "15-44",
popdata$age<65 ~ "45-64",
popdata$age<75 ~ "65-74",
popdata$age<85 ~ "75-84",
TRUE ~ "85+")
popdata$country <- case_when(
popdata$country=="S" ~ "Scotland",
popdata$country=="N" ~ "Northern Ireland",
TRUE ~ "England & Wales")
popdata <- popdata %>%
group_by(age, country) %>%
summarise(pop_2010=sum(population_2010), pop_2011=sum(population_2011), pop_2012=sum(population_2012),
pop_2013=sum(population_2013), pop_2014=sum(population_2014), pop_2015=sum(population_2015),
pop_2016=sum(population_2016), pop_2017=sum(population_2017), pop_2018=sum(population_2018),
pop_2019=sum(population_2019), pop_2020=sum(population_2019))
popdata_long <- gather(popdata, year, pop, c(3:13))
popdata_long$year <- as.integer(substr(popdata_long$year, 5, 8))
#Merge into main data
data <- merge(data, popdata_long)
data$mortrate <- data$deaths*100000/data$pop
#take a copy for later
data.UK <- data
#Calculate 2010-19 average, min and max
hist.data <- data %>%
filter(year!=2020) %>%
group_by(age, country, week) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),
mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))
data <- merge(hist.data, subset(data, year==2020)[,c(2:5,7)], all.x=TRUE, all.y=TRUE)
#Tidy up before plotting
data$country <- factor(data$country, levels=c("England & Wales", "Scotland", "Northern Ireland"))
data$age <- ifelse(data$age=="01-14", "0-14", data$age)
#Calculate excess deaths in 2020 vs. historic mean
excess <- data %>%
group_by(age, country) %>%
filter(!is.na(deaths) & week<20) %>%
summarise(deaths=sum(deaths), mean=sum(mean_d), place=mean(mean_r))
excess$excess <- excess$deaths-excess$mean
excess$prop <- excess$excess/excess$mean
ann_text <- data.frame(week=rep(21, times=18), mean_r=excess$place*1.3+0.4,
country=rep(c("England & Wales", "Scotland", "Northern Ireland"), times=6),
age=rep(c("0-14", "15-44", "45-64", "65-74", "75-84", "85+"), each=3))
tiff("Outputs/ExcessDeathsxAgexCountry.tiff", units="in", width=10, height=10, res=300)
ggplot(data)+
geom_ribbon(aes(x=week, ymin=min_r, ymax=max_r), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_r, ymax=mortrate), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_r), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=mortrate), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths per 100,000")+
facet_grid(age~country, scales="free_y")+
geom_text(data=ann_text, aes(x=week, y=mean_r), label=c(paste0("", round(excess[1,7]*100,0), "% change in deaths in 2020\nvs. 2010-19 average"),
paste0("", round(excess[2,7]*100,0), "%"),
paste0("+", round(excess[3,7]*100,0), "%"),
paste0("+", round(excess[4,7]*100,0), "%"),
paste0("+", round(excess[5,7]*100,0), "%"),
paste0("+", round(excess[6,7]*100,0), "%"),
paste0("+", round(excess[7,7]*100,0), "%"),
paste0("+", round(excess[8,7]*100,0), "%"),
paste0("+", round(excess[9,7]*100,0), "%"),
paste0("+", round(excess[10,7]*100,0), "%"),
paste0("+", round(excess[11,7]*100,0), "%"),
paste0("+", round(excess[12,7]*100,0), "%"),
paste0("+", round(excess[13,7]*100,0), "%"),
paste0("+", round(excess[14,7]*100,0), "%"),
paste0("+", round(excess[15,7]*100,0), "%"),
paste0("+", round(excess[16,7]*100,0), "%"),
paste0("+", round(excess[17,7]*100,0), "%"),
paste0("+", round(excess[18,7]*100,0), "%")),
size=3, colour="Red", hjust=0)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face="bold"),
plot.subtitle =element_markdown())+
labs(title="Excess deaths in England are higher in 45-84 year-olds than elsewhere in the UK",
subtitle="Weekly deaths in 2020 compared to the range in 2010-19.",
caption="Date from ONS, NRS & NISRA | Plot by @VictimOfMaths")
dev.off()
#Bring in data from HMD
temp <- tempfile()
temp <- curl_download(url="https://www.mortality.org/Public/STMF/Outputs/stmf.csv", destfile=temp, quiet=FALSE, mode="wb")
HMDdata <- read_delim(temp, delim=",", comment="#")
#Keep only combined sex data and from years 2010 onwards
HMDdata <- subset(HMDdata, Year>=2010 & Sex=="b")
#Lengthen (there's probably (definitely) a more elegant pivot_longer() solution)
HMD_long <- gather(HMDdata, age, deaths,c(5:9))[,c(1:3, 15, 16)]
HMD_long$age <- substr(HMD_long$age, 2, 7)
temp <- gather(HMDdata, age, mortrate, c(11:15))[,c(1:3, 15, 16)]
temp$age <- substr(temp$age, 2, 7)
HMD_long <- merge(HMD_long, temp)
colnames(HMD_long) <- c("country", "year", "week", "age", "deaths", "mortrate")
#Tidy up years
HMD_long$age <- case_when(
HMD_long$age=="0_14" ~ "0-14",
HMD_long$age=="15_64" ~ "15-64",
HMD_long$age=="65_74" ~ "65-74",
HMD_long$age=="75_84" ~ "75-84",
HMD_long$age=="85p" ~ "85+")
#Adjust HMD mortality rates from annualised per capita to weekly rates per 100,000
HMD_long$mortrate <- HMD_long$mortrate*100000/52
#Update UK data age groups to match HMD groups
data.UK$age <- case_when(
data.UK$age %in% c("15-44", "45-64") ~ "15-64",
TRUE ~ data.UK$age)
data.UK <- data.UK %>%
group_by(age, year, week, country) %>%
summarise(deaths=sum(deaths), pop=sum(pop))
data.UK$mortrate <- data.UK$deaths*100000/data.UK$pop
#Merge data excluding countries which are in HMD data, but which we've collected separately (with longer coverage)
mergeddata <- bind_rows(subset(HMD_long, !(country %in% c("GBRTENW", "GBR_SCO", "FRATNP", "ITA"))), data.UK[,-c(6)])
#Calculate 2010-19 average, min and max
hist.mergeddata <- mergeddata %>%
filter(year!=2020) %>%
group_by(age, country, week) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),
mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))
fulldata <- merge(hist.mergeddata, subset(mergeddata, year==2020), all.x=TRUE, all.y=TRUE)
#Bring in French data from Insee
#File created by All Cause Deaths France.R
data.FR <- read.csv("Data/deaths_age_France.csv")[,-c(1)]
#Bring in French population from HMD (need to register and put your details in here)
username <- ""
password <- ""
FraPop <- readHMDweb(CNTRY="FRATNP", "Exposures_1x1", username, password)
FraPop <- subset(FraPop, Year>=2010)
FraPop$age <- case_when(
FraPop$Age<15 ~ "0-14",
FraPop$Age<65 ~ "15-64",
FraPop$Age<75 ~ "65-74",
FraPop$Age<85 ~ "75-84",
TRUE ~ "85+"
)
FraPop <- FraPop %>%
group_by(Year, age) %>%
summarise(pop=sum(Total))
#Replicate 2017 populations for 2018+
temp <- subset(FraPop, Year==2017)
temp2 <- temp
temp3 <- temp
temp$Year <- 2018
temp2$Year <- 2019
temp3$Year <- 2020
FraPop <- bind_rows(FraPop, temp, temp2, temp3)
data.FR <- merge(data.FR, FraPop, by.x=c("year", "ageband"), by.y=c("Year", "age"))
colnames(data.FR) <- c("year", "age", "week", "deaths", "pop")
data.FR$mortrate=data.FR$deaths*100000/data.FR$pop
#Calculate 2010-19 average, min and max
hist.FR <- data.FR %>%
filter(year!=2020) %>%
group_by(age,week) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),
mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))
fulldata.FR <- merge(hist.FR, subset(data.FR, year==2020), all.x=TRUE, all.y=TRUE)
fulldata.FR <- fulldata.FR[,-c(11)]
fulldata.FR$country <- "France"
fulldata <- bind_rows(fulldata, fulldata.FR)
#Bring in Italian data from ISTAT
#File created by All Cause Deaths Italy.R
data.IT <- read.csv("Data/deaths_age_Italy.csv")[,-c(1)]
#Compress to match
data.IT$age <- case_when(
data.IT$age=="0" ~ "0-14",
data.IT$age=="1-4" ~ "0-14",
data.IT$age=="5-9" ~ "0-14",
data.IT$age=="10-14" ~ "0-14",
data.IT$age=="15-19" ~ "15-64",
data.IT$age=="20-24" ~ "15-64",
data.IT$age=="25-29" ~ "15-64",
data.IT$age=="30-34" ~ "15-64",
data.IT$age=="35-39" ~ "15-64",
data.IT$age=="40-44" ~ "15-64",
data.IT$age=="45-49" ~ "15-64",
data.IT$age=="50-54" ~ "15-64",
data.IT$age=="55-59" ~ "15-64",
data.IT$age=="60-64" ~ "15-64",
data.IT$age=="65-69" ~ "65-74",
data.IT$age=="70-74" ~ "65-74",
data.IT$age=="75-79" ~ "75-84",
data.IT$age=="80-84" ~ "75-84",
data.IT$age=="85-89" ~ "85+",
data.IT$age=="90-94" ~ "85+",
data.IT$age=="95-99" ~ "85+",
TRUE ~ "85+")
data.IT <- data.IT %>%
group_by(age, year, week) %>%
summarise(deaths=sum(deaths))
#Bring in Italian population data from HMD
ItaPop <- readHMDweb(CNTRY="ITA", "Exposures_1x1", username, password)
ItaPop <- subset(ItaPop, Year>=2010)
ItaPop$age <- case_when(
ItaPop$Age<15 ~ "0-14",
ItaPop$Age<65 ~ "15-64",
ItaPop$Age<75 ~ "65-74",
ItaPop$Age<85 ~ "75-84",
TRUE ~ "85+"
)
ItaPop <- ItaPop %>%
group_by(Year, age) %>%
summarise(pop=sum(Total))
#Replicate 2017 populations for 2018+
temp <- subset(ItaPop, Year==2017)
temp2 <- temp
temp3 <- temp
temp$Year <- 2018
temp2$Year <- 2019
temp3$Year <- 2020
ItaPop <- bind_rows(ItaPop, temp, temp2, temp3)
data.IT <- merge(data.IT, ItaPop, by.x=c("year", "age"), by.y=c("Year", "age"))
data.IT$mortrate=data.IT$deaths*100000/data.IT$pop
#Calculate 2010-19 average, min and max
hist.IT <- data.IT %>%
filter(year!=2020) %>%
group_by(age,week) %>%
summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),
mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))
fulldata.IT <- merge(hist.IT, subset(data.IT, year==2020), all.x=TRUE, all.y=TRUE)
fulldata.IT <- fulldata.IT[,-c(11)]
fulldata.IT$country <- "Italy"
fulldata <- bind_rows(fulldata, fulldata.IT)
#Use HMD data from Northern Ireland, rather than direct from NISRA - the 2020 data is slightly
#less complete, but it does include 2010-19 data
fulldata <- fulldata %>% filter(country!="Northern Ireland")
#Tidy up names
fulldata$country <- case_when(
fulldata$country=="AUT" ~ "Austria",
fulldata$country=="AUS2" ~ "Australia",
fulldata$country=="BEL" ~ "Belgium",
fulldata$country=="BGR" ~ "Bulgaria",
fulldata$country=="CAN" ~ "Canada",
fulldata$country=="CHE" ~ "Switzerland",
fulldata$country=="CHL" ~ "Chile",
fulldata$country=="CZE" ~ "Czechia",
fulldata$country=="DNK" ~ "Denmark",
fulldata$country=="DEUTNP" ~ "Germany",
fulldata$country=="ESP" ~ "Spain",
fulldata$country=="EST" ~ "Estonia",
fulldata$country=="FIN" ~ "Finland",
fulldata$country=="GBR_NIR" ~ "Northern Ireland",
fulldata$country=="GRC" ~ "Greece",
fulldata$country=="HRV" ~ "Croatia",
fulldata$country=="HUN" ~ "Hungary",
fulldata$country=="ISL" ~ "Iceland",
fulldata$country=="ISR" ~ "Israel",
fulldata$country=="KOR" ~ "South Korea",
fulldata$country=="LTU" ~ "Lithuania",
fulldata$country=="LUX" ~ "Luxembourg",
fulldata$country=="LVA" ~ "Latvia",
fulldata$country=="NLD" ~ "Netherlands",
fulldata$country=="NOR" ~ "Norway",
fulldata$country=="NZL_NP" ~ "New Zealand",
fulldata$country=="POL" ~ "Poland",
fulldata$country=="PRT" ~ "Portugal",
fulldata$country=="RUS" ~ "Russia",
fulldata$country=="SWE" ~ "Sweden",
fulldata$country=="SVK" ~ "Slovakia",
fulldata$country=="SVN" ~ "Slovenia",
fulldata$country=="TWN" ~ "Taiwan",
TRUE ~ fulldata$country)
#Remove most recent week of data for FIN, FRA, KOR, NOR, SVK, SWE and USA which is wonky/underreported
fulldata <- fulldata %>%
group_by(age, country, year) %>%
mutate(last_week=max(week)) %>%
ungroup() %>%
filter(!(country %in% c("Finland", "USA", "Slovakia", "Norway", "Lithuania", "France",
"South Korea") & year==2020 & week==last_week))
#Remove Russia which has no 2020 (or 2019) data
fulldata <- fulldata %>%
filter(!country %in% c("Russia"))
Excessplot <- ggplot(fulldata)+
geom_ribbon(aes(x=week, ymin=min_r, ymax=max_r), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_r, ymax=mortrate), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_r), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=mortrate), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths per 100,000")+
facet_grid(age~country, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face="bold"),
plot.subtitle =element_markdown())+
labs(title="Excess mortality rates by age group across Europe & the US",
subtitle="Registered weekly death rates in 2020 compared to the range for 2010-19",
caption="Data from mortality.org, Insee, ISTAT, ONS, NRS and NISRA | Plot by @VictimOfMaths")
tiff("Outputs/ExcessEURUSxAge.tiff", units="in", width=35, height=10, res=300)
Excessplot
dev.off()
png("Outputs/ExcessEURUSxAge.png", units="in", width=35, height=10, res=300)
Excessplot
dev.off()
#15-64 year olds only
tiff("Outputs/ExcessEURUSxAge1564.tiff", units="in", width=12, height=10, res=300)
ggplot(subset(fulldata, age=="15-64"))+
geom_ribbon(aes(x=week, ymin=min_r, ymax=max_r), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean_r, ymax=mortrate), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean_r), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=mortrate), colour="Red")+
scale_x_continuous(name="Week number")+
scale_y_continuous("Weekly deaths per 100,000")+
facet_wrap(~country)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face="bold"),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Bulgaria has seen far more excess deaths among people of working age than other countries",
subtitle="Registered weekly death rates among 15-64 year-olds in 2020 compared to the range for 2010-19",
caption="Data from mortality.org, Insee, ISTAT, ONS and NRS | Plot by @VictimOfMaths")
dev.off()
#Calculate excess mortality rate
fulldata$excess_r <- fulldata$mortrate-fulldata$mean_r
tiff("Outputs/ExcessRatexAgeEUR.tiff", units="in", width=10, height=6, res=500)
ggplot(subset(fulldata, age=="15-64"))+
geom_segment(aes(x=0, xend=29, y=0, yend=0))+
geom_line(aes(x=week, y=excess_r, colour=country))+
scale_x_continuous(name="Week number", breaks=c(0,10,20), limits=c(0,29))+
scale_y_continuous("Excess weekly deaths per 100,000 vs. 2010-19 average")+
theme_classic()+
scale_colour_manual(values=c(rep("Grey90", times=5), "#D43F3A", rep("Grey90", times=3), "#46B8DA",
rep("Grey90", times=14), "#357EBD", rep("Grey90", times=3),
"#9632B8", rep("Grey90", times=3), "#EEA236", rep("Grey90", times=3),
"#5CB85C"), name="Country")+
labs(title="Some of these countries are not like the others",
subtitle="Excess mortality rates in 15-64 year-olds in 2020",
caption="Data from mortality.org, ONS, NRS, Insee and ISTAT\nPlot by @VictimOfMaths")
dev.off()
#Heatmaps of country and age-specific excess deaths
#Calculate excess mortality counts and proportion
fulldata$excess_d <- fulldata$deaths-fulldata$mean_d
excess <- fulldata %>%
filter(!is.na(excess_d)) %>%
group_by(age, country) %>%
summarise(excess=sum(excess_d), total=sum(deaths), excessprop=excess/total, maxweek=max(week))
excess$excessprop <- ifelse(excess$excessprop<=0, paste0(round(excess$excessprop*100, 0), "%"),
paste0("+", round(excess$excessprop*100, 0), "%"))
#Get order for plots (sort by overall % increase in excess deaths)
excessrank <- excess %>%
group_by(country) %>%
summarise(excess=sum(excess), total=sum(total), excessprop=excess/total)
excessrank$country <- fct_reorder(as.factor(excessrank$country), -excessrank$excessprop)
#plot of excess mortality in 2020
tiff("Outputs/ExcessDeathsBars.tiff", units="in", width=10, height=8, res=500)
ggplot(excessrank, aes(y=country, x=excessprop, fill=excessprop))+
geom_col(show.legend=FALSE)+
scale_fill_paletteer_c("ggthemes::Classic Red-White-Green", direction=-1,
limit=c(-1,1)*max(abs(excessrank$excessprop)))+
scale_x_continuous(name="Change in all-cause deaths in 2020 vs. average in 2010-19",
breaks=c(-0.1,0,0.1,0.2), labels=c("-10%", "0", "+10%", "+20%"))+
scale_y_discrete(name="")+
theme_classic()+
theme(plot.title.position="plot", plot.title=element_text(face="bold"))+
labs(title="Spain's 'second wave' of COVID deaths means it's now seen the biggest rise in mortality in 2020",
subtitle="All-cause deaths in 2020 vs. the average for 2010-19 for countries with data on mortality.org",
caption="Data from mortality.org, Insee, ISTAT, ONS & NRS | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/ExcessDeathsBarsAbs.tiff", units="in", width=10, height=8, res=500)
ggplot(excessrank, aes(y=fct_reorder(country, -excess), x=excess, fill=excess))+
geom_col(show.legend=FALSE)+
scale_fill_paletteer_c("ggthemes::Classic Red-White-Green", direction=-1,
limit=c(-1,1)*max(abs(excessrank$excess)))+
scale_x_continuous(name="Change in all-cause deaths in 2020 vs. average in 2010-19")+
scale_y_discrete(name="")+
theme_classic()+
theme(plot.title.position="plot", plot.title=element_text(face="bold"))+
labs(title="The US has seen far more deaths than anywhere in Europe during the pandemic",
subtitle="All-cause deaths in 2020 vs. the average for 2010-19",
caption="Data from mortality.org, Insee, ISTAT, ONS & NRS | Plot by @VictimOfMaths")
dev.off()
#Calculate aggregate national data
fulldata$pop <- fulldata$deaths*100000/fulldata$mortrate
#Fix issue in Slovenia as some weeks have 0 deaths, so pop is undefined using this method
#I bet there's an elegant dplyr solution to this
fulldata$pop <- if_else(fulldata$country %in% c("Slovenia", "Northern Ireland") & fulldata$year=="2020" & is.na(fulldata$pop) & fulldata$age=="0-14",
max(fulldata$pop[fulldata$country=="Slovenia" & fulldata$year=="2020" & !is.na(fulldata$pop) & fulldata$age=="0-14"]),
fulldata$pop)
fulldata$pop <- if_else(fulldata$country %in% c("Slovenia", "Northern Ireland") & fulldata$year=="2020" & is.na(fulldata$pop) & fulldata$age=="15-64",
max(fulldata$pop[fulldata$country=="Slovenia" & fulldata$year=="2020" & !is.na(fulldata$pop) & fulldata$age=="15-64"]),
fulldata$pop)
fulldata$pop <- if_else(fulldata$country %in% c("Slovenia", "Northern Ireland") & fulldata$year=="2020" & is.na(fulldata$pop) & fulldata$age=="65-74",
max(fulldata$pop[fulldata$country=="Slovenia" & fulldata$year=="2020" & !is.na(fulldata$pop) & fulldata$age=="65-74"]),
fulldata$pop)
fulldata$pop <- if_else(fulldata$country %in% c("Slovenia", "Northern Ireland") & fulldata$year=="2020" & is.na(fulldata$pop) & fulldata$age=="75-84",
max(fulldata$pop[fulldata$country=="Slovenia" & fulldata$year=="2020" & !is.na(fulldata$pop) & fulldata$age=="75-84"]),
fulldata$pop)
fulldata$pop <- if_else(fulldata$country %in% c("Slovenia", "Northern Ireland") & fulldata$year=="2020" & is.na(fulldata$pop) & fulldata$age=="85+",
max(fulldata$pop[fulldata$country=="Slovenia" & fulldata$year=="2020" & !is.na(fulldata$pop) & fulldata$age=="85+"]),
fulldata$pop)
natdata <- fulldata %>%
group_by(country, week) %>%
summarise(mean_d=sum(mean_d), min_d=sum(min_d), max_d=sum(max_d), deaths=sum(deaths),
pop=sum(pop), excess_d=sum(excess_d))
pop <- natdata %>%
filter(week==1) %>%
select(country, pop)
natdata <- merge(natdata, pop, by="country")
natdata <- natdata %>%
mutate(mean_r=mean_d*100000/pop.y, min_r=min_d*100000/pop.y, max_r=max_d*100000/pop.y,
mortrate=deaths*100000/pop.y, excess_r=mortrate-mean_r)
tiff("Outputs/ExcessEUROverall.tiff", units="in", width=10, height=8, res=500)
ggplot(subset(natdata, !country %in% c("Iceland") & week<53))+
geom_ribbon(aes(x=week, ymax=max_r, ymin=min_r), fill="Skyblue2")+
geom_line(aes(x=week, y=mortrate), colour="red")+
geom_line(aes(x=week, y=mean_r), colour="Grey50", linetype=2)+
geom_ribbon(aes(x=week, ymax=mortrate, ymin=mean_r), fill="red", alpha=0.2)+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Deaths per 100,000")+
facet_wrap(~country)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown(), plot.title=element_text(face="bold"))+
labs(title="Excess mortality rates around the world",
subtitle="Registered weekly death rates in 2020 compared to the range for 2010-19.
Note that due to differences in reporting delays, some countries are missing or undercounted in recent weeks",
caption="Data from mortality.org, Insee, ISTAT, ONS, NRS and NISRA | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/ExcessUSA.tiff", units="in", width=10, height=8, res=500)
ggplot(subset(natdata, country=="USA" & week<53))+
geom_ribbon(aes(x=week, ymax=max_r, ymin=min_r), fill="Skyblue2")+
geom_line(aes(x=week, y=mortrate), colour="red")+
geom_line(aes(x=week, y=mean_r), colour="Grey50", linetype=2)+
geom_ribbon(aes(x=week, ymax=mortrate, ymin=mean_r), fill="red", alpha=0.2)+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Deaths per 100,000", limits=c(0,NA))+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Excess mortality in the United States of America",
subtitle="Registered weekly death rates in 2020 compared to the range for 2010-19
Data for most recent weeks is likely to be undercounted.",
caption="Data from mortality.org | Plot by @VictimOfMaths")
dev.off()
#Plots
plotage <- "85+"
plotdata <- subset(fulldata, age==plotage & !is.na(excess_r))
plotexcess <- subset(excess, age==plotage)
plotdata$country <- factor(plotdata$country, levels=levels(excessrank$country))
plotdata <- plotdata%>%
group_by(country) %>%
mutate(maxweek=max(week))
tileplot <- ggplot()+
geom_tile(data=plotdata, aes(x=week, y=country, fill=excess_r))+
scale_x_continuous(limits=c(0,50), breaks=c(0,5,10,15,20,25,30,35,40,45,50), name="Week")+
scale_y_discrete(name="")+
scale_fill_paletteer_c("pals::kovesi.diverging_gwr_55_95_c38", limit=c(-1,1)*max(abs(plotdata$excess_r)),
name="Weekly excess deaths\nper 100,000")+
geom_text(data=subset(excess, age==plotage), aes(x=maxweek+1, y=country, label=excessprop), hjust=0, size=rel(3), colour="White")+
labs(title=paste0("International variation in mortality rates in ages ", plotage),
subtitle=paste0("Excess weekly all-cause death rates in 2020 compared to 2010-19 average.\nCountries ordered by overall change in deaths across all ages."),
caption="Data from mortality.org, Insee, ISTAT, ONS & NRS | Plot by @VictimOfMaths")+
theme_classic()+
theme(panel.background=element_rect(fill="Black"), plot.background=element_rect(fill="Black"),
axis.line=element_line(colour="White"), text=element_text(colour="White"),
axis.text=element_text(colour="White"), axis.ticks=element_line(colour="White"),
legend.background=element_rect(fill="Black"),legend.text=element_text(colour="White"),
plot.title.position="plot")
tiff(paste0("Outputs/ExcessEURUSHeatmap", plotage, ".tiff"), units="in", width=10, height=8, res=300)
tileplot
dev.off()
png(paste0("Outputs/ExcessEURUSHeatmap", plotage, ".png"), units="in", width=10, height=8, res=300)
tileplot
dev.off()
#############################################
tiff("Outputs/ExcessEURTiming.tiff", units="in", width=10, height=8, res=500)
fulldata %>%
select(age, country, week, excess_r) %>%
group_by(country, age) %>%
filter(!is.na(excess_r) & excess_r>0 & !age %in% c("0-14", "15-64") &
country %in% c("England & Wales", "France", "Italy", "Scotland", "Spain",
"Sweden", "USA")) %>%
mutate(max_excess=max(excess_r), maxprop=excess_r/max_excess) %>%
ggplot()+
geom_line(aes(x=week, y=maxprop, colour=age))+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Proportion of peak number of deaths by age group",
labels = scales::percent_format(accuracy = 1))+
scale_colour_paletteer_d("fishualize::Acanthurus_olivaceus", name="Age")+
facet_wrap(~country)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Was the mortality peak later in older age groups?",
subtitle="Weekly all-cause deaths by age in 2020 as a proportion of the maximum weekly count for selected countries",
caption="Data from ONS, Insee, ISTAT, NRS and mortality.org | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/COVIDAgeMortPred.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(arrow)
library(readxl)
library(RcppRoll)
library(paletteer)
library(lubridate)
library(geofacet)
library(scales)
library(extrafont)
library(ragg)
#Select start data for analysis
startdate <- as.Date("2021-05-01")
#Pull in deaths data
temp <- tempfile()
source1 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newDeaths28DaysByDeathDate&format=csv"
temp <- curl_download(url=source1, destfile=temp, quiet=FALSE, mode="wb")
deaths1 <- read.csv(temp)
source2 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newDeaths28DaysByDeathDate&format=csv"
temp <- curl_download(url=source2, destfile=temp, quiet=FALSE, mode="wb")
deaths2 <- read.csv(temp)
source3 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newDeaths28DaysByDeathDate&format=csv"
temp <- curl_download(url=source3, destfile=temp, quiet=FALSE, mode="wb")
deaths3 <- read.csv(temp)
deaths <- bind_rows(deaths1, deaths2, deaths3) %>%
mutate(date=as.Date(date)) %>%
filter(date>startdate) %>%
group_by(areaCode, areaName) %>%
rename(deaths=newDeaths28DaysByDeathDate) %>%
#calculate rolling average
mutate(deathsroll=roll_mean(deaths, 7, align="center", fill=NA_real_)) %>%
ungroup()
#Get age-specific data
temp1 <- tempfile()
source1 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode="wb")
temp2 <- tempfile()
source2 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode="wb")
temp3 <- tempfile()
source3 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp3 <- curl_download(url=source3, destfile=temp3, quiet=FALSE, mode="wb")
data <- read_csv_arrow(temp1) %>%
bind_rows(read_csv_arrow(temp2), read_csv_arrow(temp3)) %>%
select(c(1:6)) %>%
filter(age!="unassigned") %>%
mutate(age=case_when(
age=="00_04" ~ "0_4",
age=="05_09" ~ "5-9",
TRUE ~ age),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+"))) %>%
#Remove two bonus age categories that we don't need (0-59 and 60+)
filter(!is.na(age))
n.areas=length(unique(data$areaCode))
n.ages=length(unique(data$age))
max.date.1=max(deaths$date[!is.na(deaths$deathsroll)], na.rm=TRUE)
max.date.2=max(data$date)
max.date=min(max.date.1, max.date.2)
#Create future dataframe
future <- data.frame(date=rep(seq.Date(from=as.Date(max.date.2+days(1)),
to=as.Date(max.date.2+days(71)), by="days"),
times=n.areas*n.ages),
areaCode=rep(unique(data$areaCode), each=n.ages*71),
age=rep(unique(data$age), times=n.areas*71),
cases=0)
#merge in areaName and areaType
future <- data %>%
select(areaCode, areaName, areaType) %>%
unique() %>%
merge(future, by="areaCode")
#Read in CFR data provided by Dan Howdon
#These estimates are not mine to share, sorry, contact Dan for more info.
#https://medicinehealth.leeds.ac.uk/medicine/staff/447/dr-dan-howdon
CFRdata <- read.csv("Data/cfrs_2021_07_07.csv") %>%
mutate(age=case_when(
agegroup==0 ~ "0-4", agegroup==5 ~ "5-9", agegroup==10 ~ "10-14", agegroup==15 ~ "15-19",
agegroup==20 ~ "20-24", agegroup==25 ~ "25-29", agegroup==30 ~ "30-34",
agegroup==35 ~ "35-39", agegroup==40 ~ "40-44", agegroup==45 ~ "45-49",
agegroup==50 ~ "50-54", agegroup==55 ~ "55-59", agegroup==60 ~ "60-64",
agegroup==65 ~ "65-69", agegroup==70 ~ "70-74", agegroup==75 ~ "75-79",
agegroup==80 ~ "80-84", agegroup==85 ~ "85-89", TRUE ~ "90+"),
date=as.Date(date, format="%d/%m/%Y"),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+")))
maxCFRdate <- max(CFRdata$date[!is.na(CFRdata$cfr_month)])
#Just extract the most recent monthly CFRs
CFRs <- CFRdata %>%
filter(date==maxCFRdate) %>%
mutate(CFR=cfr_month*100) %>%
select(age, CFR)
#Calculate expected deaths by age group based on case numbers and CFRs,
#assuming an infection to death distribution that is lognormal with location 2.71 and
#shape 0.56 from Wood 2020 https://arxiv.org/pdf/2005.02090.pdf
#As used by https://www.cebm.net/covid-19/the-declining-case-fatality-ratio-in-england/
lognorm <- dlnorm(1:70, meanlog=2.71, sdlog=0.56)
#Start calculations from 1st September, so need to lag back at least 70 days
#(Over 99.2% of deaths are within this time frame)
pred.data <- data %>%
filter(date>startdate-days(75)) %>%
bind_rows(future) %>%
merge(CFRs) %>%
mutate(tot.deaths=cases*CFR/100) %>%
#Calculate 7-day rolling average of cases
group_by(areaCode, areaName, areaType, age) %>%
arrange(date) %>%
#Distribute the deaths for each days cases based using the assumed distribution
#(I bet there is a sexy vectorised approach to this that can be
#written in a line or two)
mutate(exp.deaths=lag(tot.deaths,1)*lognorm[1]+
lag(tot.deaths,2)*lognorm[2]+
lag(tot.deaths,3)*lognorm[3]+
lag(tot.deaths,4)*lognorm[4]+
lag(tot.deaths,5)*lognorm[5]+
lag(tot.deaths,6)*lognorm[6]+
lag(tot.deaths,7)*lognorm[7]+
lag(tot.deaths,8)*lognorm[8]+
lag(tot.deaths,9)*lognorm[9]+
lag(tot.deaths,10)*lognorm[10]+
lag(tot.deaths,11)*lognorm[11]+
lag(tot.deaths,12)*lognorm[12]+
lag(tot.deaths,13)*lognorm[13]+
lag(tot.deaths,14)*lognorm[14]+
lag(tot.deaths,15)*lognorm[15]+
lag(tot.deaths,16)*lognorm[16]+
lag(tot.deaths,17)*lognorm[17]+
lag(tot.deaths,18)*lognorm[18]+
lag(tot.deaths,19)*lognorm[19]+
lag(tot.deaths,20)*lognorm[20]+
lag(tot.deaths,21)*lognorm[21]+
lag(tot.deaths,22)*lognorm[22]+
lag(tot.deaths,23)*lognorm[23]+
lag(tot.deaths,24)*lognorm[24]+
lag(tot.deaths,25)*lognorm[25]+
lag(tot.deaths,26)*lognorm[26]+
lag(tot.deaths,27)*lognorm[27]+
lag(tot.deaths,28)*lognorm[28]+
lag(tot.deaths,29)*lognorm[29]+
lag(tot.deaths,30)*lognorm[30]+
lag(tot.deaths,31)*lognorm[31]+
lag(tot.deaths,32)*lognorm[32]+
lag(tot.deaths,33)*lognorm[33]+
lag(tot.deaths,34)*lognorm[34]+
lag(tot.deaths,35)*lognorm[35]+
lag(tot.deaths,36)*lognorm[36]+
lag(tot.deaths,37)*lognorm[37]+
lag(tot.deaths,38)*lognorm[38]+
lag(tot.deaths,39)*lognorm[39]+
lag(tot.deaths,40)*lognorm[40]+
lag(tot.deaths,41)*lognorm[41]+
lag(tot.deaths,42)*lognorm[42]+
lag(tot.deaths,43)*lognorm[43]+
lag(tot.deaths,44)*lognorm[44]+
lag(tot.deaths,45)*lognorm[45]+
lag(tot.deaths,46)*lognorm[46]+
lag(tot.deaths,47)*lognorm[47]+
lag(tot.deaths,48)*lognorm[48]+
lag(tot.deaths,49)*lognorm[49]+
lag(tot.deaths,50)*lognorm[50]+
lag(tot.deaths,51)*lognorm[51]+
lag(tot.deaths,52)*lognorm[52]+
lag(tot.deaths,53)*lognorm[53]+
lag(tot.deaths,54)*lognorm[54]+
lag(tot.deaths,55)*lognorm[55]+
lag(tot.deaths,56)*lognorm[56]+
lag(tot.deaths,57)*lognorm[57]+
lag(tot.deaths,58)*lognorm[58]+
lag(tot.deaths,59)*lognorm[59]+
lag(tot.deaths,60)*lognorm[60]+
lag(tot.deaths,61)*lognorm[61]+
lag(tot.deaths,62)*lognorm[62]+
lag(tot.deaths,63)*lognorm[63]+
lag(tot.deaths,64)*lognorm[64]+
lag(tot.deaths,65)*lognorm[65]+
lag(tot.deaths,66)*lognorm[66]+
lag(tot.deaths,67)*lognorm[67]+
lag(tot.deaths,68)*lognorm[68]+
lag(tot.deaths,69)*lognorm[69]+
lag(tot.deaths,70)*lognorm[70]+
lag(tot.deaths,71)*(1-plnorm(70, meanlog=2.71, sdlog=0.56)))
#Compare cases to deaths to sense check
pred.data %>% filter(areaName=="England" & age=="90+") %>%
ggplot()+
geom_line(aes(x=date, y=cases, group=areaName), colour="Blue")+
geom_line(aes(x=date, y=exp.deaths, group=areaName), colour="tomato")
#Calculate total deaths by age group that haven't yet happened
area.pred.deathsxage <- pred.data %>%
filter(date>max.date.2) %>%
group_by(areaName, areaType, areaCode, age) %>%
summarise(exp.deaths=sum(exp.deaths))
area.pred.deaths.total <- pred.data %>%
filter(date>max.date.2) %>%
group_by(areaName, areaType, areaCode) %>%
summarise(exp.deaths=sum(exp.deaths))
#################
#Compare CFR estimation period with subsequent observed data
ggplot()+
#geom_rect(aes(xmin=as.Date("2021-05-04")-days(28), xmax=as.Date("2021-05-04"), ymin=0, ymax=500),
# fill="Grey80")+
geom_col(data=subset(pred.data, areaName=="England" & date>=as.Date("2021-05-04")-days(28)),
aes(x=as.Date(date), y=exp.deaths), fill="Skyblue")+
geom_line(data=subset(deaths, date>as.Date("2021-05-04")-days(28) &
date<=as.Date(max.date.1)-days(3) & areaName=="England"),
aes(x=as.Date(date), y=deathsroll), colour="Red")+
scale_fill_paletteer_d("pals::stepped", name="Age")+
scale_x_date(name="")+
scale_y_continuous(name="Expected daily deaths from COVID-19")+
theme_classic()+
#annotate("text", x=as.Date("2020-09-25"), y=450, label="CFRs estimated\nusing this data")+
#annotate("text", x=as.Date("2020-11-25"), y=450, label="Deaths modelled\nfrom estimated CFRs")+
#annotate("text", x=as.Date("2020-10-25"), y=320, label="Actual deaths")+
#geom_curve(aes(x=as.Date("2020-11-26"), y=430,
# xend=as.Date("2020-11-30"), yend=300), curvature=-0.30,
# arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
#geom_curve(aes(x=as.Date("2020-10-25"), y=300,
# xend=as.Date("2020-10-28"), yend=250), curvature=0.25,
# arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
labs(title="Case Fatality Rates estimated in October have stood up pretty well",
subtitle="Actual vs modelled deaths based on age-specific CFRs fitted to data from 05/09 - 16/10",
caption="Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths")
#Plot age-specific forecasts for England
Englabel <- round(area.pred.deaths.total$exp.deaths[area.pred.deaths.total$areaName=="England"],0)
EngPlot <- ggplot()+
geom_col(data=subset(pred.data, areaName=="England" & date>max.date-days(28)),
aes(x=as.Date(date), y=exp.deaths, fill=age))+
geom_line(data=subset(deaths, date>max.date-days(28) &
areaName=="England"),
aes(x=as.Date(date), y=deathsroll))+
geom_vline(xintercept=as.Date(max.date.1), linetype=2)+
scale_x_date(name="",
breaks=pretty_breaks(n=interval(as.Date("2020-09-01"), as.Date(max.date.1+days(71)))%/% months(1)))+
scale_y_continuous(name="Expected daily deaths from COVID-19")+
scale_fill_paletteer_d("pals::stepped", name="Age")+
annotate("text", x=as.Date("2021-06-26"), y=23, label="Actual deaths")+
annotate("text", x=as.Date("2021-08-03"), y=20, label="Modelled deaths")+
geom_curve(aes(x=as.Date("2021-06-28"), y=22,
xend=as.Date("2021-07-01"), yend=19.5), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=as.Date("2021-08-01"), y=19,
xend=as.Date("2021-07-20"), yend=12), curvature=-0.25,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)),
plot.title.position="plot", text=element_text(family="Lato"),
plot.caption.position = "plot")+
labs(title=paste0("Even if COVID-19 disappeared today, we'd still expect ", Englabel,
" more COVID-19 deaths over the coming months"),
subtitle="Modelled COVID-19 deaths in England based on confirmed cases and the latest age-specific Case Fatality Rates",
caption="Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths")
tiff("Outputs/COVIDDeathForecastEng.tiff", units="in", width=12, height=7, res=500)
EngPlot
dev.off()
png("Outputs/COVIDDeathForecastEng.png", units="in", width=12, height=7, res=500)
EngPlot
dev.off()
#Plot age distribution of forecasted deaths for England
tiff("Outputs/COVIDDeathForecastEngxAge.tiff", units="in", width=10, height=6, res=500)
area.pred.deathsxage %>%
filter(areaName=="England") %>%
ggplot()+
geom_col(aes(x=exp.deaths, y=fct_rev(age), fill=age), show.legend=FALSE)+
geom_text(aes(x=exp.deaths, y=fct_rev(age), label=round(exp.deaths,0)),
hjust=-0.2)+
scale_x_continuous(name="Expected future COVID-19 deaths")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_d("pals::stepped")+
theme_classic()+
labs(title="The highest number of COVID-19 deaths is expected to be in 80-84 year-olds",
subtitle="Modelled future COVID-19 deaths in England",
caption="Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths")
dev.off()
#Plot age-specific forecasts for anywhere you like
area <- "Bolton"
Plotlabel <- unique(round(area.pred.deaths.total$exp.deaths[area.pred.deaths.total$areaName==area],0))
agg_tiff(paste0("Outputs/COVIDDeathForecast",area,".tiff"), units="in", width=10, height=8, res=500)
ggplot()+
geom_col(data=subset(pred.data, areaName==area),
aes(x=as.Date(date), y=exp.deaths, fill=age))+
geom_line(data=subset(deaths, areaName==area & date<=as.Date(max.date.2)),
aes(x=as.Date(date), y=deathsroll))+
geom_vline(xintercept=as.Date(max.date.1), linetype=2)+
scale_x_date(name="",
breaks=pretty_breaks(n=interval(as.Date("2020-09-01"),
as.Date(max.date.1+days(71)))%/% months(1)),
limits=c(as.Date("2021-05-01"), NA))+
scale_y_continuous(name="Expected daily deaths from COVID-19", limits=c(0,0.75))+
scale_fill_paletteer_d("pals::stepped", name="Age")+
theme_classic()+
theme(plot.title.position="plot", text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)))+
labs(title=paste0("Based on cases to date, we'd expect ", Plotlabel,
" more COVID-19 deaths in ", area),
subtitle="Modelled COVID-19 deaths based on confirmed cases and the latest age-specific Case Fatality Rates\nThe black line shows observed deaths to date",
caption="Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths")
dev.off()
#Regional faceted plots
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),
code=c(1:9))
pred.data <- arrange(pred.data, areaName)
reglabs <- data.frame(areaName=unique(pred.data$areaName[pred.data$areaType=="region"]),
total=round(area.pred.deaths.total$exp.deaths[area.pred.deaths.total$areaType=="region"],0))
reglabs$label <- if_else(reglabs$areaName=="North East", paste0(reglabs$total, " Expected\nfuture deaths"),
as.character(reglabs$total))
tiff("Outputs/COVIDDeathForecastReg.tiff", units="in", width=12, height=7, res=500)
pred.data %>%
filter(areaType=="region") %>%
ggplot()+
geom_col(aes(x=as.Date(date), y=exp.deaths, fill=age))+
geom_line(data=subset(deaths, areaName %in% c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East") & date<=as.Date(max.date.2)),
aes(x=as.Date(date), y=deathsroll, group=areaName))+
geom_vline(xintercept=as.Date(max.date.1), linetype=2)+
geom_text(data=reglabs, aes(x=as.Date("2021-05-22"), y=7, label=label))+
scale_x_date(name="",
breaks=pretty_breaks(n=interval(as.Date("2020-09-01"), as.Date(max.date.1+days(71)))%/% months(1)))+
scale_y_continuous(name="Expected daily deaths from COVID-19")+
scale_fill_paletteer_d("pals::stepped", name="Age")+
facet_geo(~areaName, grid=mygrid)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"),
axis.text=element_text(size=rel(0.7)))+
labs(title="All regions in England can expect to see a rise in COVID deaths",
subtitle="Modelled COVID-19 deaths in English regions based on confirmed cases and the latest age-specific Case Fatality Rates\nBlack lines show the rolling 7-day average of observed deaths for each region",
caption="Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/COVIDCareHomeDeaths.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(forcats)
library(paletteer)
library(scales)
library(lubridate)
library(ragg)
library(RcppRoll)
library(extrafont)
#Increment by 7 each week
MaxRange <- "CH"
#Increment by 1 each week
MaxRange2 <- "M"
#Read in data on deaths in care home residents notified to CQC
#https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/numberofdeathsincarehomesnotifiedtothecarequalitycommissionengland
temp21 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/numberofdeathsincarehomesnotifiedtothecarequalitycommissionengland/2021/20210329officialsensitivecoviddeathsnotifs20211.xlsx"
temp21 <- curl_download(url=source, destfile=temp21, quiet=FALSE, mode="wb")
#2020 data
temp20 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/numberofdeathsincarehomesnotifiedtothecarequalitycommissionengland/2020/20210211coviddeathnotifs2020only.xlsx"
temp20 <- curl_download(url=source, destfile=temp20, quiet=FALSE, mode="wb")
#Deaths from COVID
data.COVID.21 <- read_excel(temp21, sheet="Table 2", range=paste0("A4:", MaxRange, "153"),
col_names=FALSE) %>%
gather(date, COVID, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-01-01")+days(as.numeric(substr(date, 4,6))-2)) %>%
rename(name=`...1`)
data.COVID.20 <- read_excel(temp20, sheet="Table 2", range=paste0("A4:JG153"),
col_names=FALSE) %>%
gather(date, COVID, c(2:ncol(.))) %>%
mutate(date=as.Date("2020-04-10")+days(as.numeric(substr(date, 4,6))-2)) %>%
rename(name=`...1`)
data.COVID <- bind_rows(data.COVID.21, data.COVID.20)
#Deaths from all causes
data.all.21 <- read_excel(temp21, sheet="Table 3", range=paste0("A4:", MaxRange, "153"),
col_names=FALSE) %>%
gather(date, AllCause, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-01-01")+days(as.numeric(substr(date, 4,6))-2))%>%
rename(name=`...1`)
data.all.20 <- read_excel(temp20, sheet="Table 3", range=paste0("A4:JG153"),
col_names=FALSE) %>%
gather(date, AllCause, c(2:ncol(.))) %>%
mutate(date=as.Date("2020-04-10")+days(as.numeric(substr(date, 4,6))-2))%>%
rename(name=`...1`)
data.all <- bind_rows(data.all.21, data.all.20)
#Combine
data <- merge(data.COVID, data.all) %>%
#Calculate other causes
mutate(Other=AllCause-COVID, COVIDprop=if_else(is.na(COVID/AllCause), 0, COVID/AllCause)) %>%
gather(cause, deaths, c(3:5)) %>%
group_by(name, cause) %>%
mutate(deathsroll=roll_mean(deaths, 7, align="center", fill=NA),
COVIDproproll=roll_mean(COVIDprop, 7, align="center", fill=NA),
maxprop=max(COVIDproproll, na.rm=TRUE),
maxpropday=date[which(COVIDproproll==maxprop)][1],
cause=factor(cause, levels=c("Other", "COVID", "AllCause")))
data %>%
filter(name=="England" & cause!="AllCause" & !is.na(deathsroll)) %>%
ggplot()+
geom_area(data=subset(data, name=="England" ),
aes(x=date, y=deathsroll, fill=cause), position="stack")+
scale_x_date(name="", breaks=pretty_breaks())+
scale_y_continuous(name="Daily deaths in care homes")+
scale_fill_paletteer_d("NineteenEightyR::malibu")+
theme_classic()
plotfrom=min(data$date[!is.na(data$deathsroll)])
plotto=max(data$date[!is.na(data$deathsroll)])
agg_tiff("Outputs/ONSCQCDeathsxCause.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_area(data=subset(data, name=="England" & cause=="COVID" & !is.na(deathsroll)),
aes(x=date, y=deathsroll), fill="#F44B4B")+
geom_area(data=subset(data, name=="England" & cause=="Other" & !is.na(deathsroll)),
aes(x=date, y=-deathsroll), fill="#F19743")+
geom_hline(yintercept=0)+
scale_x_date(name="", breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
scale_y_continuous(name="Daily deaths in care homes", labels=abs)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
plot.subtitle=element_markdown(), text=element_text(family="Roboto"))+
labs(title="There are now very few COVID-19 deaths in care homes",
subtitle="Deaths from COVID-19 and all other causes notified to the Care Quality Commission, by date of notification",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Read in place of death data for care home residents
#Deaths from All Causes
data.COVID.21.2 <- read_excel(temp21, sheet="Table 4", range=paste0("A6:", MaxRange2, "9"),
col_names=FALSE) %>%
gather(week, AllCause, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4,6))+52,
location=case_when(
`...1` %in% c("Elsewhere", "Not Stated") ~ "Other/Unknown",
TRUE ~ `...1`)) %>%
group_by(week, location) %>%
mutate(AllCause=as.numeric(AllCause)) %>%
summarise(AllCause=sum(AllCause)) %>%
ungroup()
data.COVID.20.2 <- read_excel(temp20, sheet="Table 4", range=paste0("A6:AM9"),
col_names=FALSE) %>%
gather(week, AllCause, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4,6))+14,
location=case_when(
`...1` %in% c("Elsewhere", "Not Stated") ~ "Other/Unknown",
TRUE ~ `...1`)) %>%
group_by(week, location) %>%
mutate(AllCause=as.numeric(AllCause)) %>%
summarise(AllCause=sum(AllCause)) %>%
ungroup()
data.COVID.2 <- bind_rows(data.COVID.21.2, data.COVID.20.2)
#Deaths from COVID
data.all.21.2 <- read_excel(temp21, sheet="Table 4", range=paste0("A12:", MaxRange2, "15"),
col_names=FALSE) %>%
gather(week, COVID, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4,6))+52,
location=case_when(
`...1` %in% c("Elsewhere", "Not Stated") ~ "Other/Unknown",
TRUE ~ `...1`)) %>%
group_by(week, location) %>%
mutate(COVID=as.numeric(COVID)) %>%
summarise(COVID=sum(COVID)) %>%
ungroup()
data.all.20.2 <- read_excel(temp20, sheet="Table 4", range=paste0("A12:AM159"),
col_names=FALSE) %>%
gather(week, COVID, c(2:ncol(.))) %>%
mutate(week=as.numeric(substr(week, 4,6))+14,
location=case_when(
`...1` %in% c("Elsewhere", "Not Stated") ~ "Other/Unknown",
TRUE ~ `...1`)) %>%
group_by(week, location) %>%
mutate(COVID=as.numeric(COVID)) %>%
summarise(COVID=sum(COVID)) %>%
ungroup()
data.all.2 <- bind_rows(data.all.21.2, data.all.20.2) %>%
#Merge
merge(data.COVID.2) %>%
mutate(Other=AllCause-COVID) %>%
gather(cause, deaths, c(3:5)) %>%
mutate(causeloc=case_when(
cause=="COVID" ~ paste0("COVID-19 deaths in ", location),
cause=="Other" ~ paste0("Other cause deaths in ", location)),
date=as.Date("2020-04-13")+days(7*(week-16)))
agg_tiff("Outputs/ONSCQCDeathsxCausexLoc.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(data.all.2, cause!="AllCause"))+
geom_col(aes(x=date, y=deaths, fill=causeloc))+
scale_x_date(name="", breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
scale_y_continuous(name="Deaths of care home residents")+
scale_fill_manual(values=c("#C70E7B", "#007BC3", "#EF7C12", "#FC6882", "#54BCD1", "#F4B95A"),
name="Cause and place of death")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)), text=element_text(family="Roboto"))+
labs(title="Fewer care home residents are dying of COVID-19 in all settings",
subtitle="Weekly deaths notified to the Care Quality Commission of care home residents\nby cause and location.",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#heatmap
agg_tiff("Outputs/ONSCQCDeathsHeatmap.tiff", units="in", width=13, height=14, res=500)
data %>%
filter(name!="England" & cause=="AllCause" & !is.na(COVIDproproll)) %>%
ggplot()+
geom_tile(aes(x=date, y=fct_reorder(name, maxpropday), fill=COVIDproproll))+
theme_classic()+
scale_fill_paletteer_c("pals::ocean.haline", name="Proportion of deaths\ninvolving COVID",
labels=scales::percent)+
scale_y_discrete(name="")+
scale_x_date(name="")+
theme(plot.title=element_text(face="bold", size=rel(1.2)), text=element_text(family="Roboto"))+
labs(title="There are very few COVID-19 deaths in care homes anywhere in England",
subtitle="Proportion of deaths in care homes notified to CQC recorded as involving COVID-19 by Local Authority in England.\nAuthorities are ordered by the date on which the highest proportion of deaths involved COVID-19.",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/COVIDDeathsMSOA.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(scales)
library(gtools)
library(ggtext)
#Download MSOA-level COVID deaths
temp <- tempfile()
url <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/deathsduetocovid19bylocalareaanddeprivation/december2020/covidlocalareadeprivationupdate.xlsx"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
deaths <- read_excel(temp, sheet="Table 5", range="A13:AM7214") %>%
select(-c(4,16,28))
colnames(deaths) <- c("MSOA11CD", "msoanm", "Name", "All.Mar", "All.Apr", "All.May",
"All.Jun", "All.Jul", "All.Aug", "All.Sep", "All.Oct", "All.Nov",
"All.Dec", "All.Total", "COVID.Mar", "COVID.Apr", "COVID.May",
"COVID.Jun", "COVID.Jul", "COVID.Aug", "COVID.Sep", "COVID.Oct",
"COVID.Nov", "COVID.Dec", "COVID.Total", "Other.Mar", "Other.Apr",
"Other.May", "Other.Jun", "Other.Jul", "Other.Aug", "Other.Sep",
"Other.Oct", "Other.Nov", "Other.Dec", "Other.Total")
deaths <- pivot_longer(deaths, c(4:36), names_to=c("cause", "month"), names_sep="\\.",
values_to=c("deaths"))
deaths.total <- deaths %>%
filter(month=="Total") %>%
spread(cause, deaths) %>%
mutate(covprop=COVID/All)
#Bring in deprivation estimates
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE)[,c(1,2,5,6)]
colnames(IMD) <- c("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
temp <- tempfile()
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, RGN11NM) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read_excel(file.path(temp2, "SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx"),
sheet="Mid-2019 Persons", range="A6:G34758", col_names=FALSE)[,c(1,7)]
colnames(pop) <- c("LSOA11CD", "pop")
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
#Then merge into COVID case data
merge(deaths.total, by="MSOA11CD", all=TRUE) %>%
rename(msoa11cd=MSOA11CD)
#Download Carl Baker's lovely map
temp <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
Background <- st_read(temp, layer="5 Background")
MSOA <- st_read(temp, layer="4 MSOA hex") %>%
left_join(IMD_MSOA, by="msoa11cd")
Groups <- st_read(temp, layer="2 Groups")
Group_labels <- st_read(temp, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAs <- st_read(temp, layer="3 Local authority outlines (2019)")
tiff("Outputs/COVIDDeathsMSOA.tiff", units="in", width=10, height=8, res=800)
ggplot()+
geom_sf(data=Background, aes(geometry=geom))+
geom_sf(data=MSOA, aes(geometry=geom, fill=covprop), colour=NA)+
geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour="White")+
geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of deaths\nfrom COVID-19",
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="COVID-19 is responsible for a greater proportion of deaths in urban areas",
subtitle="Proportion of all deaths in Mar-Dec 2020 which are due to COVID in Middle Super Output Areas",
caption="Data from ONS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDDeathsMSOACumul.tiff", units="in", width=10, height=8, res=800)
ggplot()+
geom_sf(data=Background, aes(geometry=geom))+
geom_sf(data=MSOA, aes(geometry=geom, fill=COVID*100000/pop), colour=NA)+
geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour="White")+
geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("viridis::inferno", direction=-1,
name="Total COVID deaths\nper 100,000")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="COVID-19 death rates are highest in the North of England",
subtitle="Total COVID-19 deaths between March and December 2020 in English Middle Super Output Areas",
caption="Data from ONS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
dev.off()
#Bivariate cartogram
#Bivariate map
BVmapdata <- MSOA %>%
mutate(IMDtert=quantcut(-IMDrank, q=4, labels=FALSE),
covtert=quantcut(covprop, q=4, labels=FALSE))
#Generate key
keydata <- data.frame(IMDtert=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4),
covtert=c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4),
RGB=c("#e8e8e8","#b9dddd","#89d3d3","#5ac8c8",
"#dabcd4","#acb2ca","#7ea8c1","#509eb7",
"#cc90c0","#9f86b7","#727dae","#4573a5",
"#be64ac","#925ba4","#67529c","#3b4994"))
#Bring colours into main data for plotting
BVmapdata <- left_join(BVmapdata, keydata, by=c("IMDtert", "covtert")) %>%
mutate(RGB=if_else(substr(cuacode,1,1)=="W", "White", as.character(RGB)))
#Bivariate map
BVmap <- BVmapdata %>%
ggplot()+
geom_sf(data=Background, aes(geometry=geom))+
geom_sf(data=BVmapdata, aes(geometry=geom, fill=RGB), colour=NA)+
geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour="White", size=0.5)+
geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_identity()+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="COVID-19 deaths are highest in deprived urban areas",
subtitle="Proportion of total deaths in Mar-Dec 2020 attributable to COVID compared to Index of Multiple Deprivation ranks\nfor Middle Super Output Areas (MSOAs) in England",
caption="Data from PHE, ONS & MHCLG | Cartogram by @carlbaker | Plot by @VictimOfMaths")
#Bivariate key
key <- ggplot(keydata)+
geom_tile(aes(x=covtert, y=IMDtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("Greater % of deaths from COVID" %->% ""),
y = expression("Greater deprivation" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
#Final plot
tiff("Outputs/COVIDDeathPropMSOA.tiff", units="in", width=8, height=10, res=500)
ggdraw()+
draw_plot(BVmap, 0,0,1,1)+
draw_plot(key, 0.68,0.66,0.28,0.28)
dev.off()
#Scatterplot
tiff("Outputs/COVIDDeathPropMSOAScatter.tiff", units="in", width=8, height=6, res=500)
ggplot(IMD_MSOA, aes(x=covprop, y=-IMDrank, colour=COVID))+
geom_point()+
geom_smooth(method="lm", colour="Darkred")+
scale_x_continuous(name="Proportion of all deaths which were from COVID",
labels=label_percent(accuracy=1))+
scale_y_continuous(name="Index of Multiple Deprivation",
breaks=c(-max(IMD_MSOA$IMDrank, na.rm=TRUE),
-min(IMD_MSOA$IMDrank, na.rm=TRUE)),
labels=c("Least Deprived", "Most Deprived"))+
scale_colour_paletteer_c("pals::ocean.haline", name="Total COVID deaths",
direction=-1)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="On average more deprived areas have seen more COVID-19 deaths",
subtitle="Proportion of all deaths in March-December 2020 which were due to COVID-19 by deprivation\nin English Middle Super Output Areas",
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")
dev.off()
#########################################################################
#Look at wave 1 vs. wave 2 deaths
waves <- deaths %>%
filter(month!="Total") %>%
mutate(wave=if_else(month %in% c("Mar", "Apr", "May", "Jun", "Jul"), "Wave 1", "Wave 2")) %>%
group_by(MSOA11CD, cause, wave) %>%
summarise(deaths=sum(deaths)) %>%
spread(wave, deaths) %>%
ungroup() %>%
mutate(ratio=`Wave 1`/(`Wave 1`+ `Wave 2`)) %>%
rename(msoa11cd=MSOA11CD)
#Merge into map
temp <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
Background <- st_read(temp, layer="5 Background")
MSOA <- st_read(temp, layer="4 MSOA hex") %>%
left_join(waves, by="msoa11cd")
Groups <- st_read(temp, layer="2 Groups")
Group_labels <- st_read(temp, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAs <- st_read(temp, layer="3 Local authority outlines (2019)")
tiff("Outputs/COVIDDeathsMSOAWaves.tiff", units="in", width=10, height=8, res=800)
ggplot()+
geom_sf(data=Background, aes(geometry=geom), fill="Grey60")+
geom_sf(data=MSOA, aes(geometry=geom, fill=ratio), colour=NA)+
geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour="Grey40", size=0.1)+
geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.balance",
name="", breaks=c(0, 0.5, 1),
labels=c("More deaths\nin Aug-Dec", "Equal deaths", "More deaths\nin Mar-Jul"))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
plot.subtitle=element_markdown())+
labs(title="There seems to be little evidence for 'herd immunity' for mortality even at small geographies",
subtitle="Proportion of total COVID-19 deaths which occurred in March-July compared to August-December.
Data at Middle Super Output Area level",
caption="Data from ONS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/COVIDDeathsxAgeEW.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ragg)
library(lubridate)
library(extrafont)
library(ggtext)
library(ggstream)
library(paletteer)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Get 2021 COVID deaths data
url21 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek3820211.xlsx"
temp <- tempfile()
temp <- curl_download(url=url21, destfile=temp, quiet=FALSE, mode="wb")
COVIDdeaths21 <- read_excel(temp, sheet=7, range="B12:AN31", col_names=FALSE) %>%
gather(week, COVID, c(2:ncol(.))) %>%
rename(age=`...1`) %>%
mutate(week=as.numeric(substr(week, 4, 5))-1,
date=as.Date("2021-01-02")+weeks(week-1))
#Get 2020 COVID deaths data
url20 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx"
temp <- tempfile()
temp <- curl_download(url=url20, destfile=temp, quiet=FALSE, mode="wb")
COVIDdeaths20 <- read_excel(temp, sheet=6, range="B12:BC31", col_names=FALSE) %>%
gather(week, COVID, c(2:ncol(.))) %>%
rename(age=`...1`) %>%
mutate(week=as.numeric(substr(week, 4, 5))-1,
date=as.Date("2019-12-28")+weeks(week-1))
data <- bind_rows(COVIDdeaths20, COVIDdeaths21) %>%
mutate(age=factor(age, levels=c("<1", "1-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34",
"35-39", "40-44", "45-49", "50-54", "55-59", "60-64", "65-69",
"70-74", "75-79", "80-84", "85-89", "90+")))
meanage <- data %>%
group_by(date) %>%
mutate(agemid=case_when(
age=="<1" ~ 0.5, age=="1-4" ~ 2.5, age=="5-9" ~ 7.5, age=="10-14" ~ 12.5,
age=="15-19" ~ 17.5, age=="20-24" ~ 22.5, age=="25-29" ~ 27.5, age=="30-34" ~ 32.5,
age=="35-39" ~ 37.5, age=="40-44" ~ 42.5, age=="45-49" ~ 47.5, age=="50-54" ~ 52.5,
age=="55-59" ~ 57.5, age=="60-64" ~ 62.5, age=="65-69" ~ 67.5, age=="70-74" ~ 72.5,
age=="75-79" ~ 77.5, age=="80-84" ~ 82.5, age=="85-89" ~ 87.5, age=="90+" ~ 92.5)) %>%
summarise(meanage=weighted.mean(agemid, COVID)) %>%
ungroup()
agg_tiff("Outputs/COVIDeathsMeanAge.tiff", units="in", width=9, height=6, res=500)
ggplot(meanage, aes(x=date, y=meanage))+
geom_line(colour="Red")+
scale_x_date(name="")+
scale_y_continuous(name="Average age of COVID death")+
theme_custom()+
labs(title="COVID vaccines have substantially reduced the average age of COVID deaths",
subtitle="Mean age of deaths involving COVID by week of registration in England & Wales",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDeathsEWxAgeProp.tiff", units="in", width=10, height=7, res=500)
ggplot(data %>% filter(date>=as.Date("2020-03-07")), aes(x=date, y=COVID, fill=age))+
geom_col(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of COVID deaths", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("pals::stepped", name="Age")+
theme_custom()+
labs(title="The proportion of COVID deaths among older age groups fell as vaccines were rolled out",
subtitle="Deaths involving COVID by age and week of registration in England & Wales",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDeathsEWxAge.tiff", units="in", width=9, height=6, res=500)
ggplot(data %>% filter(date>=as.Date("2020-03-07")), aes(x=date, y=COVID, fill=age))+
geom_col()+
scale_x_date(name="")+
scale_y_continuous(name="Deaths involving COVID")+
scale_fill_paletteer_d("pals::stepped", name="Age")+
theme_custom()+
labs(title="COVID deaths in the delta wave are much lower than previous waves for all ages",
subtitle="Deaths involving COVID by age and week of registration in England & Wales",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDeathsEWxAgeStream.tiff", units="in", width=9, height=6, res=500)
ggplot(data %>% filter(date>=as.Date("2020-03-07")), aes(x=date, y=COVID, fill=age))+
geom_stream()+
scale_x_date(name="")+
scale_y_continuous(name="Deaths involving COVID")+
scale_fill_paletteer_d("pals::stepped", name="Age")+
theme_custom()+
labs(title="COVID deaths in the delta wave are much lower than previous waves for all ages",
subtitle="Mean age of deaths involving COVID by week of registration in England & Wales",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/COVIDDeathsxRegion.R
================================================
rm(list=ls())
library(tidyverse)
library(ukcovid19) #remotes::install_github("publichealthengland/coronavirus-dashboard-api-R-sdk")
library(paletteer)
library(RcppRoll)
library(lubridate)
library(scales)
library(ragg)
#Get daily regional death data
deaths.reg <- get_data(filters="areaType=region", structure=list(date="date",
name="areaName",
deaths="newDeaths28DaysByDeathDate"))
#Bring in regional population
deaths.reg <- deaths.reg %>%
mutate(pop=case_when(
name=="East of England" ~ 6236072,
name=="London" ~ 8961989,
name=="West Midlands" ~ 5934037,
name=="East Midlands" ~ 4835928,
name=="North East" ~ 2669941,
name=="Yorkshire and The Humber" ~ 5502967,
name=="North West" ~ 7341196,
name=="South East" ~ 9180135,
name=="South West" ~ 5624696),
mortrate=deaths*100000/pop,
date=as.Date(date),
mortrateroll=roll_mean(mortrate, 7, align="center", fill=NA)) %>%
arrange(date)
maxdate <- max(deaths.reg$date)
agg_tiff("Outputs/COVIDDeathsxRegionLine.tiff", units="in", width=10, height=7, res=500)
deaths.reg %>%
filter(date%
ggplot()+
geom_line(aes(x=date, y=mortrateroll, colour=name))+
theme_classic()+
scale_x_date(name="", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+
scale_y_continuous(name="Daily COVID-19 deaths per 100,000")+
scale_colour_paletteer_d("LaCroixColoR::paired", name="Region")+
labs(title="COVID-19 deaths are falling consistently across all regions of England",
subtitle="Daily deaths per 100,000 within 28 days of a positive COVID-19 test",
caption="Data from PHE | Plot by @VictimOfMaths")+
theme(plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
agg_tiff("Outputs/COVIDDeathsxRegionLineRecent.tiff", units="in", width=10, height=7, res=500)
deaths.reg %>%
filter(dateas.Date("2020-09-01")) %>%
ggplot()+
geom_line(aes(x=date, y=mortrateroll, colour=name))+
theme_classic()+
scale_x_date(name="", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+
scale_y_continuous(name="Daily COVID-19 deaths per 100,000")+
scale_colour_paletteer_d("LaCroixColoR::paired", name="Region")+
labs(title="Deaths associated with COVID-19 are still falling rapidly across England",
subtitle="Daily deaths per 100,000 within 28 days of a positive COVID-19 test",
caption="Data from PHE | Plot by @VictimOfMaths")+
theme(plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
#Pull out peak Spring and Autumn deaths for each region
peaks <- deaths.reg %>%
mutate(period=if_else(date%
group_by(name, period) %>%
summarise(peak=max(mortrateroll, na.rm=TRUE)) %>%
spread(period, peak)
agg_tiff("Outputs/COVIDDeathsxRegionScatter.tiff", units="in", width=8, height=6, res=500)
ggplot(peaks)+
geom_point(aes(x=`Wave 1`, y=`Wave 2`, colour=name))+
geom_abline(intercept=0)+
scale_colour_paletteer_d("LaCroixColoR::paired", name="Region")+
theme_classic()+
scale_x_continuous(limits=c(0,3), name="Peak mortality rate Mar-Jul\n7-day rolling average")+
scale_y_continuous(limits=c(0,3), name="Peak mortality rate Aug-Jan\n7-day rolling average")+
labs(title="Correlation between the Spring and Autumn/Winter peaks is limited",
subtitle="Deaths per 100,000 within 28 days of a positive COVID-19 test",
caption="Date from PHE | Plot by @VictimOfMaths")+
theme(plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
#National version
#Get daily regional death data
deaths.nat <- get_data(filters="areaType=nation", structure=list(date="date",
name="areaName",
deaths="newDeaths28DaysByDeathDate"))
#Bring in regional population
deaths.nat <- deaths.nat %>%
mutate(pop=case_when(
name=="England" ~ 56286961,
name=="Scotland" ~ 5463300,
name=="Wales" ~ 3152879,
name=="Northern Ireland" ~ 1893667),
mortrate=deaths*100000/pop,
date=as.Date(date)) %>%
arrange(date) %>%
group_by(name) %>%
mutate(mortrateroll=roll_mean(mortrate, 7, align="center", fill=NA)) %>%
ungroup()
agg_tiff("Outputs/COVIDDeathsxCountryLine.tiff", units="in", width=10, height=7, res=500)
deaths.nat %>%
filter(date%
ggplot()+
geom_line(aes(x=date, y=mortrateroll, colour=name))+
theme_classic()+
scale_x_date(name="", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+
scale_y_continuous(name="Daily COVID-19 deaths per 100,000")+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
labs(title="Deaths linked to COVID-19 are falling in all four UK nations",
subtitle="Daily deaths per 100,000 within 28 days of a positive COVID-19 test",
caption="Data from PHE | Plot by @VictimOfMaths")+
theme(plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
agg_tiff("Outputs/COVIDDeathsxCountryLineRecent.tiff", units="in", width=10, height=7, res=500)
deaths.nat %>%
filter(dateas.Date("2020-09-01")) %>%
ggplot()+
geom_line(aes(x=date, y=mortrateroll, colour=name))+
theme_classic()+
scale_x_date(name="", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+
scale_y_continuous(name="Daily COVID-19 deaths per 100,000")+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
labs(title="Mortality rates across the UK have been falling consistently since mid-January",
subtitle="Daily deaths per 100,000 within 28 days of a positive COVID-19 test",
caption="Data from PHE | Plot by @VictimOfMaths")+
theme(plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
================================================
FILE: All Cause Mortality/COVIDExcessxLAxCause.R
================================================
rm(list=ls())
library(tidyverse)
library(forcats)
library(paletteer)
library(extrafont)
library(ggtext)
#Read in data generated from https://github.com/VictimOfMaths/COVID_LA_Plots/blob/master/UnderlyingCode.R
load("COVID_LA_Plots/Alldata.RData")
#Filter out occurence data (as we don't have historic occurence data for English & Welsh LAs)
locdata <- data %>%
filter(measure=="Registrations" & week>9)
#Replace missing week 53 historic data with week 52 for England & Wales
temp <- locdata %>%
filter(week==52 & country!="Scotland") %>%
select(week, location, code, deaths.1519) %>%
mutate(week=53) %>%
rename(deaths.1519alt=deaths.1519)
#Calculate location-specific excess death rates for each LTLA
locdata <- locdata %>%
merge(temp, all.x=TRUE) %>%
mutate(deaths.1519=coalesce(deaths.1519, deaths.1519alt),
allexcess=AllCause.20-deaths.1519) %>%
group_by(name, Region, country, code, location, pop) %>%
summarise(deaths.1519=sum(deaths.1519), allexcess=sum(allexcess),
AllCause.20=sum(AllCause.20)) %>%
ungroup() %>%
group_by(name, Region, country, code, pop) %>%
mutate(alldeaths.1519=sum(deaths.1519), alldeaths.20=sum(AllCause.20)) %>%
ungroup() %>%
mutate(excessrate=allexcess*100000/pop, totexcessrate=(alldeaths.20-alldeaths.1519)*100000/pop,
name=fct_reorder(name, totexcessrate), excessprop=allexcess/deaths.1519,
totexcessprop=(alldeaths.20-alldeaths.1519)/alldeaths.1519)
agg_tiff("Outputs/COVIDExcessPropxLAxLoc.tiff", units="in", width=10, height=8, res=500)
ggplot(locdata %>% filter(!Region %in% c("Region", "Nation") & location=="Hospital" & totexcessprop>0.325),
aes(x=totexcessprop, y=fct_reorder(name, totexcessprop), fill=totexcessprop))+
geom_col(show.legend=FALSE)+
geom_vline(xintercept=0)+
scale_x_continuous(name="Proportional increase in deaths",
labels=scales::label_percent(accuracy=2))+
scale_y_discrete(name="")+
scale_fill_paletteer_c("pals::ocean.amp", limits=c(0,0.6))+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title=element_text(face="bold"))+
labs(title="The Local Authorities with the biggest relative increases in deaths are mostly in London",
subtitle="Local Authorities in England, Wales and Scotland with the largest proportional increase in mortality\nsince the start of the pandemic compared to average mortality in 2015-19",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDExcessxLAxLoc.tiff", units="in", width=10, height=8, res=500)
ggplot(locdata %>% filter(!Region %in% c("Region", "Nation") & totexcessrate>250),
aes(x=excessrate, y=name, fill=location))+
geom_col(position="stack")+
geom_vline(xintercept=0)+
scale_x_continuous(name="Excess deaths per 100,000 population")+
scale_y_discrete(name="")+
scale_fill_paletteer_d("ggsci::planetexpress_futurama", name="Place of death")+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title=element_text(face="bold"),
plot.title.position="plot")+
labs(title="The Local Authorities in Great Britain with the highest excess mortality rates",
subtitle="Local Authorities in England, Wales and Scotland with excess mortality rates of more than 250 per 100,000\nsince the start of the pandemic compared to average mortality rates in 2015-19",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDExcessBaselineRatexLA.tiff", units="in", width=10, height=8, res=500)
ggplot(locdata %>% filter(!Region %in% c("Region", "Nation") & location=="Hospital"),
aes(x=alldeaths.1519*100000/pop, y=fct_reorder(name, alldeaths.1519*100000/pop),
fill=Region))+
geom_col(position="stack", show.legend=FALSE)+
scale_x_continuous(name="Annual deaths per 100,000")+
scale_y_discrete(name="")+
scale_fill_manual(values=c("Grey60", "Grey60", "#FF007F", rep("Grey60", times=8)))+
theme_classic()+
theme(text=element_text(family="Lato"), axis.text.y=element_blank(),
axis.line.y=element_blank(), axis.ticks.y=element_blank(),
plot.title=element_text(face="bold", size=rel(1.5)),
plot.subtitle=element_markdown())+
labs(title="Local Authorities in London have lower mortality rates",
subtitle="Annual deaths per 100,000 in Local Authorities in London compared to the rest of Great Britain",
caption="Data from ONS | Plot by @VictimOfMaths")+
annotate("text", x=1100, y=30,
label="Local Authorities in London have younger populations,\non average, so see fewer deaths",
family="Lato", fontface="bold", size=rel(3), colour="#FF007F")+
geom_curve(aes(x=940, y=27, xend=600, yend=18),
colour="#FF007F", curvature=-0.15, arrow=arrow(length=unit(0.1, "cm"), type="closed"),
lineend="round")
dev.off()
#Map of the excess mortality rates
mapdata <- locdata %>%
filter(name=="Buckinghamshire") %>%
mutate(code="E07000004") %>%
bind_rows(locdata)
mapdata <- mapdata %>%
filter(code=="E07000004") %>%
mutate(code="E07000005") %>%
bind_rows(mapdata)
mapdata <- mapdata %>%
filter(code=="E07000004") %>%
mutate(code="E07000006") %>%
bind_rows(mapdata)
mapdata <- mapdata %>%
filter(code=="E07000004") %>%
mutate(code="E07000007") %>%
bind_rows(mapdata)
#Download Carl Baker's lovely map
ltla <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg")
ltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode="wb")
Background <- st_read(ltla, layer="7 Background")
ltlacases <- st_read(ltla, layer="6 LTLA-2021") %>%
left_join(mapdata, by=c("Lacode"="code"))
Groups <- st_read(ltla, layer="2 Groups")
Group_labels <- st_read(ltla, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
plot1 <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Hospital"),
aes(geometry=geom, fill=totexcessrate), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Excess deaths\nper 100,000",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Hospital"))$totexcessrate)))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
annotate("text", x=16, y=40, label="Excess deaths are highest\nin the North-West\nand West Midlands...",
family="Lato", fontface="bold", size=rel(2.5), colour="#6e0a1e")+
annotate("text", x=50, y=1, label="...and isolated areas\nin the South East",
family="Lato", fontface="bold", size=rel(2.5), colour="#6e0a1e")+
labs(title="Excess mortality rates for Local Authorities in Great Britain",
subtitle="Additional deaths per 100,000 population from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot1
dev.off()
plot1b <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Hospital"),
aes(geometry=geom, fill=totexcessprop), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Change in\nall-cause deaths",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Hospital"))$totexcessprop)),
label=scales::label_percent(accuracy=2))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
labs(title="Relative changes in all-cause deaths in Local Authorities in Great Britain",
subtitle="Proportional changes in all-cause deaths from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessPropLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot1b
dev.off()
plot2 <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Hospital"),
aes(geometry=geom, fill=excessrate), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Excess deaths\nper 100,000",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Hospital"))$excessrate)))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
annotate("text", x=45, y=60, label="There have been fewer deaths\nthan usual in hospitals\nin many more remote areas...",
family="Lato", fontface="bold", size=rel(2.5), colour="#006D5B")+
annotate("text", x=16, y=40, label="...but more in urban areas",
family="Lato", fontface="bold", size=rel(2.5), colour="#6e0a1e")+labs(title="Hospital excess mortality rates for Local Authorities in Great Britain",
subtitle="Additional deaths per 100,000 population from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessHospLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot2
dev.off()
plot2b <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Hospital"),
aes(geometry=geom, fill=excessprop), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Change in\nall-cause deaths",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Hospital"))$excessprop)),
label=scales::label_percent(accuracy=2))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
labs(title="Relative changes in all-cause deaths in hospitals in Local Authorities in Great Britain",
subtitle="Proportional changes in all-cause deaths from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessHospPropLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot2b
dev.off()
plot3 <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Care home"),
aes(geometry=geom, fill=excessrate), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Excess deaths\nper 100,000",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Care home"))$excessrate)))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
annotate("text", x=47, y=52, label="Excess care home deaths are\nhighest in the North East..",
family="Lato", fontface="bold", size=rel(2.5), colour="#6e0a1e")+
annotate("text", x=48, y=1, label="...and isolated areas\nin the South East",
family="Lato", fontface="bold", size=rel(2.5), colour="#6e0a1e")+
labs(title="Care home excess mortality rates for Local Authorities in Great Britain",
subtitle="Additional deaths per 100,000 population from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessCareHomeLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot3
dev.off()
plot3b <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Care home"),
aes(geometry=geom, fill=excessprop), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Change in\nall-cause deaths",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Care home"))$excessprop)),
label=scales::label_percent(accuracy=2))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
labs(title="Relative changes in all-cause deaths in care homes in Local Authorities in Great Britain",
subtitle="Proportional changes in all-cause deaths from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessCareHomePropLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot3b
dev.off()
plot4 <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Home/Other"),
aes(geometry=geom, fill=excessrate), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Excess deaths\nper 100,000",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Home/Other"))$excessrate)))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
annotate("text", x=45, y=60, label="Excess deaths at home are\nhighest in the West of Scotland",
family="Lato", fontface="bold", size=rel(2.5), colour="#6e0a1e")+
labs(title="Home excess mortality rates for Local Authorities in Great Britain",
subtitle="Additional deaths per 100,000 population from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessHomeLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot4
dev.off()
plot4b <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlacases %>% filter(RegionNation!="Northern Ireland" & location=="Home/Other"),
aes(geometry=geom, fill=excessprop), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Northern Ireland"), aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.curl",
name="Change in\nall-cause deaths",
limit=c(-1,1)*max(abs((ltlacases %>% filter(location=="Home/Other"))$excessprop)),
label=scales::label_percent(accuracy=2))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
labs(title="Relative changes in all-cause deaths at home in Local Authorities in Great Britain",
subtitle="Proportional changes in all-cause deaths from week 10 in 2020 to the latest week of available data,\ncompared to the average mortality rate in 2015-19.",
caption="Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDExcessHomePropLTLACartogram.tiff", units="in", width=9, height=10, res=500)
plot4b
dev.off()
================================================
FILE: All Cause Mortality/COVIDTotalDeathsPyramid.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(scales)
library(extrafont)
library(ragg)
library(ggtext)
library(paletteer)
library(scales)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Download 2020 COVID deaths data by age
temp <- tempfile()
url2020 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx"
temp <- curl_download(url=url2020, destfile=temp, quiet=FALSE, mode="wb")
data20m <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B34:BC53",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2020, Sex="Male")
data20f <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B56:BC75",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2020, Sex="Female")
#All cause deaths
data20m_ac <- read_excel(temp, sheet="Weekly figures 2020", range="B44:BC63", col_names=FALSE)%>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "ACDeaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2020, Sex="Male")
data20f_ac <- read_excel(temp, sheet="Weekly figures 2020", range="B66:BC85", col_names=FALSE)%>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "ACDeaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2020, Sex="Female")
#2021
url2021 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx"
temp <- curl_download(url=url2021, destfile=temp, quiet=FALSE, mode="wb")
data21m <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B34:BB53",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2021, Sex="Male")
data21f <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B56:BB75",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2021, Sex="Female")
#All cause deaths
data21m_ac <- read_excel(temp, sheet="Weekly figures 2021", range="B40:BC59", col_names=FALSE)%>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "ACDeaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2021, Sex="Male")
data21f_ac <- read_excel(temp, sheet="Weekly figures 2021", range="B62:BC81", col_names=FALSE)%>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "ACDeaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2021, Sex="Female")
#2022 (in a different format, thanks for that ONS)
url2022 <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2022/publicationfileweek212022.xlsx"
temp <- curl_download(url=url2022, destfile=temp, quiet=FALSE, mode="wb")
data22m <- read_excel(temp, sheet="4", range="A31:W52") %>%
select(-c(2,3)) %>%
gather(Age, Deaths, c(2:ncol(.))) %>%
set_names(c("Week", "Age", "Deaths")) %>%
mutate(Year=2022, Sex="Male")
data22f <- read_excel(temp, sheet="4", range="A55:W76") %>%
select(-c(2,3)) %>%
gather(Age, Deaths, c(2:ncol(.))) %>%
set_names(c("Week", "Age", "Deaths")) %>%
mutate(Year=2022, Sex="Female")
#All cause deaths
data22m_ac <- read_excel(temp, sheet="2", range="A31:W52") %>%
select(-c(2,3)) %>%
gather(Age, Deaths, c(2:ncol(.))) %>%
set_names(c("Week", "Age", "ACDeaths")) %>%
mutate(Year=2022, Sex="Male")
data22f_ac <- read_excel(temp, sheet="2", range="A55:W76") %>%
select(-c(2,3)) %>%
gather(Age, Deaths, c(2:ncol(.))) %>%
set_names(c("Week", "Age", "ACDeaths")) %>%
mutate(Year=2022, Sex="Female")
alldata <- bind_rows(data20f, data20m, data21f, data21m, data22f, data22m) %>%
merge(bind_rows(data20f_ac, data20m_ac, data21f_ac, data21m_ac, data22f_ac, data22m_ac)) %>%
mutate(Age=case_when(
Age=="01-04" ~ "1-4",
Age=="05-09" ~ "5-9",
TRUE ~Age),
COVIDprop=Deaths/ACDeaths)
data1 <- alldata %>%
filter(!(Year==2020 & Week<11)) %>%
group_by(Age, Sex) %>%
summarise(Deaths=sum(Deaths), ACDeaths=sum(ACDeaths)) %>%
ungroup() %>%
mutate(plotdeaths=if_else(Sex=="Male", -Deaths, Deaths),
Age=factor(Age, levels=c("<1", "1-4", "5-9", "10-14", "15-19", "20-24", "25-29",
"30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64",
"65-69", "70-74", "75-79", "80-84", "85-89", "90+")),
COVIDprop=Deaths/ACDeaths,
plotCOVIDprop=if_else(Sex=="Male", -COVIDprop, COVIDprop))
agg_png("Outputs/COVIDTotalDeathsxAgexSex.png", units="in", width=8, height=8, res=800)
ggplot(data1, aes(x=plotdeaths, y=Age, fill=Sex))+
geom_col()+
geom_vline(xintercept=0, colour="Grey40")+
scale_x_continuous(name="Total COVID deaths", limits=c(-25000, 25000),
breaks=c(-20000, -10000, 0, 10000, 20000),
labels=c("20,000", "10,000", "0", "10,000", "20,000"))+
scale_fill_manual(values=c("#00cc99", "#6600cc"), name="", guide = guide_legend(reverse = TRUE))+
theme_custom()+
theme(legend.position="top")+
labs(title="Total COVID-19 deaths by age and sex",
subtitle="Deaths in England & Wales registered up to 27th May 2022 where COVID-19 was mentioned on the death certificate",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_png("Outputs/COVIDTotalDeathPropxAgexSex.png", units="in", width=8, height=8, res=800)
ggplot(data1, aes(x=plotCOVIDprop, y=Age, fill=Sex))+
geom_col()+
geom_vline(xintercept=0, colour="Grey40")+
scale_x_continuous(name="Proportion of deaths involving COVID", limits=c(-0.17, 0.17),
breaks=c(-0.15, -0.1, -0.05, 0, 0.05, 0.1, 0.15),
labels=c("15%", "10%", "5%", "0%", "5%", "10%", "15%"))+
scale_fill_manual(values=c("#00cc99", "#6600cc"), name="", guide = guide_legend(reverse = TRUE))+
theme_custom()+
theme(legend.position="top")+
labs(title="The proportional impact of COVID on mortality",
subtitle="Proportion of all deaths in England & Wales registered between 7th March 2020 and 27th May 2022\nwhere COVID-19 was mentioned on the death certificate",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
data2 <- alldata %>%
group_by(Age, Sex, Year) %>%
summarise(Deaths=sum(Deaths), ACDeaths=sum(ACDeaths)) %>%
ungroup() %>%
mutate(plotdeaths=if_else(Sex=="Male", -Deaths, Deaths),
Age=factor(Age, levels=c("<1", "1-4", "5-9", "10-14", "15-19", "20-24", "25-29",
"30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64",
"65-69", "70-74", "75-79", "80-84", "85-89", "90+")),
COVIDprop=Deaths/ACDeaths,
plotCOVIDprop=if_else(Sex=="Male", -COVIDprop, COVIDprop))
agg_png("Outputs/COVIDTotalDeathsxAgexSexxYear.png", units="in", width=8, height=8, res=800)
ggplot(data2, aes(x=plotdeaths, y=Age, fill=as.factor(Year)))+
geom_col(position="dodge")+
geom_vline(xintercept=0, colour="Grey40")+
scale_x_continuous(name="Total COVID deaths", limits=c(-11000, 11000),
breaks=c(-10000, -5000, 0, 5000, 10000),
labels=c("10,000", "5,000", "0", "5,000", "10,000"))+
scale_fill_paletteer_d("calecopal::superbloom3", name="")+
theme_custom()+
theme(legend.position="top")+
labs(title="COVID-19 deaths by age, sex and year",
subtitle="Deaths in England & Wales registered up to 27th May 2022 where COVID-19 was mentioned on the death certificate",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_png("Outputs/COVIDTotalDeathPropxAgexSexxYear.png", units="in", width=8, height=8, res=800)
ggplot(data2, aes(x=plotCOVIDprop, y=Age, fill=as.factor(Year)))+
geom_col(position="dodge")+
geom_vline(xintercept=0, colour="Grey40")+
scale_x_continuous(name="Proportion of deaths involving COVID", limits=c(-0.17, 0.17),
breaks=c(-0.15, -0.1, -0.05, 0, 0.05, 0.1, 0.15),
labels=c("15%", "10%", "5%", "0%", "5%", "10%", "15%"))+
scale_fill_paletteer_d("calecopal::superbloom3", name="")+
theme_custom()+
theme(legend.position="top")+
labs(title="The proportional impact of COVID on mortality",
subtitle="Proportion of all deaths in England & Wales registered between 1st Jan 2020 and 27th May 2022,\n where COVID-19 was mentioned on the death certificate",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
data3 <- alldata %>%
group_by(Age, Sex, Year, Week) %>%
summarise(Deaths=sum(Deaths), ACDeaths=sum(ACDeaths)) %>%
ungroup() %>%
mutate(plotdeaths=if_else(Sex=="Male", -Deaths, Deaths),
Age=factor(Age, levels=c("<1", "1-4", "5-9", "10-14", "15-19", "20-24", "25-29",
"30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64",
"65-69", "70-74", "75-79", "80-84", "85-89", "90+")),
COVIDprop=Deaths/ACDeaths,
plotCOVIDprop=if_else(Sex=="Male", -COVIDprop, COVIDprop),
Date=case_when(
Year==2020 ~ as.Date("2020-01-03")+Week-1,
Year==2021 ~ as.Date("2020-01-03")+Week+53,
Year==2022 ~ as.Date("2020-01-03")+Week+53+52))
ggplot(data3, aes(x=Date, y=COVIDprop, colour=Sex, group=Sex))+
geom_line()+
scale_colour_manual(values=c("#00cc99", "#6600cc"), name="", guide = guide_legend(reverse = TRUE))+
facet_wrap(~Age)+
theme_custom()
================================================
FILE: All Cause Mortality/EWUSACOVIDDeathsxAgeComparison.R
================================================
rm(list=ls())
library(curl)
library(readxl)
library(tidyverse)
library(paletteer)
library(ragg)
library(extrafont)
library(patchwork)
library(scales)
library(ggtext)
library(RcppRoll)
library(keyring)
library(HMDHFDplus)
library(signal)
#Define window as number of weeks across which to take rolling average
Window <- 10
#Define value to replace suppressed death counts with in the US data
#(all weeks <9 are suppressed)
Suppressed <- 5
#Set common font for all plots
font <- "Lato"
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
strip.clip="off",
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
options(scipen=10000)
#Read in COVID deaths by age from ONS
#2022 & 2023
temp <- tempfile()
url <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2023/publicationfileweek412023.xlsx"
rawfile <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
EWraw2223 <- read_excel(rawfile, sheet="5", range="A7:W100") %>%
select(-c(`All ages`, `Week number`)) %>%
gather(Age, Deaths, c(2:ncol(.)))
#2020 & 2021
temp <- tempfile()
url <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2021/publishedweek522021.xlsx"
rawfile <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
EWraw2021 <- read_excel(rawfile, sheet="Covid-19 - Weekly occurrences", range="B12:DC31", col_names = FALSE) %>%
set_names("Age", as.character(seq.Date(from=as.Date("2020-01-03"), to=as.Date("2021-12-31"),
length.out=ncol(.)-1))) %>%
gather(`Week ending`, Deaths, c(2:ncol(.))) %>%
mutate(`Week ending`=as.Date(`Week ending`))
#Merge
EWraw <- bind_rows(EWraw2223, EWraw2021) %>%
#align dates with US data, selecting date in the middle of each reporting week
#for convenience
mutate(Date=`Week ending`+days(3)) %>%
select(-`Week ending`) %>%
group_by(Age) %>%
arrange(Date) %>%
mutate(DeathsRoll=roll_mean(Deaths, n=Window, align="center", fill=NA)) %>%
ungroup()
#Plot to sense check
ggplot(EWraw, aes(x=Date))+
geom_point(aes(y=Deaths), shape=21)+
geom_line(aes(y=DeathsRoll))+
facet_wrap(~Age, scales="free_y")+
theme_custom()
#Deaths in under 15s are very small, also need to align age groups with US data
#(also, I didn't quite align the age group names in the two ONS datasets, oops)
EWdata <- EWraw %>% dplyr::filter(!Age %in% c("<1", "01-04", "05-09", "1-4", "5-9", "10-14")) %>%
mutate(Age=case_when(
Age %in% c("15-19", "20-24") ~ "15-24",
Age %in% c("25-29", "30-34") ~ "25-34",
Age %in% c("35-39", "40-44") ~ "35-44",
Age %in% c("45-49", "50-54") ~ "45-54",
Age %in% c("55-59", "60-64") ~ "55-64",
Age %in% c("65-69", "70-74") ~ "65-74",
Age %in% c("75-79", "80-84") ~ "75-84",
TRUE ~ "85+")) %>%
group_by(Date, Age) %>%
summarise(Deaths=sum(Deaths), .groups="drop") %>%
group_by(Age) %>%
arrange(Date) %>%
mutate(DeathsRoll=roll_mean(Deaths, n=Window, align="center", fill=NA)) %>%
ungroup()
#Read in data extracted from CDC WONDER database
USraw <- read.csv("CDC Data/CDCCOVIDWeeklyDataxAge.txt", sep="\t") %>%
select(Ten.Year.Age.Groups.Code, MMWR.Week.Code, Deaths) %>%
set_names("Age", "Week", "Deaths") %>%
dplyr::filter(Age!="") %>%
mutate(Year=as.numeric(substr(Week, 1, 4)),
WeekNo=as.numeric(substr(Week, 6, 7))) %>%
#Almost no deaths allocated to week 99 (presumably an unknown value), so remove
dplyr::filter(WeekNo!=99) %>%
#Convert to actual date format (using a date in the middle of the week for convenience
#and to align with the E&W data)
mutate(AddWeek=case_when(Year==2018 ~ 0, Year==2019 ~ 52, Year==2020 ~ 52+52,
Year==2021 ~ 52+52+53, Year==2022 ~ 52+52+53+52,
Year==2023 ~ 52+52+53+52+52),
Date=as.Date("2018-01-01")+weeks(WeekNo+AddWeek),
Deaths=if_else(Deaths=="Suppressed", Suppressed, as.numeric(Deaths))) %>%
group_by(Age) %>%
arrange(Date) %>%
mutate(DeathsRoll=roll_mean(Deaths, n=Window, align="center", fill=NA)) %>%
ungroup()
#Plot to sense check
ggplot(USraw %>% dplyr::filter(Date>as.Date("2020-01-01")), aes(x=Date))+
geom_point(aes(y=Deaths), shape=21)+
geom_line(aes(y=DeathsRoll))+
facet_wrap(~Age, scales="free_y")+
theme_custom()
#Visual inspection suggests all ages under 15 are mostly suppressed values, so remove
#these ages.
USdata <- USraw %>% dplyr::filter(!Age %in% c("1", "1-4", "5-14")) %>%
select(Date, Age, Deaths, DeathsRoll) %>%
dplyr::filter(Date>as.Date("2020-01-01"))
######################
#Bring in population data from HMD
#Note that you will need to register with mortality.org and set this
#username and password up with {keyring} for this to work
#Start with England & Wales
ewpop <- readHMDweb(CNTRY="GBRTENW", "Population", key_list("mortality.org")[1,2],
key_get("mortality.org", key_list("mortality.org")[1,2]), fixup=TRUE) %>%
mutate(Age=as.numeric(Age), Age=if_else(is.na(Age), 110, Age)) %>%
dplyr::filter(Year>=2020)
ewpop <- bind_rows(ewpop %>% dplyr::filter(Year==2020) %>%
select("Year", "Age", "Total2") %>%
mutate(Year=2021) %>%
set_names(c("Year", "Age", "Pop")),
ewpop %>% select(c("Year", "Age", "Total1")) %>%
set_names(c("Year", "Age", "Pop")))
#This gives us the mid-year population estimates for 2020 and 2021 only.
#There's definitely a clever approach here, but for now, let's linearly interpolate/extrapolate
#to get estimated weekly populations across the time period
#(which will be close enough to make no difference, I imagine)
#Set up framework for inter/extrapolation
popframe <- ewpop %>% #dplyr::filter(Age==15) %>%
mutate(weeksince=if_else(Year==2020, 26, 78)) %>%
arrange(weeksince)
#Define inter/extrapolation function based on {signal}'s interp1 function
interpolate <- function(x){
interp1(x=popframe$weeksince[popframe$Age==x],
y=popframe$Pop[popframe$Age==x],
xi=c(1:length(unique(EWdata$Date))), method="linear", extrap=TRUE)
}
#Do inter/extrapolation
InterpolatedPop <- data.frame(Date=as.Date(unique(EWdata$Date)))
for(i in c(0:110)){
InterpolatedPop <- bind_cols(InterpolatedPop, interpolate(i))
}
InterpolatedPop <- InterpolatedPop %>%
set_names("Date", c(0:110)) %>%
gather(Age, Pop, c(2:ncol(.))) %>%
mutate(Age=as.numeric(Age))
#Visualise to sense check
ggplot(InterpolatedPop, aes(x=Date, y=Age, fill=Pop))+
geom_tile()+
theme_custom()
#Looks ok, so group up and merge into deaths data
EWfull <- EWdata %>%
merge(InterpolatedPop %>%
dplyr::filter(Age>=15) %>%
mutate(Age=case_when(
Age<25 ~ "15-24", Age<35 ~ "25-34", Age<45 ~ "35-44", Age<55 ~ "45-54",
Age<65 ~ "55-64", Age<75 ~ "65-74", Age<85 ~ "75-84", Age>=85 ~ "85+")) %>%
group_by(Date, Age) %>%
summarise(Pop=sum(Pop), .groups="drop")) %>%
group_by(Age) %>%
mutate(mx=Deaths*100000/Pop,
mxroll=roll_mean(mx, n=Window, align="center", fill=NA)) %>%
ungroup()
#Move on to USA
USpop <- readHMDweb(CNTRY="USA", "Population", key_list("mortality.org")[1,2],
key_get("mortality.org", key_list("mortality.org")[1,2]), fixup=TRUE) %>%
mutate(Age=as.numeric(Age), Age=if_else(is.na(Age), 110, Age)) %>%
dplyr::filter(Year>=2020)
USpop <- bind_rows(USpop %>% dplyr::filter(Year==2021) %>%
select("Year", "Age", "Total2") %>%
mutate(Year=2022) %>%
set_names(c("Year", "Age", "Pop")),
USpop %>% select(c("Year", "Age", "Total1")) %>%
set_names(c("Year", "Age", "Pop")))
#Set up framework for inter/extrapolation
popframe2 <- USpop %>%
mutate(weeksince=case_when(Year==2020 ~ 26,
Year==2021 ~ 78,
Year==2022 ~ 130)) %>%
arrange(weeksince)
#Define inter/extrapolation function based on {signal}'s interp1 function
interpolate2 <- function(x){
interp1(x=popframe2$weeksince[popframe2$Age==x],
y=popframe2$Pop[popframe2$Age==x],
xi=c(1:length(unique(EWdata$Date))), method="linear", extrap=TRUE)
}
#Do inter/extrapolation
InterpolatedPop2 <- data.frame(Date=as.Date(unique(USdata$Date)))
for(i in c(0:110)){
InterpolatedPop2 <- bind_cols(InterpolatedPop2, interpolate2(i))
}
InterpolatedPop2 <- InterpolatedPop2 %>%
set_names("Date", c(0:110)) %>%
gather(Age, Pop, c(2:ncol(.))) %>%
mutate(Age=as.numeric(Age))
#Visualise to sense check
ggplot(InterpolatedPop2, aes(x=Date, y=Age, fill=Pop))+
geom_tile()+
theme_custom()
#Looks ok, so group up and merge into deaths data
USfull <- USdata %>%
merge(InterpolatedPop2 %>%
dplyr::filter(Age>=15) %>%
mutate(Age=case_when(
Age<25 ~ "15-24", Age<35 ~ "25-34", Age<45 ~ "35-44", Age<55 ~ "45-54",
Age<65 ~ "55-64", Age<75 ~ "65-74", Age<85 ~ "75-84", Age>=85 ~ "85+")) %>%
group_by(Date, Age) %>%
summarise(Pop=sum(Pop), .groups="drop")) %>%
group_by(Age) %>%
mutate(mx=Deaths*100000/Pop,
mxroll=roll_mean(mx, n=Window, align="center", fill=NA)) %>%
ungroup()
Fulldata <- EWfull %>% mutate(Country="England & Wales") %>%
bind_rows(USfull %>% mutate(Country="USA"))
agg_png("Outputs/EWUSACOVIDDeathsxAgeRates.png", units="in", width=9, height=7, res=500)
ggplot(Fulldata, aes(x=Date, y=mxroll, colour=Country))+
geom_hline(yintercept=0, colour="grey30")+
geom_line()+
scale_y_continuous(limits=c(0,NA), name="Weekly deaths per 100,000")+
scale_colour_manual(values=c("#C11432", "#009ADA"))+
facet_wrap(~Age, scales="free_y")+
theme_custom()+
theme(axis.line.x=element_blank(),
panel.grid.major.y=element_line(colour="grey95"))+
labs(title="Younger adults in the US had much higher COVID deaths rates than England & Wales",
subtitle="Rolling 10-week average rates of death occurrences where COVID was listed as a contributory cause",
caption="Data from CDC Wonder and ONS | Populations estimated from mortality.org data\nPlot by @VictimOfMaths")
dev.off()
Ratios <- Fulldata %>%
group_by(Date, Age) %>%
mutate(Ratio=mxroll[Country=="USA"]/mxroll[Country=="England & Wales"]) %>%
ungroup() %>%
dplyr::filter(!is.na(Ratio)) %>%
mutate(Date=as.Date(Date))
agg_png("Outputs/EWUSACOVIDDeathsxAgeRatio.png", units="in", width=8, height=6, res=500)
ggplot(Ratios %>% dplyr::filter(Age!="15-24"), aes(x=Date, y=Ratio, colour=Age))+
geom_hline(yintercept=1, colour="grey30")+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(trans="log10", name="Ratio of COVID-19 death occurrences\nin the USA to England & Wales",
breaks=c(1/4, 1/2, 1, 2, 4, 8),
labels=c("x 1/4", "x 1/2", "Equal", "x2", "x4", "x8"))+
scale_colour_manual(values=c("#B83326FF", "#C8570DFF", "#EDB144FF", "#8CC8BCFF", "#7DA7EAFF", "#5773C0FF", "#1D4497FF"))+
theme_custom()+
theme(panel.grid.major.y=element_line(colour="grey95"))+
labs(title="The pandemic hit young people much harder in the US than England& Wales",
subtitle="Ratio of rolling 10-week average rates of death occurrences where COVID was listed as a contributory cause\nin the USA compared to England & Wales.",
caption="Data from CDC Wonder and ONS | Populations estimated from mortality.org data\nPlot by @VictimOfMaths")+
annotate("text", x=as.Date("2023-01-01"), y=0.3, colour="Grey30",
family="Lato", label="More deaths in England & Wales")+
annotate("text", x=as.Date("2023-01-01"), y=7, colour="Grey30",
family="Lato", label="More deaths in the USA")
dev.off()
DeathProps <- Fulldata %>%
group_by(Country, Date) %>%
mutate(Total=sum(DeathsRoll),
Prop=DeathsRoll/Total) %>%
ungroup() %>%
mutate(Date=as.Date(Date))
agg_png("Outputs/EWUSACOVIDDeathsxAgeProp.png", units="in", width=8, height=6, res=500)
ggplot(DeathProps, aes(x=Date, y=Prop, fill=Age))+
geom_col()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of deaths involving COVID-19",
labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("darkred", "#B83326FF", "#C8570DFF", "#EDB144FF", "#8CC8BCFF", "#7DA7EAFF", "#5773C0FF", "#1D4497FF"))+
facet_wrap(~Country)+
theme_custom()
dev.off()
================================================
FILE: All Cause Mortality/LA All Cause Deaths.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ggtext)
library(paletteer)
library(lubridate)
library(forcats)
library(RcppRoll)
###################################################################################
#Weekly data
#Read in 2020 data for England
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fcausesofdeath%2fdatasets%2fdeathregistrationsandoccurrencesbylocalauthorityandhealthboard%2f2020/lahbtablesweek27.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data20 <- read_excel(temp, sheet=6, col_names=FALSE)[-c(1:4),]
colnames(data20) <- c("code", "type", "name", "cause", "week", "location", "deaths.20")
data20 <- subset(data20, type=="Local Authority")[,-c(2)]
data20$deaths.20 <- as.numeric(data20$deaths.20)
data20$week <- as.numeric(data20$week)
maxweek.ew <- max(data20$week)
enddate.ew <- as.Date("2020-01-03")+weeks(maxweek.ew-1)
#Spread causes
data20 <- pivot_wider(data20, names_from="cause", values_from="deaths.20")
#Read in 2015-19 historic data for England & Wales
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/11826fiveyearaverageweeklydeathsbylocalauthorityandplaceofoccurrenceenglandandwalesdeathsregistered2015to2019/weeklyfiveyearaveragesbylaandplaceofoccurrence20152019.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data1519 <- read_excel(temp, sheet=2, col_names=FALSE)[-c(1:3),]
colnames(data1519) <- c("code", "name", "week", "location", "deaths.1519")
data1519$deaths.1519 <- as.numeric(data1519$deaths.1519)
data1519$week <- as.numeric(data1519$week)
data1519 <- data1519 %>% drop_na(name)
#Address merging of Aylesbury Vale, Chiltern and South Bucks into Bucks
data1519$name <- if_else(data1519$name %in% c("Aylesbury Vale", "Chiltern", "South Bucks", "Wycombe"),
"Buckinghamshire", data1519$name)
data1519$code <- if_else(data1519$code %in% c("E07000004", "E07000005", "E07000006", "E07000007"),
"E06000060", data1519$code)
data1519 <- data1519 %>%
group_by(week, location, name, code) %>%
summarise(deaths.1519=sum(deaths.1519)) %>%
ungroup()
data.ew <- merge(data1519, data20, all.x=TRUE)
#Combine Cornwall & Isles of Scilly
data.ew$code <- if_else(data.ew$code=="E06000053", "E06000052", data.ew$code)
data.ew$name <- if_else(data.ew$name=="Isles of Scilly", "Cornwall", data.ew$name)
#Combine Hackney & City of London
data.ew$code <- if_else(data.ew$code=="E09000001", "E09000012", data.ew$code)
data.ew$name <- if_else(data.ew$name=="City of London", "Hackney and City of London", data.ew$name)
data.ew$name <- if_else(data.ew$name=="Hackney", "Hackney and City of London", data.ew$name)
#Compress locations
data.ew$location <- case_when(
data.ew$location %in% c("Elsewhere", "Home", "Hospice", "Other communal establishment") ~ "Home/Other",
TRUE ~ data.ew$location)
data.ew <- data.ew %>%
group_by(code, name, location, week) %>%
summarise(deaths.1519=sum(deaths.1519), AllCause.20=sum(`All causes`), COVID.20=sum(`COVID 19`)) %>%
mutate(Other.20=AllCause.20-COVID.20) %>%
ungroup()
#Bring in Scottish deaths data (released by NRS on a Wednesday)
#2020 data
#Need to update link and range each week
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-date-council-area-location.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data20.s <- read_excel(temp, sheet=2, range="A5:E3389", col_names=FALSE)
colnames(data20.s) <- c("week", "name", "location", "cause", "deaths")
data20.s$week <- as.numeric(data20.s$week)
maxweek.s <- max(data20.s$week)
enddate.s <- as.Date("2020-01-04")+weeks(maxweek.s-1)
data20.s$cause <- if_else(data20.s$cause=="Non-COVID-19", "Other.20", "COVID.20")
data20.s <- spread(data20.s, cause, deaths)
data20.s$COVID.20 <- replace_na(data20.s$COVID.20, 0)
data20.s$Other.20 <- replace_na(data20.s$Other.20, 0)
#2015-19 data
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-date-council-area-location-15-19.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data1519.s <- read_excel(temp, sheet=2, range="A5:E25207", col_names=FALSE)
colnames(data1519.s) <- c("week", "name", "location", "year", "deaths")
data1519.s$week <- as.numeric(data1519.s$week)
#Take 5 year averages
data1519.s <- data1519.s %>%
group_by(week, name, location) %>%
summarise(deaths.1519=mean(deaths)) %>%
ungroup()
#Merge years
data.s <- merge(data1519.s, data20.s, all=TRUE)
data.s$deaths.1519 <- replace_na(data.s$deaths.1519)
data.s$COVID.20 <- if_else(is.na(data.s$COVID.20) & data.s$week<=maxweek.s, 0, data.s$COVID.20)
data.s$Other.20 <- if_else(is.na(data.s$Other.20) & data.s$week<=maxweek.s, 0, data.s$Other.20)
#Compress locations to match EW
data.s$location <- case_when(
data.s$location=="Care Home" ~ "Care home",
data.s$location %in% c("Home / Non-institution", "Other institution") ~ "Home/Other",
TRUE ~ "Hospital"
)
data.s <- data.s %>%
group_by(week, name, location) %>%
summarise(deaths.1519=sum(deaths.1519, na.rm=TRUE),
across(c("COVID.20", "Other.20"), sum)) %>%
mutate(AllCause.20=COVID.20+Other.20) %>%
ungroup()
#Bring in Scottish LA codes
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/35de30c6778b463a8305939216656132_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
codelookup <- read.csv(temp)[,c(2,3)]
colnames(codelookup) <- c("code", "name")
data.s <- merge(data.s, codelookup, all.x=TRUE)
#Merge countries
data <- bind_rows(data.ew, data.s)
data$country <- case_when(
substr(data$code,1,1)=="E" ~ "England",
substr(data$code,1,1)=="W" ~ "Wales",
substr(data$code,1,1)=="S" ~ "Scotland")
#Bring in LA populations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D423", col_names=TRUE)
colnames(LApop) <- c("code", "name", "geography", "pop")
#Merge isles of Scilly in with Cornwall
LApop$code <- if_else(LApop$code=="E06000053", "E06000052", LApop$code)
LApop$name <- if_else(LApop$name=="Isles of Scilly", "Cornwall", LApop$name)
#Address merging of Aylesbury Vale, Chiltern and South Bucks into Bucks
LApop$name <- if_else(LApop$name %in% c("Aylesbury Vale", "Chiltern", "South Bucks", "Wycombe"),
"Buckinghamshire", LApop$name)
LApop$code <- if_else(LApop$code %in% c("E07000004", "E07000005", "E07000006", "E07000007"),
"E06000060", LApop$code)
LApop <- LApop %>%
group_by(name, code) %>%
summarise(pop=sum(pop)) %>%
ungroup()
data <- merge(data, LApop, all.x=TRUE)
#Bring in Regions
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("code", "Region")
data <- merge(data, LADtoRegion,all.x=TRUE)
data$Region <- case_when(
is.na(data$Region) & data$country=="Scotland" ~ "Scotland",
is.na(data$Region) & data$country=="Wales" ~ "Wales",
is.na(data$Region) & data$code %in% c("E06000058", "E06000059", "E07000246") ~ "South West",
is.na(data$Region) & data$code %in% c("E07000244", "E07000245") ~ "East of England",
is.na(data$Region) & data$code=="E06000060" ~ "South East",
TRUE ~ as.character(data$Region))
#Generate national summaries
data.nat <- data %>%
group_by(week, country, location) %>%
summarise(across(c("deaths.1519", "AllCause.20", "COVID.20", "Other.20"), sum)) %>%
mutate(name=country, Region="Nation") %>%
ungroup()
data <- bind_rows(data, data.nat)
#Calculate excesses
data$allexcess <- case_when(
data$country=="Scotland" & data$week<=maxweek.s ~ data$AllCause.20-data$deaths.1519,
data$country!="Scotland" & data$week<=maxweek.ew ~ data$AllCause.20-data$deaths.1519)
data$excessrate <- data$allexcess*100000/data$pop
data$othexcess <- case_when(
data$country=="Scotland" & data$week<=maxweek.s ~ data$Other.20-data$deaths.1519,
data$country!="Scotland" & data$week<=maxweek.ew ~ data$Other.20-data$deaths.1519)
data$COVIDrate <- data$COVID.20*100000/data$pop
#############################################################
#Daily data
#Set up daily dataframe
#Bring in case data
#Read in cases data for England
temp <- tempfile()
source <- "https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
casedata.E <- read.csv(temp)[,c(1:5)]
colnames(casedata.E) <- c("name", "code", "geography", "date", "cases")
casedata.E <- casedata.E %>% filter(geography=="Lower tier local authority")
mindate <- min(as.Date(casedata.E$date))
maxdate <- max(as.Date(casedata.E$date))
#Address merging of Aylesbury Vale, Chiltern and South Bucks into Bucks
casedata.E$name <- if_else(casedata.E$name %in% c("Aylesbury Vale", "Chiltern", "South Bucks", "Wycombe"),
"Buckinghamshire", as.character(casedata.E$name))
casedata.E$code <- if_else(casedata.E$code %in% c("E07000004", "E07000005", "E07000006", "E07000007"),
"E06000060", as.character(casedata.E$code))
casedata.E <- casedata.E %>%
group_by(name, code, date) %>%
summarise(cases=sum(cases)) %>%
ungroup()
#Set up skeleton dataframe, merging City of London and Hackney
daydata <- data.frame(code=rep(unique(subset(data, !name %in% c("England", "Scotland", "Wales"))$code),
each=maxdate-mindate+1),
name=rep(unique(subset(data, !name %in% c("England", "Scotland", "Wales"))$name),
each=maxdate-mindate+1),
date=rep(seq.Date(from=mindate, to=maxdate, by="day"),
times=length(unique(subset(data, !name %in% c("England", "Scotland", "Wales"))$code))))
#merge in English cases
daydata <- merge(daydata, casedata.E, by=c("name", "code", "date"), all.x=TRUE)
#Bring in Welsh case data
temp <- tempfile()
source <- "http://www2.nphs.wales.nhs.uk:8080/CommunitySurveillanceDocs.nsf/3dc04669c9e1eaa880257062003b246b/77fdb9a33544aee88025855100300cab/$FILE/Rapid%20COVID-19%20surveillance%20data.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
casedata.W <- read_excel(temp, sheet=3)[,c(1:3)]
colnames(casedata.W) <- c("name", "date", "cases")
daydata <- merge(daydata, casedata.W, by=c("name", "date"), all.x=TRUE)
daydata$country <- case_when(
substr(daydata$code,1,1)=="E" ~ "England",
substr(daydata$code,1,1)=="W" ~ "Wales",
substr(daydata$code,1,1)=="S" ~ "Scotland")
#Fill in blanks
daydata$cases <- coalesce(daydata$cases.x, daydata$cases.y)
daydata <- daydata[,-c(4:5)]
daydata$cases <- if_else(
is.na(daydata$cases) & daydata$country!="Scotland", 0, daydata$cases)
#Experimental pillar 1 & 2 separation - England only and only up to end of June
#Archive files from 1st & 2nd July - either side of pillar 2 addition to data
#Available from https://coronavirus.data.gov.uk/archive
#Pillar 1 data
temp <- tempfile()
source <- "https://coronavirus.data.gov.uk/downloads/csv/dated/coronavirus-cases_202007011400.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
p1data <- read.csv(temp)[,c(1:5)]
colnames(p1data) <- c("name", "code", "geography", "date", "p1cases")
p1data$date <- as.Date(p1data$date)
p1data <- subset(p1data, geography=="Lower tier local authority" & date<"2020-07-01")
p1data$code <- if_else(p1data$code %in% c("E09000001", "E09000012"),
"E09000012", as.character(p1data$code))
p1data$code <- case_when(
p1data$code %in% c("E09000001", "E09000012") ~ "E09000012",
p1data$code %in% c("E07000004", "E07000005", "E07000006", "E07000007") ~ "E06000060",
TRUE ~ p1data$code
)
p1data <- p1data %>%
group_by(code, date) %>%
summarise(p1cases=sum(p1cases)) %>%
ungroup()
#Pillar 1 & 2 combined
temp <- tempfile()
source <- "https://coronavirus.data.gov.uk/downloads/csv/dated/coronavirus-cases_202007021618.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
p12data <- read.csv(temp)[,c(1:5)]
colnames(p12data) <- c("name", "code", "geography", "date", "p12cases")
p12data$date <- as.Date(p12data$date)
p12data <- subset(p12data, geography=="Lower tier local authority" & date<"2020-07-01")
p12data$code <- case_when(
p1data$code %in% c("E09000001", "E09000012") ~ "E09000012",
p1data$code %in% c("E07000004", "E07000005", "E07000006", "E07000007") ~ "E06000060",
TRUE ~ p12data$code
)
p12data <- p12data %>%
group_by(code, date) %>%
summarise(p12cases=sum(p12cases)) %>%
ungroup()
daydata <- merge(daydata, p1data, by=c("date", "code"), all.x=TRUE)
daydata <- merge(daydata, p12data, by=c("date", "code"), all.x=TRUE)
daydata$p1cases <- if_else(is.na(daydata$p1cases) & daydata$country=="England" & daydata$date%
group_by(date, country) %>%
summarise(across(c("cases", "p1cases", "p12cases", "p2cases"), sum)) %>%
mutate(name=country) %>%
ungroup()
daydata <- bind_rows(daydata, daydata.nat)
daydata <- daydata %>%
group_by(name) %>%
arrange(date) %>%
mutate(casesroll_avg=roll_mean(cases, 7, align="right", fill=0)) %>%
ungroup()
daydata$date <- as.Date(daydata$date)
#Calculate weekly cases
daydata$week <- week(as.Date(daydata$date)-days(4))
daydata.week <- daydata %>%
group_by(name, week) %>%
summarise(cases=sum(cases), p1cases=sum(p1cases), p2cases=sum(p2cases)) %>%
ungroup()
data <- merge(data, daydata.week, all.x=TRUE)
#Calculate total excess deaths
excess.ew <- data %>%
filter(country!="Scotland" & week<=maxweek.ew) %>%
group_by(name) %>%
summarise(excess=sum(allexcess, na.rm=TRUE), hist=sum(deaths.1519), excessprop=excess/hist) %>%
ungroup()
excess.s <- data %>%
filter(country=="Scotland" & week<=maxweek.s) %>%
group_by(name) %>%
summarise(excess=sum(allexcess, na.rm=TRUE), hist=sum(deaths.1519), excessprop=excess/hist) %>%
ungroup()
excess <- bind_rows(excess.ew, excess.s)
#Save master data
write.csv(data, "COVID_LA_Plots/LAExcess.csv")
write.csv(excess, "COVID_LA_Plots/LAExcessSummary.csv")
write.csv(daydata, "COVID_LA_Plots/LACases.csv")
####################################################################
data <- read.csv("COVID_LA_Plots/LAExcess.csv")
excess <- read.csv("COVID_LA_Plots/LAExcessSummary.csv")
daydata <- read.csv("COVID_LA_Plots/LACases.csv")
###################
#LA-specific plots#
###################
LA <- "Sheffield"
LAdata <- data %>% filter(name==LA)
LAexcess <- excess %>% filter(name==LA)
enddate <- if_else(LAdata$country[1]=="Scotland", enddate.s, enddate.ew)
source <- if_else(LAdata$country[1]=="Scotland", "NRS", "ONS")
maxweek <- week(enddate)
labpos <- max(sum(LAdata$AllCause.20[LAdata$week==maxweek]),
sum(LAdata$deaths.1519[LAdata$week==maxweek]))
lab <- if_else(LAexcess[2]<0,
paste0(round(LAexcess[2],0), " (",round(LAexcess[4]*100,0), "%) deaths in 2020\ncompared to the average in 2015-19"),
paste0("+", round(LAexcess[2],0), " (+",round(LAexcess[4]*100,0), "%) deaths in 2020\ncompared to the average in 2015-19"))
#Excess deaths graph
png("Outputs/COVID_LA_Plots_1.png", units="in", width=8, height=6, res=500)
LAdata %>%
group_by(week) %>%
summarise(deaths.1519=sum(deaths.1519), AllCause.20=sum(AllCause.20)) %>%
ggplot()+
geom_line(aes(x=week, y=deaths.1519), colour="skyblue4")+
geom_line(aes(x=week, y=AllCause.20), colour="red")+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Deaths", limits=c(0,NA))+
theme_classic()+
theme(plot.subtitle=element_markdown())+
annotate("text", x=week(enddate)-2, y=max(labpos*1.5, labpos+20),
label=lab,
hjust=0, colour="red", size=3)+
labs(title=paste0("Excess deaths in ", LA, " during the pandemic"),
subtitle=paste0("Weekly deaths in 2020 compared to the average in 2015-19 by date of occurence
Data up to ", enddate, ". Data for recent weeks is likely to be an undercount due to deaths
not yet having been fully processed."),
caption=paste0("Data from ", source," | Plot by @VictimOfMaths"))
dev.off()
#Excess deaths by cause
png("Outputs/COVID_LA_Plots_2.png", units="in", width=8, height=6, res=500)
LAdata %>%
gather(cause, excess, c(7,14)) %>%
group_by(week, cause) %>%
summarise(excess=sum(excess)) %>%
mutate(cause=fct_relevel(cause, "COVID.20")) %>%
ggplot(aes(x=week, y=excess, fill=cause))+
geom_bar(stat="identity")+
geom_segment(aes(x=0.5, xend=maxweek+0.5, y=0, yend=0), colour="Grey30")+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Excess deaths vs. 2015-19 average")+
scale_fill_paletteer_d("LaCroixColoR::PinaFraise", name="Cause", labels=c("COVID-19", "Other causes"))+
theme_classic()+
labs(title=paste0("Excess deaths in ", LA, " during the pandemic"),
subtitle=paste0("Excess deaths by date of occurence in 2020 vs. 2015-19 average by cause.\nData up to ", enddate, ". Data for recent weeks is likely to be an undercount due to deaths\nnot yet having been fully processed."),
caption=paste0("Data from ", source," | Plot by @VictimOfMaths"))
dev.off()
#Excess deaths by location
png("Outputs/COVID_LA_Plots_3.png", units="in", width=8, height=6, res=500)
ggplot(LAdata, aes(x=week, y=allexcess, fill=location))+
geom_col()+
geom_segment(aes(x=0.5, xend=maxweek+0.5, y=0, yend=0), colour="Grey30")+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Excess deaths vs. 2015-19 average")+
scale_fill_paletteer_d("ggsci::planetexpress_futurama", name="Place of death")+
theme_classic()+
labs(title=paste0("Excess deaths in ", LA, " during the pandemic"),
subtitle=paste0("Excess deaths by occurence in 2020 vs. 2015-19 average by location.\nData up to ", enddate, ". Data for recent weeks is likely to be an undercount due to deaths\nnot yet having been fully processed."),
caption=paste0("Data from ", source," | Plot by @VictimOfMaths"))
dev.off()
#Cases vs. deaths
png("Outputs/COVID_LA_Plots_4.png", units="in", width=8, height=6, res=500)
LAdata %>%
group_by(week) %>%
summarise(excess=sum(COVID.20), cases=unique(cases)) %>%
ggplot()+
geom_segment(aes(x=0.5, xend=maxweek+0.5, y=0, yend=0), colour="Grey30")+
geom_line(aes(x=week, y=cases), colour="#B25D91")+
geom_line(aes(x=week, y=excess), colour="#1BB6AF")+
scale_x_continuous(name="Week", limits=c(0,maxweek+1))+
scale_y_continuous(name="")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title=paste0("Timeline of COVID-19 in ", LA),
subtitle=paste0("Confirmed new COVID-19 cases compared to confirmed COVID-19 deaths by week of occurence.
Data up to ", enddate),
caption=paste0("Data from ", source," | Plot by @VictimOfMaths"))
dev.off()
#cases plot
#England & Wales only
tiff(paste0("Outputs/COVIDNewCases", LA, ".tiff"), units="in", width=8, height=6, res=500)
#png("Outputs/COVID_LA_Plots_5.png", units="in", width=8, height=6, res=500)
daydata %>%
filter(name==LA) %>%
ggplot()+
geom_col(aes(x=date, y=cases), fill="skyblue2")+
geom_line(aes(x=date, y=casesroll_avg), colour="red")+
scale_x_date(name="Date")+
scale_y_continuous(name="Daily confirmed new cases")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title=paste0("Confirmed new COVID cases in ",LA),
subtitle="Confirmed new COVID-19 cases identified through combined pillar 1 & 2 testing
and the 7-day rolling average",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
#Experimental pillar 1 vs. 2 tests numbers
#ENGLAND ONLY
#tiff(paste0("Outputs/COVIDNewCasesPillars", LA, ".tiff"), units="in", width=8, height=6, res=500)
png("Outputs/COVID_LA_Plots_6.png", units="in", width=8, height=6, res=500)
daydata %>%
filter(name==LA) %>%
ggplot()+
geom_line(aes(x=date, y=p1cases), colour="#FF4E86")+
geom_line(aes(x=date, y=p2cases), colour="#FF9E44")+
geom_line(aes(x=date, y=casesroll_avg), colour="navyblue")+
scale_x_date(name="Date")+
scale_y_continuous(name="Daily confirmed new cases")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title=paste0("Confirmed new COVID cases in ",LA),
subtitle="Confirmed new COVID-19 cases identified through Pillar 1 and Pillar 2 testing and the 7-day rolling average.
PHE changed their methodology on 1st July and so pillar-specific data is not available since then.
Rolling average based on new approach.
Pillar-specific figures are estimated from the old approach and may be subject to some double-counting",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
#################################################
#Analysis of cumulative excess deaths
================================================
FILE: All Cause Mortality/MSOA Deaths.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(paletteer)
library(hrbrthemes)
library(sf)
#Read in data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1marchand31july2020/referencetables1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read_excel(temp, sheet="Table 5", range="A14:X7214", col_names=FALSE)[,c(1,2,3,10,17,24)]
colnames(data) <- c("code", "ONSName", "Name", "CV19Deaths", "OtherDeaths", "AllDeaths")
#Read in MSOA populations
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fmiddlesuperoutputareamidyearpopulationestimates%2fmid2018sape21dt3a/sape21dt3amid2018msoaon2019lasyoaestimatesformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
MSOApop <- read_excel(file.path(temp2,"SAPE21DT3a-mid-2018-msoa-on-2019-LA-syoa-estimates-formatted.xlsx"),
sheet="Mid-2018 Persons", range=c("A6:D7545"), col_names=FALSE)[,c(1,4)]
colnames(MSOApop) <- c("code", "pop")
#Merge into data and calculate rates
data <- merge(data, MSOApop)
data$CV19rate <- data$CV19Deaths*100000/data$pop
#Download shapefile of LA boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "msoa11cd"] <- "code"
map <- full_join(shapefile, data, by="code", all.y=TRUE)
png("Outputs/COVIDDeathsMapBW.png", units="in", width=20, height=23.3, res=500)
ggplot(map)+
geom_sf(aes(geometry=geometry, fill=CV19rate), colour=NA, show.legend=FALSE)+
scale_fill_paletteer_c("oompaBase::greyscale", name="")+
theme_ipsum_rc()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour="Black"),
axis.title=element_blank(), plot.background=element_rect(fill="black"),
panel.background=element_rect(fill="Black"), legend.background=element_rect(fill="Black"),
text=element_text(colour="White", size=rel(5)), legend.text=element_text(colour="White", size=rel(3)),
panel.grid.major=element_line(colour="transparent"))+
guides(fill=guide_colourbar(ticks=FALSE))
dev.off()
#Then crop out the little bit of whitespace around the image, import into Aerialod and make it look pretty!
#Bring in Local Authority to allow LA-specific plots
#Read in MSOA to LA lookup
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
MSOAtoLAD <- read.csv(temp)[,c(8,10,11,15,17)]
colnames(MSOAtoLAD) <- c("code", "LAcode", "LAname", "Region", "Country")
#Remove duplicate rows, as original data was LSOA-level
MSOAtoLAD <- MSOAtoLAD %>%
distinct(.keep_all = TRUE)
map <- full_join(map, MSOAtoLAD, by="code", all.y=TRUE)
#Set up outputs for any LA by name
LA <- c("Barking and Dagenham", "Barnet", "Bexley", "Brent", "Bromley", "Camden", "City of London",
"Croydon", "Ealing", "Enfield", "Greenwich", "Hackney", "Hammersmith and Fulham",
"Haringey", "Harrow", "Havering", "Hillingdon", "Hounslow", "Islington", "Kensington and Chelsea",
"Kingston upon Thames", "Lambeth", "Lewisham", "Merton", "Newham", "Redbridge",
"Richmond upon Thames", "Southwark", "Sutton", "Tower Hamlets", "Waltham Forest",
"Wandsworth", "Westminster")
#png(paste0("Outputs/COVIDDeathsMapBW", LA, ".png"), units="in", width=20, height=20, res=500)
png("Outputs/COVIDDeathsMapBWLondon.png", units="in", width=20, height=20, res=500)
ggplot(subset(map, LAname %in% LA))+
geom_sf(aes(geometry=geometry, fill=CV19Deaths), colour=NA, show.legend=FALSE)+
scale_fill_paletteer_c("oompaBase::greyscale", name="")+
theme_ipsum_rc()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour="Black"),
axis.title=element_blank(), plot.background=element_rect(fill="black"),
panel.background=element_rect(fill="Black"), legend.background=element_rect(fill="Black"),
text=element_text(colour="White", size=rel(5)), legend.text=element_text(colour="White", size=rel(3)),
panel.grid.major=element_line(colour="transparent"))+
guides(fill=guide_colourbar(ticks=FALSE))
dev.off()
##################
#Scottish version#
##################
#Read in data
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-extra-tables-week-32.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data.S <- read_excel(temp, sheet="Table S8", range="A5:F1283", col_names=FALSE)
colnames(data.S) <- c("code", "IZname", "LAname", "CV19Deaths", "pop", "CV19rate")
#Read in shapefile
temp <- tempfile()
temp2 <- tempfile()
source <- "http://sedsh127.sedsh.gov.uk/Atom_data/ScotGov/ZippedShapefiles/SG_IntermediateZoneBdry_2011.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
shapefile.S <- st_read(file.path(temp2, "SG_IntermediateZone_Bdry_2011.shp"))
names(shapefile.S)[names(shapefile.S) == "InterZone"] <- "code"
map.S <- full_join(shapefile.S, data.S, by="code", all.y=TRUE)
png("Outputs/COVIDDeathsMapScotBW.png", units="in", width=20, height=25, res=500)
ggplot(map.S)+
geom_sf(aes(geometry=geometry, fill=CV19rate), colour=NA, show.legend=FALSE)+
scale_fill_paletteer_c("oompaBase::greyscale", name="")+
theme_ipsum_rc()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour="Black"),
axis.title=element_blank(), plot.background=element_rect(fill="black"),
panel.background=element_rect(fill="Black"), legend.background=element_rect(fill="Black"),
text=element_text(colour="White", size=rel(5)), legend.text=element_text(colour="White", size=rel(3)),
panel.grid.major=element_line(colour="transparent"))+
guides(fill=guide_colourbar(ticks=FALSE))
dev.off()
#Merge the UK data
temp1 <- map[,c(2,8,9,12,13,18)]
temp2 <- map.S[,c(1,2,12,13,14,15)]
map.UK <- rbind(temp1, temp2)
png("Outputs/COVIDDeathsMapUKBW.png", units="in", width=20, height=25, res=500)
ggplot(map.UK)+
geom_sf(aes(geometry=geometry, fill=CV19rate), colour=NA, show.legend=FALSE)+
scale_fill_paletteer_c("oompaBase::greyscale", name="")+
theme_ipsum_rc()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour="Black"),
axis.title=element_blank(), plot.background=element_rect(fill="black"),
panel.background=element_rect(fill="Black"), legend.background=element_rect(fill="Black"),
text=element_text(colour="White", size=rel(5)), legend.text=element_text(colour="White", size=rel(3)),
panel.grid.major=element_line(colour="transparent"))+
guides(fill=guide_colourbar(ticks=FALSE))
dev.off()
================================================
FILE: All Cause Mortality/NRS Excess Deaths by Cause.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(paletteer)
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-53.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
endcol <- "BC"
#Historic data for all locations
all.hist <- read_excel(temp, sheet="Table 3 ", range=paste0("B8:",endcol,"13"), col_names=FALSE)
colnames(all.hist) <- c("cause", seq(1:(ncol(all.hist)-1)))
all.hist$time <- "hist"
all.hist$loc <- "All"
#2020 data for all locations
all.2020 <- read_excel(temp, sheet="Table 3 ", range=paste0("B16:",endcol,"21"), col_names=FALSE)
colnames(all.2020) <- c("cause", seq(1:(ncol(all.2020)-1)))
all.2020$time <- "now"
all.2020$loc <- "All"
#Historic data for care homes
ch.hist <- read_excel(temp, sheet="Table 3 ", range=paste0("B32:",endcol,"37"), col_names=FALSE)
colnames(ch.hist) <- c("cause", seq(1:(ncol(ch.hist)-1)))
ch.hist$time <- "hist"
ch.hist$loc <- "Care Home"
#2020 data for care homes
ch.2020 <- read_excel(temp, sheet="Table 3 ", range=paste0("B40:",endcol,"45"), col_names=FALSE)
colnames(ch.2020) <- c("cause", seq(1:(ncol(ch.2020)-1)))
ch.2020$time <- "now"
ch.2020$loc <- "Care Home"
#Historic data for homes
hosp.hist <- read_excel(temp, sheet="Table 3 ", range=paste0("B56:",endcol,"61"), col_names=FALSE)
colnames(hosp.hist) <- c("cause", seq(1:(ncol(hosp.hist)-1)))
hosp.hist$time <- "hist"
hosp.hist$loc <- "Home"
#2020 data for homes
hosp.2020 <- read_excel(temp, sheet="Table 3 ", range=paste0("B64:",endcol,"69"), col_names=FALSE)
colnames(hosp.2020) <- c("cause", seq(1:(ncol(hosp.2020)-1)))
hosp.2020$time <- "now"
hosp.2020$loc <- "Home"
#Historic data for hospitals
home.hist <- read_excel(temp, sheet="Table 3 ", range=paste0("B80:",endcol,"85"), col_names=FALSE)
colnames(home.hist) <- c("cause", seq(1:(ncol(home.hist)-1)))
home.hist$time <- "hist"
home.hist$loc <- "Hospital"
#2020 data for hospitals
home.2020 <- read_excel(temp, sheet="Table 3 ", range=paste0("B88:",endcol,"93"), col_names=FALSE)
colnames(home.2020) <- c("cause", seq(1:(ncol(home.2020)-1)))
home.2020$time <- "now"
home.2020$loc <- "Hospital"
#Historic data for other locations
other.hist <- read_excel(temp, sheet="Table 3 ", range=paste0("B104:",endcol,"109"), col_names=FALSE)
colnames(other.hist) <- c("cause", seq(1:(ncol(other.hist)-1)))
other.hist$time <- "hist"
other.hist$loc <- "Other"
#2020 data for other locations
other.2020 <- read_excel(temp, sheet="Table 3 ", range=paste0("B112:",endcol,"117"), col_names=FALSE)
colnames(other.2020) <- c("cause", seq(1:(ncol(other.2020)-1)))
other.2020$time <- "now"
other.2020$loc <- "Other"
data <- bind_rows(all.hist, all.2020, ch.hist, ch.2020, hosp.hist, hosp.2020, home.hist, home.2020,
other.hist, other.2020)
data <- gather(data, week, deaths, c(2:(ncol(data)-2)))
data <- spread(data, time, deaths)
data$week <- as.numeric(data$week)
data <- data %>%
mutate(abs=now-hist, rel=abs/hist)
data$cause <- if_else(data$cause=="Circulatory (heart disease and stroke)", "Circulatory",
data$cause)
data$cause <- factor(data$cause, levels=c("COVID-19", "Cancer", "Circulatory",
"Dementia / Alzheimers", "Respiratory", "Other"))
data$loc <- factor(data$loc, levels=c("Hospital", "Care Home", "Home", "All"))
#get net deaths difference by location
net.deaths.loc <- data %>%
group_by(loc, week) %>%
summarise(deaths=sum(abs))
net.deaths.cause <- data %>%
group_by(cause, week) %>%
summarise(deaths=sum(abs))
#Plot of all locations
tiff("Outputs/NRSExcessxcause.tiff", units="in", width=8, height=6, res=500)
ggplot(data=subset(data, loc=="All"))+
geom_segment(aes(x=0, xend=ncol(all.hist)-3, y=0, yend=0))+
geom_bar(aes(x=week, y=abs, fill=cause), stat="identity", position="stack")+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Deaths in 2020 vs. 2015-19 average")+
scale_fill_paletteer_d("LaCroixColoR::paired", name="Cause of death")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="COVID-19 deaths in Scotland have continued to fall gradually",
subtitle="Registered deaths in 2020 compared to the previous 5-year average",
caption="Data from National Records of Scotland | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/NRSExcessxcausexloc.tiff", units="in", width=12, height=8, res=500)
ggplot(data=subset(data, loc!="All" & loc!="Other"))+
geom_segment(aes(x=0, xend=ncol(all.hist)-3, y=0, yend=0))+
geom_bar(aes(x=week, y=abs, fill=cause), stat="identity", position="stack")+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Deaths in 2020 vs. 2015-19 average")+
scale_fill_paletteer_d("LaCroixColoR::paired", name="Cause of death")+
facet_wrap(~loc)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Excess mortality in Scotland by cause and location",
subtitle="Registered deaths in 2020 compared to the previous 5-year average",
caption="Data from National Records of Scotland | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/NRSExcessxlocxcause.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(data, loc!="All" & loc!="Other"))+
geom_segment(aes(x=0, xend=ncol(all.hist)-3, y=0, yend=0))+
geom_line(aes(x=week, y=abs, colour=loc))+
scale_colour_paletteer_d("fishualize::Scarus_tricolor", name="Place of death")+
scale_x_continuous(name="Week")+
scale_y_continuous(name="Deaths in 2020 vs. 2015-19 average")+
facet_wrap(~cause)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="COVID-19 deaths have mainly fallen in hospitals",
subtitle="Excess mortality in Scotland in 2020 by cause and location",
caption="Data from National Records of Scotland | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/ONSDeathsxVaxStatus.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(paletteer)
library(extrafont)
library(ragg)
library(ggtext)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
vaxpal <- c("#FFBC42", "#D81159")
temp <- tempfile()
url1 <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/deathsbyvaccinationstatusengland/deathsoccurringbetween1april2021and31december2022/referencetable.xlsx"
temp <- curl_download(url=url1, destfile=temp, quiet=FALSE, mode="wb")
vaxstatus <- read_excel(temp, sheet="Table 1", range="A4:J571") %>%
mutate(Date=as.Date(paste(Year, Month, "01", sep="-"), "%Y-%B-%d")) %>%
select(c(1,4:7, 9:11)) %>%
set_names("Cause", "Vaccination Status", "Deaths", "PersonYears", "Rate",
"LowerCI", "UpperCI", "Date") %>%
mutate(across(c(Rate, LowerCI, UpperCI), ~as.numeric(.x)))
vaxxage <- read_excel(temp, sheet="Table 2", range="A4:K3091") %>%
mutate(Date=as.Date(paste(Year, Month, "01", sep="-"), "%Y-%B-%d")) %>%
select(c(1, 4:8, 10:12)) %>%
set_names("Cause", "Age", "Vaccination Status", "Deaths", "PersonYears", "Rate",
"LowerCI", "UpperCI", "Date") %>%
mutate(across(c(Rate, LowerCI, UpperCI), ~as.numeric(.x)))
vaxxsex <- read_excel(temp, sheet="Table 3", range="A4:K1138") %>%
mutate(Date=as.Date(paste(Year, Month, "01", sep="-"), "%Y-%B-%d")) %>%
select(c(1,2, 5:8, 10:12)) %>%
set_names("Sex", "Cause", "Vaccination Status", "Deaths", "PersonYears", "Rate",
"LowerCI", "UpperCI", "Date") %>%
mutate(across(c(Rate, LowerCI, UpperCI), ~as.numeric(.x)))
vaxxagexsex <- read_excel(temp, sheet="Table 4", range="A4:L4120") %>%
mutate(Date=as.Date(paste(Year, Month, "01", sep="-"), "%Y-%B-%d"))
agg_tiff("Outputs/DeathsxVaxxCause.tiff", units="in", width=10, height=6, res=600)
vaxstatus %>% filter(`Vaccination Status` %in% c("Ever vaccinated", "Unvaccinated")) %>%
ggplot(aes(x=Date))+
geom_ribbon(aes(ymin=LowerCI, ymax=UpperCI, fill=`Vaccination Status`),
alpha=0.3, show.legend=FALSE)+
geom_line(aes(y=Rate, colour=`Vaccination Status`))+
scale_x_date(labels=date_format("%b %y"))+
scale_y_continuous(name="Age-standardised deaths per 100,000 person years")+
scale_fill_manual(values=vaxpal)+
scale_colour_manual(values=vaxpal, name="")+
facet_wrap(~Cause)+
theme_custom()+
theme(legend.position = "bottom", plot.title=element_markdown())+
labs(title="Death rates are consistently lower among vaccinated vs. unvaccinated people",
subtitle="Age-standardised mortality rates by cause and vaccination status in England. Shaded areas represent 95% Confidence Intervals\n ",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
vaxxageredux <- vaxxage %>%
mutate(VaxStatus=if_else(`Vaccination Status`=="Unvaccinated", "Unvaccinated",
"Ever Vaccinated")) %>%
group_by(Cause, Age, Date, VaxStatus) %>%
summarise(Rate=weighted.mean(Rate, PersonYears, na.rm=TRUE),
LowerCI=weighted.mean(LowerCI, PersonYears, na.rm=TRUE),
UpperCI=weighted.mean(UpperCI, PersonYears, na.rm=TRUE), .groups="drop")
agg_tiff("Outputs/DeathsxVaxxCausexAge.tiff", units="in", width=10, height=6, res=600)
vaxxageredux %>% filter(Cause=="All causes" & Age!="90+") %>%
ggplot(aes(x=Date))+
geom_ribbon(aes(ymin=LowerCI, ymax=UpperCI, fill=VaxStatus),
alpha=0.3, show.legend=FALSE)+
geom_line(aes(y=Rate, colour=VaxStatus))+
scale_x_date(labels=date_format("%b %y"))+
scale_y_continuous(name="Age-standardised deaths per 100,000 person years",
limits=c(0,NA))+
scale_fill_manual(values=vaxpal)+
scale_colour_manual(values=vaxpal, name="")+
facet_wrap(~Age, scales="free_y")+
theme_custom()+
theme(legend.position = "bottom", plot.title=element_markdown())+
labs(title="Death rates are consistently lower among vaccinated vs. unvaccinated people",
subtitle="Age-standardised all cause mortality rates by age, cause and vaccination status in England. Shaded areas represent 95% Confidence Intervals\n ",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Currently appears to be a labelling error in the ONS data here with the male
#and female dates not aligning
agg_tiff("Outputs/DeathsxVaxxCausexSex.tiff", units="in", width=12, height=6, res=600)
vaxxsex %>% filter(`Vaccination Status` %in% c("Ever vaccinated", "Unvaccinated")) %>%
ggplot(aes(x=Date))+
geom_ribbon(aes(ymin=LowerCI, ymax=UpperCI, fill=`Vaccination Status`),
alpha=0.3, show.legend=FALSE)+
geom_line(aes(y=Rate, colour=`Vaccination Status`))+
scale_x_date(labels=date_format("%b %y"))+
scale_y_continuous(name="Age-standardised deaths per 100,000 person years",
limits=c(0,NA))+
scale_fill_manual(values=vaxpal)+
scale_colour_manual(values=vaxpal, name="")+
facet_grid(Sex~Cause)+
theme_custom()+
theme(legend.position = "bottom", plot.title=element_markdown())+
labs(title="Death rates are consistently lower among vaccinated vs. unvaccinated people",
subtitle="Age-standardised all cause mortality rates by age, cause and vaccination status in England. Shaded areas represent 95% Confidence Intervals\n ",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: All Cause Mortality/ScottishAllCauseDeathsDetail.R
================================================
rm(list=ls())
library(tidyverse)
library(paletteer)
library(curl)
library(lubridate)
library(readxl)
library(ggtext)
#Controls
ScotDate <- "3rd January"
Scot2020 <- "https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-53.xlsx"
ScotRange <- "BC" #incrememnt by one letter each week
Weekno <- 53
#Read in 2015-2019 location data
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-location-2015-2019.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data.loc <- na.omit(read.csv(temp))
data.loc <- data.loc[-c(1, 26:31),]
colnames(data.loc) <- c("year", c(1:53))
data.loc$location <- rep(c("Care Home", "Home / Non-institution", "Hospital", "Other instutition"),
each=6)
data.loc_long <- gather(data.loc, week, deaths, c(2:54))
data.loc_long$week <- as.integer(data.loc_long$week)
#Read in 2015-19 health board data
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-HB-and-CA-2015-2019.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data.HB <- read_excel(temp, sheet=1, range="A5:BC74", col_names=FALSE)
colnames(data.HB) <- c("HB", "year", c(1:53))
data.HB$year <- as.character(data.HB$year)
HBlist <- unique(na.omit(data.HB$HB))
data.HB$HB <- rep(HBlist, each=5)
data.HB_long <- gather(data.HB, week, deaths, c(3:55))
data.HB_long$week <- as.integer(data.HB_long$week)
#calculate averages
temp <- data.HB_long %>%
group_by(week, HB) %>%
summarise(deaths=mean(deaths))
temp$year="average"
data.HB_long <- bind_rows(data.HB_long, temp)
#Bring in 2020 data
temp <- tempfile()
temp <- curl_download(url=Scot2020, destfile=temp, quiet=FALSE, mode="wb")
#Tidy location data
data.loc.2020 <- data.frame(t(read_excel(temp, sheet="Table 2 ", range=c(paste0("C90:", ScotRange, "93")), col_names=FALSE)))
date <- data.frame(date=format(seq.Date(from=as.Date("2019-12-30"), by="7 days", length.out=nrow(data.loc.2020)), "%d/%m/%y"))
data.loc.2020 <- cbind(date, data.loc.2020)
colnames(data.loc.2020) <- c("date", "Care Home", "Home / Non-institution", "Hospital", "Other instutition")
data.loc.2020$date <- as.Date(data.loc.2020$date, "%d/%m/%y")
data.loc.2020$week <- week(data.loc.2020$date+days(6))
data.loc.2020$week <- if_else(data.loc.2020$date==as.Date("2020-12-28"), 53, data.loc.2020$week)
data.loc.2020$year <- "2020"
#Merge with older years
data.loc.2020_long <- gather(data.loc.2020, location, deaths, c(2:5))
data.loc.2020_long$deaths <- as.numeric(data.loc.2020_long$deaths)
data.loc.2020_long$deaths <- replace_na(data.loc.2020_long$deaths, 0)
data.loc <- bind_rows(data.loc_long, data.loc.2020_long)
#merge 'Other institution' deaths into 'home/other'
data.loc$loc <- case_when(
data.loc$location=="Care Home" ~ "Care Home",
data.loc$location=="Hospital" ~ "Hospital",
TRUE ~ "Home/Other"
)
data.loc$loc <- factor(data.loc$loc, levels=c("Hospital", "Care Home", "Home/Other"))
data.loc <- data.loc %>%
group_by(year, loc, week) %>%
summarise(deaths=sum(deaths))
#Tidy HB data
data.HB.2020 <- data.frame(t(read_excel(temp, sheet="Table 2 ", range=c(paste0("C40:", ScotRange,"53")), col_names=FALSE)))
data.HB.2020 <- cbind(date, data.HB.2020)
colnames(data.HB.2020) <- c("date", HBlist)
data.HB.2020$date <- as.Date(data.HB.2020$date, "%d/%m/%y")
data.HB.2020$week <- week(data.HB.2020$date+days(6))
data.HB.2020$week <- if_else(data.HB.2020$date==as.Date("2020-12-28"), 53, data.HB.2020$week)
data.HB.2020$year <- "2020"
#Merge with older years
data.HB.2020_long <- gather(data.HB.2020, HB, deaths, c(2:15))
data.HB <- bind_rows(data.HB_long, data.HB.2020_long)
#Plot death location data
data.loc.old <- data.loc %>%
filter(!year %in% c("2020", "average")) %>%
group_by(week, loc) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
tiff("Outputs/NRSWeeklyDeathsxLocation.tiff", units="in", width=12, height=8, res=300)
ggplot()+
geom_ribbon(data=data.loc.old, aes(x=week, ymin=min, ymax=max), fill="Skyblue2")+
geom_line(data=subset(data.loc, year=="average"), aes(x=week, y=deaths), colour="Grey50", linetype=2)+
geom_line(data=subset(data.loc, year=="2020"), aes(x=week, y=deaths), colour="Red")+
facet_wrap(~loc)+
theme_classic()+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="All-cause deaths in Scotland by place of death",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2015-19. Data up to ", ScotDate, "."),
caption="Data from NRS | Plot by @VictimOfMaths")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title =element_text(face="bold", size=rel(1.2)))
dev.off()
#Calculate excess deaths vs. average
data.loc.new <- merge(subset(data.loc, year=="2020"), data.loc.old)
data.loc.new$excess <- data.loc.new$deaths-data.loc.new$mean
#plot excess deaths over time
tiff("Outputs/NRSWeeklyDeathsExcessxLocation.tiff", units="in", width=12, height=8, res=300)
ggplot(data.loc.new, aes(x=week, y=excess))+
geom_segment(aes(x=0, xend=Weekno, y=0, yend=0), colour="Grey40")+
geom_line(aes(colour=loc))+
theme_classic()+
scale_x_continuous(name="Week commencing", breaks=c(1:Weekno),
labels=c(format(seq.Date(from=as.Date("2019-12-30"), by="7 days",
length.out=Weekno), "%d/%m/%y")))+
scale_y_continuous(name="Excess deaths compared to 2015-19 average")+
scale_colour_paletteer_d("ggsci::planetexpress_futurama", name="Place of death")+
labs(title="Excess deaths have risen in all settings",
subtitle="Weekly deaths in 2020 compared to the average in 2015-19",
caption="Data from NRS | Plot by @VictimOfMaths")+
theme(axis.text.x = element_text(angle = 45, hjust = 1), plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
#Plot HB data
data.HB.old <- data.HB %>%
filter(!year %in% c("2020", "average")) %>%
group_by(week, HB) %>%
summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))
#Bring in 2020 data & average for easier plotting
data.HB.old <- merge(data.HB.old, subset(data.HB, year=="2020")[,c(1,3,4)], by=c("week", "HB"), all.x=TRUE)
colnames(data.HB.old) <- c("week", "HB", "max", "min", "mean", "2020")
maxweek <- max(data.HB.2020$week)
#Calculate excess deaths by Health Board
data.HB.old$excess <- data.HB.old$`2020`-data.HB.old$mean
excess <- data.HB.old %>%
filter(week<=maxweek) %>%
group_by(HB) %>%
summarise(totalexcess=sum(excess), totalmean=sum(mean), propexcess=totalexcess/totalmean)
#Order HBs by total excess deaths
excess$HB <- fct_reorder(as.factor(excess$HB), -excess$totalexcess)
excess <- arrange(excess, HB)
data.HB.old$HB <- factor(data.HB.old$HB, levels=levels(excess$HB))
data.HB.old <- arrange(data.HB.old, data.HB.old$HB)
#Extract label positions for excess deaths
labpos <- data.HB.old %>%
filter(!is.na(`2020`) & week==maxweek) %>%
group_by(HB) %>%
mutate(pos=max(`2020`*1.4, max+60))
ann_text <- data.frame(weekno=rep(24, times=14), deaths=labpos$pos,
HB=as.factor(levels(data.HB.old$HB)))
tiff("Outputs/NRSWeeklyDeathsxHB.tiff", units="in", width=12, height=8, res=300)
ggplot(data.HB.old)+
geom_ribbon(aes(x=week, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean, ymax=`2020`), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=`2020`), colour="Red")+
facet_wrap(~HB)+
theme_classic()+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="All-cause mortality in Scottish Health Boards",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2015-19. Data up to ", ScotDate, "."),
caption="Data from NRS | Plot by @VictimOfMaths")+
geom_text(data=ann_text, aes(x=weekno, y=deaths), label=c(paste0(round(excess[1,2],0)," excess deaths in 2020\nvs. 2010-19 average (+",
round(excess[1,4]*100, 0),"%)"),
paste0("+",round(excess[2,2],0)," deaths (+",
round(excess[2,4]*100, 0),"%)"),
paste0("+",round(excess[3,2],0)," deaths (+",
round(excess[3,4]*100, 0),"%)"),
paste0("+",round(excess[4,2],0)," deaths (+",
round(excess[4,4]*100, 0),"%)"),
paste0("+",round(excess[5,2],0)," deaths (+",
round(excess[5,4]*100, 0),"%)"),
paste0("+",round(excess[6,2],0)," deaths (+",
round(excess[6,4]*100, 0),"%)"),
paste0("+",round(excess[7,2],0)," deaths (+",
round(excess[7,4]*100, 0),"%)"),
paste0("+",round(excess[8,2],0)," deaths (+",
round(excess[8,4]*100, 0),"%)"),
paste0("+",round(excess[9,2],0)," deaths (+",
round(excess[9,4]*100, 0),"%)"),
paste0("+",round(excess[10,2],0)," deaths (+",
round(excess[10,4]*100, 0),"%)"),
paste0("+",round(excess[11,2],0)," deaths (+",
round(excess[11,4]*100, 0),"%)"),
paste0("+",round(excess[12,2],0)," deaths (+",
round(excess[12,4]*100, 0),"%)"),
paste0("+",round(excess[13,2],0)," deaths (+",
round(excess[13,4]*100, 0),"%)"),
paste0(round(excess[14,2],0)," deaths (",
round(excess[14,4]*100, 0),"%)")),
size=3, colour=rep("red", times=14), hjust=0)+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown(), plot.title=element_text(face="bold", size=rel(1.2)))
dev.off()
#Read in age data
temp <- tempfile()
temp <- curl_download(url=Scot2020, destfile=temp, quiet=FALSE, mode="wb")
data.age.2020 <- data.frame(t(read_excel(temp, sheet="Table 2 ", range=paste0("C15:",ScotRange, "21"), col_names=FALSE)))
date <- data.frame(date=format(seq.Date(from=as.Date("2019-12-30"), by="7 days", length.out=nrow(data.age.2020)), "%d/%m/%y"))
data.age.2020 <- cbind(date, data.age.2020)
colnames(data.age.2020) <- c("date", "Under 1 year", "01-14", "15-44", "45-64", "65-74", "75-84", "85+")
data.age.2020$date <- as.Date(data.age.2020$date, "%d/%m/%y")
data.age.2020$weekno <- week(data.age.2020$date)
data.age.2020_long <- gather(data.age.2020, age, deaths, c(2:8))
data.age.2020_long$year <- 2020
data.age.2020_long$deaths <- as.numeric(ifelse(data.age.2020_long$deaths==".", 0, data.age.2020_long$deaths))
#Recalculate dates to align with ONS data (which uses week to, not w/c)
data.age.2020_long$date <- data.age.2020_long$date+days(6)
data.age.2020_long$week <- week(data.age.2020_long$date)
data.age.2020_long$age <- as.factor(data.age.2020_long$age)
levels(data.age.2020_long$age)[which(levels(data.age.2020_long$age)=="Under 1 year")] <- "0-14"
levels(data.age.2020_long$age)[which(levels(data.age.2020_long$age)=="01-14")] <- "0-14"
data.age.2020_long <- data.age.2020_long %>%
group_by(week, year, age) %>%
summarise(deaths=sum(deaths))
#Bring in 2010-2019 data
temp <- tempfile()
temp <- curl_download(url="https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-sex-age-2000-2019.xlsx", destfile=temp, quiet=FALSE, mode="wb")
data2010.S <- read_excel(temp, sheet="2010", range="B4:BD44", col_names=TRUE)
data2010.S$sex <- rep(c("Female", "Male"), each=20)
data2010.S_long <- gather(data2010.S, week, deaths, c(3:55))[,-c(2)]
data2010.S_long$year <- 2010
data2011.S <- read_excel(temp, sheet="2011", range="B4:BD44", col_names=TRUE)
data2011.S$sex <- rep(c("Female", "Male"), each=20)
data2011.S_long <- gather(data2011.S, week, deaths, c(3:55))[,-c(2)]
data2011.S_long$year <- 2011
data2012.S <- read_excel(temp, sheet="2012", range="B4:BD44", col_names=TRUE)
data2012.S$sex <- rep(c("Female", "Male"), each=20)
data2012.S_long <- gather(data2012.S, week, deaths, c(3:55))[,-c(2)]
data2012.S_long$year <- 2012
data2013.S <- read_excel(temp, sheet="2013", range="B4:BD44", col_names=TRUE)
data2013.S$sex <- rep(c("Female", "Male"), each=20)
data2013.S_long <- gather(data2013.S, week, deaths, c(3:55))[,-c(2)]
data2013.S_long$year <- 2013
data2014.S <- read_excel(temp, sheet="2014", range="B4:BD44", col_names=TRUE)
data2014.S$sex <- rep(c("Female", "Male"), each=20)
data2014.S_long <- gather(data2014.S, week, deaths, c(3:55))[,-c(2)]
data2014.S_long$year <- 2014
data2015.S <- read_excel(temp, sheet="2015", range="B4:BD44", col_names=TRUE)
data2015.S$sex <- rep(c("Female", "Male"), each=20)
data2015.S_long <- gather(data2015.S, week, deaths, c(3:55))[,-c(2)]
data2015.S_long$year <- 2015
data2016.S <- read_excel(temp, sheet="2016", range="B4:BD44", col_names=TRUE)
data2016.S$sex <- rep(c("Female", "Male"), each=20)
data2016.S_long <- gather(data2016.S, week, deaths, c(3:55))[,-c(2)]
data2016.S_long$year <- 2016
data2017.S <- read_excel(temp, sheet="2017", range="B4:BD44", col_names=TRUE)
data2017.S$sex <- rep(c("Female", "Male"), each=20)
data2017.S_long <- gather(data2017.S, week, deaths, c(3:55))[,-c(2)]
data2017.S_long$year <- 2017
data2018.S <- read_excel(temp, sheet="2018", range="B4:BD44", col_names=TRUE)
data2018.S$sex <- rep(c("Female", "Male"), each=20)
data2018.S_long <- gather(data2018.S, week, deaths, c(3:55))[,-c(2)]
data2018.S_long$year <- 2018
data2019.S <- read_excel(temp, sheet="2019", range="B4:BD44", col_names=TRUE)
data2019.S$sex <- rep(c("Female", "Male"), each=20)
data2019.S_long <- gather(data2019.S, week, deaths, c(3:55))[,-c(2)]
data2019.S_long$year <- 2019
data1019.S_long <- bind_rows(data2010.S_long, data2011.S_long, data2012.S_long, data2013.S_long,
data2014.S_long, data2015.S_long, data2016.S_long, data2017.S_long,
data2018.S_long, data2019.S_long)
#Match age bands
data1019.S_long$age <- case_when(
data1019.S_long$Age=="0" ~ "0-14",
data1019.S_long$Age=="1-4" ~ "0-14",
data1019.S_long$Age=="5-9" ~ "0-14",
data1019.S_long$Age=="10-14" ~ "0-14",
data1019.S_long$Age=="15-19" ~ "15-44",
data1019.S_long$Age=="20-24" ~ "15-44",
data1019.S_long$Age=="25-29" ~ "15-44",
data1019.S_long$Age=="30-34" ~ "15-44",
data1019.S_long$Age=="35-39" ~ "15-44",
data1019.S_long$Age=="40-44" ~ "15-44",
data1019.S_long$Age=="45-49" ~ "45-64",
data1019.S_long$Age=="50-54" ~ "45-64",
data1019.S_long$Age=="55-59" ~ "45-64",
data1019.S_long$Age=="60-64" ~ "45-64",
data1019.S_long$Age=="65-69" ~ "65-74",
data1019.S_long$Age=="70-74" ~ "65-74",
data1019.S_long$Age=="75-79" ~ "75-84",
data1019.S_long$Age=="80-84" ~ "75-84",
data1019.S_long$Age=="85-89" ~ "85+",
data1019.S_long$Age=="90+" ~ "85+"
)
data1019.S <- data1019.S_long %>%
group_by(year, week, age) %>%
summarise(deaths=sum(deaths))
data1019.S$week <- as.integer(data1019.S$week)
data.age <- bind_rows(data1019.S, data.age.2020_long)
#Calculate 2010-19 average, min and max
hist.data.age <- data.age %>%
filter(year!=2020) %>%
group_by(age, week) %>%
summarise(mean=mean(deaths), max=max(deaths), min=min(deaths))
data.age <- merge(hist.data.age, subset(data.age, year==2020), all.x=TRUE, all.y=TRUE)
#Calculate excess deaths by Health Board
data.age$excess <- data.age$deaths-data.age$mean
excess.age <- data.age %>%
filter(!is.na(data.age$excess)) %>%
group_by(age) %>%
summarise(totalexcess=sum(excess), totalmean=sum(mean), propexcess=totalexcess/totalmean)
#Scotland only age plot
ann_text2 <- data.frame(week=rep(24, times=6), pos=c(75, 100, 240, 260, 400, 450),
age=c("0-14", "15-44", "45-64", "65-74", "75-84", "85+"))
tiff("Outputs/NRSWeeklyDeathsxAge.tiff", units="in", width=12, height=8, res=300)
ggplot(data.age)+
geom_ribbon(aes(x=week, ymin=min, ymax=max), fill="Skyblue2")+
geom_ribbon(aes(x=week, ymin=mean, ymax=deaths), fill="Red", alpha=0.2)+
geom_line(aes(x=week, y=mean), colour="Grey50", linetype=2)+
geom_line(aes(x=week, y=deaths), colour="Red")+
theme_classic()+
facet_wrap(~age)+
scale_x_continuous(name="Week number", breaks=c(0,10,20,30,40,50))+
scale_y_continuous(name="Deaths registered")+
expand_limits(y=0)+
labs(title="Excess mortality has fallen for all age groups",
subtitle=paste0("Weekly deaths in 2020 compared to the range in 2010-19. Data up to ", ScotDate, "."),
caption="Data from NRS | Plot by @VictimOfMaths")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle =element_markdown())+
geom_text(data=ann_text2, aes(x=week, y=pos), label=c(paste0(round(excess.age[1,2],0)," excess deaths in 2020\nvs. 2010-19 average (",
round(excess.age[1,4]*100, 0),"%)"),
paste0("+",round(excess.age[2,2],0)," deaths (+",
round(excess.age[2,4]*100, 0),"%)"),
paste0("+",round(excess.age[3,2],0)," deaths (+",
round(excess.age[3,4]*100, 0),"%)"),
paste0("+",round(excess.age[4,2],0)," deaths (+",
round(excess.age[4,4]*100, 0),"%)"),
paste0("+",round(excess.age[5,2],0)," deaths (+",
round(excess.age[5,4]*100, 0),"%)"),
paste0("+",round(excess.age[6,2],0)," deaths (+",
round(excess.age[6,4]*100, 0),"%)")),
size=3, colour=rep("red", times=6), hjust=0)
dev.off()
================================================
FILE: All Cause Mortality/readme.md
================================================
**Analysis of data on weekly all-cause mortality during the pandemic**
[AllCauseDeaths2021.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/AllCauseDeaths2021.R) harmonises weekly all-cause mortality data from England & Wales (from ONS), Scotland (from NRS) and Northern Ireland (from NISRA) and draws plots comparing deaths in 2020 so far to the previous decade, split by age, sex and region inspired by a plot from [@EdConwaySky](https://twitter.com/EdConwaySky). This replaces a previous (2020) version of [the same file](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/AllCauseDeaths.R) and now includes Scotland and Northern Ireland which were previous in separate code files: [ScottishAllCauseDeathsDetail.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/ScottishAllCauseDeathsDetail.R) uses richer data published by NRS to look at patterns in excess mortality in Scotland by place of death, Health Board area and age. [NRS Excess Deaths by Cause.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/NRS%20Excess%20Deaths%20by%20Cause.R) produces graphs of excess deaths in Scotland by cause and location of death.
[All Cause Deaths France.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/All%20Cause%20Deaths%20France.R) uses detailed French all-cause mortality records published by [Insee](https://www.insee.fr/fr/statistiques), the French statistical authority, to examine age-specific excess deaths in France and [All Cause Deaths Italy.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/All%20Cause%20Deaths%20Italy.R) does the same for Italy using data from [ISTAT](https://www.istat.it/en/).
[AllCauseDeathsxAge.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/AllCauseDeathsxAge.R) brings these together and extends this analysis using data from the UK and international data from the [Human Mortality Database](https://www.mortality.org/).
I've made [an app](https://victimofmaths.shinyapps.io/COVID_LA_Plots/) which you can use to generate excess deaths plots by Lower Tier Local Authority for every area in Great Britain. All code and data for this lives [here](https://github.com/VictimOfMaths/COVID_LA_Plots).
I've also created [a separate app](https://victimofmaths.shinyapps.io/COVID_Reg_Delays) to allow you to explore registration delays in English and Welsh mortality data from ONS. All code and data for this lives [here](https://github.com/VictimOfMaths/COVID_Reg_Delays).
[COVIDCareHomeDeaths.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVIDCareHomeDeaths.R) analyses additional data published by the ONS for England based on notifications from the Care Quality Commission of deaths of care home residents.
[COVIDDeathsxRegion.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVIDDeathsxRegion.R) produces plots of regional trends in COVID mortality in England based on the 28-day measure of mortality.
[MSOA Deaths.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/MSOA%20Deaths.R) takes mortality data from England & Wales at Middle Super Output Area level and from Scotland at Intermediate Zone level and maps it, ready for 3D visualisation using [Aerialod](https://ephtracy.github.io/index.html?page=aerialod).
[COVIDAgeMortPred.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVIDAgeMortPred.R) uses age-specific Case Fatality Ratios estimated by [Daniel Howden](https://twitter.com/danielhowdon) to estimate the future burden of mortality from COVID-19 infections that have already been identified (i.e. the total number of deaths we'd expect in England over the next few months *assuming there were no further infections*).
[LA All Cause Deaths.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/LA%20All%20Cause%20Deaths.R) calculates excess mortality at Local Authority level from ONS figures.




Suggested citation for any of this analysis:
Angus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226
================================================
FILE: Exposure mapping/COVIDExposures.R
================================================
rm(list=ls())
library(tidyverse)
library(paletteer)
library(curl)
library(readxl)
library(sf)
library(gtools)
library(cowplot)
#Read in 2018 mid-year population estimates at LSOA level by sex and single year of age
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2018sape21dt1a/sape21dt1amid2018on2019lalsoasyoaestimatesformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
data_m <- read_excel(file.path(temp2, "SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx"),
sheet="Mid-2018 Males", range="A5:CQ35097", col_names=TRUE)
data_f <- read_excel(file.path(temp2, "SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx"),
sheet="Mid-2018 Females", range="A5:CQ35097", col_names=TRUE)
#Merge sex-specific data
data_m$sex <- "Male"
data_f$sex <- "Female"
data <- rbind(data_m, data_f)
#Collapse into age bands matching CFR data
data$`0-9` <- rowSums(data[,c(5:14)])
data$`10-19` <- rowSums(data[,c(15:24)])
data$`20-29` <- rowSums(data[,c(25:34)])
data$`30-39` <- rowSums(data[,c(35:44)])
data$`40-49` <- rowSums(data[,c(45:54)])
data$`50-59` <- rowSums(data[,c(55:64)])
data$`60-69` <- rowSums(data[,c(65:74)])
data$`70-79` <- rowSums(data[,c(75:84)])
data$`80+` <- rowSums(data[,c(85:95)])
data <- data[,c(1:3, 96:105)]
data_long <- gather(data, age, pop, c(5:13))
# Italian data updated 23rd April
# https://www.epicentro.iss.it/coronavirus/bollettino/Bollettino-sorveglianza-integrata-COVID-19_23-aprile-2020.pdf
# IFR from Imperial report https://www.imperial.ac.uk/media/imperial-college/medicine/sph/ide/gida-fellowships/Imperial-College-COVID19-NPI-modelling-16-03-2020.pdf
cfr <- tibble::tribble(
~age, ~b, ~m, ~f, ~ifr,
"0-9", 0.2, 0.1, 0.2, 0.002,
"10-19", 0.000001, 0.000001, 0.000001, 0.006,
"20-29", 0.1, 0.1, 0.000001, 0.03,
"30-39", 0.4, 0.5, 0.3, 0.08,
"40-49", 0.9, 1.6, 0.4, 0.15,
"50-59", 2.6, 4.3, 1.1, 0.6,
"60-69", 10.0, 12.6, 5.9, 2.2,
"70-79", 24.9, 30.2, 17.2, 5.1,
"80+", 30.8, 42.0, 22.0, 9.3
)
#Calculate age-specific sex:population cfr ratios in Italian data
cfr$mtobratio <- cfr$m/cfr$b
cfr$ftobratio <- cfr$f/cfr$b
#Apply these to population estimates of ifr from Imperial figures
cfr$mifr <- cfr$ifr*cfr$mtobratio
cfr$fifr <- cfr$ifr*cfr$ftobratio
#Merge into population data
data_long <- merge(data_long,cfr, all.x=TRUE)
#Calculate expected deaths with 100% inflection by age group
data_long$ex_deaths <- case_when(
data_long$sex=="Male" ~ data_long$pop*data_long$mifr/100,
data_long$sex=="Female" ~ data_long$pop*data_long$fifr/100
)
#Summarise by LSOA
data_LSOA <- data_long %>%
group_by(`Area Codes`) %>%
summarise(name=unique(LSOA), pop=sum(pop), ex_deaths=sum(ex_deaths))
data_LSOA$mortrate <- data_LSOA$ex_deaths*100000/data_LSOA$pop
#Separate out LA-level data
data_LA <- subset(data_LSOA, is.na(name))
#Remove from LSOA-level data
data_LSOA <- subset(data_LSOA, !is.na(name))
#Bring in 2019 IMD data (England only)
temp <- tempfile()
source <- "https://opendatacommunities.org/downloads/cube-table?uri=http%3A%2F%2Fopendatacommunities.org%2Fdata%2Fsocietal-wellbeing%2Fimd2019%2Findices"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read.csv(temp)
IMD <- subset(IMD, (Measurement=="Decile " | Measurement=="Rank") & Indices.of.Deprivation=="e. Health Deprivation and Disability Domain")
IMD_wide <- spread(IMD, Measurement, Value)
data_LSOA <- merge(data_LSOA, IMD_wide[,c(1,5,6)], by.x="Area Codes", by.y="FeatureCode", all.x=TRUE )
colnames(data_LSOA) <- c("code", "name", "pop", "ex_deaths", "mortrate", "decile", "rank")
#Rank LSOAs within each decile
data_LSOA <- data_LSOA %>%
group_by(decile) %>%
mutate(decile_rank = order(order(mortrate, decreasing=FALSE)))
tiff("Outputs/COVIDMortDepGrid.tiff", units="in", width=15, height=5, res=300)
ggplot(subset(data_LSOA, !is.na(decile)), aes(y=as.factor(decile), x=decile_rank, fill=mortrate))+
geom_tile()+
theme_classic()+
scale_fill_paletteer_c("viridis::magma", direction=-1,name="Potential deaths\nper 100,000")+
scale_y_discrete(name="Health deprivation & disability", labels=c("1 - most deprived", "2", "3", "4", "5", "6", "7",
"8", "9", "10 - least deprived"))+
scale_x_continuous(name="")+
theme(axis.text.x=element_blank(), axis.line.x=element_blank(), axis.ticks.x=element_blank())+
labs(title="Maximum potential exposure to COVID-19 mortality by health deprivation",
subtitle="Calculated using LSOA-level population age/sex distribution and Case Fatality Rates from Imperial College\nadjusted using Italian sex-specific data, assuming 100% COVID-19 prevalence",
caption="Population data from ONS, CFRs from Imperial College, sex-specific data from ISS\nPlot by @VictimOfMaths")
dev.off()
#calculate mean mortality rates by decile and overall (population weighted)
data_LSOA <- data_LSOA %>%
group_by(decile) %>%
mutate(decilemean = weighted.mean(mortrate, pop))
data_LSOA <- ungroup(data_LSOA)
data_LSOA <- data_LSOA %>%
mutate(popmean = weighted.mean(mortrate, pop))
tiff("Outputs/COVIDMortDepScatter.tiff", units="in", width=12, height=8, res=300)
ggplot(subset(data_LSOA, !is.na(decile)), aes(x=mortrate, y=as.factor(decile), colour=mortrate))+
geom_jitter(shape=21, alpha=0.6, show.legend=FALSE)+
geom_segment(aes(x=popmean, xend=popmean, y=Inf, yend=-Inf), colour="Grey20")+
geom_point(aes(x=decilemean, y=as.factor(decile)), colour="Grey20", fill="Cyan", shape=23, size=2)+
scale_colour_paletteer_c("viridis::magma", direction=-1)+
scale_x_continuous(name="Potential deaths per 100,000")+
scale_y_discrete(name="Health deprivation & disability", labels=c("1 - most deprived", "2", "3", "4", "5", "6", "7",
"8", "9", "10 - least deprived"))+
theme_classic()+
labs(title="Maximum potential exposure to COVID-19 mortality by health deprivation",
subtitle="Calculated using LSOA-level population age/sex distribution and Case Fatality Rates from Imperial College\nadjusted using Italian sex-specific data, assuming 100% COVID-19 prevalence",
caption="Population data from ONS, CFRs from Imperial College, sex-specific data from ISS\nPlot by @VictimOfMaths")+
annotate("text", x=3200, y=8.51, label="Each circle = 1 LSOA", size=3)+
annotate("text", x=1800, y=6.5, label="Population average", size=3)+
annotate("text", x=800, y=3.5, label="Decile average", size=3)+
geom_segment(aes(x=1170, y=6.5, xend=1580, yend=6.5), colour="Grey20")+
geom_segment(aes(x=800, y=3.55, xend=1060, yend=3.91), colour="Grey20")
dev.off()
#Download shapefile of LSOA boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/e886f1cd40654e6b94d970ecf437b7b5_0.zip?outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "LSOA11CD"] <- "code"
#Convert to EPSG4326 projection to match lat/long and make siting annotations easier
shapefile <- st_transform(map.data, crs=4326)
map.data <- full_join(shapefile, data_LSOA, by="code")
#Map fo age-based risk
ggplot(subset(map.data, substr(name, 1,5)=="Sheff"), aes(fill=mortrate, geometry=geometry))+
geom_sf(colour=NA)+
theme_classic()+
scale_fill_paletteer_c("pals::ocean.tempo", name="Potential deaths\nper 100,000")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
labs(title="Maximum potential exposure to COVID-19 mortality by deprivation",
subtitle="Calculated using LSOA-level population age/sex distribution and observed Case Fatality Rates from Italy, assuming 100% COVID-19 prevalence",
caption="Population data from ONS, CFRs adapted from ISS & Imperial data\nPlot by @VictimOfMaths")
#Bring in Local Authorities (LADs)
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LSOAtoLAD <- read.csv(temp)[,c(4,10,11)]
colnames(LSOAtoLAD) <- c("code", "LAcode", "LAname")
map.data <- full_join(map.data, LSOAtoLAD, by="code")
#Bring in Regions
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LAcode", "Region")
map.data <- full_join(map.data, LADtoRegion, by="LAcode")
#Remove Scottish Data Zones which have snuck into the data
map.data <- subset(map.data, substr(code, 1,1)=="E")
#Bivariate map
#tertile the IMD and mortrate variables
#generate tertiles
map.data$IMDtert <- quantcut(-map.data$rank, q=3, labels=FALSE)
map.data$morttert <- quantcut(map.data$mortrate, q=3, labels=FALSE)
#Generate key
keydata <- data.frame(IMDtert=c(1,1,1,2,2,2,3,3,3), morttert=c(1,2,3,1,2,3,1,2,3),
RGB=c("#e8e8e8","#ace4e4","#5ac8c8","#dfb0d6","#a5add3",
"#5698b9","#be64ac","#8c62aa","#3b4994"))
#Bring colours into main data for plotting
map.data <- left_join(map.data, keydata, by=c("IMDtert", "morttert"))
#strip out a few unnecessary columns for tidiness
map.data <- map.data[,-c(1,3:6)]
#Calculate mean mortrates and ranks by LA, region and nationally
map.data <- map.data %>%
group_by(LAcode) %>%
mutate(LAmeanrate = weighted.mean(mortrate, pop), LAmeanrank= weighted.mean(rank, pop)) %>%
ungroup()
map.data <- map.data %>%
group_by(Region) %>%
mutate(regmeanrate = weighted.mean(mortrate, pop), regmeanrank= weighted.mean(rank, pop)) %>%
ungroup()
map.data <- map.data %>%
mutate(popmeanrate = weighted.mean(mortrate, pop), popmeanrank= weighted.mean(rank, pop))
#Save sf object
st_write(map.data, "Data/COVID19LSOA.shp")
##################################
#Only need to run code above once#
##################################
map.data <- st_read("Data/COVID19LSOA.shp")
#Generate key
keydata <- data.frame(IMDtert=c(1,1,1,2,2,2,3,3,3), morttert=c(1,2,3,1,2,3,1,2,3),
RGB=c("#e8e8e8","#ace4e4","#5ac8c8","#dfb0d6","#a5add3",
"#5698b9","#be64ac","#8c62aa","#3b4994"))
#Plot for Sheffield with annotations
plot <- ggplot(subset(map.data, LAname=="Sheffield"), aes(fill=RGB, geometry=geometry))+
geom_sf(colour="White")+
theme_classic()+
scale_fill_identity()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
labs(title="Mapping potential COVID-19 risk across Sheffield",
subtitle="LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population",
caption="Population data from ONS, CFRs adapted from ISS & Imperial data\nPlot by @VictimOfMaths")+
annotate("text", x=-1.38, y=53.45, label="High deprivation,\nyoung population", size=3)+
annotate("text", x=-1.34, y=53.38, label="High deprivation,\nold population", size=3)+
annotate("text", x=-1.75, y=53.4, label="Low deprivation,\nold population", size=3)+
geom_curve(aes(x=-1.38, y=53.44, xend=-1.4, yend=53.42), curvature=-0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=-1.345, y=53.37, xend=-1.36, yend=53.355), curvature=-0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=-1.725, y=53.4, xend=-1.62, yend=53.36), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))
key <- ggplot(keydata)+
geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("Greater age-based COVID-19 risk" %->% ""),
y = expression("Greter health deprivation" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 8),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
tiff("Outputs/COVIDBivariateSheff.tiff", units="in", width=12, height=8, res=300)
ggdraw()+
draw_plot(plot, 0,0,1,1)+
draw_plot(key, 0.03,0.03,0.3,0.3)
dev.off()
#Plot for all of greater London, with annotations
London <- ggplot(subset(map.data, Region=="London"), aes(fill=RGB, geometry=geometry))+
geom_sf(color = NA)+
theme_classic()+
scale_fill_identity()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(3)),
plot.subtitle=element_text(size=rel(2)), plot.caption=element_text(size=rel(2)))+
labs(title="Mapping potential COVID-19 risk across London",
subtitle="LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population",
caption="Population data from ONS, CFRs adapted from ISS & Imperial data\nPlot by @VictimOfMaths")+
annotate("text", x=0.29, y=51.48, label="High deprivation,\nyoung population", size=6)+
annotate("text", x=0.24, y=51.4, label="High deprivation,\nold population", size=6)+
annotate("text", x=-0.23, y=51.7, label="Low deprivation,\nold population", size=6)+
geom_curve(aes(x=0.25, y=51.48, xend=0.2, yend=51.466), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=0.2, y=51.4, xend=0.1, yend=51.419), curvature=-0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=-0.22, y=51.69, xend=-0.16, yend=51.67), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))
Lonkey <- ggplot(keydata)+
geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("Greater age-based COVID-19 risk" %->% ""),
y = expression("Greter health deprivation" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = rel(1.5)),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
tiff("Outputs/COVIDBivariateLondon.tiff", units="in", width=24, height=18, res=300)
ggdraw()+
draw_plot(London, 0,0,1,1)+
draw_plot(Lonkey, 0.03,0.03,0.23,0.23)
dev.off()
#Generic version - essentially a less user friendly version of https://t.co/zcHcYMFUjg?amp=1
#But with more detailed resolution on the shapefile (i.e. wigglier LSOA boundaries)
#Select LAs to map
userLA <- c("Salford", "Stockport", "Manchester", "Trafford", "Tameside", "Oldham", "Rochdale", "Wigan", "Bolton", "Bury")
#Select name for title
userLAname <- "Greater Manchester"
#Select whether to display LSOA boundaries or not (looks nicer without, but may be more useful with)
LSOABoundaries <- FALSE
userplot <- ggplot(subset(map.data, LAname %in% userLA), aes(fill=RGB, geometry=geometry))+
geom_sf(colour=ifelse(LSOABoundaries==FALSE ,NA, "White"))+
theme_classic()+
scale_fill_identity()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
labs(title=paste("Mapping potential COVID-19 risk across", userLAname),
subtitle="LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population",
caption="Population data from ONS, CFRs adapted from ISS & Imperial data\nPlot by @VictimOfMaths")
key <- ggplot(keydata)+
geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("Greater age-based COVID-19 risk" %->% ""),
y = expression("Greater health deprivation" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 8),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
tiff(paste0("Outputs/COVIDBivariate",userLAname,".tiff"), units="in", width=12, height=8, res=300)
ggdraw()+
draw_plot(userplot, 0,0,1,1)+
#Comment out all but the desired legend position below
#draw_plot(key, 0.03,0.03,0.3,0.3) #Bottom left
draw_plot(key, 0.03,0.6,0.3,0.3) #Top left
#draw_plot(key, 0.68,0.6,0.3,0.3) #Top right
#draw_plot(key, 0.68,0.05,0.3,0.3) #Bottom right
dev.off()
#Add in stamen maps below the bivariate maps. Looks nice when it works, but sometimes it's tricky
#to align the geographies of the maps
library(ggmap)
library(osmdata)
library(ggExtra)
#get stamen map (can replace userLAname here with other names, e.g. 'Greater Manchester')
stamen.map <- get_stamenmap(getbb(userLAname), maptype="toner-lines", zoom=12)
userplot <- stamen.map %>%
ggmap()+
geom_sf(data=subset(map.data, LAname %in% userLA), aes(fill=RGB, geometry=geometry),
colour=ifelse(LSOABoundaries==FALSE ,NA, "White"), inherit.aes=FALSE, alpha=0.35)+
theme_classic()+
scale_fill_identity()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
labs(title=paste("Mapping potential COVID-19 risk across", userLAname),
subtitle="LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population",
caption="Population data from ONS, CFRs adapted from ISS & Imperial data\nPlot by @VictimOfMaths")
key <- ggplot(keydata)+
geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("Greater age-based COVID-19 risk" %->% ""),
y = expression("Greater health deprivation" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 8),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
tiff(paste0("Outputs/COVIDBivariate",userLAname,".tiff"), units="in", width=12, height=8, res=300)
ggdraw()+
draw_plot(userplot, 0,0,1,1)+
#Comment out all but the desired legend position below
draw_plot(key, 0.03,0.03,0.3,0.3) #Bottom left
#draw_plot(key, 0.03,0.6,0.3,0.3) #Top left
#draw_plot(key, 0.68,0.6,0.3,0.3) #Top right
#draw_plot(key, 0.68,0.05,0.3,0.3) #Bottom right
dev.off()
================================================
FILE: Exposure mapping/SheffieldCOVIDRiskxLSOA.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(sf)
library(paletteer)
#Download population age/sex structures at LSOA level from ONS 2018 mid-year estimates
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2018sape21dt1a/sape21dt1amid2018on2019lalsoasyoaestimatesformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
data_m <- read_excel(file.path(temp2, "SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx"),
sheet="Mid-2018 Males", range="A5:CQ35097", col_names=TRUE)
data_f <- read_excel(file.path(temp2, "SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx"),
sheet="Mid-2018 Females", range="A5:CQ35097", col_names=TRUE)
#Merge sex-specific data
data_m$sex <- "Male"
data_f$sex <- "Female"
data <- rbind(data_m, data_f)%>%
filter(!is.na(LSOA)) %>%
gather(age, pop, c(6:ncol(.)-1)) %>%
select(c(1,5:7)) %>%
mutate(ageband=case_when(
age<5 ~ "0-4", age<10 ~ "5-9", age<15 ~ "10-14", age<20 ~ "15-19", age<25 ~ "20-24",
age<30 ~ "25-29", age<35 ~ "30-34", age<40 ~ "35-39", age<45 ~ "40-44",
age<50 ~ "45-49", age<55 ~ "50-54", age<60 ~ "55-59", age<65 ~ "60-64",
age<70 ~ "65-69", age<75 ~ "70-74", age<80 ~ "75-79", TRUE ~ "80+"
))
#Set IFRs based on O'Driscoll et al. synthesis of data across 45 countries
#https://www.medrxiv.org/content/10.1101/2020.08.24.20180851v1.full.pdf
#Date from Table S4
IFR <- data.frame(ageband=rep(c("0-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59", "60-64", "65-69", "70-74",
"75-79", "80+"), times=2),
sex=rep(c("Male", "Female"), each=17),
IFR=c(0.002, 0.000, 0.001, 0.002, 0.005, 0.012, 0.024, 0.040, 0.077, 0.118, 0.223,
0.344, 0.473, 0.868, 1.445, 2.973, 8.619, 0.002, 0.001, 0.000, 0.001, 0.003,
0.007, 0.010, 0.018, 0.028, 0.053, 0.084, 0.138, 0.246, 0.417, 0.707, 1.580,
5.928))
#Bring in IFRs and calculate expected mortality with 100% infection rates by LSOA
data <- merge(data, IFR, by=c("sex", "ageband"))
ex_data <- data %>%
mutate(ex_deaths=pop*IFR/100) %>%
group_by(`Area Codes`) %>%
summarise(ex_deaths=sum(ex_deaths), pop=sum(pop)) %>%
ungroup() %>%
mutate(ex_mortrate=ex_deaths*100000/pop)
#Bring in LA names to allow filtering
temp <- tempfile()
source <- "http://geoportal1-ons.opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LSOAtoLAD <- read.csv(temp) %>%
select(LSOA11CD, LAD17CD, LAD17NM) %>%
unique()
ex_data <- merge(ex_data, LSOAtoLAD, by.x="Area Codes", by.y="LSOA11CD", all.x=TRUE)
#Save Sheffield LSOAs
ex_data %>%
filter(LAD17NM=="Sheffield") %>%
select(`Area Codes`, ex_mortrate) %>%
write.csv("Data/SheffCOVIDAgeRiskByLSOA.csv")
#Download shapefile of LSOA boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "https://data.cambridgeshireinsight.org.uk/sites/default/files/Lower_Layer_Super_Output_Areas_December_2011_Generalised_Clipped__Boundaries_in_England_and_Wales.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "lsoa11cd"] <- "Area Codes"
map.data <- full_join(shapefile, ex_data, by="Area Codes")
png("Outputs/SheffieldCOVIDRiskLSOA.png", units="in", width=10, height=7, res=500)
map.data %>%
filter(LAD17NM=="Sheffield") %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=ex_mortrate), colour=NA)+
scale_fill_paletteer_c("pals::ocean.amp", name="Expected max. deaths\nper 100,000")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(),)+
labs(title="Age-based COVID-19 risk",
subtitle="Estimated mortality across Sheffield assuming 100% infection rates",
caption="IFR data taken from O'Driscoll et al. | Population data from ONS 2018 mid-year estimates\nPlot by @VictimOfMaths")
dev.off()
================================================
FILE: Exposure mapping/readme.md
================================================
Mapping potential population exposure to COVID-19.
[COVIDExposures.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Exposure%20mapping/COVIDExposures.R) brings together data on health deprivation and estimates of the potential COVID-19 mortality risk based on the age-sex structure of the population (following the approach developed by [@ikashnitsky](https://twitter.com/ikashnitsky) and [@jm_aburto](https://twitter.com/jm_aburto)) at Lower Super Output Area level and plots bivariate maps highlighting areas with the greatest potential COVID-19 risk. I also made a Shiny app which creates slightly lower resolution versions of the same plots online, which you can find [here](https://victimofmaths.shinyapps.io/covidmapper/).

Suggested citation for any of this analysis:
Angus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226
================================================
FILE: Heatmaps/COVIDAdmissionsLTLAPhasePlot.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(extrafont)
library(paletteer)
library(RcppRoll)
library(sf)
library(snakecase)
library(ggrepel)
library(ragg)
library(ggtext)
library(gtools)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Read in admissions data
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-hospital-activity/
admurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/Weekly-covid-admissions-and-beds-publication-220623.xlsx"
#Increment by 7 when each new report is published
admrange <- "CF"
#Set latest date of admissions data
admdate <- as.Date("2022-06-19")
#Read in admissions
#First data up to 6th April
admurl.old <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/Weekly-covid-admissions-and-beds-publication-210429-up-to-210406.xlsx"
temp1 <- tempfile()
temp1 <- curl_download(url=admurl.old, destfile=temp1, quiet=FALSE, mode="wb")
raw.adm.old <- read_excel(temp1, sheet="Hosp ads & diag", range=paste0("B25:IS512"),
col_names=FALSE)
#Then data from 7th April to 30th Sept
admurl.old2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/Weekly-covid-admissions-and-beds-publication-211209-210407-210930.xlsx"
temp1 <- tempfile()
temp1 <- curl_download(url=admurl.old2, destfile=temp1, quiet=FALSE, mode="wb")
raw.adm.old2 <- read_excel(temp1, sheet="Hosp ads & diag", range=paste0("B25:FY512"),
col_names=FALSE)
#Then data from 1st October to 31st March
admurl.old3 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/05/Weekly-covid-admissions-and-beds-publication-220512_211001to220331-1.xlsx"
temp1 <- tempfile()
temp1 <- curl_download(url=admurl.old3, destfile=temp1, quiet=FALSE, mode="wb")
raw.adm.old3 <- read_excel(temp1, sheet="Hosp ads & diag", range=paste0("B25:GD512"),
col_names=FALSE)
#Read in more recent data
temp2 <- tempfile()
temp2 <- curl_download(url=admurl, destfile=temp2, quiet=FALSE, mode="wb")
raw.adm <- read_excel(temp2, sheet="Hosp ads & diag", range=paste0("B25:",admrange,"304"),
col_names=FALSE)
#Tidy up data
admissions.old <- raw.adm.old %>%
gather(date, admissions, c(4:ncol(raw.adm.old))) %>%
mutate(date=as.Date("2020-08-01")+days(as.integer(substr(date, 4, 6))-4)) %>%
rename(Region=...1, code=...2, name=...3) %>%
bind_rows(raw.adm.old2 %>%
gather(date, admissions, c(4:ncol(raw.adm.old2))) %>%
mutate(date=as.Date("2021-04-07")+days(as.integer(substr(date, 4, 6))-4)) %>%
rename(Region=...1, code=...2, name=...3)) %>%
bind_rows(raw.adm.old3 %>%
gather(date, admissions, c(4:ncol(raw.adm.old3))) %>%
mutate(date=as.Date("2021-10-01")+days(as.integer(substr(date, 4, 6))-4)) %>%
rename(Region=...1, code=...2, name=...3))
admissions <- raw.adm %>%
gather(date, admissions, c(4:ncol(raw.adm))) %>%
mutate(date=as.Date("2022-04-01")+days(as.integer(substr(date, 4, 6))-4)) %>%
rename(Region=...1, code=...2, name=...3) %>%
bind_rows(admissions.old)
#Bring in PHE data summarising admissions in HES to each trust by MSOA
MSOA.adm <- read.csv("COVID_LA_Plots/Trust to MSOA HES data.csv")
#1st lookup for admissions up to 4th October, when RD3 and RDZ merged to form R0D in the admissions (but not deaths) data
MSOA.adm1 <- MSOA.adm %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TRUE ~ as.character(TrustCode))) %>%
group_by(CatchmentYear, msoa, TrustCode) %>%
summarise(msoa_total_catchment1=sum(msoa_total_catchment)) %>%
ungroup()
#2nd lookup for after 4th October 2020
MSOA.adm2 <- MSOA.adm %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TRUE ~ as.character(TrustCode))) %>%
group_by(CatchmentYear, msoa, TrustCode) %>%
summarise(msoa_total_catchment2=sum(msoa_total_catchment)) %>%
ungroup()
#3rd lookup for after 1st April 2021
MSOA.adm3 <- MSOA.adm %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TrustCode=="RXH" ~ "RYR",
TRUE ~ as.character(TrustCode))) %>%
group_by(CatchmentYear, msoa, TrustCode) %>%
summarise(msoa_total_catchment3=sum(msoa_total_catchment)) %>%
ungroup()
#4th lookup for after 1st June 2021
MSOA.adm4 <- MSOA.adm %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TrustCode=="RXH" ~ "RYR",
TrustCode=="RTV" ~ "RW4",
TRUE ~ as.character(TrustCode))) %>%
group_by(CatchmentYear, msoa, TrustCode) %>%
summarise(msoa_total_catchment4=sum(msoa_total_catchment)) %>%
ungroup()
#5th lookup for after 1st October 2021
MSOA.adm5 <- MSOA.adm %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TrustCode=="RXH" ~ "RYR",
TrustCode=="RTV" ~ "RW4",
TrustCode=="RW6" ~ "RM3",
TRUE ~ as.character(TrustCode))) %>%
group_by(CatchmentYear, msoa, TrustCode) %>%
summarise(msoa_total_catchment5=sum(msoa_total_catchment)) %>%
ungroup()
temp1 <- data.frame(TrustCode=unique(MSOA.adm1$TrustCode))
temp2 <- data.frame(TrustCode=unique(MSOA.adm2$TrustCode))
temp3 <- data.frame(TrustCode=unique(MSOA.adm3$TrustCode))
temp4 <- data.frame(TrustCode=unique(MSOA.adm4$TrustCode))
temp5 <- data.frame(TrustCode=unique(MSOA.adm5$TrustCode))
temp <- bind_rows(temp1, temp2, temp3, temp4, temp5) %>%
unique()
MSOA.adm <- merge(temp, MSOA.adm1, by="TrustCode", all=TRUE) %>%
merge(., MSOA.adm2, all=TRUE) %>%
merge(., MSOA.adm3, all=TRUE) %>%
merge(., MSOA.adm4, all=TRUE) %>%
merge(., MSOA.adm5, all=TRUE)
#Bring in MSOA to LTLA lookup
temp <- tempfile()
source <- "http://geoportal1-ons.opendata.arcgis.com/datasets/0b3c76d1eb5e4ffd98a3679ab8dea605_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
MSOA.lookup <- read.csv(temp) %>%
select(MSOA11CD, LAD19CD, LAD19NM) %>%
unique() %>%
rename(msoa=MSOA11CD)
#Merge into PHE lookup
MSOA.adm <- merge(MSOA.adm, MSOA.lookup, by="msoa", all.x=TRUE)
#Convert to the lookup we want (trust to LTLA), averaging across last 3 years in data (2016-18)
trust.lookup <- MSOA.adm %>%
filter(CatchmentYear>=2016) %>%
group_by(TrustCode, LAD19CD, LAD19NM) %>%
summarise(catchment1=sum(msoa_total_catchment1, na.rm=TRUE),
catchment2=sum(msoa_total_catchment2, na.rm=TRUE),
catchment3=sum(msoa_total_catchment3, na.rm=TRUE),
catchment4=sum(msoa_total_catchment4, na.rm=TRUE),
catchment5=sum(msoa_total_catchment5, na.rm=TRUE)) %>%
ungroup() %>%
group_by(TrustCode) %>%
mutate(pop1=sum(catchment1, na.rm=TRUE), popprop1=catchment1/pop1,
pop2=sum(catchment2, na.rm=TRUE), popprop2=catchment2/pop2,
pop3=sum(catchment3, na.rm=TRUE), popprop3=catchment3/pop3,
pop4=sum(catchment4, na.rm=TRUE), popprop4=catchment4/pop4,
pop5=sum(catchment5, na.rm=TRUE), popprop5=catchment5/pop5) %>%
ungroup() %>%
rename(code=TrustCode)
#Bring lookup into admissions and deaths data
admissions <- merge(admissions, trust.lookup, by.x="code", by.y="code", all=TRUE)
#Allocate admissions and deaths to LTLA based on population proportions and
#aggregate up to LTLA level
LAadmissions <- admissions %>%
mutate(LA.admissions=case_when(
date<=as.Date("2020-10-04") ~ admissions*popprop1,
date%
group_by(LAD19CD, date, LAD19NM) %>%
summarise(admissions=sum(LA.admissions, na.rm=TRUE)) %>%
ungroup() %>%
filter(!is.na(LAD19CD)) %>%
#merge City of London into Hackney and Isles of Scilly into Cornwall
mutate(LAD19CD=case_when(LAD19CD=="E09000001" ~ "E09000012",
LAD19CD=="E06000053" ~ "E06000052",
TRUE ~ as.character(LAD19CD))) %>%
group_by(LAD19CD, date, LAD19NM) %>%
summarise(admissions=sum(admissions)) %>%
ungroup()
#Bring in regions
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LTLA", "Region")
#Bring in LA populations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D435", col_names=TRUE)
colnames(LApop) <- c("code", "name", "geography", "pop")
#Merge isles of Scilly in with Cornwall
LApop$code <- if_else(LApop$code=="E06000053", "E06000052", LApop$code)
LApop$name <- if_else(LApop$name=="Isles of Scilly", "Cornwall", LApop$name)
#Merge City of London & Hackney
LApop$code <- if_else(LApop$code=="E09000001", "E09000012", LApop$code)
LApop$name <- if_else(LApop$name=="City of London", "Hackney and City of London", LApop$name)
LApop$name <- if_else(LApop$name=="Hackney", "Hackney and City of London", LApop$name)
LApop <- LApop %>%
group_by(name, code) %>%
summarise(pop=sum(pop)) %>%
ungroup()
LAadmissions <- LAadmissions %>%
merge(LADtoRegion, all.x=TRUE, by.x="LAD19CD", by.y="LTLA") %>%
mutate(Region=case_when(
LAD19CD %in% c("E07000244", "E07000245") ~ "East of England",
LAD19CD %in% c("E06000058", "E06000059", "E07000246") ~ "South West",
LAD19CD %in% c("E07000004", "E07000005", "E07000006", "E07000007") ~ "South East",
TRUE ~ Region)) %>%
rename(Lacode=LAD19CD) %>%
merge(LApop, by.x="Lacode", by.y="code", all.x=TRUE) %>%
group_by(Lacode, LAD19NM) %>%
arrange(date) %>%
mutate(admrate=admissions*100000/pop,
adm_roll=roll_mean(admrate, 7, align="center", fill=NA, na.rm=TRUE),
adm_change=adm_roll-lag(adm_roll, 7)) %>%
ungroup()
adm_max=max(LAadmissions$date[!is.na(LAadmissions$adm_roll)])
plotdata <- LAadmissions %>%
filter(date==adm_max)
#Download Carl Baker's lovely map
ltla <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg")
ltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode="wb")
Background <- st_read(ltla, layer="7 Background")
ltlaadm <- st_read(ltla, layer="4 LTLA-2019") %>%
left_join(plotdata, by="Lacode")
Groups <- st_read(ltla, layer="2 Groups")
Group_labels <- st_read(ltla, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
plot1 <- ggplot()+
geom_sf(data=Background %>% filter(Name=="England & Wales"),
aes(geometry=geom), fill="White")+
geom_sf(data=ltlaadm %>% filter(!RegionNation %in% c("Scotland", "Wales", "Northern Ireland")),
aes(geometry=geom, fill=adm_roll), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(!RegionNation %in% c("Scotland", "Wales", "Northern Ireland")),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(!RegionNation %in% c("Scotland", "Wales",
"Northern Ireland")),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1, limits=c(0,NA),
name="Admissions per day\nper 100,000")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"), plot.title.position="plot",
plot.caption.position="plot", legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID admission rates vary a lot across England",
subtitle=paste0("Rolling 7-day average number of daily new hospital admissions at Lower Tier Local Authority level\nData up to ", adm_max),
caption="Data from NHS England & ONS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDAdmissionsLTLACartogram.tiff", units="in", width=8, height=9, res=500)
plot1
dev.off()
plotdata2 <-LAadmissions %>%
filter(date>=adm_max-days(7) & date<=adm_max)
plot2 <- ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdata2,
aes(x=adm_roll, y=adm_change, group=LAD19NM, alpha=7-as.integer(adm_max-date)),
colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdata2 %>% filter(date==adm_max),
aes(x=adm_roll, y=adm_change, fill=Region, size=pop), shape=21, alpha=0.7)+
geom_text_repel(data=plotdata2 %>% filter(date==adm_max),
aes(x=adm_roll, y=adm_change, label=LAD19NM), size=rel(2.3))+
scale_x_continuous(name="Average new admissions per day in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in admission rate compared to the preceding week")+
scale_fill_paletteer_d("LaCroixColoR::paired", name="")+
scale_size(guide=FALSE)+
theme_custom()+
labs(title="COVID admissions are rising in most NHS trusts in England️",
subtitle=paste0("Hospital admission rates and how these have changed in the past week in English Local Authorities.\nBubbles are sized by population. Trails represent each area's movement across the plot in the past week.\nData up to ",
adm_max),
caption="Data from NHS England & ONS\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDAdmissionsLTLAChangeScatterPaths.tiff", units="in", width=9, height=7, res=800)
plot2
dev.off()
#Trust-level analysis
#Download PHE's trust catchment data from and save as a csv.
#https://app.box.com/s/qh8gzpzeo1firv1ezfxx2e6c4tgtrudl
catchments <- read_csv("COVID_LA_Plots/2020 Trust Catchment Populations Worksheet.csv") %>%
filter(CatchmentYear==2018) %>%
group_by(TrustCode) %>%
summarise(catchpop=sum(Catchment)) %>%
ungroup()
#Sort out trust mergers/recodes
#1st lookup for admissions up to 4th October 2020, when RD3 and RDZ merged to form R0D in the admissions (but not deaths) data
catchments1 <- catchments %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TRUE ~ as.character(TrustCode))) %>%
group_by(TrustCode) %>%
summarise(catchpop1=sum(catchpop)) %>%
ungroup()
#2nd lookup for after 4th October 2020
catchments2 <- catchments %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TRUE ~ as.character(TrustCode))) %>%
group_by(TrustCode) %>%
summarise(catchpop2=sum(catchpop)) %>%
ungroup()
#3rd lookup for after 1st April 2021 when West Sussex (RYR) and Brighton & Sussex (RXH) trusts merged
catchments3 <- catchments %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TrustCode=="RXH" ~ "RYR",
TRUE ~ as.character(TrustCode))) %>%
group_by(TrustCode) %>%
summarise(catchpop3=sum(catchpop)) %>%
ungroup()
#4th lookup for after 1st June 2021 when NW boroughs (RTV) and Mersey (RW4) care trusts merged
catchments4 <- catchments %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TrustCode=="RXH" ~ "RYR",
TrustCode=="RTV" ~ "RW4",
TRUE ~ as.character(TrustCode))) %>%
group_by(TrustCode) %>%
summarise(catchpop4=sum(catchpop)) %>%
ungroup()
#5th lookup for after 1st October 2021 when Pennine (RW6) & Salford (RM3) care trusts merged
catchments5 <- catchments %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TrustCode=="RXH" ~ "RYR",
TrustCode=="RTV" ~ "RW4",
TrustCode=="RW6" ~ "RM3",
TRUE ~ as.character(TrustCode))) %>%
group_by(TrustCode) %>%
summarise(catchpop5=sum(catchpop)) %>%
ungroup()
#Merge into admissions data
trustadm <- admissions %>%
select(code, Region, name, admissions, date) %>%
distinct() %>%
merge(catchments1, all.x=TRUE, by.x="code", by.y="TrustCode") %>%
merge(catchments2, all.x=TRUE, by.x="code", by.y="TrustCode") %>%
merge(catchments3, all.x=TRUE, by.x="code", by.y="TrustCode") %>%
merge(catchments4, all.x=TRUE, by.x="code", by.y="TrustCode") %>%
merge(catchments5, all.x=TRUE, by.x="code", by.y="TrustCode") %>%
rename(trust=name) %>%
group_by(code) %>%
arrange(date) %>%
mutate(catchpop=case_when(
date%
ungroup()
plotdata3 <-trustadm %>%
filter(date>=adm_max-days(7) & date<=adm_max & code!= "REN")
plot3 <- ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdata3,
aes(x=adm_roll, y=adm_change, group=trust, alpha=7-as.integer(adm_max-date)),
colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdata3 %>% filter(date==adm_max),
aes(x=adm_roll, y=adm_change, size=catchpop, fill=Region), shape=21, alpha=0.7)+
geom_text_repel(data=plotdata3 %>% filter(date==adm_max),
aes(x=adm_roll, y=adm_change, label=trust), size=rel(2.3))+
scale_x_continuous(name="Average new admissions per day in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in admission rate compared to the preceding week")+
scale_fill_paletteer_d("colorblindr::OkabeIto", name="")+
scale_size(guide="none")+
theme_custom()+
theme(axis.line=element_blank())+
labs(title="At an NHS trust level, COVID admission rates in England are a mixed picture",
subtitle=paste0("Hospital admission rates and how these have changed in the past week in English hospital trusts.\nBubbles are sized by population. Trails represent each trust's movement across the plot in the past week.\nData up to ",
adm_max),
caption="Data from NHS England, PHE & ONS\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDAdmissionsTrustChangeScatterPaths.tiff", units="in", width=9, height=7, res=800)
plot3
dev.off()
#Focus on London
plot3London <- ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
#geom_path(data=plotdata3,
# aes(x=adm_roll, y=adm_change, group=trust, alpha=7-as.integer(adm_max-date)),
# colour="Grey80", show.legend=FALSE)+
geom_path(data=plotdata3 %>% filter(Region=="London"),
aes(x=adm_roll, y=adm_change, group=trust, alpha=7-as.integer(adm_max-date)),
colour="Black", show.legend=FALSE)+
#geom_point(data=plotdata3 %>% filter(date==adm_max),
# aes(x=adm_roll, y=adm_change, size=catchpop), shape=21, alpha=0.8, fill="Grey50")+
geom_point(data=plotdata3 %>% filter(date==adm_max & Region=="London"),
aes(x=adm_roll, y=adm_change, size=catchpop), fill="Pink", shape=21)+
geom_text_repel(data=plotdata3 %>% filter(date==adm_max),
aes(x=adm_roll, y=adm_change, label=trust), size=rel(2.3))+
scale_x_continuous(name="Average new admissions per day in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in admission rate compared to the preceding week")+
scale_size(guide="none")+
theme_custom()+
theme(axis.line=element_blank())+
labs(title="At a local level, COVID admissions are a mixed picture",
subtitle=paste0("Hospital admission rates and how these have changed in the past week in English hospital trusts.\nBubbles are sized by population. Trails represent each trust's movement across the plot in the past week.\nData up to ",
adm_max),
caption="Data from NHS England, PHE & ONS\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDAdmissionsTrustChangeScatterPathsLondon.tiff", units="in", width=9, height=7, res=800)
plot3London
dev.off()
########################
#Focus on County Durham/Darlington
plotdata4 <-trustadm %>%
filter(date>=adm_max-days(120) & date<=adm_max)
plot4 <- ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdata4,
aes(x=adm_roll, y=adm_change, group=trust, alpha=120-as.integer(adm_max-date)),
colour="Grey50", show.legend=FALSE)+
geom_path(data=plotdata4 %>% filter(code=="RXP"),
aes(x=adm_roll, y=adm_change, group=trust, alpha=120-as.integer(adm_max-date)),
colour="#FF4E86", show.legend=FALSE)+
geom_point(data=plotdata4 %>% filter(date==adm_max),
aes(x=adm_roll, y=adm_change, size=catchpop), shape=21, alpha=0.7, fill="Grey70")+
geom_point(data=plotdata4 %>% filter(date==adm_max & code=="RXP"),
aes(x=adm_roll, y=adm_change, size=catchpop), shape=21, alpha=0.7, fill="#FF4E86")+
#geom_text_repel(data=plotdata4 %>% filter(date==adm_max),
# aes(x=adm_roll, y=adm_change, label=trust), size=rel(2.3))+
scale_x_continuous(name="Average new admissions per day in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in admission rate compared to the preceding week")+
scale_fill_paletteer_d("colorblindr::OkabeIto", name="")+
scale_size(guide="none")+
theme_custom()+
theme(axis.line=element_blank(), plot.subtitle=element_markdown())+
labs(title="COVID admission rates have been persistently bad in County Durham & Darlington NHS Trust",
subtitle=paste0("Hospital admission rates and how these have changed in the past week in English hospital trusts.\nBubbles are sized by population. Trails represent each trust's movement across the plot in the past week.\nData up to ",
adm_max),
caption="Data from NHS England, UKHSA & ONS\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDAdmissionsLTLAChangeScatterPathsLong.tiff", units="in", width=9, height=7, res=800)
plot4
dev.off()
agg_tiff("Outputs/COVIDAdmissionsDurham.tiff", units="in", width=9, height=6, res=800)
ggplot()+
geom_line(data=plotdata4, aes(x=date, y=adm_roll, group=trust), colour="Grey70")+
geom_line(data=plotdata4 %>% filter(code=="RXP"),
aes(x=date, y=adm_roll), colour="#FF4E86")+
scale_x_date(name="")+
scale_y_continuous(name="Average new admissions per day in the past week\n(rate per 100,000)")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="There's something odd about Durham and Darlington",
subtitle="Rolling 7-day average of new COVID admissions during the delta wave in Country Durham & Darlington NHS Trust
compared to other trusts in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
####################
#Explore fallout from Immensa scandal
#Look at rates in LAs most impacted by testing, list taken from https://twitter.com/AlastairGrant4/status/1452897309591756800
Imm.data <- LAadmissions %>%
select(date, Region, admissions, name, pop) %>%
filter(date>as.Date("2021-08-01")) %>%
mutate(flag1=case_when(
name %in% c("Gloucester", "South Gloucestershire", "West Berkshire", "North Somerset", "Swindon",
"Somerset West and Taunton", "Tewkesbury", "Bristol, City of", "Cheltenham",
"Bath and North East Somerset",
"Cotswold", "Sedgemoor", "Stroud") ~ "Most Affected Areas",
TRUE ~ "Rest of England"),
flag2=case_when(
flag1=="Most Affected Areas" ~ "Most Affected Areas",
Region=="South West" ~ "Rest of the South West",
TRUE ~ "Rest of England"))
Imm.data1 <- Imm.data %>%
group_by(date, flag1) %>%
summarise(admissions=sum(admissions),
pop=sum(pop)) %>%
ungroup() %>%
group_by(flag1) %>%
mutate(admrate=admissions*100000/pop,
adm_roll=roll_mean(admrate, 7, align="center", fill=NA, na.rm=TRUE)) %>%
ungroup()
agg_tiff("Outputs/COVIDAdmissionsImmensa.tiff", units="in", width=8, height=6, res=500)
ggplot(Imm.data1)+
geom_rect(aes(xmin=as.Date("2021-09-02")+days(8), xmax=as.Date("2021-10-12")+days(8), ymin=0, ymax=2),
fill="Grey90")+
geom_line(aes(x=date, y=adm_roll, colour=flag1), show.legend=FALSE)+
geom_text_repel(data=Imm.data1 %>% filter(date==max(date)-days(4)),
aes(x=date, y=adm_roll, colour = flag1, label=flag1),
family = "Lato", fontface = "bold", direction = "y", box.padding = 0.4, hjust=0,
xlim = c(as.Date("2021-10-22"), NA_Date_), show.legend=FALSE, segment.color = NA)+
scale_x_date(name="", limits=c(as.Date("2021-08-01"), as.Date("2021-11-15")))+
scale_y_continuous(name="Daily admissions per 100,000 population")+
scale_colour_manual(values=c("#dc322f", "#073642"))+
theme_custom()+
theme(plot.subtitle=element_markdown(colour="Grey50"))+
labs(title="COVID admissions have risen in areas most affected by the Immensa scandal",
subtitle="Rolling 7-day average rate of new COVID-19 hospital admissions or in-hospital diagnoses in the 13 English
Local Authorities most affected by the Immensa lab errors compared to the rest of England",
caption="Data from NHS England | Affected Local Authorities identified by @AlistairGrant4 | Plot by @VictimOfMaths\n* The shaded area is offset by 8 days from the period when incorrect test results were given to allow for the lag between testing positive\nand being admitted to hospital")+
annotate(geom="text", x=as.Date("2021-09-30"), y=0.5, family="Lato", label="Period affected by testing errors*")
dev.off()
Imm.data2 <- Imm.data %>%
group_by(date, flag2) %>%
summarise(admissions=sum(admissions),
pop=sum(pop)) %>%
ungroup() %>%
group_by(flag2) %>%
mutate(admrate=admissions*100000/pop,
adm_roll=roll_mean(admrate, 7, align="center", fill=NA, na.rm=TRUE)) %>%
ungroup()
agg_tiff("Outputs/COVIDAdmissionsImmensa2.tiff", units="in", width=8, height=6, res=500)
ggplot(Imm.data2)+
geom_rect(aes(xmin=as.Date("2021-09-02")+days(8), xmax=as.Date("2021-10-12")+days(8), ymin=0, ymax=2),
fill="Grey90")+
geom_line(aes(x=date, y=adm_roll, colour=flag2), show.legend=FALSE)+
geom_text_repel(data=Imm.data2 %>% filter(date==max(date)-days(4)),
aes(x=date, y=adm_roll, colour = flag2, label=flag2),
family = "Lato", fontface = "bold", direction = "y", box.padding = 0.4, hjust=0,
xlim = c(as.Date("2021-10-25"), NA_Date_), show.legend=FALSE, segment.color = NA)+
scale_x_date(name="", limits=c(as.Date("2021-08-01"), as.Date("2021-11-23")))+
scale_y_continuous(name="Daily admissions per 100,000 population")+
scale_colour_manual(values=c("#dc322f", "#073642", "#268bd2"))+
theme_custom()+
theme(plot.subtitle=element_markdown(colour="Grey50"))+
labs(title="COVID admissions have risen in areas most affected by the Immensa scandal",
subtitle="Rolling 7-day average rate of new COVID-19 hospital admissions or in-hospital diagnoses in the 13 English
Local Authorities most affected by the Immensa lab errors compared to other Local Authorities in the South West
and the rest of England",
caption="Data from NHS England | Affected Local Authorities identified by @AlistairGrant4 | Plot by @VictimOfMaths\n* The shaded area is offset by 8 days from the period when incorrect test results were given to allow for the lag between testing positive\nand being admitted to hospital")+
annotate(geom="text", x=as.Date("2021-09-30"), y=0.5, family="Lato", label="Period affected by testing errors*")
dev.off()
#Bring in case data for these areas
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv"
temp1 <- tempfile()
temp1 <- curl_download(url=url, destfile=temp1, quiet=FALSE, mode="wb")
cases <- read.csv(temp1) %>%
mutate(date=as.Date(date)) %>%
filter(date>="2021-08-01" & substr(areaCode, 1, 1)=="E") %>%
mutate(highlight=if_else(areaName %in% c("Gloucester", "South Gloucestershire", "West Berkshire",
"North Somerset", "Swindon", "Somerset West and Taunton",
"Tewkesbury", "Bristol, City of", "Cheltenham", "Bath and North East Somerset",
"Cotswold", "Sedgemoor", "Stroud"),
"Most affected areas", "Rest of England"))
agg_tiff("Outputs/COVIDCasesImmensa.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_rect(aes(xmin=as.Date("2021-09-02"), xmax=as.Date("2021-10-12"), ymin=0, ymax=1500),
fill="Grey90")+
geom_line(data=cases, aes(x=date, y=newCasesBySpecimenDateRollingRate, group=areaName), colour="Grey70")+
geom_line(data=cases %>% filter(highlight=="Most affected areas"),
aes(x=date, y=newCasesBySpecimenDateRollingRate, group=areaName), colour="#FF4E86")+
scale_x_date(name="")+
scale_y_continuous(name="Weekly COVID cases per 100,000 population")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="COVID cases fell sharply in areas affected by the Immensa scandal",
subtitle="Rolling 7-day average rate of new COVID-19 cases in the 13 English Local Authorities most affected
by the Immensa lab errors compared to other Local Authorities in England",
caption="Data from coronavirus.data.gov.uk | Affected Local Authorities identified by @AlistairGrant4 | Plot by @VictimOfMaths")+
annotate(geom="text", x=as.Date("2021-09-20"), y=1400, family="Lato", label="Period affected by testing errors")
dev.off()
cases2 <- Imm.data %>% merge(cases %>% rename("name"="areaName")) %>%
mutate(cases=newCasesBySpecimenDateRollingRate*pop/100000) %>%
group_by(flag2, date) %>%
summarise(pop=sum(pop), cases=sum(cases)) %>%
ungroup() %>%
mutate(caserate=cases*100000/pop)
agg_tiff("Outputs/COVIDCasesImmensa2.tiff", units="in", width=9, height=6, res=500)
ggplot(cases2)+
geom_rect(aes(xmin=as.Date("2021-09-02"), xmax=as.Date("2021-10-12"), ymin=0, ymax=1000),
fill="Grey90")+
geom_line(aes(x=date, y=caserate, colour=flag2), show.legend=FALSE)+
geom_text_repel(data=cases2 %>% filter(date==max(date)),
aes(x=date, y=caserate, colour = flag2, label=flag2),
family = "Lato", fontface = "bold", direction = "y", box.padding = 0.4, hjust=0,
xlim = c(as.Date("2021-10-24"), NA_Date_), show.legend=FALSE, segment.color = NA)+
scale_x_date(name="", limits=c(as.Date("2021-08-01"), as.Date("2021-11-23")))+
scale_y_continuous(name="Weekly COVID cases per 100,000 population")+
scale_colour_manual(values=c("#dc322f", "#073642", "#268bd2"))+
theme_custom()+
theme(plot.subtitle=element_markdown(colour="Grey50"))+
labs(title="COVID cases in the most affected areas look different to the rest of the South West",
subtitle="Rolling 7-day average rate of new COVID-19 cases in the 13 English Local Authorities most affected by the
Immensa lab errors compared to other Local Authorities in the South West
and the rest of England",
caption="Data from coronavirus.data.gov.uk | Affected Local Authorities identified by @AlistairGrant4 | Plot by @VictimOfMaths")+
annotate(geom="text", x=as.Date("2021-09-22"), y=750, family="Lato", label="Period affected by testing errors")
dev.off()
Imm.data3 <- Imm.data2 %>% select(date, flag2, admissions) %>%
spread(flag2, admissions) %>%
mutate(diffSW=`Most Affected Areas`-`Rest of the South West`)
ggplot(Imm.data3, aes(x=date, y=diffSW))+
geom_rect(aes(xmin=as.Date("2021-09-02")+days(8), xmax=as.Date("2021-10-12")+days(8), ymin=-25, ymax=20),
fill="Grey90")+
geom_col(fill="tomato")+
scale_x_date(name="")+
scale_y_continuous("Daily admissions in most affected areas - rest of South West")+
theme_custom()
before <- Imm.data3 %>% filter(date%
summarise(mean(diffSW))
during <- Imm.data3 %>% filter(date>=as.Date("2021-09-02")+days(8) & date<=as.Date("2021-10-12")+days(8)) %>%
summarise(sum(diffSW))
####################################
#Admissions by deprivation
#Start by calculating IMD at MSOA level
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE) %>%
select(c(1,2,5,6)) %>%
set_names("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, LAD17CD) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:G34758", col_names=FALSE) %>%
select(-c(2:6)) %>%
set_names("LSOA11CD", "pop")
pop_full <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:CT34758", col_names=FALSE) %>%
select(-c(2:7)) %>%
set_names("LSOA11CD", c(0:90))
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at LTLA level, weighting by population
IMD_LTLA <- IMD %>%
group_by(LAD17CD)%>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))
Adm_IMD <- merge(LAadmissions, IMD_LTLA, by.x="Lacode", by.y="LAD17CD") %>%
group_by(date, decile) %>%
summarise(pop=sum(pop.x), adm_roll=sum(adm_roll)) %>%
ungroup() %>%
mutate(admrate_roll=adm_roll*100000/pop)
agg_tiff("Outputs/COVIDAdmissionsxIMD.tiff", units="in", width=9, height=6, res=500)
ggplot(Adm_IMD, aes(x=date, y=admrate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new admissions per 100,000 people", limits=c(0,NA))+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="Less deprived areas have consistently seen more COVID admissions",
subtitle="Daily rate of new COVID admissions in England based on Local Authority-level data",
caption="Data from NHS England, PHE & MHCLG | Plot by Colin Angus")
dev.off()
================================================
FILE: Heatmaps/COVIDAdmissionsWithFor.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(paletteer)
library(extrafont)
library(ragg)
library(lubridate)
library(scales)
library(ggtext)
library(geofacet)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Download latest primary diagnosis data
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/Primary-Diagnosis-Supplement-20220616.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
newdata_with <- read_excel(temp, sheet=1, range="C14:BZ22", col_names=FALSE) %>%
drop_na() %>%
gather(date, with, c(2:ncol(.))) %>%
rename("Region"=`...1`) %>%
mutate(date=as.Date("2022-04-01")+days(as.numeric(substr(date, 4, 6))-2))
newdata_from <- read_excel(temp, sheet=2, range="C14:BZ22", col_names=FALSE) %>%
drop_na() %>%
gather(date, from, c(2:ncol(.))) %>%
rename("Region"=`...1`) %>%
mutate(date=as.Date("2022-04-01")+days(as.numeric(substr(date, 4, 6))-2))
#Slightly older data
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/05/Primary-Diagnosis-Supplement-20220512-211001-220331.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
olddata_with <- read_excel(temp, sheet=1, range="C14:GC22", col_names=FALSE) %>%
drop_na() %>%
gather(date, with, c(2:ncol(.))) %>%
rename("Region"=`...1`) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4, 6))-2))
olddata_from <- read_excel(temp, sheet=2, range="C14:GC22", col_names=FALSE) %>%
drop_na() %>%
gather(date, from, c(2:ncol(.))) %>%
rename("Region"=`...1`) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4, 6))-2))
#download older data
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/Primary-Diagnosis-Supplement-20211209-20210618-20210930.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
olderdata_with <- read_excel(temp, sheet=1, range="C14:DD22", col_names=FALSE) %>%
drop_na() %>%
gather(date, with, c(2:ncol(.))) %>%
rename("Region"=`...1`) %>%
mutate(date=as.Date("2021-06-18")+days(as.numeric(substr(date, 4, 6))-2))
olderdata_from <- read_excel(temp, sheet=2, range="C14:DD22", col_names=FALSE) %>%
drop_na() %>%
gather(date, from, c(2:ncol(.))) %>%
rename("Region"=`...1`) %>%
mutate(date=as.Date("2021-06-18")+days(as.numeric(substr(date, 4, 6))-2))
data <- bind_rows(olderdata_with, olddata_with, newdata_with) %>%
merge(bind_rows(olderdata_from, olddata_from, newdata_from)) %>%
mutate(incidental=with-from,
Region=if_else(Region=="ENGLAND", "England", Region)) %>%
gather(type, count, c("with", "from", "incidental"))
agg_tiff("Outputs/COVIDAdmissionsCause.tiff", units="in", width=9, height=7, res=500)
ggplot(data %>% filter(Region=="England" & type!="with"),
aes(x=date, y=count, colour=type))+
#geom_area(position="stack")+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of patients", limits=c(0,NA))+
scale_colour_paletteer_d("palettetown::porygon")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The BA.4/5 wave is here",
subtitle="Patients in English acute hospitals 'for' COVID and where COVID is not the primary cause of hospitalisation",
caption="Data from NHS England | Plot by @VictimOfMaths")+
annotate("text", x=as.Date("2021-10-15"), y=11500/2, label="Patients being treated for COVID",
colour="#40A0D8", family="Lato")+
annotate("text", x=as.Date("2022-01-15"), y=4500/4, label="Patients being treated for other causes, but 'with' COVID",
colour="#F89088", family="Lato")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsCauseLondon.tiff", units="in", width=9, height=7, res=500)
ggplot(data %>% filter(Region=="London" & type!="with"),
aes(x=date, y=count, colour=type))+
#geom_area(position="stack")+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of patients", limits=c(0,NA))+
scale_colour_paletteer_d("palettetown::porygon")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The majority of COVID patients in London are now 'with', not 'for' COVID",
subtitle="Patients in London's acute hospitals 'for' COVID and where COVID is not the primary cause of hospitalisation",
caption="Data from NHS England | Plot by @VictimOfMaths")+
annotate("text", x=as.Date("2021-10-30"), y=920, label="Patients being treated for COVID",
colour="#40A0D8", family="Lato")+
annotate("text", x=as.Date("2021-09-30"), y=280, label="Patients being treated for other causes, but 'with' COVID",
colour="#F89088", family="Lato")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsCauseLondonStacked.tiff", units="in", width=9, height=7, res=500)
ggplot(data %>% filter(Region=="London" & type!="with"),
aes(x=date, y=count, fill=type))+
geom_area(position="stack", show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of patients", limits=c(0,NA))+
scale_fill_paletteer_d("palettetown::porygon")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="London's rising number of COVID patients are both 'with' and 'for' COVID",
subtitle="Patients in London hospitals 'for' COVID and where COVID is not the primary cause of hospitalisation",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsCauseLondonProp.tiff", units="in", width=9, height=7, res=500)
data %>% filter(type!="incidental" & Region=="London") %>%
spread(type, count) %>%
mutate(prop=from/with) %>%
ggplot(aes(x=date, y=prop))+
geom_line(colour="RoyalBlue")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of COVID patients for whom\nCOVID is the main cause of hospitalisation",
limits=c(0,NA), labels=label_percent(accuracy=1))+
theme_custom()+
labs(title="Only around a third of London's COVID patients are being treated 'for' COVID",
subtitle="Proportion of total COVID-positive patients assessed to be in hospital 'for' rather than 'with' COVID in London NHS trusts",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsCauseNW.tiff", units="in", width=9, height=7, res=500)
ggplot(data %>% filter(Region=="North West" & type!="with"),
aes(x=date, y=count, colour=type))+
#geom_area(position="stack")+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of patients", limits=c(0,NA))+
scale_colour_paletteer_d("palettetown::porygon")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="London's rising number of COVID patients are both 'with' and 'for' COVID",
subtitle="Patients in London hospitals 'for' COVID and where COVID is not the primary cause of hospitalisation",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Set up geofacet grid of NHS regions
mygrid <- data.frame(name=c("North West", "North East and Yorkshire",
"Midlands","East of England",
"South West", "London", "South East"),
row=c(1,1,2,2,3,3,3), col=c(2,3,2,3,1,2,3),
code=c(1:7))
agg_tiff("Outputs/COVIDAdmissionsCausePropxReg.tiff", units="in", width=9.5, height=7, res=500)
data %>% filter(type!="incidental" & Region!="ENGLAND"& Region !="England") %>%
spread(type, count) %>%
mutate(prop=from/with) %>%
ggplot(aes(x=date, y=prop, colour=Region))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of COVID patients for whom\nCOVID is the main cause of hospitalisation",
limits=c(0,NA), labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
theme_custom()+
labs(title="The proportion of COVID patients hospitalised because of COVID varies a lot",
subtitle="Proportion of total COVID-positive patients assessed to be in hospital 'for' rather than 'with' COVID by NHS region",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsCausexReg.tiff", units="in", width=9, height=7, res=500)
ggplot(data %>% filter(Region!="ENGLAND" & Region !="England" & type!="with"),
aes(x=date, y=count, colour=type))+
#geom_area(position="stack")+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of patients", limits=c(0,NA))+
scale_colour_paletteer_d("palettetown::porygon")+
facet_geo(~Region, scales="free_y", grid=mygrid)+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The balance between patients 'with' and 'for' COVID varies by region",
subtitle="Patients in London hospitals 'for' COVID and where COVID is not the primary cause of hospitalisation",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Bring in unseparated data to get figures from non-acute trusts
source2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-daily-admissions-and-beds-20220112.xlsx"
temp2 <- tempfile()
temp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode="wb")
combdata <- read_excel(temp2, range="B90:DB97", col_names=FALSE) %>%
gather(date, alltrusts, c(2:ncol(.))) %>%
rename("Region"=`...1`) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4, 6))-2))
alldata <- data %>% spread(type, count) %>%
merge(combdata, all.x=TRUE) %>%
mutate("Non-acute"=alltrusts-with) %>%
gather(type, count, c(3:7))
agg_tiff("Outputs/COVIDAdmissionsCauseLondonv2.tiff", units="in", width=9, height=7, res=500)
ggplot(alldata %>% filter(Region=="London" & type %in% c("from", "incidental", "Non-acute") &
date>as.Date("2021-10-01")),
aes(x=date, y=count, colour=type))+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of patients", limits=c(0,NA))+
scale_colour_manual(values=c("#40A0D8", "#F89088", "DarkRed"))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The number of COVID patients in non-acute hospitals in London is also rising",
subtitle="Patients in London in acute hospitals due to COVID and with COVID and COVID-positive patients in non-acute hospitals",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsCauseLondonv3.tiff", units="in", width=9, height=7, res=500)
alldata %>% filter(Region=="London" & type %in% c("from", "incidental", "Non-acute") &
date>as.Date("2021-10-01")) %>%
spread(type, count) %>%
mutate(with=incidental+`Non-acute`) %>%
gather(type, count, c(3:6)) %>%
filter(type %in% c("from", "with")) %>%
ggplot(aes(x=date, y=count, colour=type))+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of patients", limits=c(0,NA))+
scale_colour_manual(values=c("#40A0D8", "DarkRed"))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="In total the rise in patients 'with' COVID *may* be greater than patients 'for' COVID",
subtitle="Patients in London in acute hospitals due to COVID and with COVID and COVID-positive patients in non-acute hospitals",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDAdmissionsxAge.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(ggstream)
library(extrafont)
library(paletteer)
library(RcppRoll)
library(ggrepel)
library(ragg)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Read in latest monthly age-stratified admissions data from NHS England website
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/03/Covid-Publication-10-03-2022-Supplementary-Data.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- read_excel(temp, range="D16:EY25", col_names=FALSE) %>%
mutate(age=c("0-5", "6-17", "18-24", "25-34", "35-44", "45-54", "55-64", "65-74", "75-84", "85+")) %>%
gather(date, admissions, c(1:(ncol(.)-1))) %>%
mutate(date=as.Date("2021-10-01")+days(as.integer(substr(date, 4, 6))-1),
age=factor(age, levels=c("0-5", "6-17", "18-24", "25-34", "35-44", "45-54", "55-64", "65-74",
"75-84", "85+")))
#Previous data 1
url1 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/02/Covid-Publication-13-01-2022-Supplementary-Data-210407-210930.xlsx"
temp <- curl_download(url=url1, destfile=temp, quiet=FALSE, mode="wb")
rawdataold1 <- read_excel(temp, range="D16:FX25", col_names=FALSE) %>%
mutate(age=c("0-5", "6-17", "18-24", "25-34", "35-44", "45-54", "55-64", "65-74", "75-84", "85+")) %>%
gather(date, admissions, c(1:(ncol(.)-1))) %>%
mutate(date=as.Date("2021-04-07")+days(as.integer(substr(date, 4, 6))-1),
age=factor(age, levels=c("0-5", "6-17", "18-24", "25-34", "35-44", "45-54", "55-64", "65-74",
"75-84", "85+")))
#Previous data 2
url2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/02/Covid-Publication-13-01-2022-Supplementary-Data-up-to-210406.xlsx"
temp <- curl_download(url=url2, destfile=temp, quiet=FALSE, mode="wb")
rawdataold2 <- read_excel(temp, range="D16:FX25", col_names=FALSE) %>%
mutate(age=c("0-5", "6-17", "18-24", "25-34", "35-44", "45-54", "55-64", "65-74", "75-84", "85+")) %>%
gather(date, admissions, c(1:(ncol(.)-1))) %>%
mutate(date=as.Date("2020-10-12")+days(as.integer(substr(date, 4, 6))-1),
age=factor(age, levels=c("0-5", "6-17", "18-24", "25-34", "35-44", "45-54", "55-64", "65-74",
"75-84", "85+")))
rawdata <- bind_rows(rawdata, rawdataold1, rawdataold2)
agg_tiff("Outputs/COVIDAdmissionsHeatmap.tiff", units="in", width=9, height=6, res=800)
ggplot(rawdata, aes(x=date, y=age, fill=admissions))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="Age group")+
scale_fill_paletteer_c("viridis::inferno", name="Daily admissions")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID admission rates have been much lower and younger in the latest wave",
subtitle="Number of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Version of Delta/Omicron wave only
agg_tiff("Outputs/COVIDAdmissionsHeatmapRecent.tiff", units="in", width=9, height=6, res=800)
ggplot(rawdata %>% filter(date>as.Date("2021-06-01")), aes(x=date, y=age, fill=admissions))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="Age group")+
scale_fill_paletteer_c("viridis::inferno", name="Daily admissions")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="In recent weeks, COVID hospital admissions have been highest in older ages",
subtitle="Number of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Bring in populations to calculate rates
popurl <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls"
temp1 <- tempfile()
temp1 <- curl_download(url=popurl, destfile=temp1, quiet=FALSE, mode="wb")
pop <- as.data.frame(t(read_excel(temp1, sheet="MYE2 - Persons", range="E12:CQ12",
col_names=FALSE))) %>%
mutate(age=c(0:90),
age=case_when(
age<6 ~ "0-5",
age<18 ~ "6-17",
age<25 ~ "18-24",
age<35 ~ "25-34",
age<45 ~ "35-44",
age<55 ~ "45-54",
age<65 ~ "55-64",
age<75 ~ "65-74",
age<85 ~ "75-84",
TRUE ~ "85+")) %>%
group_by(age) %>%
summarise(pop=sum(V1)) %>%
ungroup()
data <- rawdata %>%
merge(pop) %>%
mutate(admrate=admissions*100000/pop)
agg_tiff("Outputs/COVIDAdmissionsHeatmapRate.tiff", units="in", width=9, height=6, res=800)
ggplot(data, aes(x=date, y=age, fill=admrate))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="Age group")+
scale_fill_paletteer_c("viridis::inferno", name="Daily admissions per 100,000")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID admission rates have been much lower and younger in the latest wave",
subtitle="Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsHeatmapRateRecent.tiff", units="in", width=9, height=6, res=800)
ggplot(data %>% filter(date>as.Date("2021-06-01")), aes(x=date, y=age, fill=admrate))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="Age group")+
scale_fill_paletteer_c("viridis::inferno", name="Daily admissions per 100,000")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID admission rates have been rising in older age groups",
subtitle="Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths")
dev.off()
################
#Take rolling averages
rolldata <- data %>%
group_by(age) %>%
arrange(date) %>%
mutate(admrate_roll=roll_mean(admrate, 7, align="center", fill=NA),
agecont=case_when(
age=="0-5" ~ 2.5,
age=="6-17" ~ 12.5,
age=="18-24" ~ 20.5,
age=="25-34" ~ 29.5,
age=="35-44" ~ 39.5,
age=="45-54" ~ 49.5,
age=="55-64" ~ 59.5,
age=="65-74" ~ 69.5,
age=="75-84" ~ 79.5,
age=="85+" ~ 89.5))
agg_tiff("Outputs/COVIDAdmissionsHeatmapRateRecentSmoothed.tiff",
units="in", width=9, height=6, res=800)
ggplot(rolldata %>% filter(date>as.Date("2021-06-01") & !is.na(admrate_roll)),
aes(x=date, y=age, fill=admrate_roll))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="Age group")+
scale_fill_paletteer_c("viridis::inferno", name="Daily admissions per 100,000",
limits=c(0,NA))+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID admission rates during the Delta and Omicron waves",
subtitle="Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsHeatmapRateSmoothed.tiff",
units="in", width=9, height=6, res=800)
ggplot(rolldata %>% filter(!is.na(admrate_roll)),
aes(x=date, y=age, fill=admrate_roll))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="Age group")+
scale_fill_paletteer_c("viridis::inferno", name="Daily admissions per 100,000",
limits=c(0,NA))+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID admission rates have been *much* lower this winter",
subtitle="Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsContourRateRecentSmoothed.tiff",
units="in", width=9, height=6, res=800)
ggplot(rolldata %>% filter(date>as.Date("2021-06-01") & !is.na(admrate_roll)),
aes(x=date, y=agecont, z=admrate_roll))+
geom_contour_filled(colour="white")+
scale_x_date(name="")+
scale_y_continuous(name="Age")+
scale_fill_viridis_d(option="turbo", name="Daily admissions\nper 100,000",
labels=c("<2", "2+", "4+", "6+", "8+", "10+", "12+", "14+", "16+", "18+",
"20+", "22+", "24+"))+
theme_custom()+
theme(legend.position="top")+
guides(fill=guide_legend(nrow=2))+
labs(title="COVID admission rates have been slow to fall since Omicron arrived",
subtitle="Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsContourRateSmoothed.tiff",
units="in", width=9, height=6, res=800)
ggplot(rolldata %>% filter(!is.na(admrate_roll)),
aes(x=date, y=agecont, z=admrate_roll))+
geom_contour_filled(colour="white")+
scale_x_date(name="")+
scale_y_continuous(name="Age")+
scale_fill_viridis_d(option="turbo", name="Daily admissions\nper 100,000",
labels=c("<5", "5+", "10+", "15+", "20+", "25+", "30+", "35+",
"40+", "45+", "50+"))+
theme_custom()+
theme(legend.position="top")+
guides(fill=guide_legend(nrow=1))+
labs(title="COVID admission rates are *much* lower than last winter",
subtitle="Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England",
caption="Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths")
dev.off()
#Bring in case data
caseurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp2 <- tempfile()
temp2 <- curl_download(url=caseurl, destfile=temp2, quiet=FALSE, mode="wb")
casedata <- read.csv(temp2) %>%
filter(!age %in% c("00_59", "60+", "unassigned")) %>%
select(date, age, cases) %>%
#Do some simplistic apportioning of cases to align with admissions age bands assuming equal
#distributions of cases within each band
spread(age, cases) %>%
rowwise() %>%
mutate(`0-5`=`00_04`+0.2*`05_09`,
`6-17`=0.8*`05_09`+`10_14`+0.6*`15_19`,
`18-24`=0.4*`15_19`+`20_24`,
`25-34`=`25_29`+`30_34`,
`35-44`=`35_39`+`40_44`,
`45-54`=`45_49`+`50_54`,
`55-64`=`55_59`+`60_64`,
`65-74`=`65_69`+`70_74`,
`75-84`=`75_79`+`80_84`,
`85+`=`85_89`+`90+`) %>%
ungroup() %>%
select(date, `0-5`, `6-17`, `18-24`, `25-34`, `35-44`, `45-54`, `55-64`, `65-74`, `75-84`, `85+`) %>%
gather(age, cases, c(2:11))
#Bring it all together
alldata <- data %>%
merge(casedata, all=TRUE) %>%
#Add in total rows
bind_rows(data %>% merge(casedata, all=TRUE) %>%
group_by(date) %>%
summarise(admissions=sum(admissions), pop=sum(pop), cases=sum(cases)) %>%
mutate(admrate=admissions*100000/pop, age="Total")) %>%
#Take rolling 7-day averages
group_by(age) %>%
arrange(date) %>%
mutate(casesroll=roll_mean(cases, 7, align="center", fill=NA),
caserate=cases*100000/pop,
caserateroll=roll_mean(caserate, 7, align="center", fill=NA),
admroll=roll_mean(admissions, 7, align="center", fill=NA),
admrateroll=roll_mean(admrate, 7, align="center", fill=NA)) %>%
#Lag cases by 8 days from hospitalisations. Rationale for 8 days lag is here:
#https://twitter.com/nicfreeman1209/status/1404915641728081921
mutate(lagcasesroll=lag(casesroll, 8),
lagcaserateroll=lag(caserateroll, 8)) %>%
ungroup() %>%
mutate(CHR=admrateroll/lagcaserateroll,
age=factor(age, levels=c("0-5", "6-17", "18-24", "25-34", "35-44", "45-54", "55-64", "65-74",
"75-84", "85+", "Total")))
agg_tiff("Outputs/COVIDCHROverall.tiff", units="in", width=10, height=6, res=500)
ggplot(alldata %>% filter(!is.na(CHR) & age=="Total"), aes(x=date, y=CHR))+
geom_line(colour="dodgerblue")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases admitted to hospital",
labels=label_percent(accuracy=1), limits=c(0,NA))+
theme_custom()+
labs(title="The proportion of COVID cases being admitted to hospital has been fairly steady recently",
subtitle="Rolling 7-day average COVID admission rate in English hospitals compared to the rolling 7-day average case rate,\nassuming an 8-day lag between testing positive and hospital admission",
caption="Data from NHS England and coronavirues.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCHRxAge.tiff", units="in", width=9, height=6, res=500)
ggplot(alldata %>% filter(!is.na(CHR) & age!="Total"), aes(x=date, y=CHR, colour=age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases admitted to hospital",
labels=label_percent(accuracy=1), limits=c(0,NA))+
scale_colour_paletteer_d("ggsci::default_gsea", name="Age")+
theme_custom()+
labs(title="The proportion of COVID cases being admitted to hospital varies a lot with age",
subtitle="Rolling 7-day average COVID admission rate in English hospitals compared to the rolling 7-day average case rate,\nassuming an 8-day lag between testing positive and hospital admission",
caption="Data from NHS England and coronavirues.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCHRxAgeFacets.tiff", units="in", width=9, height=6, res=500)
ggplot(alldata %>% filter(!is.na(CHR) & age!="Total"), aes(x=date, y=CHR, colour=age))+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases admitted to hospital",
labels=label_percent(accuracy=1), limits=c(0,NA))+
scale_colour_paletteer_d("ggsci::default_gsea", name="Age")+
facet_wrap(~age, scales="free_y")+
theme_custom()+
theme(axis.text.x=element_text(angle=45, hjust=1, vjust=1))+
labs(title="The proportion of COVID cases being admitted to hospital has fallen in older ages",
subtitle="Rolling 7-day average COVID admission rate in English hospitals compared to the rolling 7-day average case rate,\nassuming an 8-day lag between testing positive and hospital admission",
caption="Data from NHS England and coronavirues.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsStreamgraph.tiff", units="in", width=9, height=6, res=500)
ggplot(alldata %>% filter(!is.na(admroll) & age!="Total"),
aes(x=date, y=admroll, fill=age))+
geom_stream()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new hospital admissions", labels=abs)+
scale_fill_paletteer_d("ggsci::default_gsea", name="Age")+
theme_custom()+
labs(title="The average age of COVID patients admitted to hospital has risen since July",
subtitle="Rolling 7-day average of daily new hospital admissions with a positive COVID test, or patients in hospital testing positive,\nby age group in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsStreamgraphRecent.tiff", units="in", width=9, height=6, res=500)
ggplot(alldata %>% filter(!is.na(admroll) & age!="Total" & date>as.Date("2021-04-01")),
aes(x=date, y=admroll, fill=age))+
geom_stream()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new hospital admissions", labels=abs)+
scale_fill_paletteer_d("ggsci::default_gsea", name="Age")+
theme_custom()+
labs(title="The average age of COVID patients admitted to hospital has risen since July",
subtitle="Rolling 7-day average of daily new hospital admissions with a positive COVID test, or patients in hospital testing positive,\nby age group in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Calculate admission rate ratios
admratios <- alldata %>%
group_by(age) %>%
arrange(date) %>%
mutate(ratio=admroll/lag(admroll, 7)) %>%
filter(age!="Total" & !is.na(ratio))
agg_tiff("Outputs/COVIDAdmissionRatioHeatmapRecent.tiff", units="in", width=10, height=6, res=500)
ggplot(admratios %>% filter(date>as.Date("2021-05-01")))+
geom_tile(aes(x=date, y=age, fill=ratio))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("pals::warmcool", limit=c(0.249,4), direction=-1 ,
trans="log", breaks=c(0.25, 0.5, 1, 2, 4),
labels=c("-75%", "-50%", "No change", "+100%", "+300%"),
name="Change in cases in the past week")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID hospital admissions have fallen in all age groups",
subtitle="Weekly change in the rolling 7-day average number of new admissions with a positive COVID test, or people testing positive in hospital in England",
caption="Data from NHS England | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths")
dev.off()
#As a line graph
agg_tiff("Outputs/COVIDAdmissionsxAgeLine.tiff", units="in", width=9, height=6, res=500)
ggplot(alldata %>% filter(!is.na(admroll) & age!="Total" & date>as.Date("2021-05-01")),
aes(x=date, y=admroll, colour=age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new hospital admissions", labels=abs)+
scale_colour_paletteer_d("ggsci::default_gsea", name="Age")+
theme_custom()+
labs(title="The average age of COVID patients admitted to hospital has risen since July",
subtitle="Rolling 7-day average of daily new hospital admissions with a positive COVID test, or patients in hospital testing positive,\nby age group in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxAgeLineRate.tiff", units="in", width=9, height=6, res=500)
ggplot(alldata %>% filter(!is.na(admrateroll) & age!="Total" & date>as.Date("2021-05-01")),
aes(x=date, y=admrateroll, colour=age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new hospital admissions per 100,000", labels=abs)+
scale_colour_paletteer_d("ggsci::default_gsea", name="Age")+
theme_custom()+
labs(title="The average age of COVID patients admitted to hospital has risen since July",
subtitle="Rolling 7-day average of daily new hospital admissions with a positive COVID test, or patients in hospital testing positive,\nby age group in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Cases vs admissions
agg_tiff("Outputs/COVIDAdmissionsxCasesxAge.tiff", units="in", width=9, height=6, res=500)
ggplot(alldata %>% filter(!is.na(admrateroll)),
aes(x=caserateroll, y=admrateroll, colour=date))+
geom_path(show.legend=FALSE)+
scale_x_continuous(name="Daily cases per 100,000")+
scale_y_continuous(name="Daily new admissions per 100,000")+
scale_colour_paletteer_c("pals::ocean.ice", direction=-1)+
facet_wrap(~age, scales="free_y")+
theme_custom()+
labs(title="Older ages are seeing far fewer admissions per case, in younger ages it's less clear",
subtitle="Rolling 7-day average rates of new COVID cases and hospital admissions in England since October 2020.\nDarker colours represent more recent dates.",
caption="Data from UKHSA and NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDAdmissionsxAgeDashboard.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(ggstream)
library(extrafont)
library(paletteer)
library(RcppRoll)
library(ggrepel)
library(ragg)
library(scales)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Download admissions by age
#Nationally
source1 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumAdmissionsByAge&format=csv"
#Regionally
source2 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nhsRegion&metric=cumAdmissionsByAge&format=csv"
temp <- tempfile()
temp <- curl_download(url=source1, destfile=temp, quiet=FALSE, mode="wb")
natdata <- read.csv(temp)
temp <- curl_download(url=source2, destfile=temp, quiet=FALSE, mode="wb")
regdata <- read.csv(temp)
data <- bind_rows(natdata, regdata) %>%
mutate(date=as.Date(date)) %>%
group_by(areaName, age) %>%
arrange(date) %>%
mutate(admrate=rate-lag(rate, 1),
admissions=value-lag(value, 1),
age=gsub("_to_", "-", age),
age=factor(age, levels=c("0-5", "6-17", "18-64", "65-84", "85+")),
admrate_roll=roll_mean(admrate, 7, align="center", fill=NA),
peakrate=max(admrate_roll[date>as.Date("2020-10-01") & date%
ungroup() %>%
mutate(peakprop=admrate_roll/peakrate)
agg_tiff("Outputs/COVIDAdmissionsxAge.tiff", units="in", width=9, height=6, res=500)
ggplot(data %>% filter(areaName=="England"), aes(x=date, y=peakprop, colour=age))+
geom_hline(yintercept=1, linetype=2, colour="Grey80")+
geom_line(show.legend=FALSE)+
geom_text_repel(data=data %>% filter(date==max(date[!is.na(peakprop)]) & areaName=="England"),
aes(x=max(date[!is.na(peakprop)]), y=peakprop, label = age,
colour=age),
family = "Calibri", direction = "y", xlim = c(as.Date("2022-05-10"), NA),
hjust = 0, segment.color = NA, box.padding = .3, show.legend = FALSE)+
scale_x_date(name="", limits=c(NA_Date_, as.Date("2022-06-01")))+
scale_y_continuous(name="Proportion of January 2021 peak",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("awtools::a_palette")+
theme_custom()+
labs(title="COVID vaccinations are doing a great job of keeping older age groups out of hospital",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxAgeAbs.tiff", units="in", width=9, height=6, res=500)
ggplot(data %>% filter(areaName=="England"), aes(x=date, y=admrate_roll, colour=age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new admissions per 100,000")+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
theme_custom()+
labs(title="COVID admission rates are still highest in older age groups",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital)",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxAgexReg.tiff", units="in", width=9, height=6, res=500)
ggplot(data %>% filter(areaName!="England"), aes(x=date, y=peakprop, colour=age))+
geom_hline(yintercept=1, linetype=2, colour="Grey80")+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of January 2021 peak",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("awtools::a_palette")+
facet_wrap(~areaName)+
theme_custom()+
labs(title="The rise in COVID admissions in children isn't uniform across the country",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxAgexRegAbs.tiff", units="in", width=9, height=6, res=500)
ggplot(data %>% filter(areaName!="England"), aes(x=date, y=admrate_roll, colour=age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of January 2021 peak")+
scale_colour_paletteer_d("awtools::a_palette")+
facet_wrap(~areaName)+
theme_custom()+
labs(title="The rise in COVID admissions in children isn't uniform across the country",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxRegxAgeAbs.tiff", units="in", width=13, height=8, res=500)
ggplot(data %>% filter(areaName!="England"), aes(x=date, y=admrate_roll, colour=areaName))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of January 2021 peak")+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="")+
facet_wrap(~age, scales="free_y")+
theme_custom()+
theme(legend.position="top")+
labs(title="The rise in COVID admissions in children isn't uniform across the country",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
natdata %>% mutate(date=as.Date(date),
age=gsub("_to_", "-", age),
age=factor(age, levels=c("0-5", "6-17", "18-64", "65-84", "85+"))) %>%
group_by(age) %>%
arrange(date) %>%
mutate(newadm=value-lag(value, 1),
newadm_roll=roll_mean(newadm, 7, align="center", fill=NA)) %>%
ungroup() %>%
ggplot(aes(x=date, y=newadm_roll, fill=age))+
geom_col(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of admissions", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("awtools::a_palette", name="Age")+
theme_custom()
#Repeat for Omicron-specific analysis
data2 <- bind_rows(natdata, regdata) %>%
mutate(date=as.Date(date)) %>%
group_by(areaName, age) %>%
arrange(date) %>%
mutate(admrate=rate-lag(rate, 1),
admissions=value-lag(value, 1),
age=gsub("_to_", "-", age),
age=factor(age, levels=c("0-5", "6-17", "18-64", "65-84", "85+")),
admrate_roll=roll_mean(admrate, 7, align="center", fill=NA),
peakrate=max(admrate_roll[date>as.Date("2021-10-01") & date%
ungroup() %>%
mutate(peakprop=admrate_roll/peakrate)
agg_tiff("Outputs/COVIDAdmissionsxAgeOmi.tiff", units="in", width=9, height=6, res=500)
ggplot(data2 %>% filter(areaName=="England" & date>as.Date("2021-12-01")),
aes(x=date, y=peakprop, colour=age))+
geom_hline(yintercept=1, linetype=2, colour="Grey80")+
geom_line(show.legend=FALSE)+
geom_text_repel(data=data2 %>% filter(date==max(date[!is.na(peakprop)]) & areaName=="England"),
aes(x=max(date[!is.na(peakprop)]), y=peakprop, label = age,
colour=age),
family = "Calibri", direction = "y", xlim = c(as.Date("2022-07-03"), NA),
hjust = 0, segment.color = NA, box.padding = .3, show.legend = FALSE)+
scale_x_date(name="", limits=c(NA_Date_, as.Date("2022-07-15")))+
scale_y_continuous(name="Proportion of Omicron peak",
labels=label_percent(accuracy=1), limits=c(0,NA),
breaks=c(0,0.2,0.4,0.6,0.8,1,1.2, 1.4))+
scale_colour_paletteer_d("awtools::a_palette")+
theme_custom()+
labs(title="Hospital admissions in older age groups are close to the January peak",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2022",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_png("Outputs/COVIDAdmissionsxAgeAbsOmi.png", units="in", width=9, height=6, res=500)
ggplot(data2 %>% filter(areaName=="England" & date>as.Date("2021-12-01")),
aes(x=date, y=admrate_roll, colour=age))+
geom_line(show.legend=FALSE)+
geom_text_repel(data=data2 %>% filter(date==max(date[!is.na(admrate_roll)]) & areaName=="England"),
aes(x=max(date[!is.na(admrate_roll)]), y=admrate_roll, label = paste(age, "year olds"),
colour=age),
family = "Calibri", direction = "y", xlim = c(as.Date("2022-06-25"), NA),
hjust = 0, segment.color = NA, box.padding = .3, show.legend = FALSE)+
scale_x_date(name="", limits=c(as.Date("2021-12-01"), as.Date("2022-07-15")))+
scale_y_continuous(name="Daily new COVID admissions per 100,000")+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
theme_custom()+
labs(caption="Data from coronavirus.data.gov.uk | Plot by Colin Angus")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxAgeAbsOmiFacets.tiff", units="in", width=9, height=6, res=500)
ggplot(data2 %>% filter(areaName=="England" & date>as.Date("2021-12-01")),
aes(x=date, y=admrate_roll, colour=age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new admissions per 100,000", limits=c(0,NA))+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
theme_custom()+
facet_wrap(~age, scales="free_y")+
labs(title="COVID admission rates are falling rapidly",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital)",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxAgexRegOmi.tiff", units="in", width=9, height=6, res=500)
ggplot(data2 %>% filter(areaName!="England" & date>as.Date("2021-12-01")),
aes(x=date, y=peakprop, colour=age))+
geom_hline(yintercept=1, linetype=2, colour="Grey80")+
geom_line()+
scale_x_date(name="", limits=c(NA_Date_, as.Date("2022-03-15")))+
scale_y_continuous(name="Proportion of Omicron peak",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
facet_wrap(~areaName)+
theme_custom()+
labs(title="COVID admissions are rising across all regions and age groups",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxAgexRegAbsOmi.tiff", units="in", width=9, height=6, res=500)
ggplot(data2 %>% filter(areaName!="England" & date>as.Date("2021-12-01")),
aes(x=date, y=admrate_roll, colour=age))+
geom_line()+
scale_x_date(name="", limits=c(NA_Date_, as.Date("2022-03-10")))+
scale_y_continuous(name="Proportion of January 2022 peak")+
scale_colour_paletteer_d("awtools::a_palette")+
facet_wrap(~areaName)+
theme_custom()+
labs(title="The rise in COVID admissions in children isn't uniform across the country",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsxRegxAgeAbsOmi.tiff", units="in", width=13, height=8, res=500)
ggplot(data2 %>% filter(areaName!="England" & date>as.Date("2021-12-01")),
aes(x=date, y=admrate_roll, colour=areaName))+
geom_line()+
scale_x_date(name="", limits=c(NA_Date_, as.Date("2022-03-10")))+
scale_y_continuous(name="Daily new admissions")+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="")+
facet_wrap(~age, scales="free_y")+
theme_custom()+
theme(legend.position="top")+
labs(title="The rise in COVID admissions in children isn't uniform across the country",
subtitle="Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDAgeTrends.R
================================================
rm(list=ls())
library(tidyverse)
library(broom)
library(curl)
library(readxl)
library(lubridate)
library(RcppRoll)
library(ragg)
library(scales)
library(paletteer)
library(extrafont)
#Read in Case data
temp <- tempfile()
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data1 <- read.csv(temp) %>%
filter(!age %in% c("60+", "00_59")) %>%
select(date, age, cases) %>%
mutate(metric="Cases",
age=case_when(
age %in% c("00_04", "05_09", "10_14") ~ "0-14",
age %in% c("15_19", "20_24") ~ "15-24",
age %in% c("25_29", "30_34", "35_39", "40_44") ~ "25-44",
age %in% c("45_49", "50_54", "55_59", "60_64") ~ "45-64",
age %in% c("65_69", "70_74", "75_79") ~ "65-79",
age %in% c("80_84", "85-89", "90+") ~ "80+",
TRUE ~ "Unknown"),
date=as.Date(date)) %>%
group_by(date, age, metric) %>%
summarise(count=sum(cases))
#Read in 28 day deaths data
temp <- tempfile()
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newDeaths28DaysByDeathDateAgeDemographics&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data2 <- read.csv(temp) %>%
filter(!age %in% c("60+", "00_59")) %>%
select(date, age, deaths) %>%
mutate(metric="Deaths",
age=case_when(
age %in% c("00_04", "05_09", "10_14") ~ "0-14",
age %in% c("15_19", "20_24") ~ "15-24",
age %in% c("25_29", "30_34", "35_39", "40_44") ~ "25-44",
age %in% c("45_49", "50_54", "55_59", "60_64") ~ "45-64",
age %in% c("65_69", "70_74", "75_79") ~ "65-79",
age %in% c("80_84", "85-89", "90+") ~ "80+",
TRUE ~ "Unknown"),
date=as.Date(date)) %>%
group_by(date, age, metric) %>%
summarise(count=sum(deaths))
#Read in Admissions data
#Taken from https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-hospital-activity/
#Updated each Thursday (I think)
admrange <- "ET"
temp <- tempfile()
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/Covid-Publication-11-03-2021-Supplementary-Data.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data3 <- as.data.frame(t(read_excel(temp, range=paste0("D16:", admrange, "23"),
col_names=FALSE))) %>%
mutate(date=seq.Date(from=as.Date("2020-10-12"), length=nrow(.), by="day")) %>%
gather(age, count, c(1:8)) %>%
mutate(age=case_when(
age=="V1" ~ "0-5",
age=="V2" ~ "6-17",
age=="V3" ~ "18-54",
age=="V4" ~ "55-64",
age=="V5" ~ "65-74",
age=="V6" ~ "75-84",
age=="V7" ~ "85+",
TRUE ~ "Unknown"),
metric="Admissions")
#Read in less detailed but more regular admissions data from the dashboard
temp <- tempfile()
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumAdmissionsByAge&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data3.1 <- read.csv(temp) %>%
mutate(date=as.Date(date),
age=case_when(
age=="0_to_5" ~ "0-5",
age=="6_to_17" ~ "6-17",
age=="18_to_64" ~ "18-64",
age=="65_to_84" ~ "65-84",
TRUE ~ "85+"),
metric="Admissions2") %>%
group_by(age) %>%
arrange(date) %>%
mutate(count=value-lag(value, 1)) %>%
ungroup()
#Read in Hospital deaths data
#Taken from https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-daily-deaths/
#Updated daily
deathrange <- "NN"
temp <- tempfile()
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-total-announced-deaths-15-March-2021.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data4 <- as.data.frame(t(read_excel(temp, sheet="Tab3 Deaths by age",
range=paste0("E19:", deathrange, "24"),
col_names=FALSE))) %>%
mutate(date=seq.Date(from=as.Date("2020-03-01"), length=nrow(.), by="day")) %>%
gather(age, count, c(1:6)) %>%
mutate(age=case_when(
age=="V1" ~ "0-19",
age=="V2" ~ "20-39",
age=="V3" ~ "40-59",
age=="V4" ~ "60-79",
age=="V5" ~ "80+",
age=="V6" ~ "Unknown"),
metric="Hospital Deaths")
#Combine them all together
data <- bind_rows(data1, data2, data3, data3.1, data4)
#Take rolling 7-day averages
data <- data %>%
group_by(age, metric) %>%
arrange(date) %>%
mutate(count_roll=roll_mean(count, 7, align="center", fill=NA),
age=factor(age, levels=c("0-5", "0-14", "0-19", "6-17", "15-24", "18-54", "18-64", "20-39",
"25-44", "40-59", "45-64", "55-64", "60-79", "65-74",
"65-79", "65-84", "75-84", "80+", "85+", "Unknown")))
#Fit linear models
FitFrom <- as.Date("2021-01-21")
FitTo <- as.Date("2021-01-27")
models <- data %>%
filter(date>=FitFrom & date<=FitTo) %>%
mutate(daysfrom=as.numeric(difftime(date, FitFrom, units = "days"))) %>%
group_by(metric, age) %>%
do(tidy(lm(log(count_roll+0.5)~daysfrom, .))) %>%
select(1:4) %>%
spread(term, estimate) %>%
rename(intercept=`(Intercept)`, slope=daysfrom)
#Merge into case data
plot.data <- data %>%
filter(date>=FitFrom) %>%
merge(models) %>%
mutate(daysfrom=as.numeric(difftime(date, FitFrom, units = "days")),
baseline=exp(intercept+slope*daysfrom))
#Plot of cases
agg_tiff("Outputs/COVIDAgeEffects1Cases.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Cases" & age!="Unknown"))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily new cases (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in new COVID-19 cases",
subtitle=paste0("Rolling 7-day average of new COVID-19 cases by specimen date. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Plot of deaths within 28 days
agg_tiff("Outputs/COVIDAgeEffects2Deaths.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Deaths" & age!="Unknown"))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily deaths (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in COVID-19 deaths",
subtitle=paste0("Rolling 7-day average counts of deaths within 28 days of a positive COVID-19 test by date of death. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAgeEffects2DeathsReduced.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Deaths" & !age %in% c("Unknown", "0-14", "15-24")))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily deaths (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in COVID-19 deaths",
subtitle=paste0("Rolling 7-day average counts of deaths within 28 days of a positive COVID-19 test by date of death. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Plot of admissions
agg_tiff("Outputs/COVIDAgeEffects3Admissions.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Admissions" & age!="Unknown"))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily new admissions (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in new COVID-19 admissions",
subtitle=paste0("Rolling 7-day average of new hospital admissions with a positive COVID-19 test by admission date. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAgeEffects3AdmissionsReduced.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Admissions" & !age %in% c("Unknown", "0-5", "6-17")))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily new admissions (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in new COVID-19 admissions",
subtitle=paste0("Rolling 7-day average of new hospital admissions with a positive COVID-19 test by admission date. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Plot of admissions from dashboard data
agg_tiff("Outputs/COVIDAgeEffects3.1Admissions.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Admissions2" & age!="Unknown"))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily new admissions (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in new COVID-19 admissions",
subtitle=paste0("Rolling 7-day average of new hospital admissions with a positive COVID-19 test by admission date. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAgeEffects3.1AdmissionsReduced.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Admissions2" & !age %in% c("Unknown", "0-5", "6-17")))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily new admissions (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in new COVID-19 admissions",
subtitle=paste0("Rolling 7-day average of new hospital admissions with a positive COVID-19 test by admission date. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Plot of hospital deaths
agg_tiff("Outputs/COVIDAgeEffects4HopsDeaths.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Hospital Deaths" & age!="Unknown"))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily new cases (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in COVID-19 deaths in hospitals",
subtitle=paste0("Rolling 7-day average of COVID-19 deaths in hospitals by date of death. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAgeEffects4HopsDeathsReduced.tiff", units="in", width=10, height=7, res=500)
ggplot(subset(plot.data, metric=="Hospital Deaths" & !age %in% c("Unknown", "0-19", "20-39")))+
geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+
geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+
geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+
geom_point(aes(x=date, y=count), colour="Black", alpha=0.08)+
scale_x_date(name="")+
scale_y_continuous(trans="log", name="Daily new cases (log scale)",
labels=number_format(accuracy=1))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
facet_wrap(~age, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(),
strip.text=element_text(face="bold"),
plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Age-specific trends in COVID-19 deaths in hospitals",
subtitle=paste0("Rolling 7-day average of COVID-19 deaths in hospitals by date of death. Grey dots reflect daily data.\nTrend line fitted between ", FitFrom, " to ", FitTo),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDBivariateCasesxIMD.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(sf)
library(paletteer)
library(ukcovid19)
library(readxl)
library(cowplot)
library(lubridate)
########
#London#
########
#Call MSOA level case data from coronavirus.data.gov.uk
temp <- tempfile()
source <- ("https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
casedata <- read_csv(temp)
#Download MSOA shapefile
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE)[,c(1,2,5,6)]
colnames(IMD) <- c("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
temp <- tempfile()
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, RGN11NM) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read_excel(file.path(temp2, "SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx"),
sheet="Mid-2019 Persons", range="A6:G34758", col_names=FALSE)[,c(1,7)]
colnames(pop) <- c("LSOA11CD", "pop")
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop)) %>%
ungroup() %>%
#Then merge into COVID case data
merge(casedata %>% filter(date==max(date)), by.x="MSOA11CD", by.y="areaCode", all=TRUE) %>%
rename(msoa11cd=MSOA11CD)
#Join with map
mapdata <- full_join(shapefile, IMD_MSOA)
#Map of Deprivation
mapdata %>%
filter(regionName=="London") %>%
ggplot()+
geom_sf(aes(fill=max(IMDrank)-IMDrank, geometry=geometry), colour=NA)+
scale_fill_paletteer_c("pals::ocean.matter", name="Deprivation\n(darker = more deprived)",
limits=c(0,NA), direction=-1)+
theme_void()
#Map of Deprivation
mapdata %>%
filter(regionName=="London") %>%
ggplot()+
geom_sf(aes(fill=newCasesBySpecimenDateRollingRate, geometry=geometry), colour=NA)+
scale_fill_paletteer_c("pals::ocean.deep", name="New cases\nper 100,000",
limits=c(0,NA), direction=-1)+
theme_void()
#Scatter plot
tiff("Outputs/COVIDLondonCasesScatter.tiff", units="in", width=8, height=6, res=300)
mapdata %>%
filter(regionName=="London") %>%
ggplot(aes(x=newCasesBySpecimenDateRollingRate, y=max(IMDrank)-IMDrank))+
geom_point(colour="#c51b8a")+
geom_smooth(method="lm", formula=y~x)+
scale_x_continuous(name="New COVID-19 cases per 100,000 in the past week", limits=c(0,NA))+
scale_y_continuous(name="Deprivation (higher = more deprived)")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="There are more COVID-19 cases in deprived parts of London",
subtitle="Rolling 7-day rate of new cases plotted against the Index of Multiple Deprivation for MSOAs in London",
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")
dev.off()
#Bivariate map
BVmapdata <- mapdata %>%
filter(regionName=="London") %>%
mutate(IMDtert=quantcut(-IMDrank, q=4, labels=FALSE),
casetert=quantcut(newCasesBySpecimenDateRollingRate, q=4, labels=FALSE))
#Generate key
#Colours inspired by @jscarto's post here:
#https://www.joshuastevens.net/cartography/make-a-bivariate-choropleth-map/
keydata <- data.frame(IMDtert=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4),
casetert=c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4),
RGB=c("#e8e8e8","#b9dddd","#89d3d3","#5ac8c8",
"#dabcd4","#acb2ca","#7ea8c1","#509eb7",
"#cc90c0","#9f86b7","#727dae","#4573a5",
"#be64ac","#925ba4","#67529c","#3b4994"))
#Bring colours into main data for plotting
BVmapdata <- left_join(BVmapdata, keydata, by=c("IMDtert", "casetert"))
#Bivariate map
BVmap <- BVmapdata %>%
filter(regionName=="London") %>%
ggplot()+
geom_sf(aes(fill=RGB, geometry=geometry), colour=NA)+
scale_fill_identity()+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2)))+
labs(title="In London, more deprived areas have more COVID-19 cases",
subtitle="Rolling 7-day average rates of new cases compared to Index of Multiple Deprivation ranks for Middle Super Output Areas (MSOAs)",
cation="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")+
annotate("text", x=545000, y=199000, label="High deprivation,\nhigh cases", size=4)+
annotate("text", x=515000, y=198000, label="High deprivation,\nlow cases", size=4)+
annotate("text", x=561000, y=180000, label="Low deprivation,\nhigh cases", size=4)+
annotate("text", x=507000, y=167000, label="Low deprivation,\nlow cases", size=4)+
geom_curve(aes(x=541500, y=198800, xend=537000, yend=199000), curvature=-0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=559000, y=181300, xend=556000, yend=185000), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=518000, y=197000, xend=534000, yend=187600), curvature=-0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=510000, y=166500, xend=516500, yend=169000), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))
#Bivariate key
key <- ggplot(keydata)+
geom_tile(aes(x=casetert, y=IMDtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("More COVID-19 cases" %->% ""),
y = expression("Greater deprivation" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
#Final plot
tiff("Outputs/COVIDLondonCasesxIMD.tiff", units="in", width=12, height=8, res=300)
ggdraw()+
draw_plot(BVmap, 0,0,1,1)+
draw_plot(key, 0.68,0.05,0.3,0.3)
dev.off()
#########
#Glasgow#
#########
#Call Intermediate Zone level case data from https://www.opendata.nhs.scot/dataset/covid-19-in-scotland
temp <- tempfile()
source <- ("https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/8906de12-f413-4b3f-95a0-11ed15e61773/download/trend_iz_20210111.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
casedata.s <- read_csv(temp, col_types="cccccicicc") %>%
mutate(date=ymd(Date),
caserate=Positive7Day*100000/Population) %>%
select(date, IntZone, IntZoneName, CA, CAName, caserate) %>%
#keep only the latest day's data
filter(date==max(date)) %>%
mutate(region=if_else(CAName %in% c("East Dunbartonshire", "East renfrewshire",
"Glasgow City", "Inverclyde", "Renfrewshire",
"West Dunbartonshire"), "Glasgow", ""))
#Bring in SIMD data (at datazone level)
temp <- tempfile()
source <- ("https://www.gov.scot/binaries/content/documents/govscot/publications/statistics/2020/01/scottish-index-of-multiple-deprivation-2020-ranks-and-domain-ranks/documents/scottish-index-of-multiple-deprivation-2020-ranks-and-domain-ranks/scottish-index-of-multiple-deprivation-2020-ranks-and-domain-ranks/govscot%3Adocument/SIMD%2B2020v2%2B-%2Branks.xlsx?forceDownload=true")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
SIMD <- read_excel(temp, sheet=2, range="A1:F6977")
#Bring in DZ to IZ lookup
temp <- tempfile()
source <- ("http://statistics.gov.scot/downloads/file?id=2a2be2f0-bf5f-4e53-9726-7ef16fa893b7%2FDatazone2011lookup.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
DZIZlookup <- read.csv(temp) %>%
select(DZ2011_Code, IZ2011_Code) %>%
rename(Data_Zone=DZ2011_Code, IntZone=IZ2011_Code)
#Merge into SIMD data
SIMD_IZ <- SIMD %>%
merge(DZIZlookup) %>%
group_by(IntZone) %>%
summarise(SIMDrank=weighted.mean(SIMD2020v2_Rank, Total_population)) %>%
ungroup() %>%
#Merge into case data
merge(casedata.s)
#Get IZ boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "http://sedsh127.sedsh.gov.uk/Atom_data/ScotGov/ZippedShapefiles/SG_IntermediateZoneBdry_2011.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
shapefile.s <- st_read(file.path(temp2, "SG_IntermediateZone_Bdry_2011.shp"))
mapdata.s <- full_join(shapefile.s, SIMD_IZ, by=c("InterZone"="IntZone"))
#Map of Deprivation
mapdata.s %>%
filter(region=="Glasgow") %>%
ggplot()+
geom_sf(aes(fill=max(SIMDrank)-SIMDrank, geometry=geometry), colour=NA)+
scale_fill_paletteer_c("pals::ocean.matter", name="Deprivation\n(darker = more deprived)",
limits=c(0,NA), direction=-1)+
theme_void()
#Map of Deprivation
mapdata.s %>%
filter(region=="Glasgow") %>%
ggplot()+
geom_sf(aes(fill=caserate, geometry=geometry), colour=NA)+
scale_fill_paletteer_c("pals::ocean.deep", name="New cases\nper 100,000",
limits=c(0,NA), direction=-1)+
theme_void()
#Scatter plot
tiff("Outputs/COVIDGlasgowCasesScatter.tiff", units="in", width=10, height=7, res=300)
mapdata.s %>%
filter(region=="Glasgow") %>%
ggplot(aes(x=caserate, y=max(SIMDrank)-SIMDrank))+
geom_point(colour="#c51b8a")+
geom_smooth(method="lm", formula=y~x)+
scale_x_continuous(name="New COVID-19 cases per 100,000 in the past week", limits=c(0,NA))+
scale_y_continuous(name="Deprivation (higher = more deprived)")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="There are more COVID-19 cases in deprived parts of Glasgow",
subtitle="Rolling 7-day rate of new cases plotted against the Index of Multiple Deprivation for Intermediate Zones in Greater Glasgow",
caption="Data from PHS, Scottish Government | Plot by @VictimOfMaths")
dev.off()
#Bivariate map
BVmapdata.s <- mapdata.s %>%
filter(region=="Glasgow") %>%
mutate(SIMDtert=quantcut(-SIMDrank, q=4, labels=FALSE),
casetert=quantcut(caserate, q=4, labels=FALSE))
#Generate key
keydata.s <- data.frame(SIMDtert=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4),
casetert=c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4),
RGB=c("#e8e8e8","#b9dddd","#89d3d3","#5ac8c8",
"#dabcd4","#acb2ca","#7ea8c1","#509eb7",
"#cc90c0","#9f86b7","#727dae","#4573a5",
"#be64ac","#925ba4","#67529c","#3b4994"))
#Bring colours into main data for plotting
BVmapdata.s <- left_join(BVmapdata.s, keydata.s, by=c("SIMDtert", "casetert"))
#Bivariate map
BVmap.s <- BVmapdata.s %>%
filter(region=="Glasgow") %>%
ggplot()+
geom_sf(aes(fill=RGB, geometry=geometry), colour=NA)+
scale_fill_identity()+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2)))+
labs(title="In Glasgow, the most deprived areas generally have more COVID-19 cases",
subtitle="Rolling 7-day rate of new cases plotted against the Index of Multiple Deprivation for Intermediate Zones",
cation="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")+
annotate("text", x=273000, y=670000, label="High deprivation,\nhigh cases", size=4)+
annotate("text", x=268000, y=658000, label="High deprivation,\nlow cases", size=4)+
annotate("text", x=227000, y=657000, label="Low deprivation,\nhigh cases", size=4)+
annotate("text", x=251000, y=684000, label="Low deprivation,\nlow cases", size=4)+
geom_curve(aes(x=272200, y=668800, xend=269300, yend=666000), curvature=-0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=265400, y=659300, xend=259100, yend=662700), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=229000, y=658300, xend=231000, yend=661000), curvature=-0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))+
geom_curve(aes(x=251500, y=682700, xend=252300, yend=677000), curvature=0.15,
arrow=arrow(length=unit(0.1, "cm"), type="closed"))
#Bivariate key
key.s <- ggplot(keydata)+
geom_tile(aes(x=casetert, y=SIMDtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("More COVID-19 cases" %->% ""),
y = expression("Greater deprivation" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
#Final plot
tiff("Outputs/COVIDGlasgowCasesxIMD.tiff", units="in", width=12, height=8, res=300)
ggdraw()+
draw_plot(BVmap.s, 0,0,1,1)+
draw_plot(key.s, 0.03,0.6,0.3,0.3)
dev.off()
================================================
FILE: Heatmaps/COVIDBivariateCasesxVax.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(sf)
library(gtools)
library(extrafont)
library(cowplot)
library(ragg)
library(paletteer)
library(scales)
library(readxl)
#Read in MSOA-level case data from the dashboard
caseurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingSum&format=csv"
cases <- tempfile()
cases <- curl_download(url=caseurl, destfile=cases, quiet=FALSE, mode="wb")
casedata <- read.csv(cases) %>%
mutate(date=as.Date(date)) %>%
filter(date==max(date)) %>%
rename(cases=newCasesBySpecimenDateRollingSum, msoa11cd=areaCode) %>%
select(cases, msoa11cd)
#Read in vaccination data
#Download vaccination data by MSOA
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/
vax <- tempfile()
vaxurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-10-June-2021.xlsx"
vax <- curl_download(url=vaxurl, destfile=vax, quiet=FALSE, mode="wb")
vaxdata <- read_excel(vax, sheet="MSOA", range="F16:S6806", col_names=FALSE) %>%
set_names(c("msoa11cd", "msoa11nm", "<30", "30-34", "35-39", "40-44", "45-49", "50-54",
"55-59", "60-64", "65-69", "70-74", "75-79", "80+")) %>%
gather(age, vaccinated, c(3:14))
pop2 <- read_excel(vax, sheet="Population estimates (NIMS)", range="U16:AI6806", col_names=FALSE) %>%
select(-c(2,3)) %>%
set_names(c("msoa11cd", "<30", "30-34", "35-39", "40-44", "45-49", "50-54",
"55-59", "60-64", "65-69", "70-74", "75-79", "80+")) %>%
gather(age, pop, c(2:13)) %>%
group_by(msoa11cd, age) %>%
summarise(pop=sum(pop)) %>%
ungroup()
#COMBINE and calculate age-standardised vax rates
combineddata <- merge(vaxdata, pop2) %>%
mutate(vaxprop=vaccinated/pop) %>%
select(-c(vaccinated, pop)) %>%
spread(age, vaxprop) %>%
mutate(asrate=((`<30`*(0.8*5500+6000+6000)+`30-34`*6500+
`35-39`*7000+`40-44`*7000+`45-49`*7000+`50-54`*7000+`55-59`*6500+
`60-64`*6000+`65-69`*5500+`70-74`*5000+`75-79`*4000+
`80+`*5000)/82900)) %>%
merge(casedata, all=TRUE) %>%
merge(pop2 %>% group_by(msoa11cd) %>% summarise(pop=sum(pop)) %>% ungroup()) %>%
mutate(caserate=cases*100000/pop)
ggplot(combineddata, aes(x=caserate, y=asrate))+
geom_point()
#Download Carl Baker's lovely cartogram
msoa <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
msoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode="wb")
BackgroundMSOA <- st_read(msoa, layer="5 Background")
MSOA <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(combineddata, by="msoa11cd")
GroupsMSOA <- st_read(msoa, layer="2 Groups")
Group_labelsMSOA <- st_read(msoa, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAsMSOA <- st_read(msoa, layer="3 Local authority outlines (2019)")
#Option 1
#Remove missing MSOAs and calculate tertiles
MSOAv1 <- MSOA %>%
filter(!is.na(caserate)) %>%
mutate(casetert=quantcut(caserate, q=3, labels=FALSE),
vaxtert=quantcut(asrate, q=3, labels=FALSE),
key=case_when(
casetert==1 & vaxtert==1 ~ 1,
casetert==1 & vaxtert==2 ~ 2,
casetert==1 & vaxtert==3 ~ 3,
casetert==2 & vaxtert==1 ~ 4,
casetert==2 & vaxtert==2 ~ 5,
casetert==2 & vaxtert==3 ~ 6,
casetert==3 & vaxtert==1 ~ 7,
casetert==3 & vaxtert==2 ~ 8,
TRUE ~ 9),
fillcolour=case_when(
key==1 ~ "#f0f0f0", key==2 ~ "#a0dcdd", key==3 ~ "#00cfc1",
key==4 ~ "#ffa2aa", key==5 ~ "#afa7b7", key==6 ~ "#44b4cb",
key==7 ~ "#ff3968", key==8 ~ "#c066b2", TRUE ~ "#6d87cc"))
#Option 2
#Have all missing MSOAs as a single category and calculate tertiles
temp <- MSOA %>%
filter(is.na(caserate) & RegionNation!="Wales") %>%
mutate(casetert=1)
MSOAv2 <- MSOA %>%
filter(!is.na(caserate)) %>%
mutate(casetert=quantcut(caserate, q=2, labels=FALSE)+1) %>%
bind_rows(temp) %>%
mutate(vaxtert=quantcut(asrate, q=3, labels=FALSE),
key=case_when(
casetert==1 & vaxtert==1 ~ 1,
casetert==1 & vaxtert==2 ~ 2,
casetert==1 & vaxtert==3 ~ 3,
casetert==2 & vaxtert==1 ~ 4,
casetert==2 & vaxtert==2 ~ 5,
casetert==2 & vaxtert==3 ~ 6,
casetert==3 & vaxtert==1 ~ 7,
casetert==3 & vaxtert==2 ~ 8,
TRUE ~ 9),
fillcolour=case_when(
key==1 ~ "#f0f0f0", key==2 ~ "#a0dcdd", key==3 ~ "#00cfc1",
key==4 ~ "#ffa2aa", key==5 ~ "#afa7b7", key==6 ~ "#44b4cb",
key==7 ~ "#ff3968", key==8 ~ "#c066b2", TRUE ~ "#6d87cc"))
#generate dataframe for key
keydata <- MSOAv2 %>%
filter(!is.na(fillcolour)) %>%
group_by(casetert, vaxtert) %>%
summarise(RGB=unique(fillcolour))
key <- ggplot(keydata)+
geom_tile(aes(x=casetert, y=vaxtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("More COVID cases" %->% ""),
y = expression("Higher vaccination rates" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank(),
text=element_text(family="Lato"))+
# quadratic tiles
coord_fixed()
plot <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOAv2,
aes(geometry=geom, fill=fillcolour), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black", family="Lato")+
scale_fill_identity(na.value="Black")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.title.position = "panel")+
annotate("text", x=55.5, y=14, label="Fewer cases,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=53, y=14, xend=47.8, yend=14.5), curvature=0.15)+
annotate("text", x=15, y=10, label="Fewer cases,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=16, y=9, xend=19.7, yend=5), curvature=0.2)+
annotate("text", x=51, y=35, label="More cases,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=47.5, y=34, xend=43.8, yend=34.5), curvature=-0.2)+
annotate("text", x=24, y=54, label="More cases,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=26, y=52.8, xend=31.3, yend=50.4), curvature=0.1)+
labs(title="Comparing COVID-19 case rates and vaccine coverage",
subtitle="Rolling 7-day rate of new COVID cases and age-standardised rates of delivery of at least one vaccine dose.\nCase rates are censored for areas with fewer than 3 cases, which currently covers the majority of areas.\nAs a result there are considerably more areas in the lowest category of case rates.",
caption="Data from coronavirus.data.gov.uk and NHS England, cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
#agg_png("Outputs/COVIDBivariateCasesVax.png", units="in", width=8, height=10, res=800)
agg_tiff("Outputs/COVIDBivariateCasesVax.tiff", units="in", width=8, height=10, res=800)
ggdraw()+
draw_plot(plot, 0,0,1,1)+
draw_plot(key, 0.66,0.66,0.28,0.28)
dev.off()
#Repeat for cumulative infection rates
casedata.full <- read.csv(cases) %>%
mutate(date=as.Date(date)) %>%
rename(cases=newCasesBySpecimenDateRollingSum, msoa11cd=areaCode) %>%
select(cases, date, msoa11cd) %>%
group_by(msoa11cd) %>%
summarise(cases=sum(cases)) %>%
ungroup()
casedata.full <- merge(vaxdata, pop2) %>%
mutate(vaxprop=vaccinated/pop) %>%
select(-c(vaccinated, pop)) %>%
spread(age, vaxprop) %>%
mutate(asrate=(`<30`*(0.8*5500+6000+6000)+`30-34`*6500+
`35-39`*7000+`40-44`*7000+`45-49`*7000+`50-54`*7000+`55-59`*6500+
`60-64`*6000+`65-69`*5500+`70-74`*5000+`75-79`*4000+
`80+`*5000)/82900) %>%
merge(casedata.full, all=TRUE) %>%
merge(pop2 %>% group_by(msoa11cd) %>% summarise(pop=sum(pop)) %>% ungroup()) %>%
mutate(caserate=cases*100000/pop,
caseprop=cases/pop,
casetert=quantcut(caserate, q=3, labels=FALSE),
vaxtert=quantcut(asrate, q=3, labels=FALSE),
key=case_when(
casetert==1 & vaxtert==1 ~ 1,
casetert==1 & vaxtert==2 ~ 2,
casetert==1 & vaxtert==3 ~ 3,
casetert==2 & vaxtert==1 ~ 4,
casetert==2 & vaxtert==2 ~ 5,
casetert==2 & vaxtert==3 ~ 6,
casetert==3 & vaxtert==1 ~ 7,
casetert==3 & vaxtert==2 ~ 8,
TRUE ~ 9),
fillcolour=case_when(
key==1 ~ "#f0f0f0", key==2 ~ "#a0dcdd", key==3 ~ "#00cfc1",
key==4 ~ "#ffa2aa", key==5 ~ "#afa7b7", key==6 ~ "#44b4cb",
key==7 ~ "#ff3968", key==8 ~ "#c066b2", TRUE ~ "#6d87cc"))
MSOA.full <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(casedata.full, by="msoa11cd")
#Plot cumulative attack rates across the pandemic
agg_tiff("Outputs/COVIDCasesMSOACumul.tiff", units="in", width=8, height=10, res=800)
ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA.full%>% filter(RegionNation!="Wales"),
aes(geometry=geom, fill=caseprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black", family="Roboto")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1, name="Cumulative\ninfection rate",
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Merriweather"), plot.margin=margin(0,10,0,10))+
labs(title="Cumulative COVID infection rates across the pandemic",
subtitle="Total COVID case rates since March 2020 in English Middle Super Output Areas.\nThe case rate figures are conservative as they exclude weeks with low numbers of cases. ",
caption="Data from coronavirus.data.gov.uk and NHS England, cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
dev.off()
plot.full <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA.full,
aes(geometry=geom, fill=fillcolour), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black", family="Lato")+
scale_fill_identity(na.value="Black")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.title.position = "panel")+
annotate("text", x=55.5, y=14, label="Fewer cases,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=53, y=14, xend=43.1, yend=13.6), curvature=0.15)+
annotate("text", x=15, y=10, label="Fewer cases,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=16, y=9, xend=20, yend=5), curvature=0.2)+
annotate("text", x=51, y=35, label="More cases,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=47.5, y=34, xend=39.9, yend=34.5), curvature=-0.2)+
annotate("text", x=19, y=43, label="More cases,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=19.5, y=41.5, xend=22.5, yend=35.4), curvature=0.1)+
labs(title="Comparing total COVID-19 case rates across the pandemic \nwith current vaccine coverage",
subtitle="Total COVID case rates since March 2020 and age-standardised rates of delivery of at least one vaccine dose.\nThe case rate figures are conservative as they exclude weeks with low numbers of cases and cases where\nindividuals did not get tested. This is particularly likely to underestimate case rates during the first wave,\nwhen testing was limited",
caption="Data from coronavirus.data.gov.uk and NHS England, cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
key.full <- ggplot(keydata)+
geom_tile(aes(x=casetert, y=vaxtert, fill=RGB))+
scale_fill_identity()+
scale_x_continuous(breaks=c(1,2,3), labels=c("<6%", "6%", ">6%"))+
scale_y_continuous(breaks=c(1,2,3), labels=c("<55%", "55-57%", ">57%"))+
labs(x = "Overall COVID incidence",
y = "Adult vaccination rates") +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), text=element_text(family="Lato"))+
# quadratic tiles
coord_fixed()
agg_tiff("Outputs/COVIDBivariateCasesVaxFull.tiff", units="in", width=8, height=10, res=800)
ggdraw()+
draw_plot(plot.full, 0,0,1,1)+
draw_plot(key.full, 0.66,0.64,0.28,0.28)
dev.off()
#Read in James Ward's estimated attack rate data
JWMSOAEst <- read.csv("Data/MSOAAttackRates.csv") %>%
rename(msoa11cd=MSOA.Code, attackrate=Estimated.Attack.Rate.to.8.3.21) %>%
mutate(attackrate=as.numeric(gsub("%", "", attackrate)))
casedata2 <- read.csv(cases) %>%
mutate(date=as.Date(date)) %>%
rename(cases=newCasesBySpecimenDateRollingSum, msoa11cd=areaCode) %>%
select(cases, date, msoa11cd) %>%
filter(date>as.Date("2021-03-10")) %>%
group_by(msoa11cd) %>%
summarise(cases=sum(cases)) %>%
ungroup() %>%
merge(JWMSOAEst, all=TRUE) %>%
mutate(cases=if_else(is.na(cases), 0, as.numeric(cases)))
casedata3 <- merge(vaxdata, pop2) %>%
mutate(vaxprop=vaccinated/pop) %>%
select(-c(vaccinated, pop)) %>%
spread(age, vaxprop) %>%
mutate(asrate=(`<30`*(0.8*5500+6000+6000)+`30-34`*6500+
`35-39`*7000+`40-44`*7000+`45-49`*7000+`50-54`*7000+`55-59`*6500+
`60-64`*6000+`65-69`*5500+`70-74`*5000+`75-79`*4000+
`80+`*5000)/82900) %>%
merge(casedata2, all=TRUE) %>%
merge(pop2 %>% group_by(msoa11cd) %>% summarise(pop=sum(pop)) %>% ungroup()) %>%
mutate(caserate=cases/pop,
caseprop=caserate+attackrate,
casetert=quantcut(caseprop, q=3, labels=FALSE),
vaxtert=quantcut(asrate, q=3, labels=FALSE),
key=case_when(
casetert==1 & vaxtert==1 ~ 1,
casetert==1 & vaxtert==2 ~ 2,
casetert==1 & vaxtert==3 ~ 3,
casetert==2 & vaxtert==1 ~ 4,
casetert==2 & vaxtert==2 ~ 5,
casetert==2 & vaxtert==3 ~ 6,
casetert==3 & vaxtert==1 ~ 7,
casetert==3 & vaxtert==2 ~ 8,
TRUE ~ 9),
fillcolour=case_when(
key==1 ~ "#f0f0f0", key==2 ~ "#a0dcdd", key==3 ~ "#00cfc1",
key==4 ~ "#ffa2aa", key==5 ~ "#afa7b7", key==6 ~ "#44b4cb",
key==7 ~ "#ff3968", key==8 ~ "#c066b2", TRUE ~ "#6d87cc"))
MSOA2 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(casedata3, by="msoa11cd")
#Plot cumulative attack rates across the pandemic
agg_tiff("Outputs/COVIDCasesMSOACumulEst.tiff", units="in", width=8, height=10, res=800)
ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA2%>% filter(RegionNation!="Wales"),
aes(geometry=geom, fill=caseprop/100), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black", family="Roboto")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1, name="Cumulative\ninfection rate",
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.margin=margin(0,10,0,10))+
labs(title="Cumulative COVID infection rates across the pandemic",
subtitle="Total estimated COVID case rates since March 2020 in English Middle Super Output Areas.\nCase rate figures estimated by James Ward accounting for underreporting in official testing figures.",
caption="Data from James Ward (@JamesWard73), cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
dev.off()
plot.full <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA2,
aes(geometry=geom, fill=fillcolour), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black", family="Lato")+
scale_fill_identity(na.value="Black")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.title.position = "panel")+
annotate("text", x=55.5, y=14, label="More cases,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=53, y=14, xend=48.5, yend=14.2), curvature=0.15)+
annotate("text", x=15, y=10, label="Fewer cases,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=16, y=9, xend=19.9, yend=4.4), curvature=0.2)+
annotate("text", x=52, y=33, label="Fewer cases,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=49.5, y=33.3, xend=45.3, yend=31.8), curvature=0.2)+
annotate("text", x=19, y=43, label="More cases,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=19.5, y=41.5, xend=23, yend=36.6), curvature=0.1)+
labs(title="Comparing total COVID-19 infection rates across the pandemic \nwith current vaccine coverage",
subtitle="Estimated cumulative COVID infection rates, accounting for underrecording in official testing data\nand how this varied over time, compared against age-standardised rates of delivery of at least one vaccine dose",
caption="Data from James Ward (@JamesWard73), cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
key.full <- ggplot(keydata)+
geom_tile(aes(x=casetert, y=vaxtert, fill=RGB))+
scale_fill_identity()+
scale_x_continuous(breaks=c(1,2,3), labels=c("<19%", "19-26%", ">26%"))+
scale_y_continuous(breaks=c(1,2,3), labels=c("<55%", "55-57%", ">57%"))+
labs(x = "Overall COVID incidence",
y = "Adult vaccination rates") +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), text=element_text(family="Lato"))+
# quadratic tiles
coord_fixed()
agg_tiff("Outputs/COVIDBivariateCasesVaxFullEst.tiff", units="in", width=8, height=10, res=800)
ggdraw()+
draw_plot(plot.full, 0,0,1,1)+
draw_plot(key.full, 0.66,0.64,0.28,0.28)
dev.off()
================================================
FILE: Heatmaps/COVIDBoosters.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(scales)
library(extrafont)
library(ragg)
library(lubridate)
library(readxl)
options(scipen=10000)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Download vaccination data from NHS England website
#Daily data (includes boosters)
dailyurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-20-October-2021.xlsx"
temp <- tempfile()
temp <- curl_download(url=dailyurl, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-19"), Region=if_else(Region=="England4", "England", Region))
dailydata.age <- read_excel(temp, sheet=2, range="B15:F28", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-19"))
daily19th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-19-October-2021.xlsx"
temp <- curl_download(url=daily19th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-18"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-18")))
daily18th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-18-October-2021.xlsx"
temp <- curl_download(url=daily18th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-17"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-17")))
daily17th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-17-October-2021.xlsx"
temp <- curl_download(url=daily17th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-16"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-16")))
daily16th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-16-October-2021.xlsx"
temp <- curl_download(url=daily16th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-15"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B15:F28", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-15")))
daily15th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-15-October-2021.xlsx"
temp <- curl_download(url=daily15th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-14"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B15:F28", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-14")))
daily14th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-14-October-2021.xlsx"
temp <- curl_download(url=daily14th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-13"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-13")))
daily13th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-13-October-2021.xlsx"
temp <- curl_download(url=daily13th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-12"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-12")))
daily12th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-12-October-2021.xlsx"
temp <- curl_download(url=daily12th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-11"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B15:F28", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-11")))
daily11th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-11-October-2021.xlsx"
temp <- curl_download(url=daily11th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-10"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-10")))
daily10th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-10-October-2021.xlsx"
temp <- curl_download(url=daily10th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-09"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B15:F28", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-09")))
daily9th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-09-October-2021.xlsx"
temp <- curl_download(url=daily9th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-08"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-08")))
daily8th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-08-October-2021.xlsx"
temp <- curl_download(url=daily8th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-07"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B15:F28", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-07")))
daily7th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-07-October-2021.xlsx"
temp <- curl_download(url=daily7th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-06"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-06")))
daily6th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-06-October-2021.xlsx"
temp <- curl_download(url=daily6th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-05"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-05")))
daily5th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-05-October-2021.xlsx"
temp <- curl_download(url=daily5th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-04"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-04")))
daily4th <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-04-October-2021.xlsx"
temp <- curl_download(url=daily4th, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-03"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-03")))
daily3rd <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-03-October-2021.xlsx"
temp <- curl_download(url=daily3rd, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-02"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B15:F28", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-02")))
daily2nd <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-02-October-2021.xlsx"
temp <- curl_download(url=daily2nd, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-01"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-10-01")))
daily1st <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-01-October-2021.xlsx"
temp <- curl_download(url=daily1st, destfile=temp, quiet=FALSE, mode="wb")
dailydata.region <- dailydata.region %>%
bind_rows(read_excel(temp, sheet=1, range="B14:F22", col_names=FALSE) %>%
select(1,5) %>%
filter(complete.cases(.)) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-09-30"), Region=if_else(Region=="England4", "England", Region)))
dailydata.age <- dailydata.age %>%
bind_rows(read_excel(temp, sheet=2, range="B16:F29", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Age", "Booster"))%>%
mutate(date=as.Date("2021-09-30")))
#Calculate daily boosters by age and region
final.region <- dailydata.region %>%
group_by(Region) %>%
arrange(date) %>%
mutate(newBoosters=Booster-lag(Booster, 1)) %>%
ungroup()
final.age <- dailydata.age %>%
group_by(Age) %>%
arrange(date) %>%
mutate(newBoosters=Booster-lag(Booster, 1)) %>%
ungroup() %>%
mutate(Age=factor(Age, levels=c("Under 18", "18-24", "25-29", "30-34", "35-39", "40-44", "45-49", "50-54",
"55-59", "60-64", "65-69", "70-74", "75-79", "80+")))
ggplot(final.region %>% filter(Region!="England"), aes(x=date, y=newBoosters, colour=Region))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(limits=c(0,NA), name="Booster jabs delivered per day")+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
theme_custom()
ggplot(final.age, aes(x=date, y=newBoosters, colour=Age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(limits=c(0,NA), name="Booster jabs delivered per day")+
scale_colour_paletteer_d("pals::stepped")+
theme_custom()
#Calculate eligible populations using dashboard data
#National data
naturl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumPeopleVaccinatedSecondDoseByVaccinationDate&format=csv"
temp <- curl_download(url=naturl, destfile=temp, quiet=FALSE, mode="wb")
natdata <- read.csv(temp) %>%
select(4,5) %>%
set_names("date", "Eligible") %>%
mutate(date=as.Date(date)+days(182), Region="England")
#Regional data
regurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=cumPeopleVaccinatedSecondDoseByVaccinationDate&format=csv"
temp <- curl_download(url=regurl, destfile=temp, quiet=FALSE, mode="wb")
eligible.region <- read.csv(temp) %>%
mutate(date=as.Date(date)+days(182)) %>%
select(c(2,4, 5)) %>%
set_names("Region", "date", "Eligible") %>%
mutate(Region=case_when(
Region %in% c("North East", "Yorkshire and The Humber") ~ "North East and Yorkshire",
Region %in% c("West Midlands", "East Midlands") ~ "Midlands",
TRUE ~ Region)) %>%
bind_rows(natdata) %>%
group_by(Region, date) %>%
summarise(Eligible=sum(Eligible)) %>%
ungroup() %>%
mutate(date=as.Date(date)) %>%
merge(final.region) %>%
group_by(Region) %>%
arrange(date) %>%
mutate(newEligible=Eligible-lag(Eligible, 1)) %>%
ungroup() %>%
mutate(BoosterProp=Booster/Eligible)
#Age banded data
ageurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"
temp <- curl_download(url=ageurl, destfile=temp, quiet=FALSE, mode="wb")
eligible.age <- read.csv(temp) %>%
mutate(date==as.Date(date)+days(182)) %>%
select(age, date, cumPeopleVaccinatedSecondDoseByVaccinationDate) %>%
set_names("Age", "date", "Eligible") %>%
mutate(Age=case_when(
Age %in% c("12_15", "16_17") ~ "Under 18",
Age %in% c("80_84", "85_89", "90+") ~ "80+",
TRUE ~ gsub("_", "-", Age))) %>%
group_by(Age, date) %>%
summarise(Eligible=sum(Eligible)) %>%
ungroup() %>%
mutate(date=as.Date(date)) %>%
merge(final.age) %>%
group_by(Age) %>%
arrange(date) %>%
mutate(newEligible=Eligible-lag(Eligible, 1)) %>%
ungroup() %>%
mutate(BoosterProp=Booster/Eligible)
ggplot(eligile.region %>% filter(Region!="England"), aes(x=date, y=BoosterProp, colour=Region))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(limits=c(0,NA), name="Booster jabs delivered per day")+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
theme_custom()
ggplot(eligile.region %>% filter(Region=="England"))+
geom_col(aes(x=date, y=newBoosters), fill="Blue")+
geom_col(aes(x=date, y=-newEligible), fill="Red")+
theme_custom()
ggplot(final.age, aes(x=date, y=newBoosters, colour=Age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(limits=c(0,NA), name="Booster jabs delivered per day")+
scale_colour_paletteer_d("pals::stepped")+
theme_custom()
================================================
FILE: Heatmaps/COVIDBoosters2.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(scales)
library(extrafont)
library(ragg)
library(lubridate)
library(readxl)
library(ggtext)
options(scipen=10000)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Total English doses
#Download vaccination data from NHS England website
#Daily data (includes boosters)
#Start with most recent data
temp <- tempfile()
latest <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/11/COVID-19-daily-announced-vaccinations-15-November-2021.xlsx"
temp <- curl_download(url=latest, destfile=temp, quiet=FALSE, mode="wb")
dailydata <- read_excel(temp, sheet=1, range="B13:F14", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-11-14"), Region=if_else(Region=="England4", "England", Region)) %>%
filter(substr(Region, 1, 7)=="England") %>%
mutate(Booster=as.numeric(Booster))
#Shout out to @jackd1801 for suggesting this would be *much* easier as a for loop.
#October
for(i in c("01", "02", "03", "04", "05", "06", "07", "08", "09", as.character(10:31))){
url <- paste0("https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-", i, "-October-2021.xlsx")
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dailydata <- dailydata %>%
bind_rows(read_excel(temp, sheet=1, range="B13:F14", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(i)-2),
Region=if_else(Region=="England4", "England", Region))%>%
filter(substr(Region, 1, 7)=="England")%>%
mutate(Booster=as.numeric(Booster)))
}
#November
for(i in c("01", "02", "03", "04", "05", "06", "07", "08", "09", as.character(10:14))){
url <- paste0("https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/11/COVID-19-daily-announced-vaccinations-", i, "-November-2021.xlsx")
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dailydata <- dailydata %>%
bind_rows(read_excel(temp, sheet=1, range="B13:F14", col_names=FALSE) %>%
select(1,5) %>%
set_names(c("Region", "Booster")) %>%
mutate(date=as.Date("2021-11-01")+days(as.numeric(i)-2),
Region=if_else(Region=="England4", "England", Region))%>%
filter(substr(Region, 1, 7)=="England")%>%
mutate(Booster=as.numeric(Booster)))
}
#Calculate 'run rate' for last 14 days
runrate.e <- as.numeric(dailydata %>% filter(date>=max(date)-days(14)) %>%
summarise((value=max(Booster)-min(Booster))/14))
#Bring in eligible population
#Commented out lines are for switching to alternative assumptions about eligibility based on age
#Engurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"
Engurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumPeopleVaccinatedSecondDoseByVaccinationDate&format=csv"
temp <- curl_download(url=Engurl, destfile=temp, quiet=FALSE, mode="wb")
Engdata <- read.csv(temp) %>%
select(4,5) %>%
set_names("date", "Eligible") %>%
mutate(date=as.Date(date)+days(182)) %>%
#select(4,5,11) %>%
#set_names("date", "age", "Eligible") %>%
#mutate(date=as.Date(date)+days(182),
# Eligible=if_else(age %in% c("12_15", "16_17", "18_24", "25_29", "30_34", "35_39",
# "40_44", "45_49"), 0, Eligible)) %>%
#group_by(date) %>%
#summarise(Eligible=sum(Eligible)) %>%
#ungroup() %>%
merge(dailydata, by="date", all.x=TRUE) %>%
mutate(EligibleUnvax=Eligible-Booster,
Boosterprop=Booster/Eligible,
Forecast=if_else(date>max(date[!is.na(Booster)]),
Booster[date==max(date[!is.na(Booster)])]+
runrate.e*as.numeric(interval(max(date[!is.na(Booster)]), date), "days"),
NA_real_),
Forecastprop=Forecast/Eligible)
Engprop <- as.numeric(Engdata %>% filter(date==max(date[!is.na(Booster)])) %>%
summarise(value=Booster/Eligible))
agg_tiff("Outputs/COVIDBoostersEng.tiff", units="in", width=9, height=6, res=500)
ggplot(Engdata %>% filter(date>=as.Date("2021-09-21")))+
geom_line(aes(x=date, y=Eligible), colour="#CC3300")+
geom_line(aes(x=date, y=Booster), colour="#006666")+
scale_x_date(name="")+
scale_y_continuous(name="Number of people", limits=c(0,NA))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title=paste0("England has delivered booster jabs to ",round(Engprop*100, 0),"% of eligible people"),
subtitle="Total number of people eligible and having received a COVID booster jab in England since bookings were opened on 21st September",
caption="Data from NHS England & coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Total Scottish doses
Scotdoseurl <- "https://www.opendata.nhs.scot/dataset/6dbdd466-45e3-4348-9ee3-1eac72b5a592/resource/42f17a3c-a4db-4965-ba68-3dffe6bca13a/download/daily_vacc_scot_20211029.csv"
temp <- tempfile()
temp <- curl_download(url=Scotdoseurl, destfile=temp, quiet=FALSE, mode="wb")
ScotDoses <- read.csv(temp) %>%
filter(Product=="Total" & AgeBand=="12 years and over") %>%
mutate(date=as.Date(as.character(Date), format="%Y%m%d"))
ggplot(ScotDoses, aes(x=date, y=CumulativeNumberVaccinated, colour=Dose))+
geom_line()
#Calculate 'run rate' for last 14 days
runrate.s <- as.numeric(ScotDoses %>% filter(Dose=="Dose 3 and Booster" & date>=max(date)-days(14)) %>%
summarise((value=max(CumulativeNumberVaccinated)-min(CumulativeNumberVaccinated))/14))
Scotdata <- ScotDoses %>%
filter(Dose=="Dose 2") %>%
mutate(date=date+days(182)) %>%
select(date, CumulativeNumberVaccinated) %>%
rename("Eligible"="CumulativeNumberVaccinated") %>%
merge(ScotDoses %>% filter(Dose=="Dose 3 and Booster"), by="date", all.x=TRUE) %>%
filter(date>=max(date[Eligible==0])) %>%
mutate(EligibleUnvax=Eligible-CumulativeNumberVaccinated,
Boosterprop=CumulativeNumberVaccinated/Eligible,
Forecast=if_else(date>max(date[!is.na(CumulativeNumberVaccinated)]),
CumulativeNumberVaccinated[date==max(date[!is.na(CumulativeNumberVaccinated)])]+
runrate.s*as.numeric(interval(max(date[!is.na(CumulativeNumberVaccinated)]), date), "days"),
NA_real_),
Forecastprop=Forecast/Eligible)
Scotprop <- as.numeric(Scotdata %>% filter(date==max(date[!is.na(CumulativeNumberVaccinated)])) %>%
summarise(value=CumulativeNumberVaccinated/Eligible))
agg_tiff("Outputs/COVIDBoostersScot.tiff", units="in", width=9, height=6, res=500)
ggplot(Scotdata %>% filter(date>=as.Date("2021-09-21")))+
geom_line(aes(x=date, y=Eligible), colour="#CC3300")+
geom_line(aes(x=date, y=CumulativeNumberVaccinated), colour="#006666")+
scale_x_date(name="")+
scale_y_continuous(name="Number of people", limits=c(0,NA))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title=paste0("Scotland has delivered booster jabs to ",round(Scotprop*100, 0),"% of eligible people"),
subtitle="Total number of people eligible and having received a COVID booster jab in Scotland since bookings were opened on 21st September",
caption="Data from Public Health Scotland | Plot by @VictimOfMaths")
dev.off()
#Comparison of both countries
agg_tiff("Outputs/COVIDBoostersEngScot.tiff", units="in", width=9, height=6, res=500)
ggplot()+
geom_line(data=Engdata, aes(x=date, y=Boosterprop), colour="Red")+
geom_line(data=Scotdata, aes(x=date, y=Boosterprop), colour="RoyalBlue")+
scale_x_date(name="", limits=c(as.Date("2021-09-21"), as.Date("2021-11-15")))+
scale_y_continuous(name="Proportion of eligible population who have received a booster",
limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="Scotland's COVID booster coverage has overtaken England",
subtitle="Proportion of people who received their 2nd COVID jab at least 6 months ago who have received a booster since bookings\nwere opened on 21st September. Scottish data is only available for more recent days.\nBooster data includes a small number of people with weakened immune systems who have been offered a 3rd primary dose.",
caption="Data from Public Health Scotland, NHS England & coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
combined <- Engdata %>%
select(date, Eligible, Booster, Boosterprop, Forecast, Forecastprop) %>%
mutate(country="England") %>%
bind_rows(Scotdata %>%
select(date, Eligible, CumulativeNumberVaccinated, Boosterprop, Forecast, Forecastprop) %>%
rename("Booster"="CumulativeNumberVaccinated") %>%
mutate(country="Scotland")) %>%
filter(date>=as.Date("2021-09-21") & dateEngland needs to speed up its booster rollout to keep up with Scotland",
subtitle="Proportion of people who received their 2nd COVID jab at least 6 months ago who have received a booster since bookings\nwere opened on 21st September (solid lines) and forecasts based on recent vaccination rates and the number of people\ndue to become eligible (dashed lines). Scottish data is only available for more recent days",
caption="Data from Public Health Scotland, NHS England & coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDBoostersEngScotForecasts2.tiff", units="in", width=10, height=6, res=500)
ggplot(combined %>% mutate(Eligible=if_else(is.na(Booster) & date%
mutate(age=case_when(
agegroup==0 ~ "0-4", agegroup==5 ~ "5-9", agegroup==10 ~ "10-14", agegroup==15 ~ "15-19",
agegroup==20 ~ "20-24", agegroup==25 ~ "25-29", agegroup==30 ~ "30-34",
agegroup==35 ~ "35-39", agegroup==40 ~ "40-44", agegroup==45 ~ "45-49",
agegroup==50 ~ "50-54", agegroup==55 ~ "55-59", agegroup==60 ~ "60-64",
agegroup==65 ~ "65-69", agegroup==70 ~ "70-74", agegroup==75 ~ "75-79",
agegroup==80 ~ "80-84", agegroup==85 ~ "85-89", TRUE ~ "90+"),
date=as.Date(date, format="%d/%m/%Y"),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+")))
#Bring in dashboard vaccination data by age
temp=tempfile()
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
vaxdata <- read.csv(temp) %>%
select(date, age, cumVaccinationFirstDoseUptakeByVaccinationDatePercentage,
cumVaccinationSecondDoseUptakeByVaccinationDatePercentage) %>%
set_names(c("date", "age", "1st Dose", "2nd Dose")) %>%
mutate(age=str_replace(age, "_", "-"),
age=if_else(age=="18-24", "20-24", age)) %>%
group_by(age) %>%
#Pick out the data when vaccination coverage first passed 25% of the population
summarise(vaxstart1=min(date[`1st Dose`>=20]),
vaxstart2=min(date[`2nd Dose`>=20]))
#Merge together
data <- merge(CFRdata , CFRdata %>%
merge(vaxdata, by="age") %>%
filter(date==vaxstart1) %>%
select(age, cfr_month, vaxstart1, vaxstart2) %>%
rename(indexcfr=cfr_month)) %>%
select(age, date, cfr_month, indexcfr, vaxstart1, vaxstart2) %>%
mutate(indexed=cfr_month/indexcfr,
dayssince=as.integer(date-as.Date(vaxstart1)),
daysto2nd=as.integer(as.Date(vaxstart2)-as.Date(vaxstart1)))
agg_tiff("Outputs/COVIDCFRChangesLagged.tiff", units="in", width=10, height=7, res=800)
ggplot(data %>% filter(!age %in% c("20-24", "25-29", "30-34") & date>vaxstart1),
aes(x=dayssince, y=indexed, colour=age))+
geom_line(show.legend=FALSE)+
geom_hline(yintercept=1, colour="Grey70", linetype=2)+
#geom_segment(aes(y=0.12, yend=1.2, x=daysto2nd, xend=daysto2nd), colour="Grey50")+
scale_x_continuous(name="Days since at least 20% of population received 1st dose")+
scale_y_continuous(name="Change in Case Fatality Rate \n(log scale)", trans="log",
breaks=c(0.25,0.5,1),
labels=c("-75%", "-50%", "0%"))+
facet_wrap(~age)+
scale_colour_paletteer_d("pals::tol")+
theme_custom()+
labs(title="Across all age groups, Case Fatality Rates have fallen as vaccine coverage increases",
subtitle="Changes in age-specific Case Fatality Rates (the % of people with a positive test who die within 28 days) after the date when at least\n1 in 5 of the age group had received at least one vaccine dose",
caption="CFRs estimated by Daniel Howdon\nVaccination data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCFRChangesLagged2.tiff", units="in", width=10, height=7, res=800)
ggplot(data %>% filter(!age %in% c("20-24", "25-29", "30-34") & date>vaxstart1), aes(x=date, y=indexed, colour=age))+
geom_line(show.legend=FALSE)+
geom_hline(yintercept=1, colour="Grey70", linetype=2)+
#geom_vline(xintercept=as.Date("2021-05-15"))+
scale_x_date(name="")+
scale_y_continuous(name="Change in Case Fatality Rate \n(log scale)", trans="log",
breaks=c(0.25,0.5,1),
labels=c("-75%", "-50%", "0%"))+
facet_wrap(~age)+
scale_colour_paletteer_d("pals::tol")+
theme_custom()+
labs(title="Across all age groups, Case Fatality Rates have fallen as vaccine coverage increases",
subtitle="Changes in age-specific Case Fatality Rates (the % of people with a positive test who die within 28 days) after the date when at least\n1 in 5 of the age group had received at least one vaccine dose",
caption="CFRs estimated by Daniel Howdon\nVaccination data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCFRChangesLagged3.tiff", units="in", width=10, height=7, res=800)
ggplot(data %>% filter(!age %in% c("20-24", "25-29", "30-34") & date>as.Date(vaxstart1)-days(50)),
aes(x=dayssince, y=indexed, colour=age))+
geom_line(show.legend=FALSE)+
geom_hline(yintercept=1, colour="Grey70", linetype=2)+
geom_vline(xintercept=0)+
#geom_segment(aes(y=0.12, yend=1.2, x=daysto2nd, xend=daysto2nd), colour="Grey50")+
scale_x_continuous(name="Days since at least 20% of population received 1st dose")+
scale_y_continuous(name="Change in Case Fatality Rate \n(log scale)", trans="log",
breaks=c(0.25,0.5,1),
labels=c("-75%", "-50%", "0%"))+
facet_wrap(~age)+
scale_colour_paletteer_d("pals::tol")+
theme_custom()+
labs(title="Across all age groups, Case Fatality Rates have fallen as vaccine coverage increases",
subtitle="Changes in age-specific Case Fatality Rates (the % of people with a positive test who die within 28 days) after the date when at least\n1 in 5 of the age group had received at least one vaccine dose",
caption="CFRs estimated by Daniel Howdon\nVaccination data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCanadaHeatmap.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(padr)
library(lubridate)
library(scales)
library(grDevices)
library(paletteer)
library(extrafont)
library(ragg)
#Read in Canadian data
temp <- tempfile()
source <- "https://health-infobase.canada.ca/src/data/covidLive/covid19-download.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp)
data <- data %>%
select(prname, date, numtoday, numdeathstoday) %>%
filter(!prname %in% c("Canada", "Repatriated travellers")) %>%
rename(cases=numtoday, deaths=numdeathstoday) %>%
mutate(date=as.Date(date)) %>%
group_by(prname) %>%
pad()
#Bring in populations
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www150.statcan.gc.ca/n1/tbl/csv/17100005-eng.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read.csv(file.path(temp2, "17100005.csv"))
pop <- pop %>%
filter(ï..REF_DATE==2020 & GEO!="Canada" & Sex=="Both sexes" &
Age.group=="All ages") %>%
rename(prname=GEO, pop=VALUE) %>%
select(prname, pop)
data <- merge(data, pop, all.x=TRUE) %>%
group_by(prname) %>%
#Set up data for heatmap
mutate(caserate=cases*100000/pop, deathrate=deaths*100000/pop,
caserate_avg=roll_mean(caserate, 7, align="right", fill=NA),
deathrate_avg=roll_mean(deathrate, 7, align="right", fill=NA),
maxcaserate=max(caserate_avg, na.rm=TRUE),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
maxdeathrate=max(deathrate_avg, na.rm=TRUE),
maxdeathday=date[which(deathrate_avg==maxdeathrate)][1],
maxdeathprop=deathrate_avg/maxdeathrate,
totalcases=sum(cases, na.rm=TRUE),
totaldeaths=sum(deaths, na.rm=TRUE)) %>%
filter(!is.na(caserate_avg)) %>%
ungroup
plotfrom <- "2020-03-11"
plotto <- max(data$date)
#Plot case trajectories
casetiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in Canadian provinces",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the province.\nProvinces are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each province.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Agency of Canada | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="black"), plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"))
casebars.all <- ggplot(subset(data, date==maxcaseday), aes(x=totalcases, y=fct_reorder(prname, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black", angle=45, hjust=1,
vjust=1),
text=element_text(family="Lato"))
agg_tiff("Outputs/COVIDCanadaCasesHeatmap.tiff", units="in", width=15, height=5, res=500)
plot_grid(casetiles.all, casebars.all, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot case rate trajectories
caseratetiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 case rates in Canadian provinces",
subtitle=paste0("The heatmap represents the 7-day rolling average of the rate of new confirmed cases per 100,000.\nProvinces are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of each province.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Agency of Canada | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"))
caseratebars.all <- ggplot(subset(data, date==maxcaseday), aes(x=pop/1000000, y=fct_reorder(prname, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population (millions)")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"),
text=element_text(family="Lato"))
agg_tiff("Outputs/COVIDCanadaCaseRatesHeatmap.tiff", units="in", width=15, height=5, res=500)
plot_grid(caseratetiles.all, caseratebars.all, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot death trajectories
deathtiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxdeathday), fill=maxdeathprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral", na.value="white")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 deaths in Canadian provinces",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed deaths from COVID-19, normalised to the maximum value within the province. Provinces with no confirmed deaths are shown as white.\nProvinces are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each province.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Agency of Canada | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"))
deathbars.all <- ggplot(subset(data, date==maxdeathday), aes(x=totaldeaths, y=fct_reorder(prname, maxdeathday), fill=totaldeaths))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed deaths")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black", angle=45, hjust=1,
vjust=1),
text=element_text(family="Lato"))
tiff("Outputs/COVIDCanadaDeathsHeatmap.tiff", units="in", width=15, height=5, res=500)
plot_grid(deathtiles.all, deathbars.all, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot death rate trajectories
deathratetiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxdeathday), fill=deathrate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 death rates in Canadian provinces",
subtitle=paste0("The heatmap represents the 7-day rolling average of the rate of new confirmed deaths from COVID-19 per 100,000. Provinces with no confirmed deaths are shown as white.\nProvinces are ordered by the date at which they reached their peak number of deaths. Bars on the right represent the population of each province.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Agency of Canada | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"))
deathratebars.all <- ggplot(subset(data, date==maxdeathday), aes(x=pop/1000000, y=fct_reorder(prname, maxdeathday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population (millions)")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"),
text=element_text(family="Lato"))
tiff("Outputs/COVIDCanadaDeathRatesHeatmap.tiff", units="in", width=15, height=5, res=500)
plot_grid(deathratetiles.all, deathratebars.all, align="h", rel_widths=c(1,0.2))
dev.off()
================================================
FILE: Heatmaps/COVIDCaseCartograms.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(sf)
library(ragg)
library(ggtext)
library(scales)
library(extrafont)
library(ggrepel)
library(gganimate)
#Start with LA level cases for the whole of the UK
cases <- tempfile()
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv"
cases <- curl_download(url=url, destfile=cases, quiet=FALSE, mode="wb")
casedata <- read.csv(cases) %>%
mutate(date=as.Date(date))
maxdate <- max(casedata$date)
casedata <- casedata %>%
#Take the most recent 2 weeks of data
group_by(areaName) %>%
arrange(date) %>%
slice_tail(n=8) %>%
ungroup() %>%
spread(date, newCasesBySpecimenDateRollingRate) %>%
select(c(1,2,4,11))
colnames(casedata) <- c("Lacode", "areaName", "prev", "latest")
casedata <- casedata %>%
mutate(abschange=latest-prev, relchange=abschange/prev)
#Download Carl Baker's lovely map
ltla <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg")
ltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode="wb")
Background <- st_read(ltla, layer="7 Background")
ltlacases <- st_read(ltla, layer="4 LTLA-2019") %>%
left_join(casedata, by="Lacode")
Groups <- st_read(ltla, layer="2 Groups")
Group_labels <- st_read(ltla, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
plot1 <- ggplot()+
geom_sf(data=Background, aes(geometry=geom), fill="White")+
geom_sf(data=ltlacases, aes(geometry=geom, fill=latest), colour="Black", size=0.1)+
geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Cases per\n100,000")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"))+
labs(title="COVID-19 cases are high across large parts of the UK",
subtitle=paste0("Rolling 7-day average number of cases in the past week at Lower Tier Local Authority level\nData up to ", maxdate),
caption="Data from PHE, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDCasesLTLACartogram.tiff", units="in", width=9, height=10, res=800)
plot1
dev.off()
agg_png("Outputs/COVIDCasesLTLACartogram.png", units="in", width=9, height=10, res=800)
plot1
dev.off()
plot2 <- ggplot()+
geom_sf(data=Background, aes(geometry=geom), fill="White")+
geom_sf(data=ltlacases, aes(geometry=geom, fill=abschange), colour="Black", size=0.1)+
geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::warmcool", limit=c(-1,1)*max(abs(casedata$abschange)),
name="Change in cases\nper day per 100,000\nin the past week", direction=-1,
na.value="transparent")+
theme_void()+
theme(plot.title=element_markdown(face="bold", size=rel(1.5)),
text=element_text(family="Lato"))+
labs(title="In the past week, COVID cases have risen almost everywhere except SW Scotland",
subtitle=paste0("Change in the past week in the rolling 7-day average number of cases at Lower Tier Local Authority level\nData up to ", maxdate),
caption="Data from PHE, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDCasesLTLAChangeCartogram.tiff", units="in", width=9, height=10, res=800)
plot2
dev.off()
agg_png("Outputs/COVIDCasesLTLAChangeCartogram.png", units="in", width=9, height=10, res=800)
plot2
dev.off()
#Scatter plot of case level vs change
#Bring in region
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LTLA", "Region")
casedata <- casedata %>%
merge(LADtoRegion, all.x=TRUE, by.x="Lacode", by.y="LTLA") %>%
mutate(Region=case_when(
Lacode %in% c("E07000244", "E07000245") ~ "East of England",
Lacode %in% c("E06000058", "E06000059", "E07000246") ~ "South West",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland",
TRUE ~ Region),
Country=case_when(
substr(Lacode, 1, 1) == "E" ~ "England",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland"))
#Bring in LA populations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D435", col_names=TRUE)
colnames(LApop) <- c("code", "name", "geography", "pop")
#Merge isles of Scilly in with Cornwall
LApop$code <- if_else(LApop$code=="E06000053", "E06000052", LApop$code)
LApop$name <- if_else(LApop$name=="Isles of Scilly", "Cornwall", LApop$name)
#Merge City of London & Hackney
LApop$code <- if_else(LApop$code=="E09000001", "E09000012", LApop$code)
LApop$name <- if_else(LApop$name=="City of London", "Hackney and City of London", LApop$name)
LApop$name <- if_else(LApop$name=="Hackney", "Hackney and City of London", LApop$name)
LApop <- LApop %>%
group_by(name, code) %>%
summarise(pop=sum(pop)) %>%
ungroup()
plotdata <- casedata %>%
merge(LApop, by.x="Lacode", by.y="code" , all.x=TRUE)
agg_tiff("Outputs/COVIDCasesLTLAChangeScatter.tiff", units="in", width=8, height=7, res=800)
ggplot(plotdata, aes(x=latest, y=abschange, fill=Country))+
geom_point(aes(size=pop), shape=21, alpha=0.7)+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_text_repel(aes(label=areaName), size=rel(2.3))+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="COVID cases have fallen sharply across England",
subtitle="COVID case rates and how these have changed in the past week in UK Local Authorities\nBubbles are sized by population",
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
dev.off()
#####################################
#MSOA level data
msoacases <- tempfile()
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv"
msoacases <- curl_download(url=url, destfile=msoacases, quiet=FALSE, mode="wb")
msoacasedata <- read.csv(msoacases) %>%
mutate(date=as.Date(date))
maxdate2 <- max(msoacasedata$date)
msoacasedata <- msoacasedata %>%
#Take the most recent 2 weeks of data
group_by(areaName) %>%
arrange(date) %>%
slice_tail(n=2) %>%
ungroup() %>%
spread(date, newCasesBySpecimenDateRollingRate) %>%
select(c(7,8,ncol(.)-1,ncol(.)))
colnames(msoacasedata) <- c("msoa11cd", "areaName", "prev", "latest")
msoacasedata <- msoacasedata %>%
mutate(abschange=latest-prev, relchange=abschange/prev)
msoa <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
msoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode="wb")
BackgroundMSOA <- st_read(msoa, layer="5 Background")
MSOA <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(msoacasedata, by="msoa11cd")
GroupsMSOA <- st_read(msoa, layer="2 Groups")
Group_labelsMSOA <- st_read(msoa, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAsMSOA <- st_read(msoa, layer="3 Local authority outlines (2019)")
plot3 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, fill=latest), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Cases per\n100,000", limits=c(0,NA))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.5)),
text=element_text(family="Lato"))+
labs(title="There are local COVID outbreaks across many parts of England",
subtitle=paste0("Rolling 7-day average number of cases in the past week at Middle Super Output Area level in England\nData up to ",
maxdate, ". MSOAs with small populations and/or low case counts may be censored and appear in grey."),
caption="Data from coronavirus.data.gov.uk | Cartogram from the House of Commons Library\nAnalysis and plot by Colin Angus")
agg_tiff("Outputs/COVIDCasesMSOACartogram.tiff", units="in", width=10, height=8, res=800)
plot3
dev.off()
agg_png("Outputs/COVIDCasesMSOACartogram.png", units="in", width=10, height=8, res=800)
plot3
dev.off()
plot4 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill="White")+
geom_sf(data=MSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, fill=abschange), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::warmcool", limit=c(-1,1)*max(abs(msoacasedata$abschange), na.rm=TRUE),
name="Change in cases\nper day per 100,000\nin the past week", direction=-1,
na.value="transparent")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.5)),
text=element_text(family="Lato"), plot.caption.position = "plot")+
labs(title="At neighbourhood level, recent changes in COVID cases are a mixed picture",
subtitle=paste0("Change in the past week in the rolling 7-day average number of cases at Middle Super Output Area level in England\nData up to ",
maxdate, ". MSOAs with small populations and/or low case counts may be censored and appear in white"),
caption="Data from coronavirus.data.gov.uk | Cartogram from the House of Commons Library\nAnalysis and plot by Colin Angus")
agg_tiff("Outputs/COVIDCasesMSOAChangeCartogram.tiff", units="in", width=10, height=8, res=800)
plot4
dev.off()
agg_png("Outputs/COVIDCasesMSOAChangeCartogram.png", units="in", width=10, height=8, res=800)
plot4
dev.off()
#######################################################
#LTLA level animation
animdata <- read.csv(cases) %>%
mutate(date=as.Date(date)) %>%
rename(Lacode=areaCode)
ltlacaseanim <- st_read(ltla, layer="4 LTLA-2019") %>%
left_join(animdata, by="Lacode")
#extract latest date with full UK data
temp <- animdata %>%
group_by(Lacode) %>%
filter(!is.na(newCasesBySpecimenDateRollingRate)) %>%
mutate(min=min(date), max=max(date))
completefrom <- max(temp$min, na.rm=TRUE)
completeto <- min(temp$max, na.rm=TRUE)
CartogramanimUK <- ggplot()+
geom_sf(data=Background, aes(geometry=geom))+
geom_sf(data=subset(ltlacaseanim, date>=as.Date("2020-09-01") & date<=as.Date(completeto)),
aes(geometry=geom, fill=newCasesBySpecimenDateRollingRate),
colour="Black", size=0.1)+
geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_distiller(palette="Spectral", name="Daily confirmed\ncases per\n100,000",
na.value="white")+
transition_time(date)+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Timeline of the UK's 'Second Wave'",
subtitle="Rolling 7-day average number of case rates\nData up to {frame_time}",
caption="Data from PHE, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
animate(CartogramanimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/CartogramanimUK.gif"),
device="ragg_png", end_pause=60)
================================================
FILE: Heatmaps/COVIDCasesDeathsxIMD.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(RcppRoll)
library(readxl)
library(gtools)
library(paletteer)
library(extrafont)
library(ragg)
library(scales)
library(forcats)
options(scipen=99999)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Start by calculating IMD at MSOA level
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE) %>%
select(c(1,2,5,6)) %>%
set_names("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, LAD17CD) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:G34758", col_names=FALSE) %>%
select(-c(2:6)) %>%
set_names("LSOA11CD", "pop")
pop_full <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:CT34758", col_names=FALSE) %>%
select(-c(2:7)) %>%
set_names("LSOA11CD", c(0:90))
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD, LAD17CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))
IMD_LTLA <- IMD %>%
group_by(LAD17CD)%>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))
#####################
#Analysis of population age by IMD decile (at LSOA level)
u18xIMD <- pop_full %>%
gather(age, pop, c(2:ncol(.))) %>%
mutate(age=as.numeric(age)) %>%
filter(age<18) %>%
mutate(ageband=case_when(
age<12 ~ "Under 12",
age<16 ~ "12-15",
TRUE ~ "16-17")) %>%
merge(IMD %>% select(LSOA11CD, IMDdecile)) %>%
group_by(IMDdecile, ageband) %>%
summarise(pop=sum(pop)) %>%
ungroup() %>%
group_by(IMDdecile) %>%
mutate(total=sum(pop)) %>%
ungroup() %>%
mutate(prop=pop/total, ageband=factor(ageband, levels=c("Under 12", "12-15", "16-17")))
agg_tiff("Outputs/EngU18Pop.tiff", units="in", width=9, height=6, res=500)
ggplot(u18xIMD, aes(x=prop, y=as.factor(IMDdecile), fill=fct_rev(ageband)))+
geom_col(position="stack")+
scale_x_continuous(name="Proportion of under 18s", labels=label_percent(accuracy=1))+
scale_y_discrete(name="IMD decile", labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
scale_fill_paletteer_d("ggthemr::solarized", name="", guide=guide_legend(reverse=TRUE))+
theme_custom()+
theme(legend.position="top")+
labs(title="You would expect under 18 vaccination rates in deprived areas to be *slightly* lower",
subtitle="Age distribution of the under 18s in England by deprivation decile",
caption="Population data from ONS 2020 estimates | Plot by @VictimOfMaths")
dev.off()
#Bring in MSOA level case data
temp.cases <- tempfile()
caseurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingSum&format=csv"
temp.cases <- curl_download(url=caseurl, destfile=temp.cases, quiet=FALSE, mode="wb")
cases <- read.csv(temp.cases) %>%
select(areaCode, date, newCasesBySpecimenDateRollingSum) %>%
set_names("MSOA11CD", "date", "cases") %>%
mutate(date=as.Date(date)) %>%
merge(IMD_MSOA) %>%
group_by(decile, date) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
ungroup() %>%
group_by(decile) %>%
mutate(caserate=cases*100000/pop) %>%
ungroup()
cases_MSOA <- read.csv(temp.cases) %>%
select(areaCode, date, newCasesBySpecimenDateRollingSum) %>%
set_names("MSOA11CD", "date", "cases") %>%
mutate(date=as.Date(date)) %>%
filter(date==max(date)) %>%
merge(IMD_MSOA) %>%
rename(allpop=pop)
agg_png("Outputs/COVIDCasesxIMD.png", units="in", width=8, height=6, res=800)
ggplot(cases, aes(x=date, y=caserate, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Weekly new cases per 100,000 people", limits=c(0,NA))+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="The socioeconomic profile of COVID cases has recently reversed",
subtitle="Weekly rate of new COVID cases in England based on neighbourhood-level data.\nCase data is not available for neighbourhoods with fewer than 3 cases in any given week.",
caption="Data from coronavirus.data.gov.uk | Plot by Colin Angus")
dev.off()
agg_tiff("Outputs/COVIDCasesxIMDRecent.tiff", units="in", width=8, height=6, res=800)
ggplot(cases %>% filter(date>as.Date("2021-05-01")),
aes(x=date, y=caserate, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Weekly new cases per 100,000 people", limits=c(0,NA))+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="The socioeconomic profile of COVID cases has recently reversed",
subtitle="Weekly rate of new COVID cases in England based on MSOA-level data.\nCase data is not available for neighbourhoods with fewer than 3 cases in any given week.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxIMDRecentArea.tiff", units="in", width=8, height=6, res=800)
ggplot(cases %>% filter(date>as.Date("2021-05-01")),
aes(x=date, y=cases, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of new cases", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="The socioeconomic profile of COVID cases has recently reversed",
subtitle="Proportion of new COVID cases by deprivation decile in England based on MSOA-level data.\nCase data is not available for neighbourhoods with fewer than 3 cases in any given week.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxIMDArea.tiff", units="in", width=8, height=6, res=800)
ggplot(cases %>% filter(date>as.Date("2020-04-01")),
aes(x=date, y=cases, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of new cases", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="The socioeconomic profile of COVID cases has recently reversed",
subtitle="Proportion of new COVID cases by deprivation decile in England based on MSOA-level data.\nCase data is not available for neighbourhoods with fewer than 3 cases in any given week.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Repeat using LA-level data
source <- ("https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDate&metric=newDeaths28DaysByDeathDate&format=csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LAcases <- read.csv(temp) %>%
rename(cases=newCasesBySpecimenDate, deaths=newDeaths28DaysByDeathDate) %>%
mutate(date=as.Date(date)) %>%
filter(date%
merge(IMD_LTLA, by.x="areaCode", by.y="LAD17CD") %>%
group_by(decile, date) %>%
summarise(cases=sum(cases), deaths=sum(deaths), pop=sum(pop)) %>%
ungroup() %>%
group_by(decile) %>%
mutate(caserate=cases*100000/pop,
deathrate=deaths*100000/pop,
caserate_roll=roll_mean(caserate, 7, align="center", fill=NA),
deathrate_roll=roll_mean(deathrate, 7, align="center", fill=NA)) %>%
ungroup()
agg_tiff("Outputs/COVIDCasesxIMDLTLA.tiff", units="in", width=8, height=6, res=800)
ggplot(LAcases, aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily new cases per 100,000 people", limits=c(0,NA))+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="The socioeconomic profile of COVID cases has recently reversed",
subtitle="Rolling 7-day average daily rate of new COVID cases in England based on Local Authority-level data.\nLocal Authorities are allocated to deprivation deciles based on their average IMD scores.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxIMDAreaLTLA.tiff", units="in", width=8, height=6, res=800)
ggplot(LAcases %>% filter(date>as.Date("2020-04-01")),
aes(x=date, y=caserate_roll, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of new cases", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="The socioeconomic profile of COVID cases has recently reversed",
subtitle="Proportion of new COVID cases in England based on Local Authority-level data.\nLocal Authorities are allocated to deprivation deciles based on their average IMD scores.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDDeathsxIMDLTLA.tiff", units="in", width=8, height=6, res=800)
ggplot(LAcases, aes(x=date, y=deathrate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily deaths per 100,000 people", limits=c(0,NA))+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="COVID deaths are still highest in more deprived groups",
subtitle="Rolling 7-day average daily rate of deaths within 28 days of a positive COVID test in England\nbased on Local Authority-level data. Local Authorities are allocated to deprivation deciles based on\nthe average IMD scores of neighbourhoods in the Local Authority.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDDeathsxIMDAreaLTLA.tiff", units="in", width=8, height=6, res=800)
ggplot(LAcases %>% filter(date>as.Date("2020-04-01")),
aes(x=date, y=deathrate_roll, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of deaths", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="COVID deaths are still highest in more deprived groups",
subtitle="Proportion of deaths within 28 days of a positive COVID test in England based on Local Authority-level data.\nLocal Authorities are allocated to deprivation deciles based on the average IMD scores of neighbourhoods\nin the Local Authority.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDDeathsxIMDLTLARecent.tiff", units="in", width=8, height=6, res=800)
ggplot(LAcases %>% filter(date>as.Date("2021-05-01")),
aes(x=date, y=deathrate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily deaths per 100,000 people", limits=c(0,NA))+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="COVID deaths are still highest in more deprived groups",
subtitle="Rolling 7-day average daily rate of deaths within 28 days of a positive COVID test in England\nbased on Local Authority-level data. Local Authorities are allocated to deprivation deciles based on\nthe average IMD scores of neighbourhoods in the Local Authority.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDDeathsxIMDAreaLTLARecent.tiff", units="in", width=8, height=6, res=800)
ggplot(LAcases %>% filter(date>as.Date("2021-05-01")),
aes(x=date, y=deathrate_roll, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of deaths", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="COVID deaths are still highest in more deprived groups",
subtitle="Proportion of deaths within 28 days of a positive COVID test in England based on Local Authority-level data.\nLocal Authorities are allocated to deprivation deciles based on the average IMD scores of neighbourhoods\nin the Local Authority.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Bring in u18 vaccine uptake
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-weekly-announced-vaccinations-13-January-2022.xlsx"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
vaxdata <- read_excel(temp, sheet="MSOA", range="F15:I6803", col_names=FALSE,
col_types="text") %>%
set_names("MSOA11CD", "areaName", "12-15", "16-17") %>%
mutate(`12-15`=as.numeric(`12-15`),
`16-17`=as.numeric(`16-17`),
`12-17`=`12-15`+`16-17`) %>%
gather(age, vaccinated, c(3:5)) %>%
merge(pop_full %>% select(c(1,14:19)) %>%
gather(age, pop, c(2:7)) %>%
mutate(age=case_when(
age<16 ~ "12-15",
TRUE ~ "16-17")) %>%
group_by(LSOA11CD, age) %>%
summarise(pop=sum(pop)) %>%
ungroup() %>%
merge(lookup) %>%
group_by(MSOA11CD, age) %>%
summarise(pop=sum(pop)) %>%
ungroup() %>%
spread(age, pop) %>%
mutate(`12-17`=`12-15`+`16-17`) %>%
gather(age, pop, c(2:4))) %>%
merge(IMD_MSOA %>% select(MSOA11CD, decile)) %>%
group_by(age, decile) %>%
summarise(vaccinated=sum(vaccinated, na.rm=TRUE), vaxpop=sum(pop)) %>%
ungroup() %>%
mutate(vaxrate=vaccinated/vaxpop)
vaxdata_MSOA <- read_excel(temp, sheet="MSOA", range="F15:I6803", col_names=FALSE,
col_types="text") %>%
set_names("MSOA11CD", "areaName", "12-15", "16-17") %>%
mutate(`12-15`=as.numeric(`12-15`),
`16-17`=as.numeric(`16-17`),
`12-17`=`12-15`+`16-17`) %>%
gather(age, vaccinated, c(3:5)) %>%
merge(pop_full %>% select(c(1,14:19)) %>%
gather(age, pop, c(2:7)) %>%
mutate(age=case_when(
age<16 ~ "12-15",
TRUE ~ "16-17")) %>%
merge(lookup) %>%
group_by(MSOA11CD) %>%
summarise(pop=sum(pop)) %>%
ungroup()) %>%
merge(IMD_MSOA %>% select(MSOA11CD, decile)) %>%
mutate(vaxprop=vaccinated/pop)
agg_tiff("Outputs/COVIDVaxU18xIMDONS.tiff", units="in", width=10, height=6, res=500)
ggplot(vaxdata %>% filter(age!="12-17"), aes(x=vaxrate, y=as.factor(decile), fill=as.factor(decile)))+
geom_col(show.legend=FALSE)+
scale_x_continuous(name="Proportion of age group vaccinated", labels=label_percent(accuracy=1))+
scale_y_discrete(name="IMD decile", labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age)+
theme_custom()+
labs(title="Child vaccination rates are lowest in deprived areas",
subtitle="Proportion of under 18s who have received at least one COVID-19 vaccine dose",
caption="Vaccination data from NHS England, population data from ONS\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVax1217xIMDONS.tiff", units="in", width=8, height=6, res=500)
ggplot(vaxdata %>% filter(age=="12-17"), aes(x=vaxrate, y=as.factor(decile), fill=as.factor(decile)))+
geom_col(show.legend=FALSE)+
scale_x_continuous(name="Proportion of age group vaccinated", labels=label_percent(accuracy=1))+
scale_y_discrete(name="IMD decile", labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="Child vaccination rates are lowest in deprived areas",
subtitle="Proportion of 12-17 year olds who have received at least one COVID-19 vaccine dose",
caption="Vaccination data from NHS England, population data from ONS\nPlot by @VictimOfMaths")
dev.off()
########
#Combine analysis of u18 vax uptake with cases and IMD deciles
combined <- vaxdata_MSOA %>%
merge(cases_MSOA) %>%
mutate(caserate=cases*100000/allpop)
agg_tiff("Outputs/COVIDVaxU18xCasesxIMDBW.tiff", units="in", width=9, height=6, res=500)
ggplot(combined %>% filter(age=="12-17"), aes(x=caserate, y=vaxprop))+
geom_point(alpha=0.6)+
geom_smooth(method="lm")+
scale_x_continuous(name="Cases per 100,000 in the past week")+
scale_y_continuous(name="Proportion of 12-17 year-olds vaccinated", labels=label_percent(accuracy=1))+
theme_custom()+
labs(title="Areas with higher cases have higher child vaccination rates",
subtitle="Association between the latest weekly COVID case rates and the proportion of 12-17 year-olds who have received\nat least one vaccine dose in English neighbourhoods (MSOAs)",
caption="Data from NHS England, ONS and coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxU18xCasesxIMD.tiff", units="in", width=9, height=6, res=500)
ggplot(combined %>% filter(age=="12-17"), aes(x=caserate, y=vaxprop, colour=as.factor(decile)))+
geom_point(alpha=0.6)+
scale_x_continuous(name="Cases per 100,000 in the past week")+
scale_y_continuous(name="Proportion of 12-17 year-olds vaccinated", labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="Areas with higher cases are more affluent and have higher child vaccination rates",
subtitle="Association between the latest weekly COVID case rates and the proportion of 12-17 year-olds\nwho have received at least one vaccine dose, coloured by deprivation decile, in English neighbourhoods (MSOAs)",
caption="Data from NHS England, ONS and coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
model <- lm(caserate ~ vaxprop + decile, combined %>% filter(age=="12-17"))
af <- anova(model)
afss <- af$"Sum Sq"
print(cbind(af,PctExp=afss/sum(afss)*100))
#COVID case rates *by age* and deprivation over time using ltla data
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
cases_age <- read.csv(temp) %>%
filter(!age %in% c("00_59", "60+", "unassigned")) %>%
mutate(date=as.Date(date)) %>%
#filter(date%
merge(IMD_LTLA, by.x="areaCode", by.y="LAD17CD") %>%
group_by(age, decile, date) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
ungroup() %>%
mutate(caserate=cases*100000/pop,
caserate_roll=roll_mean(caserate, 7, align="center", fill=NA),
age=gsub("_", "-", age))
agg_tiff("Outputs/COVIDCasesxAgexIMD.tiff", units="in", width=11, height=8, res=500)
ggplot(cases_age %>% filter(date>=as.Date("2021-05-01")),
aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age)+
theme_custom()+
labs(title="Cases have risen in less deprived areas in schoolkids and their parents age group",
subtitle="7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgexIMDv2.tiff", units="in", width=11, height=8, res=500)
ggplot(cases_age %>% filter(date>=as.Date("2021-05-01")),
aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age, scales="free_y")+
theme_custom()+
labs(title="Cases have risen in less deprived areas in schoolkids and their parents age group",
subtitle="7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgexIMDU20.tiff", units="in", width=11, height=6, res=500)
ggplot(cases_age %>% filter(date>=as.Date("2021-05-01") & age %in% c("05-09", "10-14", "15-19")),
aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age)+
theme_custom()+
labs(title="Recent peaks in COVID cases in children have been in less deprived areas",
subtitle="7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgexIMD2039.tiff", units="in", width=11, height=6, res=500)
ggplot(cases_age %>% filter(date>=as.Date("2021-05-01") &
age %in% c("20-24", "25-29", "30-34", "35-39")),
aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age)+
theme_custom()+
labs(title="The socioeconomic gradient in 20-39 year olds has been more stable",
subtitle="7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgexIMD4059.tiff", units="in", width=11, height=6, res=500)
ggplot(cases_age %>% filter(date>=as.Date("2021-05-01") &
age %in% c("40-44", "45-49", "50-54", "55-59")),
aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age)+
theme_custom()+
labs(title="The socioeconomic gradient in 40-59 year olds has reversed",
subtitle="7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgexIMD6079.tiff", units="in", width=11, height=6, res=500)
ggplot(cases_age %>% filter(date>=as.Date("2021-05-01") &
age %in% c("60-64", "65-69", "70-74", "75-79")),
aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age)+
theme_custom()+
labs(title="The socioeconomic gradient in 60-79 year olds has reversed",
subtitle="7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgexIMD80Plus.tiff", units="in", width=11, height=6, res=500)
ggplot(cases_age %>% filter(date>=as.Date("2021-05-01") &
age %in% c("80-84", "85-89", "90+")),
aes(x=date, y=caserate_roll, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~age)+
theme_custom()+
labs(title="The socioeconomic gradient in 80+ year olds has reversed",
subtitle="7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
#Cases x age
agedata <- cases_age %>%
group_by(age, date) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
mutate(cases_roll=roll_mean(cases, 7, align="center", fill=NA)) %>%
ungroup() %>%
mutate(caserate=cases*100000/pop)
agg_tiff("Outputs/COVIDCasesxAgeProportion.tiff", units="in", width=11, height=6, res=500)
ggplot(agedata %>% filter(date>as.Date("2020-03-01")), aes(x=date, y=cases_roll, fill=age))+
geom_col(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("pals::stepped", name="Age")+
theme_custom()+
labs(title="The shifting age dynamics of the pandemic",
subtitle="Proportion of confirmed COVID-19 cases (based on a 7-day rolling average) in England by age group",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesLTLAPhasePlot.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(sf)
library(ragg)
library(ggtext)
library(readxl)
library(scales)
library(extrafont)
library(ggrepel)
library(gganimate)
library(lubridate)
#Start with LA level cases for the whole of the UK
cases <- tempfile()
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv"
cases <- curl_download(url=url, destfile=cases, quiet=FALSE, mode="wb")
casedata <- read.csv(cases) %>%
mutate(date=as.Date(date)) %>%
group_by(areaName) %>%
arrange(date) %>%
rename(caserate=newCasesBySpecimenDateRollingRate) %>%
mutate(change=caserate-lag(caserate,7)) %>%
ungroup() %>%
rename("Lacode"="areaCode")
maxdate <- max(casedata$date)
#Bring in region
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LTLA", "Region")
casedata <- casedata %>%
merge(LADtoRegion, all.x=TRUE, by.x="Lacode", by.y="LTLA") %>%
mutate(Region=case_when(
Lacode %in% c("E07000244", "E07000245") ~ "East of England",
Lacode %in% c("E06000058", "E06000059", "E07000246") ~ "South West",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland",
TRUE ~ Region),
Country=case_when(
substr(Lacode, 1, 1) == "E" ~ "England",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland"))
#Bring in LA populations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D435", col_names=TRUE)
colnames(LApop) <- c("code", "name", "geography", "pop")
#Merge isles of Scilly in with Cornwall
LApop$code <- if_else(LApop$code=="E06000053", "E06000052", LApop$code)
LApop$name <- if_else(LApop$name=="Isles of Scilly", "Cornwall", LApop$name)
#Merge City of London & Hackney
LApop$code <- if_else(LApop$code=="E09000001", "E09000012", LApop$code)
LApop$name <- if_else(LApop$name=="City of London", "Hackney and City of London", LApop$name)
LApop$name <- if_else(LApop$name=="Hackney", "Hackney and City of London", LApop$name)
LApop <- LApop %>%
group_by(name, code) %>%
summarise(pop=sum(pop)) %>%
ungroup()
plotdata <- casedata %>%
merge(LApop, by.x="Lacode", by.y="code" , all.x=TRUE) %>%
mutate(dayssince=as.integer(maxdate-date)) %>%
arrange(date)
agg_tiff("Outputs/COVIDCasesLTLAChangeScatter.tiff", units="in", width=8, height=7, res=800)
ggplot(plotdata %>% filter(date==maxdate), aes(x=caserate, y=change, fill=Country))+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_point(aes(size=pop), shape=21, alpha=0.7)+
geom_text_repel(aes(label=areaName), size=rel(2.3), box.padding=0.3)+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="Recent COVID outbreaks are currently contained to a few areas",
subtitle=paste0("COVID case rates and how these have changed in the past week in UK Local Authorities.\nBubbles are sized by population. Data up to ",
maxdate),
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
dev.off()
plot <- ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdata %>% filter(date>=maxdate-days(7)),
aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),
colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdata %>% filter(date==maxdate),
aes(x=caserate, y=change, fill=Country, size=pop), shape=21, alpha=0.7)+
geom_text_repel(data=plotdata %>% filter(date==maxdate),
aes(x=caserate, y=change, label=areaName), size=rel(2.3))+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)),
legend.text = element_text(face="bold", size=rel(1)))+
guides(fill=guide_legend(override.aes=list(size=3)))+
labs(title="Heading in the wrong direction",
subtitle=paste0("COVID case rates and how these have changed in the past week in UK Local Authorities.\nBubbles are sized by population. Trails represent each area's movement across the plot in the past week.\nData up to ",
maxdate),
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDCasesLTLAChangeScatterPaths.tiff", units="in", width=9, height=7, res=800)
plot
dev.off()
#Regional version
regplot <- ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdata %>% filter(date>=maxdate-days(7) & Country=="England"),
aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),
colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdata %>% filter(date==maxdate & Country=="England"),
aes(x=caserate, y=change, fill=Region, size=pop), shape=21, alpha=0.7,
show.legend=FALSE)+
geom_text_repel(data=plotdata %>% filter(date==maxdate & Country=="England"),
aes(x=caserate, y=change, label=areaName), size=rel(2.3))+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("LaCroixColoR::paired", name="")+
scale_size(guide=FALSE)+
theme_classic()+
facet_wrap(~Region)+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)),
legend.text = element_text(face="bold", size=rel(1)),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
guides(fill=guide_legend(override.aes=list(size=3)))+
labs(title="The explosion in COVID cases is slowing down everywhere",
subtitle=paste0("COVID case rates and how these have changed in the past week in English Local Authorities.\nBubbles are sized by population. Trails represent each area's movement across the plot in the past week.\nData up to ",
maxdate),
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDCasesLTLAChangeScatterPathsxRegion.tiff", units="in", width=10, height=10, res=500)
regplot
dev.off()
#Free scales version
regplot <- ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdata %>% filter(date>=maxdate-days(7) & Country=="England"),
aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),
colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdata %>% filter(date==maxdate & Country=="England"),
aes(x=caserate, y=change, fill=Region, size=pop), shape=21, alpha=0.7,
show.legend=FALSE)+
geom_text_repel(data=plotdata %>% filter(date==maxdate & Country=="England"),
aes(x=caserate, y=change, label=areaName), size=rel(2.3))+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("LaCroixColoR::paired", name="")+
scale_size(guide=FALSE)+
theme_classic()+
facet_wrap(~Region, scales="free")+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)),
legend.text = element_text(face="bold", size=rel(1)),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
guides(fill=guide_legend(override.aes=list(size=3)))+
labs(title="COVID case rates are threatening to take off away from London/the South East",
subtitle=paste0("COVID case rates and how these have changed in the past week in English Local Authorities.\nBubbles are sized by population. Trails represent each area's movement across the plot in the past week.\nData up to ",
maxdate),
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDCasesLTLAChangeScatterPathsxRegionv2.tiff", units="in", width=10, height=10, res=500)
regplot
dev.off()
#Whole region/nation version (i.e. one dot per region)
plotdatareg <- plotdata %>%
mutate(cases=caserate*pop/100000, change=change*pop/100000) %>%
group_by(Region, date, dayssince) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
mutate(caserate=cases*100000/pop) %>%
ungroup() %>%
group_by(Region) %>%
mutate(change=caserate-lag(caserate,7)) %>%
ungroup() %>%
mutate(Country=case_when(
Region=="Scotland" ~ "Scotland",
Region=="Wales" ~ "Wales",
Region=="Northern Ireland" ~ "Northern Ireland",
TRUE ~ "England"))
agg_tiff("Outputs/COVIDCasesRegionChangeScatter.tiff", units="in", width=8, height=7, res=800)
ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdatareg %>% filter(date>=maxdate-days(30)),
aes(x=caserate, y=change, group=Region, alpha=30-dayssince),
colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdatareg %>% filter(date==maxdate),
aes(x=caserate, y=change, size=pop), fill="White", shape=21)+
geom_point(data=plotdatareg %>% filter(date==maxdate),
aes(x=caserate, y=change, fill=Country, size=pop), shape=21, alpha=0.7)+
geom_text_repel(data=plotdatareg %>% filter(date==maxdate),
aes(x=caserate, y=change, label=Region), size=rel(2.3))+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="Case numbers are rising again",
subtitle=paste0("COVID case rates and how these have changed in the past week in UK Local Authorities.\nBubbles are sized by population. Trails represent each area's movement across the plot in the past month.\nData up to ",
maxdate),
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
dev.off()
#Whole region/nation version (i.e. one dot per region)
plotdatanat <- plotdata %>%
mutate(cases=caserate*pop/100000, change=change*pop/100000,
Country=case_when(
Region=="Scotland" ~ "Scotland",
Region=="Wales" ~ "Wales",
Region=="Northern Ireland" ~ "Northern Ireland",
TRUE ~ "England")) %>%
group_by(Country, date, dayssince) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
mutate(caserate=cases*100000/pop) %>%
ungroup() %>%
group_by(Country) %>%
mutate(change=caserate-lag(caserate,7)) %>%
ungroup()
agg_tiff("Outputs/COVIDCasesNationChangeScatter.tiff", units="in", width=8, height=7, res=800)
ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_path(data=plotdatanat %>% filter(date>=maxdate-days(182)),
aes(x=caserate, y=change, colour=Country, alpha=182-dayssince),
show.legend=FALSE)+
geom_point(data=plotdatanat %>% filter(date==maxdate),
aes(x=caserate, y=change, size=pop), fill="White", shape=21)+
geom_point(data=plotdatanat %>% filter(date==maxdate),
aes(x=caserate, y=change, fill=Country, size=pop), shape=21, alpha=0.7)+
geom_text_repel(data=plotdatanat %>% filter(date==maxdate),
aes(x=caserate, y=change, label=Country), size=rel(2.3))+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="Case numbers are rising again",
subtitle=paste0("COVID case rates and how these have changed in the past week in UK Local Authorities.\nBubbles are sized by population. Trails represent each area's movement across the plot in the past month.\nData up to ",
maxdate),
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
dev.off()
#Animated version (to be honest, this needs tweaking, it looks pretty rubbish with
#these settings)
anim <- ggplot(plotdata %>% filter(date>=as.Date("2021-04-19")),
aes(x=caserate, y=change, fill=Country))+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_point(aes(size=pop), shape=21, alpha=0.7)+
geom_text_repel(aes(label=areaName), size=rel(2.3), box.padding=0.3)+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_fill_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
legend.position = "top", plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="Recent COVID outbreaks are currently contained to a few areas",
subtitle="COVID case rates and how these have changed in the past week in UK Local Authorities.\nBubbles are sized by population. Data up to {closest_state}",
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")+
transition_states(date, transition_length=1, state_length=1)
animate(anim, units="in", width=8, height=8*4/5, res=500,
renderer=gifski_renderer("Outputs/COVIDCasesPhasePlotAnim.gif"),
device="ragg_png", end_pause=5, duration=10, fps=10)
================================================
FILE: Heatmaps/COVIDCasesOctHalfTerm.R
================================================
rm(list=ls())
library(curl)
library(arrow)
library(tidyverse)
library(RcppRoll)
library(ggtext)
library(ragg)
options(scipen=10000)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Download case data by age and UTLA
temp <- tempfile()
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read_csv_arrow(temp) %>%
select(c(1:6)) %>%
filter(age!="unassigned") %>%
mutate(age=case_when(
age=="00_04" ~ "0_4",
age=="05_09" ~ "5-9",
TRUE ~ age),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+"))) %>%
#Remove two bonus age categories that we don't need (0-59 and 60+)
filter(!is.na(age)) %>%
#Sort out Buckinghamsire (as 4 separate LTLAs in the data, but pop data only available for Bucks)
mutate(Code=case_when(
areaCode %in% c("E07000004", "E07000005", "E07000006", "E07000007") ~ "E06000060",
TRUE ~ as.character(areaCode)),
areaName=case_when(
Code=="E06000060" ~ "Buckinghamshire",
TRUE ~ as.character(areaName)),
areaType=case_when(
Code=="E06000060" ~ "ltla",
TRUE ~ as.character(areaType)),
date=as.Date(date)) %>%
group_by(Code, areaName, areaType, date, age) %>%
mutate(cases=sum(cases)) %>%
ungroup()
#Bring in populations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2020geography.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="MYE2 - Persons", range="A8:CQ434")
#Align age bands
pop <- pop %>%
gather(age.sgl, pop, c(5:95)) %>%
mutate(age.sgl=as.numeric(gsub("\\+", "", age.sgl)),
age=case_when(
age.sgl<5 ~ "0-4",
age.sgl<10 ~ "5-9",
age.sgl<15 ~ "10-14",
age.sgl<20 ~ "15-19",
age.sgl<25 ~ "20-24",
age.sgl<30 ~ "25-29",
age.sgl<35 ~ "30-34",
age.sgl<40 ~ "35-39",
age.sgl<45 ~ "40-44",
age.sgl<50 ~ "45-49",
age.sgl<55 ~ "50-54",
age.sgl<60 ~ "55-59",
age.sgl<65 ~ "60-64",
age.sgl<70 ~ "65-69",
age.sgl<75 ~ "70-74",
age.sgl<80 ~ "75-79",
age.sgl<85 ~ "80-84",
age.sgl<90 ~ "85-89",
TRUE ~ "90+") %>%
factor(levels = levels(data$age))) %>%
#And sort out Buckinghamshire codes
mutate(Code=case_when(
Code %in% c("E07000005", "E07000006", "E07000007", "E07000004") ~ "E06000060",
TRUE ~ Code
)) %>%
group_by(age, Code) %>%
summarise(pop=sum(pop))
#Merge into case data
data <- data %>%
left_join(pop, by=c("Code", "age")) %>%
arrange(date)
#Pick out Leicestershire vs rest of E Mids vs rest of England
plotdata <- data %>%
filter(date>as.Date("2021-10-01")) %>%
mutate(Region=case_when(
areaName %in% c("Blaby", "Charnwood", "Harborough", "Hinckley and Bosworth", "Melton",
"North West Leicestershire", "Oadby and Wigston", "Leicester") ~ "Leicestershire",
areaName %in% c("Ashfield", "Bassetlaw", "Broxtowe", "Gedling", "Mansfield",
"Newark and Sherwood", "Rushcliffe", "Nottingham") ~ "Nottinghamshire",
areaName %in% c("Kettering", "Corby", "East Northamptonshire", "Wellingborough", "Daventry",
"Northampton", "South Northamptonshire") ~ "Northamptonshire",
areaName %in% c("Amber Valley", "Erewash", "Bolsover", "Chesterfield", "North East Derbyshire",
"High Peak", "Derbyshire Dales", "South Derbyshire", "Derby") ~ "Derbyshire",
areaName %in% c("North Warwickshire", "Nuneaton and Bedworth", "Rugby", "Stratford", "Warwick") ~
"Warwickshire",
TRUE ~ "Rest of England")) %>%
group_by(date, age, Region) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
ungroup() %>%
group_by(age, Region) %>%
arrange(date) %>%
mutate(cases_roll=roll_mean(cases, 7, align="center", fill=NA),
caserate_roll=cases_roll*100000/pop,
caserate=cases*100000/pop) %>%
ungroup()
agg_tiff("Outputs/COVIDCasesxHalfTerm1.tiff", units="in", width=10, height=6, res=500)
ggplot(plotdata %>% filter(age %in% c("5-9", "10-14", "15-19", "35-39", "40-44", "45-49") &
Region!="Rest of England"),
aes(x=date, y=caserate, colour=Region))+
geom_rect(aes(xmin=as.Date("2021-10-25"), xmax=as.Date("2021-10-29"),
ymin=0, ymax=550), fill="Grey90", colour=NA)+
geom_rect(aes(xmin=as.Date("2021-10-18"), xmax=as.Date("2021-10-22"),
ymin=0, ymax=550), fill="Deeppink", colour=NA, alpha=0.002)+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="New cases per 100,000 per day")+
scale_colour_manual(values=c("Grey60", "Deeppink", "Grey60", "Grey60", "Grey60"))+
facet_wrap(~age, scales="free_y")+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="COVID cases in Leicestershire compared to neighbouring counties",
subtitle="Daily rate of new COVID cases in selected age bands in Leicestershire, Derbyshire, Northamptonshire, Nottinghamshire and Warwickshire.\nColoured rectangles represent school half term dates.",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
plotdata2 <- data %>%
filter(date>as.Date("2021-10-01")) %>%
mutate(Region=case_when(
areaName %in% c("Blaby", "Charnwood", "Harborough", "Hinckley and Bosworth", "Melton",
"North West Leicestershire", "Oadby and Wigston", "Leicester") ~ "Leicestershire",
TRUE ~ "Rest of England")) %>%
group_by(date, age, Region) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
ungroup() %>%
group_by(age, Region) %>%
arrange(date) %>%
mutate(cases_roll=roll_mean(cases, 7, align="center", fill=NA),
caserate_roll=cases_roll*100000/pop,
caserate=cases*100000/pop) %>%
ungroup()
agg_tiff("Outputs/COVIDCasesxHalfTerm2.tiff", units="in", width=10, height=6, res=500)
ggplot(plotdata2 %>% filter(age %in% c("5-9", "10-14", "15-19", "35-39", "40-44", "45-49")),
aes(x=date, y=caserate, colour=Region))+
geom_rect(aes(xmin=as.Date("2021-10-18"), xmax=as.Date("2021-10-22"),
ymin=0, ymax=400), fill="Deeppink", colour=NA, alpha=0.005)+
geom_rect(aes(xmin=as.Date("2021-10-25"), xmax=as.Date("2021-10-29"),
ymin=0, ymax=400), fill="DodgerBlue", colour=NA, alpha=0.005)+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="New cases per 100,000 per day")+
scale_colour_manual(values=c("Deeppink","DodgerBlue"))+
facet_wrap(~age, scales="free_y")+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="COVID cases in Leicestershire started rising *slightly* before the rest of England",
subtitle="Daily rate of new COVID cases in selected age bands. Coloured rectangles represent school half term dates.",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesPhasePlotHighights.R
================================================
#You need to make sure all these packages are installed on your machine
library(tidyverse)
library(curl)
library(ragg)
library(ggtext)
library(readxl)
library(ggrepel)
library(lubridate)
#Define Local Authority/Authorities to highlight
highlightareas <- c("Barnsley", "Bradford", "Calderdale", "Doncaster", "Kirklees", "Leeds", "Craven",
"Rotherham", "Sheffield", "Wakefield", "Richmondshire", "Hambleton",
"York", "Selby", "Ryedale", "Scarborough")
#Pick title for areas for plot
areaname <- "Yorkshire"
#Define colour to pick out areas of interest
highlightcolour <- "#FF4E86"
#Start with LA level cases for the whole of the UK from the dashboard
cases <- tempfile()
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv"
cases <- curl_download(url=url, destfile=cases, quiet=FALSE, mode="wb")
#Tidy up the data
casedata <- read.csv(cases) %>%
mutate(date=as.Date(date)) %>%
group_by(areaName) %>%
arrange(date) %>%
rename(caserate=newCasesBySpecimenDateRollingRate) %>%
mutate(change=caserate-lag(caserate,7)) %>%
ungroup() %>%
rename("Lacode"="areaCode")
maxdate <- max(casedata$date)
#Bring in region
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LTLA", "Region")
casedata <- casedata %>%
merge(LADtoRegion, all.x=TRUE, by.x="Lacode", by.y="LTLA") %>%
mutate(Region=case_when(
Lacode %in% c("E07000244", "E07000245") ~ "East of England",
Lacode %in% c("E06000058", "E06000059", "E07000246") ~ "South West",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland",
TRUE ~ Region),
Country=case_when(
substr(Lacode, 1, 1) == "E" ~ "England",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland"))
#Bring in LA populations (this is only 2019 mid-year estimates, but we're only using them for a
#general sense of LA sizes, so the precise numbers aren't totally critical)
#If anyone wants to rewrite this for to 2020 populations then be my guest!
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D435", col_names=TRUE)
colnames(LApop) <- c("code", "name", "geography", "pop")
#Merge isles of Scilly in with Cornwall
LApop$code <- if_else(LApop$code=="E06000053", "E06000052", LApop$code)
LApop$name <- if_else(LApop$name=="Isles of Scilly", "Cornwall", LApop$name)
#Merge City of London & Hackney
LApop$code <- if_else(LApop$code=="E09000001", "E09000012", LApop$code)
LApop$name <- if_else(LApop$name=="City of London", "Hackney and City of London", LApop$name)
LApop$name <- if_else(LApop$name=="Hackney", "Hackney and City of London", LApop$name)
LApop <- LApop %>%
group_by(name, code) %>%
summarise(pop=sum(pop)) %>%
ungroup()
#Merge populations into case data
plotdata <- casedata %>%
merge(LApop, by.x="Lacode", by.y="code" , all.x=TRUE) %>%
mutate(dayssince=as.integer(maxdate-date)) %>%
arrange(date) %>%
#Add flag to pick out Local Authorities of interest
mutate(highlight=if_else(areaName %in% highlightareas, 1, 0))
#Create plot
plot <- ggplot()+
#Draw axes
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
#Draw all LA paths
geom_path(data=plotdata %>% filter(date>=maxdate-days(7)),
aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),
colour="Grey70", show.legend=FALSE)+
#Draw all LA points
geom_point(data=plotdata %>% filter(date==maxdate),
aes(x=caserate, y=change, size=pop), shape=21, alpha=0.5, colour="Grey50", fill="Grey70")+
#Draw highlighted area paths
geom_path(data=plotdata %>% filter(date>=maxdate-days(7) & highlight==1),
aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),
colour="Black", show.legend=FALSE)+
#Draw highlighted area points
geom_point(data=plotdata %>% filter(date==maxdate & highlight==1),
aes(x=caserate, y=change, size=pop), shape=21, alpha=0.9, colour="Black", fill=highlightcolour)+
#Label highlighted areas
geom_text_repel(data=plotdata %>% filter(date==maxdate & highlight==1),
aes(x=caserate, y=change, label=areaName), size=rel(2.3))+
scale_x_continuous(name="New cases in the past week\n(rate per 100,000)", limits=c(0,NA))+
scale_y_continuous(name="Change in case rate compared to the preceding week")+
scale_size(guide=FALSE)+
theme_classic()+
theme(axis.line=element_blank(), plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.6)),
plot.subtitle=element_markdown())+
labs(title="Trajectories of new COVID cases",
subtitle=paste0("COVID case rates and how these have changed in the past week in ", areaname, " compared to
other UK Local Authorities. Bubbles are sized by population. Trails represent each area's movement in the past week.
Data up to ",
maxdate),
caption="Data from coronavirus.data.gov.uk and ONS\nPlot by @VictimOfMaths")
#Write the plot out to the working directory
#You can choose either a .tiff or a .png by commenting out the one you don't want in these two lines:
agg_tiff("COVIDCasesPhasePlotHighlights.tiff", units="in", width=9, height=7, res=800)
#agg_png("COVIDCasesPhasePlotHighlights.png", units="in", width=9, height=7, res=800)
plot
dev.off()
================================================
FILE: Heatmaps/COVIDCasesSGTFNew.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(RcppRoll)
library(readODS)
library(paletteer)
library(extrafont)
library(ragg)
library(scales)
options(scipen=99999)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Read in case data by variant from UKHSA https://www.gov.uk/government/publications/covid-19-variants-genomically-confirmed-case-numbers
temp <- tempfile()
url <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1063376/variants-of-concern-technical-briefing-39-data-england-25-March-2022.ods")
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
seqdata <- read_ods(temp, sheet="Fig4", range="A3:H2418") %>%
mutate(specimen_date=as.Date(specimen_date, format="%d/%m/%Y"),
Variant=case_when(
specimen_date=as.Date("2022-01-10") & sgtf=="SGTP" ~ "BA.2",
sgtf=="SGTF" ~ "BA.1"),
Variant=factor(Variant, levels=c("Delta", "BA.1", "BA.2")))
ggplot(seqdata, aes(x=specimen_date, y=percent/100, fill=Variant))+
geom_area()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases sequenced", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("unikn::pal_unikn_pref")+
facet_wrap(~UKHSA_region)+
theme_custom()
#Bring in case data
temp2 <- tempfile()
url2 <- ("https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDate&format=csv")
temp2 <- curl_download(url=url2, destfile=temp2, quiet=FALSE, mode="wb")
casedata <- read.csv(temp2) %>%
select(2,4,5) %>%
set_names("UKHSA_region", "specimen_date", "Cases") %>%
mutate(specimen_date=as.Date(specimen_date),
cases_roll=roll_mean(Cases, n=7, align="center", fill=NA))
data <- merge(seqdata, casedata) %>%
mutate(seqCases=percent*cases_roll/100)
natdata <- data %>%
group_by(specimen_date, Variant) %>%
summarise(seqCases=sum(seqCases)) %>%
ungroup()
ggplot(data, aes(x=specimen_date, y=seqCases, fill=Variant))+
geom_area(position="identity", alpha=0.6)+
scale_y_continuous(name="Estimated total cases per day")+
scale_fill_manual(values=c("#4AB2B8", "#F6871F", "#ED1C24"), name="")+
scale_colour_manual(values=c("#4AB2B8", "#F6871F", "#ED1C24"), name="")+
facet_wrap(~UKHSA_region)+
theme_custom()+
labs()
agg_png("Outputs/COVIDSGTFCases.png", units="in", width=8, height=6, res=800)
ggplot(natdata, aes(x=specimen_date, y=seqCases, fill=Variant, colour=Variant))+
geom_area(position="identity", alpha=0.6)+
scale_x_date(name="")+
scale_y_continuous(name="Estimated total cases per day")+
scale_fill_manual(values=c("#4AB2B8", "#F6871F", "#ED1C24"), name="")+
scale_colour_manual(values=c("#4AB2B8", "#F6871F", "#ED1C24"), name="")+
theme_custom()+
labs(title="BA.2's rise to dominance has been slower than BA.1's",
subtitle="Estimated number of daily cases by variant, based on confirmed case data apportioned between variants\nusing SGTF data up to 22nd March",
caption="Data from TaqPath/UKHSA | Plot by @VictimOfMaths")
dev.off()
agg_png("Outputs/COVIDSGTFCasesProp.png", units="in", width=8, height=6, res=800)
ggplot(natdata, aes(x=specimen_date, y=seqCases, fill=Variant, colour=Variant))+
geom_area(position="fill", alpha=0.6)+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of sequenced cases", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#4AB2B8", "#F6871F", "#ED1C24"), name="")+
scale_colour_manual(values=c("#4AB2B8", "#F6871F", "#ED1C24"), name="")+
theme_custom()+
labs(title="BA.2's rise to dominance has been slower than BA.1's",
subtitle="Proportion of daily cases sequenced in England by variant, based on SGTF data up to 22nd March",
caption="Data from TaqPath/UKHSA | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesSince100k.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(paletteer)
library(ggrepel)
library(extrafont)
library(ragg)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&metric=newCasesBySpecimenDateRollingSum&format=csv"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- read.csv(temp) %>%
rename(casesum=newCasesBySpecimenDateRollingSum, caserate=newCasesBySpecimenDateRollingRate) %>%
mutate(date=as.Date(date), country=case_when(
substr(areaCode, 1, 1)=="E" ~ "England",
substr(areaCode, 1, 1)=="S" ~ "Scotland",
substr(areaCode, 1, 1)=="W" ~ "Wales",
substr(areaCode, 1, 1)=="N" ~ "Northern Ireland"),
pop=casesum*100000/caserate)
#Pick out date cases first exceeded 100/100,000 in 7-day period since 1st May
data <- rawdata %>%
merge(rawdata %>%
group_by(areaName, areaCode) %>%
filter(date>as.Date("2021-05-01") & caserate>100) %>%
summarise(startdate=min(date)) %>%
ungroup() %>%
select(areaCode, startdate), by="areaCode", all.x=TRUE) %>%
mutate(dayssince=as.integer(if_else(date-startdate>=0, date-startdate, NA_real_)))
agg_tiff("Outputs/COVIDCasesSince100k.tiff", units="in", width=9, height=7, res=800)
ggplot()+
geom_line(data=data %>% filter(dayssince>=0), aes(x=dayssince, y=caserate, group=areaName), colour="Grey80")+
geom_line(data=data %>% filter(dayssince>=0 & areaName %in% c("Bolton", "Blackburn with Darwen")),
aes(x=dayssince, y=caserate, group=areaName), colour="Black")+
geom_point(data=data %>% filter(date==max(date)),
aes(x=dayssince, y=caserate, fill=country, size=pop),
shape=21, alpha=0.7)+
geom_text_repel(data=data %>% filter(date==max(date)),
aes(x=dayssince, y=caserate, label=areaName), size=rel(2.3),
box.padding=0.5)+
scale_x_continuous(name="Days since cases first passed 100/100,000")+
scale_y_continuous(name="Weekly cases per 100,000 people")+
scale_fill_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_custom()+
theme(legend.position="top")+
labs(title="Local Delta variant outbreaks seem to follow different trajectories",
subtitle=paste0("Rolling 7-day average of new COVID case rates in UK Local Authorities since the date that cases within that area\nfirst exceeded 100/100,000 in the current wave. Date up to ",
max(data$date), ". Bubbles are sized by area population."),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesSince100kxTime.tiff", units="in", width=9, height=7, res=800)
ggplot()+
geom_line(data=data %>% filter(dayssince>=0), aes(x=date, y=caserate, group=areaName), colour="Grey80")+
geom_line(data=data %>% filter(dayssince>=0 & areaName %in% c("Bolton", "Blackburn with Darwen")),
aes(x=date, y=caserate, group=areaName, colour=areaName))+
#geom_point(data=data %>% filter(date==max(date)),
# aes(x=date, y=caserate, fill=country, size=pop),
# shape=21, alpha=0.7)+
#geom_text_repel(data=data %>% filter(date==max(date)),
# aes(x=date, y=caserate, label=areaName), size=rel(2.3),
# box.padding=0.5)+
scale_x_date(name="")+
scale_y_continuous(name="Weekly cases per 100,000 people")+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_size(guide=FALSE)+
theme_custom()+
theme(legend.position="top")+
labs(title="The Delta wave in Bolton and Blackburn is far from over",
subtitle=paste0("Rolling 7-day average of new COVID case rates in UK Local Authorities since the date that cases within that area\nfirst exceeded 100/100,000 in the current wave. Date up to ",
max(data$date)),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesVaxxIMD.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(RcppRoll)
library(readxl)
library(gtools)
library(paletteer)
library(extrafont)
library(ragg)
library(scales)
library(forcats)
options(scipen=99999)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Start by calculating IMD at MSOA level
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE) %>%
select(c(1,2,5,6)) %>%
set_names("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, LAD17CD) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:G34758", col_names=FALSE) %>%
select(-c(2:6)) %>%
set_names("LSOA11CD", "pop")
pop_full <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:CT34758", col_names=FALSE) %>%
select(-c(2:7)) %>%
set_names("LSOA11CD", c(0:90))
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD, LAD17CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))
IMD_LTLA <- IMD %>%
mutate(LAD17CD=case_when(
LAD17CD %in% c("E07000049", "E07000050", "E07000051", "E07000052", "E07000053") ~ "E06000059",
LAD17CD %in% c("E06000028", "E06000029", "E07000048") ~ "E06000058",
LAD17CD %in% c("E07000201", "E07000204") ~ "E07000245",
LAD17CD %in% c("E07000205", "E07000206") ~ "E07000244",
LAD17CD %in% c("E07000190", "E07000191") ~ "E07000246",
TRUE ~ LAD17CD)) %>%
group_by(LAD17CD)%>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))
pop_LTLA <- pop_full %>%
gather(age, pop, c(2:ncol(.))) %>%
mutate(age=case_when(
age<5 ~ "00_04", age<10 ~ "05_09", age<15 ~ "10_14", age<20 ~ "15_19", age<25 ~ "20_24",
age<30 ~ "25_29", age<35 ~ "30_34", age<40 ~ "35_39", age<45 ~ "40_44", age<50 ~ "45_49",
age<55 ~ "50_54", age<60 ~ "55_59", age<65 ~ "60_64", age<70 ~ "65_69", age<75 ~ "70_74",
age<80 ~ "75_79", age<85 ~ "80_84", age<90 ~ "85_89", TRUE ~ "90+")) %>%
group_by(age, LSOA11CD) %>%
summarise(pop=sum(pop)) %>%
ungroup() %>%
merge(lookup) %>%
mutate(LAD17CD=case_when(
LAD17CD %in% c("E07000049", "E07000050", "E07000051", "E07000052", "E07000053") ~ "E06000059",
LAD17CD %in% c("E06000028", "E06000029", "E07000048") ~ "E06000058",
LAD17CD %in% c("E07000201", "E07000204") ~ "E07000245",
LAD17CD %in% c("E07000205", "E07000206") ~ "E07000244",
LAD17CD %in% c("E07000190", "E07000191") ~ "E07000246",
TRUE ~ LAD17CD)) %>%
group_by(age, LAD17CD) %>%
summarise(pop=sum(pop)) %>%
ungroup()
pop_LTLA_vax <- pop_full %>%
gather(age, pop, c(2:ncol(.))) %>%
mutate(age=case_when(
age<18 ~ "Under18", age<25 ~ "18-24", age<30 ~ "25-29", age<35 ~ "30-34", age<40 ~ "35-39",
age<45 ~ "40-44", age<50 ~ "45-49", age<55 ~ "50-54", age<60 ~ "55-59", age<65 ~ "60-64",
age<70 ~ "65-69", age<75 ~ "70-74", age<80 ~ "75-79", TRUE ~ "80+")) %>%
group_by(age, LSOA11CD) %>%
summarise(pop=sum(pop)) %>%
ungroup() %>%
merge(lookup) %>%
mutate(LAD17CD=case_when(
LAD17CD %in% c("E07000049", "E07000050", "E07000051", "E07000052", "E07000053") ~ "E06000059",
LAD17CD %in% c("E06000028", "E06000029", "E07000048") ~ "E06000058",
LAD17CD %in% c("E07000201", "E07000204") ~ "E07000245",
LAD17CD %in% c("E07000205", "E07000206") ~ "E07000244",
LAD17CD %in% c("E07000190", "E07000191") ~ "E07000246",
TRUE ~ LAD17CD)) %>%
group_by(age, LAD17CD) %>%
summarise(pop=sum(pop)) %>%
ungroup()
#Bring in age-stratified cases by LTLA
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
casedata <- read.csv(temp) %>%
select(areaCode, areaName, date, age, cases) %>%
filter(!age %in% c("00_59", "60+", "unassigned")) %>%
merge(pop_LTLA, by.x=c("age", "areaCode"), by.y=c("age", "LAD17CD")) %>%
merge(IMD_LTLA %>% select(-pop), by.x="areaCode", by.y="LAD17CD") %>%
mutate(date=as.Date(date), decile=as.factor(decile)) %>%
#collapse to IMD deciles
group_by(date, age, decile) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
ungroup() %>%
#age-standardise
mutate(caserate=cases*100000/pop,
stdpop=case_when(
age %in% c("00_04", "70_74") ~ 5000,
age %in% c("05_09", "10_14", "15_19", "65_69") ~ 5500,
age %in% c("20_24", "25_29", "60_64") ~ 6000,
age %in% c("30_34", "55_59") ~ 6500,
age %in% c("35_39", "40_44", "45_49", "50_54") ~ 7000,
age=="75_79" ~ 4000,
age=="80_84" ~ 2500,
age=="85_89" ~ 1500,
age=="90+" ~ 1000)) %>%
group_by(date, decile) %>%
arrange(date, decile) %>%
summarise(as_caserate=weighted.mean(caserate, stdpop)) %>%
ungroup() %>%
group_by(decile) %>%
mutate(as_caserate_roll=roll_mean(as_caserate, 7, align="center", fill=NA)) %>%
ungroup()
agg_tiff("Outputs/COVIDCasesxIMDAS.tiff", units="in", width=8, height=6, res=800)
ggplot(casedata, aes(x=as.Date(date), y=as_caserate_roll, colour=decile))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Cases per 100,000 (age-standardised)")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()
dev.off()
agg_tiff("Outputs/COVIDCasesxIMDASRecent.tiff", units="in", width=8, height=6, res=800)
ggplot(casedata %>% filter(date>as.Date("2021-06-01")),
aes(x=as.Date(date), y=as_caserate_roll, colour=decile))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Cases per 100,000 (age-standardised)")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="Omicron has hit more deprived areas harder",
subtitle="Rolling 7-day average rate of age-standardised new COVID cases by decile of the Index of Multiple Deprivation",
caption="Data from coronavirus.data.gov.uk and ONS | Plot by @VictimOfMaths")
dev.off()
#LA-level age-standardised cases
casedata_LA <- read.csv(temp) %>%
select(areaCode, areaName, date, age, cases) %>%
filter(!age %in% c("00_59", "60+", "unassigned")) %>%
merge(pop_LTLA, by.x=c("age", "areaCode"), by.y=c("age", "LAD17CD")) %>%
merge(IMD_LTLA %>% select(-pop), by.x="areaCode", by.y="LAD17CD") %>%
mutate(date=as.Date(date), decile=as.factor(decile)) %>%
#age-standardise
mutate(caserate=cases*100000/pop,
stdpop=case_when(
age %in% c("00_04", "70_74") ~ 5000,
age %in% c("05_09", "10_14", "15_19", "65_69") ~ 5500,
age %in% c("20_24", "25_29", "60_64") ~ 6000,
age %in% c("30_34", "55_59") ~ 6500,
age %in% c("35_39", "40_44", "45_49", "50_54") ~ 7000,
age=="75_79" ~ 4000,
age=="80_84" ~ 2500,
age=="85_89" ~ 1500,
age=="90+" ~ 1000)) %>%
group_by(date, areaCode, areaName) %>%
arrange(date) %>%
summarise(as_caserate=weighted.mean(caserate, stdpop)) %>%
ungroup() %>%
group_by(areaName, areaCode) %>%
mutate(as_caserate_roll=roll_mean(as_caserate, 7, align="center", fill=NA)) %>%
ungroup()
###############################
#Calculate age-standardised vaccination rates by IMD
#Download data from NHS England
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-weekly-announced-vaccinations-13-January-2022.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
vaxdata_LA <- read_excel(temp, sheet="LTLA", range="F15:AZ321", col_names=FALSE) %>%
select(c(1:17, 19:32, 34:47)) %>%
set_names("LAD17CD", "areaName", "12-15_1st", "16-17_1st", "18-24_1st", "25-29_1st", "30-34_1st",
"35-39_1st", "40-44_1st", "45-49_1st", "50-54_1st", "55-59_1st", "60-64_1st",
"65-69_1st", "70-74_1st", "75-79_1st", "80+_1st", "Under18_2nd", "18-24_2nd",
"25-29_2nd", "30-34_2nd", "35-39_2nd", "40-44_2nd", "45-49_2nd", "50-54_2nd",
"55-59_2nd", "60-64_2nd", "65-69_2nd", "70-74_2nd", "75-79_2nd", "80+_2nd",
"Under18_3rd", "18-24_3rd", "25-29_3rd", "30-34_3rd", "35-39_3rd", "40-44_3rd",
"45-49_3rd", "50-54_3rd", "55-59_3rd", "60-64_3rd", "65-69_3rd", "70-74_3rd",
"75-79_3rd", "80+_3rd") %>%
mutate(`Under18_1st`=`12-15_1st`+`16-17_1st`) %>%
select(-c("12-15_1st", "16-17_1st")) %>%
pivot_longer(cols=c(3:44), names_to=c("age", "dose"), names_sep="_", values_to="vaxxed") %>%
merge(pop_LTLA_vax) %>%
mutate(vaxrate=vaxxed/pop,
stdpop=case_when(
age=="Under18" ~ 5000+5500+5500+5500*4/5,
age=="18-24" ~ 5500*4/5+6000,
age %in% c("25-29", "60-64") ~ 6000,
age %in% c("30-34", "55-59") ~ 6500,
age %in% c("35-39", "40-44", "45-49", "50-54") ~ 7000,
age=="65-69" ~ 5500,
age=="70-74" ~ 5000,
age=="75-79" ~ 4000,
age=="80+" ~ 2500+1500+1000)) %>%
group_by(LAD17CD, dose) %>%
summarise(as_vaxrate=weighted.mean(vaxrate, stdpop)) %>%
ungroup()
LAcasesxvax <- casedata_LA %>%
filter(date==max(date[!is.na(as_caserate_roll)])) %>%
merge(vaxdata_LA, by.x="areaCode", by.y="LAD17CD") %>%
merge(IMD_LTLA, by.x="areaCode", by.y="LAD17CD")
agg_tiff("Outputs/COVIDCasesxVaxIMDAS.tiff", units="in", width=12, height=6, res=800)
ggplot(LAcasesxvax, aes(x=as_vaxrate, y=as_caserate_roll, fill=as.factor(decile)))+
geom_point(shape=21)+
scale_y_continuous(name="Cases per 100,000 (age-standardised)", limits=c(0,NA))+
scale_x_continuous(name="Age-standardised vaccination rate (two doses)",
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
facet_wrap(~dose)+
theme_custom()+
labs(title="Less deprived Local Authorities have higher vaccination rates, but more cases",
subtitle="Rolling 7-day average age-standardised rate of new COVID cases and age-standardised vaccination rates for\nEnglish Local Authorities",
caption="Data from coronavirus.data.gov.uk, NHS England and ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxVaxIMDAS3rdDose.tiff", units="in", width=8, height=6, res=800)
ggplot(LAcasesxvax %>% filter(dose=="3rd"),
aes(x=as_vaxrate, y=as_caserate_roll, fill=as.factor(decile)))+
geom_point(shape=21)+
scale_y_continuous(name="Cases per 100,000 (age-standardised)", limits=c(0,NA))+
scale_x_continuous(name="Age-standardised vaccination rate (two doses)",
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()+
labs(title="More deprived areas have lower booster coverage and more cases",
subtitle="Rolling 7-day average age-standardised rate of new COVID cases and age-standardised 3rd dose/booster vaccination\nrates for English Local Authorities",
caption="Data from coronavirus.data.gov.uk, NHS England and ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesvsCFR.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(arrow)
library(readxl)
library(RcppRoll)
library(scales)
library(lubridate)
library(extrafont)
library(ragg)
library(paletteer)
library(ggrepel)
temp=tempfile()
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- read_csv_arrow(temp) %>%
filter(!age %in% c("unassigned", "00_59", "60+")) %>%
mutate(date=as.Date(date),
age=case_when(
age=="00_04" ~ "0_4",
age=="05_09" ~ "5_9",
TRUE ~ age),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+")))
#Read in CFR data provided by Dan Howdon
CFRdata <- read.csv("Data/cfrs_2021_06_16.csv") %>%
mutate(age=case_when(
agegroup==0 ~ "0-4", agegroup==5 ~ "5-9", agegroup==10 ~ "10-14", agegroup==15 ~ "15-19",
agegroup==20 ~ "20-24", agegroup==25 ~ "25-29", agegroup==30 ~ "30-34",
agegroup==35 ~ "35-39", agegroup==40 ~ "40-44", agegroup==45 ~ "45-49",
agegroup==50 ~ "50-54", agegroup==55 ~ "55-59", agegroup==60 ~ "60-64",
agegroup==65 ~ "65-69", agegroup==70 ~ "70-74", agegroup==75 ~ "75-79",
agegroup==80 ~ "80-84", agegroup==85 ~ "85-89", TRUE ~ "90+"),
date=as.Date(date, format="%d/%m/%Y"),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+")))
agg_tiff("Outputs/COVIDCFRs.tiff", units="in", width=12, height=7, res=800)
ggplot(CFRdata %>% filter(date>as.Date("2020-06-01")), aes(x=date, y=cfr_month, colour=age))+
geom_line(show.legend=FALSE)+
scale_x_date(labels=label_date(format="%b-%Y"), name="")+
scale_y_continuous(labels=label_percent(accuracy=0.01), name="Case Fatality Rate",
limits=c(0,NA))+
scale_colour_paletteer_d("pals::stepped")+
facet_wrap(~age, scales="free_y", ncol=4)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.8)),
plot.title.position="plot")+
labs(title="Case Fatality Rates for COVID have varied a lot over the past year",
subtitle="Proportion of people testing positive for COVID who die (of any cause) within 28 days, by age group",
caption="CFRs calculated by Daniel Howdon\nPlot by @VictimOfMaths")
dev.off()
ggplot(CFRdata %>% filter(date>as.Date("2021-01-01") & age %in% c("55-59", "60-64",
"65-69", "70-74", "75-79",
"80-84", "85-89", "90+")),
aes(x=date, y=cfr_month, colour=age))+
geom_line()+
scale_x_date(labels=label_date(format="%b-%Y"), name="")+
scale_y_continuous(labels=label_percent(accuracy=1), name="Case Fatality Rate",
limits=c(0,NA))+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.8)),
plot.title.position="plot")+
labs(title="Case Fatality Rates for COVID have varied a lot over the past year",
subtitle="Proportion of people testing positive for COVID who die (of any cause) within 28 days, by age group",
caption="CFRs calculated by Daniel Howdon\nPlot by @VictimOfMaths")
#Index to CFR on 1st Jan
CFR2 <- merge(CFRdata, CFRdata %>%
filter(date==as.Date("2021-01-01")) %>%
select(age, cfr_month) %>%
rename(indexcfr=cfr_month), by="age") %>%
mutate(indexed=cfr_month/indexcfr, percchance=(cfr_month-indexcfr)/indexcfr)
agg_tiff("Outputs/COVIDCFRChanges.tiff", units="in", width=10, height=7, res=800)
ggplot(CFR2 %>% filter(date>=as.Date("2021-01-01") & age %in% c("55-59", "60-64",
"65-69", "70-74", "75-79",
"80-84", "85-89", "90+")),
aes(x=date, y=percchance, colour=age))+
geom_hline(yintercept=0, colour="Grey70", linetype=2)+
geom_line()+
scale_x_date(labels=label_date(format="%b-%Y"), name="")+
scale_y_continuous(labels=label_percent(accuracy=1), name="Change in Case Fatality Rate")+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.8)),
plot.title.position="plot")+
labs(title="Case Fatality Rates for COVID have fallen in all age groups in 2021",
subtitle="Change in age-specific Case Fatality Rates based on deaths within 28 days of a positive test since 1st January",
caption="CFRs calculated by Daniel Howdon\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCFRChanges2.tiff", units="in", width=12, height=7, res=800)
ggplot(CFR2 %>% filter(date>=as.Date("2021-01-01") & !age %in% c("0-4", "5-9", "10-14", "15-19",
"20-24")),
aes(x=date, y=percchance, colour=age))+
geom_hline(yintercept=0, colour="Grey70", linetype=2)+
geom_line(show.legend=FALSE)+
scale_x_date(labels=label_date(format="%b"), name="")+
scale_y_continuous(labels=label_percent(accuracy=1), name="Change in Case Fatality Rate")+
#scale_colour_paletteer_d("awtools::a_palette", name="Age")+
facet_wrap(~age)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.8)),
plot.title.position="plot")+
labs(title="Case Fatality Rates for COVID have fallen in all age groups in 2021",
subtitle="Change in age-specific Case Fatality Rates based on deaths within 28 days of a positive test since 1st January",
caption="CFRs calculated by Daniel Howdon\nPlot by @VictimOfMaths")
dev.off()
maxCFRdate <- max(CFRdata$date[!is.na(CFRdata$cfr_month)])
#Just extract the most recent monthly CFRs
CFRs <- CFRdata %>%
filter(date==maxCFRdate) %>%
mutate(CFR=cfr_month*100) %>%
select(age, CFR)
#Here are the latest age-specific CFRs:
#CFRs <- tibble::tribble(
# ~age, ~CFR,
# "0-4", 0,
# "5-9", 0,
# "10-14", 0,
# "15-19", 0.02164,
# "20-24", 0,
# "25-29", 0,
# "30-34", 0,
# "35-39", 0.0242269,
# "40-44", 0.0289471,
# "45-49", 0.2123436,
# "50-54", 0.2208057,
# "55-59", 0.5648288,
# "60-64", 0.4692304,
# "65-69", 3.5336073,
# "70-74", 4.1047055,
# "75-79", 6.2152125,
# "80-84", 11.6088927,
# "85-89", 16.7702883,
# "90+", 22.6581156)
data <- merge(rawdata, CFRs) %>%
mutate(ex_deaths=cases*CFR/100) %>%
group_by(areaName, areaCode, date) %>%
summarise(ex_deaths=sum(ex_deaths), cases=sum(cases)) %>%
ungroup()
#Bring in populations
#Bring in LA populations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D435", col_names=TRUE)
colnames(LApop) <- c("areaCode", "name", "geography", "pop")
#Merge isles of Scilly in with Cornwall
LApop$code <- if_else(LApop$areaCode=="E06000053", "E06000052", LApop$code)
LApop$name <- if_else(LApop$name=="Isles of Scilly", "Cornwall", LApop$name)
#Merge City of London & Hackney
LApop$code <- if_else(LApop$areaCode=="E09000001", "E09000012", LApop$code)
LApop$name <- if_else(LApop$name=="City of London", "Hackney and City of London", LApop$name)
LApop$name <- if_else(LApop$name=="Hackney", "Hackney and City of London", LApop$name)
LApop <- LApop %>%
group_by(name, areaCode) %>%
summarise(pop=sum(pop)) %>%
ungroup()
#Bring in region
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LTLA", "Region")
data <- data %>%
merge(LADtoRegion, all.x=TRUE, by.x="areaCode", by.y="LTLA") %>%
mutate(Region=case_when(
areaCode %in% c("E07000244", "E07000245") ~ "East of England",
areaCode %in% c("E06000058", "E06000059", "E07000246") ~ "South West",
TRUE ~ Region))
plotdata <- data %>%
merge(LApop) %>%
mutate(caserate=cases*100000/pop,
deathspercase=ex_deaths/cases) %>%
#take rolling averages
group_by(areaCode, areaName) %>%
arrange(date) %>%
mutate(deathsroll=roll_mean(deathspercase, 7, align="center", fill=NA),
casesroll=roll_mean(caserate, 7, align="center", fill=NA),
flag=if_else(date %in% c(as.Date("2020-10-23"), as.Date("2020-12-08"),
as.Date("2020-04-10"), as.Date("2021-01-06"),
as.Date("2020-07-10"), max(date)-days(3)), 1, 0),
ex_deathsroll=deathsroll*casesroll) %>%
ungroup()
Boltonpop <- unique(plotdata$pop[plotdata$areaName=="Bolton"])
agg_tiff("Outputs/COVIDCasevsMortPropBolton.tiff", units="in", width=8, height=8, res=800)
ggplot()+
geom_path(data=plotdata %>% filter(areaName=="Bolton"),
aes(x=deathsroll, y=casesroll, alpha=date), show.legend=FALSE, colour="Red4")+
geom_point(data=plotdata %>% filter(areaName=="Bolton" & flag==1),
aes(x=deathsroll, y=casesroll), colour="Red4")+
geom_text(data=plotdata %>% filter(areaName=="Bolton" & flag==1),
aes(x=deathsroll, y=casesroll, label=date %>% format("%d-%b-%y")), colour="Grey30",
hjust=-0.1, size=3)+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
scale_x_continuous(name="Proportion of cases expected to lead to death",
labels=label_percent(accuracy=1),
limits=c(0,max(plotdata$deathsroll[plotdata$areaName=="Bolton"],
na.rm=TRUE)*1.05))+
scale_y_continuous(name="Daily cases per 100,000")+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.title.position = "plot")+
labs(title="Case rates in Bolton are high, but the younger age profile means we should\nexpect far fewer deaths than in previous waves",
subtitle="Rolling 7-day average daily case rates compared to the expected proportion of cases which lead to a death\nwithin 28 days, based on age-specific Case Fatality Rates.",
caption="Case data from coronavirus.data.gov.uk\nCFRs estimated by Daniel Howden\nPlot by @VictimOfMaths")
dev.off()
#version with countours
agg_tiff("Outputs/COVIDCasevsMortPropBoltonIso.tiff", units="in", width=8, height=8, res=800)
ggplot()+
geom_line(data=plotdata, aes(x=deathsroll, y=0.25*100000/(Boltonpop*deathsroll)), colour="SkyBlue")+
geom_line(data=plotdata, aes(x=deathsroll, y=1*100000/(Boltonpop*deathsroll)), colour="SkyBlue")+
geom_line(data=plotdata, aes(x=deathsroll, y=2.5*100000/(Boltonpop*deathsroll)), colour="SkyBlue")+
geom_path(data=plotdata %>% filter(areaName=="Bolton"),
aes(x=deathsroll, y=casesroll, colour=date), show.legend=FALSE)+
geom_point(data=plotdata %>% filter(areaName=="Bolton" & flag==1),
aes(x=deathsroll, y=casesroll), colour="Red4")+
geom_text(data=plotdata %>% filter(areaName=="Bolton" & flag==1),
aes(x=deathsroll, y=casesroll, label=date %>% format("%d-%b-%y")), colour="Grey30",
hjust=-0.1, size=3)+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
scale_x_continuous(name="Proportion of cases expected to lead to death",
labels=label_percent(accuracy=1),
limits=c(0,max(plotdata$deathsroll[plotdata$areaName=="Bolton"],
na.rm=TRUE)*1.05))+
scale_y_continuous(name="Daily cases per 100,000",
limits=c(0,max(plotdata$casesroll[plotdata$areaName=="Bolton"],
na.rm=TRUE)*1.05))+
scale_colour_viridis_c(option="rocket", direction=-1)+
annotate("text", x=0.045, y=3.5, angle=-2, label="0.25 deaths/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.035, y=12, angle=-14, label="1 deaths/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.035, y=27, angle=-32, label="2.5 death/day", colour="SkyBlue", family="Lato",
size=3)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.title.position = "plot")+
labs(title="Case rates in Bolton are high, but the younger age profile means we should\nexpect far fewer deaths than in previous waves",
subtitle="Centered rolling 7-day average daily case rates compared to the expected proportion of cases which lead to a death\nwithin 28 days, based on age-specific Case Fatality Rates.",
caption="Case data from coronavirus.data.gov.uk\nCFRs estimated by Daniel Howden\nPlot by @VictimOfMaths")
dev.off()
LA <- "Blackburn with Darwen"
LApop <- unique(plotdata$pop[plotdata$areaName==LA])
view(plotdata %>% filter(areaName==LA))
plotdata <- plotdata %>%
mutate(flag=if_else(date %in% c(as.Date("2021-01-05"), as.Date("2020-10-05"),
#as.Date("2020-10-04"), as.Date("2020-12-09"),
as.Date("2020-03-25"), max(date)-days(4)), 1, 0))
agg_tiff(paste0("Outputs/COVIDCasevsMortProp", LA, "Iso.tiff"), units="in", width=8, height=8, res=800)
ggplot()+
geom_line(data=plotdata, aes(x=deathsroll, y=0.25*100000/(LApop*deathsroll)), colour="SkyBlue")+
geom_line(data=plotdata, aes(x=deathsroll, y=1*100000/(LApop*deathsroll)), colour="SkyBlue")+
geom_line(data=plotdata, aes(x=deathsroll, y=2.5*100000/(LApop*deathsroll)), colour="SkyBlue")+
geom_line(data=plotdata, aes(x=deathsroll, y=5*100000/(LApop*deathsroll)), colour="SkyBlue")+
geom_path(data=plotdata %>% filter(areaName==LA),
aes(x=deathsroll, y=casesroll, colour=date), show.legend=FALSE)+
geom_point(data=plotdata %>% filter(areaName==LA & flag==1),
aes(x=deathsroll, y=casesroll), colour="Red4")+
geom_text(data=plotdata %>% filter(areaName==LA & flag==1),
aes(x=deathsroll, y=casesroll, label=date %>% format("%d-%b-%y")), colour="Grey30",
hjust=-0.1, size=3)+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
scale_x_continuous(name="Proportion of cases expected to lead to death",
labels=label_percent(accuracy=1),
limits=c(0,max(plotdata$deathsroll[plotdata$areaName==LA],
na.rm=TRUE)*1.05))+
scale_y_continuous(name="Daily cases per 100,000",
limits=c(0,max(plotdata$casesroll[plotdata$areaName==LA],
na.rm=TRUE)*1.05))+
scale_colour_viridis_c(option="rocket", direction=-1)+
annotate("text", x=0.04, y=6, angle=-5, label="0.25 deaths/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.04, y=19, angle=-12, label="1 death/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.04, y=45, angle=-33, label="2.5 deaths/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.04, y=88, angle=-52, label="5 deaths/day", colour="SkyBlue", family="Lato",
size=3)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.title.position = "plot")+
labs(title=paste0("Evolution of COVID cases and associated mortality risk in ", LA),
subtitle="Centered rolling 7-day average daily case rates compared to the expected proportion of cases which lead to a death\nwithin 28 days, based on age-specific Case Fatality Rates.",
caption="Case data from coronavirus.data.gov.uk\nCFRs estimated by Daniel Howden\nPlot by @VictimOfMaths")
dev.off()
newmax=max(plotdata$date[!is.na(plotdata$casesroll)])
#newmax=as.Date("2020-11-10")
xmax=max(plotdata$deathsroll[plotdata$date==newmax], na.rm=TRUE)*1.05
ymax=max(plotdata$casesroll[plotdata$date==newmax], na.rm=TRUE)*1.05
view(plotdata %>% filter(date==newmax))
#ggplot(plotdata %>% filter(date==max(date)-days(3)),
agg_tiff("Outputs/COVIDCasevsMortPropIsoAllLTLAs3.tiff", units="in", width=8, height=7, res=800)
ggplot()+
geom_line(data=plotdata,
aes(x=deathsroll, y=0.25/deathsroll), colour="SkyBlue")+
geom_line(data=plotdata,
aes(x=deathsroll, y=1/deathsroll), colour="SkyBlue")+
geom_line(data=plotdata,
aes(x=deathsroll, y=2.5/deathsroll), colour="SkyBlue")+
geom_line(data=plotdata,
aes(x=deathsroll, y=5/deathsroll), colour="SkyBlue")+
geom_point(data=plotdata %>% filter(date==newmax),
aes(x=deathsroll, y=casesroll, size=pop, fill=Region), shape=21, alpha=0.7)+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_text_repel(data=plotdata %>% filter(date==newmax),
aes(x=deathsroll, y=casesroll,label=areaName), size=rel(2.5))+
scale_x_continuous(name="Proportion of cases expected to lead to death",
labels=label_percent(accuracy=1),
limits=c(0,0.05))+
scale_y_continuous(name="Daily cases per 100,000",
limits=c(0,250))+
scale_fill_paletteer_d("LaCroixColoR::paired")+
scale_size(guide=FALSE)+
annotate("text", x=0.039, y=10, angle=-2, label="0.25 deaths/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.041, y=28, angle=-6, label="1 death/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.043, y=63, angle=-15, label="2.5 deaths/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.045, y=117, angle=-26, label="5 deaths/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.title.position = "plot",
plot.caption.position="plot")+
labs(title="Current fatality rates are much lower than in previous waves",
subtitle=paste0("Centered rolling 7-day average daily case rates compared to the expected proportion of cases which lead to a death\nwithin 28 days, based on age-specific Case Fatality Rates. Data from ", format(newmax,"%d-%b-%Y")),
caption="Data from coronavirus.data.gov.uk\nCFRs estimated by Daniel Howdon\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasevsMortPropIsoAllLTLAs.tiff", units="in", width=8, height=7, res=800)
ggplot()+
geom_line(data=plotdata,
aes(x=deathsroll, y=0.25/deathsroll), colour="SkyBlue")+
geom_line(data=plotdata,
aes(x=deathsroll, y=1/deathsroll), colour="SkyBlue")+
#geom_line(data=plotdata,
# aes(x=deathsroll, y=2.5/deathsroll), colour="SkyBlue")+
geom_point(data=plotdata %>% filter(date==newmax),
aes(x=deathsroll, y=casesroll, size=pop, fill=Region), shape=21, alpha=0.7)+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
geom_text_repel(data=plotdata %>% filter(date==newmax),
aes(x=deathsroll, y=casesroll,label=areaName), size=rel(2.5))+
scale_x_continuous(name="Proportion of cases expected to lead to death",
labels=label_percent(accuracy=1), #trans="log")+
limits=c(0,0.03))+
scale_y_continuous(name="Daily cases per 100,000", #trans="log")+
limits=c(0,90))+
scale_fill_paletteer_d("LaCroixColoR::paired")+
scale_size(guide=FALSE)+
annotate("text", x=0.02, y=15, angle=-12, label="0.25 deaths/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.023, y=46, angle=-32, label="1 death/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
#annotate("text", x=0.026, y=67, angle=-44, label="2.5 deaths/day", colour="SkyBlue", family="Lato",
# size=3)+
theme_classic()+
theme(axis.line=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.title.position = "plot",
plot.caption.position="plot")+
labs(title="Even in areas with high case rates, we can expect relatively low COVID death rates",
subtitle=paste0("Centered rolling 7-day average daily case rates compared to the expected proportion of cases which lead to a death\nwithin 28 days, based on age-specific Case Fatality Rates. Data from ", format(newmax,"%d-%b-%Y")),
caption="Data from coronavirus.data.gov.uk\nCFRs estimated by Daniel Howdon\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasevsMortPropIsoAllLTLAsLog.tiff", units="in", width=8, height=7, res=800)
ggplot()+
geom_line(data=plotdata,
aes(x=deathsroll, y=0.25/deathsroll), colour="SkyBlue")+
geom_line(data=plotdata,
aes(x=deathsroll, y=1/deathsroll), colour="SkyBlue")+
#geom_line(data=plotdata,
# aes(x=deathsroll, y=2.5/deathsroll), colour="SkyBlue")+
geom_point(data=plotdata %>% filter(date==newmax),
aes(x=deathsroll, y=casesroll, size=pop, fill=Region), shape=21, alpha=0.7)+
geom_text_repel(data=plotdata %>% filter(date==newmax),
aes(x=deathsroll, y=casesroll,label=areaName), size=rel(2.5))+
scale_x_continuous(name="Proportion of cases expected to lead to death\n(log scale)",
labels=label_percent(accuracy=0.01), trans="log",
limits=c(NA,0.3), breaks=c(0.0001, 0.0025, 0.05))+
scale_y_continuous(name="Daily cases per 100,000\n(log scale)", trans="log",
limits=c(NA,75), labels=label_number(accuracy=1),
breaks=c(1, 10, 50))+
scale_fill_paletteer_d("LaCroixColoR::paired")+
scale_size(guide=FALSE)+
annotate("text", x=0.022, y=14, angle=-60, label="0.25 deaths/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
annotate("text", x=0.03, y=40, angle=-60, label="1 death/100,000/day", colour="SkyBlue", family="Lato",
size=3)+
#annotate("text", x=0.026, y=67, angle=-44, label="2.5 deaths/day", colour="SkyBlue", family="Lato",
# size=3)+
theme_classic()+
theme(text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.title.position = "plot",
plot.caption.position="plot")+
labs(title="Even in areas with high case rates, we can expect relatively low COVID death rates",
subtitle=paste0("Centered rolling 7-day average daily case rates compared to the expected proportion of cases which lead to a death\nwithin 28 days, based on age-specific Case Fatality Rates. Data from ", format(newmax,"%d-%b-%Y")),
caption="Data from coronavirus.data.gov.uk\nCFRs estimated by Daniel Howdon\nPlot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesxAgeContours.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(lubridate)
library(ggtext)
library(extrafont)
library(ragg)
library(geofacet)
library(readxl)
library(ggridges)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
temp <- tempfile()
regurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=regurl, destfile=temp, quiet=FALSE, mode="wb")
regdata <- read.csv(temp)
naturl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=naturl, destfile=temp, quiet=FALSE, mode="wb")
natdata <- read.csv(temp)
data <- bind_rows(regdata, natdata) %>%
mutate(date=as.Date(date)) %>%
filter(!age %in% c("00_59", "60+", "unassigned")) %>%
mutate(agecont=as.numeric(substr(age, 1, 2)))
agg_tiff("Outputs/COVIDCasesxAgeContours.tiff", units="in", width=10, height=7, res=500)
ggplot(data %>% filter(areaName=="England" & date>as.Date("2020-08-01")),
aes(x=date, y=agecont, z=rollingRate))+
geom_contour_filled(colour="white")+
scale_x_date(name="")+
scale_y_continuous(name="Age")+
scale_fill_viridis_d(option="turbo", name="")+
theme_custom()+
labs(title="The changing age distribution of COVID cases in England",
subtitle="Rolling 7-day rate per 100,000 of people testing positive for COVID-19",
caption="Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeContoursLondon.tiff", units="in", width=10, height=7, res=500)
ggplot(data %>% filter(areaName=="London" & date>as.Date("2020-08-01")),
aes(x=date, y=agecont, z=rollingRate))+
geom_contour_filled(colour="white")+
scale_x_date(name="")+
scale_y_continuous(name="Age")+
scale_fill_viridis_d(option="turbo", name="")+
theme_custom()+
labs(title="The changing age distribution of COVID cases in London",
subtitle="Rolling 7-day rate per 100,000 of people testing positive for COVID-19",
caption="Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeContoursNW.tiff", units="in", width=10, height=7, res=500)
ggplot(data %>% filter(areaName=="North West" & date>as.Date("2020-08-01")),
aes(x=date, y=agecont, z=rollingRate))+
geom_contour_filled(colour="white")+
scale_x_date(name="")+
scale_y_continuous(name="Age")+
scale_fill_viridis_d(option="turbo", name="")+
theme_custom()+
labs(title="The changing age distribution of COVID cases in the North West",
subtitle="Rolling 7-day rate per 100,000 of people testing positive for COVID-19",
caption="Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),
code=c(1:9))
agg_tiff("Outputs/COVIDCasesxAgeContoursxReg.tiff", units="in", width=12, height=10, res=500)
ggplot(data %>% filter(areaName!="England" & date>as.Date("2020-08-01")),
aes(x=date, y=agecont, z=rollingRate))+
geom_contour_filled(colour="white", bins=10, size=0.1)+
scale_x_date(name="")+
scale_y_continuous(name="Age")+
scale_fill_viridis_d(option="turbo", name="")+
facet_geo(~areaName, grid=mygrid)+
theme_custom()+
labs(title="The changing age distribution of COVID cases in England",
subtitle="Rolling 7-day rate per 100,000 of people testing positive for COVID-19",
caption="Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeRidges.tiff", units="in", width=10, height=7, res=500)
ggplot(data %>% filter(areaName=="England" & date>as.Date("2020-08-01")),
aes(x=date, y=age, height=rollingRate))+
geom_ridgeline(colour="white", scale=0.005, fill="Black")+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
#scale_fill_viridis_d(option="turbo", name="")+
theme_custom()+
theme(text=element_text(colour="White"),
plot.background=element_rect(fill="black", colour="black"),
panel.background=element_rect(fill="black", colour="black"))+
labs(title="The changing age distribution of COVID cases in England",
subtitle="Rolling 7-day rate per 100,000 of people testing positive for COVID-19",
caption="Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Scottish version
scoturl <- "https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/9393bd66-5012-4f01-9bc5-e7a10accacf4/download/trend_agesex_20211109.csv"
temp <- curl_download(url=scoturl, destfile=temp, quiet=FALSE, mode="wb")
scotdata <- read.csv(temp) %>%
filter(Sex=="Total" & !AgeGroup %in% c("Total", "0 to 59", "60+")) %>%
mutate(date=as.Date(as.character(Date), format="%Y%m%d"),
agecont=as.numeric(substr(AgeGroup, 1, 2)))
#Bring in LA populations
temp2 <- tempfile()
source2 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls"
temp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode="wb")
pop.m <- as.data.frame(t(read_excel(temp2, sheet="MYE2 - Males", range="E387:CQ387", col_names=FALSE)))
pop.m$age <- c(0:90)
pop.m$Sex <- "Male"
pop.f <- as.data.frame(t(read_excel(temp2, sheet="MYE2 - Females", range="E387:CQ387", col_names=FALSE)))
pop.f$age <- c(0:90)
pop.f$Sex <- "Female"
pop <- bind_rows(pop.m, pop.f)
pop$age <- c(0:90)
pop$AgeGroup <- case_when(
pop$age<15 ~ "0 to 14",
pop$age<20 ~ "15 to 19",
pop$age<25 ~ "20 to 24",
pop$age<45 ~ "25 to 44",
pop$age<65 ~ "45 to 64",
pop$age<75 ~ "65 to 74",
pop$age<85 ~ "75 to 84",
TRUE ~ "85plus"
)
pop1 <- pop %>%
group_by(AgeGroup, Sex) %>%
summarise(pop=sum(V1))
pop2 <- pop %>%
group_by(AgeGroup) %>%
summarise(pop=sum(V1)) %>%
mutate(Sex="Total")
pop <- bind_rows(pop1, pop2)
scotdata <- merge(scotdata, pop, by=c("Sex", "AgeGroup"), all.x=TRUE)
scotdata$posrate <- scotdata$DailyPositive*100000/scotdata$pop
#Take rolling 7-day averages
scotdata <- scotdata %>%
group_by(AgeGroup) %>%
arrange(date) %>%
mutate(cases_avg=roll_mean(DailyPositive, 7, align="right", fill=0),
posrate_avg=roll_mean(posrate*7, 7, align="right", fill=0))
agg_tiff("Outputs/COVIDCasesxAgeContoursScot.tiff", units="in", width=10, height=7, res=500)
ggplot(scotdata %>% filter(date>as.Date("2020-08-01")),
aes(x=date, y=agecont, z=posrate_avg))+
geom_contour_filled(colour="white")+
scale_x_date(name="")+
scale_y_continuous(name="Age")+
scale_fill_viridis_d(option="turbo", name="")+
theme_custom()+
labs(title="The changing age distribution of COVID cases in Scotland",
subtitle="Rolling 7-day rate per 100,000 of people testing positive for COVID-19",
caption="Date from Public Health Scotland | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesxSex.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(lubridate)
library(ggtext)
library(extrafont)
library(ragg)
library(paletteer)
library(readxl)
library(readODS)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Download data (have to do this separately for male and females because the dashboard is weird)
source.f <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=femaleCases&format=csv"
temp <- tempfile()
temp <- curl_download(url=source.f, destfile=temp, quiet=FALSE, mode="wb")
data.f <- read.csv(temp) %>%
mutate(sex="Female")
source.m <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=maleCases&format=csv"
temp <- tempfile()
temp <- curl_download(url=source.m, destfile=temp, quiet=FALSE, mode="wb")
data.m <- read.csv(temp) %>%
mutate(sex="Male")
#Combine and extract daily figures from cumulative ones
data <- bind_rows(data.f, data.m) %>%
mutate(date=as.Date(date)) %>%
group_by(age, sex) %>%
arrange(date) %>%
mutate(newcases=value-lag(value, 1),
ratechange=rate-lag(rate, 1),
cases_roll=roll_mean(newcases, 7, align="center", fill=NA),
rates_roll=roll_mean(ratechange, 7, align="center", fill=NA)) %>%
ungroup() %>%
mutate(age=gsub("_", " ", age),
age=factor(age, levels=c("0 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+")))
agg_tiff("Outputs/COVIDCasesxSex.tiff", units="in", width=12, height=7, res=500)
ggplot(data %>% filter(date>as.Date("2021-05-25") & date% filter(date==as.Date("2021-07-16") & sex=="Male"),
aes(x=date, y=240, label=age), colour="Black", family="Lato", fontface="bold")+
labs(title="COVID case rates have diverged for men and women",
subtitle="Rolling 7-day average of new COVID case rates in men and women in England, by age.",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxSexFull.tiff", units="in", width=10, height=7, res=500)
ggplot(data %>% filter(date% select(date, age, rates_roll, sex) %>%
spread(sex, rates_roll) %>%
mutate(ratio=Male/(Male+Female), test=Female-Male) %>%
filter(date>as.Date("2021-05-01")) %>%
ggplot(aes(x=date, y=ratio, colour=age, group=age))+
geom_line()+
theme_custom()
heatmapdata <- data %>%
select(sex, rates_roll, age, date) %>%
spread(sex, rates_roll) %>%
mutate(maleprop=Male/(Male+Female))
agg_tiff("Outputs/COVIDCasesxSexHeatmap.tiff", units="in", width=10, height=7, res=500)
ggplot(heatmapdata %>% filter(date>as.Date("2021-05-25") & date% filter(date>as.Date("2020-03-10") &date% filter(date>as.Date("2021-05-25") & date%
group_by(age, date) %>%
summarise(cases_roll=sum(cases_roll)) %>%
mutate(sex="Total") %>%
ungroup() %>%
bind_rows(data) %>%
filter(!is.na(cases_roll)) %>%
select(age, sex, date, cases_roll) %>%
group_by(age, sex) %>%
mutate(caseratio=cases_roll/lag(cases_roll, 7)) %>%
ungroup()
#Whole population
popheatmap <- caseratios %>%
filter(sex=="Total" & date>as.Date("2020-04-01"))
agg_tiff("Outputs/COVIDCaseRatioHeatmap.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmap)+
geom_tile(aes(x=date, y=age, fill=caseratio))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("pals::warmcool", limit=c(0.249,4), direction=-1 ,
trans="log", breaks=c(0.25, 0.5, 1, 2, 4),
labels=c("-75%", "-50%", "No change", "+100%", "+300%"),
name="Change in cases in the past week")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Generally COVID case numbers have risen or fallen across all age groups at once",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaseRatioHeatmapRecent.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmap %>% filter(date>as.Date("2021-12-01") & date%
filter(sex!="Total" & date>as.Date("2020-04-01"))
agg_tiff("Outputs/COVIDCaseRatioHeatmapxSex.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmapxsex)+
geom_tile(aes(x=date, y=age, fill=caseratio))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("pals::warmcool", limit=c(0.249,4), direction=-1 ,
trans="log", breaks=c(0.25, 0.5, 1, 2, 4),
labels=c("-75%", "-50%", "No change", "+100%", "+300%"),
name="Change in cases in the past week")+
facet_wrap(~sex)+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Generally COVID case numbers have risen or fallen across all age groups at once",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaseRatioHeatmapxSexRecent.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmapxsex %>% filter(date>as.Date("2021-05-01")))+
geom_tile(aes(x=date, y=age, fill=caseratio))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("pals::warmcool", limit=c(0.249,4), direction=-1 ,
trans="log", breaks=c(0.25, 0.5, 1, 2, 4),
labels=c("-75%", "-50%", "No change", "+100%", "+300%"),
name="Change in cases in the past week")+
facet_wrap(~sex)+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Generally COVID case numbers have risen or fallen across all age groups at once",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths")
dev.off()
#Get tidy case rates by bringing in ONS 2020 populations
#Bring in ONS 2020 population figures for comparison
url <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
ONSpop_m <- read_excel(temp, sheet="MYE2 - Males", range="E8:CQ12") %>%
slice_tail() %>%
gather(age, Male, c(1:ncol(.)))
ONSpop_f <- read_excel(temp, sheet="MYE2 - Females", range="E8:CQ12") %>%
slice_tail() %>%
gather(age, Female, c(1:ncol(.)))
ONSpop <- merge(ONSpop_m, ONSpop_f) %>%
mutate(age=as.numeric(substr(age, 1, 2)),
age=case_when(
age<5 ~ "0 to 4",
age<10 ~ "5 to 9",
age<15 ~ "10 to 14",
age<20 ~ "15 to 19",
age<25 ~ "20 to 24",
age<30 ~ "25 to 29",
age<35 ~ "30 to 34",
age<40 ~ "35 to 39",
age<45 ~ "40 to 44",
age<50 ~ "45 to 49",
age<55 ~ "50 to 54",
age<60 ~ "55 to 59",
age<65 ~ "60 to 64",
age<70 ~ "65 to 69",
age<75 ~ "70 to 74",
age<80 ~ "75 to 79",
age<85 ~ "80 to 84",
age<90 ~ "85 to 89",
TRUE ~ "90+")) %>%
group_by(age) %>%
summarise(Male=sum(Male), Female=sum(Female)) %>%
ungroup()
ratesdata <- caseratios %>%
merge(ONSpop %>%
rowwise() %>%
mutate(Total=Male+Female) %>%
gather(sex, pop, c(2:4)) %>%
ungroup()) %>%
mutate(rates_roll=cases_roll*100000/pop)
agg_png("Outputs/COVIDCasesHeatmapxAge.png", units="in", width=10, height=6, res=500)
ggplot(ratesdata %>% filter(sex=="Total" & date>as.Date("2021-12-01") & date% filter(sex=="Total" & date>as.Date("2021-12-01") & date% filter(sex=="Total" & date>as.Date("2021-10-01") &
date% filter(sex=="Total" & date>as.Date("2021-10-01") &
date% filter(sex=="Total" & date>as.Date("2021-10-01") &
date% filter(sex=="Total" & date>as.Date("2021-10-01") &
date% filter(date>as.Date("2021-12-01") & date% filter(date>as.Date("2021-12-01") & date% filter(date>as.Date("2021-12-01") & datethe under 20s",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaseRatioLineRecent2039.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmap %>% filter(date>as.Date("2021-12-01") & date% filter(date>as.Date("2021-12-01") & date20-39 year olds has more or less plateaued",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaseRatioLineRecent4059.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmap %>% filter(date>as.Date("2021-12-01") & date% filter(date>as.Date("2021-12-01") & date40-59 year olds",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaseRatioLineRecent6579.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmap %>% filter(date>as.Date("2021-12-01") & date% filter(date>as.Date("2021-12-01") & date60-79 year olds are still falling",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaseRatioLineRecent80Plus.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmap %>% filter(date>as.Date("2021-12-01") & date% filter(date>as.Date("2021-12-01") & datethe over 80s",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Positivity rates by sex (pillar 2 only)
#Data from weekly surveillance reports #https://www.gov.uk/government/statistics/national-flu-and-covid-19-surveillance-reports-2021-to-2022-season
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1052282/Weekly_Influenza_and_COVID19_report_data_w5.ods"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
#posdata.m <- read_excel(temp, sheet="Figure 7. Positivity by age", range="C121:L174") %>%
#mutate(index=0:(nrow(.)-1), date=as.Date("2020-12-14")+weeks(index+4)) %>%
#gather(ageband, posrate, c(1:(ncol(.)-2))) %>%
#mutate(ageband=gsub("_", "-", ageband), sex="Male")
posdata.m <- read_ods(temp, sheet="Figure_7__Positivity_by_age", range="C122:L174",
col_names=FALSE) %>%
set_names("0-4", "5-9", "10-19", "20-29", "30-39", "40-49",
"50-59", "60-69", "70-79", "80+") %>%
mutate(index=0:(nrow(.)-1), date=as.Date("2020-12-14")+weeks(index+4)) %>%
gather(ageband, posrate, c(1:(ncol(.)-2))) %>%
mutate(sex="Male")
#posdata.f <- read_excel(temp, sheet="Figure 7. Positivity by age", range="C177:L230") %>%
# mutate(index=0:(nrow(.)-1), date=as.Date("2020-12-14")+weeks(index+4)) %>%
# gather(ageband, posrate, c(1:(ncol(.)-2))) %>%
# mutate(ageband=gsub("_", "-", ageband), sex="Female")
posdata.f <- read_ods(temp, sheet="Figure_7__Positivity_by_age", range="C178:L230",
col_names=FALSE) %>%
set_names("0-4", "5-9", "10-19", "20-29", "30-39", "40-49",
"50-59", "60-69", "70-79", "80+") %>%
mutate(index=0:(nrow(.)-1), date=as.Date("2020-12-14")+weeks(index+4)) %>%
gather(ageband, posrate, c(1:(ncol(.)-2))) %>%
mutate(sex="Female")
posdata <- bind_rows(posdata.m, posdata.f) %>%
select(-index) %>%
mutate(posrate=posrate/100,
ageband=factor(ageband, levels=c("0-4", "5-9", "10-19", "20-29", "30-39", "40-49",
"50-59", "60-69", "70-79", "80+")))
agg_tiff("Outputs/COVIDPosratexSex.tiff", units="in", width=10, height=7, res=500)
ggplot(posdata, aes(x=date, y=posrate, colour=sex))+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Positivity rate", labels=label_percent(accuracy=1))+
scale_colour_manual(values=c("#00cc99", "#6600cc"))+
facet_wrap(~ageband)+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="Women test more than men",
subtitle="COVID test posivity rate for women and men in England, for pillar 2 (community) tests, by age",
caption="Date from UKHSA | Plot by @VictimOfMaths")
dev.off()
sexratio <- posdata %>% spread(sex, posrate) %>%
mutate(sexratio=Female/Male)
agg_tiff("Outputs/COVIDPosrateSexRatio.tiff", units="in", width=8, height=6, res=500)
ggplot(sexratio, aes(x=date, y=sexratio, colour=ageband))+
geom_hline(yintercept=1, colour="Grey50")+
geom_line(show.legend=FALSE)+
geom_text_repel(data=sexratio %>% filter(date==max(date)),
aes(x=max(date), y=sexratio, label = ageband,
colour=ageband),
family = "Calibri", direction = "y", xlim = c(as.Date("2022-01-20"), NA),
hjust = 0, segment.size = .7,
segment.alpha = .5,
segment.linetype = "dotted",
segment.curvature = -0.1,
segment.ncp = 3,
segment.angle = 20, box.padding = .3, show.legend = FALSE)+
scale_x_date(name="", limits=c(NA_Date_, as.Date("2022-01-30")))+
scale_y_continuous(trans="log10", name="Female:Male positivity rate ratio\n(log scale)",
breaks=c(0.25, 0.5, 1, 2), limits=c(NA, 2))+
scale_colour_paletteer_d("rcartocolor::Prism")+
theme_custom()+
theme(panel.grid.major.y=element_line(colour="Grey90"))+
annotate("text", x=as.Date("2021-10-10"), y=0.26, label="Male positivity 4x higher",
colour="Grey70", family="Lato")+
annotate("text", x=as.Date("2021-10-10"), y=0.52, label="Male positivity 2x higher",
colour="Grey70", family="Lato")+
annotate("text", x=as.Date("2021-10-10"), y=1.92, label="Female positivity 2x higher",
colour="Grey70", family="Lato")+
labs(title="Adult women consistently test more than men",
subtitle="Ratio of COVID test positivity rates in England, for pillar 2 (community) tests, by age",
caption="Data from UKHSA | Plot by @VictimOfMaths")
dev.off()
#Scotland
temp <- tempfile()
source <- "https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/9393bd66-5012-4f01-9bc5-e7a10accacf4/download/trend_agesex_20211231.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
scotdata <- read.csv(temp) %>%
filter(!AgeGroup %in% c("Total", "0 to 59", "60+")) %>%
mutate(date=as.Date(as.character(Date), format="%Y%m%d")) %>%
select(date, Sex, AgeGroup, DailyPositive) %>%
group_by(Sex, AgeGroup) %>%
mutate(cases_roll=roll_mean(DailyPositive, 7, align="center", fill=NA),
#Populations hard coded because the data is unhelpfully structured and
#I am a lazy, terrible, person. Source:
#https://www.nrscotland.gov.uk/statistics-and-data/statistics/statistics-by-theme/population/population-estimates/mid-year-population-estimates/mid-2020
pop=case_when(
AgeGroup=="0 to 14" & Sex=="Male" ~ 135959+152847+151875,
AgeGroup=="15 to 19" & Sex=="Male" ~ 144207,
AgeGroup=="20 to 24" & Sex=="Male" ~ 173302,
AgeGroup=="25 to 44" & Sex=="Male" ~ 189139+185637+174079+159586,
AgeGroup=="45 to 64" & Sex=="Male" ~ 169376+189355+193348+170701,
AgeGroup=="65 to 74" & Sex=="Male" ~ 144529+135910,
AgeGroup=="75 to 84" & Sex=="Male" ~ 89206+60270,
AgeGroup=="85plus" & Sex=="Male" ~ 32227+13659,
AgeGroup=="0 to 14" & Sex=="Female" ~ 127847+145056+146206,
AgeGroup=="15 to 19" & Sex=="Female" ~ 137913,
AgeGroup=="20 to 24" & Sex=="Female" ~ 168453,
AgeGroup=="25 to 44" & Sex=="Female" ~ 188065+188432+181587+164780,
AgeGroup=="45 to 64" & Sex=="Female" ~ 180548+203758+205996+181868,
AgeGroup=="65 to 74" & Sex=="Female" ~ 155904+149920,
AgeGroup=="75 to 84" & Sex=="Female" ~ 109004+83026,
AgeGroup=="85plus" & Sex=="Female" ~ 52335+30090),
caserate_roll=cases_roll*100000/pop)
agg_tiff("Outputs/COVIDCasesxSexScot.tiff", units="in", width=10, height=7, res=800)
ggplot(scotdata %>% filter(date>as.Date("2021-05-10") & date%
group_by(AgeGroup, date) %>%
summarise(cases_roll=sum(cases_roll)) %>%
mutate(Sex="Total") %>%
ungroup() %>%
bind_rows(data) %>%
filter(!is.na(cases_roll)) %>%
select(AgeGroup, Sex, date, cases_roll) %>%
group_by(AgeGroup, Sex) %>%
mutate(caseratio=cases_roll/lag(cases_roll, 7)) %>%
ungroup()
#Whole population
popheatmap.scot <- caseratios.scot %>%
filter(Sex=="Total" & date>as.Date("2020-04-01"))
agg_tiff("Outputs/COVIDCaseRatioHeatmapScot.tiff", units="in", width=10, height=6, res=800)
ggplot(popheatmap.scot)+
geom_tile(aes(x=date, y=AgeGroup, fill=caseratio))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("pals::warmcool", limit=c(0.249,4), direction=-1 ,
trans="log", breaks=c(0.25, 0.5, 1, 2, 4),
labels=c("-75%", "-50%", "No change", "+100%", "+300%"),
name="Change in cases in the past week")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Generally COVID case numbers have risen or fallen across all age groups at once",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in England, by age group",
caption="Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths")
dev.off()
scotheatmapdata <- scotdata %>%
select(Sex, caserate_roll, AgeGroup, date) %>%
spread(Sex, caserate_roll) %>%
mutate(maleprop=Male/(Male+Female))
agg_tiff("Outputs/COVIDCasesxSexHeatmapScot.tiff", units="in", width=10, height=7, res=500)
ggplot(scotheatmapdata %>% filter(date>as.Date("2021-05-25") & date% filter(date>as.Date("2021-05-01")))+
geom_tile(aes(x=date, y=AgeGroup, fill=caseratio))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("pals::warmcool", limit=c(0.249,4), direction=-1 ,
trans="log", breaks=c(0.25, 0.5, 1, 2, 4),
labels=c("-75%", "-50%", "No change", "+100%", "+300%"),
name="Change in cases in the past week")+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="COVID case rates in Scotland are falling across all age groups",
subtitle="Weekly change in the rolling 7-day average number of new COVID cases in Scotland, by age group",
caption="Data from NHS Scotland | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaseRatesLineRecentScot.tiff", units="in", width=10, height=6, res=800)
ggplot(scotdata %>% filter(date>as.Date("2021-05-10") & date%
set_names(c("Lacode", "name", "areaType", "date", "NIMSpop", "Vax1st", "Vax2nd", "caserate")) %>%
mutate(date=as.Date(date), Vax1st=Vax1st/NIMSpop, Vax2nd=Vax2nd/NIMSpop)
maxdate=max(dashdata$date[!is.na(dashdata$caserate)])
#Bring in region
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LTLA", "Region")
dashdata <- dashdata %>%
merge(LADtoRegion, all.x=TRUE, by.x="Lacode", by.y="LTLA") %>%
mutate(Region=case_when(
Lacode %in% c("E07000244", "E07000245") ~ "East of England",
Lacode %in% c("E06000058", "E06000059", "E07000246") ~ "South West",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland",
TRUE ~ Region),
Country=case_when(
substr(Lacode, 1, 1) == "E" ~ "England",
substr(Lacode, 1, 1) == "W" ~ "Wales",
substr(Lacode, 1, 1) == "S" ~ "Scotland",
substr(Lacode, 1, 1) == "N" ~ "Northern Ireland")) %>%
arrange(date)
agg_tiff("Outputs/COVIDCasesvsVaxLTLA.tiff", units="in", width=9, height=7, res=800)
ggplot()+
geom_path(data=dashdata %>% filter(date>maxdate-days(7)),
aes(x=caserate, y=Vax1st, group=name, alpha=7-as.integer(maxdate-date)),
show.legend=FALSE)+
geom_point(data=dashdata %>% filter(date==maxdate & !is.na(Vax1st)),
aes(x=caserate, y=Vax1st, fill=Region, size=NIMSpop), shape=21, alpha=0.7)+
geom_text_repel(data=dashdata %>% filter(date==maxdate),
aes(x=caserate, y=Vax1st, label=name), size=rel(2.3),
label.padding=1)+
scale_fill_manual(name="", values=c("#C70E7B", "#FC6882", "#007BC3", "#54BCD1", "#EF7C12",
"Black", "#F4B95A", "#009F3F", "#8FDA04", "#AF6125"))+
scale_size(guide=FALSE)+
scale_y_continuous(name="Proportion of adults who have received at least one dose",
labels=label_percent(accuracy=1))+
scale_x_continuous(name="Cases per 100,000 population in the past week")+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title.position="plot", plot.caption.position = "plot",
plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="Areas with high COVID case rates have fairly average vaccine coverage",
subtitle="Rate of new COVID-19 cases in the past week compared to 1st dose vaccine coverage in English/Scottish Local Authorites.\nBubble size corresponds to area population. Paths represent changes in the past 7 days.",
caption="Data from coronavirus.data.gov.uk\nInspired by Russ Garrett (@russss)\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesvsVax2LTLA.tiff", units="in", width=9, height=7, res=800)
ggplot()+
geom_path(data=dashdata %>% filter(date>maxdate-days(7)),
aes(x=caserate, y=Vax2nd, group=name, alpha=7-as.integer(maxdate-date)),
show.legend=FALSE)+
geom_point(data=dashdata %>% filter(date==maxdate & !is.na(Vax2nd)),
aes(x=caserate, y=Vax2nd, fill=Region, size=NIMSpop), shape=21, alpha=0.7)+
geom_text_repel(data=dashdata %>% filter(date==maxdate),
aes(x=caserate, y=Vax2nd, label=name), size=rel(2.3),
label.padding=1)+
scale_fill_manual(name="", values=c("#C70E7B", "#FC6882", "#007BC3", "#54BCD1", "#EF7C12",
"Black", "#F4B95A", "#009F3F", "#8FDA04", "#AF6125"))+
scale_size(guide=FALSE)+
scale_y_continuous(name="Proportion of adults who have received two doses",
labels=label_percent(accuracy=1))+
scale_x_continuous(name="Cases per 100,000 population in the past week")+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title.position="plot", plot.caption.position = "plot",
plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="Areas with high COVID case rates have fairly average vaccine coverage",
subtitle="Rate of new COVID-19 cases in the past week compared to 2nd dose vaccine coverage in English/Scottish Local Authorites.\nBubble size corresponds to area population. Paths represent changes in the past 7 days.",
caption="Data from coronavirus.data.gov.uk\nInspired by Russ Garrett (@russss)\nPlot by @VictimOfMaths")
dev.off()
#MSOA-level version (England only)
temp <- tempfile()
vaxurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-10-June-2021.xlsx"
temp <- curl_download(url=vaxurl, destfile=temp, quiet=FALSE, mode="wb")
msoadata <- read_excel(temp, sheet="MSOA", range="B16:S6806", col_names=FALSE) %>%
mutate(Vax1st=`...7`+`...8`+`...9`+`...10`+`...11`+`...12`+`...13`+`...14`+`...15`+`...16`+
`...17`+`...18`) %>%
select(c(2,5,6,19)) %>%
set_names(c("Region", "code", "name", "Vax1st"))
#NIMS populations
pop <- read_excel(temp, sheet="Population estimates (NIMS)", range="U16:AJ6806", col_names=FALSE) %>%
select(c(1, 16)) %>%
set_names(c("code", "pop"))
#MSOA-level cases
temp <- tempfile()
MSOArateurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv"
temp <- curl_download(url=MSOArateurl, destfile=temp, quiet=FALSE, mode="wb")
MSOAcases <- read.csv(temp) %>%
filter(date==max(date))
MSOAdata <- msoadata %>%
merge(pop, by="code") %>%
merge(MSOAcases, by.x="code", by.y="areaCode", all.x=TRUE) %>%
mutate(cases=if_else(is.na(newCasesBySpecimenDateRollingRate), 0,
newCasesBySpecimenDateRollingRate),
vaxprop=Vax1st/pop,
date=as.Date(date))
agg_tiff("Outputs/COVIDCasesvsVaxMSOA.tiff", units="in", width=9, height=7, res=800)
ggplot()+
geom_point(data=MSOAdata %>% filter(date==maxdate & !is.na(Vax1st)),
aes(x=cases, y=vaxprop, fill=Region, size=pop), shape=21, alpha=0.7)+
#geom_text_repel(data=MSOAdata %>% filter(date==maxdate),
# aes(x=cases, y=vaxprop, label=name), size=rel(2.3),
# label.padding=1)+
scale_fill_paletteer_d("LaCroixColoR::paired", name="")+
scale_size(guide=FALSE)+
scale_y_continuous(name="Proportion of adults who have received at least one dose",
labels=label_percent(accuracy=1))+
scale_x_continuous(name="Cases per 100,000 population in the past week")+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title.position="plot", plot.caption.position = "plot",
plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="Areas with high COVID case rates have fairly average vaccine coverage",
subtitle="Rate of new COVID-19 cases in the past week compared to 1st dose vaccine coverage in English Middle Super Output Areas.\nBubble size corresponds to area population.",
caption="Data from coronavirus.data.gov.uk\nInspired by Russ Garrett (@russss)\nPlot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCasesxVaxxAge.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(readxl)
library(paletteer)
library(extrafont)
library(ragg)
library(scales)
library(ggrepel)
library(ggridges)
library(ungroup)
library(lubridate)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Have to download these two metrics separately for some reason?
temp <- tempfile()
sourcevax <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"
temp <- curl_download(url=sourcevax, destfile=temp, quiet=FALSE, mode="wb")
vaxdata <- read.csv(temp) %>%
select(date, age, newPeopleVaccinatedFirstDoseByVaccinationDate,
newPeopleVaccinatedSecondDoseByVaccinationDate,
newPeopleVaccinatedThirdInjectionByVaccinationDate,
newPeopleVaccinatedSpring22ByVaccinationDate,
newPeopleVaccinatedAutumn22ByVaccinationDate) %>%
set_names("date", "age", "dose1", "dose2", "dose3", "spring22", "autumn22") %>%
mutate(date=as.Date(date)) %>%
#Some fuckery to crudely align the age bands, assuming equal coverage *within* each
#age band in the vaccination data
pivot_wider(names_from=age, values_from=c(dose1, dose2, dose3, spring22, autumn22),
names_sep="__") %>%
mutate(across(starts_with("spring22"), ~replace_na(., 0)),
across(starts_with("autumn22"), ~replace_na(., 0)),
dose1__10_14=dose1__12_15*0.75, dose2__10_14=dose2__12_15*0.75,
dose3__10_14=dose3__12_15*0.75, spring22__10_14=spring22__05_11*2/7+spring22__12_15*0.75,
autumn22__10_14=autumn22__05_11*2/7+autumn22__12_15*0.75,
dose1__15_19=dose1__12_15*0.25+dose1__16_17+dose1__18_24*2/7,
dose2__15_19=dose2__12_15*0.25+dose2__16_17+dose2__18_24*2/7,
dose3__15_19=dose3__12_15*0.25+dose3__16_17+dose3__18_24*2/7,
spring22__15_19=spring22__12_15*0.25+spring22__16_17+spring22__18_24*2/7,
autumn22__15_19=autumn22__12_15*0.25+autumn22__16_17+autumn22__18_24*2/7,
dose1__20_24=dose1__18_24*5/7, dose2__20_24=dose2__18_24*5/7,
dose3__20_24=dose3__18_24*5/7, spring22__20_24=spring22__18_24*5/7,
autumn22__20_24=autumn22__18_24*5/7) %>%
pivot_longer(cols=c(2:ncol(.)), names_to=c("dose", "age"), names_sep="__") %>%
filter(!age %in% c("12_15", "16_17", "18_24")) %>%
spread(dose, value)
#Case data
sourcecases <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp <- curl_download(url=sourcecases, destfile=temp, quiet=FALSE, mode="wb")
casedata <- read.csv(temp) %>%
filter(!age %in% c("unassigned", "00_59", "60+")) %>%
select(date, age, cases) %>%
mutate(date=as.Date(date))
#Deaths data
sourcedeaths <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newDeaths28DaysByDeathDateAgeDemographics&format=csv"
temp <- curl_download(url=sourcedeaths, destfile=temp, quiet=FALSE, mode="wb")
deathsdata <- read.csv(temp) %>%
filter(!age %in% c("00_59", "60+")) %>%
select(date, age, deaths) %>%
mutate(date=as.Date(date))
#Combine (avoiding missing date/age combinations because of faff reasons)
data <- data.frame(date=rep(seq.Date(from=min(min(deathsdata$date), min(casedata$date),
min(vaxdata$date)),
to=max(max(deathsdata$date), max(casedata$date),
max(vaxdata$date)), "days"),
each=length(unique(casedata$age)))) %>%
mutate(age=rep(unique(casedata$age),
times=length(seq.Date(from=min(min(deathsdata$date), min(casedata$date),
min(vaxdata$date)),
to=max(max(deathsdata$date), max(casedata$date),
max(vaxdata$date)),
"days")))) %>%
merge(casedata, all=TRUE) %>%
merge(vaxdata, all=TRUE) %>%
merge(deathsdata, all=TRUE) %>%
mutate(dose1=if_else(is.na(dose1), 0, dose1),
dose2=if_else(is.na(dose2), 0, dose2),
dose3=if_else(is.na(dose3), 0, dose3),
spring22=replace_na(spring22, 0),
autumn22=replace_na(autumn22, 0)) %>%
#Calculate rolling avg cases and cumulative vax doses
group_by(age) %>%
arrange(date) %>%
mutate(cases_roll=roll_mean(cases, 7, align="center", fill=NA),
deaths_roll=roll_mean(deaths, 7, align="center", fill=NA),
cum_dose1=cumsum(dose1), cum_dose2=cumsum(dose2),
cum_dose3=cumsum(dose3), cumspring22=cumsum(spring22),
cumautumn22=cumsum(autumn22)) %>%
ungroup()
#Bring in populations for rates
url <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
ONSpop <- read_excel(temp, sheet="MYE2 - Persons", range="E8:CQ12") %>%
slice_tail() %>%
gather(age, pop, c(1:ncol(.))) %>%
mutate(age=as.numeric(substr(age, 1, 2)),
age=case_when(
age<5 ~ "00_04",
age<10 ~ "05_09",
age<15 ~ "10_14",
age<20 ~ "15_19",
age<25 ~ "20_24",
age<30 ~ "25_29",
age<35 ~ "30_34",
age<40 ~ "35_39",
age<45 ~ "40_44",
age<50 ~ "45_49",
age<55 ~ "50_54",
age<60 ~ "55_59",
age<65 ~ "60_64",
age<70 ~ "65_69",
age<75 ~ "70_74",
age<80 ~ "75_79",
age<85 ~ "80_84",
age<90 ~ "85_89",
TRUE ~ "90+")) %>%
group_by(age) %>%
summarise(pop=sum(pop)) %>%
ungroup()
finaldata <- data %>%
merge(ONSpop, all=TRUE) %>%
mutate(caserate_roll=cases_roll*100000/pop,
deathrate_roll=deaths_roll*100000/pop,
dose1prop=cum_dose1/pop,
dose2prop=cum_dose2/pop,
dose3prop=cum_dose3/pop, spring22prop=cumspring22/pop,
autumn22prop=cumautumn22/pop) %>%
#Pick out Dec20/Jan21 peak
group_by(age) %>%
mutate(casepeak=max(caserate_roll[date>as.Date("2020-10-01") &
dateas.Date("2020-10-01") &
date%
ungroup() %>%
mutate(caseproppeak=caserate_roll/casepeak,
deathproppeak=deathrate_roll/deathpeak)
agg_tiff("Outputs/COVIDBoostersxAgevsCases.tiff", units="in", width=9, height=7, res=500)
ggplot()+
geom_hline(yintercept=1, linetype=2, colour="Grey60")+
geom_line(data=finaldata %>% filter(date>as.Date("2021-09-10") &
!age %in% c("00_04", "05_09","10_14")),
aes(x=date, y=caseproppeak, group=age, colour=dose3prop))+
geom_text_repel(data=finaldata %>% filter(date==max(date[!is.na(caseproppeak)]) &
!age %in% c("00_04", "05_09","10_14")),
aes(x=max(date[!is.na(caseproppeak)]), y=caseproppeak, label = age, colour=dose3prop),
family = "Lato", direction = "y", xlim = c(as.Date("2021-12-10"), NA),
hjust = 0, segment.size = .7, segment.alpha = .5, segment.linetype = "dotted",
box.padding = .3, segment.curvature = -0.1, segment.ncp = 3, segment.angle = 20) +
scale_x_date(name="")+
scale_y_continuous(name="COVID cases as a proportion of their Dec 20/Jan21 peak",
labels=label_percent(accuracy=1), limits=c(0,NA),
breaks=c(0,0.25,0.5,0.75,1,1.25))+
scale_colour_paletteer_c("ggthemes::Red-Green Diverging", name="Booster coverage",
limits=c(0,1), labels=label_percent(accuracy=1))+
theme_custom()+
theme(legend.position="top")+
guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Boosters have been doing a great job against Delta transmission",
subtitle="Rolling 7-day rate of new COVID cases as a proportion of the peak last winter by age group, coloured by booster/3rd dose coverage\nfor all age groups 15+",
caption="Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDBoostersxAgevsCasesDark.tiff", units="in", width=9, height=7, res=500)
ggplot()+
geom_hline(yintercept=1, linetype=2, colour="Grey40")+
geom_line(data=finaldata %>% filter(date>as.Date("2021-09-10") &
!age %in% c("00_04", "05_09","10_14")),
aes(x=date, y=caseproppeak, group=age, colour=dose3prop))+
geom_text_repel(data=finaldata %>% filter(date==max(date[!is.na(caseproppeak)]) &
!age %in% c("00_04", "05_09","10_14")),
aes(x=max(date[!is.na(caseproppeak)]), y=caseproppeak, label = age, colour=dose3prop),
family = "Lato", direction = "y", xlim = c(as.Date("2021-12-10"), NA),
hjust = 0, segment.size = .7, segment.alpha = .5, segment.linetype = "dotted",
box.padding = .3, segment.curvature = -0.1, segment.ncp = 3, segment.angle = 20) +
scale_x_date(name="")+
scale_y_continuous(name="COVID cases as a proportion of their Dec 20/Jan21 peak",
labels=label_percent(accuracy=1), limits=c(0,NA),
breaks=c(0,0.25,0.5,0.75,1,1.25))+
scale_colour_paletteer_c("viridis::magma", name="Booster coverage",
limits=c(0,1), labels=label_percent(accuracy=1))+
theme_custom()+
theme(legend.position="top", plot.background=element_rect(fill="Grey20",
colour="Grey20"),
panel.background=element_rect(fill="Grey20",
colour="Grey20"),
legend.background=element_rect(fill="Grey20",
colour="Grey20"),
text=element_text(colour="cornsilk"),
axis.text=element_text(colour="cornsilk"))+
guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'),
barheight = unit(.5, 'lines')))+
labs(title="Boosters have been doing a great job against Delta transmission",
subtitle="Rolling 7-day rate of new COVID cases as a proportion of the peak last winter by age group, coloured by booster/3rd dose coverage\nfor all age groups 15+",
caption="Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDBoostersxAgevsCasesFacet.tiff", units="in", width=9, height=7, res=500)
ggplot()+
geom_hline(yintercept=1, linetype=2, colour="Grey60")+
geom_line(data=finaldata %>% filter(date>as.Date("2021-09-10") &
!age %in% c("00_04", "05_09","10_14")),
aes(x=date, y=caseproppeak, group=age, colour=dose3prop))+
scale_x_date(name="")+
scale_y_continuous(name="COVID cases as a proportion of their Dec 20/Jan21 peak",
labels=label_percent(accuracy=1), limits=c(0,NA),
breaks=c(0,0.25,0.5,0.75,1,1.25))+
scale_colour_paletteer_c("ggthemes::Red-Green Diverging", name="Booster coverage",
limits=c(0,1), labels=label_percent(accuracy=1))+
facet_wrap(~age)+
theme_custom()+
theme(legend.position="top")+
guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Boosters have been doing a great job against Delta transmission",
subtitle="Rolling 7-day rate of new COVID cases as a proportion of the peak last winter by age group, coloured by booster/3rd dose coverage\nfor all age groups 15+",
caption="Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDBoostersxAgevsDeaths.tiff", units="in", width=9, height=7, res=500)
ggplot()+
#geom_hline(yintercept=1, linetype=2, colour="Grey60")+
geom_line(data=finaldata %>% filter(date>as.Date("2021-09-10") &
!age %in% c("00_04", "05_09","10_14", "15_19",
"20_24", "25_29", "30_34", "35_39")),
aes(x=date, y=deathproppeak, group=age, colour=dose3prop))+
geom_text_repel(data=finaldata %>% filter(date==max(date[!is.na(deathproppeak)]) &
!age %in% c("00_04", "05_09","10_14", "15_19",
"20_24", "25_29", "30_34", "35_39")),
aes(x=max(date[!is.na(deathproppeak)]), y=deathproppeak, label = age, colour=dose3prop),
family = "Lato", direction = "y", xlim = c(as.Date("2021-12-10"), NA),
hjust = 0, segment.size = .7, segment.alpha = .5, segment.linetype = "dotted",
box.padding = .3, segment.curvature = -0.1, segment.ncp = 3, segment.angle = 20) +
scale_x_date(name="")+
scale_y_continuous(name="COVID deaths as a proportion of their Dec 20/Jan21 peak",
labels=label_percent(accuracy=1), limits=c(0,NA))+
scale_colour_paletteer_c("ggthemes::Red-Green Diverging", name="Booster coverage",
limits=c(0,1), labels=label_percent(accuracy=1))+
theme_custom()+
theme(legend.position="top")+
guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Boosters have been effective at limiting deaths due to Delta",
subtitle="Rolling 7-day rate of deaths within 28 days of a positive COVID test as a proportion of the peak last winter by age group,\ncoloured by booster/3rd dose coverage for all age groups 40+",
caption="Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths")
dev.off()
##########################
#Ridgeplots of vaccination age profiles by week
#Heavily inspired by this wonderful plot
#https://twitter.com/MathiasLeroy_/status/1470785658537062407
#from Mathias Leroy
ridgedata <- finaldata %>%
filter(!age %in% c("50+", "75+", "05_11")) %>%
select(date, age, dose1, dose2, dose3, spring22, autumn22) %>%
filter(date>as.Date("2020-12-01")) %>%
gather(dose, no, c(dose1, dose2, dose3, spring22, autumn22)) %>%
mutate(contage=case_when(
age=="00_04" ~ 2, age=="05_09" ~ 7, age=="10_14" ~ 12, age=="15_19" ~ 17,
age=="20_24" ~ 22, age=="25_29" ~ 27, age=="30_34" ~ 32, age=="35_39" ~ 37,
age=="40_44" ~ 42, age=="45_49" ~ 47, age=="50_54" ~ 52, age=="55_59" ~ 57,
age=="60_64" ~ 62, age=="65_69" ~ 67, age=="70_74" ~ 72, age=="75_79" ~ 77,
age=="80_84" ~ 82, age=="85_89" ~ 87, age=="90+" ~ 92),
week=case_when(
year(date)==2020 ~ week(date),
year(date)==2021 ~ week(date)+53,
TRUE ~ week(date)+105)) %>%
group_by(contage, week, dose) %>%
summarise(no=sum(no)) %>%
ungroup() %>%
mutate(dose=factor(dose, levels=c("dose1", "dose2", "dose3", "spring22", "autumn22")))
agg_tiff("Outputs/COVIDVaxRidgesxAgexDose.tiff", units="in", width=8, height=8, res=500)
ggplot(ridgedata, aes(x=contage, y=fct_rev(as.factor(week)), height=no, fill=dose))+
geom_density_ridges(stat="identity", scale=10, alpha=0.3, colour=NA)+
scale_x_continuous(name="Age", limits=c(0,95))+
scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101, 106, 110, 114,
118, 123, 127, 131, 136, 140),
labels=c("Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep"), name="")+
scale_fill_paletteer_d("lisa::AndyWarhol_2", name="Dose",
labels=c("1st dose", "2nd dose", "3rd dose/booster",
"Spring booster", "Autumn booster"))+
theme_custom()+
theme(axis.line.y=element_blank())+
labs(title="Vaccine rollout down the age groups",
subtitle="Age distribution of COVID vaccines delivered each week in England by dose",
caption="Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths")
dev.off()
#Alternative version interpolating the age groups to give (hopefully) smoother
smoothdata <- finaldata %>%
filter(!age %in% c("50+", "75+", "05_11")) %>%
select(date, age, dose1, dose2, dose3, spring22, autumn22) %>%
filter(date>as.Date("2020-12-01")) %>%
gather(dose, no, c(dose1, dose2, dose3, spring22, autumn22)) %>%
mutate(contage=case_when(
age=="00_04" ~ 0, age=="05_09" ~ 5, age=="10_14" ~ 10, age=="15_19" ~ 15,
age=="20_24" ~ 20, age=="25_29" ~ 25, age=="30_34" ~ 30, age=="35_39" ~ 35,
age=="40_44" ~ 40, age=="45_49" ~ 45, age=="50_54" ~ 50, age=="55_59" ~ 55,
age=="60_64" ~ 60, age=="65_69" ~ 65, age=="70_74" ~ 70, age=="75_79" ~ 75,
age=="80_84" ~ 80, age=="85_89" ~ 85, age=="90+" ~ 90),
week=case_when(
year(date)==2020 ~ week(date),
year(date)==2021 ~ week(date)+53,
TRUE ~ week(date)+105)) %>%
#filter(dose=="dose1" & week=="55") %>%
group_by(age, contage, week, dose) %>%
summarise(no=sum(no)) %>%
ungroup() %>%
merge(ONSpop)%>%
mutate(dose=factor(dose, levels=c("dose1", "dose2", "dose3", "spring22", "autumn22")))
smootheddata <- data.frame(dose=character(), week=integer(), age=integer(),
smoothedno=double())
#First smooth out first 3 doses
for(i in c("dose1", "dose2", "dose3")){
for(j in min(smoothdata$week):max(smoothdata$week)){
working <- smoothdata %>%
filter(dose==i & week==j) %>%
mutate(no=if_else(no==0, 0.001, no))
x <- working$contage
y <- working$no
offset <- working$pop
nlast <- 21
smoothed <- pclm(x, y, nlast)
outputs <- as.data.frame(smoothed$fitted) %>%
mutate(dose=i, week=j, age=0:110) %>%
rename("smoothedno"="smoothed$fitted")
smootheddata=smootheddata %>% bind_rows(outputs)
}
}
#Add in spring boosters (only available to over 75s)
for(j in c(117:140)){
working <- smoothdata %>%
filter(dose=="spring22" & week==j & contage>=75) %>%
mutate(no=if_else(no==0, 0.001, no))
x <- working$contage
y <- working$no
offset <- working$pop
nlast <- 21
smoothed <- pclm(x, y, nlast)
outputs <- as.data.frame(smoothed$fitted) %>%
mutate(dose="spring22", week=j, age=75:110) %>%
rename("smoothedno"="smoothed$fitted")
smootheddata=smootheddata %>% bind_rows(outputs)
}
#Add in autumn boosters (only available to over 50s)
for(j in c(140:max(smoothdata$week))){
working <- smoothdata %>%
filter(dose=="autumn22" & week==j & contage>=50) %>%
mutate(no=if_else(no==0, 0.001, no))
x <- working$contage
y <- working$no
offset <- working$pop
nlast <- 21
smoothed <- pclm(x, y, nlast)
outputs <- as.data.frame(smoothed$fitted) %>%
mutate(dose="autumn22", week=j, age=50:110) %>%
rename("smoothedno"="smoothed$fitted")
smootheddata=smootheddata %>% bind_rows(outputs)
}
smootheddata <- smootheddata %>%
mutate(dose=factor(dose, levels=c("dose1", "dose2", "dose3", "spring22", "autumn22")))
agg_tiff("Outputs/COVIDVaxRidgesxAgexDoseSmoothed.tiff", units="in", width=8, height=8, res=500)
ggplot(smootheddata, aes(x=age, y=fct_rev(as.factor(week)), height=smoothedno, fill=dose,
colour=dose))+
geom_density_ridges(stat="identity", scale=10, alpha=0.4, rel_min_height=0.01)+
geom_segment(aes(x = 5, y = 35, xend = 5, yend = 25),
arrow = arrow(length = unit(0.3, "cm")), colour="Grey40")+
scale_x_continuous(name="Age", limits=c(0,105))+
scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101, 106, 110, 114,
118, 123, 127, 131, 136, 140, 144),
labels=c("Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct"), name="")+
scale_fill_paletteer_d("fishualize::Scarus_tricolor", name="Dose",
labels=c("1st dose", "2nd dose", "3rd dose/booster",
"Spring booster", "Autumn booster"))+
scale_colour_paletteer_d("fishualize::Scarus_tricolor", guide="none")+
annotate("text", x=2, y=30, angle=90, label="More recent", family="Lato", colour="Grey40")+
annotate("text", x=0, y=38, label="2022", family="Lato", colour="Grey40", size=rel(3))+
annotate("text", x=0, y=90, label="2021", family="Lato", colour="Grey40", size=rel(3))+
theme_custom()+
theme(axis.line.y=element_blank())+
labs(title="Vaccine rollout down the age groups",
subtitle="Age distribution of COVID vaccines delivered each week in England by dose",
caption="Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxRidgesxAgexDoseSmoothedv2.tiff", units="in", width=8, height=8, res=500)
ggplot(smootheddata, aes(x=age, y=fct_rev(as.factor(week)), height=smoothedno, fill=dose))+
geom_density_ridges(stat="identity", scale=10, alpha=0.4, rel_min_height=0.01, colour=NA)+
geom_segment(aes(x = 5, y = 35, xend = 5, yend = 25),
arrow = arrow(length = unit(0.3, "cm")), colour="Grey40")+
scale_x_continuous(name="Age", limits=c(0,105))+
scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101, 106, 110, 114,
118, 123, 127, 131, 136, 140, 144),
labels=c("Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct"), name="")+
scale_fill_paletteer_d("fishualize::Scarus_tricolor", name="Dose",
labels=c("1st dose", "2nd dose", "3rd dose/booster",
"Spring booster", "Autumn booster"))+
annotate("text", x=2, y=30, angle=90, label="More recent", family="Lato", colour="Grey40")+
annotate("text", x=0, y=43, label="2022", family="Lato", colour="Grey40", size=rel(3))+
annotate("text", x=0, y=95, label="2021", family="Lato", colour="Grey40", size=rel(3))+
theme_custom()+
theme(axis.line.y=element_blank())+
labs(title="Vaccine rollout down the age groups",
subtitle="Age distribution of COVID vaccines delivered each week in England by dose",
caption="Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxRidgesxAgexDoseSmoothedv3.tiff", units="in", width=8, height=8, res=500)
ggplot(smootheddata, aes(x=age, y=as.factor(week), height=smoothedno, fill=dose))+
geom_density_ridges(stat="identity", scale=10, alpha=0.4, colour=NA)+
geom_segment(aes(x = 5, y = 25, xend = 5, yend = 35),
arrow = arrow(length = unit(0.3, "cm")), colour="Grey40")+
scale_x_continuous(name="Age", limits=c(0,105))+
scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101),
labels=c("Dec\n2020", "Jan\n2021", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec"), name="")+
scale_fill_paletteer_d("lisa::AndyWarhol_2", name="Dose",
labels=c("1st dose", "2nd dose", "3rd dose/booster"))+
annotate("text", x=3, y=30, label="More recent", family="Lato", colour="Grey40")+
theme_custom()+
theme(axis.line.y=element_blank())+
labs(title="Vaccine rollout down the age groups",
subtitle="Age distribution of COVID vaccines delivered each week in England by dose",
caption="Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths")+
coord_flip()
dev.off()
================================================
FILE: Heatmaps/COVIDCycle.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(ukcovid19) #remotes::install_github("publichealthengland/coronavirus-dashboard-api-R-sdk")
library(paletteer)
library(ggtext)
library(extrafont)
options(scipen=9999)
admissions <- get_data(filters="areaType=nation", structure=list(date="date",
name="areaName",
admissions="newAdmissions"))
admissions <- admissions %>%
mutate(date=as.Date(date)) %>%
filter(date>as.Date("2020-03-19"))
deaths <- get_data(filters="areaType=nation", structure=list(date="date",
name="areaName",
deaths="newDeaths28DaysByDeathDate"))
deaths <- deaths %>%
mutate(date=as.Date(date)) %>%
filter(date>as.Date("2020-03-19"))
data <- merge(admissions, deaths) %>%
mutate(days=yday(date), weekno=if_else(year(date)==2020, week(date), week(date)+52), pop=case_when(
name=="England" ~ 56286961,
name=="Northern Ireland" ~ 1893667,
name=="Scotland" ~ 5463300,
name=="Wales" ~ 3152879),
admrate=admissions*100000/pop, mortrate=deaths*100000/pop) %>%
arrange(date)
weekdata <- data %>%
group_by(weekno, name) %>%
summarise(admissions=mean(admissions), deaths=mean(deaths),
admrate=mean(admrate), mortrate=mean(mortrate)) %>%
mutate(label=as.Date("2020-01-01")+days(weekno)*7-1, label=format(label, "%d %b %y")) %>%
ungroup() %>%
#Pull out every 4th week for labelling, making sure the most recent week is always labelled
#I bet there is a more elegant solution than this, but I just learned that %% does, so I am unrepentant
group_by(name) %>%
arrange(-weekno) %>%
mutate(flag=(max(weekno)-weekno) %% 4) %>%
ungroup() %>%
arrange(weekno)
#Faceted plot for UK nations
tiff("Outputs/COVIDCycleUK.tiff", units="in", width=12, height=8, res=500)
ggplot()+
geom_path(data=data, aes(x=admrate, y=mortrate), alpha=0.1,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=weekdata, aes(x=admrate, y=mortrate), colour="tomato",
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_text(data=weekdata %>% filter(flag==0),
aes(x=admrate, y=mortrate, label=label), size=rel(2), colour="Grey40",
vjust=-0.4)+
scale_x_continuous(trans="log10", name="Daily COVID-19 admissions per 100,000 (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths per 100,000 (log scale)")+
facet_wrap(~name)+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_text(face="bold", size=rel(1.6)),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Going round in circles",
subtitle="New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test across the UK by day and the weekly average",
caption="Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Plot for England only
EngCycle <- ggplot()+
geom_path(data=subset(data, name=="England"), aes(x=admissions, y=deaths), alpha=0.1,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=subset(weekdata, name=="England"), aes(x=admissions, y=deaths), colour="tomato",
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_text(data=weekdata %>% filter(name=="England" & flag==0),
aes(x=admissions, y=deaths, label=label), size=rel(2), colour="Grey40",
vjust=-0.4)+
scale_x_continuous(trans="log10", name="Daily COVID-19 admissions (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths (log scale)")+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"))+
labs(title="Going round in circles",
subtitle="New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test
in England by day and the weekly average",
caption="Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
tiff("Outputs/COVIDCycleEng.tiff", units="in", width=8, height=6, res=500)
EngCycle
dev.off()
png("Outputs/COVIDCycleEng.png", units="in", width=8, height=6, res=500)
EngCycle
dev.off()
#Plot for Wales only
tiff("Outputs/COVIDCycleWal.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_path(data=subset(data, name=="Wales"), aes(x=admissions, y=deaths), alpha=0.1,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=subset(weekdata, name=="Wales"), aes(x=admissions, y=deaths), colour="tomato",
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_text(data=weekdata %>% filter(name=="Wales" & flag==0),
aes(x=admissions, y=deaths, label=label), size=rel(2), colour="Grey40",
vjust=-0.4)+
scale_x_continuous(trans="log10", name="Daily COVID-19 admissions (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths (log scale)")+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"))+
labs(title="Going round in circles",
subtitle="New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test
in Wales by day and the weekly average",
caption="Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Plot for Scotland only
tiff("Outputs/COVIDCycleSco.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_path(data=subset(data, name=="Scotland"), aes(x=admissions, y=deaths), alpha=0.1,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=subset(weekdata, name=="Scotland"), aes(x=admissions, y=deaths), colour="tomato",
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_text(data=weekdata %>% filter(name=="Scotland" & flag==0),
aes(x=admissions, y=deaths, label=label), size=rel(2), colour="Grey40",
vjust=-0.4)+
scale_x_continuous(trans="log10", name="Daily COVID-19 admissions (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths (log scale)")+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"))+
labs(title="Going round in circles",
subtitle="New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test
in Scotland by day and the weekly average",
caption="Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Plot for NI only
tiff("Outputs/COVIDCycleNI.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_path(data=subset(data, name=="Northern Ireland"), aes(x=admissions, y=deaths), alpha=0.1,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=subset(weekdata, name=="Northern Ireland"), aes(x=admissions, y=deaths), colour="tomato",
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_text(data=weekdata %>% filter(name=="Northern Ireland" & flag==0),
aes(x=admissions, y=deaths, label=label), size=rel(2), colour="Grey40",
vjust=-0.4)+
scale_x_continuous(trans="log10", name="Daily COVID-19 admissions (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths (log scale)")+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"))+
labs(title="Going round in circles",
subtitle="New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test
in Northern Ireland by day and the weekly average",
caption="Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Repeat at regional level
admissions.reg <- get_data(filters="areaType=nhsregion", structure=list(date="date",
name="areaName",
admissions="newAdmissions"))
admissions.reg <- admissions.reg %>%
mutate(date=as.Date(date)) %>%
filter(date>as.Date("2020-03-19"))
deaths.reg <- get_data(filters="areaType=region", structure=list(date="date",
name="areaName",
deaths="newDeaths28DaysByDeathDate"))
#Compress regions to align (more or less) with NHS regions
deaths.reg <- deaths.reg %>%
mutate(date=as.Date(date)) %>%
filter(date>as.Date("2020-03-19")) %>%
mutate(name=case_when(name %in% c("East Midlands", "West Midlands") ~ "Midlands",
name %in% c("North East", "Yorkshire and The Humber") ~ "North East and Yorkshire",
TRUE ~ name)) %>%
group_by(date, name) %>%
summarise(deaths=sum(deaths)) %>%
ungroup()
data.reg <- merge(admissions.reg, deaths.reg) %>%
mutate(days=yday(date), weekno=if_else(year(date)==2020, week(date), week(date)+52), pop=case_when(
name=="East of England" ~ 6236072,
name=="London" ~ 8961989,
name=="Midlands" ~ 4835928+5934037,
name=="North East and Yorkshire" ~ 2669941+5502967,
name=="North West" ~ 7341196,
name=="South East" ~ 9180135,
name=="South West" ~ 5624696),
admrate=admissions*100000/pop, mortrate=deaths*100000/pop) %>%
arrange(date)
weekdata.reg <- data.reg %>%
group_by(weekno, name) %>%
summarise(admissions=mean(admissions), deaths=mean(deaths),
admrate=mean(admrate), mortrate=mean(mortrate)) %>%
mutate(label=as.Date("2020-01-01")+days(weekno)*7-1, label=format(label, "%d %b")) %>%
ungroup() %>%
group_by(name) %>%
arrange(-weekno) %>%
mutate(flag=(max(weekno)-weekno) %% 4) %>%
ungroup() %>%
arrange(weekno)
#Faceted plot for English regions
tiff("Outputs/COVIDCycleReg.tiff", units="in", width=14, height=8, res=500)
ggplot()+
geom_path(data=data.reg, aes(x=admrate, y=mortrate), alpha=0.1,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=weekdata.reg, aes(x=admrate, y=mortrate), colour="tomato",
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
#geom_text(data=weekdata.reg, aes(x=admrate, y=mortrate, label=label), size=rel(2), colour="Grey40",
# vjust=-0.4)+
scale_x_continuous(trans="log10", name="Daily COVID-19 admissions per 100,000 (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths per 100,000 (log scale)")+
facet_wrap(~name)+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_text(face="bold", size=rel(2)),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"))+
labs(title="Going round in circles",
subtitle="New hospital admissions with a positive COVID-19 test and deaths within 28 days of a positive test in England England by day and the weekly average.
Admissions data is published for NHS regions while deaths data is at government region level. These geographies are similar but may not overlap perfectly.",
caption="Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDCycle_US.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(geofacet)
library(ggtext)
library(ragg)
options(scipen=999)
#Get US state level COVID-19 admissions data from CDC/COVID-NET
#https://covidtracking.com/data/download
temp <- tempfile()
source <- "https://covidtracking.com/data/download/all-states-history.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp) %>%
select(date, state, deathIncrease, hospitalizedIncrease, hospitalizedCurrently) %>%
mutate(date=as.Date(date))
#Bring in populations from Johns Hopkins data
#https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data
temp <- tempfile()
source <- "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/UID_ISO_FIPS_LookUp_Table.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read.csv(temp) %>%
filter(iso3=="USA" & FIPS %in% c(1:56)) %>%
select(Province_State, Population)
#Get state abbreviations
st_crosswalk <- tibble(Province_State = state.name) %>%
bind_cols(tibble(state = state.abb)) %>%
bind_rows(tibble(Province_State = "District of Columbia", state = "DC"))
#Merge them in
pop <- merge(pop, st_crosswalk)
data <- merge(data, pop)
#Calculate rates
data <- data %>%
arrange(state, date) %>%
mutate(hosprate=hospitalizedIncrease*100000/Population,
deathrate=deathIncrease*100000/Population,
inhosprate=hospitalizedCurrently*100000/Population,
week=if_else(year(date)==2020, week(date), week(date)+52))
#National version
natdata <- data %>%
group_by(date) %>%
summarise(hospitalizedIncrease=sum(hospitalizedIncrease),
deathIncrease=sum(deathIncrease),
hospitalizedCurrently=sum(hospitalizedCurrently),
Population=sum(Population)) %>%
mutate(hosprate=hospitalizedIncrease*100000/(Population),
deathrate=deathIncrease*100000/(Population),
inhosprate=hospitalizedCurrently*100000/Population,
week=if_else(year(date)==2020, week(date), week(date)+52))
#generate weekly time series for both
weekdata <- data %>%
group_by(state, week) %>%
summarise(hospitalizedIncrease=sum(hospitalizedIncrease),
deathIncrease=sum(deathIncrease),
hospitalizedCurrently=sum(hospitalizedCurrently),
Population=unique(Population)) %>%
mutate(hosprate=hospitalizedIncrease*100000/(7*Population),
deathrate=deathIncrease*100000/(7*Population),
inhosprate=hospitalizedCurrently*100000/(7*Population),
label=as.Date("2020-03-03")+days(week-10)*7,
label=format(label, "%d %b"))
weeknatdata <- natdata %>%
group_by(week) %>%
summarise(hospitalizedIncrease=sum(hospitalizedIncrease),
deathIncrease=sum(deathIncrease),
hospitalizedCurrently=sum(hospitalizedCurrently),
Population=sum(Population)/7) %>%
mutate(hosprate=hospitalizedIncrease*100000/(7*Population),
deathrate=deathIncrease*100000/(7*Population),
inhosprate=hospitalizedCurrently*100000/(7*Population),
label=as.Date("2020-03-03")+days(week-10)*7,
label=format(label, "%d %b"))
#Plot
agg_tiff("Outputs/COVIDCycleUSA.tiff", units="in", width=12, height=8, res=500)
ggplot()+
geom_path(data=subset(natdata, week>=12),
aes(x=hosprate, y=deathrate), colour="Grey40", alpha=0.1,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=subset(weeknatdata, week>=12),
aes(x=hosprate, y=deathrate, colour=week), show.legend=FALSE,# colour="tomato",
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_text(data=subset(weeknatdata, week>=12),
aes(x=hosprate, y=deathrate, label=label), size=rel(2),
colour="Grey40", vjust=-0.4)+
scale_x_continuous(trans="log10", name="Number of COVID-19 patients in hospital per 100,000 (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths per 100,000 (log scale)")+
scale_colour_paletteer_c("pals::ocean.amp", limits=c(0.75*min(data$week),NA))+
theme_classic()+
theme(plot.subtitle=element_markdown(), plot.title=element_text(face="bold", size=rel(2)))+
labs(title="Things in the US are slowly getting better",
subtitle="COVID-19 hospitalisations and deaths in the United States by day and the weekly average",
caption="Inspired by @maartenzam | Data from The COVID Tracking Project (CC BY 4.0) | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCycleUSStates.tiff", units="in", width=14, height=10, res=500)
ggplot(data)+
#geom_path(data=subset(data, week>=12),
# aes(x=inhosprate, y=deathrate), colour="Grey40", alpha=0.1,
# arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
geom_path(data=subset(weekdata, week>=12),
aes(x=inhosprate, y=deathrate, colour=week), show.legend=FALSE)+
scale_x_continuous(trans="log10", name="Number of COVID-19 patients in hospital per 100,000 (log scale)")+
scale_y_continuous(trans="log10", name="Daily COVID-19 deaths per 100,000 (log scale)")+
scale_colour_paletteer_c("pals::ocean.amp")+
facet_geo(~state)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(2)))+
labs(title="Breaking the cycles",
subtitle="COVID-19 hospitalisations and deaths in the United States. Darker colours reflect more recent data",
caption="Inspired by @maartenzam | Data from The COVID Tracking Project (CC BY 4.0) | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDDeathsWithFrom.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(paletteer)
library(extrafont)
library(ragg)
library(lubridate)
library(scales)
library(ggtext)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Download latest primary diagnosis data
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- as.data.frame(t(read_excel(temp, sheet="Weekly figures by cause", range="B19:BA20",
col_names=FALSE))) %>%
mutate(date=seq.Date(from=as.Date("2021-01-02"), length.out=nrow(.), by="weeks")) %>%
set_names("total", "from", "date") %>%
mutate(with=total-from) %>%
gather(cause, deaths, c("with", "from")) %>%
mutate(cause=factor(cause, levels=c("with", "from")))
agg_tiff("Outputs/COVIDDeathsWithFrom.tiff", units="in", width=9, height=7, res=500)
ggplot(data, aes(x=date, y=deaths, fill=cause))+
geom_col(position="fill", show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of all deaths reported", label=label_percent(accuracy=1))+
scale_fill_manual(values=c("#F89088", "#40A0D8"))+
theme_custom()+
theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+
labs(title="Most COVID deaths are from not with COVID",
subtitle="Proportion of weekly deaths reported in England & Wales that mention COVID on the death certificate
where COVID was the underlying cause of death or only mentioned as a contributory cause",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDHFRs.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(scales)
library(lubridate)
library(RcppRoll)
library(extrafont)
library(paletteer)
library(ragg)
#Read in admissions data at regional level
admurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-daily-admissions-and-beds-20210610.xlsx"
admrange <- "BM"
deathurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-total-announced-deaths-11-June-2021.xlsx"
deathrange <- "QX"
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
temp <- tempfile()
temp <- curl_download(url=admurl, destfile=temp, quiet=FALSE, mode="wb")
admissions.new <- read_excel(temp, range=paste0("B14:", admrange, "21"),
col_names=FALSE) %>%
rename(region=`...1`) %>%
gather(date, admissions, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2))
beds.new <- read_excel(temp, range=paste0("B90:", admrange, "97"),
col_names=FALSE)%>%
rename(region=`...1`)%>%
gather(date, beds, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2))
#Read in older data
admurl.old <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-daily-admissions-and-beds-20210406-1.xlsx"
temp <- tempfile()
temp <- curl_download(url=admurl.old, destfile=temp, quiet=FALSE, mode="wb")
admissions.old <- read_excel(temp, range="B14:IQ21", col_names=FALSE)%>%
rename(region=`...1`)%>%
gather(date, admissions, c(2:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2))
beds.old <- read_excel(temp, range="B90:IQ97", col_names=FALSE)%>%
rename(region=`...1`)%>%
gather(date, beds, c(2:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2))
admissions <- bind_rows(admissions.old, admissions.new) %>%
arrange(region, date)
#Bring in deaths
temp <- tempfile()
temp <- curl_download(url=deathurl, destfile=temp, quiet=FALSE, mode="wb")
deaths <- read_excel(temp, sheet="Tab1 Deaths by region",
range=paste0("B17:", deathrange, "25"), col_names=FALSE) %>%
rename(region=`...1`) %>%
gather(date, deaths, c(2:ncol(.))) %>%
mutate(date=as.Date("2020-03-01")+days(as.numeric(substr(date, 4, 7))-2),
region=case_when(
region=="East Of England" ~ "East of England",
region=="North East And Yorkshire" ~ "North East and Yorkshire",
region=="England" ~ "ENGLAND",
TRUE ~ region))
beds <- bind_rows(beds.old, beds.new) %>%
mutate(date=date-days(1)) %>%
arrange(region, date) %>%
group_by(region) %>%
mutate(bedchange=beds-lag(beds, 1)) %>%
ungroup() %>%
merge(admissions) %>%
mutate(exits=admissions-bedchange) %>%
merge(deaths, all.x=TRUE) %>%
mutate(deaths=if_else(is.na(deaths), 0, deaths),
discharges=exits-deaths,
adm_roll=roll_mean(admissions, n=7, align="center", fill=NA),
deaths_roll=roll_mean(deaths, n=7, align="center", fill=NA),
discharges_roll=roll_mean(discharges, n=7, align="center", fill=NA),
deathstoadm=deaths_roll/adm_roll,
distoadm=discharges_roll/adm_roll,
region=if_else(region=="ENGLAND", "England", region))
agg_tiff("Outputs/COVIDNHSDeathsvsAdm.tiff", units="in", width=8, height=6, res=800)
ggplot(beds %>% filter(region=="England"),
aes(x=date, y=deathstoadm))+
geom_line(colour="#D62828")+
scale_x_date(name="")+
scale_y_continuous(name="Number of deaths per new admission", limits=c(0,NA))+
theme_custom()+
labs(title="The ratio of hospital deaths to admissions with COVID is still low",
subtitle="Rolling 7-day average of in-hospital COVID deaths divided by the number of new admissions and newly identified\ncases in hospital",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSDeathsvsAdmxReg.tiff", units="in", width=10, height=6, res=800)
ggplot(beds %>% filter(region!="England"),
aes(x=date, y=deathstoadm, colour=region))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Number of deaths per new admission")+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="")+
theme_custom()+
labs(title="The ratio of hospital deaths to admissions with COVID is still low",
subtitle="Rolling 7-day average of in-hospital COVID deaths divided by the number of new admissions and newly identified\ncases in hospital",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDHKVaxxAge.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(lubridate)
library(ggtext)
library(extrafont)
library(ragg)
library(paletteer)
library(readxl)
library(scales)
library(stringr)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Download HK vaccination data by age and dose from HK gov dashboard
source <- "https://static.data.gov.hk/covid-vaccine/bar_age.csv"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp) %>%
select(age_group, population, firstDose.total, secondDose.total, thirdDose.total) %>%
set_names("age", "pop", "Dose1", "Dose2", "Dose3")
areadata <- data %>%
mutate(unvax=pop-Dose1,
Dose1only=Dose1-Dose2,
Dose2only=Dose2-Dose3,
agemin=case_when(
age=="Aged 3-11" ~ 3,
TRUE ~ as.numeric(substr(age, 6,7))),
agemax=case_when(
age=="Aged 3-11" ~ 12,
age=="Aged 80 and above" ~ 100,
TRUE ~ as.numeric(substr(age, 9,10))+1),
agewidth=agemax-agemin,
dose3plot=pop/agewidth,
dose2plot=(Dose2only+Dose1only+unvax)/agewidth,
dose1plot=(Dose1only+unvax)/agewidth,
unvaxplot=unvax/agewidth)
tiff("Outputs/COVIDVaxxAgeHKArea.tiff", units="in", width=9, height=6.6, res=500)
ggplot(areadata)+
geom_rect(aes(xmin=0, xmax=unvaxplot, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_rect(aes(xmin=unvaxplot, xmax=dose1plot, ymin=agemin, ymax=agemax), fill="#D32934")+
geom_rect(aes(xmin=dose1plot, xmax=dose2plot, ymin=agemin, ymax=agemax), fill="#2F191B")+
geom_rect(aes(xmin=dose2plot, xmax=dose3plot, ymin=agemin, ymax=agemax), fill="#2BAA92")+
scale_x_continuous(name="Number of people at each single year of age", labels=abs)+
scale_y_continuous(name="Age", limits=c(0,100))+
theme_custom()+
theme(plot.subtitle=element_markdown(colour="Black"))+
labs(title="Hong Kong's vaccination programme has been poorly targeted",
subtitle="The number of people who are unvaccinated, or have received one ,two or three doses",
caption="Data from www.covidvaccine.gov.hk | Plot by @VictimOfMaths")
dev.off()
bardata <- data %>%
mutate(unvax=pop-Dose1) %>%
gather(Doses, Number, c(3:6)) %>%
mutate(age=factor(age, levels=c("Aged 3-11", "Aged 12-19", "Aged 20-29", "Aged 30-39",
"Aged 40-49", "Aged 50-59", "Aged 60-69", "Aged 70-79",
"Aged 80 and above")),
Doses=factor(Doses, levels=c("Dose3", "Dose2", "Dose1", "unvax")))
tiff("Outputs/COVIDVaxxAgeHK.tiff", units="in", width=7, height=6, res=500)
ggplot(bardata, aes(x=Number, y=age, fill=Doses))+
geom_col(position="fill")+
scale_x_continuous(name="Proportion of population", labels=label_percent(accuracy=1))+
scale_y_discrete(name="")+
scale_fill_manual(values=c("#2BAA92", "#2F191B", "#D32934", "Grey70"),
labels=c("Booster", "2 doses", "1 dose", "Unvaccinated"),
guide = guide_legend(reverse = TRUE), name="")+
theme_custom()+
theme(legend.position="top")+
labs(title="Hong Kong has many unvaccinated older people",
caption="Data from www.covidvaccine.gov.hk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDLACaseData.R
================================================
rm(list=ls())
library(tidyverse)
library(forcats)
library(cowplot)
library(ggridges)
library(geojsonio)
library(broom)
library(sf)
library(scales)
library(curl)
library(rmapshaper)
library(gganimate)
library(paletteer)
library(lubridate)
library(ragg)
library(extrafont)
options(scipen=999)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Read in data created by COVID_LA_Plots/UnderlyingCode.R, which lives here:
#https://github.com/VictimOfMaths/COVID_LA_Plots/blob/master/UnderlyingCode.R
#data <- read.csv("COVID_LA_Plots/LACases.csv")[,-c(1)]
load("COVID_LA_Plots/Alldata.RData")
mortdata <- data
data <- daydata
rm(daydata)
#EVERYWHERE
data.all <- data %>%
group_by(name) %>%
filter(!Region %in% c("Nation", "Region") & !is.na(casesroll_avg)) %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases), recentpeak=maxcaseprop[date==as.Date("2020-09-15")],
maxadmrate=max(admrate_avg, na.rm=TRUE),
maxadmday=date[which(admrate_avg==maxadmrate)][1],
maxadmprop=admrate_avg/maxadmrate, totaladm=sum(admissions, na.rm=TRUE))
plotfrom <- "2020-03-01"
plotto <- max(data.all$date)
#Plot case trajectories
casetiles.all <- ggplot(data.all, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")+
theme_custom()+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)),
axis.text.y=element_text(colour="Black"), plot.title=element_text(size=rel(1.8)))
casebars.all <- ggplot(subset(data.all, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme_custom()+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLACasesHeatmapUK.tiff", units="in", width=16, height=30, res=500)
plot_grid(casetiles.all, casebars.all, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLACasesHeatmapUK.png", units="in", width=16, height=30, res=500)
plot_grid(casetiles.all, casebars.all, align="h", rel_widths=c(1,0.2))
dev.off()
#Rate trajectories
ratetiles.all <- ggplot(data.all, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 case rates in Local Authorities/Council Areas across the UK",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases per 100,000 population.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of the LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
ratebars.all <- ggplot(subset(data.all, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLARatesHeatmapUK.tiff", units="in", width=16, height=30, res=500)
plot_grid(ratetiles.all, ratebars.all, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLARatesHeatmapUK.png", units="in", width=16, height=30, res=500)
plot_grid(ratetiles.all, ratebars.all, align="h", rel_widths=c(1,0.2))
dev.off()
#EVERYWHERE - SINCE 1ST JULY ONLY
data.all.recent <- data %>%
group_by(name) %>%
mutate(date=as.Date(date)) %>%
filter(!Region %in% c("Nation", "Region") & !is.na(casesroll_avg) & date>as.Date("2020-07-01")) %>%
mutate(maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases), recentpeak=maxcaseprop[date==as.Date("2020-09-15")])
plotfrom <- "2020-07-01"
plotto <- max(data.all.recent$date)
#Plot case trajectories
casetiles.all.recent <- ggplot(data.all.recent, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
casebars.all.recent <- ggplot(subset(data.all.recent, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases", breaks=c(0,5000,10000))+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLACasesHeatmapUK_Recent.tiff", units="in", width=10, height=30, res=500)
plot_grid(casetiles.all.recent, casebars.all.recent, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLACasesHeatmapUK_Recent.png", units="in", width=16, height=30, res=500)
plot_grid(casetiles.all.recent, casebars.all.recent, align="h", rel_widths=c(1,0.2))
dev.off()
#########
#ENGLAND#
#########
data.e <- data %>%
group_by(name) %>%
filter(country=="England" & name!="England" & !is.na(casesroll_avg)) %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases), maxadmrate=max(admrate_avg, na.rm=TRUE),
maxadmday=date[which(admrate_avg==maxadmrate)][1],
maxadmprop=admrate_avg/maxadmrate, totaladm=sum(admissions, na.rm=TRUE))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.e$date)
plotadmto <- max(data.e$date[!is.na(data.e$admrate_avg)])
#Plot case trajectories
casetiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
casebars.e <- ggplot(subset(data.e, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLACasesHeatmap.tiff", units="in", width=16, height=26, res=500)
plot_grid(casetiles.e, casebars.e, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLACasesHeatmap.png", units="in", width=16, height=26, res=500)
plot_grid(casetiles.e, casebars.e, align="h", rel_widths=c(1,0.2))
dev.off()
ratetiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 case rates in Local Authorities in England",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases per 100,000 population.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of the LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHE | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
ratebars.e <- ggplot(subset(data.e, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLARatesHeatmapEng.tiff", units="in", width=16, height=24, res=500)
plot_grid(ratetiles.e, ratebars.e, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLARatesHeatmapEng.png", units="in", width=16, height=24, res=500)
plot_grid(ratetiles.e, ratebars.e, align="h", rel_widths=c(1,0.2))
dev.off()
admtiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxadmday), fill=maxadmprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(as.Date("2020-08-03"), plotadmto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotadmto)%/% months(1)))+
labs(title="Timelines for COVID-19 admissions in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed hospital admissions, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new admissions Bars on the right represent the absolute number of admissions in each LA.\nData updated to ",
plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed.\nAdmissions are defined as patients admitted with a positive COVID-19 diagnosis, or those diagnosed in hospital"),
caption="Data from NHS England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
admbars.e <- ggplot(subset(data.e, date==maxadmday), aes(x=totaladm, y=fct_reorder(name, maxadmday),
fill=totaladm))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed admissions")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLAAdmissionsHeatmap.tiff", units="in", width=10, height=26, res=500)
plot_grid(admtiles.e, admbars.e, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLAAdmissionsHeatmap.png", units="in", width=10, height=26, res=500)
plot_grid(admtiles.e, admbars.e, align="h", rel_widths=c(1,0.2))
dev.off()
admratetiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxadmday), fill=admrate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(as.Date("2020-08-03"), plotadmto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotadmto)%/% months(1)))+
labs(title="Timelines for COVID-19 admission rates in Local Authorities in England",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed hospital admissions per 100,000 population.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of the LA.\nData updated to ",
plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed.\nAdmissions are defined as patients admitted with a positive COVID-19 diagnosis, or those diagnosed in hospital"),
caption="Data from NHS England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
admratebars.e <- ggplot(subset(data.e, date==maxadmday), aes(x=pop, y=fct_reorder(name, maxadmday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLAAdmRatesHeatmapEng.tiff", units="in", width=10, height=24, res=500)
plot_grid(admratetiles.e, admratebars.e, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLAAdmRatesHeatmapEng.png", units="in", width=10, height=24, res=500)
plot_grid(admratetiles.e, admratebars.e, align="h", rel_widths=c(1,0.2))
dev.off()
#######
#WALES#
#######
data.w <- data %>%
group_by(name) %>%
filter(country=="Wales" & name!="Wales" & !is.na(casesroll_avg)) %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.w$date)
#Plot case trajectories
casetiles.w <- ggplot(data.w, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in Welsh Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Wales | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
casebars.w <- ggplot(subset(data.w, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDWelshLACasesHeatmap.tiff", units="in", width=12, height=6, res=500)
plot_grid(casetiles.w, casebars.w, align="h", rel_widths=c(1,0.2))
dev.off()
agg_tiff("Outputs/COVIDWelshLACaseRidges.tiff", units="in", width=10, height=6, res=500)
ggplot(data.w, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity")+
theme_custom()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Welsh Local Authorities",
caption="Data from Public Health Wales | Plot by @VictimOfMaths")
dev.off()
ratetiles.w <- ggplot(data.w, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 case rates in Local Authorities in Wales",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases per 100,000 population.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of the LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHW | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
ratebars.w <- ggplot(subset(data.w, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLARatesHeatmapWal.tiff", units="in", width=12, height=6, res=500)
plot_grid(ratetiles.w, ratebars.w, align="h", rel_widths=c(1,0.2))
dev.off()
##########
#Scotland#
##########
data.s <- data %>%
group_by(name) %>%
filter(country=="Scotland" & name!="Scotland" & !is.na(casesroll_avg)) %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.s$date)
#Plot case trajectories
casetiles.s <- ggplot(data.s, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in Scottish Coucils",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Council area.\nCouncils are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each Council area.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Scotland | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
casebars.s <- ggplot(subset(data.s, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDScottishCouncilCasesHeatmap.tiff", units="in", width=12, height=6, res=500)
plot_grid(casetiles.s, casebars.s, align="h", rel_widths=c(1,0.2))
dev.off()
agg_tiff("Outputs/COVIDScottishCouncilCaseRidges.tiff", units="in", width=10, height=6, res=500)
ggplot(data.s, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity")+
theme_custom()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Scottish Council areas",
caption="Data from Public Health Scotland | Plot by @VictimOfMaths")
dev.off()
ratetiles.s <- ggplot(data.s, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 case rates in Council Areas in Scotland",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases per 100,000 population.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of the LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHS | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
ratebars.s <- ggplot(subset(data.s, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLARatesHeatmapSco.tiff", units="in", width=12, height=6, res=500)
plot_grid(ratetiles.s, ratebars.s, align="h", rel_widths=c(1,0.2))
dev.off()
##########
#Northern Ireland#
##########
data.ni <- data %>%
group_by(name) %>%
filter(country=="Northern Ireland" & name!="Northern Ireland" & !is.na(casesroll_avg)) %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.ni$date)
#Plot case trajectories
casetiles.ni <- ggplot(data.ni, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(2)))+
labs(title="Timelines for COVID-19 cases in Northern Irish Local Authoritiess",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nAuthorities are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each Local Authority.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)),
axis.text.x=element_text(colour="Black"))
casebars.ni <- ggplot(subset(data.ni, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDNILACasesHeatmap.tiff", units="in", width=12, height=6, res=500)
plot_grid(casetiles.ni, casebars.ni, align="h", rel_widths=c(1,0.2))
dev.off()
agg_tiff("Outputs/COVIDNILACaseRidges.tiff", units="in", width=10, height=6, res=500)
ggplot(data.ni, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity")+
theme_custom()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(2)))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Northern Irish Local Authorities",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
ratetiles.ni <- ggplot(data.ni, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 case rates in Local Authorities in Northern Ireland",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases per 100,000 population.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of the LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from DoHNI | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
ratebars.ni <- ggplot(subset(data.ni, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLARatesHeatmapNI.tiff", units="in", width=12, height=4, res=500)
plot_grid(ratetiles.ni, ratebars.ni, align="h", rel_widths=c(1,0.2))
dev.off()
############
#Animations#
############
#Hex map
data.hex <- data
#Sort out Buckinghamshire to match hex template
temp <- subset(data, code=="E06000060")
data.hex$code <- if_else(data$code=="E06000060", "E07000004", as.character(data$code))
data.hex$name <- if_else(data$name=="Buckinghamshire", "Aylesbury Vale", as.character(data$name))
temp1 <- temp
temp1$code <- "E07000005"
temp1$name <- "Chiltern"
temp2 <- temp
temp2$code <- "E07000006"
temp2$name <- "South Bucks"
temp$code <- "E07000007"
temp$name <- "Wycombe"
data.hex <- bind_rows(data.hex, temp, temp1, temp2)
#Bring in hexmap
#Read in hex boundaries (adapted from from https://olihawkins.com/2018/02/1 and ODI Leeds)
hex <- geojson_read("Data/UKLA.geojson", what="sp")
# Fortify into a data frame format to be shown with ggplot2
hexes <- tidy(hex, region="id")
hexes$id <- if_else(hexes$id=="E09000001", "E09000012", hexes$id)
data.hex <- left_join(hexes, data.hex, by=c("id"="code"), all.y=TRUE)
data.hex$date <- as.Date(data.hex$date)
#Remove Isles of Scilly which are too small to have their own data
data.hex <- subset(data.hex, id!="E06000053")
#extract latest date with full UK data
data.hex <- data.hex %>%
group_by(country) %>%
filter(country!="Republic of Ireland" & !is.na(casesroll_avg)) %>%
mutate(min=min(date), max=max(date))
completefrom <- max(data.hex$min, na.rm=TRUE)
completeto <- min(data.hex$max, na.rm=TRUE)
HexAnimUK <- ggplot()+
geom_polygon(data=subset(data.hex, date>as.Date("2020-03-06") & date<=completeto),
aes(x=long, y=lat, group=id, fill=casesroll_avg))+
coord_fixed()+
scale_fill_distiller(palette="Spectral", name="Daily confirmed\ncases (7-day\nrolling avg.)", na.value="white")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of COVID-19 across the UK",
subtitle="Rolling 7-day average number of new confirmed cases.\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI\nVisualisation by @VictimOfMaths")
animate(HexAnimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/HexAnimUK.gif"),
device="ragg_png", end_pause=60)
#Rates version
HexAnimUKrate <- ggplot()+
geom_polygon(data=subset(data.hex, date>as.Date("2020-03-06") & date<=completeto),
aes(x=long, y=lat, group=id, fill=caserate_avg))+
coord_fixed()+
scale_fill_distiller(palette="Spectral", name="Daily confirmed\ncases/100,000\n(7-day rolling avg.)", na.value="white")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of COVID-19 across the UK",
subtitle="Rolling 7-day average number of new confirmed cases per 100,000.\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI\nVisualisation by @VictimOfMaths")
animate(HexAnimUKrate, duration=18, fps=10, width=2000, height=3000, res=300,
renderer=gifski_renderer("Outputs/HexAnimUKrate.gif"),
device="ragg_png", end_pause=60)
#Chloropeth map
data.map <- subset(data, as.Date(date) %within% interval(completefrom,completeto)) %>%
filter(!Region %in% c("Nation", "Region"))
#Sort out Buckinghamshire to match hex template
temp <- subset(data.map, code=="E06000060")
data.map$code <- if_else(data.map$code=="E06000060", "E07000004", as.character(data.map$code))
data.map$name <- if_else(data.map$name=="Buckinghamshire", "Aylesbury Vale", as.character(data.map$name))
temp1 <- temp
temp1$code <- "E07000005"
temp1$name <- "Chiltern"
temp2 <- temp
temp2$code <- "E07000006"
temp2$name <- "South Bucks"
temp$code <- "E07000007"
temp$name <- "Wycombe"
data.map <- bind_rows(data.map, temp, temp1, temp2)
temp <- tempfile()
temp2 <- tempfile()
source <- "https://t.co/GwVCSDNThM?amp=1"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "LAD19CD"] <- "code"
simplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)
#TODO fix Northamptonshire in these maps
map.cases <- full_join(simplemap, data.map, by="code", all.y=TRUE)
map.cases$date <- as.Date(map.cases$date)
#Map of current cases
agg_tiff("Outputs/COVIDCaseMapUK.tiff", units="in", width=8, height=12, res=500)
map.cases %>%
filter(date==completeto-days(3) & !name %in% c("England", "Wales", "Northern Ireland", "Scotland")) %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=casesroll_avg), colour=NA)+
scale_fill_distiller(palette="Spectral", name="Daily cases\n(rolling 7-day avg.)")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Confirmed new COVID-19 cases in the UK",
subtitle=paste0("Rolling 7-day average of confirmed new cases at Local Authority/Council Area level\nData up to ", completeto-days(3)),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCaserateMapUK.tiff", units="in", width=8, height=12, res=500)
map.cases %>%
filter(date==completeto-days(3) & !name %in% c("England", "Wales", "Northern Ireland", "Scotland")) %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=caserate_avg), colour=NA)+
scale_fill_distiller(palette="Spectral", name="Daily cases\nper 100,000\n(rolling 7-day avg.)")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Rates of confirmed new COVID-19 cases in the UK",
subtitle=paste0("Rolling 7-day average of confirmed new cases per 100,000 at Local Authority/Council Area level\nData up to ", completeto-days(3)),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")
dev.off()
#Map of admission rates
admmaxdate <- max(map.cases$date[!is.na(map.cases$admrate_avg)])
agg_tiff("Outputs/COVIDAdmrateMapUK.tiff", units="in", width=8, height=7.5, res=500)
map.cases %>%
filter(date==admmaxdate & !name %in% c("England", "Wales", "Northern Ireland", "Scotland")) %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=admrate_avg), colour=NA)+
scale_fill_distiller(palette="Spectral", name="Daily admissions\nper 100,000",
na.value="transparent")+
xlim(-116,655644)+
ylim(5337,620000)+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Rates of confirmed new COVID-19 admissions in England",
subtitle=paste0("Rolling 7-day average of confirmed new hospital admissions with COVID-19 per 100,000 at Local Authority level\nData up to ", admmaxdate),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
###########################
#UKLTLA heatmap ordered from S->N
lat.data <- map.cases %>%
select(code, LAT) %>%
as.data.frame() %>%
select(code, LAT) %>%
distinct() %>%
filter(!is.na(code) & !code %in% c("E06000062", "E06000061")) %>%
#Fix Northamptonshire LA changes (use Northampton and Kettering as the latitudes for the new counties)
bind_rows(map.cases %>% filter(code %in% c("E07000154", "E07000153")) %>%
as.data.frame() %>%
select(code, LAT) %>%
mutate(code=if_else(code=="E07000154", "E06000062", "E06000061")))
data.all2 <- merge(data.all, lat.data)
#Plot case trajectories
casetiles.all2 <- ggplot(data.all2, aes(x=date, y=fct_reorder(name, LAT), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered from North to South. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(1.6)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(2.5)))
casebars.all2 <- ggplot(subset(data.all2, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, LAT), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLACasesHeatmapUKOrdered.tiff", units="in", width=25, height=30, res=500)
plot_grid(casetiles.all2, casebars.all2, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLACasesHeatmapUKOrdered.png", units="in", width=25, height=30, res=500)
plot_grid(casetiles.all2, casebars.all2, align="h", rel_widths=c(1,0.2))
dev.off()
ratetiles.all2 <- ggplot(data.all2, aes(x=date, y=fct_reorder(name, LAT), fill=caserate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases per 100,000.\nLAs are ordered from North to South. Bars on the right represent the population each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
ratebars.all2 <- ggplot(subset(data.all2, date==maxcaseday), aes(x=pop, y=fct_reorder(name, LAT), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLARatesHeatmapUKOrdered.tiff", units="in", width=16, height=30, res=500)
plot_grid(ratetiles.all2, ratebars.all2, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLARatesHeatmapUKOrdered.png", units="in", width=16, height=30, res=500)
plot_grid(ratetiles.all2, ratebars.all2, align="h", rel_widths=c(1,0.2))
dev.off()
#Order admissions map for England only
admtiles.e2 <- ggplot(subset(data.all2, !is.na(admrate_avg)), aes(x=date, y=fct_reorder(name, lat),
fill=admrate_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(as.Date("2020-08-03"), plotadmto)), expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotadmto)%/% months(1)))+
labs(title="Timelines for COVID-19 admissions in Local Authorities in England",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed hospital admissions per 100,000 population.\nLAs are ordered from North to South. Bars on the right represent the population of the LA.\nData updated to ",
plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed.\nAdmissions are defined as patients admitted with a positive COVID-19 diagnosis, or those diagnosed in hospital"),
caption="Data from NHS England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.2)))
admbars.e2 <- ggplot(subset(data.all2, !is.na(admrate_avg) & date==maxadmday),
aes(x=pop, y=fct_reorder(name, lat), fill=pop))+
geom_col(show.legend=FALSE)+
theme_custom()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDLTLAAdmRatesHeatmapEngOrdered.tiff", units="in", width=10, height=26, res=500)
plot_grid(admtiles.e2, admbars.e2, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDLTLAAdmRatesHeatmapEngOrdered.png", units="in", width=10, height=26, res=500)
plot_grid(admtiles.e2, admbars.e2, align="h", rel_widths=c(1,0.2))
dev.off()
#Map of changes in admission and case rates in the last 7 days:
data.map2 <- data.map %>%
filter(country=="England") %>%
mutate(date=as.Date(date)) %>%
arrange(code, date) %>%
group_by(code) %>%
mutate(admchange=admrate_avg-lag(admrate_avg,7)) %>%
filter(date==plotadmto)
data.map3 <- data.map %>%
mutate(date=as.Date(date)) %>%
arrange(code, date) %>%
group_by(code) %>%
mutate(casechange=caserate_avg-lag(caserate_avg,7)) %>%
filter(date==plotto-days(3))
map.admchange <- full_join(simplemap, data.map2, by="code", all.y=TRUE) %>%
filter(!is.na(admchange))
map.admchange$date <- as.Date(map.admchange$date)
map.casechange <- full_join(simplemap, data.map3, by="code", all.y=TRUE) %>%
filter(!is.na(casechange))
map.casechange$date <- as.Date(map.casechange$date)
#Map of week-on-week change in cases
agg_tiff("Outputs/COVIDCasesChangeMapUK.tiff", units="in", width=8, height=10, res=500)
map.casechange %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=casechange), colour=NA)+
scale_fill_paletteer_c("scico::roma", limit=c(-1,1)*max(abs(map.casechange$casechange)),
name="Change in cases\nper day per 100,000\nin the past week", direction=-1,
na.value="transparent")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="Changes in COVID-19 cases across the UK",
subtitle=paste0("Change in the rolling 7-day average rate of new confirmed COVID-19\nbetween ", plotto-days(10) , " and ", plotto-days(3)),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Map of week-on-week change in admissions
agg_tiff("Outputs/COVIDAdmChangeMap.tiff", units="in", width=8, height=8, res=500)
map.admchange %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=admchange), colour=NA)+
scale_fill_paletteer_c("scico::roma", limit=c(-1,1)*max(abs(map.admchange$admchange)),
name="Change in admissions\nper day per 100,000\nin the past week", direction=-1,
na.value="transparent")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="Changes in COVID-19 hospital admissions across England",
subtitle=paste0("Change in the rolling 7-day average rate of new admissions between ", plotadmto-days(7), " and ", plotadmto),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Line chart of cases by country
agg_tiff("Outputs/COVIDCaserateUK.tiff", units="in", width=12, height=6, res=500)
ggplot(subset(data, Region=="Nation" & as.Date(date)>as.Date("2021-05-01") & as.Date(date)as.Date("2021-05-01") & as.Date(date)as.Date("2020-10-01") & as.Date(date)as.Date("2021-01-01") & as.Date(date)%
filter(Region=="Nation") %>%
mutate(date=as.Date(date)) %>%
group_by(date) %>%
summarise(cases=sum(cases), casesroll_avg=sum(casesroll_avg))
agg_tiff("Outputs/COVIDCaseNumbersUK.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_col(data=subset(bardata, date<=plotto),aes(x=date, y=cases), fill="skyblue2")+
geom_line(data=subset(bardata, date<=plotto-days(3)), aes(x=date, y=casesroll_avg), colour="red")+
scale_x_date(name="",
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
scale_y_continuous(name="Daily new cases")+
theme_custom()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
plot.subtitle=element_markdown(),
text=element_text(family="Roboto"), axis.text.x=element_text(angle=45, hjust=1, vjust=1))+
labs(title="The fall in new COVID cases has stalled",
subtitle="Daily confirmed new cases and the rolling 7-day average across the UK",
caption="Date from coronavirus.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Map of COVID deaths rates and changes in COVID death rates
maxweek <- 56
#Collapse to LA level
mortdata <- mortdata %>%
group_by(week, name, code) %>%
filter(measure=="Registrations") %>%
summarise(deaths=sum(COVID.20), pop=unique(pop)) %>%
group_by(name, code) %>%
mutate(mortrate=deaths*100000/pop,
mortratechange=mortrate-lag(mortrate, 1, order_by=week)) %>%
ungroup() %>%
filter(week==maxweek)
#Sort out Buckinghamshire to match map template
temp <- subset(mortdata, code=="E06000060")
mortdata$code <- if_else(mortdata$code=="E06000060", "E07000004", as.character(mortdata$code))
mortdata$name <- if_else(mortdata$name=="Buckinghamshire", "Aylesbury Vale", as.character(mortdata$name))
temp1 <- temp
temp1$code <- "E07000005"
temp1$name <- "Chiltern"
temp2 <- temp
temp2$code <- "E07000006"
temp2$name <- "South Bucks"
temp$code <- "E07000007"
temp$name <- "Wycombe"
mortdata <- bind_rows(mortdata, temp, temp1, temp2)
mortmap.data <- full_join(simplemap, mortdata, by="code", all.y=TRUE)
#Map of death rates
agg_tiff("Outputs/COVIDMortrateMapUK.tiff", units="in", width=8, height=7.5, res=500)
mortmap.data %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=mortrate), colour=NA)+
scale_fill_distiller(palette="Spectral", name="COVID-19 deaths\nper 100,000",
na.value="transparent")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Rates of confirmed COVID-19 deaths in Great Britain",
subtitle=paste0("Weekly rates of deaths recorded as due to COVID-19 on the death certificate\nData up to ", as.Date("2020-01-03")+weeks(maxweek-1)),
caption="Data from ONS & NRS | Plot by @VictimOfMaths")
dev.off()
#Map of week-on-week change in death rates
agg_tiff("Outputs/COVIDMortChangeMap.tiff", units="in", width=8, height=8, res=500)
mortmap.data %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=mortratechange), colour=NA)+
scale_fill_paletteer_c("scico::roma", limit=c(-1,1)*max(abs(mortmap.data$mortratechange)),
name="Change in deaths\nper week per 100,000\nvs. the previous week", direction=-1,
na.value="transparent")+
theme_custom()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="Changes in confirmed COVID-19 deaths in Great Britain",
subtitle=paste0("Change in the rates of deaths recorded as due to COVID-19 between weeks ", maxweek, " & ",maxweek-1,"\nData up to ", as.Date("2020-01-03")+weeks(maxweek-1)),
caption="Data from ONS & NRS | Plot by @VictimOfMaths")
dev.off()
####################################################################################################
#These last 2 animations require a more powerful computer/more patience than I have, so I'm
#not 100% certain they actually work...
CaseAnimAbs <- map.cases %>%
filter(!name %in% c("England", "Wales", "Northern Ireland", "Scotland") & date>as.Date("2020-02-25")) %>%
ggplot(aes(geometry=geometry, fill=casesroll_avg))+
geom_sf(colour=NA)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily cases\n(rolling 7-day avg.)")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average number of new confirmed cases in each Local Authority/Council area\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths")
animate(CaseAnimAbs, duration=25, fps=2, width=2000, height=3000, res=100, renderer=gifski_renderer("Outputs/CaseAnimAbs.gif"), end_pause=60)
CaseAnimRate <- map.cases %>%
filter(!name %in% c("England", "Wales", "Northern Ireland", "Scotland") & !is.na(date)) %>%
ggplot(aes(geometry=geometry, fill=caserate_avg))+
geom_sf(colour=NA)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily cases\nper 100,000\n(rolling 7-day avg.)")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average rate of new confirmed cases per 100,000 in each Local Authority/Council area\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths")
animate(CaseAnimRate, duration=25, fps=2, width=2000, height=3000, res=100, renderer=gifski_renderer("Outputs/CaseAnimRate.gif"), end_pause=60)
================================================
FILE: Heatmaps/COVIDLineages.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(extrafont)
library(geofacet)
library(scales)
library(ragg)
url <- "https://covid-surveillance-data.cog.sanger.ac.uk/download/lineages_by_ltla_and_week.tsv"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- read_tsv(temp)
#Read in LTLA to region lookup
temp <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LADtoRegion <- read.csv(temp)[,c(1,4)]
colnames(LADtoRegion) <- c("LTLA", "Region")
data <- merge(rawdata, LADtoRegion,all.x=TRUE) %>%
mutate(Region=case_when(
LTLA %in% c("E07000246", "E06000058", "E06000059") ~ "South West",
LTLA %in% c("E07000245", "E07000244") ~ "East of England",
TRUE ~ Region),
WeekEndDate=as.Date(WeekEndDate),
strain=case_when(
Lineage=="B.1.177" ~ "B.1.177",
Lineage=="AY.4.2" ~ "Delta (AY4.2 variant)",
Lineage=="B.1.617.2" | substr(Lineage,1,3)=="AY." ~ "Delta (OG)",
Lineage=="B.1.1.7" ~ "Alpha",
Lineage %in% c("B.1.1.529", "BA.1") ~ "Omicron",
Lineage=="BA.2" ~ "Stealth Omicron",
TRUE ~ "Other variants")) %>%
group_by(WeekEndDate, strain, Region) %>%
summarise(Count=sum(Count)) %>%
ungroup() %>%
group_by(WeekEndDate, Region) %>%
mutate(Total=sum(Count)) %>%
ungroup() %>%
mutate(prop=Count/Total,
strain=factor(strain, levels=c("B.1.177", "Alpha", "Delta (OG)", "Delta (AY4.2 variant)",
"Omicron", "Stealth Omicron", "Other variants")))
#Compare regions
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),
code=c(1:9))
agg_tiff("Outputs/COVIDGenomesCountxReg.tiff", units="in", width=10, height=8, res=500)
ggplot(data, aes(x=WeekEndDate, y=Count, fill=strain))+
geom_col(position="stack")+
scale_x_date(name="")+
scale_y_continuous(name="Genomes sequenced")+
scale_fill_paletteer_d("khroma::bright", name="Lineage")+
facet_geo(~Region, grid=mygrid)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.4)))+
labs(title="We are now sequencing more COVID genomes than ever before",
subtitle=paste0("Number of total COVID-19 genomes sequenced by the Wellcome Sanger Institute identified as belonging to selected major lineages.\nData up to ", max(rawdata$WeekEndDate)),
caption="Data from Wellcome Sanger Institute | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDGenomesStackedxReg.tiff", units="in", width=10, height=8, res=500)
ggplot(data, aes(x=WeekEndDate, y=prop, fill=strain))+
geom_col(position="stack")+
scale_x_date(name="")+
scale_y_continuous(name="Genomes sequenced", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("khroma::bright", name="Lineage")+
facet_geo(~Region, grid=mygrid)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.4)),
axis.text.x=element_text(angle=45, hjust=1, vjust=1))+
labs(title="The Delta variant is still dominant across England. For now",
subtitle=paste0("Proportion of total COVID-19 genomes sequenced by the Wellcome Sanger Institute identified as belonging to selected major lineages.\nData up to ", max(rawdata$WeekEndDate)),
caption="Data from Wellcome Sanger Institute | Plot by @VictimOfMaths")
dev.off()
#National picture
natdata <- data %>%
group_by(WeekEndDate, strain) %>%
summarise(Count=sum(Count), Total=sum(Total)) %>%
ungroup() %>%
mutate(prop=Count/Total)
agg_tiff("Outputs/COVIDGenomesCount.tiff", units="in", width=10, height=8, res=500)
ggplot(natdata, aes(x=WeekEndDate, y=Count, fill=strain))+
geom_col(position="stack")+
scale_x_date(name="")+
scale_y_continuous(name="Genomes sequenced")+
scale_fill_paletteer_d("khroma::bright", name="Lineage")+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.4)))+
labs(title="We are now sequencing more COVID genomes than ever before",
subtitle=paste0("Number of total COVID-19 genomes sequenced by the Wellcome Sanger Institute identified as belonging to selected major lineages.\nData up to ", max(rawdata$WeekEndDate)),
caption="Data from Wellcome Sanger Institute | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDGenomesStacked.tiff", units="in", width=10, height=8, res=500)
ggplot(natdata, aes(x=WeekEndDate, y=Count, fill=strain))+
geom_col(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proprtion of genomes sequenced", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("khroma::bright", name="Lineage")+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.4)),
axis.text.x=element_text(angle=45, hjust=1, vjust=1))+
labs(title="The Delta variant is still dominant across England. For now",
subtitle=paste0("Proportion of total COVID-19 genomes sequenced by the Wellcome Sanger Institute identified as belonging to selected major lineages.\nData up to ", max(rawdata$WeekEndDate)),
caption="Data from Wellcome Sanger Institute | Plot by @VictimOfMaths")
dev.off()
#Using more current COG data (no subnational split)
#Download Covid genome data
temp <- tempfile()
source <- "https://cog-uk.s3.climb.ac.uk/phylogenetics/latest/cog_metadata.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp) %>%
mutate(sample_date=as.Date(sample_date)) %>%
select(sample_date, scorpio_call, epi_week, lineage) %>%
mutate(lineagegroup=case_when(
substr(scorpio_call, 1, 5)=="Alpha" ~ "Alpha",
scorpio_call=="Delta (AY.4.2-like)" ~ "Delta (AY4.2 variant)",
substr(scorpio_call, 1, 5)=="Delta" ~ "Delta (OG)",
grepl("Omicron", scorpio_call) ~ "Omicron",
lineage=="B.1.177" ~ "B.1.177",
TRUE ~ "Other variants"),
lineagegroup=factor(lineagegroup, levels=c("B.1.177", "Alpha", "Delta (OG)", "Delta (AY4.2 variant)",
"Omicron", "Other variants")))
dailydata <- data %>%
group_by(lineagegroup, sample_date) %>%
summarise(count=n())
agg_tiff("Outputs/COVIDGenomesStackedCOG.tiff", units="in", width=10, height=8, res=500)
ggplot(dailydata %>% filter(sample_date>as.Date("2020-08-01")),
aes(x=sample_date, y=count, fill=lineagegroup))+
geom_col(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of genomes sequenced", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("khroma::bright", name="Lineage")+
theme_classic()+
theme(text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="Omicron is coming...",
subtitle=paste0("Proportion of total COVID-19 genomes reported by COG-UK as belonging to selected major lineages.\nData up to ", max(dailydata$sample_date)),
caption="Data from COG-UK | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDMSOACaseRatexIMD.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(paletteer)
library(geofacet)
library(scales)
temp <- tempfile()
source <- ("https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
casedata <- read_csv(temp)
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE)[,c(1,2,5,6)]
colnames(IMD) <- c("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
temp <- tempfile()
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, RGN11NM) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read_excel(file.path(temp2, "SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx"),
sheet="Mid-2019 Persons", range="A6:G34758", col_names=FALSE)[,c(1,7)]
colnames(pop) <- c("LSOA11CD", "pop")
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop)) %>%
ungroup() %>%
#Then merge into COVID case data
merge(casedata, by.x="MSOA11CD", by.y="areaCode", all=TRUE) %>%
rename(msoa11cd=MSOA11CD, caserate=newCasesBySpecimenDateRollingRate)
#Calculate lagged changes in 1 week, 2 weeks and 3 weeks for each MSOA
data <- IMD_MSOA %>%
select(caserate, date, IMDrank, regionName) %>%
filter(date>=max(date)-weeks(3)) %>%
spread(date, caserate) %>%
#There is definitely a better way to dynamically reference these columns, but this does work
mutate(abs1wk=.[[ncol(.)]]-.[[ncol(.)-1]],
abs2wk=.[[ncol(.)]]-.[[ncol(.)-2]],
abs3wk=.[[ncol(.)]]-.[[ncol(.)-3]],
rel1wk=abs1wk/.[[ncol(.)-1]],
rel2wk=abs2wk/.[[ncol(.)-2]],
rel3wk=abs3wk/.[[ncol(.)-3]],
IMDrank=max(IMDrank)-IMDrank) %>%
rename(oldcases=4)
#National level plots
natrhocases <- cor(subset(data, !is.na(oldcases))$IMDrank, subset(data, !is.na(oldcases))$oldcases)
natrhoabs <- cor(subset(data, !is.na(abs2wk))$IMDrank, subset(data, !is.na(abs2wk))$abs2wk)
natrhorel <- cor(subset(data, !is.na(rel2wk))$IMDrank, subset(data, !is.na(rel2wk))$rel2wk)
tiff("Outputs/COVIDMSOACaseRatexIMDOld.tiff", units="in", width=9, height=7, res=500)
ggplot(data, aes(x=IMDrank, y=oldcases, colour=oldcases))+
geom_point(show.legend=FALSE)+
geom_smooth(method="lm", formula=y~x, colour="Red")+
scale_x_continuous(name="Deprivation (higher = more deprived)")+
scale_y_continuous(name="Change in cases per 100,000 in the past 2 weeks")+
scale_colour_paletteer_c("scico::tokyo", direction=-1)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="COVID-19 case rates were higher, on average, in more deprived areas",
subtitle=paste0("7-day average rates of new COVID-19 cases for MSOAs in England in the week ending ",
max(IMD_MSOA$date)-weeks(2)),
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")+
annotate("text", x=33000, y=850, label=paste0("\u03C1", "=", round(natrhocases, 2)), colour="Red")
dev.off()
tiff("Outputs/COVIDMSOACaseRatexIMDAbs.tiff", units="in", width=9, height=7, res=500)
ggplot(data, aes(x=IMDrank, y=abs2wk, colour=abs2wk))+
geom_point()+
geom_hline(yintercept=0, colour="Grey60")+
geom_smooth(method="lm", formula=y~x, colour="Red")+
scale_x_continuous(name="Deprivation (higher = more deprived)")+
scale_y_continuous(name="Change in cases per 100,000 in the past 2 weeks")+
scale_colour_paletteer_c("scico::roma", name="Change in\ncase rates",
limit=c(-1,1)*max(abs(data$abs2wk), na.rm=TRUE))+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="The absolute fall in COVID-19 cases is larger in more deprived areas",
subtitle=paste0("Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between ",
max(IMD_MSOA$date)-weeks(2), " and ", max(IMD_MSOA$date)),
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")+
annotate("text", x=33000, y=-100, label=paste0("\u03C1", "=", round(natrhoabs, 2)), colour="Red")
dev.off()
tiff("Outputs/COVIDMSOACaseRatexIMDRel.tiff", units="in", width=9, height=7, res=500)
ggplot(data, aes(x=IMDrank, y=rel2wk, colour=rel2wk))+
geom_point(show.legend=FALSE)+
geom_hline(yintercept=0, colour="Grey60")+
geom_smooth(method="lm", formula=y~x, colour="Red")+
scale_x_continuous(name="Deprivation (higher = more deprived)")+
scale_y_continuous(name="Change in cases per 100,000 in the past 2 weeks",
labels=scales::label_percent(accuracy=1))+
scale_colour_paletteer_c("scico::roma",
limit=c(-1,1)*max(abs(subset(data, !is.na(rel2wk))$rel2wk)))+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Relative reductions in COVID-19 cases are broadly equal across the deprivation spectrum",
subtitle=paste0("Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between ",
max(IMD_MSOA$date)-weeks(2), " and ", max(IMD_MSOA$date)),
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")+
annotate("text", x=33000, y=-0.3, label=paste0("\u03C1", "=", round(natrhorel, 2)), colour="Red")
dev.off()
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),
code=c(1:9))
rhoold <- data %>%
filter(!is.na(oldcases)) %>%
group_by(regionName) %>%
mutate(rho=cor(IMDrank, oldcases),
IMDrank=27000, oldcases=2200) %>%
ungroup() %>%
select(regionName, rho, IMDrank, oldcases) %>%
distinct() %>%
mutate(label=paste0("\u03C1", "=", round(rho, 2)))
rhoabs <- data %>%
filter(!is.na(abs2wk)) %>%
group_by(regionName) %>%
mutate(rho=cor(IMDrank, abs2wk),
IMDrank=25000, abs2wk=1500) %>%
ungroup() %>%
select(regionName, rho, IMDrank, abs2wk) %>%
distinct() %>%
mutate(label=paste0("\u03C1", "=", round(rho, 2)))
rhorel <- data %>%
filter(!is.na(rel2wk)) %>%
group_by(regionName) %>%
mutate(rho=cor(IMDrank, rel2wk),
IMDrank=25000, rel2wk=3) %>%
ungroup() %>%
select(regionName, rho, IMDrank, rel2wk) %>%
distinct() %>%
mutate(label=paste0("\u03C1", "=", round(rho, 2)))
tiff("Outputs/COVIDMSOACaseRatexIMDOldxReg.tiff", units="in", width=10, height=10, res=500)
ggplot(data, aes(x=IMDrank, y=oldcases, colour=oldcases))+
geom_point(show.legend=FALSE)+
geom_hline(yintercept=0, colour="Grey60")+
geom_smooth(method="lm", formula=y~x, colour="Red")+
geom_text(data=rhoold, aes(label=label), colour="Red")+
scale_x_continuous(name="Deprivation (higher = more deprived)")+
scale_y_continuous(name="Change in cases per 100,000 in the past 2 weeks")+
scale_colour_paletteer_c("scico::tokyo", direction=-1)+
facet_geo(~regionName, grid=mygrid)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="COVID-19 case rates were higher, on average, in more deprived areas",
subtitle=paste0("7-day average rates of new COVID-19 cases for MSOAs in England in the week ending ",
max(IMD_MSOA$date)-weeks(2)),
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDMSOACaseRatexIMDAbsxReg.tiff", units="in", width=10, height=10, res=500)
ggplot(data, aes(x=IMDrank, y=abs2wk, colour=abs2wk))+
geom_point()+
geom_hline(yintercept=0, colour="Grey60")+
geom_smooth(method="lm", formula=y~x, colour="Red")+
geom_text(data=rhoabs, aes(label=label), colour="Red")+
scale_x_continuous(name="Deprivation (higher = more deprived)")+
scale_y_continuous(name="Change in cases per 100,000 in the past 2 weeks")+
scale_colour_paletteer_c("scico::roma", name="Change in\ncase rates",
limit=c(-1,1)*max(abs(data$abs2wk), na.rm=TRUE))+
facet_geo(~regionName, grid=mygrid)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Absolute falls in COVID-19 deaths are bigger in more deprived parts of London and the South East",
subtitle=paste0("Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between ",
max(IMD_MSOA$date)-weeks(2), " and ", max(IMD_MSOA$date)),
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDMSOACaseRatexIMDRelxReg.tiff", units="in", width=10, height=10, res=500)
ggplot(data, aes(x=IMDrank, y=rel2wk, colour=rel2wk))+
geom_point(show.legend=FALSE)+
geom_hline(yintercept=0, colour="Grey60")+
geom_smooth(method="lm", formula=y~x, colour="Red")+
geom_text(data=rhorel, aes(label=label), colour="Red")+
scale_x_continuous(name="Deprivation (higher = more deprived)")+
scale_y_continuous(name="Change in cases per 100,000 in the past 2 weeks",
labels=scales::label_percent(accuracy=1))+
scale_colour_paletteer_c("scico::roma",
limit=c(-1,1)*max(abs(subset(data, !is.na(rel2wk))$rel2wk)))+
facet_geo(~regionName, grid=mygrid)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="The relative fall in COVID-19 cases is most unequal in Yorkshire and the North West",
subtitle=paste0("Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between ",
max(IMD_MSOA$date)-weeks(2), " and ", max(IMD_MSOA$date)),
caption="Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths")
dev.off()
#Add deciles
deciledata <- data %>%
mutate(decile=ntile(IMDrank, 10)) %>%
group_by(regionName, decile) %>%
summarise(oldcases=sum(oldcases, na.rm=TRUE), abs2wk=sum(abs2wk, na.rm=TRUE),
rel2wk=abs2wk/oldcases)
tiff("Outputs/COVIDMSOACaseRatexIMDRelxRegBar.tiff", units="in", width=10, height=10, res=500)
ggplot(deciledata)+
geom_col(aes(x=decile, y=rel2wk, fill=rel2wk), show.legend=FALSE)+
#geom_col(aes(x=decile, y=rel2wk, fill=as.factor(decile)), show.legend=FALSE)+
scale_x_continuous(name="Deprivation", breaks=c(1,10),
labels=c("Least\ndeprived", "Most\ndeprived"))+
scale_y_continuous(name="Change in cases per 100,000 in the past 2 weeks",
labels=label_percent(accuracy=1))+
scale_fill_paletteer_c("pals::ocean.tempo",
limit=c(NA,0), direction=-1)+
#scale_fill_paletteer_d("ggsci::purple_material")+
facet_geo(~regionName, grid=mygrid)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="COVID-19 cases are falling across England, but at unequal rates",
subtitle=paste0("Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between ",
max(IMD_MSOA$date)-weeks(2), " and ", max(IMD_MSOA$date)),
caption="Data from Public Health England, Office for National Statistics\nand the Ministry of Housing, Communities & Local Government\n\nPlot and analysis by Colin Angus")
dev.off()
================================================
FILE: Heatmaps/COVIDMetricsNormalised.R
================================================
rm(list=ls())
#Code to replicate this nice graph from Paul Mainwood
#https://twitter.com/PaulMainwood/status/1449467211442098181
library(tidyverse)
library(curl)
library(lubridate)
library(RcppRoll)
library(scales)
library(extrafont)
library(paletteer)
library(ggtext)
library(ragg)
library(geofacet)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#UK version
#Download data from dashboard
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=overview&metric=newAdmissions&metric=newCasesBySpecimenDate&metric=newDeaths28DaysByDeathDate&format=csv"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
#Read the data in and tidy it up
data <- read.csv(temp) %>%
select(-c(1:3)) %>%
set_names(c("date", "Admissions", "Cases", "Deaths")) %>%
gather(metric, count, c(2:4)) %>%
mutate(date=as.Date(date),
metric=factor(metric, levels=c("Cases", "Admissions", "Deaths"))) %>%
group_by(metric) %>%
#Calculate rolling means
mutate(count_roll=roll_mean(count, 7, align="center", fill=NA)) %>%
#Normalise against the peak.
#Step 1 - grab the peak value for each metric
#Option 1, just using the max value across the entire time series
#mutate(max=max(count, na.rm=TRUE)) %>%
#Option 2, normalising against the max value within a chosen date range
mutate(max=max(count_roll[date>as.Date("2020-08-01") & date%
ungroup() %>%
#Step 2 - calculate each date's value as a proportion of the peak
mutate(prop=count_roll/max)
#Simple replication
ggplot(data, aes(x=date, y=prop, colour=metric))+
geom_line()
#Prettier version (because why not)
agg_tiff("Outputs/COVIDMetricsNormalised.tiff", units="in", width=9, height=6, res=500)
ggplot(data %>% filter(date>as.Date("2020-04-01")),
aes(x=date, y=prop, colour=metric))+
geom_line(show.legend=FALSE)+
scale_x_date(name="", date_labels="%B %y")+
scale_y_continuous(labels=label_percent(accuracy=1),
name="Level as a proportion of January 2021 peak")+
scale_colour_paletteer_d("wesanderson::Darjeeling1")+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.5)),
plot.subtitle=element_markdown(),
panel.grid.major.y=element_line(colour="Grey90"))+
labs(title="Vaccination is keeping admissions and deaths lower than previous waves",
subtitle="Rolling 7-day average of new COVID cases, admissions and deaths as a proportion of their peak value in January 2021",
caption="Plot inspired by @PaulMainwood | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Now replicate for the USA using Our World in Data data (the CDC website makes it bafflingly hard
#to machine read their data and their API confuses my simple brain - long live the UK dashboard)
url.us <- "https://covid.ourworldindata.org/data/owid-covid-data.csv"
temp <- curl_download(url=url.us, destfile=temp, quiet=FALSE, mode="wb")
usukdata <- read.csv(temp) %>%
filter(iso_code %in% c("USA", "GBR")) %>%
select(location, date, new_cases, new_deaths, hosp_patients) %>%
mutate(date=as.Date(date)) %>%
group_by(location) %>%
arrange(date) %>%
mutate(Cases=roll_mean(new_cases, 7, align="center", fill=NA),
Deaths=roll_mean(new_deaths, 7, align="center", fill=NA),
Admissions=roll_mean(hosp_patients, 7, align="center", fill=NA)) %>%
ungroup() %>%
gather(metric, count, c(6:8)) %>%
mutate(metric=factor(metric, levels=c("Cases", "Admissions", "Deaths"))) %>%
group_by(location, metric) %>%
#Normalise against the peak.
#Step 1 - grab the peak value for each metric
#Option 1, just using the max value across the entire time series
#mutate(max=max(count, na.rm=TRUE)) %>%
#Option 2, normalising against the max value within a chosen date range
mutate(max=max(count[date>as.Date("2020-08-01") & date%
ungroup() %>%
#Step 2 - calculate each date's value as a proportion of the peak
mutate(prop=count/max)
agg_tiff("Outputs/COVIDMetricsNormalisedUKUSA.tiff", units="in", width=12, height=6, res=500)
ggplot(usukdata %>% filter(date>as.Date("2020-04-01")),
aes(x=date, y=prop, colour=metric))+
geom_line(show.legend=FALSE)+
scale_x_date(name="", date_labels="%B %y")+
scale_y_continuous(labels=label_percent(accuracy=1),
name="Level as a proportion of January 2021 peak")+
scale_colour_paletteer_d("wesanderson::Darjeeling1")+
facet_wrap(~location)+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.5)),
plot.subtitle=element_markdown(),
panel.grid.major.y=element_line(colour="Grey90"),
strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Cases, admissions and deaths have decoupled much less clearly in the US than the UK",
subtitle="Rolling 7-day average of new COVID cases, hospital bed occupancy and deaths as a proportion of their peak value in January 2021",
caption="Plot inspired by @PaulMainwood | Data from Our World In Data | Plot by @VictimOfMaths")
dev.off()
################
#Version by region of England
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDate&metric=newDeaths28DaysByDeathDate&format=csv"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
regdata1 <- read.csv(temp) %>%
select(-c(1,3)) %>%
set_names(c("Region", "date", "Cases", "Deaths")) %>%
gather(metric, count, c(3:4)) %>%
mutate(date=as.Date(date)) %>%
group_by(metric, Region) %>%
#Calculate rolling means
mutate(count_roll=roll_mean(count, 7, align="center", fill=NA)) %>%
#Normalise against the peak.
#Step 1 - grab the peak value for each metric
#Option 1, just using the max value across the entire time series
#mutate(max=max(count, na.rm=TRUE)) %>%
#Option 2, normalising against the max value within a chosen date range
mutate(max=max(count_roll[date>as.Date("2020-08-01") & date%
ungroup() %>%
#Step 2 - calculate each date's value as a proportion of the peak
mutate(prop=count_roll/max)
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),
code=c(1:9))
agg_tiff("Outputs/COVIDMetricsNormalisedReg.tiff", units="in", width=9, height=6, res=500)
ggplot(regdata1 %>% filter(date>as.Date("2020-04-01")),
aes(x=date, y=prop, colour=metric))+
geom_line(show.legend=FALSE)+
scale_x_date(name="", date_labels="%B %y")+
scale_y_continuous(labels=label_percent(accuracy=1),
name="Level as a proportion of January 2021 peak")+
scale_colour_manual(values=c("#FF0000", "#F2AD00"))+
facet_geo(~Region, grid=mygrid)+
theme_custom()+
theme(plot.subtitle=element_markdown(),
panel.grid.major.y=element_line(colour="Grey90"))+
labs(title="Vaccination is keeping deaths lower than previous waves",
subtitle="Rolling 7-day average of new COVID cases and deaths as a proportion of their peak value in January 2021 in English regions",
caption="Plot inspired by @PaulMainwood | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Admissions only available by NHS region
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nhsRegion&metric=newAdmissions&format=csv"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
regdata2 <- read.csv(temp) %>%
select(-c(1,3)) %>%
set_names(c("Region", "date", "count")) %>%
mutate(date=as.Date(date), metric="Admissions") %>%
group_by(Region) %>%
#Calculate rolling means
mutate(count_roll=roll_mean(count, 7, align="center", fill=NA)) %>%
#Normalise against the peak.
#Step 1 - grab the peak value for each metric
#Option 1, just using the max value across the entire time series
#mutate(max=max(count, na.rm=TRUE)) %>%
#Option 2, normalising against the max value within a chosen date range
mutate(max=max(count_roll[date>as.Date("2020-08-01") & date%
ungroup() %>%
#Step 2 - calculate each date's value as a proportion of the peak
mutate(prop=count_roll/max)
#Stick together (ignoring differences in regional boundaries)
regdata <- bind_rows(regdata1, regdata2) %>%
mutate(metric=factor(metric, levels=c("Cases", "Admissions", "Deaths")))
agg_tiff("Outputs/COVIDMetricsNormalisedLondon.tiff", units="in", width=9, height=6, res=500)
ggplot(regdata %>% filter(Region=="London" & date>as.Date("2020-04-01")),
aes(x=date, y=prop, colour=metric))+
geom_line(show.legend=FALSE)+
scale_x_date(name="", date_labels="%B %y")+
scale_y_continuous(labels=label_percent(accuracy=1),
name="Level as a proportion of January 2021 peak")+
scale_colour_paletteer_d("wesanderson::Darjeeling1")+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.5)),
plot.subtitle=element_markdown(),
panel.grid.major.y=element_line(colour="Grey90"))+
labs(title="Hospital admissions in London *might* have peaked 🤞",
subtitle="Rolling 7-day average of new COVID cases, admissions and deaths in London* as a proportion of their peak value in January 2021",
caption="Plot inspired by @PaulMainwood | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\n\n*Admissions data is based on the London NHS region, which does not exactly match the government region that cases and deaths data is based on")
dev.off()
####################
#Version for Omicron only
data2 <- read.csv(temp) %>%
select(-c(1:3)) %>%
set_names(c("date", "Admissions", "Cases", "Deaths")) %>%
gather(metric, count, c(2:4)) %>%
mutate(date=as.Date(date),
metric=factor(metric, levels=c("Cases", "Admissions", "Deaths"))) %>%
group_by(metric) %>%
#Calculate rolling means
mutate(count_roll=roll_mean(count, 7, align="center", fill=NA)) %>%
#Normalise against the peak.
#Step 1 - grab the peak value for each metric
#Option 1, just using the max value across the entire time series
#mutate(max=max(count, na.rm=TRUE)) %>%
#Option 2, normalising against the max value within a chosen date range
mutate(max=max(count_roll[date>as.Date("2021-10-01") & date%
ungroup() %>%
#Step 2 - calculate each date's value as a proportion of the peak
mutate(prop=count_roll/max)
#Simple replication
ggplot(data2, aes(x=date, y=prop, colour=metric))+
geom_line()
#Prettier version (because why not)
agg_tiff("Outputs/COVIDMetricsNormalisedOmi.tiff", units="in", width=9, height=6, res=500)
ggplot(data2 %>% filter(date>as.Date("2021-12-01")),
aes(x=date, y=prop, colour=metric))+
geom_line(show.legend=FALSE)+
scale_x_date(name="", date_labels="%B %y")+
scale_y_continuous(labels=label_percent(accuracy=1),
name="Level as a proportion of Omicron peak",
limits=c(0,1))+
scale_colour_paletteer_d("wesanderson::Darjeeling1")+
theme_classic()+
theme(text=element_text(family="Lato"), plot.title.position="plot",
plot.title=element_text(face="bold", size=rel(1.5)),
plot.subtitle=element_markdown(),
panel.grid.major.y=element_line(colour="Grey90"))+
labs(title="Both admissions and cases have started rising in recent days",
subtitle="Rolling 7-day average of new COVID cases, admissions and deaths in England as a proportion of their peak value in January 2022",
caption="Plot inspired by @PaulMainwood | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDNHSAbsences.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(paletteer)
library(extrafont)
library(ragg)
library(lubridate)
library(scales)
library(ggtext)
library(geofacet)
library(snakecase)
library(ggrepel)
library(RcppRoll)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Download latest absence data
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/04/Staff-Absences-Web-File-Timeseries.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#Trust:Region lookup
lookup <- read_excel(temp, sheet="Total Absences", range="B26:C163", col_names=FALSE) %>%
set_names("Region", "TrustCode")
totalraw <- read_excel(temp, sheet="Total Absences", range="C16:DZ163", col_names=FALSE)
COVIDraw <- read_excel(temp, sheet="COVID Absences", range="C16:DZ163", col_names=FALSE)
#Pull out national figures
nattotals <- totalraw %>%
slice(1) %>%
gather(Date, Total, c(3:ncol(.))) %>%
select(-c(1,2)) %>%
mutate(Date=as.Date("2021-11-29")+days(as.numeric(substr(Date, 4, 6))-3))
natCOVID <- COVIDraw %>%
slice(1) %>%
gather(Date, COVID, c(3:ncol(.))) %>%
select(-c(1,2)) %>%
mutate(Date=as.Date("2021-11-29")+days(as.numeric(substr(Date, 4, 6))-3))
natdata <- merge(nattotals, natCOVID) %>%
mutate(Other=Total-COVID) %>%
gather(Cause, Count, c(2:4)) %>%
group_by(Cause) %>%
mutate(Count_roll=roll_mean(Count, 7, align="center", fill=NA)) %>%
ungroup()
agg_tiff("Outputs/COVIDNHSAbsences.tiff", units="in", width=8, height=6, res=500)
ggplot(natdata %>% filter(Cause!="Total"), aes(x=Date, y=Count_roll, fill=Cause))+
geom_area(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Total staff absent")+
scale_fill_paletteer_d("lisa::Jean_MichelBasquiat_1")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="NHS staff absences are high but have stopped rising",
subtitle="Rolling 7-day average number of staff ill or isolating due to COVID or absent for other reasons
in English acute NHS trusts",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Regional version
regtotals <- totalraw[c(3:9),] %>%
gather(Date, Total, c(3:ncol(.))) %>%
select(-c(1)) %>%
rename(Region=`...2`) %>%
mutate(Date=as.Date("2021-11-29")+days(as.numeric(substr(Date, 4, 6))-3))
regCOVID <- COVIDraw[c(3:9),] %>%
gather(Date, COVID, c(3:ncol(.))) %>%
select(-c(1)) %>%
rename(Region=`...2`) %>%
mutate(Date=as.Date("2021-11-29")+days(as.numeric(substr(Date, 4, 6))-3))
regdata <- merge(regtotals, regCOVID) %>%
mutate(Other=Total-COVID) %>%
gather(Cause, Count, c(3:5)) %>%
group_by(Cause, Region) %>%
mutate(Count_roll=roll_mean(Count, 7, align="center", fill=NA)) %>%
ungroup()
#Set up geofacet grid of NHS regions
mygrid <- data.frame(name=c("North West", "North East and Yorkshire",
"Midlands","East of England",
"South West", "London", "South East"),
row=c(1,1,2,2,3,3,3), col=c(2,3,2,3,1,2,3),
code=c(1:7))
agg_tiff("Outputs/COVIDNHSAbsencesxReg.tiff", units="in", width=8, height=6, res=500)
ggplot(regdata %>% filter(Cause!="Total"), aes(x=Date, y=Count_roll, fill=Cause))+
geom_area(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Total staff absent")+
scale_fill_paletteer_d("lisa::Jean_MichelBasquiat_1")+
facet_geo(~Region, grid=mygrid)+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="NHS staff absences are most acute in the Midlands and North of England",
subtitle="Rolling 7-day average number of staff ill or isolating due to COVID or absent for other reasons
in English acute NHS trusts",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Tidy up trust-level data
trusttotals <- totalraw[c(11:148),] %>%
gather(Date, Total, c(3:ncol(.))) %>%
rename(Trust=`...2`, TrustCode=`...1`) %>%
mutate(Date=as.Date("2021-11-29")+days(as.numeric(substr(Date, 4, 6))-3))
trustCOVID <- COVIDraw[c(11:148),] %>%
gather(Date, COVID, c(3:ncol(.))) %>%
rename(Trust=`...2`, TrustCode=`...1`) %>%
mutate(Date=as.Date("2021-11-29")+days(as.numeric(substr(Date, 4, 6))-3))
trustdata <- merge(trusttotals, trustCOVID) %>%
mutate(Other=Total-COVID) %>%
gather(Cause, Count, c(4:6)) %>%
group_by(TrustCode, Trust, Cause) %>%
mutate(Count_roll=roll_mean(Count, 7, align="center", fill=NA)) %>%
ungroup()
#Bring in some denominators
#Source https://digital.nhs.uk/data-and-information/publications/statistical/nhs-workforce-statistics/september-2021
source <- "https://files.digital.nhs.uk/18/78CB98/NHS%20Workforce%20Statistics%2C%20September%202021%20England%20and%20Organisation.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
staffpops <- read_excel(temp, sheet="2. NHSE, Org & SG - HC", range="C12:E329", col_names=FALSE) %>%
filter(!is.na(`...2`)) %>%
set_names("TrustName", "TrustCode", "Staff") %>%
mutate(TrustCode=if_else(TrustCode=="RW6", "RM3", TrustCode),
TrustName=if_else(TrustCode=="RM3", "Northern Healthcare Alliance NHS Foundation Trust",
TrustName)) %>%
group_by(TrustName, TrustCode) %>%
summarise(Staff=sum(Staff)) %>%
ungroup()
combined <- merge(trustdata, staffpops) %>%
mutate(AbsProp=Count/Staff, AbsProp_roll=Count_roll/Staff) %>%
merge(lookup)
combinedreg <- combined %>%
group_by(Date, Region, Cause) %>%
summarise(Count=sum(Count), Staff=sum(Staff), Count_roll=sum(Count_roll)) %>%
ungroup() %>%
mutate(AbsProp=Count/Staff, AbsProp_roll=Count_roll/Staff)
agg_tiff("Outputs/COVIDNHSAbsencePropxReg.tiff", units="in", width=8, height=6, res=500)
ggplot(combinedreg %>% filter(Cause=="Total"), aes(x=Date, y=AbsProp_roll, colour=Region))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of staff absent", limits=c(0,NA),
labels=label_percent(accuracy=1), breaks=c(0,0.02,0.04,0.06,0.08,0.1, 0.12))+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
theme_custom()+
labs(title="The Midlands and the North have the highest levels of NHS staff absence",
subtitle="Proportion of NHS staff currently absent through sickness or isolation in acute trusts in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSAbsencePropxTrust.tiff", units="in", width=8, height=6, res=500)
ggplot(combined %>% filter(Cause=="Total" & Date==as.Date("2022-01-16")),
aes(x=AbsProp, y=fct_reorder(Trust, AbsProp), fill=Region))+
geom_col()+
scale_x_continuous(labels=label_percent(accuracy=1), name="Proportion of staff absent")+
scale_y_discrete(name="")+
scale_fill_paletteer_d("colorblindr::OkabeIto")+
theme_custom()+
theme(axis.text.y=element_blank(), axis.ticks.y=element_blank())+
labs(title="Some NHS trusts have more than 10% of staff off work",
subtitle="Proportion of NHS staff absent for any reason as of 20th March, by trust (acute trusts only)",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Bring in bed occupancy data
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/03/Weekly-covid-admissions-and-beds-publication-220324.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
weeklyrange <- "FS"
GACV19 <- read_excel(temp, sheet="Adult G&A Beds Occupied COVID",
range=paste0("B25:", weeklyrange, "164"), col_names=FALSE)[-c(2),] %>%
gather(date, GACV19, c(4:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
GAOther <- read_excel(temp, sheet="Adult G&A Bed Occupied NonCOVID",
range=paste0("B25:", weeklyrange, "164"), col_names=FALSE)[-c(2),] %>%
gather(date, GAOther, c(4:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
GAUnocc <- read_excel(temp, sheet="Adult G&A Beds Unoccupied",
range=paste0("B25:", weeklyrange, "164"), col_names=FALSE)[-c(2),] %>%
gather(date, GAUnocc, c(4:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
CCCV19 <- read_excel(temp, sheet="Adult CC Beds Occupied COVID",
range=paste0("B25:", weeklyrange, "164"), col_names=FALSE)[-c(2),] %>%
gather(date, CCCV19, c(4:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
CCOther <- read_excel(temp, sheet="Adult CC Bed Occupied NonCOVID",
range=paste0("B25:", weeklyrange, "164"), col_names=FALSE)[-c(2),] %>%
gather(date, CCOther, c(4:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
CCUnocc <- read_excel(temp, sheet="Adult CC Beds Unoccupied",
range=paste0("B25:", weeklyrange, "164"), col_names=FALSE)[-c(2),] %>%
gather(date, CCUnocc, c(4:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
#Merge and calculate % of beds currently occupied
occdata <- GACV19 %>%
merge(GAOther %>% select(date, code, GAOther), by=c("date", "code")) %>%
merge(GAUnocc %>% select(date, code, GAUnocc), by=c("date", "code")) %>%
merge(CCCV19 %>% select(date, code, CCCV19), by=c("date", "code")) %>%
merge(CCOther %>% select(date, code, CCOther), by=c("date", "code")) %>%
merge(CCUnocc %>% select(date, code, CCUnocc), by=c("date", "code")) %>%
mutate(GABeds=GAUnocc+GACV19+GAOther,
CCBeds=CCUnocc+CCCV19+CCOther,
GAOccprop=(GACV19+GAOther)/GABeds,
CCOccprop=(CCCV19+CCOther)/CCBeds)
#Download PHE's trust catchment data from and save as a csv.
#https://app.box.com/s/qh8gzpzeo1firv1ezfxx2e6c4tgtrudl
catchments <- read_csv("COVID_LA_Plots/2020 Trust Catchment Populations Worksheet.csv") %>%
filter(CatchmentYear==2018) %>%
group_by(TrustCode) %>%
summarise(catchpop=sum(Catchment)) %>%
ungroup()
alldata <- merge(combined, occdata, by.x=c("Date", "TrustCode"),
by.y=c("date", "code")) %>%
merge(catchments)
plotdata <- alldata %>%
filter(Date>=max(Date)-days(7) & Cause=="Total" & CCBeds>=10) %>%
mutate(trust=str_replace(trust, " NHS TRUST", ""),
trust=str_replace(trust, "NHS FOUNDATION TRUST", ""),
trust=to_any_case(trust, case="title"),
trust=str_replace(trust, "King s", "King's"),
trust=str_replace(trust, "Guy s", "Guy's"),
trust=str_replace(trust, "George s", "George's"),
trust=str_replace(trust, "Women s", "Women's"),
trust=str_replace(trust, "Children s", "Children's"),
trust=str_replace(trust, "Peter s", "Peter's"),
trust=str_replace(trust, " Nhs Ft", ""))
agg_tiff("Outputs/COVIDCCBedsvsAbsences.tiff", units="in", width=9, height=7, res=500)
ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
#geom_path(data=plotdata,
# aes(x=AbsProp, y=CCOccprop, group=trust, alpha=7-as.integer(max(Date)-Date)),
# colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdata %>% filter(Date==max(Date)),
aes(x=AbsProp, y=CCOccprop, size=CCBeds, fill=Region), shape=21, alpha=0.7)+
geom_text_repel(data=plotdata %>% filter(Date==max(Date)),
aes(x=AbsProp, y=CCOccprop, label=trust), size=rel(3),
box.padding=0.7, point.padding=0)+
scale_x_continuous(name="Proportion of NHS staff absent", limits=c(0,NA),
label=label_percent(accuracy=1))+
scale_y_continuous(name="Proportion of Critical Care beds occupied", limits=c(0,NA),
label=label_percent(accuracy=1))+
scale_fill_paletteer_d("colorblindr::OkabeIto", name="")+
scale_size(guide="none")+
theme_custom()+
theme(axis.line=element_blank())+
labs(title="Critical care capacity is at risk in many hospitals",
subtitle=paste0("Current proportion of Critical Care beds which are occupied compared with the proportion of staff who are absent.\nBubbles are sized by total Critical Care bed capacity. Non-acute trusts and those with fewer than 10 CC beds are excluded.\nData up to ",
max(plotdata$Date)),
caption="Data from NHS England, PHE & ONS\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDGABedsvsAbsences.tiff", units="in", width=9, height=7, res=500)
ggplot()+
geom_hline(yintercept=0)+
geom_vline(xintercept=0)+
#geom_path(data=plotdata,
# aes(x=AbsProp, y=GAOccprop, group=trust, alpha=7-as.integer(max(Date)-Date)),
# colour="Grey50", show.legend=FALSE)+
geom_point(data=plotdata %>% filter(Date==max(Date)),
aes(x=AbsProp, y=GAOccprop, size=GABeds, fill=Region), shape=21, alpha=0.7)+
geom_text_repel(data=plotdata %>% filter(Date==max(Date)),
aes(x=AbsProp, y=GAOccprop, label=trust), size=rel(3),
box.padding=0.7, point.padding=0)+
scale_x_continuous(name="Proportion of NHS staff absent", limits=c(0,NA),
label=label_percent(accuracy=1))+
scale_y_continuous(name="Proportion of General & Acute beds occupied", limits=c(0.5,1),
label=label_percent(accuracy=1))+
scale_fill_paletteer_d("colorblindr::OkabeIto", name="")+
scale_size(guide="none")+
theme_custom()+
theme(axis.line=element_blank())+
labs(title="Most English hospitals have less than 10% of beds unoccupied",
subtitle=paste0("Current proportion of General & Acute beds which are occupied compared with the proportion of staff who are absent.\nBubbles are sized by total Critical Care bed capacity. Non-acute trusts and those with fewer than 10 CC beds are excluded.\nData up to ",
max(plotdata$Date)),
caption="Data from NHS England, PHE & ONS\nPlot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDNHSAdmissions.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(paletteer)
library(RcppRoll)
library(geofacet)
library(ggtext)
library(snakecase)
library(forcats)
library(ragg)
library(extrafont)
library(scales)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Hospital admissions data available from https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-hospital-activity/
#Longer time series of regional data updated daily
dailyurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/COVID-19-daily-admissions-and-beds-20220623.xlsx"
#Shorter time series of trust-level data updated weekly on a Thursday afternoon
weeklyurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/Weekly-covid-admissions-and-beds-publication-220623.xlsx"
#Increment by one each day
dailyrange <- "CF"
dailyoccrange <- "CH"
#Increment by seven each week
weeklyrange <- "CF"
dailydata <- tempfile()
dailydata <- curl_download(url=dailyurl, destfile=dailydata, quiet=FALSE, mode="wb")
dailydata.old1 <- tempfile()
dailyurl.old1 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/02/COVID-19-daily-admissions-and-beds-20210406-DQnotes.xlsx"
dailydata.old1 <- curl_download(url=dailyurl.old1, destfile=dailydata.old1, quiet=FALSE, mode="wb")
dailydata.old2 <- tempfile()
dailyurl.old2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/COVID-19-daily-admissions-and-beds-20211207-20210407-20210930.xlsx"
dailydata.old2 <- curl_download(url=dailyurl.old2, destfile=dailydata.old2, quiet=FALSE, mode="wb")
dailydata.old3 <- tempfile()
dailyurl.old3 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/05/COVID-19-daily-admissions-and-beds-20220512-211001-220331-v2.xlsx"
dailydata.old3 <- curl_download(url=dailyurl.old3, destfile=dailydata.old3, quiet=FALSE, mode="wb")
#Total admissions
daily1 <- read_excel(dailydata, sheet="Daily publication", range=paste0("B15:", dailyrange, "21"),
col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Admissions",
date=as.Date("2022-04-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily1.old1 <- read_excel(dailydata.old1, sheet="Daily publication", range="B15:IQ21", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Admissions",
date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily1.old2 <- read_excel(dailydata.old2, sheet="Daily publication", range="B15:FW21", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Admissions",
date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily1.old3 <- read_excel(dailydata.old3, sheet="Daily publication", range="B15:GB21", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Admissions",
date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
#Total occupancy
daily2 <- read_excel(dailydata, sheet="Daily publication", range=paste0("B91:", dailyoccrange, "97"), col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy",
date=as.Date("2022-04-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily2.old1 <- read_excel(dailydata.old1, sheet="Daily publication", range="B91:IQ97", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy",
date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily2.old2 <- read_excel(dailydata.old2, sheet="Daily publication", range="B91:FW97", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy",
date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily2.old3 <- read_excel(dailydata.old3, sheet="Daily publication", range="B91:GB97", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy",
date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
#Total MV occupancy
daily3 <- read_excel(dailydata, sheet="Daily publication", range=paste0("B106:", dailyoccrange, "112"), col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy of MV beds",
date=as.Date("2022-04-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily3.old1 <- read_excel(dailydata.old1, sheet="Daily publication", range="B106:IQ112", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy of MV beds",
date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily3.old2 <- read_excel(dailydata.old2, sheet="Daily publication", range="B106:FW112", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy of MV beds",
date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
daily3.old3 <- read_excel(dailydata.old3, sheet="Daily publication", range="B106:GB112", col_names=FALSE) %>%
gather(date, count, c(2:ncol(.))) %>%
mutate(metric="Occupancy of MV beds",
date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(region=`...1`)
#Merge and convert to rates
dailydata <- bind_rows(daily1.old1, daily1.old2, daily1.old3, daily1,
daily2.old1, daily2.old2, daily2.old3, daily2,
daily3.old1, daily3.old2, daily3.old3, daily3) %>%
mutate(pop=case_when(
region=="East of England" ~ 6236072,
region=="London" ~ 8961989,
region=="Midlands" ~ 5934037+4835928,
region=="North East and Yorkshire" ~ 2669941+5502967,
region=="North West" ~ 7341196,
region=="South East" ~ 9180135,
region=="South West" ~ 5624696),
rate=count*100000/pop) %>%
group_by(region, metric) %>%
mutate(rollrate=roll_mean(rate, 7, align="center", fill=NA))
#Extract max date
maxdailydate=max(dailydata$date)
#Line charts
agg_tiff("Outputs/COVIDNHSMetricsxReg.tiff", units="in", width=12, height=6, res=500)
ggplot(dailydata)+
geom_line(aes(x=date, y=rollrate, colour=region))+
scale_x_date(name="")+
scale_y_continuous(name="Rate per 100,000 population")+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="NHS Region")+
facet_wrap(~metric, scales="free_y")+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"))+
labs(title="The number of COVID patients in English hospitals is currently well below last winter's levels",
subtitle=paste0("Rolling 7-day averages of new hospital admissions, total bed occupancy and Mechanical Ventilation beds\nfor patients with a positive COVID-19 diagnosis. Data up to ", maxdailydate, "."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Recent version
agg_tiff("Outputs/COVIDNHSMetricsxRegRecent.tiff", units="in", width=12, height=6, res=500)
ggplot(dailydata %>% filter(date>as.Date("2021-12-01")))+
geom_line(aes(x=date, y=rollrate, colour=region))+
scale_x_date(name="")+
scale_y_continuous(name="Rate per 100,000 population", limits=c(0,NA))+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="NHS Region")+
facet_wrap(~metric, scales="free_y")+
theme_custom()+
labs(title="Admissions and occupancy are rising, but not ventilator beds (so far)",
subtitle=paste0("Rolling 7-day averages of new hospital admissions, total bed occupancy and Mechanical Ventilation beds\nfor patients with a positive COVID-19 diagnosis. Data up to ", maxdailydate, "."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSMetricsxRegLog.tiff", units="in", width=12, height=6, res=500)
ggplot(subset(dailydata, date>as.Date("2021-04-01")))+
geom_line(aes(x=date, y=rollrate, colour=region))+
scale_x_date(name="")+
scale_y_continuous(name="Rate per 100,000 population (log scale)", trans="log",
labels=label_number(accuracy=0.01))+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="NHS Region")+
facet_wrap(~metric, scales="free_y")+
theme_custom()+
labs(title="On a log scale it's clear that hospital numbers are rising exponentially everywhere",
subtitle=paste0("Rolling 7-day averages of new hospital admissions, total bed occupancy and Mechanical Ventilation beds\nfor patients with a positive COVID-19 diagnosis. Data up to ", maxdailydate, "."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Admissions only
agg_tiff("Outputs/COVIDNHSAdmissionsxReg.tiff", units="in", width=9, height=6, res=500)
ggplot(subset(dailydata, metric=="Admissions"))+
geom_line(aes(x=date, y=rollrate, colour=region))+
scale_x_date(name="")+
scale_y_continuous(name="Rate per 100,000 population")+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="NHS Region")+
theme_custom()+
labs(title="The number of new COVID admissions is falling in London",
subtitle=paste0("Rolling 7-day averages of new hospital admissions for patients with a positive COVID-19 diagnosis.\nData up to ", maxdailydate, "."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSAdmissionsxRegRecent.tiff", units="in", width=9, height=6, res=500)
ggplot(subset(dailydata, metric=="Admissions" & date>as.Date("2021-12-01")))+
geom_line(aes(x=date, y=rollrate, colour=region))+
scale_x_date(name="")+
scale_y_continuous(name="Rate per 100,000 population", limits=c(0,NA))+
scale_colour_paletteer_d("colorblindr::OkabeIto", name="NHS Region")+
theme_custom()+
labs(title="The North West is leading the BA.4/5 wave",
subtitle=paste0("Rolling 7-day averages of new hospital admissions for patients with a positive COVID-19 diagnosis.\nData up to ", maxdailydate, "."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Now look at trust-level weekly data
weeklydata <- tempfile()
weeklydata <- curl_download(url=weeklyurl, destfile=weeklydata, quiet=FALSE, mode="wb")
weeklydata.old1 <- tempfile()
weeklyurl.old1 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/Weekly-covid-admissions-and-beds-publication-210429-up-to-210406.xlsx"
weeklydata.old1 <- curl_download(url=weeklyurl.old1, destfile=weeklydata.old1, quiet=FALSE, mode="wb")
weeklydata.old2 <- tempfile()
weeklyurl.old2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/Weekly-covid-admissions-and-beds-publication-211209-210407-210930.xlsx"
weeklydata.old2 <- curl_download(url=weeklyurl.old2, destfile=weeklydata.old2, quiet=FALSE, mode="wb")
weeklyCOVID <- read_excel(weeklydata, sheet="Adult G&A Beds Occupied COVID",
range=paste0("B16:", weeklyrange, "167"), col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="COVID",
date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyCOVID.old1 <- read_excel(weeklydata.old1, sheet="Adult G&A Beds Occupied COVID",
range="B16:EO167", col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="COVID",
date=as.Date("2020-11-17")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyCOVID.old2 <- read_excel(weeklydata.old2, sheet="Adult G&A Beds Occupied COVID",
range="B16:FY167", col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="COVID",
date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyOther <- read_excel(weeklydata, sheet="Adult G&A Bed Occupied NonCOVID",
range=paste0("B16:", weeklyrange, "167"), col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="non-COVID",
date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyOther.old1 <- read_excel(weeklydata.old1, sheet="Adult G&A Bed Occupied NonCOVID",
range="B16:EO167", col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="non-COVID",
date=as.Date("2020-11-17")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyOther.old2 <- read_excel(weeklydata.old2, sheet="Adult G&A Bed Occupied NonCOVID",
range="B16:FY167", col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="non-COVID",
date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyEmpty <- read_excel(weeklydata, sheet="Adult G&A Beds Unoccupied",
range=paste0("B16:", weeklyrange, "167"), col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="Unoccupied",
date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyEmpty.old1 <- read_excel(weeklydata.old1, sheet="Adult G&A Beds Unoccupied",
range="B16:EO167", col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="Unoccupied",
date=as.Date("2020-11-17")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklyEmpty.old2 <- read_excel(weeklydata.old2, sheet="Adult G&A Beds Unoccupied",
range="B16:FY167", col_names=FALSE)[-c(2),] %>%
gather(date, count, c(4:ncol(.))) %>%
mutate(type="Unoccupied",
date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-4)) %>%
rename(region=`...1`, code=`...2`, trust=`...3`)
weeklydata <- bind_rows(weeklyCOVID, weeklyCOVID.old1, weeklyCOVID.old2,
weeklyOther, weeklyOther.old1, weeklyOther.old2,
weeklyEmpty, weeklyEmpty.old1, weeklyEmpty.old2) %>%
mutate(region=case_when(
trust=="ENGLAND" ~ "Nation",
trust %in% c("East of England", "London", "Midlands", "North East and Yorkshire",
"North West", "South East", "South West") ~ "Region",
TRUE ~ region)) %>%
group_by(trust, date) %>%
mutate(capacity=sum(count)) %>%
ungroup() %>%
mutate(proportion=count/capacity)
#Extract max date
maxweeklydate=max(weeklydata$date)
#Carve out into separate regional/national and trust-level datasets
natdata <- weeklydata %>% filter(region %in% c("Nation", "Region"))
trustdata <- weeklydata %>%
filter(!region %in% c("Nation", "Region") & capacity>=100) %>%
mutate(trust=str_replace(trust, " NHS TRUST", ""),
trust=str_replace(trust, "NHS FOUNDATION TRUST", ""),
trust=to_any_case(trust, case="title"),
trust=str_replace(trust, "King s", "King's"),
trust=str_replace(trust, "Guy s", "Guy's"),
trust=str_replace(trust, "George s", "George's"),
trust=str_replace(trust, "Women s", "Women's"),
trust=str_replace(trust, "Children s", "Children's"),
trust=str_replace(trust, "Peter s", "Peter's")) %>%
group_by(trust) %>%
mutate(maxcap=max(count[type=="COVID"])) %>%
ungroup() %>%
mutate(trust=fct_reorder(trust, -maxcap))
#Convert national/region data to rates
natdata <- natdata %>%
mutate(pop=case_when(
trust=="East of England" ~ 6236072,
trust=="London" ~ 8961989,
trust=="Midlands" ~ 5934037+4835928,
trust=="North East and Yorkshire" ~ 2669941+5502967,
trust=="North West" ~ 7341196,
trust=="South East" ~ 9180135,
trust=="South West" ~ 5624696,
trust=="ENGLAND" ~ 56286961),
rate=count*100000/pop)
#Single national plot
agg_tiff("Outputs/COVIDNHSBedOccupancy.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(natdata, trust=="ENGLAND"))+
geom_area(aes(x=date, y=rate, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Beds per 100,000 population")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="There are very few unoccupied beds in the NHS",
subtitle=paste0("Bed occupancy rate in England for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " ."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Set up geofacet grid of NHS regions
mygrid <- data.frame(name=c("North West", "North East and Yorkshire",
"Midlands","East of England",
"South West", "London", "South East"),
row=c(1,1,2,2,3,3,3), col=c(2,3,2,3,1,2,3),
code=c(1:7))
#Faceted regional plot
agg_tiff("Outputs/COVIDNHSBedOccupancyxReg.tiff", units="in", width=8, height=8, res=500)
ggplot(subset(natdata, trust!="ENGLAND"))+
geom_area(aes(x=date, y=rate, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Beds per 100,000 population")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_geo(~trust, grid=mygrid)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="Empty NHS beds are in short supply across the whole of England",
subtitle=paste0("Bed occupancy rate by NHS region for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " ."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Get into trust-level data
agg_tiff("Outputs/COVIDNHSBedOccupancyLondon.tiff", units="in", width=13, height=8, res=500)
trustdata %>%
filter(region=="London") %>%
ggplot()+
geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of beds")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_wrap(~trust)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.6)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="COVID-19 bed occupancy has fallen across London",
subtitle=paste0("Bed occupancy by NHS trust for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " . Excluding trusts with fewer than 100 beds."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSBedOccupancySouthEast.tiff", units="in", width=13, height=8, res=500)
trustdata %>%
filter(region=="South East") %>%
ggplot()+
geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of beds")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_wrap(~trust)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.6)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="The number of COVID-19 patients in hospital is falling across the South East",
subtitle=paste0("Bed occupancy by NHS trust for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " . Excluding trusts with fewer than 100 beds."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSBedOccupancySouthWest.tiff", units="in", width=10, height=6, res=500)
trustdata %>%
filter(region=="South West") %>%
ggplot()+
geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of beds")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_wrap(~trust)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.6)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="COVID-19 bed occupancy is falling across the South West",
subtitle=paste0("Bed occupancy by NHS trust for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " . Excluding trusts with fewer than 100 beds."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSBedOccupancyMidlands.tiff", units="in", width=14, height=9, res=500)
trustdata %>%
filter(region=="Midlands") %>%
ggplot()+
geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of beds")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_wrap(~trust)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.6)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="COVID-19 bed occupancy in the Midlands is falling across all NHS trusts",
subtitle=paste0("Bed occupancy by NHS trust for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " . Excluding trusts with fewer than 100 beds."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSBedOccupancyEast.tiff", units="in", width=10, height=6, res=500)
trustdata %>%
filter(region=="East of England") %>%
ggplot()+
geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of beds")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_wrap(~trust)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.6)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="The number of COVID-19 patients is falling in hospitals in the East of England",
subtitle=paste0("Bed occupancy by NHS trust for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " . Excluding trusts with fewer than 100 beds."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSBedOccupancyNorthWest.tiff", units="in", width=13, height=8, res=500)
trustdata %>%
filter(region=="North West") %>%
ggplot()+
geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of beds")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_wrap(~trust)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.6)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="The number of COVID-19 patients in hospital is still relatively low across the North West",
subtitle=paste0("Bed occupancy by NHS trust for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " . Excluding trusts with fewer than 100 beds."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDNHSBedOccupancyNEYorks.tiff", units="in", width=13, height=8, res=500)
trustdata %>%
filter(region=="North East and Yorkshire") %>%
ggplot()+
geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Number of beds")+
scale_fill_manual(values=c("#FD625E", "#374649", "#00B8AA"), name="Occupied by",
labels=c("Patient with COVID-19", "Other patient", "Unoccupied"))+
facet_wrap(~trust)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.6)),
plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown(),
text=element_text(family="Lato"))+
labs(title="COVID-19 patient numbers are falling across North East and Yorkshire",
subtitle=paste0("Bed occupancy by NHS trust for COVID-19 patients, non-COVID patients and unoccupied beds.
Data up to ", maxweeklydate, " . Excluding trusts with fewer than 100 beds."),
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDNHSBolton.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(paletteer)
library(ggtext)
library(extrafont)
library(ragg)
newfile <- tempfile()
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/Weekly-covid-admissions-and-beds-publication-210603.xlsx"
maxday="BF"
newfile <- curl_download(url=url, destfile=newfile, quiet=FALSE, mode="wb")
newdata1 <- read_excel(newfile, sheet="All beds COVID", range=paste0("C18:", maxday,"304"),
col_names=FALSE) %>%
gather(date, allbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(code=`...1`, trust=`...2`)
newdata2 <- read_excel(newfile, sheet="MV beds COVID", range=paste0("C18:", maxday,"304"),
col_names=FALSE) %>%
gather(date, MVbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(code=`...1`, trust=`...2`)
oldfile <- tempfile()
oldurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/Weekly-covid-admissions-and-beds-publication-210429-up-to-210406.xlsx"
oldfile <- curl_download(url=oldurl, destfile=oldfile, quiet=FALSE, mode="wb")
olddata1 <- read_excel(oldfile, sheet="All beds COVID", range="C18:IS512", col_names=FALSE) %>%
gather(date, allbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(code=`...1`, trust=`...2`)
olddata2 <- read_excel(oldfile, sheet="MV beds COVID", range="C18:IS512", col_names=FALSE) %>%
gather(date, MVbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2)) %>%
rename(code=`...1`, trust=`...2`)
data <- bind_rows(newdata1, olddata1) %>%
merge(bind_rows(newdata2, olddata2), by=c("code", "date")) %>%
mutate(Otherbeds=allbeds-MVbeds) %>%
gather(bedtype, count, c("MVbeds", "Otherbeds")) %>%
mutate(count=if_else(is.na(count), 0, count),
date=as.Date(date))
#Interpolate missing data from 29th November
plotdata <- data %>%
filter(code=="RMC") %>%
group_by(bedtype) %>%
mutate(count=if_else(date==as.Date("2020-11-29"), (lag(count, 1)+lead(count,1))/2,count))
agg_tiff("Outputs/COVIDNHSOccupancyBolton.tiff", units="in", width=8, height=6, res=800)
ggplot(plotdata, aes(x=date, y=count, fill=fct_rev(bedtype)))+
geom_area(position="stack", show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Beds occupied")+
scale_fill_paletteer_d("rcartocolor::Vivid", direction=-1)+
theme_classic()+
theme(plot.title.position="plot", plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"),
plot.subtitle=element_markdown())+
labs(title="Hospital occupancy seems to have levelled off in Bolton",
subtitle="Daily number of patients in mechanical ventilator and other beds with a positive COVID diagnosis",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDNHSTrustLakePlots.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ragg)
library(lubridate)
library(extrafont)
library(ggtext)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#NE & Yorkshire version
latestcol <- "BR"
admurl <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/COVID-19-daily-admissions-and-beds-20211209.xlsx"
temp <- tempfile()
temp <- curl_download(url=admurl, destfile=temp, quiet=FALSE, mode="wb")
oldadmurl1 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-daily-admissions-and-beds-20210406-1.xlsx"
oldtemp1 <- tempfile()
oldtemp1 <- curl_download(url=oldadmurl1, destfile=oldtemp1, quiet=FALSE, mode="wb")
oldadmurl2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/COVID-19-daily-admissions-and-beds-20211207-20210407-20210930.xlsx"
oldtemp2 <- tempfile()
oldtemp2 <- curl_download(url=oldadmurl2, destfile=oldtemp2, quiet=FALSE, mode="wb")
occdata <- read_excel(temp, range=paste0("B90:",latestcol, "97"), col_names=FALSE) %>%
gather(date, occupancy, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-2))
oldoccdata1 <- read_excel(oldtemp1, range="B90:IQ97", col_names=FALSE) %>%
gather(date, occupancy, c(2:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2))
oldoccdata2 <- read_excel(oldtemp2, range="B90:FY97", col_names=FALSE) %>%
gather(date, occupancy, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2))
MVdata <- read_excel(temp, range=paste0("B105:", latestcol, "112"), col_names=FALSE) %>%
gather(date, MVoccupancy, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-10-01")+days(as.numeric(substr(date, 4,7))-2))
oldMVdata1 <- read_excel(oldtemp1, range="B105:IQ112", col_names=FALSE) %>%
gather(date, MVoccupancy, c(2:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.numeric(substr(date, 4,7))-2))
oldMVdata2 <- read_excel(oldtemp2, range="B105:FY112", col_names=FALSE) %>%
gather(date, MVoccupancy, c(2:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.numeric(substr(date, 4,7))-2))
data <- merge(occdata, MVdata) %>%
bind_rows(merge(oldoccdata1, oldMVdata1), merge(oldoccdata2, oldMVdata2)) %>%
rename(Region=`...1`) %>%
mutate(Otherbeds=occupancy-MVoccupancy) %>%
gather(type, beds, c(3:5)) %>%
filter(type!="occupancy") %>%
mutate(type=factor(type, levels=c("Otherbeds", "MVoccupancy")))
ggplot(data %>% filter(Region!="ENGLAND" & date>as.Date("2021-06-01")),
aes(x=date, y=beds, fill=type))+
geom_col(position="stack")+
facet_wrap(~Region)+
theme_custom()
ggplot(data %>% filter(Region!="ENGLAND" & date>as.Date("2021-06-01")),
aes(x=date, y=beds, colour=Region))+
geom_line()+
facet_wrap(~type, scales="free_y")+
scale_colour_paletteer_d("colorblindr::OkabeIto")+
theme_custom()
#Bring in case data
caseurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateRollingSum&format=csv"
casetemp <- tempfile()
casetemp <- curl_download(url=caseurl, destfile=casetemp, quiet=FALSE, mode="wb")
cases <- read.csv(casetemp) %>%
mutate(Region=case_when(
areaName %in% c("East Midlands", "West Midlands") ~ "Midlands",
areaName %in% c("Yorkshire and The Humber", "North East") ~
"North East and Yorkshire",
TRUE ~ areaName),
date=as.Date(date)) %>%
group_by(Region, date) %>%
summarise(cases=sum(newCasesBySpecimenDateRollingSum)/7) %>%
ungroup()
agg_tiff("Outputs/COVIDAdmissionsLakePlotxReg.tiff", units="in", width=10, height=7,
res=500)
ggplot()+
geom_col(data=cases %>% filter(date>as.Date("2020-08-01")),
aes(x=date, y=cases), fill="#47d4ae")+
geom_col(data=data %>% filter(Region!="ENGLAND"),
aes(x=date, y=-beds, fill=type), position="stack", show.legend=FALSE)+
geom_hline(yintercept=0, colour="Black")+
scale_x_date(name="")+
scale_y_continuous(name="", labels=abs, position = "right")+
scale_fill_manual(values=c("#ff9f55", "#ff1437"))+
facet_wrap(~Region)+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="One of these waves is not like the others...",
subtitle="Daily confirmed new COVID-19 cases and patients in hospital with COVID-19 in Mechanically Ventilated and all other beds",
caption="Data from NHS England and coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDAdmissionsLakePlotEng.tiff", units="in", width=10, height=7,
res=500)
ggplot()+
geom_col(data=cases %>% filter(date>as.Date("2020-08-01")) %>%
group_by(date) %>%
summarise(cases=sum(cases)) %>%
ungroup(),
aes(x=date, y=cases), fill="#47d4ae")+
geom_col(data=data %>% filter(Region=="ENGLAND"),
aes(x=date, y=-beds, fill=type), position="stack", show.legend=FALSE)+
geom_hline(yintercept=0, colour="Black")+
scale_x_date(name="")+
scale_y_continuous(name="", labels=abs, position = "right")+
scale_fill_manual(values=c("#ff9f55", "#ff1437"))+
annotate(geom="text", x=as.Date("2020-09-01"), y=25000,
label="New cases in the population", hjust=0, family="Lato")+
annotate(geom="text", x=as.Date("2020-09-01"), y=-20000,
label="Total patients in hospital", hjust=0, family="Lato")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="COVID admission rates have been less volatile than case rates in recent months",
subtitle="Daily confirmed new COVID-19 cases and patients in hospital with COVID-19 in Mechanically Ventilated and all other beds in England",
caption="Data from NHS England and coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#######################################
#LA-level version
url.adm.old <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/Weekly-covid-admissions-and-beds-publication-210429-up-to-210406.xlsx"
temp1 <- tempfile()
temp1 <- curl_download(url=url.adm.old, destfile=temp1, quiet=FALSE, mode="wb")
url.adm.new <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/07/Weekly-covid-admissions-and-beds-publication-210715.xlsx"
temp2 <- tempfile()
temp2 <- curl_download(url=url.adm.new, destfile=temp2, quiet=FALSE, mode="wb")
MV.old <- read_excel(temp1, sheet="MV beds COVID", range="C25:IS512",
col_names=FALSE) %>%
gather(date, MVbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.integer(substr(date, 4, 6))-3)) %>%
rename(code=...1, name=...2)
MV.new <- read_excel(temp2, sheet="MV beds COVID", range="C25:CX304", col_names=FALSE) %>%
gather(date, MVbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.integer(substr(date, 4, 6))-3)) %>%
rename(code=...1, name=...2)
MVdata <- bind_rows(MV.old, MV.new)
all.old <- read_excel(temp1, sheet="All beds COVID", range="C25:IS512", col_names=FALSE) %>%
gather(date, Allbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2020-08-01")+days(as.integer(substr(date, 4, 6))-3)) %>%
rename(code=...1, name=...2)
all.new <- read_excel(temp2, sheet="All beds COVID", range="C25:CX304", col_names=FALSE) %>%
gather(date, Allbeds, c(3:ncol(.))) %>%
mutate(date=as.Date("2021-04-07")+days(as.integer(substr(date, 4, 6))-3)) %>%
rename(code=...1, name=...2)
alldata <- bind_rows(all.old, all.new)
trustdata <- merge(MVdata, alldata, all=TRUE) %>%
mutate(MVbeds=if_else(is.na(MVbeds), 0, MVbeds),
#Fix a couple of apparent errors in the MV data
MVbeds=if_else(date==as.Date("2020-09-11") & code=="RT1", 0, MVbeds),
MVbeds=if_else(date==as.Date("2020-08-02") & code=="RNU", 0, MVbeds),
Allbeds=if_else(is.na(Allbeds), 0, Allbeds),
Otherbeds=Allbeds-MVbeds)
#Bring in PHE data summarising admissions in HES to each trust by MSOA
MSOA.adm <- read.csv("COVID_LA_Plots/Trust to MSOA HES data.csv")
#1st lookup for admissions up to 4th October, when RD3 and RDZ merged to form R0D in the admissions (but not deaths) data
MSOA.adm1 <- MSOA.adm %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TRUE ~ as.character(TrustCode))) %>%
group_by(CatchmentYear, msoa, TrustCode) %>%
summarise(msoa_total_catchment1=sum(msoa_total_catchment)) %>%
ungroup()
#2nd lookup for after 4th October
MSOA.adm2 <- MSOA.adm %>%
mutate(TrustCode=case_when(
TrustCode %in% c("RE9", "RLN") ~ "R0B",
TrustCode=="R1J" ~ "RTQ",
TrustCode=="RQ6" ~ "REM",
TrustCode=="RNL" ~ "RNN",
TrustCode %in% c("RQ8", "RDD") ~ "RAJ",
TrustCode=="RA3" ~ "RA7",
TrustCode=="RC1" ~ "RC9",
TrustCode=="RBA" ~ "RH5",
TrustCode %in% c("RDZ", "RD3") ~ "R0D",
TRUE ~ as.character(TrustCode))) %>%
group_by(CatchmentYear, msoa, TrustCode) %>%
summarise(msoa_total_catchment2=sum(msoa_total_catchment)) %>%
ungroup()
temp1 <- data.frame(TrustCode=unique(MSOA.adm1$TrustCode))
temp2 <- data.frame(TrustCode=unique(MSOA.adm2$TrustCode))
temp <- bind_rows(temp1, temp2) %>%
unique()
MSOA.adm <- merge(temp, MSOA.adm1, by="TrustCode", all=TRUE) %>%
merge(., MSOA.adm2, all=TRUE)
#Bring in MSOA to LTLA lookup
temp <- tempfile()
source <- "http://geoportal1-ons.opendata.arcgis.com/datasets/0b3c76d1eb5e4ffd98a3679ab8dea605_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
MSOA.lookup <- read.csv(temp) %>%
select(MSOA11CD, LAD19CD, LAD19NM) %>%
unique() %>%
rename(msoa=MSOA11CD)
#Merge into PHE lookup
MSOA.adm <- merge(MSOA.adm, MSOA.lookup, by="msoa", all.x=TRUE)
#Convert to the lookup we want (trust to LTLA), averaging across last 3 years in data (2016-18)
trust.lookup <- MSOA.adm %>%
filter(CatchmentYear>=2016) %>%
group_by(TrustCode, LAD19CD, LAD19NM) %>%
summarise(catchment1=sum(msoa_total_catchment1, na.rm=TRUE),
catchment2=sum(msoa_total_catchment2, na.rm=TRUE)) %>%
ungroup() %>%
group_by(TrustCode) %>%
mutate(pop1=sum(catchment1, na.rm=TRUE), popprop1=catchment1/pop1,
pop2=sum(catchment2, na.rm=TRUE), popprop2=catchment2/pop2) %>%
ungroup() %>%
rename(code=TrustCode)
admissions <- merge(trustdata, trust.lookup, by.x="code", by.y="code", all=TRUE)
LAadmissions <- admissions %>%
mutate(MVbeds=case_when(
date<=as.Date("2020-10-04") ~ MVbeds*popprop1,
TRUE ~ MVbeds*popprop2),
Otherbeds=case_when(
date<=as.Date("2020-10-04") ~ Otherbeds*popprop1,
TRUE ~ Otherbeds*popprop2)
) %>%
group_by(LAD19CD, date, LAD19NM) %>%
summarise(MVbeds=sum(MVbeds, na.rm=TRUE),
Otherbeds=sum(Otherbeds, na.rm=TRUE)) %>%
ungroup() %>%
filter(!is.na(LAD19CD)) %>%
#merge City of London into Hackney and Isles of Scilly into Cornwall
mutate(LAD19CD=case_when(LAD19CD=="E09000001" ~ "E09000012",
LAD19CD=="E06000053" ~ "E06000052",
TRUE ~ as.character(LAD19CD))) %>%
group_by(LAD19CD, date, LAD19NM) %>%
summarise(MVbeds=sum(MVbeds),
Otherbeds=sum(Otherbeds)) %>%
ungroup() %>%
gather(type, beds, c("MVbeds", "Otherbeds"))
#Bring in LA level cases
LAcasesurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingSum&format=csv"
casetemp2 <- tempfile()
casetemp2 <- curl_download(url=LAcasesurl, destfile=casetemp2, quiet=FALSE, mode="wb")
LAcases <- read.csv(casetemp2) %>%
mutate(date=as.Date(date))
#Get Yorkshire-only datasets
Yorksbeds <- LAadmissions %>%
filter(LAD19NM %in% c("Barnsley", "Bradford", "Calderdale", "Doncaster",
"East Riding of Yorkshire", "Hull", "Kirklees", "Leeds",
"Rotherham", "Sheffield", "Wakefield", "York", "Craven",
"Hambleton", "Harrogate", "Richmondshire", "Ryedale",
"Scarborough", "Selby")) %>%
group_by(date, type) %>%
summarise(beds=sum(beds)) %>%
ungroup() %>%
mutate(type=factor(type, levels=c("Otherbeds", "MVbeds")))
Yorkscases <- LAcases %>%
filter(areaName %in% c("Barnsley", "Bradford", "Calderdale", "Doncaster",
"Hull", "Kirklees", "Leeds",
"Rotherham", "Sheffield", "Wakefield", "York", "Craven",
"Hambleton", "Harrogate", "Richmondshire", "Ryedale",
"Scarborough", "Selby")) %>%
group_by(date) %>%
summarise(cases=sum(newCasesBySpecimenDateRollingSum)/7) %>%
ungroup()
agg_tiff("Outputs/COVIDYorkshireAdmissionsvsOccupancy.tiff", units="in", width=9, height=6,
res=800)
ggplot()+
geom_col(data=Yorkscases %>% filter(date>as.Date("2020-08-01")),
aes(x=date, y=cases), fill="#47d4ae")+
geom_col(data=Yorksbeds,
aes(x=date, y=-beds, fill=type), position="stack", show.legend=FALSE)+
geom_hline(yintercept=0, colour="Black")+
scale_x_date(name="")+
scale_y_continuous(name="", labels=abs, position = "right")+
scale_fill_manual(values=c("#ff9f55", "#ff1437"))+
annotate(geom="text", x=as.Date("2021-04-01"), y=1200,
label="New cases in the population", hjust=0, family="Lato")+
annotate(geom="text", x=as.Date("2021-04-01"), y=-800,
label="Total patients in hospital", hjust=0, family="Lato")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="New COVID-19 cases in Yorkshire are rising, but hospital beds have yet to follow",
subtitle="Daily confirmed new COVID-19 cases and patients in hospital with COVID-19 in Mechanically Ventilated and
all other beds in Yorkshire",
caption="Data from NHS England and coronavirus.data.gov.uk | Plot and analysis by Colin Angus")
dev.off()
#Generic version for any LAs
plotbeds <- LAadmissions %>%
filter(LAD19NM %in% c("Sheffield")) %>%
group_by(date, type) %>%
summarise(beds=sum(beds)) %>%
ungroup() %>%
mutate(type=factor(type, levels=c("Otherbeds", "MVbeds")))
plotcases <- LAcases %>%
filter(areaName %in% c("Sheffield")) %>%
group_by(date) %>%
summarise(cases=sum(newCasesBySpecimenDateRollingSum)/7) %>%
ungroup()
plotname <- "Sheffield"
agg_tiff(paste0("Outputs/COVIDAdmissionsvsOccupancy", plotname, ".tiff"), units="in", width=9, height=6,
res=800)
ggplot()+
geom_col(data=plotcases %>% filter(date>as.Date("2020-08-01")),
aes(x=date, y=cases), fill="#47d4ae")+
geom_col(data=plotbeds,
aes(x=date, y=-beds, fill=type), position="stack", show.legend=FALSE)+
geom_hline(yintercept=0, colour="Black")+
scale_x_date(name="")+
scale_y_continuous(name="", labels=abs, position = "right")+
scale_fill_manual(values=c("#ff9f55", "#ff1437"))+
annotate(geom="text", x=as.Date("2021-04-01"), y=400,
label="New cases in the population", hjust=0, family="Lato")+
annotate(geom="text", x=as.Date("2021-04-01"), y=-200,
label="Total patients in hospital", hjust=0, family="Lato")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title=paste0("New COVID-19 cases in ", plotname, " are rising, but hospital beds have yet to follow"),
subtitle=paste0("Daily confirmed new COVID-19 cases and patients in hospital with COVID-19 in Mechanically Ventilated and
all other beds in ", plotname),
caption="Data from NHS England and coronavirus.data.gov.uk | Plot and analysis by Colin Angus")
dev.off()
#Welsh version
#Because Wales loves pretty, but not very friendly dashboards, I've had to manually download the data
#My gratitude to anyone who can work out how to automate this
#The web page is here: https://statswales.gov.wales/Catalogue/Health-and-Social-Care/NHS-Hospital-Activity/nhs-activity-and-capacity-during-the-coronavirus-pandemic/hospitalisations-by-date-patientype
Walesdata <- read.csv("Data/WalesHospData.csv") %>%
mutate(Date=as.Date(Date, format="%d-%b-%y"))
Walesurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=W92000004&metric=newCasesBySpecimenDateRollingSum&format=csv"
temp <- tempfile()
temp <- curl_download(url=Walesurl, destfile=temp, quiet=FALSE, mode="wb")
Walescases <- read.csv(temp) %>%
mutate(Date=as.Date(date), cases=newCasesBySpecimenDateRollingSum/7)
agg_tiff("Outputs/COVIDWalesAdmissionsvsOccupancy.tiff", units="in", width=9, height=6,
res=800)
ggplot()+
geom_col(data=Walescases, aes(x=Date, y=cases), fill="#47d4ae")+
geom_col(data=Walesdata, aes(x=Date, y=-Hospitalisations), fill="#ff9f55")+
geom_hline(yintercept=0, colour="Black")+
scale_x_date(name="")+
scale_y_continuous(name="", labels=abs, position = "right")+
scale_fill_manual(values=c("#ff9f55", "#ff1437"))+
annotate(geom="text", x=as.Date("2020-05-01"), y=800,
label="New cases in the population", hjust=0, family="Lato")+
annotate(geom="text", x=as.Date("2020-05-01"), y=-1500,
label="Total patients in hospital", hjust=0, family="Lato")+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="New COVID-19 cases in Wales are rising, but hospital beds have yet to follow",
subtitle="Rolling 7-day average of daily confirmed new COVID-19 cases and the number of patients in hospital with suspected
or confirmed COVID-19 in Wales",
caption="Data from StatsWales and coronavirus.data.gov.uk | Plot and analysis by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDONSDeathIneq.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(RcppRoll)
library(readxl)
library(paletteer)
library(extrafont)
library(ragg)
library(scales)
options(scipen=99999)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Read in 2022 deaths by LA from ONS
temp <- tempfile()
source22 <- ("https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/causesofdeath/datasets/deathregistrationsandoccurrencesbylocalauthorityandhealthboard/2022/lahbtables2022week24.xlsx")
temp <- curl_download(url=source22, destfile=temp, quiet=FALSE, mode="wb")
deaths22 <- read_excel(temp, sheet="Registrations - All data", range="A4:G97348") %>%
set_names("LAD17CD", "Geography", "LAName", "Cause", "Week", "Location", "Deaths") %>%
mutate(Date=as.Date("2022-01-07")+weeks(Week-1))
#2021 deaths
source21 <- ("https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fcausesofdeath%2fdatasets%2fdeathregistrationsandoccurrencesbylocalauthorityandhealthboard%2f2021/lahbtables20211.xlsx")
temp <- curl_download(url=source21, destfile=temp, quiet=FALSE, mode="wb")
deaths21 <- read_excel(temp, sheet="Registrations - All data")[-c(1:4),] %>%
set_names("LAD17CD", "Geography", "LAName", "Cause", "Week", "Location", "Deaths") %>%
mutate(Week=as.numeric(Week), Deaths=as.numeric(Deaths),
Date=as.Date("2021-01-08")+weeks(Week-1))
#2020 deaths
source20 <- ("https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fcausesofdeath%2fdatasets%2fdeathregistrationsandoccurrencesbylocalauthorityandhealthboard%2f2020/lahbtablesweek01to532020datawk232021.xlsx")
temp <- curl_download(url=source20, destfile=temp, quiet=FALSE, mode="wb")
deaths20 <- read_excel(temp, sheet="Registrations - All data")[-c(1:4),] %>%
set_names("LAD17CD", "Geography", "LAName", "Cause", "Week", "Location", "Deaths") %>%
mutate(Week=as.numeric(Week), Deaths=as.numeric(Deaths),
Date=as.Date("2020-01-03")+weeks(Week-1))
#Stick together and tidy up
deaths <- bind_rows(deaths20, deaths21, deaths22) %>%
group_by(LAD17CD, LAName, Cause, Date) %>%
spread(Location, Deaths) %>%
mutate(CareHome=if_else(is.na(`Care home`),0,`Care home`)+if_else(is.na(Hospice), 0, Hospice),
Home=if_else(is.na(Home), 0, Home)+if_else(is.na(Elsewhere), 0, Elsewhere)+
if_else(is.na(`Other communal establishment`), 0, `Other communal establishment`),
Hospital=if_else(is.na(Hospital), 0, Hospital),
AllLocations=CareHome+Home+Hospital) %>%
select(LAD17CD, LAName, Cause, Date, CareHome, Home, Hospital, AllLocations) %>%
gather(Location, Deaths, c("CareHome", "Home", "Hospital", "AllLocations")) %>%
ungroup()
#Calculate mean LA-level deprivation score
#Start by calculating IMD at MSOA level
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE) %>%
select(c(1,2,5,6)) %>%
set_names("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, LAD17CD) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:G34758", col_names=FALSE) %>%
select(-c(2:6)) %>%
set_names("LSOA11CD", "pop")
pop_full <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:CT34758", col_names=FALSE) %>%
select(-c(2:7)) %>%
set_names("LSOA11CD", c(0:90))
#Merge into IMD data and mess about with LA codes due to boundary changes
IMD <- merge(IMD, pop) %>%
mutate(LAD17CD=case_when(
LAD17CD %in% c("E07000190", "E07000191") ~ "E07000246",
LAD17CD %in% c("E07000206", "E07000205") ~ "E07000244",
LAD17CD %in% c("E07000204", "E07000201") ~ "E07000245",
LAD17CD %in% c("E06000028", "E06000029", "E07000048") ~ "E06000058",
LAD17CD %in% c("E07000049", "E07000050", "E07000051", "E07000052", "E07000053") ~ "E06000059",
LAD17CD %in% c("E07000004", "E07000005", "E07000006", "E07000007") ~ "E06000060",
TRUE ~ LAD17CD))
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
#Need 2 versions as Northamptonshire split part way through the pandemic
IMD_LTLA2020 <- IMD %>%
group_by(LAD17CD)%>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
arrange(IMDrank) %>%
mutate(cumpop=cumsum(pop),
popprop=cumpop/max(cumpop),
decile1=case_when(
#popprop<=0.1 ~ 1,
popprop<=0.2 ~ 2,
#popprop<=0.3 ~ 3,
popprop<=0.4 ~ 4,
#popprop<=0.5 ~ 5,
popprop<=0.6 ~ 6,
#popprop<=0.7 ~ 7,
popprop<=0.8 ~ 8,
#popprop<=0.9 ~ 9,
TRUE ~ 10))
IMD_LTLA2021 <- IMD %>%
#Sort out Northamptonshire
mutate(LAD17CD=case_when(
LAD17CD %in% c("E07000150", "E07000152", "E07000153", "E07000156") ~
"E06000061",
LAD17CD %in% c("E07000151", "E07000154", "E07000155") ~
"E06000062",
TRUE ~ LAD17CD)) %>%
group_by(LAD17CD)%>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup()%>%
arrange(IMDrank) %>%
mutate(cumpop=cumsum(pop),
popprop=cumpop/max(cumpop),
decile2=case_when(
#popprop<=0.1 ~ 1,
popprop<=0.2 ~ 2,
#popprop<=0.3 ~ 3,
popprop<=0.4 ~ 4,
#popprop<=0.5 ~ 5,
popprop<=0.6 ~ 6,
#popprop<=0.7 ~ 7,
popprop<=0.8 ~ 8,
#popprop<=0.9 ~ 9,
TRUE ~ 10))
#Join together, removing Welsh LAs as IMD is English only
fulldata <- merge(deaths %>% filter(substr(LAD17CD, 1, 1)=="E"), IMD_LTLA2020, all=TRUE, by="LAD17CD") %>%
merge(IMD_LTLA2021, all=TRUE, by="LAD17CD") %>%
mutate(decile=if_else(Date%
select(LAD17CD, LAName, Cause, Date, Location, Deaths, decile, pop)
deciledata <- fulldata %>%
group_by(decile, Date, Cause, Location) %>%
summarise(Deaths=sum(Deaths), pop=sum(pop)) %>%
ungroup()
deciledata %>% filter(Location=="AllLocations" & Cause=="COVID 19") %>%
ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Weekly COVID deaths")+
scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()
agg_png("Outputs/COVIDDeathsONSIneq2122.png", units="in", width=8, height=6, res=800)
deciledata %>% filter(Location=="AllLocations" & Cause=="COVID 19" &
Date>as.Date("2021-07-01")) %>%
ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="", breaks=c(as.Date("2021-07-01"), as.Date("2021-09-01"),
as.Date("2021-11-01"), as.Date("2022-01-01"),
as.Date("2022-03-01"), as.Date("2022-05-01")),
labels=c("Jul '21", "Sep '21","Nov '21", "Jan '22", "Mar '22", "May '22"))+
scale_y_continuous(name="Weekly COVID deaths", limits=c(0,NA))+
#scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="Deprivation decile",
# labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
# "10 - least deprived"))+
scale_colour_manual(values=c("#663000", "#CC9B7A", "#F2DACE", "#66F0FF", "#00AACC"), name="Deprivation quintile",
labels=c("1 - Most deprived", "2", "3", "4", "5 - Least deprived"))+
theme_custom()+
labs(title="The BA.2 wave hit less deprived areas hardest",
subtitle="Number of deaths registered with Covid on the death certificate by quintiles of the Index of Multiple Deprivation",
caption="Data from the Office for National Statistics | Plot by @VictimOfMaths")
dev.off()
agg_png("Outputs/COVIDDeathsONSIneq2122Prop.png", units="in", width=8, height=6, res=800)
deciledata %>% filter(Location=="AllLocations" & Cause=="COVID 19" &
Date>as.Date("2021-07-01")) %>%
ggplot(aes(x=Date, y=Deaths, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="", breaks=c(as.Date("2021-07-01"), as.Date("2021-09-01"),
as.Date("2021-11-01"), as.Date("2022-01-01"),
as.Date("2022-03-01"), as.Date("2022-05-01")),
labels=c("Jul '21", "Sep '21","Nov '21", "Jan '22", "Mar '22", "May '22"))+
scale_y_continuous(name="Proportion of COVID deaths", limits=c(0,NA),
labels=label_percent(accuracy=1))+
#scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="Deprivation decile",
# labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
# "10 - least deprived"))+
scale_fill_manual(values=c("#663000", "#CC9B7A", "#F2DACE", "#66F0FF", "#00AACC"), name="Deprivation quintile",
labels=c("1 - Most deprived", "2", "3", "4", "5 - Least deprived"))+
theme_custom()+
labs(title="The proportion of COVID deaths coming from less deprived areas is rising",
subtitle="Number of deaths registered with Covid on the death certificate by quintiles of the Index of Multiple Deprivation",
caption="Data from the Office for National Statistics | Plot by @VictimOfMaths")
dev.off()
agg_png("Outputs/COVIDDeathsONSIneq2022.png", units="in", width=8, height=6, res=800)
deciledata %>% filter(Location=="AllLocations" & Cause=="COVID 19") %>%
ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="", )+
scale_y_continuous(name="Weekly COVID deaths", limits=c(0,NA))+
#scale_colour_paletteer_d("dichromat::BrowntoBlue_10", name="Deprivation decile",
# labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
# "10 - least deprived"))+
scale_colour_manual(values=c("#663000", "#CC9B7A", "#F2DACE", "#66F0FF", "#00AACC"), name="Deprivation quintile",
labels=c("1 - Most deprived", "2", "3", "4", "5 - Least deprived"))+
theme_custom()+
labs(title="COVID deaths have been consistently higher in more deprived areas",
subtitle="Number of deaths registered with Covid on the death certificate by quintiles of the Index of Multiple Deprivation",
caption="Data from the Office for National Statistics | Plot by @VictimOfMaths")
dev.off()
deciledata %>% filter(Location=="AllLocations" & Cause=="COVID 19") %>%
ggplot(aes(x=Date, y=Deaths, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of COVID deaths", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
theme_custom()
agg_png("Outputs/COVIDDeathsONSIneqProp2122.png", units="in", width=10, height=6, res=800)
deciledata %>% filter(Location!="AllLocations" & Cause=="COVID 19" &
Date>as.Date("2021-07-01")) %>%
mutate(Location=case_when(
Location=="CareHome" ~ "Care home",
Location=="Home" ~ "Home/other",
Location=="Hospital" ~ "Hospital"),
Location=factor(Location, levels=c("Hospital", "Care home", "Home/other"))) %>%
ggplot(aes(x=Date, y=Deaths, fill=as.factor(decile)))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of COVID deaths", limits=c(0,NA),
labels=label_percent(accuracy=1))+
#scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
# labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
# "10 - least deprived"))+
scale_fill_manual(values=c("#663000", "#CC9B7A", "#F2DACE", "#66F0FF", "#00AACC"), name="Deprivation quintile",
labels=c("1 - Most deprived", "2", "3", "4", "5 - Least deprived"))+
facet_wrap(~Location)+
theme_custom()+
labs(title="The socioeconomic distribution of deaths has shifted in all locations",
subtitle="Proportion of deaths registered weekly in England by place of death and quintile of the Index of Multiple Deprivation\n ",
caption="Data from the Office for National Statistics | Plot by @VictimOfMaths")
dev.off()
agg_png("Outputs/COVIDDeathsONSIneqxLoc2122.png", units="in", width=10, height=6, res=800)
deciledata %>% filter(Location!="AllLocations" & Cause=="COVID 19" &
Date>as.Date("2021-07-01")) %>%
mutate(Location=case_when(
Location=="CareHome" ~ "Care home",
Location=="Home" ~ "Home/other",
Location=="Hospital" ~ "Hospital"),
Location=factor(Location, levels=c("Hospital", "Care home", "Home/other"))) %>%
ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="COVID deaths")+
#scale_fill_paletteer_d("dichromat::BrowntoBlue_10", name="",
# labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
# "10 - least deprived"))+
scale_colour_manual(values=c("#663000", "#CC9B7A", "#F2DACE", "#66F0FF", "#00AACC"), name="Deprivation quintile",
labels=c("1 - Most deprived", "2", "3", "4", "5 - Least deprived"))+
facet_wrap(~Location)+
theme_custom()+
labs(title="The biggest difference in COVID deaths between more and less deprived areas is in care homes",
subtitle="Proportion of deaths registered weekly in England by place of death and quintile of the Index of Multiple Deprivation\n ",
caption="Data from the Office for National Statistics | Plot by @VictimOfMaths")
dev.off()
summarydata <- deciledata %>% filter(Location=="AllLocations" & Cause=="COVID 19") %>%
select(decile, Deaths, Date) %>%
spread(Date, Deaths) %>%
mutate(decile=case_when(
decile==1 ~ "1 - Most deprived",
decile==10 ~ "10 - least deprived",
TRUE ~ as.character(decile)
))
write.csv(summarydata, "Outputs/COVIDDeathsIneq.csv", row.names=FALSE)
================================================
FILE: Heatmaps/COVIDONSInfectionSurvey.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(ggtext)
library(extrafont)
library(ragg)
library(paletteer)
library(readxl)
library(geofacet)
library(scales)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
temp <- tempfile()
#Surely there is a sensible full time series of this???
#Downloading each week's data individually seems kind of daft, but hey ho...
#I'm sure I'm missing something obvious here...
#26th Jan
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcoronaviruscovid19infectionsurveyheadlineresultsuk%2f2022/20220202covidinfectionsurveyheadlinedataset.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata260122 <- read_excel(temp, sheet="1b", range="A5:E14") %>%
mutate(date=as.Date("2022-01-26")) %>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
agedata260122 <- read_excel(temp, sheet="1c", range="A5:D12") %>%
mutate(date=as.Date("2022-01-26"))%>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`,
`Grouped age`=`Age/school year group`)
#19th Jan
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveyheadlineresultsuk/2022/20220126covidinfectionsurveyheadlinedataset.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata190122 <- read_excel(temp, sheet="1b", range="A5:E14") %>%
mutate(date=as.Date("2022-01-19")) %>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
agedata190122 <- read_excel(temp, sheet="1c", range="A5:D12") %>%
mutate(date=as.Date("2022-01-19"))%>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
#12th Jan
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcoronaviruscovid19infectionsurveyheadlineresultsuk%2f2022/20220119covidinfectionsurveyheadlinedataset19012022102636.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata120122 <- read_excel(temp, sheet="1b", range="A5:E14") %>%
mutate(date=as.Date("2022-01-12")) %>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
agedata120122 <- read_excel(temp, sheet="1c", range="A5:D12") %>%
mutate(date=as.Date("2022-01-12"))%>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
#3rd Jan
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/20220107covid19infectionsurveydatasetsengland.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata030122 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2022-01-03")) %>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
agedata030122 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2022-01-03"))%>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
#31st Dec
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/20220107covid19infectionsurveydatasetsengland.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata311221 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-12-31"))%>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
agedata311221 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-12-31"))%>%
rename(`95% Lower credible Interval`=`95% Lower credible interval`,
`95% Upper credible Interval`=`95% Upper credible interval`)
#28th Dec
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcoronaviruscovid19infectionsurveyheadlineresultsuk%2f2021/20220105covidinfectionsurveyheadlinedataset.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata281221 <- read_excel(temp, sheet="1b", range="A5:E14") %>%
mutate(date=as.Date("2021-12-28"))
agedata281221 <- read_excel(temp, sheet="1c", range="A5:D12") %>%
mutate(date=as.Date("2021-12-28"))
#16th Dec
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/covid19infectionsurvey24122021england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata161221 <- read_excel(temp, sheet="1c England", range="A5:E14") %>%
mutate(date=as.Date("2021-12-16"))
agedata161221 <- read_excel(temp, sheet="1e England", range="A5:D12") %>%
mutate(date=as.Date("2021-12-16"))
#8th Dec
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v55/covid19infectionsurveydatasets20211217england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata081221 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-12-08"))
agedata081221 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-12-08"))
#28th Nov
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v54/covid19infectionsurveydatasets20211210england1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata281121 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-11-28"))
agedata281121 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-11-28"))
#24th Nov
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v53/covid19infectionsurveydatasets20211203england1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata241121 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-11-24"))
agedata241121 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-11-24"))
#17th Nov
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v52/covid19infectionsurveydatasets20211126england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata171121 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-11-17"))
agedata171121 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-11-17"))
#10th Nov
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v51/covid19infectionsurveydatasets20211119england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata101121 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-11-10"))
agedata101121 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-11-10"))
#3rd Nov
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v50/covid19infectionsurveydatasets20211112england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata031121 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-11-03"))
agedata031121 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-11-03"))
#27th Oct
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v49/covid19infectionsurveydatasets20211105england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata271021 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-10-27"))
agedata271021 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-10-27"))
#19th Oct
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v48/covid19infectionsurveydatasets20211029england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata191021 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-10-19"))
agedata191021 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-10-19"))
#13th Oct
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v47/covid19infectionsurveydatasets20211022england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata131021 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-10-13"))
agedata131021 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-10-13"))
#6th Oct
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v46/covid19infectionsurveydatasets20211015england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata061021 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-10-06"))
agedata061021 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-10-06"))
#29th Sept
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v45/covid19infectionsurveydatasets20211008england08102021091213.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata290921 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-09-29"))
agedata290921 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-09-29"))
#22nd Sept
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v44/covid19infectionsurveydatasets20211001england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata220921 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-09-22"))
agedata220921 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-09-22"))
#15th Sept
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v43/covid19infectionsurveydatasets20210924england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata150921 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-09-15"))
agedata150921 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-09-15"))
#8th Sept
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v42/covid19infectionsurveydatasets20210917england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata080921 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-09-08"))
agedata080921 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-09-08"))
#1st Sept
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v41/covid19infectionsurveydatasets20210910england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata010921 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-09-01"))
agedata010921 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-09-01"))
#24th August
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v40/covid19infectionsurveydatasets20210903england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata240821 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-08-24"))
agedata240821 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-08-24"))
#17th August
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v39/covid19infectionsurveydatasets20210827england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata170821 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-08-17"))
agedata170821 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-08-17"))
#11th August
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v38/covid19infectionsurveydatasetsengland20210820.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata110821 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-08-11"))
agedata110821 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-08-11"))
#3rd August
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v37/covid19infectionsurveydatasetsengland20210813.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata030821 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-08-03"))
agedata030821 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-08-03"))
#28th July
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v36/covid19infectionsurveydatasets20210806england05082021171453.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata280721 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-07-28"))
agedata280721 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-07-28"))
#21st July
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v35/covid19infectionsurveydatasets20210730englandpostsdc2.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata210721 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-07-21"))
agedata210721 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-07-21"))
#14th July
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v34/covid19infectionsurveydatasets20210723england1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata140721 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-07-14"))
agedata140721 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-07-14"))
#7th July
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v33/covid19infectionsurveydatasets20210716england1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata070721 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-07-07"))
agedata070721 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-07-07"))
#30th June
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v32/covid19infectionsurveydatasets20210709england08072021180807.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata300621 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-06-30"))
agedata300621 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-06-30"))
#23rd June
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v31/covid19infectionsurveydatasets20210702england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata230621 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-06-23"))
agedata230621 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-06-23"))
#16th June
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v30/covid19infectionsurveydatasets20210625england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata160621 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-06-16"))
agedata160621 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-06-16"))
#9th June
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v29/covid19infectionsurveydatasets20210618england1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata090621 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-06-09"))
agedata090621 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-06-09"))
#2nd June
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v28/covid19infectionsurveydatasets20210611england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata020621 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-06-02"))
agedata020621 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-06-02"))
#26th May
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v27/covid19infectionsurveydatasets20210604england.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata260521 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-05-26"))
agedata260521 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-05-26"))
#19th May
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v26/covid19infectionsurveydatasets20210528eng.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata190521 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-05-19"))
agedata190521 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-05-19"))
#12th May
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v25/covid19infectionsurveydatasets20210521eng.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata120521 <- read_excel(temp, sheet="1e", range="A5:E14") %>%
mutate(date=as.Date("2021-05-12"))
agedata120521 <- read_excel(temp, sheet="1g", range="A5:D12") %>%
mutate(date=as.Date("2021-05-12"))
#5th May
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v24/covid19infectionsurveydatasets20210514engfinal.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata050521 <- read_excel(temp, sheet="1e", range="A6:E15") %>%
mutate(date=as.Date("2021-05-05"))%>%
set_names(c("Region", "Pop", "PosProp", "LowerCI", "UpperCI", "Date"))
agedata050521 <- read_excel(temp, sheet="1g", range="A6:D13") %>%
mutate(date=as.Date("2021-05-05"))%>%
set_names(c("Age", "PosProp", "LowerCI", "UpperCI", "Date"))
#29th April
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v23/covid19infectionsurveydatasets20210507eng.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata290421 <- read_excel(temp, sheet="1e", range="A6:E15") %>%
mutate(date=as.Date("2021-04-29"))%>%
set_names(c("Region", "Pop", "PosProp", "LowerCI", "UpperCI", "Date"))
agedata290421 <- read_excel(temp, sheet="1g", range="A6:D13") %>%
mutate(date=as.Date("2021-04-29"))%>%
set_names(c("Age", "PosProp", "LowerCI", "UpperCI", "Date"))
#21st April
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v22/covid19infectionsurveydatasets20210430eng1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata210421 <- read_excel(temp, sheet="1e", range="A6:E15") %>%
mutate(date=as.Date("2021-04-21"))%>%
set_names(c("Region", "Pop", "PosProp", "LowerCI", "UpperCI", "Date"))
agedata210421 <- read_excel(temp, sheet="1g", range="A6:D13") %>%
mutate(date=as.Date("2021-04-21"))%>%
set_names(c("Age", "PosProp", "LowerCI", "UpperCI", "Date"))
#13th April
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v21/covid19infectionsurveydatasets20210423eng.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
regdata130421 <- read_excel(temp, sheet="1e", range="A6:E15") %>%
mutate(date=as.Date("2021-04-13"))%>%
set_names(c("Region", "Pop", "PosProp", "LowerCI", "UpperCI", "Date"))
agedata130421 <- read_excel(temp, sheet="1g", range="A6:D13") %>%
mutate(date=as.Date("2021-04-13"))%>%
set_names(c("Age", "PosProp", "LowerCI", "UpperCI", "Date"))
#7th April
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v19/covid19infectionsurveydatasets202104161.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#At last! A time series
regdataold <- read_excel(temp, sheet="1j", range="C8:AC31", col_names=FALSE) %>%
set_names(c(paste(rep(c("North_East", "North_West", "Yorkshire_and_The_Humber", "East_Midlands",
"West_Midlands", "East_of_England", "London", "South_East", "South_West"),
each=3), rep(c("PosProp", "LowerCI", "UpperCI"), times=9), sep="-"))) %>%
mutate(Date=seq.Date(from=as.Date("2020-05-17"), to=as.Date("2021-04-04"), by="2 weeks")) %>%
pivot_longer(cols=c(1:(ncol(.)-1)), names_to=c("Region", "Metric"), names_sep="-",
values_to="Values") %>%
spread(Metric, Values) %>%
mutate(Region=gsub("_", " ", Region))
agedataold <- read_excel(temp, sheet="1i", range="C8:W31", col_names=FALSE) %>%
set_names(c(paste(rep(c("Age_2_to_School_Year_6", "School_Year_7_to_School_Year_11",
"School_Year_12_to_Age_24", "Age_25_to_Age_34",
"Age_35_to_Age_49", "Age_50_to_Age_69", "Age_70+"),
each=3), rep(c("PosProp", "LowerCI", "UpperCI"), times=7), sep="-"))) %>%
mutate(Date=seq.Date(from=as.Date("2020-05-17"), to=as.Date("2021-04-04"), by="2 weeks")) %>%
pivot_longer(cols=c(1:(ncol(.)-1)), names_to=c("Age", "Metric"), names_sep="-",
values_to="Values") %>%
spread(Metric, Values) %>%
mutate(Age=gsub("_", " ", Age))
#Combine and plot
regdata <- bind_rows(regdata260122, regdata190122, regdata120122, regdata030122, regdata311221,
regdata281221, regdata161221, regdata081221, regdata281121,
regdata241121, regdata171121, regdata101121, regdata031121,
regdata271021, regdata191021, regdata131021, regdata061021,
regdata290921, regdata220921, regdata150921, regdata080921,
regdata010921, regdata240821, regdata170821, regdata110821,
regdata030821, regdata280721, regdata210721, regdata140721,
regdata070721, regdata300621, regdata230621, regdata160621) %>%
set_names(c("Region", "Pop", "PosProp", "LowerCI", "UpperCI", "Date")) %>%
mutate(PosProp=PosProp/100, LowerCI=LowerCI/100, UpperCI=UpperCI/100) %>%
bind_rows(bind_rows(regdata090621, regdata020621, regdata260521, regdata190521,
regdata120521) %>%
set_names(c("Region", "Pop", "PosProp", "LowerCI", "UpperCI", "Date"))) %>%
bind_rows(regdata050521, regdata290421, regdata210421, regdata130421, regdataold)
agedata <- bind_rows(agedata260122, agedata190122, agedata120122, agedata030122, agedata311221,
agedata281221, agedata161221, agedata081221, agedata281121,
agedata241121, agedata171121, agedata101121, agedata031121,
agedata271021, agedata191021, agedata131021, agedata061021,
agedata290921, agedata220921, agedata150921, agedata080921,
agedata010921, agedata240821, agedata170821, agedata110821,
agedata030821, agedata280721, agedata210721, agedata140721,
agedata070721, agedata300621, agedata230621, agedata160621) %>%
set_names(c("Age", "PosProp", "LowerCI", "UpperCI", "Date")) %>%
mutate(PosProp=PosProp/100, LowerCI=LowerCI/100, UpperCI=UpperCI/100) %>%
bind_rows(bind_rows(agedata090621, agedata020621, agedata260521, agedata190521,
agedata120521) %>%
set_names(c("Age", "PosProp", "LowerCI", "UpperCI", "Date")))%>%
bind_rows(agedata050521, agedata290421, agedata210421, agedata130421, agedataold) %>%
mutate(Age=factor(Age, levels=c("Age 2 to School Year 6", "School Year 7 to School Year 11",
"School Year 12 to Age 24", "Age 25 to Age 34",
"Age 35 to Age 49", "Age 50 to Age 69", "Age 70+")))
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),
code=c(1:9))
maxdate <- max(regdata$Date)
agg_tiff("Outputs/COVIDONSInfSurvxReg.tiff", units="in", width=10, height=8, res=500)
ggplot(regdata, aes(x=Date, y=PosProp, ymin=LowerCI, ymax=UpperCI, colour=Region, fill=Region))+
geom_ribbon(alpha=0.1, colour=NA, show.legend=FALSE)+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of population testing positive", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("LaCroixColoR::paired")+
scale_fill_paletteer_d("LaCroixColoR::paired")+
facet_geo(~Region, grid=mygrid)+
theme_custom()+
theme(strip.text=element_blank(), plot.title=element_text(size=rel(2.2)))+
geom_text(aes(x=as.Date("2021-02-02"), y=0.05, label=Region), family="Lato", fontface="bold",
size=rel(4), show.legend=FALSE)+
labs(title="ONS data suggests the South West is a bit of an outlier",
subtitle=paste0("Estimated proportion of the population who would test positive for COVID according to the ONS infection survey.\nData up to ", maxdate),
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDONSInfSurvxAge.tiff", units="in", width=10, height=8, res=500)
ggplot(agedata, aes(x=Date, y=PosProp, ymin=LowerCI, ymax=UpperCI, colour=Age, fill=Age))+
geom_ribbon(alpha=0.1, colour=NA, show.legend=FALSE)+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of population testing positive", limits=c(0,NA),
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("awtools::a_palette")+
scale_fill_paletteer_d("awtools::a_palette")+
facet_wrap(~Age)+
theme_custom()+
theme(strip.text=element_blank(), plot.title=element_text(size=rel(2.2)))+
geom_text(aes(x=as.Date("2021-01-20"), y=0.05, label=Age), family="Lato", fontface="bold",
size=rel(4), show.legend=FALSE)+
labs(title="Prevalence was still rising last week in the very young",
subtitle=paste0("Estimated proportion of the population who would test positive for COVID according to the ONS infection survey.\nData up to ", maxdate),
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Calculate national picture from weighted average of regional one
pops <- regdata010921 %>%
select(Region, `Population size`) %>%
set_names("Region", "Pop")
natdata <- regdata %>%
select(-Pop) %>%
merge(pops, all.x=TRUE, by="Region") %>%
group_by(Date) %>%
summarise(PosProp=weighted.mean(PosProp, Pop)) %>%
ungroup()
agg_tiff("Outputs/COVIDONSInfSurv.tiff", units="in", width=8, height=6, res=500)
ggplot(natdata, aes(x=Date, y=PosProp))+
geom_line(colour="Tomato2", size=1)+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of population testing positive", limits=c(0,NA),
labels=label_percent(accuracy=1))+
theme_custom()+
labs(title="COVID prevalence has plateaued in the last week",
subtitle="Estimated proportion of the population who would test positive for COVID according to the ONS infection survey",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDONSInfSurvWaves.tiff", units="in", width=8, height=6, res=500)
ggplot(natdata, aes(x=Date, y=PosProp))+
geom_rect(aes(xmin=as.Date("2020-12-01"), xmax=as.Date("2021-05-01"),
ymin=0, ymax=0.065), fill="#EE6677", alpha=0.01)+
geom_rect(aes(xmin=as.Date("2021-05-01"), xmax=as.Date("2021-12-10"),
ymin=0, ymax=0.065), fill="#228833", alpha=0.01)+
geom_rect(aes(xmin=as.Date("2021-12-10"), xmax=as.Date("2022-01-03"),
ymin=0, ymax=0.065), fill="#66CCEE", alpha=0.01)+
geom_line(colour="Black", size=1)+
scale_x_date(name="", limits=c(as.Date("2020-12-01"), NA_Date_))+
scale_y_continuous(name="Proportion of population testing positive", limits=c(0,NA),
labels=label_percent(accuracy=1))+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="Omicron is not like Alpha or Delta",
subtitle="Estimated proportion of the population who would test positive for COVID according to the ONS infection survey",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDONSInfectionSurveyVariants.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(ggtext)
library(extrafont)
library(ragg)
library(paletteer)
library(readxl)
library(scales)
library(geofacet)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Set up facets
mygrid <- data.frame(name=c("Scotland", "North East", "Northern Ireland", "North West",
"Yorkshire & Humber", "West Midlands", "East Midlands",
"East of England", "South West", "London", "South East"),
row=c(1,1,2,2,2,3,3,3,4,4,4), col=c(2,3,1,2,3,1,2,3,1,2,3),
code=c(1:11))
#Download technical data from ONS infection survey including variant estimates
temp <- tempfile()
url <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcovid19infectionsurveytechnicaldata%2f2022/20220311covid19infectionsurveydatasetstechnical2.xlsx"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
natdata <- read_excel(temp, sheet="1c", range="A6:AK49") %>%
set_names("Date", paste(rep(c("England", "Wales", "Northern Ireland", "Scotland"), each=9),
rep(c("BA.1", "BA.2", "Unknown"), each=3, times=4),
rep(c("perc", "lower", "upper"), times=12), sep="_")) %>%
mutate(Date=as.Date(Date)) %>%
pivot_longer(c(2:37), names_to=c("Country", "Variant", "Metric"), names_sep="_", values_to="Percentage") %>%
mutate(Percentage=as.numeric(Percentage)) %>%
spread(Metric, Percentage)
#Bring in English regions
regdata <- read_excel(temp, sheet="1d", range="A6:CD48") %>%
set_names("Date", paste(rep(c("North East", "North West", "Yorkshire & Humber",
"East Midlands", "West Midlands", "East of England",
"London", "South East", "South West"), each=9),
rep(c("BA.1", "BA.2", "Unknown"), each=3, times=9),
rep(c("perc", "lower", "upper"), times=27), sep="_")) %>%
mutate(Date=as.Date(Date)) %>%
pivot_longer(c(2:82), names_to=c("Region", "Variant", "Metric"), names_sep="_", values_to="Percentage") %>%
mutate(Percentage=as.numeric(Percentage)) %>%
spread(Metric, Percentage)
#Combine regions with Scotland, Wales and NI
combined <- natdata %>%
filter(Country!="England") %>%
rename(Region=Country) %>%
bind_rows(regdata)
#Plot prevalence by variant
ggplot(natdata, aes(x=Date, y=perc/100, fill=Variant))+
geom_area()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of population", labels=label_percent(accuracy=0.1))+
scale_fill_manual(values=c("#11B2E8", "#CF2154", "#DBF4F8"))+
facet_wrap(~Country)+
theme_custom()
ggplot(regdata, aes(x=Date, y=perc/100, fill=Variant))+
geom_area()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of population", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#11B2E8", "#CF2154", "#DBF4F8"))+
facet_wrap(~Region)+
theme_custom()
agg_tiff("Outputs/COVIDONSInfectionStudyVariants.tiff", units="in", width=10, height=7, res=500)
ggplot(combined, aes(x=Date, y=perc/100, fill=Variant))+
geom_area()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of population testing positive",
labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#11B2E8", "#CF2154", "#DBF4F8"))+
facet_geo(~Region, grid=mygrid)+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="Rising COVID prevalence across the UK is being driven by the BA.2 variant",
subtitle="Estimated proportion of the population testing positive for the BA.1 or BA.2 variants according to the ONS Infection Survey.
A small number of samples did not contain enough genetic material to determine the variant.",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Plot prevalence by variant
ggplot(natdata, aes(x=Date, y=perc/100, fill=Variant))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#11B2E8", "#CF2154", "#DBF4F8"))+
facet_wrap(~Country)+
theme_custom()
ggplot(regdata, aes(x=Date, y=perc/100, fill=Variant))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#11B2E8", "#CF2154", "#DBF4F8"))+
facet_wrap(~Region)+
theme_custom()
agg_tiff("Outputs/COVIDONSInfectionStudyVariantsProp.tiff", units="in", width=10, height=7, res=500)
ggplot(combined, aes(x=Date, y=perc/100, fill=Variant))+
geom_area(position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#11B2E8", "#CF2154", "#DBF4F8"))+
facet_geo(~Region, grid=mygrid)+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="But BA.1 is still hanging in there in some parts of the country",
subtitle="Estimated proportion people testing positive for COVID who have either the BA.1 or BA.2 variants according to the ONS Infection Survey.
A small number of samples did not contain enough genetic material to determine the variant.",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDPHECasesxAgev2.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(arrow)
library(readxl)
library(RcppRoll)
library(paletteer)
library(ggstream) #remotes::install_github("davidsjoberg/ggstream")
library(lubridate)
library(geofacet)
library(ggtext)
library(gghighlight)
library(ragg)
library(extrafont)
temp1 <- tempfile()
source1 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode="wb")
temp2 <- tempfile()
source2 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode="wb")
temp3 <- tempfile()
source3 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
temp3 <- curl_download(url=source3, destfile=temp3, quiet=FALSE, mode="wb")
data <- read_csv_arrow(temp1) %>%
bind_rows(read_csv_arrow(temp2), read_csv_arrow(temp3)) %>%
select(c(1:6)) %>%
filter(age!="unassigned") %>%
mutate(age=case_when(
age=="00_04" ~ "0_4",
age=="05_09" ~ "5-9",
TRUE ~ age),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+"))) %>%
#Remove two bonus age categories that we don't need (0-59 and 60+)
filter(!is.na(age)) %>%
#Sort out Buckinghamsire (as 4 separate LTLAs in the data, but pop data only available for Bucks)
mutate(Code=case_when(
areaCode %in% c("E07000004", "E07000005", "E07000006", "E07000007") ~ "E06000060",
TRUE ~ as.character(areaCode)
),
areaName=case_when(
Code=="E06000060" ~ "Buckinghamshire",
TRUE ~ as.character(areaName)
),
areaType=case_when(
Code=="E06000060" ~ "ltla",
TRUE ~ as.character(areaType)
),
date=as.Date(date)) %>%
group_by(Code, areaName, areaType, date, age) %>%
mutate(cases=sum(cases)) %>%
ungroup()
#Bring in populations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="MYE2 - Persons", range="A5:CQ431")
#Align age bands
pop <- pop %>%
gather(age.sgl, pop, c(5:95)) %>%
mutate(age.sgl=as.numeric(gsub("\\+", "", age.sgl)),
age=case_when(
age.sgl<5 ~ "0-4",
age.sgl<10 ~ "5-9",
age.sgl<15 ~ "10-14",
age.sgl<20 ~ "15-19",
age.sgl<25 ~ "20-24",
age.sgl<30 ~ "25-29",
age.sgl<35 ~ "30-34",
age.sgl<40 ~ "35-39",
age.sgl<45 ~ "40-44",
age.sgl<50 ~ "45-49",
age.sgl<55 ~ "50-54",
age.sgl<60 ~ "55-59",
age.sgl<65 ~ "60-64",
age.sgl<70 ~ "65-69",
age.sgl<75 ~ "70-74",
age.sgl<80 ~ "75-79",
age.sgl<85 ~ "80-84",
age.sgl<90 ~ "85-89",
TRUE ~ "90+"
) %>% factor(levels = levels(data$age))
) %>%
#And sort out Buckinghamshire codes
mutate(Code=case_when(
Code %in% c("E07000005", "E07000006", "E07000007", "E07000004") ~ "E06000060",
TRUE ~ Code
)) %>%
group_by(age, Code) %>%
summarise(pop=sum(pop))
#Merge into case data
data <- data %>%
left_join(pop, by=c("Code", "age")) %>%
arrange(date)
#Collapse age bands further
shortdata <- data %>%
mutate(ageband=case_when(
age %in% c("0-4", "5-9", "10-14") ~ "0-14",
age %in% c("15-19", "20-24") ~ "15-24",
age %in% c("25-29", "30-34", "35-39", "40-44") ~ "25-44",
age %in% c("45-49", "50-54", "55-59", "60-64") ~ "45-64",
age %in% c("65-69", "70-74", "75-79") ~ "65-79",
TRUE ~ "80+"
)) %>%
group_by(ageband, areaCode, areaType, areaName, date) %>%
summarise(cases=sum(cases), pop=sum(pop)) %>%
ungroup() %>%
mutate(caserate=cases*100000/pop) %>%
group_by(ageband, areaCode, areaType) %>%
mutate(casesroll=roll_mean(cases, n=7, align="center", fill=NA),
caserateroll=roll_mean(caserate, n=7, align="center", fill=NA)) %>%
ungroup()
data <- data %>%
mutate(caserate=cases*100000/pop) %>%
group_by(age, areaCode, areaType) %>%
mutate(casesroll=roll_mean(cases, n=7, align="center", fill=NA),
caserateroll=roll_mean(caserate, n=7, align="center", fill=NA)) %>%
ungroup()
data1 <- data %>% filter(areaType %in% c("ltla", "nation", "region")) %>%
select(areaName, areaType, date, age, casesroll, caserateroll, pop, cases)
data1b <- data %>% filter(areaType %in% c("ltla", "nation", "region")) %>%
select(areaName, areaType, date, age, casesroll, caserateroll)
data2 <- data %>% filter(areaType %in% c("ltla", "nation", "region") &
date>=as.Date("2021-01-01"))
data3 <- shortdata %>% filter(areaType %in% c("ltla", "nation", "region")) %>%
select(areaName, areaType, date, ageband, casesroll, caserateroll)
#Save files for the app to use
save(data1b, data3, file="COVID_Cases_By_Age/Alldata.RData")
save(data1, data3, file="COVID_Case_Trends_By_Age/Alldata.RData")
data1 %>% write.csv("COVID_Cases_By_Age/data.csv")
data2 %>% write.csv("COVID_Case_Trends_By_Age/data.csv")
data3 %>% write.csv("COVID_Cases_By_Age/shortdata.csv")
plotfrom <- as.Date("2021-04-01")
#Bolton plots
agg_tiff("Outputs/COVIDCasesxAgeBolton.tiff", units="in", width=8, height=6, res=800)
data %>%
#filter(areaType=="nation" & !is.na(caserateroll)) %>%
filter(areaName=="Bolton" & !is.na(caserateroll) & date>=plotfrom) %>%
ggplot()+
geom_tile(aes(x=date, y=age, fill=caserateroll*7))+
scale_fill_paletteer_c("viridis::inferno", name="Weekly cases per 100,000", limits=c(0,1300))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), text=element_text(family="Lato"),
legend.position="top")+
guides(fill=guide_colourbar(ticks=FALSE, title.position = "top", title.hjust = 0.5,
barwidth=unit(10, "lines"), barheight=unit(0.5, "lines")))+
labs(title="The current outbreak in Bolton is largely in unvaccinated age groups",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group",
caption="Data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeBlackburn.tiff", units="in", width=8, height=6, res=800)
data %>%
#filter(areaType=="nation" & !is.na(caserateroll)) %>%
filter(areaName=="Blackburn with Darwen" & !is.na(caserateroll) & date>=plotfrom) %>%
ggplot()+
geom_tile(aes(x=date, y=age, fill=caserateroll*7))+
scale_fill_paletteer_c("viridis::inferno", name="Weekly cases per 100,000", limits=c(0,1300))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), text=element_text(family="Lato"),
legend.position="top")+
guides(fill=guide_colourbar(ticks=FALSE, title.position = "top", title.hjust = 0.5,
barwidth=unit(10, "lines"), barheight=unit(0.5, "lines")))+
labs(title="The current outbreak in Blackburn is largely in unvaccinated age groups",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases rates in Blackburn by age group",
caption="Data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeBolton2.tiff", units="in", width=8, height=6, res=800)
data %>%
#filter(areaType=="nation" & !is.na(caserateroll)) %>%
filter(areaName=="Bolton" & !is.na(caserateroll) & date>=as.Date("2020-12-15") &
date<=as.Date("2021-01-09")) %>%
ggplot()+
geom_tile(aes(x=date, y=age, fill=caserateroll*7))+
scale_fill_paletteer_c("viridis::inferno", name="Weekly cases per 100,000", limits=c(0,1520))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), text=element_text(family="Lato"),
legend.position="top")+
guides(fill=guide_colourbar(ticks=FALSE, title.position = "top", title.hjust = 0.5,
barwidth=unit(10, "lines"), barheight=unit(0.5, "lines")))+
labs(title="The age profile of Bolton's December/January cases",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group",
caption="Data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeBolton3.tiff", units="in", width=8, height=6, res=800)
data %>%
#filter(areaType=="nation" & !is.na(caserateroll)) %>%
filter(areaName=="Bolton" & !is.na(caserateroll) & date>=as.Date("2020-08-10") &
date<=as.Date("2020-10-23")) %>%
ggplot()+
geom_tile(aes(x=date, y=age, fill=caserateroll*7))+
scale_fill_paletteer_c("viridis::inferno", name="Weekly cases per 100,000", limits=c(0,1520))+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), text=element_text(family="Lato"),
legend.position="top")+
guides(fill=guide_colourbar(ticks=FALSE, title.position = "top", title.hjust = 0.5,
barwidth=unit(10, "lines"), barheight=unit(0.5, "lines")))+
labs(title="The age profile of Bolton's September/October cases",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group",
caption="Data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDCasesxAgeEngLine.tiff", units="in", width=10, height=8, res=500)
data %>%
filter(areaType=="nation" & !is.na(caserateroll) & date>=plotfrom) %>%
ggplot()+
geom_line(aes(x=date, y=caserateroll, colour=age))+
scale_colour_paletteer_d("pals::stepped", name="Age")+
scale_x_date(name="")+
scale_y_continuous(name="Daily new cases per 100,000", limits=c(0,NA))+
theme_classic()+
theme(plot.title=element_text(face="bold"))+
labs(title="Case rates are falling across all age groups",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases in England per 100,000 by age group",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDCasesOver90.tiff", units="in", width=10, height=8, res=500)
data %>%
filter(areaType=="nation" & !is.na(caserateroll) & date>=plotfrom) %>%
ggplot()+
geom_line(aes(x=date, y=caserateroll, colour=age), show.legend=FALSE)+
scale_colour_manual(values=c(rep("Grey80", times=18), "#FF4E86"))+
scale_x_date(name="")+
scale_y_continuous(name="Daily new cases per 100,000")+
theme_classic()+
theme(plot.title=element_text(face="bold"), plot.subtitle=element_markdown())+
labs(title="New COVID-19 cases are falling fastest in the most vulnerable group",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases in England per 100,000 in the **over 90s** compared to **other ages**",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#Compare regions
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),
code=c(1:9))
tiff("Outputs/COVIDCasesxAgeReg.tiff", units="in", width=10, height=11, res=800)
data %>%
filter(areaType=="region" & !is.na(caserateroll) & date>=plotfrom) %>%
ggplot()+
geom_tile(aes(x=date, y=age, fill=caserateroll))+
scale_fill_paletteer_c("viridis::magma", name="Daily cases\nper 100,000")+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
facet_geo(~areaName, grid=mygrid)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.6)), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), text=element_text(family="Late"))+
labs(title="Cases are still confined to younger age groups",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases per 100,000 by age group",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#Look at age patterns in Blackpool
tiff("Outputs/COVIDCasesxAgeBlackpool.tiff", units="in", width=12, height=8, res=500)
data %>%
filter(areaType=="ltla" & !is.na(caserateroll) & date>=plotfrom) %>%
mutate(flag=if_else(areaName=="Blackpool", "x", "y")) %>%
ggplot()+
geom_line(aes(x=date, y=caserateroll, group=areaName), colour="Grey80")+
geom_line(aes(x=date, y=caserateroll, group=areaName, colour=flag), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_manual(values=c("#FF4E86", "transparent"))+
facet_wrap(~age)+
theme_classic()+
theme(plot.title=element_text(face="bold"), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.subtitle=element_markdown())+
labs(title="Blackpool's COVID cases are older than then average",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases per 100,000 in Blackpool compared to other Local Authorities in England",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#Calculate mean age of cases
meanages <- data %>%
mutate(point.age=case_when(
age=="0-4" ~ 2.5, age=="5-9" ~ 7.5, age=="10-14" ~ 12.5, age=="15-19" ~ 17.5,
age=="20-24" ~ 22.5, age=="25-29" ~ 27.5, age=="30-34" ~ 32.5,
age=="35-39" ~ 37.5, age=="40-44" ~ 42.5, age=="45-49" ~ 47.5,
age=="50-54" ~ 52.5, age=="55-59" ~ 57.5, age=="60-64" ~ 62.5,
age=="65-69" ~ 67.5, age=="70-74" ~ 72.5, age=="75-79" ~ 77.5,
age=="80-84" ~ 82.5, age=="85-89" ~ 87.5, age=="90+" ~ 92.5
)) %>%
group_by(areaType, areaCode, areaName, date) %>%
summarise(mean.age=weighted.mean(point.age, casesroll), casesroll=sum(casesroll),
pop=sum(pop)) %>%
mutate(caserateroll=casesroll*100000/pop) %>%
ungroup()
tiff("Outputs/COVIDCasesxAgeBlackpool2.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_line(data=meanages, aes(x=date, y=mean.age, group=areaName),
colour="Grey80")+
geom_line(data=subset(meanages, areaName=="Blackpool"),
aes(x=date, y=mean.age, group=areaName), colour="#FF4E86")+
scale_x_date(name="", limits=c(plotfrom, NA))+
scale_y_continuous(name="Mean age")+
theme_classic()+
theme(plot.title=element_text(face="bold"), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.subtitle=element_markdown())+
labs(title="Blackpool's cases are older than then average",
subtitle="Average age of new confirmed COVID-19 cases in Blackpool compared to other Local Authorities in England",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDCasesxMeanAge.tiff", units="in", width=8, height=6, res=500)
meanages %>%
filter(date==as.Date("2020-10-31") & areaType=="ltla") %>%
mutate(flag=caserateroll+mean.age) %>%
ggplot()+
geom_point(aes(x=caserateroll, y=mean.age), colour="#FF4E86")+
gghighlight(flag>105, caserateroll>68, mean.age>42)+
scale_x_continuous(name="Daily cases per 100,000")+
scale_y_continuous(name="Mean age")+
#scale_colour_paletteer_d("LaCroixColoR::paired")+
theme_classic()+
theme(plot.title=element_text(face="bold"))+
labs(title="Blackpool has more, older, COVID-19 cases",
subtitle="Rolling 7-day average of daily new cases per 100,000 plotted against their average age*",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#regional simple lines
tiff("Outputs/COVIDCasesxAgeRegLine.tiff", units="in", width=9, height=11, res=500)
shortdata %>%
filter(areaType=="region" & date>=plotfrom) %>%
ggplot()+
geom_line(aes(x=date, y=caserateroll, colour=ageband))+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
facet_geo(~areaName, grid=mygrid)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)))+
labs(title="COVID-19 case rates are falling at different rates across England",
subtitle="Rolling 7-day average of confirmed new cases by age",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDCasesxAgeRegStream.tiff", units="in", width=9, height=11, res=500)
shortdata %>%
filter(areaType=="region" & date>=plotfrom) %>%
ggplot()+
geom_stream(aes(x=date, y=caserateroll, fill=ageband))+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000", labels=abs, breaks=c(-200,0,200))+
scale_fill_paletteer_d("awtools::a_palette", name="Age")+
facet_geo(~areaName, grid=mygrid)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)))+
labs(title="COVID-19 case rates continue to fall across England in all age groups",
subtitle="Rolling 7-day average of confirmed new cases by age",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDCasesxAgeEngStream.tiff", units="in", width=9, height=6, res=500)
shortdata %>%
filter(areaType=="nation" & date>=plotfrom) %>%
ggplot()+
geom_stream(aes(x=date, y=caserateroll, fill=ageband))+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000", labels=abs)+
scale_fill_paletteer_d("awtools::a_palette", name="Age")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), text=element_text(family="Lato"))+
labs(title="COVID-19 cases have been getting older in recent months",
subtitle="Rolling 7-day average of confirmed new cases in England by age",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeEng.tiff", units="in", width=8, height=6, res=800)
data %>%
filter(areaType=="nation" & !is.na(caserateroll)) %>%
ggplot()+
geom_tile(aes(x=date, y=age, fill=caserateroll*7))+
scale_fill_paletteer_c("viridis::inferno", name="Weekly cases per 100,000")+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), text=element_text(family="Lato"),
legend.position="top")+
guides(fill=guide_colourbar(ticks=FALSE, title.position = "top", title.hjust = 0.5,
barwidth=unit(10, "lines"), barheight=unit(0.5, "lines")))+
labs(title="The age profile of current COVID cases is very different to\nprevious waves",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group",
caption="Data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDCasesxAgeEngRecent.tiff", units="in", width=8, height=6, res=800)
data %>%
filter(areaType=="nation" & !is.na(caserateroll) & date>as.Date("2021-04-01")) %>%
ggplot()+
geom_tile(aes(x=date, y=age, fill=caserateroll*7))+
scale_fill_paletteer_c("viridis::inferno", name="Weekly cases per 100,000")+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.5)), text=element_text(family="Lato"),
legend.position="top")+
guides(fill=guide_colourbar(ticks=FALSE, title.position = "top", title.hjust = 0.5,
barwidth=unit(10, "lines"), barheight=unit(0.5, "lines")))+
labs(title="The age profile of current COVID cases is very different to\nprevious waves",
subtitle="Rolling 7-day average of confirmed new COVID-19 cases rates in England by age group",
caption="Data from coronavirus.data.gov.uk\nPlot by @VictimOfMaths")
dev.off()
temp <- data %>% filter(areaType=="nation") %>%
mutate(flag=case_when(
age %in% c("0-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34", "35-39", "40-44",
"45-49") ~ "<50",
TRUE ~ ">50")) %>%
group_by(date, flag) %>%
summarise(cases=sum(cases)) %>%
group_by(date) %>%
mutate(total=sum(cases),
caseprop=cases*100/total) %>%
ungroup()
================================================
FILE: Heatmaps/COVIDPHEPositivity.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(lubridate)
library(ggtext)
library(extrafont)
library(ragg)
library(paletteer)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
source <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1020037/Weekly_Influenza_and_COVID19_report_data_W38_v2.xlsx"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data_m <- read_excel(temp, sheet="Figure 7. Positivity by age", range="C121:L174") %>%
mutate(date=seq.Date(from=as.Date("2020-09-14"), by="weeks", length.out=nrow(.))) %>%
gather(age, positivity, c(1:ncol(.)-1)) %>%
mutate(age=gsub("_", " to ", age), sex="Male")
data_f <- read_excel(temp, sheet="Figure 7. Positivity by age", range="C177:L230") %>%
mutate(date=seq.Date(from=as.Date("2020-09-14"), by="weeks", length.out=nrow(.))) %>%
gather(age, positivity, c(1:ncol(.)-1)) %>%
mutate(age=gsub("_", " to ", age), sex="Female")
data <- bind_rows(data_m, data_f) %>%
mutate(age=factor(age, levels=c("0 to 4", "5 to 9", "10 to 19", "20 to 29",
"30 to 39", "40 to 49", "50 to 59",
"60 to 69", "70 to 79", "80+")),
positivity=positivity/100)
agg_tiff("Outputs/COVIDPositivityxAgexSex.tiff", units="in", width=9, height=6, res=800)
ggplot(data %>% filter(date>as.Date("2021-05-25")), aes(x=date, y=positivity, colour=sex))+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Positivity", labels=label_percent(accuracy=1))+
scale_colour_manual(values=c("#00cc99", "#6600cc"))+
facet_wrap(~age)+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="Positivity rates are consistently higher among men",
subtitle="Rolling 7-day average of COVID test positivity rates in men and women for pillar 2 (community) testing in England, by age.",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDPHESurveillance.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ggtext)
library(ggridges)
library(paletteer)
#Surveillance reports taken from:
#https://www.gov.uk/government/publications/national-covid-19-surveillance-reports
#Confusingly, PHE number them by the week of publication, which is 1 week later
#than the data relates to. Numbers here relate to actual weeks of data.
#As of 28th August, PHE are actually publishing a time series of case numbers by age and sex
temp1 <- tempfile()
source1 <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/923669/Weekly_COVID19_report_data_w40.xlsx"
temp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode="wb")
case.m <- read_excel(temp1, sheet="Figure 2b Cases by age and sex ", range="B45:L73",
col_names=FALSE)
colnames(case.m) <- c("Week", "0-4", "5-9", "10-19", "20-29", "30-39", "40-49",
"50-59", "60-69", "70-79", "80+")
case.m$sex <- "Male"
case.m <- gather(case.m, age, cases, c(2:11))
case.m$cases <- as.character(case.m$cases)
case.f <- read_excel(temp1, sheet="Figure 2b Cases by age and sex ", range="B12:L40",
col_names=FALSE)
colnames(case.f) <- c("Week", "0-4", "5-9", "10-19", "20-29", "30-39", "40-49",
"50-59", "60-69", "70-79", "80+")
case.f$sex <- "Female"
case.f <- gather(case.f, age, cases, c(2:11))
case.f$cases <- as.character(case.f$cases)
cases <- bind_rows(case.m, case.f)
#Bring in LA populations
temp2 <- tempfile()
source2 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode="wb")
pop <- as.data.frame(t(read_excel(temp2, sheet="MYE2-All", range="E9:CQ9", col_names=FALSE)))
pop$age <- c(0:90)
pop$ageband <- case_when(
pop$age<5 ~ "0-4",
pop$age<10 ~ "5-9",
pop$age<20 ~ "10-19",
pop$age<30 ~ "20-29",
pop$age<40 ~ "30-39",
pop$age<50 ~ "40-49",
pop$age<60 ~ "50-59",
pop$age<70 ~ "60-69",
pop$age<80 ~ "70-79",
TRUE ~ "80+"
)
pop <- pop %>%
group_by(ageband) %>%
summarise(pop=sum(V1))
cases <- merge(cases, pop, by.x="age", by.y="ageband", all.x=TRUE)
cases$cases <- if_else(cases$cases=="*", "0", cases$cases)
cases$cases <- if_else(cases$cases=="-", "0", cases$cases)
cases$cases <- if_else(is.na(cases$cases), "0", cases$cases)
cases$cases <- as.numeric(cases$cases)
cases$caserate <- cases$cases*100000/cases$pop
cases$age <- factor(cases$age, levels=c("0-4", "5-9", "10-19", "20-29", "30-39",
"40-49", "50-59", "60-69", "70-79", "80+"))
#Heatmaps of cases by age: rates
###############################
#Need to split populations out by sex as there are currently wrong
###############################
tiff("Outputs/COVIDNewCasesHeatmap.tiff", units="in", width=13, height=4, res=500)
ggplot(cases)+
geom_tile(aes(x=Week, y=age, fill=caserate))+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("viridis::magma", name="Cases per 100,000")+
facet_wrap(~sex)+
theme_classic()+
labs(title="New COVID-19 cases by age during the pandemic",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDNewCasesHeatmapRecent.tiff", units="in", width=10, height=5, res=500)
ggplot(subset(cases, Week>=26))+
geom_tile(aes(x=Week, y=age, fill=caserate))+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("viridis::magma", name="Cases per 100,000")+
scale_x_continuous(breaks=c(25,27,29,31,33,35,37,39))+
facet_wrap(~sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Cases are concentrated in young people, but now rising in older age groups",
subtitle="Rates of new COVID-19 cases in England by age during the pandemic",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#Absolute numbers
tiff("Outputs/COVIDNewCasesHeatmapAbs.tiff", units="in", width=13, height=4, res=500)
ggplot(cases)+
geom_tile(aes(x=Week, y=age, fill=cases))+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("viridis::magma", name="Confirmed cases")+
facet_wrap(~sex)+
theme_classic()+
labs(title="COVID-19 cases are currently concentrated in working ages",
subtitle="New confirmed COVID-19 cases by age in England",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
library(ggstream) #devtools::install_github("davidsjoberg/ggstream")
tiff("Outputs/COVIDCasesStreamgraphxSex.tiff", units="in", width=10, height=6, res=500)
ggplot(cases, aes(x=Week, y=cases, fill=age))+
geom_stream(bw=0.2)+
scale_fill_paletteer_d("RColorBrewer::RdYlGn", name="Age", direction=-1)+
scale_y_continuous(name="New cases per week", breaks=c(-15000,-10000,-5000,0,5000,10000,15000),
labels=c("15,000", "10,000", "5,000", "0", "5,000", "10,000", "15,000"))+
#scale_x_date(name="", date_breaks="1 month", date_labels="%B",
# limits=c(as.Date("2020-03-01"), max(cases$Date)))+
facet_wrap(~sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="The rise in COVID-19 cases is greatest in the under-40s",
subtitle="Confirmed new cases in England by age band",
caption="Date from PHE | Plot by @VictimOfMaths")
dev.off()
#Combined sex version
tiff("Outputs/COVIDCasesStreamgraph.tiff", units="in", width=10, height=6, res=500)
cases %>%
group_by(Week, age) %>%
summarise(cases=sum(cases)) %>%
ggplot(aes(x=Week, y=cases, fill=age))+
geom_stream(bw=0.2)+
scale_fill_paletteer_d("RColorBrewer::RdYlGn", name="Age", direction=-1)+
scale_y_continuous(name="New cases per week", breaks=c(-15000,-10000,-5000,0,5000,10000,15000),
labels=c("15,000", "10,000", "5,000", "0", "5,000", "10,000", "15,000"))+
#scale_x_date(name="", date_breaks="1 month", date_labels="%B",
# limits=c(as.Date("2020-03-01"), max(cases$Date)))+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="COVID-19 cases are rising in almost all age groups",
subtitle="Confirmed new cases in England by age band",
caption="Date from PHE | Plot by @VictimOfMaths")
dev.off()
#Analysis of positivity data
#Overall by pillar
pos.pillars <- read_excel(temp1, sheet="Figure 1. Pillar 1+2 epicurve", range="B9:F43",
col_names=FALSE)
colnames(pos.pillars) <- c("Week", "P1cases", "P2cases", "P1pos", "P2pos")
pos.pillars <- gather(pos.pillars, Pillar, posrate, c(4,5))
pos.pillars$posrate <- as.numeric(if_else(pos.pillars$posrate=="-", "NA", pos.pillars$posrate))
tiff("Outputs/COVIDPillarsPosRate.tiff", units="in", width=8, height=6, res=500)
ggplot(pos.pillars, aes(x=Week, y=posrate/100, colour=Pillar))+
geom_line(show.legend=FALSE)+
scale_colour_paletteer_d("NineteenEightyR::malibu")+
scale_y_continuous(name="Proportion of tests which are positive",
labels = scales::percent_format(accuracy = 1))+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="The positivity rate of Pillar 1 and 2 tests is still rising",
subtitle="Weekly positivity rates for Pillar 1 and Pillar 2 tests in England",
caption="Date from PHE | Visualisation by @VictimOfMaths")
dev.off()
#By age and sex
pos.age.m <- read_excel(temp1, sheet="Figure 6. Positivity by agegrp", range="B86:I120",
col_names=FALSE)
colnames(pos.age.m) <- c("Week", "0-4", "5-14", "15-44", "45-64", "65-74", "75-84", "85+")
pos.age.m <- gather(pos.age.m, age, posrate, c(2:8))
pos.age.m$posrate <- as.numeric(if_else(pos.age.m$posrate=="-", "NA", pos.age.m$posrate))
pos.age.m$sex <- "Male"
pos.age.f <- read_excel(temp1, sheet="Figure 6. Positivity by agegrp", range="B124:I158",
col_names=FALSE)
colnames(pos.age.f) <- c("Week", "0-4", "5-14", "15-44", "45-64", "65-74", "75-84", "85+")
pos.age.f <- gather(pos.age.f, age, posrate, c(2:8))
pos.age.f$posrate <- as.numeric(if_else(pos.age.f$posrate=="-", "NA", pos.age.f$posrate))
pos.age.f$sex <- "Female"
pos.age <- bind_rows(pos.age.m, pos.age.f)
pos.age$age <- factor(pos.age$age, levels=c("0-4", "5-14", "15-44", "45-64", "65-74",
"75-84", "85+"))
tiff("Outputs/COVIDPosRatexAge.tiff", units="in", width=10, height=6, res=500)
ggplot(pos.age, aes(x=Week, y=posrate/100, colour=age))+
geom_line()+
scale_colour_paletteer_d(pal="awtools::a_palette",name="Age")+
scale_y_continuous(name="Proportion of tests which are positive",
labels = scales::percent_format(accuracy = 1))+
xlim(c(18,max(pos.age$Week)+1))+
facet_wrap(~sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="The positivity rate of tests is rising in adults",
subtitle="Weekly positivity rates for Pillar 2 tests in England by age group",
caption="Date from PHE | Visualisation by @VictimOfMaths")
dev.off()
#By region
================================================
FILE: Heatmaps/COVIDPHESurveillance2.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ggtext)
library(ggridges)
library(ggstream)
library(paletteer)
library(lubridate)
#Surveillance reports taken from:
#https://www.gov.uk/government/statistics/national-flu-and-covid-19-surveillance-reports
#Confusingly, PHE number them by the week of publication, which is 1 week later
#than the data relates to. Numbers here relate to actual weeks of data.
temp1 <- tempfile()
source1 <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/928752/Weekly_Influenza_and_COVID19_report_data_W43.xlsx"
temp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode="wb")
data.age <- read_excel(temp1, sheet=5, range="B9:L25")
colnames(data.age) <- c("week", "0-4", "5-9", "10-19", "20-29", "30-39", "40-49", "50-59",
"60-69", "70-79", "80+")
data.age <- gather(data.age, age, caserate, c(2:11))
#Bring in populations
temp2 <- tempfile()
source2 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode="wb")
pop <- as.data.frame(t(read_excel(temp2, sheet="MYE2-All", range="E9:CQ9", col_names=FALSE)))
pop$age <- c(0:90)
pop$ageband <- case_when(
pop$age<5 ~ "0-4",
pop$age<10 ~ "5-9",
pop$age<20 ~ "10-19",
pop$age<30 ~ "20-29",
pop$age<40 ~ "30-39",
pop$age<50 ~ "40-49",
pop$age<60 ~ "50-59",
pop$age<70 ~ "60-69",
pop$age<80 ~ "70-79",
TRUE ~ "80+"
)
pop <- pop %>%
group_by(ageband) %>%
summarise(pop=sum(V1))
data.age <- merge(data.age, pop, by.x="age", by.y="ageband", all.x=TRUE)
data.age$cases <- data.age$caserate*data.age$pop/100000
data.age$age <- factor(data.age$age, levels=c("0-4", "5-9", "10-19", "20-29", "30-39", "40-49",
"50-59", "60-69", "70-79", "80+"))
data.age$weeklab <- as.Date("2020-01-03")+days(7*(data.age$week-1))
tiff("Outputs/COVIDNewCasesHeatmapRecent.tiff", units="in", width=7, height=5, res=500)
ggplot(data.age)+
geom_tile(aes(x=weeklab, y=age, fill=caserate))+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("viridis::magma", name="Cases\nper 100,000")+
scale_x_date(name="Week ending", breaks=seq.Date(from=as.Date("2020-07-03"),
to=max(data.age$weeklab), by="week"),
date_labels="%d %b")+
theme_classic()+
theme(axis.text.x=element_text(angle=45, hjust=1))+
labs(title="Cases numbers are falling in young people, but are rising elsewhere",
subtitle="Rates of new COVID-19 cases in England by age during the pandemic",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#Absolute numbers
tiff("Outputs/COVIDNewCasesHeatmapAbsRecent.tiff", units="in", width=7, height=5, res=500)
ggplot(data.age)+
geom_tile(aes(x=weeklab, y=age, fill=cases))+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("viridis::magma", name="Cases per day")+
scale_x_date(name="Week ending", breaks=seq.Date(from=as.Date("2020-07-03"),
to=max(data.age$weeklab), by="week"),
date_labels="%d %b")+
theme_classic()+
theme(axis.text.x=element_text(angle=45, hjust=1))+
labs(title="Cases numbers are falling in young people, but are rising elsewhere",
subtitle="Rates of new COVID-19 cases in England by age during the pandemic",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#Streamgraph
tiff("Outputs/COVIDCasesStreamgraphRecent.tiff", units="in", width=10, height=6, res=500)
ggplot(data.age, aes(x=weeklab, y=cases, fill=age))+
geom_stream(bw=0.5)+
scale_y_continuous(name="New cases per week",
breaks=c(-40000, -30000, -20000, -10000,0,10000,
20000, 30000, 40000),
labels=abs)+
scale_fill_paletteer_d("RColorBrewer::RdYlGn", name="Age", direction=-1)+
scale_x_date(name="Week ending", breaks=seq.Date(from=as.Date("2020-07-03"),
to=max(data.age$weeklab), by="week"),
date_labels="%d %b")+
theme_classic()+
theme(axis.text.x=element_text(angle=45, hjust=1))+
labs(title="Cases are rising across older age groups",
subtitle="Confirmed new COVID-19 cases in England by age band",
caption="Data from Public Health England | Plot by @VictimOfMaths")
dev.off()
#Analysis of positivity data
#By age and sex
pos.age.m <- read_excel(temp1, sheet="Figure 6. Positivity by agegrp", range="B48:L63",
col_names=FALSE)
colnames(pos.age.m) <- c("Week", "0-4", "5-9", "10-19", "20-29", "30-39", "40-49", "50-59",
"60-69", "70-79", "80+")
pos.age.m <- gather(pos.age.m, age, posrate, c(2:11))
pos.age.m$sex <- "Male"
pos.age.f <- read_excel(temp1, sheet="Figure 6. Positivity by agegrp", range="B67:L82",
col_names=FALSE)
colnames(pos.age.f) <- c("Week", "0-4", "5-9", "10-19", "20-29", "30-39", "40-49", "50-59",
"60-69", "70-79", "80+")
pos.age.f <- gather(pos.age.f, age, posrate, c(2:11))
pos.age.f$sex <- "Female"
pos.age <- bind_rows(pos.age.m, pos.age.f)
pos.age$age <- factor(pos.age$age, levels=c("0-4", "5-9", "10-19", "20-29", "30-39", "40-49",
"50-59", "60-69", "70-79", "80+"))
tiff("Outputs/COVIDPosRatexAge.tiff", units="in", width=10, height=6, res=500)
ggplot(pos.age, aes(x=Week, y=posrate/100, colour=age))+
geom_line()+
scale_colour_paletteer_d("RColorBrewer::RdYlGn", name="Age", direction=-1)+
scale_y_continuous(name="Proportion of tests which are positive",
labels = scales::percent_format(accuracy = 1))+
xlim(c(26,max(pos.age$Week)+1))+
facet_wrap(~sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="The positivity rate of tests is still rising",
subtitle="Weekly positivity rates for Pillar 2 tests in England by age group",
caption="Date from PHE | Visualisation by @VictimOfMaths")
dev.off()
#By region
================================================
FILE: Heatmaps/COVIDPHEVaxSurveillance.R
================================================
rm(list=ls())
library(tidyverse)
library(readxl)
library(lubridate)
library(extrafont)
library(ragg)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#All case data from the latest PHE vaccine surveillance report
#https://www.gov.uk/government/publications/covid-19-vaccine-surveillance-report
#Cases
cases <- data.frame(
age=c("Under 18", "18-29", "30-39", "40-49", "50-59", "60-69", "70-79", "80+"),
Unlinked=c(15901, 19529, 12452, 8930, 6868, 3657, 2034, 1124),
Unvaccinated=c(141676, 53187, 33986, 15106, 7552, 2650, 910, 545),
Fully_vaccinated=c(757, 32533, 43004, 67349, 67652, 38119, 22270, 10087)
) %>%
mutate(metric="cases")
deaths28 <- data.frame(
age=c("Under 18", "18-29", "30-39", "40-49", "50-59", "60-69", "70-79", "80+"),
Unlinked=c(0,1,2,3,3,7,2,7),
Unvaccinated=c(3,13,31,54,100,115,129,155),
Fully_vaccinated=c(0,3,8,27,71,194,428,928)
) %>%
mutate(metric="deaths")
admissions <- data.frame(
age=c("Under 18", "18-29", "30-39", "40-49", "50-59", "60-69", "70-79", "80+"),
Unlinked=c(25,14,16,14,10,7,3,1),
Unvaccinated=c(404,387,516,497,421,328,194,144),
Fully_vaccinated=c(0,80,118,220,406,571,873,965)
) %>%
mutate(metric="admissions")
rawdata <- bind_rows(cases, admissions, deaths28)
#Bring in vaccinated and NIMS/ONS population data - use figures from week 32 (to allow for 2 weeks post 2nd jab by
#~mid-point of 4 week analysis window)
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/08/COVID-19-weekly-announced-vaccinations-12-August-2021.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
vaxed1st <- read_excel(temp, sheet="NHS Region", range="D12:Q13") %>%
mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,
`50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>%
select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>%
gather(age, vax1pop)
vaxed2nd <- read_excel(temp, sheet="NHS Region", range="U12:AH13") %>%
mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,
`50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>%
select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>%
gather(age, vax2pop)
NIMSpop <- read_excel(temp, sheet="Population estimates (NIMS)", range="F13:S14") %>%
mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,
`50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>%
select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>%
gather(age, pop_NIMS)
ONSpop <- read_excel(temp, sheet="Population estimates (ONS 2020)", range="B16:D29", col_names=FALSE) %>%
select(-2) %>%
set_names(c("age", "pop_ONS")) %>%
spread(age, pop_ONS) %>%
mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,
`50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>%
select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>%
gather(age, pop_ONS)
#Alternative approach to calculating vaxed populations from dashboard
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dashboarddata <- read.csv(temp) %>%
mutate(age=case_when(
age=="16_17" ~ "16-17",
age %in% c("18_24", "25_29") ~ "18-29",
age %in% c("30_34", "35_39") ~ "30-39",
age %in% c("40_44", "45_49") ~ "40-49",
age %in% c("50_54", "55_59") ~ "50-59",
age %in% c("60_64", "65_69") ~ "60-69",
age %in% c("70_74", "75_79") ~ "70-79",
age %in% c("80_84", "85_89", "90+") ~ "80+",
TRUE ~ age)) %>%
group_by(age, date) %>%
summarise(cumPeopleVaccinatedSecondDoseByVaccinationDate=sum(cumPeopleVaccinatedSecondDoseByVaccinationDate),
cumPeopleVaccinatedFirstDoseByVaccinationDate=sum(cumPeopleVaccinatedFirstDoseByVaccinationDate)) %>%
ungroup() %>%
#lag second doses by 2 weeks
group_by(age) %>%
arrange(date) %>%
mutate(dose2=lag(cumPeopleVaccinatedSecondDoseByVaccinationDate, 14)) %>%
#filter out weeks 32-35 to match PHE data
filter(date>=as.Date("2021-08-09") & date<=as.Date("2021-09-05")) %>%
#calculate average populations across the study period
summarise(singledose=mean(cumPeopleVaccinatedFirstDoseByVaccinationDate),
doubledose=mean(dose2))
#Because of reasons, PHE's NIMS figures in the dashboard are not (in spite of the field name) by vaccination date,
#The data reflects only the NIMS pop estimates on the day that you download the data.
#So, here's a big old faff with the archive data to get the actual figures
callarchive <- function(funcdate) {
filepath <- paste0("https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv&release=",
as.character(as.Date(funcdate)+days(1)))
temp <- curl_download(url=filepath, destfile=temp, quiet=FALSE, mode="wb")
file <- read.csv(temp) %>%
select(date, age, VaccineRegisterPopulationByVaccinationDate) %>%
filter(date==as.Date(funcdate))
return(file)
}
#Without doubt there is a better way to do this, probably involving lists
archivepops <- bind_rows(callarchive("2021-07-26"), callarchive("2021-07-27"),
callarchive("2021-07-28"), callarchive("2021-07-29"),
callarchive("2021-07-30"), callarchive("2021-07-31"),
callarchive("2021-08-01"), callarchive("2021-08-02"),
callarchive("2021-08-03"), callarchive("2021-08-04"),
callarchive("2021-08-05"), callarchive("2021-08-06"),
callarchive("2021-08-07"), callarchive("2021-08-08"),
callarchive("2021-08-09"), callarchive("2021-08-10"),
callarchive("2021-08-11"), callarchive("2021-08-12"),
callarchive("2021-08-13"), callarchive("2021-08-14"),
callarchive("2021-08-15"), callarchive("2021-08-16"),
callarchive("2021-08-17"), callarchive("2021-08-18"),
callarchive("2021-08-19"), callarchive("2021-08-20"),
callarchive("2021-08-21"), callarchive("2021-08-22")) %>%
mutate(age=case_when(
age=="16_17" ~ "16-17",
age %in% c("18_24", "25_29") ~ "18-29",
age %in% c("30_34", "35_39") ~ "30-39",
age %in% c("40_44", "45_49") ~ "40-49",
age %in% c("50_54", "55_59") ~ "50-59",
age %in% c("60_64", "65_69") ~ "60-69",
age %in% c("70_74", "75_79") ~ "70-79",
age %in% c("80_84", "85_89", "90+") ~ "80+",
TRUE ~ age)) %>%
group_by(age, date) %>%
summarise(VaccineRegisterPopulationByVaccinationDate=sum(VaccineRegisterPopulationByVaccinationDate)) %>%
ungroup() %>%
#lag second doses by 2 weeks
group_by(age) %>%
arrange(date) %>%
mutate(dose2pop=lag(VaccineRegisterPopulationByVaccinationDate, 14)) %>%
#filter out weeks 32-35 to match PHE data
filter(date>=as.Date("2021-08-09") & date<=as.Date("2021-09-05")) %>%
#calculate average populations across the study period
summarise(singledoseNIMSpop=mean(VaccineRegisterPopulationByVaccinationDate),
doubledoseNIMSpop=mean(dose2pop))
data <- merge(rawdata, vaxed1st) %>%
merge(vaxed2nd) %>%
merge(NIMSpop) %>%
merge(ONSpop) %>%
merge(dashboarddata, all=TRUE) %>%
merge(archivepops, all=TRUE) %>%
mutate(singledose=if_else(age=="Under 18", vax1pop, singledose),
doubledose=if_else(age=="Under 18", vax2pop, doubledose),
unvaxpop_ONS=pop_ONS-singledose, unvaxpop_NIMS=pop_NIMS-singledose,
age=factor(age, levels=c("Under 18", "18-29", "30-39", "40-49", "50-59", "60-69", "70-79", "80+")))
#Graphic of difference in estimates of unvaxed pop
agg_tiff("Outputs/EngPopUnvaxEstimates.tiff", units="in", width=9, height=6, res=800)
data %>% filter(metric=="cases") %>%
mutate(popdiff_abs=unvaxpop_ONS-unvaxpop_NIMS,
popdiff_rel=popdiff_abs/unvaxpop_NIMS,
labpos=if_else(popdiff_abs<0, 1.1, -0.1)) %>%
ggplot()+
geom_col(aes(x=popdiff_abs, y=age), fill="aquamarine4")+
geom_vline(aes(xintercept=0), colour="Grey60")+
geom_text(aes(x=popdiff_abs, y=age, label=paste0(if_else(popdiff_abs>0, "+", ""),
round(popdiff_rel*100, 0), "%"),
hjust=labpos), size=rel(3.6))+
scale_x_continuous(limits=c(-1800000, 1800000), breaks=c(-1500000, -1000000, -500000, 0, 500000,
1000000, 1500000),
labels=c("-1.5m", "-1m", "-0.5m", "0", "+0.5m", "+1m", "+1.5m"),
name="Difference between using ONS and NIMS denominators")+
scale_y_discrete(name="Age group")+
annotate("text", x=-1000000, y=8, label="ONS estimates\nlower than NIMS",
colour="Grey60", size=rel(5), family="Lato")+
annotate("text", x=1000000, y=8, label="ONS estimates\nhigher than NIMS",
colour="Grey60", size=rel(5), family="Lato")+
theme_custom()+
labs(title="Estimating the number of unvaccinated people is hard",
subtitle="Difference between estimates of the number of people in England who have not yet received two COVID vaccine doses\nbased on NIMS and ONS population estimates. Bars represent the absolute differences, labels the relative difference.",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
plotdata <- data %>%
rowwise() %>%
mutate(unvaxrate_NIMS=Unvaccinated*100000/unvaxpop_NIMS,
unvaxrate_ONS=Unvaccinated*100000/unvaxpop_ONS,
vaxrate=Fully_vaccinated*100000/doubledose, minunvaxrate=min(unvaxrate_NIMS, unvaxrate_ONS),
maxunvaxrate=max(unvaxrate_NIMS, unvaxrate_ONS)) %>%
gather(measure, rate, c(16:20)) %>%
select(age, measure, rate, metric)
plotdata2 <- data %>%
rowwise() %>%
mutate(unvaxrate_NIMS=Unvaccinated*100000/unvaxpop_NIMS,
unvaxrate_ONS=Unvaccinated*100000/unvaxpop_ONS) %>%
gather(measure, rate, c("unvaxrate_NIMS", "unvaxrate_ONS"))
#Updated version of the plot in the PHE report (Figure 2)
#Cases from PHE report, fully vaccinated counts from dashboard (accounting for changes over time),
#ONS population figures lifted from NHS England spreadsheet,
#NIMS populations for u18s taken from NHS England spreadsheet,
#NIMS populations for adults taken from dashboard (accountinf for changes over time).
agg_tiff("Outputs/COVIDCaseRatesxAgexVax.tiff", units="in", width=9, height=6, res=800)
ggplot()+
geom_col(data=plotdata %>% filter(metric=="cases" & measure %in% c("vaxrate", "maxunvaxrate")),
aes(x=rate, y=age, fill=measure), position="dodge")+
geom_col(data=plotdata %>% filter(metric=="cases" & measure %in% c("vaxrate", "minunvaxrate")),
aes(x=rate, y=age, fill=measure), position="dodge")+
geom_point(data=plotdata2 %>% filter(metric=="cases"),
aes(x=rate, y=age, colour=measure), position=position_nudge(y=-0.225), size=5.8, shape="|")+
scale_x_continuous(name="Confirmed cases per 100,000 people")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("Grey70", "Grey30", "Red"), breaks=c("vaxrate", "minunvaxrate"),
labels=c("Fully vaccinated", "Unvaccinated"), name="")+
scale_colour_manual(values=c("Grey90", "Black"), labels=c("Based on NIMS", "Based on ONS"),
name="")+
theme_custom()+
theme(legend.position="top", plot.subtitle=element_markdown())+
labs(title="Choice of population data has a huge impact on estimates of vaccine effectiveness",
subtitle="Rates of confirmed COVID cases between 8th August and 5th September 2021 by age and vaccination status.
Light grey bars represent the difference in estimated case rates in unvaccinated groups between ONS and NIMS estimates.",
caption="Data from PHE & NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDPHEVaxxAgexSex.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(extrafont)
library(ggtext)
library(ragg)
library(lubridate)
library(gganimate)
#Download data from PHE surveillance report
#https://www.gov.uk/government/statistics/national-flu-and-covid-19-surveillance-reports-2021-to-2022-season
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1027448/Weekly_Influenza_and_COVID19_report_data_w42.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
data <- read_excel(temp, sheet="Figure 63&64. COVID Vac Age Sex", range="B13:N29", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(data) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
data <- data %>%
rowwise() %>%
mutate(Male_Unvax=Male_Pop-Male_Vax1,
Female_Unvax=Female_Pop-Female_Vax1,
Male_Vax1Only=Male_Vax1-Male_Vax2,
Female_Vax1Only=Female_Vax1-Female_Vax2) %>%
ungroup() %>%
select(Age, Male_Unvax, Female_Unvax, Male_Vax1Only, Female_Vax1Only, Male_Vax2, Female_Vax2)
data_long <- pivot_longer(data, cols=c(2:7), names_to=c("Sex", "Measure"), names_sep="_",
values_to="Value") %>%
mutate(Value=if_else(Sex=="Male", -Value, Value),
Age=case_when(
Age=="Under 12" ~ "<12",
Age=="12 to under 16" ~ "12-15",
Age=="16 to under 18" ~ "16-17",
Age=="18 to under 20" ~ "18-19",
Age=="20 to under 25" ~ "20-24",
Age=="25 to under 30" ~ "25-29",
Age=="30 to under 35" ~ "30-34",
Age=="35 to under 40" ~ "35-39",
Age=="40 to under 45" ~ "40-44",
Age=="45 to under 50" ~ "45-49",
Age=="50 to under 55" ~ "50-54",
Age=="55 to under 60" ~ "55-59",
Age=="60 to under 65" ~ "60-64",
Age=="65 to under 70" ~ "65-69",
Age=="70 to under 75" ~ "70-74",
Age=="75 to under 80" ~ "75-79",
TRUE ~ "80+"),
Age=factor(Age, levels=c("<12", "12-15", "16-17", "18-19", "20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59", "60-64", "65-69", "70-74", "75-79",
"80+")),
SexMeasure=paste0(Sex, Measure))
agg_tiff("Outputs/COVIDVaxxAgexSex.tiff", units="in", width=8, height=7, res=800)
ggplot(data_long, aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),
labels=c("5m", "2.5m", "0", "2.5m", "5m"),
limits=c(-5000000, 5000000), name="")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("Grey80", "#7dffdd", "#00cc99", "Grey80", "#be7dff", "#6600cc"))+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.6)), plot.subtitle=element_markdown())+
labs(title="Vaccine delivery in England by age and sex",
subtitle="The number of people who are unvaccinated, men with one or two doses and women with one or two doses",
caption="Data from PHE, population figures from NIMS\nPlot by @VictimOfMaths")+
annotate("text", x=-4000000, y=9, label="Men", colour="#6600cc", size=rel(6),
fontface="bold", family="Lato")+
annotate("text", x=4000000, y=9, label="Women", colour="#00cc99", size=rel(6),
fontface="bold", family="Lato")
dev.off()
agg_tiff("Outputs/COVIDVaxxAgexSexv2.tiff", units="in", width=8, height=7, res=800)
ggplot(data_long %>%
mutate(SexMeasure=factor(SexMeasure, levels=c("FemaleVax2", "FemaleVax1Only", "FemaleUnvax",
"MaleVax2", "MaleVax1Only", "MaleUnvax"))),
aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
geom_segment(aes(x=0, xend=0, y=0.5, yend=17.5))+
scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),
labels=c("5m", "2.5m", "0", "2.5m", "5m"),
limits=c(-5000000, 5000000), name="")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("#00cc99", "#7dffdd", "Grey80", "#6600cc", "#be7dff","Grey80"))+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.6)), plot.subtitle=element_markdown())+
labs(title="Vaccine delivery in England by age and sex",
subtitle="The number of people who are unvaccinated, men with one or two doses and women with one or two doses",
caption="Data from PHE, population figures from NIMS\nPlot by @VictimOfMaths")+
annotate("text", x=-4000000, y=9, label="Men", colour="#6600cc", size=rel(6),
fontface="bold", family="Lato")+
annotate("text", x=4000000, y=9, label="Women", colour="#00cc99", size=rel(6),
fontface="bold", family="Lato")
dev.off()
#Bring in ONS 2020 population figures for comparison
url <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
ONSpop_m <- read_excel(temp, sheet="MYE2 - Males", range="E8:CQ12") %>%
slice_tail() %>%
gather(Age, pop_m, c(1:ncol(.)))
ONSpop_f <- read_excel(temp, sheet="MYE2 - Females", range="E8:CQ12") %>%
slice_tail() %>%
gather(Age, pop_f, c(1:ncol(.)))
ONSpop <- merge(ONSpop_m, ONSpop_f) %>%
mutate(Age=as.numeric(substr(Age, 1, 2)),
Age=case_when(
Age<12 ~ "Under 12",
Age<16 ~ "12 to under 16",
Age<18 ~ "16 to under 18",
Age<20 ~ "18 to under 20",
Age<25 ~ "20 to under 25",
Age<30 ~ "25 to under 30",
Age<35 ~ "30 to under 35",
Age<40 ~ "35 to under 40",
Age<45 ~ "40 to under 45",
Age<50 ~ "45 to under 50",
Age<55 ~ "50 to under 55",
Age<60 ~ "55 to under 60",
Age<65 ~ "60 to under 65",
Age<70 ~ "65 to under 70",
Age<75 ~ "70 to under 75",
Age<80 ~ "75 to under 80",
TRUE ~ "Over 80")) %>%
group_by(Age) %>%
summarise(pop_m=sum(pop_m), pop_f=sum(pop_f)) %>%
ungroup()
ONSdata <- merge(data, ONSpop) %>%
mutate(Male_Unvax=pop_m-Male_Vax1Only-Male_Vax2,
Female_Unvax=pop_f-Female_Vax1Only-Female_Vax2)
ONSdata_long <- pivot_longer(ONSdata, cols=c(2:7), names_to=c("Sex", "Measure"), names_sep="_",
values_to="Value") %>%
mutate(Value=if_else(Sex=="Male", -Value, Value),
Age=case_when(
Age=="Under 12" ~ "<12",
Age=="12 to under 16" ~ "12-15",
Age=="16 to under 18" ~ "16-17",
Age=="18 to under 20" ~ "18-19",
Age=="20 to under 25" ~ "20-24",
Age=="25 to under 30" ~ "25-29",
Age=="30 to under 35" ~ "30-34",
Age=="35 to under 40" ~ "35-39",
Age=="40 to under 45" ~ "40-44",
Age=="45 to under 50" ~ "45-49",
Age=="50 to under 55" ~ "50-54",
Age=="55 to under 60" ~ "55-59",
Age=="60 to under 65" ~ "60-64",
Age=="65 to under 70" ~ "65-69",
Age=="70 to under 75" ~ "70-74",
Age=="75 to under 80" ~ "75-79",
TRUE ~ "80+"),
Age=factor(Age, levels=c("<12", "12-15", "16-17", "18-19", "20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59", "60-64", "65-69", "70-74", "75-79",
"80+")),
SexMeasure=paste0(Sex, Measure))
agg_tiff("Outputs/COVIDVaxxAgexSexONS.tiff", units="in", width=8, height=7, res=800)
ggplot(ONSdata_long, aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),
labels=c("5m", "2.5m", "0", "2.5m", "5m"),
limits=c(-5000000, 5000000), name="")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("Grey80", "#7dffdd", "#00cc99", "Grey80", "#be7dff", "#6600cc"))+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.6)), plot.subtitle=element_markdown())+
labs(title="Vaccine delivery in England by age and sex",
subtitle="The number of people who are unvaccinated, men with one or two doses and women with one or two doses",
caption="Data from PHE, population figures from ONS\nPlot by @VictimOfMaths")+
annotate("text", x=-4000000, y=9, label="Men", colour="#6600cc", size=rel(6),
fontface="bold", family="Lato")+
annotate("text", x=4000000, y=9, label="Women", colour="#00cc99", size=rel(6),
fontface="bold", family="Lato")
dev.off()
agg_tiff("Outputs/COVIDVaxxAgexSexONSv2.tiff", units="in", width=8, height=7, res=800)
ggplot(ONSdata_long %>%
mutate(SexMeasure=factor(SexMeasure, levels=c("FemaleVax2", "FemaleVax1Only", "FemaleUnvax",
"MaleVax2", "MaleVax1Only", "MaleUnvax"))),
aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
geom_segment(aes(x=0, xend=0, y=0.5, yend=17.5))+
scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),
labels=c("5m", "2.5m", "0", "2.5m", "5m"),
limits=c(-5000000, 5000000), name="")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("#00cc99", "#7dffdd", "Grey80", "#6600cc", "#be7dff","Grey80"))+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.6)), plot.subtitle=element_markdown())+
labs(title="Vaccine delivery in England by age and sex",
subtitle="The number of people who are unvaccinated, men with one or two doses and women with one or two doses",
caption="Data from PHE, population figures from ONS\nPlot by @VictimOfMaths")+
annotate("text", x=-4000000, y=9, label="Men", colour="#6600cc", size=rel(6),
fontface="bold", family="Lato")+
annotate("text", x=4000000, y=9, label="Women", colour="#00cc99", size=rel(6),
fontface="bold", family="Lato")
dev.off()
#####################################
#Produce version with compressed age bands
#V1 10 year bands for >20
agg_tiff("Outputs/COVIDVaxxAgexSexv2.tiff", units="in", width=8, height=6, res=800)
data_long %>%
mutate(Age=case_when(
Age %in% c("18-24", "25-29") ~ "18-29",
Age %in% c("30-34", "35-39") ~ "30-39",
Age %in% c("40-44", "45-49") ~ "40-49",
Age %in% c("50-54", "55-59") ~ "50-59",
Age %in% c("60-64", "65-69") ~ "60-69",
Age %in% c("70-74", "75-79") ~ "70-79",
TRUE ~ as.character(Age))) %>%
group_by(Age, SexMeasure) %>%
summarise(Value=sum(Value)) %>%
ungroup() %>%
ggplot(aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
scale_x_continuous(breaks=c(-7500000, -5000000, -2500000, 0, 2500000, 5000000, 7500000),
labels=c("7.5m", "5m", "2.5m", "0", "2.5m", "5m", "7.5m"),
limits=c(-7500000, 7500000), name="")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("Grey80", "#7dffdd", "#00cc99", "Grey80", "#be7dff", "#6600cc"))+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.subtitle=element_markdown())+
labs(title="Vaccine delivery in England by age and sex",
subtitle="The number of people who are unvaccinated, men with one or two doses and women with one or two doses",
caption="Data from PHE, population figures from NIMS\nPlot by @VictimOfMaths")+
annotate("text", x=-5000000, y=6.5, label="Men", colour="#6600cc", size=rel(6), fontface="bold",
family="Lato")+
annotate("text", x=5000000, y=6.5, label="Women", colour="#00cc99", size=rel(6), fontface="bold",
family="Lato")
dev.off()
#V2 20 year bands
agg_tiff("Outputs/COVIDVaxxAgexSexv3.tiff", units="in", width=8, height=5, res=800)
data_long %>%
mutate(Age=case_when(
Age %in% c("18-24", "25-29", "30-34", "35-39") ~ "18-39",
Age %in% c("40-44", "45-49", "50-54", "55-59") ~ "40-59",
Age %in% c("60-64", "65-69", "70-74", "75-79") ~ "60-79",
TRUE ~ as.character(Age))) %>%
group_by(Age, SexMeasure) %>%
summarise(Value=sum(Value)) %>%
ungroup() %>%
ggplot(aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
scale_x_continuous(breaks=c(-7500000, -5000000, -2500000, 0, 2500000, 5000000, 7500000),
labels=c("7.5m", "5m", "2.5m", "0", "2.5m", "5m", "7.5m"),
limits=c(NA,NA), name="")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("Grey80", "#7dffdd", "#00cc99", "Grey80", "#be7dff", "#6600cc"))+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.subtitle=element_markdown())+
labs(title="Vaccine delivery in England by age and sex",
subtitle="The number of people who are unvaccinated, men with one or two doses and women with one or two doses",
caption="Data from PHE, population figures from NIMS\nPlot by @VictimOfMaths")+
annotate("text", x=-5000000, y=5, label="Men", colour="#6600cc", size=rel(6), fontface="bold",
family="Lato")+
annotate("text", x=5000000, y=5, label="Women", colour="#00cc99", size=rel(6), fontface="bold",
family="Lato")
dev.off()
#Animated versions
#Read in historic data
#Week 29
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1007253/Weekly_Influenza_and_COVID19_report_data_W30.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw29 <- read_excel(temp, sheet="Figure 62&63. COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw29) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 28
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1005058/Weekly_Influenza_and_COVID19_report_data_W29.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw28 <- read_excel(temp, sheet="Figure 62&63. COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw28) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 27
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1002563/Weekly_Influenza_and_COVID19_report_data_w28.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw27 <- read_excel(temp, sheet="Figure 61&62. COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw27) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 26
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1000375/Weekly_Influenza_and_COVID19_report_data_w27.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw26 <- read_excel(temp, sheet="Figure 57&58. COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw26) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 25
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/998394/Weekly_Influenza_and_COVID19_report_data_W26.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw25 <- read_excel(temp, sheet="Figure 57&58. COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw25) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 24
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/996366/Weekly_Influenza_and_COVID19_report_data_w25.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw24 <- read_excel(temp, sheet="Figure 57&58. COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw24) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 23
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/994574/Weekly_Influenza_and_COVID19_report_data_w24.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw23 <- read_excel(temp, sheet="Figure 57&58. COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw23) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 22
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/992616/Weekly_Influenza_and_COVID19_report_data_w23.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw22 <- read_excel(temp, sheet="Figure 55&56 COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw22) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 21
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/991080/Weekly_Influenza_and_COVID19_report_data_w22.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw21 <- read_excel(temp, sheet="Figure 55&56 COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw21) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 20
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/989842/Weekly_Influenza_and_COVID19_report_data_W21.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw20 <- read_excel(temp, sheet="Figure 58&59 COVID Vac Age Sex", range="B13:N26", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw20) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 19
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/988026/Weekly_Influenza_and_COVID19_report_data_w20.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw19 <- read_excel(temp, sheet="Figure 58&59 COVID Vac Age Sex", range="B13:N23", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw19) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 18
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/986164/Weekly_Influenza_and_COVID19_report_data_w19.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw18 <- read_excel(temp, sheet="Figure 58&59 COVID Vac Age Sex", range="B13:N23", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw18) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 17
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/983708/Weekly_Influenza_and_COVID19_report_data_w18.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw17 <- read_excel(temp, sheet="Figure 58&59 COVID Vac Age Sex", range="B13:N23", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw17) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 16
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/982284/Weekly_Influenza_and_COVID19_report_data_w17.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw16 <- read_excel(temp, sheet="Figure 58&59 COVID Vac Age Sex", range="B13:N23", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw16) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 15
url <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/979626/Weekly_Influenza_and_COVID19_report_data_w16.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
dataw15 <- read_excel(temp, sheet="Figure 58&59 COVID Vac Age Sex", range="B13:N23", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw15) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Week 14
dataw14 <- read_excel(temp, sheet="Figure 58&59 COVID Vac Age Sex", range="B31:N41", col_names=FALSE) %>%
select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)
colnames(dataw14) <- c("Age", "Male_Pop", "Male_Vax1", "Female_Pop", "Female_Vax1", "Male_Vax2",
"Female_Vax2")
#Data for weeks prior to 21 uses different age bands. Aligning them is a project for the interested reader...
mergeddata <- dataw29 %>% mutate(Week=29) %>%
bind_rows(dataw28 %>% mutate(Week=28)) %>%
bind_rows(dataw27 %>% mutate(Week=27)) %>%
bind_rows(dataw26 %>% mutate(Week=26)) %>%
bind_rows(dataw25 %>% mutate(Week=25)) %>%
bind_rows(dataw24 %>% mutate(Week=24)) %>%
bind_rows(dataw23 %>% mutate(Week=23)) %>%
bind_rows(dataw22 %>% mutate(Week=22)) %>%
bind_rows(dataw21 %>% mutate(Week=21)) %>%
rowwise() %>%
mutate(Male_Unvax=Male_Pop-Male_Vax1,
Female_Unvax=Female_Pop-Female_Vax1,
Male_Vax1Only=Male_Vax1-Male_Vax2,
Female_Vax1Only=Female_Vax1-Female_Vax2) %>%
ungroup() %>%
select(Age, Week, Male_Unvax, Female_Unvax, Male_Vax1Only, Female_Vax1Only, Male_Vax2, Female_Vax2) %>%
bind_rows(data %>% mutate(Week=30))
mergeddata_long <- pivot_longer(mergeddata, cols=c(3:8), names_to=c("Sex", "Measure"), names_sep="_",
values_to="Value") %>%
mutate(Value=if_else(Sex=="Male", -Value, Value),
Age=case_when(
Age=="Under 18 years" ~ "<18",
Age=="18 to 24 years" ~ "18-24",
Age=="25 to 29 years" ~ "25-29",
Age=="30 to 34 years" ~ "30-34",
Age=="35 to 39 years" ~ "35-39",
Age=="40 to 44 years" ~ "40-44",
Age=="45 to 49 years" ~ "45-49",
Age=="50 to 54 years" ~ "50-54",
Age=="55 to 59 years" ~ "55-59",
Age=="60 to 64 years" ~ "60-64",
Age=="65 to 69 years" ~ "65-69",
Age=="70 to 74 years" ~ "70-74",
Age=="75 to 79 years" ~ "75-79",
TRUE ~ "80+"),
Age=factor(Age, levels=c("<18", "18-24", "25-29", "30-34", "35-39", "40-44", "45-49",
"50-54", "55-59", "60-64",
"65-69", "70-74", "75-79", "80+")),
SexMeasure=paste0(Sex, Measure),
date=as.Date("2021-04-11")+weeks(Week-14)) %>%
arrange(Week)
anim <- ggplot(mergeddata_long, aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
scale_x_continuous(breaks=c(-7500000, -5000000, -2500000, 0, 2500000, 5000000, 7500000),
labels=c("7.5m", "5m", "2.5m", "0", "2.5m", "5m", "7.5m"),
limits=c(-7500000, 7500000), name="")+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("Grey80", "#7dffdd", "#00cc99", "Grey80", "#be7dff", "#6600cc"))+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Lato"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.subtitle=element_markdown())+
labs(caption="Data from PHE, population figures from NIMS\nPlot by @VictimOfMaths")+
annotate("text", x=-4000000, y=9, label="Men", colour="#6600cc", size=rel(6), fontface="bold",
family="Lato")+
annotate("text", x=4000000, y=9, label="Women", colour="#00cc99", size=rel(6), fontface="bold",
family="Lato")+
transition_states(date, transition_length=2, state_length=1, wrap=FALSE)+
ggtitle("Vaccine delivery in England by age and sex up to {closest_state}",
subtitle="The number of people who are unvaccinated, men with one or two doses
and women with one or two doses")
animate(anim, units="in", width=8, height=8*4/5, res=250,
renderer=gifski_renderer("Outputs/COVIDVaxPyramidAnim.gif"),
device="ragg_png", end_pause=5, duration=10, fps=8)
================================================
FILE: Heatmaps/COVIDPillars.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(ggtext)
library(RcppRoll)
library(readxl)
library(googledrive)
library(sf)
#Download latest testing data from
# https://www.gov.uk/guidance/coronavirus-covid-19-information-for-the-public
temp <- tempfile()
source <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/910857/2020-08-20_COVID-19_UK_testing_time_series.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- read.csv(temp)[,c(1,3,4,7,11,13)]
colnames(rawdata) <- c("Date", "Nation", "Pillar", "Tests", "Cases.old", "Cases.new")
rawdata$Date <- as.Date(rawdata$Date, format="%d/%m/%Y")
rawdata$Cases.new <- as.numeric(as.character(rawdata$Cases.new))
rawdata$Tests <- as.numeric(as.character(rawdata$Tests))
#Do some mangling of the data to address the change in methodology on 1st July
rawdata <- rawdata %>%
filter(!Pillar %in% c("Pillar 3", "Pillar 4") & Nation=="UK") %>%
mutate(Cases=coalesce(Cases.old, Cases.new), Cases=replace_na(Cases,0),
Pillar=substr(Pillar,1,8), Tests=replace_na(Tests,0)) %>%
group_by(Pillar, Date) %>%
arrange(Date) %>%
summarise(Cases=sum(Cases), Tests=sum(Tests)) %>%
mutate(Cases_roll=roll_mean(Cases, 7, align="right", fill=0),
Tests_roll=roll_mean(Tests, 7, align="right", fill=0),
Posrate=Cases/Tests,
Posrate_roll=roll_mean(Posrate, 7, align="right", fill=0))
tiff("Outputs/COVIDPillars.tiff", units="in", width=8, height=6, res=500)
ggplot(rawdata, aes(x=Date, y=Cases_roll, fill=Pillar))+
geom_area(show.legend=FALSE)+
scale_fill_paletteer_d("NineteenEightyR::malibu")+
scale_y_continuous("New confirmed COVID-19 cases")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="Positive tests from both Pillars 1 and 2 seem to have flatlined",
subtitle="Rolling 7-day average of new COVID-19 cases in the UK identified through Pillar 1 and Pillar 2 testing
(Pillar 1 data includes Welsh data on both Pillars).",
caption="Data from DHSC & PHE | Plot by @VictimOfMaths")
dev.off()
data_wide <- spread(rawdata[,-c(4:8)], Pillar, Cases)
data_wide$Cases=data_wide$`Pillar 1`+data_wide$`Pillar 2`
data_wide$Cases_roll <- roll_mean(data_wide$Cases, 7, align="right", fill=0)
#Bar chart version
tiff("Outputs/COVIDPillarsBar.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_col(data=rawdata, aes(x=Date, y=Cases, fill=Pillar), show.legend=FALSE)+
geom_line(data=data_wide, aes(x=Date, y=Cases_roll), colour="navyblue")+
scale_fill_paletteer_d("NineteenEightyR::malibu")+
scale_y_continuous("New confirmed COVID-19 cases")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="The decline in new COVID-19 cases has definitely stopped",
subtitle="Rolling 7-day average of new COVID-19 cases in the UK identified through Pillar 1 and Pillar 2 testing
(Pillar 1 data includes Welsh data on both Pillars).",
caption="Data from DHSC & PHE | Plot by @VictimOfMaths")+
annotate("text", x=as.Date("2020-05-13"), y=4200, label="Rolling 7-day average of new cases",
colour="navyblue", hjust=0)
dev.off()
#Plot of positivity rates
tiff("Outputs/COVIDPillarsPosRate.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(rawdata, Date>as.Date("2020-04-06")),
aes(x=Date, y=Posrate_roll, colour=Pillar))+
geom_line(show.legend=FALSE)+
scale_y_continuous(name="Proportion of tests returning a positive result",
breaks=c(0,0.1,0.2,0.3), labels=c("0%", "10%", "20%", "30%"))+
scale_colour_paletteer_d("NineteenEightyR::malibu")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="The proportion of COVID-19 tests returning positive remains low",
subtitle="Rolling 7-day average test positivity rate for Pillar 1 and Pillar 2 testing
(Pillar 1 data includes Welsh data on both Pillars).",
caption="Data from DHSC & PHE | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDPillarsPosRateRecent.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(rawdata, Date>as.Date("2020-07-01")),
aes(x=Date, y=Posrate_roll, colour=Pillar))+
geom_line(show.legend=FALSE)+
scale_y_continuous(name="Proportion of tests returning a positive result",
breaks=c(0,0.005,0.01,0.015), labels=c("0%", "0.5%", "1%", "1.5%"))+
scale_colour_paletteer_d("NineteenEightyR::malibu")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="The proportion of Pillar 2 tests returning a positive has changed little in the past month",
subtitle="Rolling 7-day average test positivity rate for Pillar 1 and Pillar 2 testing
(Pillar 1 data includes Welsh data on both Pillars).",
caption="Data from DHSC & PHE | Plot by @VictimOfMaths")
dev.off()
#Download from Google Drive compiled by Daniel Howdon
#https://twitter.com/danielhowdon/status/1278062684622258177?s=20
#New version:https://twitter.com/danielhowdon/status/1278676343631347712?s=20
temp <- tempfile()
#drive_download(as_id("1JcyH0Z85Fi8LS_1F4l92-12biPQHY7biYO2EgwFK6CE"), path=temp, overwrite=TRUE)
drive_download(as_id("1uh3E396yMFCTr_d6P__gyi99EshQ1BxFpjqwljXxR_M"), path=temp, overwrite=TRUE)
temp <- paste0(temp, ".xlsx")
data <- read_excel(temp, sheet=, range="A1:R151")
#Calculate pillar 2 cases as a proportion of total
data$pillar2propwk26 <- data$`Week 26 pillar 2 cases`/data$`Week 26 implied cases`
data$pillar2propwk27 <- data$`Week 27 pillar 2 cases`/data$`Week 27 implied cases`
#set negative proportions to missing
data$pillar2propwk26 <- if_else(data$pillar2propwk26<0, -1, data$pillar2propwk26)
data$pillar2propwk26 <- na_if(data$pillar2propwk26, -1)
data$pillar2propwk27 <- if_else(data$pillar2propwk27<0, -1, data$pillar2propwk27)
data$pillar2propwk27 <- na_if(data$pillar2propwk27, -1)
#Download LA shapefile
#Download shapefile of LA boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/6638c31a8e9842f98a037748f72258ed_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "ctyua17cd"] <- "UTLA code"
int1 <- filter(data, `UTLA name`=="Bournemouth, Christchurch and Poole")
int1$`UTLA code` <- "E06000028"
int2 <- filter(data, `UTLA name`=="Bournemouth, Christchurch and Poole")
int2$`UTLA code` <- "E06000029"
int3 <- filter(data, `UTLA name`=="Bournemouth, Christchurch and Poole")
int3$`UTLA code` <- "E10000009"
data <- rbind(data, int1, int2, int3)
map.data <- full_join(shapefile, data, by="UTLA code", all.y=TRUE)
map.data <- map.data %>% drop_na("population")
tiff("Outputs/COVIDPillars1vs2wk26.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_sf(data=map.data, aes(geometry=geometry, fill=pillar2propwk26), colour=NA)+
xlim(10000,655644)+
ylim(5337,700000)+
scale_fill_paletteer_c("scico::roma", name="Proportion coming\nfrom Pillar 2",
breaks=c(0,0.25,0.5,0.75,1),
labels=c("0%", "25%", "50%", "75%", "100%"),
na.value="grey60")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title.position="plot",
plot.subtitle=element_markdown())+
labs(title="New COVID cases are being identified through different routes across England",
subtitle="Proportion of new confirmed cases estimated to have come from Pillar 2 vs. Pillar 1 tests in week 26",
caption="Data estimated fromn PHE figures by @danielhowdon | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDPillars1vs2wk27.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_sf(data=map.data, aes(geometry=geometry, fill=pillar2propwk27), colour=NA)+
xlim(10000,655644)+
ylim(5337,700000)+
scale_fill_paletteer_c("scico::roma", name="Proportion coming\nfrom Pillar 2",
breaks=c(0,0.25,0.5,0.75,1),
labels=c("0%", "25%", "50%", "75%", "100%"),
na.value="grey60")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title.position="plot",
plot.subtitle=element_markdown())+
labs(title="New COVID cases are being identified through different routes across England",
subtitle="Proportion of new confirmed cases estimated to have come from Pillar 2 vs. Pillar 1 tests in week27",
caption="Data estimated fromn PHE figures by @danielhowdon | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDReinfections.R
================================================
rm(list=ls())
library(tidyverse)
library(lubridate)
library(scales)
library(RcppRoll)
library(curl)
library(paletteer)
library(ggtext)
library(ragg)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Read in data on infections and reinfections by LTLA
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDate&metric=newFirstEpisodesBySpecimenDate&format=csv"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
#Get rid of Scottish and Welsh data (not using new definition yet)
rawdata <- read.csv(temp) %>%
filter(substr(areaCode,1,1) %in% c("E")) %>%
mutate(date=as.Date(date))
#National level plot
natdata <- rawdata %>%
mutate(country=if_else(substr(areaCode,1,1)=="E", "England", "Northern Ireland")) %>%
group_by(country, date) %>%
summarise(TotalCases=sum(newCasesBySpecimenDate),
NewInfections=sum(newFirstEpisodesBySpecimenDate)) %>%
ungroup() %>%
mutate(Reinfections=TotalCases-NewInfections) %>%
gather(Metric, Cases, c(3:5)) %>%
group_by(Metric) %>%
mutate(Cases_roll=roll_mean(Cases, 7, align="center", fill=NA)) %>%
filter(date>as.Date("2020-03-01"))
agg_tiff("Outputs/COVIDReinfections.tiff", units="in", width=8, height=6, res=500)
ggplot(natdata %>% filter(Metric!="TotalCases"), aes(x=date, y=Cases_roll, fill=Metric))+
geom_col(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases")+
scale_fill_manual(values=c("#FF9E44", "#FF4E86"))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="Reinfections are an Omicron phenomenon",
subtitle="Rolling 7-day average number of first time COVID cases and reinfections in England",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDReinfectionsProp.tiff", units="in", width=8, height=6, res=500)
ggplot(natdata %>% filter(Metric!="TotalCases"), aes(x=date, y=Cases_roll, fill=Metric))+
geom_col(show.legend=FALSE, position="fill")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of cases", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#FF9E44", "#FF4E86"))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The proportion of cases that are reinfections has remained steady",
subtitle="Rolling 7-day average proportion of cases in England that are first time COVID cases and reinfections",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#####################
#Age-stratified reinfection data
#Read in data on infections and reinfections by LTLA
url1 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newCasesBySpecimenDateAgeDemographics&format=csv"
url2 <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newFirstEpisodesBySpecimenDateAgeDemographics&format=csv"
temp1 <- tempfile()
temp2 <- tempfile()
temp1 <- curl_download(url=url1, destfile=temp1, quiet=FALSE, mode="wb")
temp2 <- curl_download(url=url2, destfile=temp2, quiet=FALSE, mode="wb")
#Get rid of Scottish and Welsh data (not using new definition yet)
agedata <- read.csv(temp1) %>%
rename("TotalCases"="cases") %>%
select(-c("rollingSum", "rollingRate")) %>%
merge(read.csv(temp2) %>% rename("NewInfections"="cases") %>%
select(-c("rollingSum", "rollingRate")), all=TRUE) %>%
mutate(date=as.Date(date),
Reinfections=TotalCases-NewInfections,
age=gsub("_", "-", age)) %>%
gather(Metric, Cases, c(6:8)) %>%
group_by(Metric) %>%
mutate(Cases_roll=roll_mean(Cases, 7, align="center", fill=NA)) %>%
select(-Cases) %>%
filter(date>as.Date("2020-03-01") & age!="00-59" & age!="unassigned" & age!="60+") %>%
spread(Metric, Cases_roll) %>%
mutate(ReinfectionProp=Reinfections/TotalCases) %>%
gather(Metric, Cases_roll, c(6:9))
agg_tiff("Outputs/COVIDReinfectionsPropxAge.tiff", units="in", width=8, height=6, res=500)
ggplot(agedata %>% filter(Metric=="ReinfectionProp" & date>as.Date("2020-06-01")),
aes(x=date, y=Cases_roll, colour=age))+
geom_line(size=0.2)+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of new cases that are reinfections",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("pals::stepped", name="Age")+
theme_custom()
dev.off()
agg_tiff("Outputs/COVIDReinfectionsPropxAgeHeatmap.tiff", units="in", width=10, height=6, res=500)
ggplot(agedata %>% filter(Metric=="ReinfectionProp" & date>as.Date("2020-06-01") & !is.na(Cases_roll)),
aes(x=date, y=age, fill=Cases_roll, colour=Cases_roll))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_c("viridis::rocket", name="Proportion of new cases\nthat are reinfections",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_c("viridis::rocket", name="Proportion of new cases\nthat are reinfections",
labels=label_percent(accuracy=1))+
theme_custom()+
theme(legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="The age composition of reinfections has changed with Omicron",
subtitle="Rolling 7-day average proportion of new cases that are reinfections by age",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDSGTF.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(extrafont)
library(paletteer)
library(ragg)
library(RcppRoll)
library(ggtext)
library(geofacet)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Bring in SGTF data from UKHSA
#https://www.gov.uk/government/publications/covid-19-omicron-daily-overview
source <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1043909/sgtf_regionepicurve_2021-12-27.csv"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
SGTFdata <- read.csv(temp) %>%
mutate(specimen_date=as.Date(specimen_date, format="%d/%m/%Y"),
#mutate(specimen_date=as.Date(specimen_date),
areaName=if_else(UKHSA_region=="Yorkshire and Humber",
"Yorkshire and The Humber", UKHSA_region))
#Add in case data from dashboard
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDate&format=csv"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
casedata <- read.csv(temp) %>%
mutate(specimen_date=as.Date(date))
data <- merge(SGTFdata, casedata, all.x=T) %>%
select(specimen_date, areaName, percent, newCasesBySpecimenDate, sgtf) %>%
mutate(cases=newCasesBySpecimenDate*percent/100) %>%
group_by(areaName, sgtf) %>%
mutate(cases_roll=roll_mean(cases, 7, align="center", fill=NA)) %>%
ungroup()
maxdate=max(data$specimen_date)
mygrid <- data.frame(name=c("North East", "North West", "Yorkshire and The Humber",
"West Midlands", "East Midlands", "East of England",
"South West", "London", "South East"),
row=c(1,1,1,2,2,2,3,3,3), col=c(3,1,2,1,2,3,1,2,3),
code=c(1:9))
agg_tiff("Outputs/COVIDSGTFxRegion.tiff", units="in", width=9, height=7, res=500)
ggplot(data)+
geom_line(aes(x=specimen_date, y=cases_roll, colour=sgtf), show.legend=FALSE)+
geom_point(aes(x=specimen_date, y=cases, colour=sgtf), shape=21, show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases")+
scale_colour_manual(values=c("#3D98D3", "#FD0409"))+
facet_geo(~areaName, grid=mygrid)+
theme_custom()+
theme(plot.subtitle=element_markdown(),
strip.text=element_blank())+
labs(title="Omicron cases *may* be falling in London, but they are rising elsewhere",
subtitle=paste0("Estimated total number of Omicron and Delta cases based on SGTF data and total positve tests.
Dots represent daily figures, lines the 7-day centered rolling average. Data up to ", maxdate),
caption="Data from UKHSA & coronavirus.data.gov.uk| Plot by @VictimOfMaths")+
geom_text(aes(x=as.Date("2021-11-20"), y=13000, label=areaName), family="Lato", fontface="bold",
size=rel(4))
dev.off()
#rates instead of cases. Populations from ONS 2020 mid-year estimates.
#Hard coded because I AM A MONSTER AND I DON'T CARE
agg_tiff("Outputs/COVIDSGTFxRegionRates.tiff", units="in", width=9, height=7, res=500)
data %>% mutate(pop=case_when(
areaName=="North East" ~ 2680763,
areaName=="North West" ~ 7367456,
areaName=="Yorkshire and The Humber" ~ 5526350,
areaName=="East Midlands" ~ 4865583,
areaName=="West Midlands" ~ 5961929,
areaName=="East of England" ~ 6269161,
areaName=="London" ~ 9002488,
areaName=="South East" ~ 9217265,
areaName=="South West" ~ 5659143),
caserate=cases*100000/pop,
caserate_roll=cases_roll*100000/pop) %>%
ggplot()+
geom_line(aes(x=specimen_date, y=caserate_roll, colour=sgtf), show.legend=FALSE)+
geom_point(aes(x=specimen_date, y=caserate, colour=sgtf), shape=21, show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Daily cases per 100,000")+
scale_colour_manual(values=c("#3D98D3", "#FD0409"))+
facet_geo(~areaName, grid=mygrid)+
theme_custom()+
theme(plot.subtitle=element_markdown(),
strip.text=element_blank())+
labs(title="Omicron has seen off Delta",
subtitle=paste0("Estimated total number of Omicron and Delta cases based on SGTF data and total positve tests.
Dots represent daily figures, lines the 7-day centered rolling average. Data up to ", maxdate),
caption="Data from UKHSA & coronavirus.data.gov.uk| Plot by @VictimOfMaths")+
geom_text(aes(x=as.Date("2021-11-20"), y=200, label=areaName), family="Lato", fontface="bold",
size=rel(4))
dev.off()
================================================
FILE: Heatmaps/COVIDSpiral.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(ggtext)
library(extrafont)
library(RcppRoll)
library(ragg)
library(paletteer)
library(lubridate)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Function borrowed from stackoverflow answer from truenbrand to draw annotations on a polar plot
#https://stackoverflow.com/questions/66196451/draw-straight-line-between-any-two-point-when-using-coord-polar-in-ggplot2-r/66196752#66196752
geom_segment_straight <- function(...) {
layer <- geom_segment(...)
new_layer <- ggproto(NULL, layer)
old_geom <- new_layer$geom
geom <- ggproto(
NULL, old_geom,
draw_panel = function(data, panel_params, coord,
arrow = NULL, arrow.fill = NULL,
lineend = "butt", linejoin = "round",
na.rm = FALSE) {
data <- ggplot2:::remove_missing(
data, na.rm = na.rm, c("x", "y", "xend", "yend",
"linetype", "size", "shape")
)
if (ggplot2:::empty(data)) {
return(zeroGrob())
}
coords <- coord$transform(data, panel_params)
# xend and yend need to be transformed separately, as coord doesn't understand
ends <- transform(data, x = xend, y = yend)
ends <- coord$transform(ends, panel_params)
arrow.fill <- if (!is.null(arrow.fill)) arrow.fill else coords$colour
return(grid::segmentsGrob(
coords$x, coords$y, ends$x, ends$y,
default.units = "native", gp = grid::gpar(
col = alpha(coords$colour, coords$alpha),
fill = alpha(arrow.fill, coords$alpha),
lwd = coords$size * .pt,
lty = coords$linetype,
lineend = lineend,
linejoin = linejoin
),
arrow = arrow
))
}
)
new_layer$geom <- geom
return(new_layer)
}
#Read in case data from dashboard
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newCasesBySpecimenDate&format=csv"
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp) %>%
mutate(date=as.Date(date)) %>%
rename("cases"="newCasesBySpecimenDate")
#Set value for increment size (basically controls the tightness of the spiral, bigger numbers =>
#a looser spiral)
spiralincrement <- 220
data <- data %>%
group_by(date) %>%
summarise(cases=sum(cases)) %>%
mutate(areaName="UK") %>%
ungroup() %>%
#Comment out this next row if you wanted data for UK nations, not whole country
#bind_rows(data) %>%
#2020 being a leap year messes things up, so remove 31st December 2020 (arbitrarily)
#to make all the years the same length
#Also cut off the last few days of data as they are incomplete
filter(date!=as.Date("2020-12-31") & date%
group_by(areaName) %>%
mutate(cases_roll=roll_mean(cases, 7, align="center", fill=NA),
#Create variable to represent the base of each bar - change the number to tighten/relax the spiral
increment=spiralincrement*c(1:n()),
#Add cases to the base to get the top of each bar
incrementcases=increment+cases_roll,
year=year(date)) %>%
ungroup() %>%
#Calculate the number of days since the start of the year
group_by(year) %>%
mutate(yeardays=as.numeric(difftime(date ,as.Date(paste0(year, "-01-01")) , units = c("days")))) %>%
ungroup()
#Pull out a couple of parameters to control the positioning of the segments
seg2021 <- data$increment[data$year==2020 & data$yeardays==364]-spiralincrement*0.5
seg2122 <- data$increment[data$year==2021 & data$yeardays==364]-spiralincrement*0.5
arrowmin <- max(data$increment[data$year==2022 & !is.na(data$cases_roll)])+spiralincrement*4
arrowxpos <- max(data$yeardays[data$year==2022 & !is.na(data$cases_roll)])+4
agg_tiff("Outputs/COVIDCasesSpiral.tiff", units="in", width=8, height=8, res=800)
ggplot()+
#Need to plot each year separately, to 'trick' coord_polar to make a spiral, not a single
#loop
geom_rect(data=data %>% filter(year==2020 & ! is.na(cases_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases,
fill=cases_roll), show.legend=FALSE)+
geom_rect(data=data %>% filter(year==2021 & ! is.na(cases_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases,
fill=cases_roll), show.legend=FALSE)+
geom_rect(data=data %>% filter(year==2022 & ! is.na(cases_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases,
fill=cases_roll), show.legend=FALSE)+
geom_line(data=data %>% filter(year==2020 & ! is.na(cases_roll)),
aes(x=yeardays, y=increment), colour="black")+
geom_line(data=data %>% filter(year==2021),
aes(x=yeardays, y=increment), colour="black")+
geom_line(data=data %>% filter(year==2022 & yeardays%
mutate(date=as.Date(date)) %>%
arrange(date) %>%
filter(date!=as.Date("2020-12-31")) %>%
mutate(adm_roll=roll_mean(newAdmissions, 5, align="center", fill=NA),
#Create variable to represent the base of each bar - change the number to tighten/relax the spiral
increment=spiralincrement2*c(1:n()),
#Add cases to the base to get the top of each bar
incrementadm=increment+adm_roll,
year=year(date)) %>%
#Calculate the number of days since the start of the year
group_by(year) %>%
mutate(yeardays=as.numeric(difftime(date ,as.Date(paste0(year, "-01-01")) , units = c("days")))) %>%
ungroup()
seg20212 <- data2$increment[data2$year==2020 & data2$yeardays==364]-spiralincrement2*0.5
seg21222 <- data2$increment[data2$year==2021 & data2$yeardays==364]-spiralincrement2*0.5
arrowmin2 <- max(data2$increment[data2$year==2022 & !is.na(data2$adm_roll)])+spiralincrement2*4
arrowxpos2 <- max(data2$yeardays[data2$year==2022 & !is.na(data2$adm_roll)])+4
agg_tiff("Outputs/COVIDAdmissionsSpiral.tiff", units="in", width=8, height=8, res=800)
ggplot()+
#Need to plot each year separately
geom_rect(data=data2 %>% filter(year==2020 & ! is.na(adm_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementadm,
fill=adm_roll), show.legend=FALSE)+
geom_rect(data=data2 %>% filter(year==2021 & ! is.na(adm_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementadm,
fill=adm_roll), show.legend=FALSE)+
geom_rect(data=data2 %>% filter(year==2022 & ! is.na(adm_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementadm,
fill=adm_roll), show.legend=FALSE)+
#negative offset is to cover up the base of the bars
geom_line(data=data2 %>% filter(year=="2020" & ! is.na(adm_roll)),
aes(x=yeardays, y=increment), colour="black")+
geom_line(data=data2 %>% filter(year=="2021"),
aes(x=yeardays, y=increment), colour="black")+
geom_line(data=data2 %>% filter(year=="2022" & yeardays%
mutate(date=as.Date(date)) %>%
filter(indicator %in% c("Daily ICU occupancy per million",
"Daily hospital occupancy per million",
"Weekly new hospital admissions per million",
"Weekly new ICU admissions per million")) %>%
filter(iso_code %in% c("AUT", "BEL", "BGR", "HRV", "CYP", "CZE", "DNK", "EST", "FIN", "FRA",
"DEU", "GRC", "HUN", "ISL", "IRL", "ITA", "LIE", "LTU", "LUX", "MLT",
"NLD", "NOR", "POL", "PRT", "ROU", "SRB", "SVK", "SVN", "ESP", "SWE",
"CHE", "GBR"))
#Set value for increment size (basically controls the tightness of the spiral, bigger numbers =>
#a looser spiral)
spiralincrement <- 5
dailydata <- data %>%
filter(indicator %in% c("Daily ICU occupancy per million",
"Daily hospital occupancy per million")) %>%
#2020 being a leap year messes things up, so remove 31st December 2020 (arbitrarily)
#to make all the years the same length
filter(date!=as.Date("2020-12-31")) %>%
group_by(iso_code, entity, indicator) %>%
arrange(date) %>%
mutate(value_roll=roll_mean(value, 7, align="center", fill=NA),
#Create variable to represent the base of each bar - change the number to tighten/relax the spiral
increment=spiralincrement*c(1:n()),
#Add cases to the base to get the top of each bar
incrementcases=increment+value_roll,
year=year(date)) %>%
ungroup() %>%
#Calculate the number of days since the start of the year
group_by(year) %>%
mutate(yeardays=as.numeric(difftime(date ,as.Date(paste0(year, "-01-01")) , units = c("days")))) %>%
ungroup()
#Occupancy plot
occdata <- dailydata %>% filter(indicator=="Daily hospital occupancy per million")
#Pull out a couple of parameters to control the positioning of the segments
params <- data.frame(entity=unique(occdata$entity)) %>%
merge(occdata)
seg2021 <- occdata$increment[occdata$year==2020 & occdata$yeardays==364]-spiralincrement*0.5
seg2122 <- occdata$increment[occdata$year==2021 & occdata$yeardays==364]-spiralincrement*0.5
arrowmin <- max(occdata$increment[occdata$year==2022 & !is.na(occdata$value_roll)])+spiralincrement*4
arrowxpos <- max(occdata$yeardays[occdata$year==2022 & !is.na(occdata$value_roll)])+4
occparams <- occdata %>% group_by(entity, iso_code) %>%
summarise(seg2021=increment[year==2020 & yeardays==max(yeardays[year==2020])]-spiralincrement*0.5,
seg2122=increment[year==2021 & yeardays==max(yeardays[year==2021])]-spiralincrement*0.5,
arrowmin=max(increment[year==2022 & !is.na(value_roll)])+spiralincrement*4,
arrowxpos=max(yeardays[year==2022 & !is.na(value_roll)]))
agg_tiff("Outputs/COVIDSpiralEuropeICU.tiff", units="in", width=14, height=14, res=500)
ggplot(occdata)+
#Need to plot each year separately, to 'trick' coord_polar to make a spiral, not a single
#loop
geom_rect(data=occdata %>% filter(year==2020 & ! is.na(value_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases,
fill=value_roll), show.legend=FALSE)+
geom_rect(data=occdata %>% filter(year==2021 & ! is.na(value_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases,
fill=value_roll), show.legend=FALSE)+
geom_rect(data=occdata %>% filter(year==2022 & ! is.na(value_roll)),
aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases,
fill=value_roll), show.legend=FALSE)+
geom_line(data=occdata %>% filter(year==2020 & ! is.na(value_roll)),
aes(x=yeardays, y=increment), colour="black")+
geom_line(data=occdata %>% filter(year==2021),
aes(x=yeardays, y=increment), colour="black")+
geom_line(data=occdata %>% filter(year==2022),
aes(x=yeardays, y=increment), colour="black")+
#Add a couple of tiny segments to patch the holes in the baseline at the end of each year
geom_segment_straight(data=occparams, aes(x=363.5, xend=0.5, y=seg2021, yend=seg2021+2*spiralincrement),
colour="black")+
geom_segment_straight(data=occparams, aes(x=363.5, xend=0.5, y=seg2122, yend=seg2122+2*spiralincrement),
colour="black")+
scale_x_continuous(breaks=c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334),
labels=c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec"))+
scale_y_continuous(limits=c(0,5000))+
scale_colour_paletteer_c("viridis::rocket", direction=-1)+
scale_fill_paletteer_c("viridis::rocket", direction=-1)+
#facet_wrap(~entity)+
facet_geo(~iso_code, grid="europe_countries_grid2", label="name")+
coord_polar()+
theme_void()+
theme(panel.grid.major.x=element_line(colour="Grey90"),
axis.text.x=element_text(colour="Grey60"),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.8)),
plot.title.position = "plot", plot.caption.position = "plot")+
#Add low key legend for a bit of context
#geom_segment(aes(y=arrowmin, yend=arrowmin+200000, x=arrowxpos, xend=arrowxpos), colour="Grey30",
# arrow = arrow(length=unit(0.20,"cm"), ends="both", type = "closed"))+
#Will need to manually tweak the placement of this annotation
#annotate("text", x=arrowxpos+3, y=250000, label="200,000\ncases\nper\nday", hjust=0, colour="Grey30",
# size=rel(2.5), family="Lato")+
labs(title="The eternal spiral of COVID",
subtitle="COVID hospital occupancy across Europe",
caption="Data from coronavirus.data.gov.uk | Inspiration from the NYT | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDTestingData.R
================================================
rm(list=ls())
library(tidyverse)
library(paletteer)
library(ukcovid19)
library(RcppRoll)
library(scales)
#Call data from PHE API
APIdata <- get_data(filters="areaType=nation",
structure=list(date="date",
name="areaName",
cases="newCasesByPublishDate",
tests="newTestsByPublishDate",
positivity="uniqueCasePositivityBySpecimenDateRollingSum"))
data <- APIdata %>%
group_by(name) %>%
mutate(date=as.Date(date),
#Calculate rolling averages
tests_avg=roll_mean(tests, 7, align="center", fill=NA),
cases_avg=roll_mean(cases, 7, align="center", fill=NA),
#Calculate positivity rate
posrate_avg=cases_avg/tests_avg,
#Bring in population
pop=case_when(
name=="England" ~ 56286961,
name=="Scotland" ~ 5463300,
name=="Wales" ~ 3152879,
name=="Northern Ireland" ~ 1893667
),
testrate_avg=tests_avg*100000/pop,
) %>%
ungroup()
plotto <- data %>%
filter(!is.na(tests_avg)) %>%
mutate(temp=max(date, na.rm=TRUE)) %>%
filter(date==temp & name=="England") %>%
select(date)
#Plot case rates by country by specimen date
ggplot(data)+
geom_line(aes(x=date, y=testrate_avg, colour=name))+
scale_x_date(name="", limits=c(as.Date("2020-08-01"), NA))+
scale_y_continuous(name="Daily tests published per 100,000 population")+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Testing rates have risen in England since Christmas",
subtitle="Rolling 7-day average of new COVID-19 tests by publication date",
caption="Date from coronavirus.gov.uk | Plot by @VictimOfMaths")
#Plot test rates by country
tiff("Outputs/COVIDTestRatesUK.tiff", units="in", width=8, height=6, res=500)
ggplot(data)+
geom_line(aes(x=date, y=testrate_avg, colour=name))+
scale_x_date(name="", limits=c(as.Date("2020-11-01"), NA))+
scale_y_continuous(name="Daily tests published per 100,000 population")+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Testing rates have risen in England since Christmas",
subtitle="Rolling 7-day average of new COVID-19 tests by publication date",
caption="Date from coronavirus.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Plot positivity rates by country
tiff("Outputs/COVIDPosRatesUK.tiff", units="in", width=8, height=6, res=500)
ggplot(data)+
geom_line(aes(x=date, y=posrate_avg, colour=name))+
scale_x_date(name="", limits=c(as.Date("2020-11-01"), NA))+
scale_y_continuous(name="Proportion of tests returned as positive", labels=percent_format(accuracy = 1))+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
labs(title="Test positivity rates are falling in all four UK nations",
subtitle="Rolling 7-day average proportion of tests which are returned positive by publication date",
caption="Date from coronavirus.gov.uk | Plot by @VictimOfMaths")
dev.off()
#Regional data
APIdata2 <- get_data(filters="areaType=region",
structure=list(date="date",
name="areaName",
cases="newCasesBySpecimenDate",
positivity="uniqueCasePositivityBySpecimenDateRollingSum",
people="uniquePeopleTestedBySpecimenDateRollingSum")) %>%
group_by(name) %>%
mutate(date=as.Date(date),
cases_avg=roll_mean(cases, 7, align="center", fill=NA),
pop=case_when(
name=="East of England" ~ 6236072,
name=="London" ~ 8961989,
name=="West Midlands" ~ 5934037,
name=="East Midlands" ~ 4835928,
name=="North East" ~ 2669941,
name=="Yorkshire and The Humber" ~ 5502967,
name=="North West" ~ 7341196,
name=="South East" ~ 9180135,
name=="South West" ~ 5624696),
peoplerate=people*100000/pop,
caserate=cases_avg*100000/pop)
tiff("Outputs/COVIDRegTestCounts.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(APIdata2, date>as.Date("2020-11-01")))+
geom_line(aes(x=date, y=peoplerate, colour=name))+
scale_x_date(name="")+
scale_y_continuous(name="Number of unique people tested per 100,000", limits=c(0,NA))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
scale_colour_paletteer_d("LaCroixColoR::paired", name="")+
labs(title="The number of people being tested for COVID-19 is falling across England",
subtitle="Rolling 7-day rate of the number of individuals being tested per 100,000 population",
caption="Data from coronavirus.gov.uk | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDRegPosRates.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(APIdata2, date>as.Date("2020-11-01")))+
geom_line(aes(x=date, y=positivity/100, colour=name))+
scale_x_date(name="")+
scale_y_continuous(name="Positivity rate", labels=scales::label_percent(accuracy=1), limits=c(0,NA))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
scale_colour_paletteer_d("LaCroixColoR::paired", name="")+
labs(title="Test positivity is falling across England again",
subtitle="Rolling 7-day average proportion of COVID-19 tests returned as positive by specimen date",
caption="Data from coronavirus.gov.uk | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDRegTestsxCases.tiff", units="in", width=8, height=6, res=500)
ggplot(subset(APIdata2, date>as.Date("2020-11-01")))+
geom_path(aes(x=peoplerate, y=caserate, colour=name, alpha=date))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)))+
scale_colour_paletteer_d("LaCroixColoR::paired", name="")+
scale_alpha_date(guide="none")+
scale_x_continuous(name="Number of unique people tested per 100,000")+
scale_y_continuous(name="Number of positive test results per 100,000")+
labs(title="COVID-19 testing seems to have changed dramatically during the holidays",
subtitle="Rolling 7-day average rates of individuals being tested and positive results being returned",
caption="Data from coronavirus.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDTotalDeathsPyramid.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(scales)
library(extrafont)
library(ragg)
library(ggtext)
library(paletteer)
library(scales)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Download 2020 COVID deaths data by age
temp <- tempfile()
url2020 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx"
temp <- curl_download(url=url2020, destfile=temp, quiet=FALSE, mode="wb")
data20m <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B34:BC53",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2020, Sex="Male")
data20f <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B56:BC75",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2020, Sex="Female")
#2021
url2021 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx"
temp <- curl_download(url=url2021, destfile=temp, quiet=FALSE, mode="wb")
data21m <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B34:BB53",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2021, Sex="Male")
data21f <- read_excel(temp, sheet="Covid-19 - Weekly registrations", range="B56:BB75",
col_names=FALSE) %>%
gather(Week, Deaths, c(2:ncol(.))) %>%
set_names("Age", "Week", "Deaths") %>%
mutate(Week=as.numeric(substr(Week, 4,5))-1,
Year=2021, Sex="Female")
#2022 (in a different format, thanks for that ONS)
url2022 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2022/publicationfileweek182022.xlsx"
temp <- curl_download(url=url2022, destfile=temp, quiet=FALSE, mode="wb")
data22m <- read_excel(temp, sheet="4", range="A28:W46") %>%
select(-c(2,3)) %>%
gather(Age, Deaths, c(2:ncol(.))) %>%
set_names(c("Week", "Age", "Deaths")) %>%
mutate(Year=2022, Sex="Male")
data22f <- read_excel(temp, sheet="4", range="A49:W67") %>%
select(-c(2,3)) %>%
gather(Age, Deaths, c(2:ncol(.))) %>%
set_names(c("Week", "Age", "Deaths")) %>%
mutate(Year=2022, Sex="Female")
data <- bind_rows(data20f, data20m, data21f, data21m, data22f, data22m) %>%
mutate(Age=case_when(
Age=="01-04" ~ "1-4",
Age=="05-09" ~ "5-9",
TRUE ~Age)) %>%
group_by(Age, Sex) %>%
summarise(Deaths=sum(Deaths)) %>%
ungroup() %>%
mutate(plotdeaths=if_else(Sex=="Male", -Deaths, Deaths),
Age=factor(Age, levels=c("<1", "1-4", "5-9", "10-14", "15-19", "20-24", "25-29",
"30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64",
"65-69", "70-74", "75-79", "80-84", "85-89", "90+")))
agg_png("Outputs/COVIDTotalDeathsxAgexSex.png", units="in", width=8, height=8, res=800)
ggplot(data, aes(x=plotdeaths, y=Age, fill=Sex))+
geom_col()+
geom_vline(xintercept=0, colour="Grey40")+
scale_x_continuous(name="Total COVID deaths", limits=c(-25000, 25000),
breaks=c(-20000, -10000, 0, 10000, 20000),
labels=c("20,000", "10,000", "0", "10,000", "20,000"))+
scale_fill_manual(values=c("#00cc99", "#6600cc"), name="", guide = guide_legend(reverse = TRUE))+
theme_custom()+
theme(legend.position="top")+
labs(title="Total COVID-19 deaths by age and sex",
subtitle="Deaths in England & Wales registered up to 6th May 2022 where COVID-19 was mentioned on the death certificate",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
data2 <- bind_rows(data20f, data20m, data21f, data21m, data22f, data22m) %>%
mutate(Age=case_when(
Age=="01-04" ~ "1-4",
Age=="05-09" ~ "5-9",
TRUE ~Age)) %>%
group_by(Age, Sex, Year) %>%
summarise(Deaths=sum(Deaths)) %>%
ungroup() %>%
mutate(plotdeaths=if_else(Sex=="Male", -Deaths, Deaths),
Age=factor(Age, levels=c("<1", "1-4", "5-9", "10-14", "15-19", "20-24", "25-29",
"30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64",
"65-69", "70-74", "75-79", "80-84", "85-89", "90+")))
agg_png("Outputs/COVIDTotalDeathsxAgexSexxYear.png", units="in", width=8, height=8, res=800)
ggplot(data2, aes(x=plotdeaths, y=Age, fill=as.factor(Year)))+
geom_col(position="dodge")+
geom_vline(xintercept=0, colour="Grey40")+
scale_x_continuous(name="Total COVID deaths", limits=c(-11000, 11000),
breaks=c(-10000, -5000, 0, 5000, 10000),
labels=c("10,000", "5,000", "0", "5,000", "10,000"))+
scale_fill_paletteer_d("calecopal::superbloom3", name="")+
theme_custom()+
theme(legend.position="top")+
labs(title="COVID-19 deaths by age, sex and year",
subtitle="Deaths in England & Wales registered up to 6th May 2022 where COVID-19 was mentioned on the death certificate",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDUKUSADeathsxAge.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(lubridate)
library(ggtext)
library(extrafont)
library(ragg)
library(paletteer)
library(readxl)
library(scales)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"),
plot.subtitle=element_text(colour="Grey40", hjust=0, vjust=1),
plot.caption=element_text(colour="Grey40", hjust=1, vjust=1, size=rel(0.8)),
axis.text=element_text(colour="Grey40"),
axis.title=element_text(colour="Grey20"),
legend.text=element_text(colour="Grey40"),
legend.title=element_text(colour="Grey20"))
}
#Download US data from CDC website
USurl <- "https://data.cdc.gov/api/views/vsak-wrfu/rows.csv?accessType=DOWNLOAD"
temp <- tempfile()
temp <- curl_download(url=USurl, destfile=temp, quiet=FALSE, mode="wb")
USdata <- read.csv(temp) %>%
mutate(Country="USA", End.Week=as.Date(End.Week, format="%m/%d/%Y")) %>%
filter(Age.Group!="All Ages")
#US population data
USpopurl <- "https://www2.census.gov/programs-surveys/popest/technical-documentation/file-layouts/2010-2019/nc-est2019-agesex-res.csv"
temp <- tempfile()
temp <- curl_download(url=USpopurl, destfile=temp, quiet=FALSE, mode="wb")
USpop <- read.csv(temp) %>%
mutate(Sex=case_when(
SEX==0 ~ "All Sex",
SEX==1 ~ "Male",
TRUE ~ "Female")) %>%
select(Sex, AGE, POPESTIMATE2019) %>%
filter(AGE!=999) %>%
mutate(Age.Group=case_when(
AGE==0 ~ "Under 1 year", AGE<5 ~ "1-4 Years", AGE<15 ~ "5-14 Years", AGE<25 ~ "15-24 Years",
AGE<35 ~ "25-34 Years", AGE<45 ~ "35-44 Years", AGE<55 ~ "45-54 Years", AGE<65 ~ "55-64 Years",
AGE<75 ~ "65-74 Years", AGE<85 ~ "75-84 Years", TRUE ~ "85 Years and Over")) %>%
group_by(Age.Group, Sex) %>%
summarise(Pop=sum(POPESTIMATE2019)) %>%
ungroup()
#Read in UK data year by year
UKurl2021 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx"
temp <- curl_download(url=UKurl2021, destfile=temp, quiet=FALSE, mode="wb")
UKdata2021 <- read_excel(temp, sheet="Covid-19 - Weekly occurrences", range="B12:DC75",
col_names=FALSE) %>%
na.omit() %>%
mutate(Sex=rep(c("All Sex", "Male", "Female"), each=20)) %>%
gather(End.Week, COVID.19.Deaths, c(2:(ncol(.)-1))) %>%
mutate(End.Week=as.Date("2020-01-03")+weeks(as.numeric(substr(End.Week,4,6))-2)) %>%
rename(Age=`...1`) %>%
mutate(Country="UK", Age.Group=case_when(
Age=="<1" ~ "Under 1 year",
Age=="1-4" ~ "1-4 Years",
Age %in% c("5-9", "10-14") ~ "5-14 Years",
Age %in% c("15-19", "20-24") ~ "15-24 Years",
Age %in% c("25-29", "30-34") ~ "25-34 Years",
Age %in% c("35-39", "40-44") ~ "35-44 Years",
Age %in% c("45-49", "50-54") ~ "45-54 Years",
Age %in% c("55-59", "60-64") ~ "55-64 Years",
Age %in% c("65-69", "70-74") ~ "65-74 Years",
Age %in% c("75-79", "80-84") ~ "75-84 Years",
TRUE ~ "85 Years and Over")) %>%
group_by(End.Week, Age.Group, Country, Sex) %>%
summarise(COVID.19.Deaths=sum(COVID.19.Deaths)) %>%
ungroup()
#UK population data
EWpopurl <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2020geography.xls"
temp <- curl_download(url=EWpopurl, destfile=temp, quiet=FALSE, mode="wb")
EWpop.m <- as.data.frame(t(read_excel(temp, sheet="MYE2 - Males", range="E11:CQ11", col_names=FALSE))) %>%
mutate(Age=c(0:90)) %>%
rename(Male=V1)
EWpop.f <- as.data.frame(t(read_excel(temp, sheet="MYE2 - Females", range="E11:CQ11", col_names=FALSE))) %>%
mutate(Age=c(0:90)) %>%
rename(Female=V1)
EWpop <- merge(EWpop.m, EWpop.f) %>%
mutate(`All Sex`=Male+Female) %>%
mutate(Age.Group=case_when(
Age==0 ~ "Under 1 year", Age<5 ~ "1-4 Years", Age<15 ~ "5-14 Years", Age<25 ~ "15-24 Years",
Age<35 ~ "25-34 Years", Age<45 ~ "35-44 Years", Age<55 ~ "45-54 Years", Age<65 ~ "55-64 Years",
Age<75 ~ "65-74 Years", Age<85 ~ "75-84 Years", TRUE ~ "85 Years and Over")) %>%
group_by(Age.Group) %>%
summarise(Male=sum(Male), Female=sum(Female), `All Sex`=sum(`All Sex`)) %>%
ungroup() %>%
gather(Sex, Pop, c(2:4))
data <- bind_rows(UKdata2021 %>% merge(EWpop), USdata %>% merge(USpop)) %>%
select(End.Week, COVID.19.Deaths, Country, Age.Group, Sex, Pop) %>%
mutate(Age.Group=case_when(
Age.Group %in% c("Under 1 year", "1-4 Years", "5-14 Years") ~ "0-14 Years",
TRUE ~ Age.Group)) %>%
group_by(Age.Group, Sex, End.Week, Country) %>%
summarise(COVID.19.Deaths=sum(COVID.19.Deaths), Pop=sum(Pop)) %>%
ungroup() %>%
mutate(Age.Group=factor(Age.Group, levels=c("0-14 Years",
"15-24 Years", "25-34 Years", "35-44 Years",
"45-54 Years", "55-64 Years", "65-74 Years",
"75-84 Years", "85 Years and Over")),
MortRate=COVID.19.Deaths*100000/Pop)
agg_tiff("Outputs/COVIDDeathsUKUSA.tiff", units="in", width=10, height=8, res=500)
ggplot(data %>% filter(Sex=="All Sex"), aes(x=End.Week, y=MortRate, colour=Country))+
geom_line(show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="Weekly deaths per 100,000")+
scale_colour_paletteer_d("ggsci::uniform_startrek")+
facet_wrap(~Age.Group, scales="free_y")+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="Recent months have seen more COVID deaths in younger adults in the US than England & Wales",
subtitle="Registered COVID-19 deaths by date of occurrence in England & Wales and the USA",
caption="Data from ONS, CDC and the US Census Bureau")
dev.off()
collapse <- data %>%
filter(End.Week>=as.Date("2021-07-01") & Sex=="All Sex" & End.Week<=as.Date("2022-01-01")) %>%
group_by(Country, Age.Group) %>%
summarise(COVID.19.Deaths=sum(COVID.19.Deaths), Pop=unique(Pop)) %>%
ungroup() %>%
group_by(Country) %>%
mutate(AllDeaths=sum(COVID.19.Deaths), AllPop=sum(Pop)) %>%
ungroup() %>%
mutate(Deathprop=COVID.19.Deaths/AllDeaths, AllRate=AllDeaths/AllPop,
MortRate=COVID.19.Deaths*100000/Pop)
ratio <- collapse %>%
select(Country, Age.Group, MortRate) %>%
spread(Country, MortRate) %>%
mutate(ratio=USA/UK)
agg_png("Outputs/COVIDDeathsUKUSAProp.png", units="in", width=8, height=6, res=500)
ggplot(collapse, aes(x=Deathprop, y=Country, fill=Age.Group))+
geom_col()+
scale_x_continuous(name="Proportion of COVID deaths", labels=label_percent(accuracy=1))+
scale_y_discrete(name="", labels=c("E&W", "USA"))+
scale_fill_paletteer_d("RColorBrewer::Spectral", name="")+
theme_custom()+
labs(title="Recent COVID-19 deaths in the USA have been younger than England & Wales",
subtitle="Proportion of all COVID-19 deaths since 1st July 2021 by age group",
caption="Data from ONS & CDC")
dev.off()
agg_png("Outputs/COVIDDeathsUKUSABars.png", units="in", width=8, height=6, res=500)
ggplot(collapse, aes(y=Age.Group, x=MortRate, fill=Country))+
geom_col(position="dodge", show.legend=FALSE)+
scale_x_continuous(name="COVID-19 deaths per 100,000")+
scale_y_discrete(name="")+
scale_fill_paletteer_d("ggsci::uniform_startrek", name="")+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="Recent months have seen more COVID deaths in younger adults
in the US than England & Wales",
subtitle="Registered COVID-19 deaths in July-December 2021 by date of occurrence in England & Wales and the USA",
caption="Data from ONS, CDC and the US Census Bureau")
dev.off()
agg_png("Outputs/COVIDDeathsUKUSABarsAnnotated.png", units="in", width=8, height=6, res=500)
ggplot(collapse, aes(y=Age.Group, x=MortRate, fill=Country))+
geom_col(position="dodge", show.legend=FALSE)+
scale_x_continuous(name="COVID-19 deaths per 100,000")+
scale_y_discrete(name="")+
scale_fill_paletteer_d("ggsci::uniform_startrek", name="")+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="Recent months have seen more COVID deaths in younger adults
in the US than England & Wales",
subtitle="Registered COVID-19 deaths in July-December 2021 by date of occurrence in England & Wales and the USA",
caption="Data from ONS, CDC and the US Census Bureau")+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="85 Years and Over"]+10, y="85 Years and Over",
label=paste0("The US COVID death rate is ",
round(ratio$ratio[ratio$Age.Group=="85 Years and Over"], 1),
"
times higher than England & Wales")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="75-84 Years"]+50, y="75-84 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="75-84 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="65-74 Years"]+20, y="65-74 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="65-74 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="55-64 Years"]+3, y="55-64 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="55-64 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="45-54 Years"]+3, y="45-54 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="45-54 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="35-44 Years"]+3, y="35-44 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="35-44 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="25-34 Years"]+3, y="25-34 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="25-34 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="15-24 Years"]+3, y="15-24 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="15-24 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))+
geom_richtext(aes(x=ratio$UK[ratio$Age.Group=="0-14 Years"]+3, y="0-14 Years",
label=paste0("US ",
round(ratio$ratio[ratio$Age.Group=="0-14 Years"], 1), "x higher")),
text.colour="Grey50", fill = NA, label.color = NA, hjust=0, vjust=1, family="Lato", size=rel(3))
dev.off()
================================================
FILE: Heatmaps/COVIDUnvaxRisk.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(sf)
library(arrow)
library(extrafont)
library(paletteer)
library(gtools)
library(cowplot)
#Read in MSOA level vaccination rates
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/
maxdate <- "6th June"
vax <- tempfile()
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-10-June-2021.xlsx"
vax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode="wb")
vaxdata <- read_excel(vax, sheet="MSOA", range="F16:AF6806", col_names=FALSE) %>%
set_names("msoa11cd", "msoa11nm", "<30_1st", "30-34_1st", "35-39_1st", "40-44_1st",
"45-49_1st", "50-54_1st", "55-59_1st", "60-64_1st", "65-69_1st", "70-74_1st",
"75-79_1st", "80+_1st", "blank", "<30_2nd", "30-34_2nd", "35-39_2nd", "40-44_2nd",
"45-49_2nd", "50-54_2nd", "55-59_2nd", "60-64_2nd", "65-69_2nd", "70-74_2nd",
"75-79_2nd", "80+_2nd") %>%
select(-blank) %>%
pivot_longer(c(3:26), names_to=c("age", "dose"), names_sep="_", values_to="vaccinated")
#Read in NIMS populations
pop <- read_excel(vax, sheet="Population estimates (NIMS)", range="U16:AI6806", col_names=FALSE) %>%
select(-c(2,3)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop.NIMS, c(2:13)) %>%
mutate(age=case_when(
age=="...4" ~ "<30",
age=="...5" ~ "30-34",
age=="...6" ~ "35-39",
age=="...7" ~ "40-44",
age=="...8" ~ "45-49",
age=="...9" ~ "50-54",
age=="...10" ~ "55-59",
age=="...11" ~ "60-64",
age=="...12" ~ "65-69",
age=="...13" ~ "70-74",
age=="...14" ~ "75-79",
TRUE ~ "80+")) %>%
group_by(msoa11cd, age) %>%
summarise(pop.NIMS=sum(pop.NIMS)) %>%
ungroup()
#Read in ONS populations
pop2 <- read_excel(vax, sheet="Population estimates (ONS)", range="BW16:CK6806", col_names=FALSE) %>%
select(-c(2,3)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop.ONS, c(2:13)) %>%
mutate(age=case_when(
age=="...4" ~ "<30",
age=="...5" ~ "30-34",
age=="...6" ~ "35-39",
age=="...7" ~ "40-44",
age=="...8" ~ "45-49",
age=="...9" ~ "50-54",
age=="...10" ~ "55-59",
age=="...11" ~ "60-64",
age=="...12" ~ "65-69",
age=="...13" ~ "70-74",
age=="...14" ~ "75-79",
TRUE ~ "80+")) %>%
group_by(msoa11cd, age) %>%
summarise(pop.ONS=sum(pop.ONS)) %>%
ungroup()
#COMBINE
vaxdata <- merge(vaxdata, pop) %>%
merge(pop2)
mutate(vaxprop.NIMS=vaccinated/pop.NIMS,
vaxprop.ONS=vaccinated/pop.ONS)
#Bring in CFRs estimated by Dan Howdon
CFRdata <- read_csv_arrow("Data/cfrs_2021_06_07.csv") %>%
mutate(age=case_when(
agegroup==0 ~ "0-4", agegroup==5 ~ "5-9", agegroup==10 ~ "10-14", agegroup==15 ~ "15-19",
agegroup==20 ~ "20-24", agegroup==25 ~ "25-29", agegroup==30 ~ "30-34",
agegroup==35 ~ "35-39", agegroup==40 ~ "40-44", agegroup==45 ~ "45-49",
agegroup==50 ~ "50-54", agegroup==55 ~ "55-59", agegroup==60 ~ "60-64",
agegroup==65 ~ "65-69", agegroup==70 ~ "70-74", agegroup==75 ~ "75-79",
agegroup==80 ~ "80-84", agegroup==85 ~ "85-89", TRUE ~ "90+"),
date=as.Date(date, format="%d/%m/%Y"),
age = age %>% str_replace("_", "-") %>%
factor(levels=c("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "55-59",
"60-64", "65-69", "70-74", "75-79",
"80-84", "85-89", "90+")))
maxCFRdate <- max(CFRdata$date[!is.na(CFRdata$cfr_month)])
#Just extract the most recent monthly CFRs
CFRs <- CFRdata %>%
filter(date==maxCFRdate) %>%
mutate(CFR=cfr_month*100) %>%
select(age, CFR)
#Here are the latest age-specific CFRs:
#CFRs <- tibble::tribble(
# ~age, ~CFR,
# "0-4", 0,
# "5-9", 0,
# "10-14", 0,
# "15-19", 0.02164,
# "20-24", 0,
# "25-29", 0,
# "30-34", 0,
# "35-39", 0.0242269,
# "40-44", 0.0289471,
# "45-49", 0.2123436,
# "50-54", 0.2208057,
# "55-59", 0.5648288,
# "60-64", 0.4692304,
# "65-69", 3.5336073,
# "70-74", 4.1047055,
# "75-79", 6.2152125,
# "80-84", 11.6088927,
# "85-89", 16.7702883,
# "90+", 22.6581156)
#Condense to age groups to match the vaxdata. Pop group weights from ONS mid-year estimates
CFRs <- CFRs %>%
mutate(weight=case_when(
age=="0-4" ~ 3299637,
age=="5-9"~ 3538206,
age=="10-14" ~ 3354246,
age=="15-19" ~ 3090232,
age=="20-24" ~ 3487863,
age=="25-29" ~ 3801409,
age=="80-84" ~ 1439913,
age=="85-89" ~ 879778,
age=="90+" ~ 517273,
TRUE ~ 1),
wgt_cfr=weight*CFR,
age=case_when(
as.character(age) %in% c("0-4", "5-9", "10-14", "15-19", "20-24", "25-29") ~ "<30",
as.character(age) %in% c("80-84", "85-89", "90+") ~ "80+",
TRUE ~ as.character(age))) %>%
group_by(age) %>%
summarise(CFR=sum(wgt_cfr)/sum(weight)) %>%
ungroup()
data <- merge(vaxdata, CFRs) %>%
rowwise() %>%
mutate(ex_deaths.NIMS=max((pop.NIMS-vaccinated),0)*CFR/100,
ex_deaths.ONS=max((pop.ONS-vaccinated),0)*CFR/100) %>%
group_by(msoa11nm, msoa11cd, dose) %>%
summarise(ex_deaths.NIMS=sum(ex_deaths.NIMS), ex_deaths.ONS=sum(ex_deaths.ONS),
unvax.NIMS=sum(pop.NIMS-vaccinated), pop.NIMS=sum(pop.NIMS),
unvax.ONS=sum(max(pop.ONS-vaccinated),0),
pop.ONS=sum(pop.ONS)) %>%
ungroup() %>%
mutate(ex_deathrate.NIMS=ex_deaths.NIMS*100000/pop.NIMS,
ex_deathrate.ONS=ex_deaths.ONS*100000/pop.ONS)
#Download Carl Baker's lovely cartogram
msoa <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
msoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode="wb")
BackgroundMSOA <- st_read(msoa, layer="5 Background")
MSOA <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(data, by="msoa11cd")
GroupsMSOA <- st_read(msoa, layer="2 Groups")
Group_labelsMSOA <- st_read(msoa, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAsMSOA <- st_read(msoa, layer="3 Local authority outlines (2019)")
Unvaxrisk.NIMS <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill="White")+
geom_sf(data=MSOA %>% filter(dose=="1st"),
aes(geometry=geom, fill=ex_deathrate.NIMS), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.amp",
name="Expected deaths per 100,000 adults",
limits=c(0,500))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), legend.position="top",
plot.title.position="plot", plot.caption.position="plot")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="London has the highest risk through non-vaccination",
subtitle=paste0("Expected maximum rate of COVID mortality if every unvaccinated person contracted COVID.\nUsing recent Case Fatality Rates and ignoring immunity acquired through prior infection,\nand assuming that a single dose of vaccine is 100% effective.\nData up to ", maxdate, "\n "),
caption="Vaccine data from NHS England, Populations from NIMS\nCFRs from Dan Howdon, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogramUnVaxRiskNIMS.tiff", units="in", width=8, height=9, res=800)
Unvaxrisk.NIMS
dev.off()
Unvaxrisk.ONS <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill="White")+
geom_sf(data=MSOA %>% filter(dose=="1st"),
aes(geometry=geom, fill=ex_deathrate.ONS), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.amp",
name="Expected deaths per 100,000 adults",
limits=c(0,500))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), legend.position="top",
plot.title.position="plot", plot.caption.position="plot")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="London has the highest risk through non-vaccination",
subtitle=paste0("Expected maximum rate of COVID mortality if every unvaccinated person contracted COVID.\nUsing recent Case Fatality Rates and ignoring immunity acquired through prior infection,\nand assuming that a single dose of vaccine is 100% effective.\nData up to ", maxdate, "\n "),
caption="Vaccine data from NHS England, Populations from ONS\nCFRs from Dan Howdon, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogramUnVaxRiskONS.tiff", units="in", width=8, height=9, res=800)
Unvaxrisk.ONS
dev.off()
#Incorporate estimates of vaccine effectiveness from James Ward (@JamesWard73)
#https://twitter.com/JamesWard73/status/1403496072606064642
VE1st=0.8
VE2nd=0.96
#Protection of 1st dose vs. death
data1 <- merge(vaxdata, CFRs) %>%
pivot_wider(id_cols=c("age", "msoa11cd", "msoa11nm", "pop.NIMS", "pop.ONS",
"CFR"),
names_from=dose,
values_from=vaccinated) %>%
rowwise() %>%
mutate(ex_deaths.NIMS=#unvaccinated risk
(pop.NIMS-`1st`)*CFR/100+
#1st dose onlyrisk
(`1st`-`2nd`)*(1-VE1st)*CFR/100+
#2nd dose risk
`2nd`*(1-VE2nd)*CFR/100,
ex_deaths.ONS=#unvaccinated risk
max((pop.ONS-`1st`),0)*CFR/100+
#1st dose onlyrisk
(`1st`-`2nd`)*(1-VE1st)*CFR/100+
#2nd dose risk
`2nd`*(1-VE2nd)*CFR/100) %>%
group_by(msoa11nm, msoa11cd) %>%
summarise(ex_deaths.NIMS=sum(ex_deaths.NIMS),pop.NIMS=sum(pop.NIMS),
ex_deaths.ONS=sum(ex_deaths.ONS),pop.ONS=sum(pop.ONS)) %>%
ungroup() %>%
mutate(ex_deathrate.NIMS=ex_deaths.NIMS*100000/pop.NIMS,
ex_deathrate.ONS=ex_deaths.ONS*100000/pop.ONS) %>%
#Remove MSOAs close to the Welsh border with questionable vaccination rates
filter(!msoa11nm %in% c("Wigmore, Orleton & Brimfield",
"Clun & Bucknell",
"Gobowen, St Martin's & Weston Rhyn",
"Tidenham & Woolaston",
"Lydbrook, Newland & St Briavels",
"Penyard, Llangarron & Goodrich",
"Golden Valley",
"Ellesmere",
"Trefonen & Pant",
"Kington, Eardisley & Staunton",
"Bishop's Castle, Brockton & Chirbury"))
MSOA2 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(data1, by="msoa11cd")
Unvaxrisk2.NIMS <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill="White")+
geom_sf(data=MSOA2 %>% filter(RegionNation!="Wales"),
aes(geometry=geom, fill=ex_deathrate.NIMS), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.amp",
name="Expected deaths per 100,000 adults", limits=c(0,800))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), legend.position="top",
plot.title.position="plot", plot.caption.position="plot")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="London has the highest risk through non-vaccination",
subtitle=paste0("Expected maximum rate of COVID mortality if every unvaccinated person contracted COVID.\nUsing recent age-specific Case Fatality Rates estimated by Dan Howdon and vaccine\neffectiveness estimates calculated by James Ward. This map ignore immunity acquired\nthrough prior infection. A small number of areas on the Welsh border have been censored\ndue to questionable vaccination data\nData up to ", maxdate, "\n "),
caption="Data from NHS England, Populations from NIMS,\nCFRs from Dan Howdon and vaccine effectiveness estimates from James Ward\nCartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogramUnVaxRisk2NIMS.tiff", units="in", width=7.5, height=9, res=800)
Unvaxrisk2.NIMS
dev.off()
Unvaxrisk2.ONS <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill="White")+
geom_sf(data=MSOA2 %>% filter(RegionNation!="Wales"),
aes(geometry=geom, fill=ex_deathrate.ONS), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.amp",
name="Expected deaths per 100,000 adults", limits=c(0,800))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), legend.position="top",
plot.title.position="plot", plot.caption.position="plot")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="London has the highest risk through non-vaccination",
subtitle=paste0("Expected maximum rate of COVID mortality if every unvaccinated person contracted COVID.\nUsing recent age-specific Case Fatality Rates estimated by Dan Howdon and vaccine\neffectiveness estimates calculated by James Ward. This map ignore immunity acquired\nthrough prior infection. A small number of areas on the Welsh border have been censored\ndue to questionable vaccination data\nData up to ", maxdate, "\n "),
caption="Data from NHS England, Populations from ONS,\nCFRs from Dan Howdon and vaccine effectiveness estimates from James Ward\nCartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogramUnVaxRisk2ONS.tiff", units="in", width=7.5, height=9, res=800)
Unvaxrisk2.ONS
dev.off()
#Bivariate map of risk vs. case rates
#Read in MSOA-level case data from the dashboard
caseurl <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv"
cases <- tempfile()
cases <- curl_download(url=caseurl, destfile=cases, quiet=FALSE, mode="wb")
casedata <- read.csv(cases) %>%
mutate(date=as.Date(date)) %>%
filter(date==max(date)) %>%
rename(caserate=newCasesBySpecimenDateRollingRate, msoa11cd=areaCode) %>%
select(caserate, msoa11cd) %>%
merge(data1, by="msoa11cd", all.y=TRUE)
temp <- casedata %>%
filter(is.na(caserate)) %>%
mutate(casetert=1)
casedata2 <- casedata %>%
filter(!is.na(caserate)) %>%
mutate(casetert=quantcut(caserate, q=2, labels=FALSE)+1) %>%
bind_rows(temp) %>%
mutate(risktert=quantcut(ex_deathrate.NIMS, q=3, labels=FALSE),
key=case_when(
casetert==1 & risktert==3 ~ 1,
casetert==1 & risktert==2 ~ 2,
casetert==1 & risktert==1 ~ 3,
casetert==2 & risktert==3 ~ 4,
casetert==2 & risktert==2 ~ 5,
casetert==2 & risktert==1 ~ 6,
casetert==3 & risktert==3 ~ 7,
casetert==3 & risktert==2 ~ 8,
TRUE ~ 9),
fillcolour=case_when(
key==1 ~ "#f0f0f0", key==2 ~ "#a0dcdd", key==3 ~ "#00cfc1",
key==4 ~ "#ffa2aa", key==5 ~ "#afa7b7", key==6 ~ "#44b4cb",
key==7 ~ "#ff3968", key==8 ~ "#c066b2", TRUE ~ "#6d87cc"))
MSOA3 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(casedata2, by="msoa11cd")
#generate dataframe for key
keydata <- MSOA3 %>%
filter(!is.na(fillcolour)) %>%
group_by(casetert, risktert) %>%
summarise(RGB=unique(fillcolour))
plot.full <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA3 %>% filter(RegionNation!="Wales"),
aes(geometry=geom, fill=fillcolour), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black", family="Lato")+
scale_fill_identity(na.value="Black")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.title.position = "panel")+
labs(title="Comparing COVID-19 infection rates with overall mortality risks",
subtitle="Expected maximum rate of COVID mortality if every unvaccinated person contracted COVID,\ncompared with current case rates. Case rates are censored for areas with fewer than 3 cases,\nwhich currently covers the majority of areas. As a result there are considerably more areas in\nthe lowest category of case rates.",
caption="Data from NHS England & coronavirus.data.gov.uk,\nCFRs from Dan Howdon and vaccine effectiveness estimates from James Ward\nCartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
key <- ggplot(keydata)+
geom_tile(aes(x=casetert, y=-risktert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("More COVID cases" %->% ""),
y = expression("Lower mortality risk" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank(),
text=element_text(family="Lato"))+
# quadratic tiles
coord_fixed()
agg_tiff("Outputs/COVIDBivariateCasesRisk.tiff", units="in", width=8, height=10, res=800)
ggdraw()+
draw_plot(plot.full, 0,0,1,1)+
draw_plot(key, 0.66,0.64,0.26,0.26)
dev.off()
================================================
FILE: Heatmaps/COVIDVaccinationAnimations.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(sf)
library(scales)
library(ragg)
library(extrafont)
library(ggrepel)
library(gganimate)
library(paletteer)
#Read in data for vax rates over 50, available since 25th March
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/
#25th March file
temp1 <- tempfile()
url1 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx"
temp1 <- curl_download(url=url1, destfile=temp1, quiet=FALSE, mode="wb")
data1 <- read_excel(temp1, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`,
`70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(age, vaccinated, c(3:10)) %>%
mutate(date=as.Date("2021-03-21"))
pop1 <- read_excel(temp1, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
select(-c(2)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:10)) %>%
mutate(age=case_when(
age=="...3" ~ "<16",
age=="...4" ~ "<50",
age=="...5" ~ "50-54",
age=="...6" ~ "55-59",
age=="...7" ~ "60-64",
age=="...8" ~ "65-69",
age=="...9" ~ "70-74",
age=="...10" ~ "75-79",
TRUE ~ "80+"))
data1 <- merge(data1, pop1)
#1st April file
temp2 <- tempfile()
url2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-1-April-2021.xlsx"
temp2 <- curl_download(url=url2, destfile=temp2, quiet=FALSE, mode="wb")
data2 <- read_excel(temp2, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`,
`70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(age, vaccinated, c(3:10)) %>%
mutate(date=as.Date("2021-03-28"))
pop2 <- read_excel(temp2, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
select(-c(2)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:10)) %>%
mutate(age=case_when(
age=="...3" ~ "<16",
age=="...4" ~ "<50",
age=="...5" ~ "50-54",
age=="...6" ~ "55-59",
age=="...7" ~ "60-64",
age=="...8" ~ "65-69",
age=="...9" ~ "70-74",
age=="...10" ~ "75-79",
TRUE ~ "80+"))
data2 <- merge(data2, pop2)
#8th April file
temp3 <- tempfile()
url3 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-8-April-2021.xlsx"
temp3 <- curl_download(url=url3, destfile=temp3, quiet=FALSE, mode="wb")
data3 <- read_excel(temp3, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`,
`70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(age, vaccinated, c(3:10)) %>%
mutate(date=as.Date("2021-04-04"))
pop3 <- read_excel(temp3, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
select(-c(2)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:10)) %>%
mutate(age=case_when(
age=="...3" ~ "<16",
age=="...4" ~ "<50",
age=="...5" ~ "50-54",
age=="...6" ~ "55-59",
age=="...7" ~ "60-64",
age=="...8" ~ "65-69",
age=="...9" ~ "70-74",
age=="...10" ~ "75-79",
TRUE ~ "80+"))
data3 <- merge(data3, pop3)
#15th April file
temp4 <- tempfile()
url4 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-15-April-2021.xlsx"
temp4 <- curl_download(url=url4, destfile=temp4, quiet=FALSE, mode="wb")
data4 <- read_excel(temp4, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`,
`70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(age, vaccinated, c(3:10)) %>%
mutate(date=as.Date("2021-04-11"))
pop4 <- read_excel(temp4, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
select(-c(2)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:10)) %>%
mutate(age=case_when(
age=="...3" ~ "<16",
age=="...4" ~ "<50",
age=="...5" ~ "50-54",
age=="...6" ~ "55-59",
age=="...7" ~ "60-64",
age=="...8" ~ "65-69",
age=="...9" ~ "70-74",
age=="...10" ~ "75-79",
TRUE ~ "80+"))
data4 <- merge(data4, pop4)
#22nd April file
temp5 <- tempfile()
url5 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-22-April-2021.xlsx"
temp5 <- curl_download(url=url5, destfile=temp5, quiet=FALSE, mode="wb")
data5 <- read_excel(temp5, sheet="MSOA", range="F16:P6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`, `45-49`=`...4`, `50-54`=`...5`,
`55-59`=`...6`, `60-64`=`...7`,
`65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(age, vaccinated, c(3:11)) %>%
mutate(date=as.Date("2021-04-18"),
age=if_else(age %in% c("<45", "45-49"), "<50", age)) %>%
group_by(age, msoa11cd, msoa11nm, date) %>%
summarise(vaccinated=sum(vaccinated)) %>%
ungroup()
pop5 <- read_excel(temp5, sheet="Population estimates (NIMS)", range="R16:AC6806", col_names=FALSE) %>%
select(-c(2)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:11)) %>%
mutate(age=case_when(
age=="...3" ~ "<16",
age %in% c("...4", "...5") ~ "<50",
age=="...6" ~ "50-54",
age=="...7" ~ "55-59",
age=="...8" ~ "60-64",
age=="...9" ~ "65-69",
age=="...10" ~ "70-74",
age=="...11" ~ "75-79",
TRUE ~ "80+")) %>%
group_by(msoa11cd, age) %>%
summarise(pop=sum(pop)) %>%
ungroup()
data5 <- merge(data5, pop5)
#29th April file
temp6 <- tempfile()
url6 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-29-April-2021.xlsx"
temp6 <- curl_download(url=url6, destfile=temp6, quiet=FALSE, mode="wb")
data6 <- read_excel(temp6, sheet="MSOA", range="F16:P6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`, `45-49`=`...4`, `50-54`=`...5`,
`55-59`=`...6`, `60-64`=`...7`,
`65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(age, vaccinated, c(3:11)) %>%
mutate(date=as.Date("2021-04-25"),
age=if_else(age %in% c("<45", "45-49"), "<50", age)) %>%
group_by(age, msoa11cd, msoa11nm, date) %>%
summarise(vaccinated=sum(vaccinated)) %>%
ungroup()
pop6 <- read_excel(temp6, sheet="Population estimates (NIMS)", range="R16:AC6806", col_names=FALSE) %>%
select(-c(2)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:11)) %>%
mutate(age=case_when(
age=="...3" ~ "<16",
age %in% c("...4", "...5") ~ "<50",
age=="...6" ~ "50-54",
age=="...7" ~ "55-59",
age=="...8" ~ "60-64",
age=="...9" ~ "65-69",
age=="...10" ~ "70-74",
age=="...11" ~ "75-79",
TRUE ~ "80+")) %>%
group_by(msoa11cd, age) %>%
summarise(pop=sum(pop)) %>%
ungroup()
data6 <- merge(data6, pop6)
#Merge them all together
data <- bind_rows(data1, data2, data3, data4, data5, data6) %>%
mutate(vaxprop=vaccinated/pop)
#Calculate IMD at MSOA level
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE)[,c(1,2,5,6)]
colnames(IMD) <- c("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
temp <- tempfile()
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, RGN11NM) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read_excel(file.path(temp2, "SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx"),
sheet="Mid-2019 Persons", range="A6:G34758", col_names=FALSE)[,c(1,7)]
colnames(pop) <- c("LSOA11CD", "pop")
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup()
data_IMD <- data %>%
merge(IMD_MSOA %>% select(-pop), by.x="msoa11cd", by.y="MSOA11CD")
#Download Carl Baker's lovely cartogram
msoa <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
msoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode="wb")
BackgroundMSOA <- st_read(msoa, layer="5 Background")
MSOA <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(data_IMD, by="msoa11cd")
GroupsMSOA <- st_read(msoa, layer="2 Groups")
Group_labelsMSOA <- st_read(msoa, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAsMSOA <- st_read(msoa, layer="3 Local authority outlines (2019)")
#Local analysis
scatterdata <- MSOA %>%
filter(Laname=="Sheffield" & age %in% c("80+", "75-79", "70-74", "65-69", "60-64",
"55-59", "50-54")) %>%
group_by(msoa11cd, MSOA.name.HCL, IMDrank, date) %>%
summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>%
ungroup() %>%
mutate(vaxprop=vaccinated/pop) %>%
group_by(msoa11cd) %>%
mutate(labels=if_else(max(vaxprop)<0.8, unique(MSOA.name.HCL), "")) %>%
ungroup()
Sheffanim <- ggplot(scatterdata, aes(x=vaxprop, y=-IMDrank))+
geom_point(aes(size=pop), shape=21, colour="DarkRed", fill="tomato", alpha=0.8)+
geom_segment(aes(x=1, xend=1, y=-1000, yend=-32000), colour="Grey70")+
geom_text_repel(aes(label=labels), family="Roboto", size=rel(3),
box.padding = 0.4, seed=19)+
scale_x_continuous(name="Proportion of population aged 50+ vaccinated",
labels=label_percent(accuracy=1), limits=c(NA, 1))+
scale_y_continuous(name="Index of Multiple Deprivation rank", breaks=c(-1000, -32000),
labels=c("Most deprived", "Least deprived"))+
scale_size_continuous(name="Over 50\npopulation")+
theme_classic()+
theme(axis.ticks.y=element_blank(), text=element_text(family="Roboto"),
axis.text.y=element_text(size=rel(1.2), colour="Black"),
plot.title.position="plot", plot.title=element_text(face="bold", size=rel(1.4)),
plot.subtitle=element_text(colour="Grey50"), plot.caption.position ="plot",
plot.caption=element_text(colour="Grey50"))+
ggtitle("Vaccine delivery is lowest in a small number of deprived areas in Sheffield",
subtitle="Proportion of adults aged 50+ who had received at least one dose of COVID-19 vaccine by {closest_state}")+
labs(caption="Data from NHS England, populations from NIMS\nPlot by @VictimOfMaths")+
transition_states(date, transition_length=2, state_length=1, wrap=FALSE)
animate(Sheffanim, units="in", width=8, height=8*4/5, res=500,
renderer=gifski_renderer("Outputs/COVIDVaxSheffScatterAnim.gif"),
device="ragg_png", end_pause=5, duration=10, fps=8)
###############################################
#Bring in older vaccination data
#18th March
temp7 <- tempfile()
url7 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-18-March-2021-revised.xlsx"
temp7 <- curl_download(url=url7, destfile=temp7, quiet=FALSE, mode="wb")
data7 <- read_excel(temp7, sheet="MSOA", range="F16:N6806", col_names=FALSE) %>%
mutate(vaccinated=`...3`+`...4`+`...5`+`...6`+`...7`+`...8`+`...9`,
date=as.Date("2021-03-14")) %>%
rename(msoa11cd=`...1`) %>%
select(msoa11cd, vaccinated, date)
pop7 <- read_excel(temp7, sheet="Population estimates (NIMS)", range="N16:X6806", col_names=FALSE) %>%
select(`...1`, `...11`) %>%
rename(msoa11cd=`...1`, pop=`...11`)
data7 <- merge(data7, pop7)
#11th March
temp8 <- tempfile()
url8 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-11-March-2021.xlsx"
temp8 <- curl_download(url=url8, destfile=temp8, quiet=FALSE, mode="wb")
data8 <- read_excel(temp8, sheet="MSOA", range="F16:M6806", col_names=FALSE) %>%
mutate(vaccinated=`...3`+`...4`+`...5`+`...6`+`...7`+`...8`,
date=as.Date("2021-03-07")) %>%
rename(msoa11cd=`...1`) %>%
select(msoa11cd, vaccinated, date)
pop8 <- read_excel(temp8, sheet="Population estimates (NIMS)", range="M16:V6806", col_names=FALSE) %>%
select(`...1`, `...10`) %>%
rename(msoa11cd=`...1`, pop=`...10`)
data8 <- merge(data8, pop8)
#4th March
temp9 <- tempfile()
url9 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-4-March-2021-1.xlsx"
temp9 <- curl_download(url=url9, destfile=temp8, quiet=FALSE, mode="wb")
data9 <- read_excel(temp9, sheet="MSOA", range="F16:L6806", col_names=FALSE) %>%
mutate(vaccinated=`...3`+`...4`+`...5`+`...6`+`...7`,
date=as.Date("2021-02-28")) %>%
rename(msoa11cd=`...1`) %>%
select(msoa11cd, vaccinated, date)
pop9 <- read_excel(temp9, sheet="Population estimates (NIMS)", range="L16:T6806", col_names=FALSE) %>%
select(`...1`, `...9`) %>%
rename(msoa11cd=`...1`, pop=`...9`)
data9 <- merge(data9, pop9)
#Extract total vaccinated data by MSOA and date
totaldata <- data %>%
group_by(msoa11cd, date) %>%
summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>%
ungroup() %>%
bind_rows(totaldata, data7, data8, data9) %>%
mutate(vaxprop=vaccinated/pop)
#Merge into cartogram
MSOA2 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(totaldata, by="msoa11cd")
TotalAnim <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA2,
aes(geometry=geom, fill=vaxprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of\npopulation\nvaccinated", limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Roboto"))+
ggtitle("Overall adult vaccination rates by {closest_state}",
subtitle="Proportion of adults (aged 16+) vaccinated in England by MSOA")+
labs(caption="Data from NHS England and ONS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")+
transition_states(date, wrap=FALSE)
animate(TotalAnim, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/COVIDVaxRatesMSOAAnim.gif"),
device="ragg_png", end_pause=60)
================================================
FILE: Heatmaps/COVIDVaccinationInequalityGB.R
================================================
rm(list=ls())
library(tidyverse)
library(readxl)
library(curl)
library(scales)
library(extrafont)
library(paletteer)
library(ragg)
#Read in Scottish and Welsh data, compiled from sources only available in pdf table (thanks folks)
#Scotland: https://beta.isdscotland.org/find-publications-and-data/population-health/covid-19/covid-19-statistical-report/
#Wales: http://www2.nphs.wales.nhs.uk:8080/CommunitySurveillanceDocs.nsf/3dc04669c9e1eaa880257062003b246b/e61c928e715ece3180258680003449c3/$FILE/Wales%20COVID-19%20vaccination%20enhanced%20surveillance%20-%20equality%20report.pdf
swdata <- read_excel("Data/COVIDUKVaxIneq.xlsx", range="A1:G201")
#Read in English data
#MSOA data 1st reported in 25th Feb file
temp <- tempfile()
url1 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-February-2021-revised.xlsx"
temp <- curl_download(url=url1, destfile=temp, quiet=FALSE, mode="wb")
edata1 <- read_excel(temp, sheet="Vaccinations by MSOA", range="F16:K6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u70=`...3`, `70-74`=`...4`, `75-79`=`...5`, `80+`=...6) %>%
gather(Age, Vax, c(3:6)) %>%
mutate(Date=as.Date("2021-02-21"))
#4th March file
url2 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-4-March-2021-1.xlsx"
temp <- curl_download(url=url2, destfile=temp, quiet=FALSE, mode="wb")
edata2 <- read_excel(temp, sheet="MSOA", range="F16:L6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u65=`...3`, `65-69`=`...4`, `70-74`=`...5`,
`75-79`=`...6`, `80+`=...7) %>%
gather(Age, Vax, c(3:7)) %>%
mutate(Date=as.Date("2021-02-28"))
#4th March file is the first time NIMS population denominators are available,
#use these for the 25th Feb data
pop2 <- read_excel(temp, sheet="Population estimates (NIMS)", range="L16:S6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u65`=`...4`, `65-69`=`...5`, `70-74`=`...6`,
`75-79`=`...7`, `80+`=...8) %>%
gather(Age, Pop, c(3:8)) %>%
select(-"msoa11nm")
pop1 <- pop2 %>%
mutate(Age=case_when(
Age %in% c("u65", "65-69") ~ "u70",
TRUE ~ Age)) %>%
group_by(msoa11cd, Age) %>%
summarise(Pop=sum(Pop)) %>%
ungroup()
edata1 <- merge(edata1, pop1)
edata2 <- merge(edata2, pop2)
#11th March file
url3 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-11-March-2021.xlsx"
temp <- curl_download(url=url3, destfile=temp, quiet=FALSE, mode="wb")
edata3 <- read_excel(temp, sheet="MSOA", range="F16:M6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u60=`...3`, `60-64`=`...4`, `65-69`=`...5`,
`70-74`=`...6`, `75-79`=`...7`, `80+`=`...8`) %>%
gather(Age, Vax, c(3:8)) %>%
mutate(Date=as.Date("2021-03-07"))
pop3 <- read_excel(temp, sheet="Population estimates (NIMS)", range="M16:U6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u60`=`...4`, `60-64`=`...5`, `65-69`=`...6`,
`70-74`=`...7`, `75-79`=`...8`, `80+`=`...9`) %>%
gather(Age, Pop, c(3:9)) %>%
select(-"msoa11nm")
edata3 <- merge(edata3, pop3)
#18th March file
url4 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-18-March-2021-revised.xlsx"
temp <- curl_download(url=url4, destfile=temp, quiet=FALSE, mode="wb")
edata4 <- read_excel(temp, sheet="MSOA", range="F16:N6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u55=`...3`, `55-59`=`...4`, `60-64`=`...5`,
`65-69`=`...6`, `70-74`=`...7`, `75-79`=`...8`, `80+`=`...9`) %>%
gather(Age, Vax, c(3:9)) %>%
mutate(Date=as.Date("2021-03-14"))
pop4 <- read_excel(temp, sheet="Population estimates (NIMS)", range="N16:W6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u55`=`...4`, `55-59`=`...5`, `60-64`=`...6`,
`65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(Age, Pop, c(3:10)) %>%
select(-"msoa11nm")
edata4 <- merge(edata4, pop4)
#25th March file
url5 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx"
temp <- curl_download(url=url5, destfile=temp, quiet=FALSE, mode="wb")
edata5 <- read_excel(temp, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(Age, Vax, c(3:10)) %>%
mutate(Date=as.Date("2021-03-21"))
pop5 <- read_excel(temp, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`,
`60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(Age, Pop, c(3:11)) %>%
select(-"msoa11nm")
edata5 <- merge(edata5, pop5)
#1st April file
url6 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx"
temp <- curl_download(url=url6, destfile=temp, quiet=FALSE, mode="wb")
edata6 <- read_excel(temp, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(Age, Vax, c(3:10)) %>%
mutate(Date=as.Date("2021-03-28"))
pop6 <- read_excel(temp, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`,
`60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(Age, Pop, c(3:11)) %>%
select(-"msoa11nm")
edata6 <- merge(edata6, pop6)
#8th April file
url7 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx"
temp <- curl_download(url=url7, destfile=temp, quiet=FALSE, mode="wb")
edata7 <- read_excel(temp, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(Age, Vax, c(3:10)) %>%
mutate(Date=as.Date("2021-04-04"))
pop7 <- read_excel(temp, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`,
`60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(Age, Pop, c(3:11)) %>%
select(-"msoa11nm")
edata7 <- merge(edata7, pop7)
#15th April file
url8 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-15-April-2021.xlsx"
temp <- curl_download(url=url8, destfile=temp, quiet=FALSE, mode="wb")
edata8 <- read_excel(temp, sheet="MSOA", range="F16:O6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`,
`60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>%
gather(Age, Vax, c(3:10)) %>%
mutate(Date=as.Date("2021-04-11"))
pop8 <- read_excel(temp, sheet="Population estimates (NIMS)", range="O16:Y6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`,
`60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(Age, Pop, c(3:11)) %>%
select(-"msoa11nm")
edata8 <- merge(edata8, pop8)
#22nd April file
url9 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-22-April-2021.xlsx"
temp <- curl_download(url=url9, destfile=temp, quiet=FALSE, mode="wb")
edata9 <- read_excel(temp, sheet="MSOA", range="F16:P6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`, `45-49`=`...4`, `50-54`=`...5`,
`55-59`=`...6`, `60-64`=`...7`,
`65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(Age, Vax, c(3:11)) %>%
mutate(Date=as.Date("2021-04-18"))
pop9 <- read_excel(temp, sheet="Population estimates (NIMS)", range="R16:AC6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u45`=`...4`, `45-49`=`...5`, `50-54`=`...6`,
`55-59`=`...7`, `60-64`=`...8`, `65-69`=`...9`, `70-74`=`...10`, `75-79`=`...11`,
`80+`=`...12`) %>%
gather(Age, Pop, c(3:12)) %>%
select(-"msoa11nm")
edata9 <- merge(edata9, pop9)
#29th April file
url10 <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-29-April-2021-.xlsx"
temp <- curl_download(url=url10, destfile=temp, quiet=FALSE, mode="wb")
edata10 <- read_excel(temp, sheet="MSOA", range="F16:P6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`, `45-49`=`...4`, `50-54`=`...5`,
`55-59`=`...6`, `60-64`=`...7`,
`65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>%
gather(Age, Vax, c(3:11)) %>%
mutate(Date=as.Date("2021-04-25"))
pop10 <- read_excel(temp, sheet="Population estimates (NIMS)", range="R16:AC6806", col_names=FALSE) %>%
rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u45`=`...4`, `45-49`=`...5`, `50-54`=`...6`,
`55-59`=`...7`, `60-64`=`...8`, `65-69`=`...9`, `70-74`=`...10`, `75-79`=`...11`,
`80+`=`...12`) %>%
gather(Age, Pop, c(3:12)) %>%
select(-"msoa11nm")
edata10 <- merge(edata10, pop10)
#Calculate MSOA-level IMD decile
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE)[,c(1,2,5,6)]
colnames(IMD) <- c("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
temp <- tempfile()
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, RGN11NM) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read_excel(file.path(temp2, "SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx"),
sheet="Mid-2019 Persons", range="A6:G34758", col_names=FALSE)[,c(1,7)]
colnames(pop) <- c("LSOA11CD", "pop")
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
arrange(-IMDrank) %>%
#Calculate weighted deciles (there must be a function to do this elegantly)
mutate(rank=1:nrow(.), cumsum=cumsum(pop), prop=cumsum/max(cumsum),
IMD=case_when(
prop<0.1 ~ 1,
prop<0.2 ~ 2,
prop<0.3 ~ 3,
prop<0.4 ~ 4,
prop<0.5 ~ 5,
prop<0.6 ~ 6,
prop<0.7 ~ 7,
prop<0.8 ~ 8,
prop<0.9 ~ 9,
TRUE ~ 10)) %>%
select(MSOA11CD, IMD)
#Bring together
edata <- bind_rows(edata1, edata2, edata3, edata4, edata5, edata6, edata7, edata8, edata9, edata10) %>%
merge(IMD_MSOA, by.x="msoa11cd", by.y="MSOA11CD") %>%
group_by(Age, Date, IMD) %>%
summarise(Vax=sum(Vax), Pop=sum(Pop)) %>%
ungroup() %>%
mutate(Vaxprop=Vax/Pop, Country="England")
data <- bind_rows(edata, swdata) %>%
mutate(IMD=case_when(
Country=="Wales" ~ IMD*2-0.5,
TRUE ~ IMD),
Age=factor(Age, levels=c("u45", "45-49", "u50", "50-54", "u55", "55-59", "u60", "60-64", "u65",
"65-69", "u70", "70-74", "75-79", "80+")))
#Full dataset
agg_tiff("Outputs/COVIDVaxIneqGB.tiff", units="in", width=11, height=7, res=800)
data %>% filter(!Age %in% c("u45", "u50", "u55", "u60", "u65", "u70")) %>%
ggplot(aes(x=IMD, y=Vaxprop, group=Date, colour=as.Date(Date)))+
geom_line()+
scale_x_continuous(breaks=c(2,9), labels=c("Least\ndeprived", "Most\ndeprived"),
name="Deprivation")+
scale_y_continuous(labels=label_percent(accuracy=1), name="Proportion of adults vaccinated",
limits=c(0,1))+
scale_colour_paletteer_c("viridis::magma", name="Date", direction=-1, trans="date")+
facet_grid(Country~Age)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
axis.text.x=element_text(size=rel(0.8)), plot.title=element_text(face="bold", size=rel(1.4)))+
labs(title="Shifting patterns in vaccination inequality over time",
subtitle="Vaccine delivery rates in England, Scotland and Wales by age and deprivation",
caption="Data from NHS England, PHS & PHW | Plot by @VictimOfMaths")
dev.off()
#Compare countries at ~mid-March
agg_tiff("Outputs/COVIDVaxIneqMarch.tiff", units="in", width=8, height=7, res=800)
data %>% filter(!Age %in% c("u55", "u60", "u65", "u70")) %>%
filter(Country=="Wales" & Date==as.Date("2021-03-15") |
Country=="Scotland" & Date==as.Date("2021-03-17")|
Country=="England" & Date==as.Date("2021-03-14")) %>%
ggplot(aes(x=IMD, y=Vaxprop, group=Country, colour=Country))+
geom_line()+
scale_x_continuous(breaks=c(2,9), labels=c("Least\ndeprived", "Most\ndeprived"),
name="Deprivation")+
scale_y_continuous(labels=label_percent(accuracy=1), name="Proportion of adults vaccinated",
limits=c(0,1))+
scale_colour_paletteer_d("wesanderson::Darjeeling1")+
facet_wrap(~Age)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
axis.text.x=element_text(size=rel(1)), text=element_text(family="Roboto"),
plot.title=element_text(face="bold", size=rel(1.4)))+
labs(title="Scotland vaccinated more deprived groups first...",
subtitle="Vaccine delivery rates by age and deprivation. Data from mid-March.",
caption="Data from NHS England, PHS & PHW | Plot by @VictimOfMaths")
dev.off()
#Compare countries at ~mid-March
agg_tiff("Outputs/COVIDVaxIneqApril.tiff", units="in", width=8, height=7, res=800)
data %>% filter(!Age %in% c("45-49", "u55", "u60", "u65", "u70")) %>%
filter(Country=="Wales" & Date==as.Date("2021-04-15") |
Country=="Scotland" & Date==as.Date("2021-04-21")|
Country=="England" & Date==as.Date("2021-04-18")) %>%
ggplot(aes(x=IMD, y=Vaxprop, group=Country, colour=Country))+
geom_line()+
scale_x_continuous(breaks=c(2,9), labels=c("Least\ndeprived", "Most\ndeprived"),
name="Deprivation")+
scale_y_continuous(labels=label_percent(accuracy=1), name="Proportion of adults vaccinated",
limits=c(0,1))+
scale_colour_paletteer_d("wesanderson::Darjeeling1")+
facet_wrap(~Age)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
axis.text.x=element_text(size=rel(1)), text=element_text(family="Roboto"),
plot.title=element_text(face="bold", size=rel(1.4)))+
labs(title="...but inequality reasserted itself as vaccination coverage increased",
subtitle="Vaccine delivery rates by age and deprivation. Data from mid-April",
caption="Data from NHS England, PHS & PHW | Plot by @VictimOfMaths")
dev.off()
#England only
agg_tiff("Outputs/COVIDVaxIneqEng.tiff", units="in", width=8, height=7, res=800)
data %>% filter(Country=="England" & !Age %in% c("u50", "u55", "u60", "u65", "u70")) %>%
ggplot(aes(x=IMD, y=Vaxprop, group=Date, colour=as.Date(Date)))+
geom_line()+
facet_wrap(~Age)+
scale_x_continuous(breaks=c(2,9), labels=c("Least\ndeprived", "Most\ndeprived"),
name="Deprivation")+
scale_y_continuous(labels=label_percent(accuracy=1), name="Proportion of adults vaccinated",
limits=c(0,1))+
scale_colour_paletteer_c("viridis::magma", name="Date", direction=-1, trans="date")+
facet_wrap(~Age)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
axis.text.x=element_text(size=rel(1)), text=element_text(family="Roboto"),
plot.title=element_text(face="bold", size=rel(1.4)),
legend.text=element_text())+
labs(title="Vaccination rates in more deprived areas remain lower",
subtitle="Vaccine delivery rates in England by age and deprivation based on MSOA-level data",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDVaccinationMSOACartogram.R
================================================
rm(list=ls())
library(curl)
library(tidyverse)
library(readxl)
library(paletteer)
library(sf)
library(scales)
library(ragg)
library(gtools)
library(ggridges)
library(patchwork)
library(extrafont)
library(ggrepel)
library(cowplot)
library(ggtext)
#Download vaccination data by MSOA
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/
maxdate <- "18th July"
vax <- tempfile()
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/07/COVID-19-weekly-announced-vaccinations-22-July-2021.xlsx"
vax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode="wb")
vaxdata <- read_excel(vax, sheet="MSOA", range="F15:AK6805", col_names=FALSE) %>%
set_names("msoa11cd", "msoa11nm", "<18_1st", "18-24_1st", "25-29_1st", "30-34_1st", "35-39_1st", "40-44_1st",
"45-49_1st", "50-54_1st", "55-59_1st", "60-64_1st", "65-69_1st", "70-74_1st",
"75-79_1st", "80+_1st", "blank", "<25_2nd", "25-29_2nd", "30-34_2nd", "35-39_2nd", "40-44_2nd",
"45-49_2nd", "50-54_2nd", "55-59_2nd", "60-64_2nd", "65-69_2nd", "70-74_2nd",
"75-79_2nd", "80+_2nd", "blank2", "Total") %>%
mutate(`<18_1st`=as.numeric(`<18_1st`),
`18-24_1st`=as.numeric(`18-24_1st`),
`<25_1st`=case_when(
is.na(`<18_1st`) ~ Total-`25-29_1st`-`30-34_1st`-`35-39_1st`-`40-44_1st`-`45-49_1st`-`50-54_1st`-
`55-59_1st`-`60-64_1st`-`65-69_1st`-`70-74_1st`-`75-79_1st`-`80+_1st`-`<25_2nd`-`25-29_2nd`-
`30-34_2nd`-`35-39_2nd`-`40-44_2nd`-`45-49_2nd`-`50-54_2nd`-
`55-59_2nd`-`60-64_2nd`-`65-69_2nd`-`70-74_2nd`-`75-79_2nd`-`80+_2nd`,
TRUE ~ `<18_1st`+`18-24_1st`)) %>%
select(-c(blank, blank2, `<18_1st`, `18-24_1st`, Total)) %>%
pivot_longer(c(3:28), names_to=c("age", "dose"), names_sep="_", values_to="vaccinated")
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE)[,c(1,2,5,6)]
colnames(IMD) <- c("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
temp <- tempfile()
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, RGN11NM) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read_excel(file.path(temp2, "SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx"),
sheet="Mid-2019 Persons", range="A6:G34758", col_names=FALSE)[,c(1,7)]
colnames(pop) <- c("LSOA11CD", "pop")
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup()
pop2 <- read_excel(vax, sheet="Population estimates (NIMS)", range="W16:AL6806", col_names=FALSE) %>%
select(-c(2,3)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:14)) %>%
mutate(age=case_when(
age=="...4" ~ "<25",
age=="...5" ~ "25-29",
age=="...6" ~ "30-34",
age=="...7" ~ "35-39",
age=="...8" ~ "40-44",
age=="...9" ~ "45-49",
age=="...10" ~ "50-54",
age=="...11" ~ "55-59",
age=="...12" ~ "60-64",
age=="...13" ~ "65-69",
age=="...14" ~ "70-74",
age=="...15" ~ "75-79",
TRUE ~ "80+")) %>%
group_by(msoa11cd, age) %>%
summarise(pop=sum(pop)) %>%
ungroup()
#COMBINE
vaxdata <- merge(vaxdata, pop2) %>%
merge(IMD_MSOA %>% select(-pop), by.x="msoa11cd", by.y="MSOA11CD") %>%
mutate(vaxprop=vaccinated/pop)
#Add totals
vaxdata <- vaxdata %>%
group_by(msoa11cd, msoa11nm, IMDrank, dose) %>%
summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>%
mutate(vaxprop=vaccinated/pop, age="Total") %>%
ungroup() %>%
bind_rows(vaxdata)
#Download Carl Baker's lovely cartogram
msoa <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
msoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode="wb")
BackgroundMSOA <- st_read(msoa, layer="5 Background")
MSOA <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(vaxdata, by="msoa11cd")
GroupsMSOA <- st_read(msoa, layer="2 Groups")
Group_labelsMSOA <- st_read(msoa, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAsMSOA <- st_read(msoa, layer="3 Local authority outlines (2019)")
plottotal1 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA %>% filter(age=="Total" & dose=="1st"),
aes(geometry=geom, fill=vaxprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of adult population vaccinated", limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), legend.position="top",
plot.title.position="plot")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Overall adult 1st dose vaccination rates",
subtitle=paste0("People vaccinated with at least one dose in England by Middle Super Output Area.\nData up to ", maxdate, "\n "),
caption="Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogramDose1.tiff", units="in", width=10, height=8, res=800)
plottotal1
dev.off()
agg_png("Outputs/COVIDVaxMSOACartogramDose1.png", units="in", width=10, height=8, res=800)
plottotal1
dev.off()
plottotal2 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA %>% filter(age=="Total" & dose=="2nd"),
aes(geometry=geom, fill=vaxprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of adult population vaccinated", limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Overall adult 2nd dose vaccination rates",
subtitle=paste0("People vaccinated with two doses in England by Middle Super Output Area.\nData up to ", maxdate, "\n "),
caption="Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogramDose2.tiff", units="in", width=10, height=8, res=800)
plottotal2
dev.off()
agg_png("Outputs/COVIDVaxMSOACartogramDose2.png", units="in", width=10, height=8, res=800)
plottotal2
dev.off()
plottotal <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA %>% filter(age=="Total"),
aes(geometry=geom, fill=vaxprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of adult population vaccinated", limits=c(0,1),
labels=label_percent(accuracy=1))+
facet_wrap(~dose)+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), legend.position="top",
strip.text=element_text(face="bold", size=rel(1)))+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Overall adult vaccination rates",
subtitle=paste0("Over 16 year-olds vaccinated with one or two doses in England by Middle Super Output Area.\nData up to ", maxdate, "\n "),
caption="Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogram.tiff", units="in", width=10, height=8, res=800)
plottotal
dev.off()
agg_png("Outputs/COVIDVaxMSOACartogram.png", units="in", width=10, height=8, res=800)
plottotal
dev.off()
plot10 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA %>% filter(age=="Total") %>% mutate(flag=if_else(vaxprop>=0.5, 1, 0)),
aes(geometry=geom, fill=as.factor(flag)), colour=NA, show.legend=FALSE)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_d("wesanderson::Darjeeling1")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.8)),
text=element_text(family="Roboto"), plot.subtitle=element_markdown())+
labs(title="Who is half way there?",
subtitle="Neighbourhoods in England where over 50% of adults have received at least one dose of COVID vaccine",
caption="Data from NHS England, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOACartogramHalfWay.tiff", units="in", width=10, height=8, res=800)
plot10
dev.off()
#Calculate deprivation gradients within IMD deciles
#Allocate to deciles
vaxdeciles <- vaxdata %>%
mutate(decile=quantcut(-IMDrank, 10, labels=FALSE)) %>%
group_by(age, decile, dose) %>%
mutate(decilemean=sum(vaccinated)/sum(pop)) %>%
ungroup() %>%
group_by(age) %>%
mutate(popmean=sum(vaccinated)/sum(pop)) %>%
ungroup()
agg_tiff("Outputs/COVIDVaxMSOASxIMDScatter.tiff", units="in", width=12, height=8, res=800)
ggplot(vaxdeciles %>% filter(age=="Total", dose=="1st"),
aes(x=vaxprop, y=as.factor(decile), colour=vaxprop))+
geom_jitter(shape=21, alpha=0.6, show.legend=FALSE)+
geom_segment(aes(x=popmean, xend=popmean, y=Inf, yend=-Inf), colour="Grey20")+
geom_point(aes(x=decilemean, y=as.factor(decile)), colour="Grey20", fill="Cyan", shape=23, size=2)+
scale_colour_paletteer_c("viridis::magma", direction=-1)+
scale_x_continuous(name="Proportion of adult population vaccinated",
labels=label_percent(accuracy=1))+
scale_y_discrete(name="Index of Multiple Deprivation", labels=c("1 - least deprived", "2", "3", "4", "5", "6", "7",
"8", "9", "10 - most deprived"))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Roboto"))+
labs(title="COVID 1st dose vaccination rates are lower in more deprived areas in England",
subtitle="Number of adults vaccinated by MSOA compared compared to the estimated 80+ population in 2019.",
caption="Vaccination data from NHS England, Population data from ONS\nPlot by @VictimOfMaths")+
annotate("text", x=0.7, y=9.9, label="Each circle = 1 MSOA", size=3, family="Roboto")+
annotate("text", x=0.54, y=6.5, label="Population average", size=3, family="Roboto")+
annotate("text", x=0.59, y=3.5, label="Decile average", size=3, family="Roboto")+
geom_segment(aes(x=0.434, y=6.5, xend=0.5, yend=6.5), colour="Grey20")+
geom_segment(aes(x=0.56, y=3.55, xend=0.49, yend=3.95), colour="Grey20")
dev.off()
agg_tiff("Outputs/COVIDVaxMSOASxIMDRidges.tiff", units="in", width=8, height=6, res=800)
ggplot(vaxdeciles %>% filter(age=="Total"),
aes(x=vaxprop, y=as.factor(decile), fill=dose))+
geom_density_ridges(rel_min_height=0.01, show.legend=FALSE, alpha=0.7)+
scale_y_discrete(name="Index of Multiple Deprivation", labels=c("1 - least deprived", "2", "3", "4", "5", "6", "7",
"8", "9", "10 - most deprived"))+
scale_x_continuous(name="Proportion of adult population vaccinated",
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("rcartocolor::Safe")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"), plot.title.position="plot",
plot.caption.position="plot", plot.subtitle=element_markdown())+
labs(title="Vaccination rates in England are lower in more deprived areas",
subtitle="Distribution of MSOA-level first and second dose vaccination rates for adults (aged 16+) in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxMSOASxIMDxAgeRidges.tiff", units="in", width=10, height=7, res=800)
ggplot(vaxdeciles %>% filter(age!="Total"),
aes(x=vaxprop, y=as.factor(decile), fill=dose))+
geom_density_ridges(rel_min_height=0.01, show.legend=FALSE, alpha=0.7)+
scale_y_discrete(name="Index of Multiple Deprivation", labels=c("1 - least deprived", "2", "3", "4", "5", "6", "7",
"8", "9", "10 - most deprived"))+
scale_x_continuous(name="Proportion of population vaccinated",
labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("rcartocolor::Safe")+
facet_wrap(~age)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"), plot.title.position="plot",
plot.caption.position="plot", plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Vaccination rates in England are lower in more deprived areas",
subtitle="Distribution of MSOA-level first and second dose vaccination rates for adults (aged 16+) in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxMSOASxIMDScatterxAge.tiff", units="in", width=12, height=8, res=800)
ggplot(vaxdata %>% filter(age!="Total"), aes(x=vaxprop, y=-IMDrank, colour=dose))+
geom_point(shape=21, alpha=0.6, show.legend=FALSE)+
scale_x_continuous(name="Proportion of population vaccinated", labels=label_percent(accuracy=1))+
scale_y_continuous(name="Index of Multiple Deprivation", breaks=c(0, -32507),
labels=c("Most deprived", "Least deprived"))+
scale_colour_paletteer_d("rcartocolor::Safe")+
facet_wrap(~age)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"), plot.title.position="plot",
plot.caption.position="plot", plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Vaccination rates in England are lower in more deprived areas",
subtitle="Distribution of MSOA-level first and second dose vaccination rates for adults (aged 16+) in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxMSOASxIMDScatter.tiff", units="in", width=12, height=8, res=800)
ggplot(vaxdata %>% filter(age=="Total"), aes(x=vaxprop, y=-IMDrank, colour=dose))+
geom_point(shape=21, alpha=0.6, show.legend=FALSE)+
scale_x_continuous(name="Proportion of population vaccinated", labels=label_percent(accuracy=1))+
scale_y_continuous(name="Index of Multiple Deprivation", breaks=c(0, -32507),
labels=c("Most deprived", "Least deprived"))+
scale_colour_paletteer_d("rcartocolor::Safe")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Lato"), plot.title.position="plot",
plot.caption.position="plot", plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Vaccination rates in England are lower in more deprived areas",
subtitle="Distribution of MSOA-level first and second dose vaccination rates for adults (aged 16+) in England",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#############################
#Local analysis
#Download MSOA map
#Download shapefile of LA boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
map <- full_join(shapefile, MSOA %>%
select(Laname, msoa11cd, IMDrank, vaxprop, pop, age, dose) %>%
as.data.frame(),
by="msoa11cd", all.y=TRUE)
SheffIMD <- map %>% filter(age=="Total" & Laname=="Sheffield") %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=IMDrank), show.legend=FALSE, colour=NA)+
scale_fill_paletteer_c("pals::ocean.matter")+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)), text=element_text(family="Roboto"))+
labs(title="Index of Multiple deprivation",
subtitle="Darker colours = more deprived")
Sheffvax <- map %>% filter(age!="Total" & Laname=="Sheffield" & dose=="1st") %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=vaxprop), colour=NA)+
facet_wrap(~age)+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of\npopulation\nvaccinated", limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)), text=element_text(family="Roboto"))+
labs(title="COVID-19 first dose vaccination rates",
caption="Data from NHS England and ONS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOASSheffield.tiff", units="in", width=12, height=8, res=800)
SheffIMD+Sheffvax
dev.off()
#Scatterplot of vax rates by MSOA in Sheffield
scatterdata <- MSOA %>%
filter(Laname=="Sheffield" & age %in% c("80+", "75-79", "70-74", "65-69", "60-64",
"55-59", "50-54", "45-49", "40-44")) %>%
group_by(msoa11cd, MSOA.name.HCL, IMDrank, dose) %>%
summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>%
ungroup() %>%
mutate(vaxprop=vaccinated/pop,
labels=if_else(vaxprop<0.75, MSOA.name.HCL, ""))
agg_tiff("Outputs/COVIDVaxMSOASheffieldScatter.tiff", units="in", width=12, height=6, res=800)
ggplot(scatterdata, aes(x=vaxprop, y=-IMDrank))+
geom_point(aes(size=pop), shape=21, colour="DarkRed", fill="tomato", alpha=0.8)+
geom_segment(aes(x=1, xend=1, y=-1000, yend=-32000), colour="Grey70")+
geom_text_repel(aes(label=labels), family="Roboto", size=rel(3),
box.padding = 0.4)+
scale_x_continuous(name="Proportion of population aged 40+ vaccinated",
labels=label_percent(accuracy=1), limits=c(NA, 1))+
scale_y_continuous(name="Index of Multiple Deprivation rank", breaks=c(-1000, -32000),
labels=c("Most deprived", "Least deprived"))+
scale_size_continuous(name="Population\nover 40")+
facet_wrap(~dose)+
theme_classic()+
theme(axis.ticks.y=element_blank(), text=element_text(family="Roboto"),
axis.text.y=element_text(size=rel(1.2), colour="Black"),
plot.title.position="plot", plot.title=element_text(face="bold", size=rel(1.4)),
plot.subtitle=element_text(colour="Grey50"), plot.caption.position ="plot",
plot.caption=element_text(colour="Grey50"), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Vaccine delivery is lowest in a small number of deprived areas in Sheffield",
subtitle="COVID-19 vaccination rates in adults aged 40+ by dose",
caption="Data from NHS England, populations from NIMS\nPlot by @VictimOfMaths")
dev.off()
#Regional version for Yorkshire
scatterdata2 <- MSOA %>%
filter(RegionNation=="Yorkshire and The Humber" & age %in% c("80+", "75-79", "70-74", "65-69",
"60-64", "55-59", "50-54", "45-49",
"40-44")) %>%
group_by(msoa11cd, MSOA.name.HCL, IMDrank, dose) %>%
summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>%
ungroup() %>%
mutate(vaxprop=vaccinated/pop,
labels=if_else(vaxprop<0.6, MSOA.name.HCL, ""))
agg_tiff("Outputs/COVIDVaxMSOAYorksScatter.tiff", units="in", width=8, height=6, res=800)
ggplot(scatterdata2 %>% filter(dose=="1st"), aes(x=vaxprop, y=-IMDrank))+
geom_point(aes(size=pop), shape=21, colour="DarkRed", fill="tomato", alpha=0.8)+
geom_segment(aes(x=1, xend=1, y=-1000, yend=-32000), colour="Grey70")+
geom_text_repel(aes(label=labels), family="Roboto", size=rel(2.2),
box.padding = 0.5, min.segment.length=0)+
scale_x_continuous(name="Proportion of population aged 40+ vaccinated",
labels=label_percent(accuracy=1), limits=c(NA, 1))+
scale_y_continuous(name="Index of Multiple Deprivation rank", breaks=c(-1000, -32000),
labels=c("Most deprived", "Least deprived"), limits=c(NA, 2000))+
scale_size_continuous(name="Over 40\npopulation")+
theme_classic()+
theme(axis.ticks.y=element_blank(), text=element_text(family="Roboto"),
axis.text.y=element_text(size=rel(1.2), colour="Black"),
plot.title.position="plot", plot.title=element_text(face="bold", size=rel(1.4)),
plot.subtitle=element_text(colour="Grey50"), plot.caption.position ="plot",
plot.caption=element_text(colour="Grey50"))+
labs(title="Vaccine delivery is lowest in a small number of deprived areas in Yorkshire",
subtitle="Proportion of adults aged 40+ who have received at least one dose of COVID-19 vaccine",
caption="Data from NHS England, populations from NIMS\nPlot by @VictimOfMaths")
dev.off()
#Calculate age-standardised vaccination rates
asvax <- vaxdata %>%
filter(age!="Total") %>%
select(-c(vaccinated, pop)) %>%
pivot_wider(names_from=c("age", "dose"), names_sep="_", values_from=vaxprop) %>%
mutate(asrate_1st=(`<25_1st`*(0.8*5500+6000)+`25-29_1st`*(6000)+`30-34_1st`*6500+
`35-39_1st`*7000+`40-44_1st`*7000+`45-49_1st`*7000+`50-54_1st`*7000+`55-59_1st`*6500+
`60-64_1st`*6000+`65-69_1st`*5500+`70-74_1st`*5000+`75-79_1st`*4000+
`80+_1st`*5000)/82900,
asrate_2nd=(`<25_2nd`*(0.8*5500+6000)+`25-29_2nd`*(6000)+`30-34_2nd`*6500+
`35-39_2nd`*7000+`40-44_2nd`*7000+`45-49_2nd`*7000+`50-54_2nd`*7000+
`55-59_2nd`*6500+ `60-64_2nd`*6000+`65-69_2nd`*5500+`70-74_2nd`*5000+
`75-79_2nd`*4000+ `80+_2nd`*5000)/82900)
MSOA2 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(asvax, by="msoa11cd") %>%
filter(RegionNation!="Wales")
plot10 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA2,
aes(geometry=geom, fill=asrate_1st), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.dense", direction=-1,
name="Proportion of adults vaccinated with at least one dose\n(age-standardised)", limits=c(0,NA),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Roboto"), legend.position="top",
plot.title.position="plot", plot.caption.position="plot")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates are lowest in urban areas even after accounting\nfor the fact that they tend to have younger populations\n \n ",
caption="Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOAAgeStdCartogram1st.tiff", units="in", width=9, height=10, res=800)
plot10
dev.off()
agg_png("Outputs/COVIDVaxMSOAAgeStdCartogram1st.png", units="in", width=9, height=10, res=800)
plot10
dev.off()
plot11 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=MSOA2,
aes(geometry=geom, fill=asrate_2nd), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.dense", direction=-1,
name="Proportion of adults vaccinated with two doses\n(age-standardised)", limits=c(0,NA),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Roboto"), legend.position="top",
plot.title.position="plot", plot.caption.position="plot")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates are lowest in urban areas even after accounting\nfor the fact that they tend to have younger populations\n \n ",
caption="Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOAAgeStdCartogram2nd.tiff", units="in", width=9, height=10, res=800)
plot11
dev.off()
agg_png("Outputs/COVIDVaxMSOAAgeStdCartogram2nd.png", units="in", width=9, height=10, res=800)
plot11
dev.off()
tempdata <- MSOA2 %>%
gather(dose, vaxprop, c("asrate_1st", "asrate_2nd")) %>%
mutate(dose=substr(dose, 8,11))
plot12 <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=tempdata,
aes(geometry=geom, fill=vaxprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.dense", direction=-1,
name="Proportion of adults vaccinated with two doses\n(age-standardised)", limits=c(0,NA),
labels=label_percent(accuracy=1))+
facet_wrap(~dose)+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Roboto"), legend.position="top",
plot.title.position="plot", plot.caption.position="plot",
strip.text=element_text(face="bold", size=rel(1)))+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates are lowest in urban areas even after accounting\nfor the fact that they tend to have younger populations\n \n ",
caption="Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxMSOAAgeStdCartogram.tiff", units="in", width=9, height=8, res=800)
plot12
dev.off()
agg_png("Outputs/COVIDVaxMSOAAgeStdCartogram.png", units="in", width=9, height=8, res=800)
plot12
dev.off()
#Bivariate maps of age-standardised 1st dose vax rate against deprivation
BVmapdata <- MSOA2 %>%
filter(RegionNation!="Wales") %>%
mutate(IMDtert=quantcut(-IMDrank, q=3, labels=FALSE),
vaxtert=quantcut(asrate_1st, q=3, labels=FALSE))
#Generate key
keydata <- data.frame(IMDtert=c(1,2,3,1,2,3,1,2,3),
vaxtert=c(1,1,1,2,2,2,3,3,3),
RGB=c("#e8e8e8", "#dfb0d6", "#be64ac",
"#ace4e4", "#a5add3", "#8c62aa",
"#5ac8c8", "#5698b9", "#3b4994"))
#Bring colours into main data for plotting
BVmapdata <- left_join(BVmapdata, keydata, by=c("IMDtert", "vaxtert"))
key <- ggplot(keydata)+
geom_tile(aes(x=IMDtert, y=vaxtert, fill=RGB))+
scale_fill_identity()+
labs(x = expression("Greater deprivation" %->% ""),
y = expression("Higher vaccination rates" %->% "")) +
theme_classic() +
# make font small enough
theme(
axis.title = element_text(size = 9),axis.line=element_blank(),
axis.ticks=element_blank(), axis.text=element_blank())+
# quadratic tiles
coord_fixed()
BVmap <- ggplot()+
geom_sf(data=BackgroundMSOA, aes(geometry=geom))+
geom_sf(data=BVmapdata,
aes(geometry=geom, fill=RGB), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="White", size=0.1)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_identity()+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.title.position = "panel")+
annotate("text", x=56.5, y=14, label="Higher deprivation,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=53, y=14, xend=48, yend=14.3), curvature=-0.15)+
annotate("text", x=45, y=2, label="Lower deprivation,\nfewer vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=44, y=3.2, xend=42, yend=7.55), curvature=0.2)+
annotate("text", x=51, y=35, label="Higher deprivation,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=49, y=34, xend=45.5, yend=31.7), curvature=-0.2)+
annotate("text", x=19, y=43, label="Lower deprivation,\nmore vaccinations", size=3,
fontface="bold", family="Lato")+
geom_curve(aes(x=19.5, y=41.5, xend=22.2, yend=38.1), curvature=0.1)+
coord_sf(clip="off")+
labs(title="Comparing deprivation with current vaccine coverage",
subtitle="Age-standardised rates of delivery of at least one vaccine dose and area-level deprivation\nmeasured using the Index of Multiple Deprivation",
caption="Data from MCHLG and NHS England, cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDBivariateIMDxVaxFull.tiff", units="in", width=8, height=10, res=800)
ggdraw()+
draw_plot(BVmap, 0,0,1,1)+
draw_plot(key, 0.66,0.66,0.30,0.30)
dev.off()
#Create tidy dataset
Yorksdata <- asvax %>%
select(msoa11cd, msoa11nm, IMDrank, asrate_1st, asrate_2nd) %>%
merge(vaxdata %>% filter(age=="Total") %>%
select(msoa11cd, dose, vaxprop) %>%
spread(dose, vaxprop)) %>%
mutate(natdecile=quantcut(-IMDrank, 10, labels=FALSE))
MSOA2 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(Yorksdata, by="msoa11cd")
Yorksdata <- MSOA2 %>%
filter(RegionNation=="Yorkshire and The Humber") %>%
as.data.frame() %>%
select(msoa11cd, msoa11nm.y, Laname, `1st`, `2nd`, asrate_1st, asrate_2nd,
natdecile, IMDrank) %>%
mutate(Yorksdecile=quantcut(-IMDrank, 10, labels=FALSE))
write.csv(Yorksdata, "Data/YorkshireVaxData.csv")
#########################
working <- vaxdata %>% filter(age=="Total")
================================================
FILE: Heatmaps/COVIDVaccinationPopAndIMD.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(readxl)
library(paletteer)
library(extrafont)
library(ragg)
library(scales)
library(ggtext)
library(gtools)
options(scipen=999999)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Have to download these two metrics separately for some reason?
temp <- tempfile()
sourcevax <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv"
temp <- curl_download(url=sourcevax, destfile=temp, quiet=FALSE, mode="wb")
vaxdata <- read.csv(temp) %>%
select(date, age, newPeopleVaccinatedFirstDoseByVaccinationDate,
newPeopleVaccinatedSecondDoseByVaccinationDate,
newPeopleVaccinatedThirdInjectionByVaccinationDate) %>%
set_names("date", "age", "dose1", "dose2", "dose3") %>%
mutate(date=as.Date(date))
#Bring in populations
url <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
ONSpop <- read_excel(temp, sheet="MYE2 - Persons", range="E8:CQ12") %>%
slice_tail() %>%
gather(age, pop, c(1:ncol(.))) %>%
mutate(age=as.numeric(substr(age, 1, 2)),
age=case_when(
age<12 ~ "00_11",
age<16 ~ "12_15",
age<18 ~ "16_17",
age<25 ~ "18_24",
age<30 ~ "25_29",
age<35 ~ "30_34",
age<40 ~ "35_39",
age<45 ~ "40_44",
age<50 ~ "45_49",
age<55 ~ "50_54",
age<60 ~ "55_59",
age<65 ~ "60_64",
age<70 ~ "65_69",
age<75 ~ "70_74",
age<80 ~ "75_79",
age<85 ~ "80_84",
age<90 ~ "85_89",
TRUE ~ "90+")) %>%
group_by(age) %>%
summarise(pop=sum(pop)) %>%
ungroup()
data <- merge(vaxdata, ONSpop, all=TRUE) %>%
mutate(dose1=if_else(is.na(dose1), 0, dose1),
dose2=if_else(is.na(dose2), 0, dose2),
dose3=if_else(is.na(dose3), 0, dose3),
date=if_else(is.na(date), max(date, na.rm=TRUE), date)) %>%
group_by(age) %>%
summarise(dose1=sum(dose1), dose2=sum(dose2), dose3=sum(dose3), pop=unique(pop)) %>%
ungroup() %>%
mutate(dose2only=dose2-dose3,
dose1only=dose1-dose2,
unvaccinated=pop-dose1,
minage=as.numeric(substr(age, 1, 2)),
maxage=as.numeric(substr(age, 4, 5))+1,
maxage=if_else(is.na(maxage), 100, maxage),
age=gsub("_", "-", age),
unvaccinated=if_else(unvaccinated<0, 0, unvaccinated))
agg_png("Outputs/COVIDVaxPyramidWithBoostersEngProp.png", units="in", res=800, width=9, height=7)
data %>%
gather(dose, no, c(dose1only, dose2only, dose3, unvaccinated)) %>%
mutate(dose=factor(dose, levels=c("dose3", "dose2only","dose1only","unvaccinated"))) %>%
ggplot(aes(x=no, y=age, fill=dose))+
geom_col(position="fill")+
scale_x_continuous(name="Proportion of the population", labels=label_percent(accuracy=1))+
scale_y_discrete(name="")+
scale_fill_manual(values=c("#2BAA92FF", "#2F191BFF","#D32934FF","Grey70"), name="",
guide=guide_legend(reverse=TRUE),
labels=c("3 doses/booster", "2 doses", "1 dose", "Unvaccinated"))+
theme_custom()+
labs(title="Many adults in England still haven't received a COVID booster jab",
subtitle=paste0("Proportion of the population by vaccination status in England as of ", max(vaxdata$date)),
caption="Data from coronavirus.data.gov.uk | Population data from ONS | Plot by Colin Angus")
dev.off()
agg_png("Outputs/COVIDVaxPyramidWithBoostersEng.png", units="in", res=800, width=10, height=8)
data %>% mutate(agewidth=maxage-minage,
unvaccinated=unvaccinated/agewidth,
dose1only=dose1only/agewidth,
dose2only=dose2only/agewidth,
dose3=dose3/agewidth) %>%
ggplot()+
geom_rect(aes(xmin=0, xmax=unvaccinated, ymin=minage, ymax=maxage), fill="Grey70")+
geom_rect(aes(xmin=unvaccinated, xmax=unvaccinated+dose1only, ymin=minage, ymax=maxage),
fill="#D32934FF")+
geom_rect(aes(xmin=unvaccinated+dose1only, xmax=unvaccinated+dose1only+dose2only,
ymin=minage, ymax=maxage),
fill="#2F191BFF")+
geom_rect(aes(xmin=unvaccinated+dose1only+dose2only,
xmax=unvaccinated+dose1only+dose2only+dose3,
ymin=minage, ymax=maxage),
fill="#2BAA92FF")+
scale_x_continuous(name="People at each single year of age")+
scale_y_continuous(name="Age", breaks=c(0,20,40,60,80,100))+
theme_custom()+
theme(plot.subtitle=element_markdown(colour="Grey30"))+
labs(title="Many adults in England still haven't received a COVID booster jab",
subtitle="Number of people who have received one, two or three vaccine doses or remain unvaccinated",
caption="Data from coronavirus.data.gov.uk | Population data from ONS | Plot by Colin Angus")
dev.off()
###################################################
#Deprivation analysis of vaccination rates
#Start by calculating IMD at MSOA level
#Download IMD data
temp <- tempfile()
source <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE) %>%
select(c(1,2,5,6)) %>%
set_names("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, LAD17CD) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:G34758", col_names=FALSE) %>%
select(-c(2:6)) %>%
set_names("LSOA11CD", "pop")
pop_full <- read_excel(temp, sheet="Mid-2020 Persons", range="A6:CT34758", col_names=FALSE) %>%
select(-c(2:7)) %>%
set_names("LSOA11CD", c(0:90))
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at LTLA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD, LAD17CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))
IMD_LTLA <- IMD %>%
group_by(LAD17CD)%>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup() %>%
mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))
#######################
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-weekly-announced-vaccinations-13-January-2022.xlsx"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
MSOAvax <- read_excel(temp, sheet="MSOA", range="F15:AZ6803", col_names=FALSE) %>%
select(c(1, 34:47)) %>%
set_names("MSOA11CD", "Under18", "18-24", "25-29", "30-34", "35-39", "40-44", "45-49",
"50-54", "55-59", "60-64", "65-69", "70-74", "75-79", "80+") %>%
merge(IMD_MSOA) %>%
select(-pop) %>%
mutate(Under18=as.numeric(if_else(Under18=="*", "0", Under18))) %>%
gather(age, boosted, c(2:15)) %>%
merge(pop_full %>%
gather(age, pop, c(2:92)) %>%
mutate(age=case_when(
age<18 ~ "Under18", age<25 ~ "18-24", age<30 ~ "25-29", age<35 ~ "30-34",
age<40 ~ "35-39", age<45 ~ "40-44", age<50 ~ "45-49",
age<55 ~ "50-54", age<60 ~ "55-59", age<65 ~ "60-64",
age<70 ~ "65-69", age<75 ~ "70-74", age<80 ~ "75-79", TRUE ~ "80+")) %>%
merge(lookup) %>%
group_by(MSOA11CD, age) %>%
summarise(pop=sum(pop)) %>%
ungroup()) %>%
group_by(age, decile) %>%
summarise(boosted=sum(boosted), pop=sum(pop)) %>%
ungroup() %>%
mutate(boostpop=boosted/pop,
age=factor(age, levels=c("Under18", "18-24", "25-29", "30-34", "35-39", "40-44", "45-49",
"50-54", "55-59", "60-64", "65-69", "70-74", "75-79", "80+")))
agg_png("Outputs/COVIDBoostersxIMDxAgev2.png", units="in", res=800, width=10, height=8)
ggplot(MSOAvax, aes(x=boosted/pop, y=as.factor(decile), fill=as.factor(decile)))+
geom_col(show.legend=FALSE)+
scale_x_continuous(name="Proportion of population who have received a booster/3rd dose",
labels=label_percent(accuracy=1))+
scale_y_discrete(name="Deprivation decile", labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10")+
facet_wrap(~age)+
theme_custom()+
labs(title="Younger populations cannot explain lower boster coverage in deprived areas",
subtitle="Proportion of the population who have received a COVID booster or 3rd vaccination by deciles of\nthe Index of Multiple Deprivation and age in England",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by Colin Angus")
dev.off()
agg_png("Outputs/COVIDBoostersxIMDv2.png", units="in", res=800, width=10, height=8)
MSOAvax %>%
group_by(decile) %>%
summarise(boosted=sum(boosted), pop=sum(pop)) %>%
ungroup() %>%
mutate(boostprop=boosted/pop) %>%
ggplot(aes(x=boostprop, y=as.factor(decile), fill=as.factor(decile)))+
geom_col(show.legend=FALSE)+
scale_x_continuous(name="Proportion of population who have received a booster/3rd dose",
labels=label_percent(accuracy=1))+
scale_y_discrete(name="Deprivation decile", labels=c("1 - Most deprived","2","3","4","5","6","7","8","9",
"10 - least deprived"))+
scale_fill_paletteer_d("dichromat::BrowntoBlue_10")+
theme_custom()+
theme(plot.title=element_text(size=rel(2)))+
labs(title="More deprived areas have received fewer boosters",
subtitle="Proportion of the population who have received a COVID booster or 3rd vaccination by deciles of the Index of Multiple Deprivation and age in England",
caption="Data from coronavirus.data.gov.uk & ONS | Plot by Colin Angus")
dev.off()
================================================
FILE: Heatmaps/COVIDVaccinationStaffCartogram.R
================================================
rm(list=ls())
library(curl)
library(tidyverse)
library(readxl)
library(paletteer)
library(sf)
library(scales)
library(ragg)
library(patchwork)
library(extrafont)
#Download vaccination data for social care staff by UTLA
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/
vax <- tempfile()
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/05/COVID-19-weekly-announced-vaccinations-20-May-2021.xlsx"
vax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode="wb")
carehome <- read_excel(vax, sheet="Older Adult Care Homes by UTLA", range="B21:P170", col_names=FALSE) %>%
rename(cua.name=`...1`, CHresdose1=`...6`, CHresdose2=`...8`, CHstaffdose1=`...13`,
CHstaffdose2=`...15`) %>%
select(cua.name, CHresdose1, CHresdose2, CHstaffdose1, CHstaffdose2) %>%
mutate(CHresdose1=if_else(CHresdose1=="-",0,as.numeric(CHresdose1)),
CHresdose2=if_else(CHresdose2=="-",0,as.numeric(CHresdose2)),
CHstaffdose1=if_else(CHstaffdose1=="-",0,as.numeric(CHstaffdose1)),
CHstaffdose2=if_else(CHstaffdose2=="-",0,as.numeric(CHstaffdose2)))
soccare <- read_excel(vax, sheet="Social Care Staff by UTLA", range="B22:T170", col_names=FALSE) %>%
rename(cua.name=`...1`, YAstaffdose1=`...5`, YAstaffdose2=`...7`, Domstaffdose1=`...11`,
Domstaffdose2=`...13`, Othstaffdose1=`...17`, Othstaffdose2=`...19`) %>%
select(cua.name, YAstaffdose1, YAstaffdose2, Domstaffdose1, Domstaffdose2,
Othstaffdose1, Othstaffdose2) %>%
mutate(YAstaffdose1=if_else(YAstaffdose1 %in% c("-", "tbc"), 0, as.numeric(YAstaffdose1)),
YAstaffdose2=if_else(YAstaffdose2 %in% c("-", "tbc"), 0, as.numeric(YAstaffdose2)),
Domstaffdose1=if_else(Domstaffdose1 %in% c("-", "tbc"), 0, as.numeric(Domstaffdose1)),
Domstaffdose1=if_else(Domstaffdose2 %in% c("-", "tbc"), 0, as.numeric(Domstaffdose1)),
Othstaffdose1=if_else(Othstaffdose1 %in% c("-", "tbc"), 0, as.numeric(Othstaffdose1)),
Othstaffdose2=if_else(Othstaffdose2 %in% c("-", "tbc"), 0, as.numeric(Othstaffdose2)))
data <- merge(carehome, soccare, all=TRUE) %>%
mutate(cua.name=case_when(
cua.name=="Bournemouth, Christchurch and Poole" ~ "Bournemouth, Christchurch & Poole",
TRUE ~ cua.name))
#Download Carl Baker's lovely cartogram
utla <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-uppertier.gpkg")
utla <- curl_download(url=source, destfile=utla, quiet=FALSE, mode="wb")
BackgroundUTLA <- st_read(utla, layer="7 Background")
UTLA <- st_read(utla, layer="5 UTLA-2020") %>%
left_join(data, by="cua.name", all=TRUE) %>%
filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland"))
GroupsUTLA <- st_read(utla, layer="2 Group")
Group_labelsUTLA <- st_read(utla, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
plot <- ggplot()+
geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+
geom_sf(data=UTLA,
aes(geometry=geom, fill=CHresdose1), colour=NA)+
geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of older adult care home residents\nwho have received at least one dose of COVID vaccine",
limits=c(0.7,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"), legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in care home residents\n ",
caption="Grey areas reflect Local Authorities with missing data\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxCHResCartogram.tiff", units="in", width=9, height=10, res=500)
plot
dev.off()
plot2 <- ggplot()+
geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+
geom_sf(data=UTLA,
aes(geometry=geom, fill=CHstaffdose1), colour=NA)+
geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of older adult care home staff\nwho have received at least one dose of COVID vaccine",
limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"), legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in care home staff\n ",
caption="Grey areas reflect Local Authorities with missing data\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxCHStaffCartogram.tiff", units="in", width=9, height=10, res=800)
plot2
dev.off()
plot3 <- ggplot()+
geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+
geom_sf(data=UTLA,
aes(geometry=geom, fill=YAstaffdose1), colour=NA)+
geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of younger adult care home staff\nwho have received at least one dose of COVID vaccine",
limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"), legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in staff from younger adult care homes\n ",
caption="Grey areas reflect Local Authorities with missing data\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxYAStaffCartogram.tiff", units="in", width=9, height=10, res=800)
plot3
dev.off()
plot4 <- ggplot()+
geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+
geom_sf(data=UTLA,
aes(geometry=geom, fill=Domstaffdose1), colour=NA)+
geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of CQC-registered domicilliary care providers\nwho have received at least one dose of COVID vaccine",
limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"), legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in domicilliary care providers\n ",
caption="Grey areas reflect Local Authorities with missing data\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxDomStaffCartogram.tiff", units="in", width=9, height=10, res=800)
plot4
dev.off()
plot5 <- ggplot()+
geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+
geom_sf(data=UTLA,
aes(geometry=geom, fill=Othstaffdose1), colour=NA)+
geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c("Wales", "Scotland", "Northern Ireland")),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of other social care staff\nwho have received at least one dose of COVID vaccine",
limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Lato"), legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in other social care staff\n ",
caption="Data from NHS England, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
agg_tiff("Outputs/COVIDVaxOthStaffCartogram.tiff", units="in", width=9, height=10, res=500)
plot5
dev.off()
================================================
FILE: Heatmaps/COVIDVaccinations.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(ukcovid19)
library(paletteer)
library(ggtext)
library(RcppRoll)
library(ragg)
library(extrafont)
library(scales)
#Bring in daily data
temp <- tempfile()
source="https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumPeopleVaccinatedFirstDoseByPublishDate&metric=cumPeopleVaccinatedSecondDoseByPublishDate&metric=newPeopleVaccinatedFirstDoseByPublishDate&metric=newPeopleVaccinatedSecondDoseByPublishDate&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
APIdata2 <- read.csv(temp)
colnames(APIdata2) <- c("code", "name", "type", "date", "cumdose1", "cumdose2", "dose1", "dose2")
#Generate totals
APIdata2 <- APIdata2 %>%
group_by(date) %>%
summarise(cumdose1=sum(cumdose1), cumdose2=sum(cumdose2),
dose1=sum(dose1), dose2=sum(dose2)) %>%
mutate(name="UK") %>%
bind_rows(APIdata2) %>%
mutate(pop=case_when(name=="England" ~ 56286961,
name=="Wales" ~ 3152879,
name=="Scotland" ~ 5463300,
name=="Northern Ireland" ~ 1893667,
name=="UK" ~ 56286961+3152879+546330+1893667),
dose1rate=dose1*1000000/pop,
dose2rate=dose2*1000000/pop,
cumpropdose1=cumdose1/pop,
cumpropdose2=cumdose2/pop,
date=as.Date(date)) %>%
ungroup() %>%
group_by(name) %>%
arrange(name, date) %>%
mutate(dose1rateroll=roll_mean(dose1rate, 7, align="center", fill=NA)) %>%
ungroup()
agg_tiff("Outputs/COVIDVaccinationRateDaily.tiff", units="in", width=9, height=6, res=500)
APIdata2 %>%
filter(name!="UK") %>%
ggplot()+
geom_line(aes(x=date, y=dose1rateroll, colour=name))+
scale_x_date(name="Week ending")+
scale_y_continuous(name="First doses delivered per 1m population", limits=c(0,NA))+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="Rates of delivery of 1st vaccine doses are currently much lower in England",
subtitle="Rolling 7-day average rates of delivery of 1st COVID-19 vaccine doses by country by publication date",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaccinationTotalsDaily.tiff", units="in", width=9, height=6, res=500)
APIdata2 %>%
filter(name!="UK") %>%
select(date, name, cumpropdose1, cumpropdose2) %>%
gather(dose, rate, c(3,4)) %>%
ggplot()+
geom_line(aes(x=date, y=rate, colour=name, linetype=dose))+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of the population vaccinated",
labels=scales::label_percent(accuracy=1))+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="Nation")+
scale_linetype_discrete(name="Dose", labels=c("1st", "2nd"))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Roboto"))+
labs(title="The four UK nations are pursuing different vaccination strategies",
subtitle="Rates of delivery of COVID-19 vaccines by country by publication date",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaccinationTargetDaily.tiff", units="in", width=8, height=6, res=500)
APIdata2 %>%
filter(name=="UK") %>%
select(date, name, cumdose1, cumdose2) %>%
gather(dose, count, c(3,4)) %>%
mutate(date=as.Date(date)) %>%
ggplot()+
geom_line(aes(x=date, y=count/1000000, linetype=dose), colour="Darkred")+
geom_hline(yintercept=14.6, colour="SkyBlue")+
scale_x_date(name="", limits=c(as.Date("2021-01-10"), as.Date("2021-02-14")))+
scale_y_continuous(name="Total vaccine doses delivered (millions)")+
scale_linetype_discrete(name="Dose", labels=c("1st", "2nd"))+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)), plot.subtitle=element_markdown())+
labs(title="Vaccine delivery in the UK has now surpassed the Mid-February target",
subtitle="Total COVID-19 vaccinations delivered, by dose, in the UK compared to Boris Johnson's mid-February target
Data by publication date",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
#UK level map using dashboard data
source="https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=cumVaccinationFirstDoseUptakeByVaccinationDatePercentage&metric=cumVaccinationSecondDoseUptakeByVaccinationDatePercentage&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
vaxdata <- read.csv(temp) %>%
set_names(c("Lacode", "areaName", "areaType", "date", "First dose", "Second dose")) %>%
gather(dose, prop, c(5,6)) %>%
mutate(date=as.Date(date))
maxdate=max(vaxdata$date)
#Read in Carl Baker's lovely cartogram
ltla <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg")
ltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode="wb")
Background <- st_read(ltla, layer="7 Background")
ltlavax <- st_read(ltla, layer="4 LTLA-2019") %>%
left_join(vaxdata, by="Lacode")
Groups <- st_read(ltla, layer="2 Groups")
Group_labels <- st_read(ltla, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
plot1 <- ggplot()+
geom_sf(data=Background %>% filter(Name!="Ireland"), aes(geometry=geom))+
geom_sf(data=ltlavax %>% filter(date==maxdate),
aes(geometry=geom, fill=prop/100), colour="Black", size=0.1)+
geom_sf(data=Groups %>% filter(!RegionNation %in% c("Wales", "Northern Ireland")),
aes(geometry=geom), fill=NA, colour="Black")+
geom_sf_text(data=Group_labels %>% filter(RegionNation!="Wales"),
aes(geometry=geom, label=Group.labe,
hjust=just), size=rel(2.4), colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1, limits=c(0,1),
name="Proportion of adults vaccinated", labels=label_percent(accuracy=1))+
facet_wrap(~dose)+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(2.5)),
text=element_text(family="Lato"), legend.position="top",
strip.text=element_text(face="bold", size=rel(1), hjust=0))+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="London is lagging behind in the vaccine drive",
subtitle="",
caption=paste0("Data from coronavirus.data.gov.uk, Cartogram from @carlbaker/House of Commons Library\nData up to ",
maxdate, "\nPlot by @VictimOfMaths"))
agg_tiff("Outputs/COVIDVaxLTLACartogramEngSco.tiff", units="in", width=9, height=10, res=800)
plot1
dev.off()
================================================
FILE: Heatmaps/COVIDVaxHeatmap.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(RcppRoll)
library(lubridate)
library(sf)
library(extrafont)
library(ragg)
library(cowplot)
library(scales)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Download LA-level vaccine coverage from the dashboard
temp <- tempfile()
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newPeopleVaccinatedFirstDoseByVaccinationDate&metric=newPeopleVaccinatedSecondDoseByVaccinationDate&metric=VaccineRegisterPopulationByVaccinationDate&format=csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
vaxdata <- read.csv(temp) %>%
mutate(date=as.Date(date),
vaxprop1st=newPeopleVaccinatedFirstDoseByVaccinationDate/VaccineRegisterPopulationByVaccinationDate,
vaxprop2nd=newPeopleVaccinatedSecondDoseByVaccinationDate/VaccineRegisterPopulationByVaccinationDate,
totalvaxed=newPeopleVaccinatedFirstDoseByVaccinationDate+newPeopleVaccinatedSecondDoseByVaccinationDate,
vaxpropall=totalvaxed/VaccineRegisterPopulationByVaccinationDate,
totalvaxrate=totalvaxed/VaccineRegisterPopulationByVaccinationDate) %>%
group_by(areaName, areaCode) %>%
arrange(date) %>%
mutate(vax1_roll=roll_mean(vaxprop1st, 7, align="center", fill=NA),
vax2_roll=roll_mean(vaxprop2nd, 7, align="center", fill=NA),
vaxall_roll=roll_mean(vaxpropall, 7, align="center", fill=NA),
totalvaxrate_roll=roll_mean(totalvaxrate, 7, align="center", fill=NA),
maxvaxrate=max(vaxall_roll, na.rm=TRUE),
maxvaxday=date[which(vaxall_roll==maxvaxrate)][1],
maxvaxprop=vaxall_roll/maxvaxrate) %>%
ungroup()
plotfrom <- "2021-01-01"
plotto <- max(vaxdata$date)-days(4)
totals <- vaxdata %>%
group_by(areaName, areaCode, maxvaxday) %>%
summarise(vaxed1dose=sum(newPeopleVaccinatedFirstDoseByVaccinationDate, na.rm=TRUE)/
unique(VaccineRegisterPopulationByVaccinationDate),
vaxed2dose=sum(newPeopleVaccinatedSecondDoseByVaccinationDate, na.rm=TRUE)/
unique(VaccineRegisterPopulationByVaccinationDate)) %>%
ungroup()
vaxtiles <- ggplot(vaxdata %>% filter(date>=plotfrom & date<=plotto),
aes(x=date, y=fct_reorder(areaName, maxvaxday), fill=maxvaxprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 vaccinations in Local Authorities/Council Areas in England & Scotland",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new COVID vaccinations (1st or 2nd doses), normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of vaccinations. Bars on the right represent the cumulative proportion of the population in each LA that have now been vaccinated.\nData updated to ", plotto),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")+
theme_custom()+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)),
axis.text.y=element_text(colour="Black"), plot.title=element_text(size=rel(1.8)))
vaxbars <- ggplot(totals,
aes(x=vaxed2dose, y=fct_reorder(areaName, maxvaxday), fill=vaxed2dose))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Proportion of adults\nfully vaccinated",
labels=label_percent(accuracy=1))+
theme_custom()+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDVaxHeatmap.tiff", units="in", width=16, height=32, res=800)
plot_grid(vaxtiles, vaxbars, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDVaxHeatmap.png", units="in", width=16, height=32, res=800)
plot_grid(vaxtiles, vaxbars, align="h", rel_widths=c(1,0.2))
dev.off()
#Alternative version ordered from North>South
#Get map
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it,
#so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name)) %>%
rename(areaCode=lad19cd)
latdata <- shapefile %>%
select(areaCode, lat) %>%
as.data.frame() %>%
select(areaCode, lat) %>%
distinct() %>%
filter(!is.na(areaCode) & !areaCode %in% c("E06000062", "E06000061")) %>%
#Fix Northamptonshire LA changes (use Northampton and Kettering as the latitudes for the new counties)
bind_rows(shapefile %>% filter(areaCode %in% c("E07000154", "E07000153")) %>%
as.data.frame() %>%
select(areaCode, lat) %>%
mutate(areaCode=if_else(areaCode=="E07000154", "E06000062", "E06000061")))
vaxdata2 <- merge(vaxdata, latdata)
totals2 <- vaxdata2 %>%
group_by(areaName, areaCode, maxvaxday, lat) %>%
summarise(vaxed1dose=sum(newPeopleVaccinatedFirstDoseByVaccinationDate, na.rm=TRUE)/
unique(VaccineRegisterPopulationByVaccinationDate),
vaxed2dose=sum(newPeopleVaccinatedSecondDoseByVaccinationDate, na.rm=TRUE)/
unique(VaccineRegisterPopulationByVaccinationDate)) %>%
ungroup()
vaxtiles2 <- ggplot(vaxdata2 %>% filter(date>=plotfrom & date<=plotto),
aes(x=date, y=fct_reorder(areaName, lat), fill=maxvaxprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", expand=c(0,0),
breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+
labs(title="Timelines for COVID-19 vaccinations in Local Authorities/Council Areas in England & Scotland",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new COVID vaccinations (1st or 2nd doses), normalised to the maximum value within the Local Authority.\nLAs are ordered from North to South. Bars on the right represent the cumulative proportion of the population in each LA that have now been fully vaccinated.\nData updated to ", plotto),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")+
theme_custom()+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)),
axis.text.y=element_text(colour="Black"), plot.title=element_text(size=rel(1.8)))
vaxbars2 <- ggplot(totals2,
aes(x=vaxed2dose, y=fct_reorder(areaName, lat), fill=vaxed2dose))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Proportion of adults\nfully vaccinated",
labels=label_percent(accuracy=1))+
theme_custom()+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
agg_tiff("Outputs/COVIDVaxHeatmapOrdered.tiff", units="in", width=16, height=32, res=800)
plot_grid(vaxtiles2, vaxbars2, align="h", rel_widths=c(1,0.2))
dev.off()
agg_png("Outputs/COVIDVaxHeatmapOrdered.png", units="in", width=16, height=32, res=800)
plot_grid(vaxtiles2, vaxbars2, align="h", rel_widths=c(1,0.2))
dev.off()
================================================
FILE: Heatmaps/COVIDVaxPyramidxRegion.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(showtext)
options(scipen=9999)
#Download Vaccination data
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-22-April-2021.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- as.data.frame(t(read_excel(temp, sheet="Gender, Age & Region", range="C17:AN23", col_names=F)))
colnames(rawdata) <- c("East of England", "London", "Midlands", "North East & Yorkshire", "North West",
"South East", "South West")
data <- rawdata %>%
filter(!is.na(London)) %>%
mutate(Dose=rep(c("1st", "2nd"), each=18), Sex=rep(c("Male", "Female"), times=18),
Age=rep(c("16-45", "45-49", "50-54", "55-59", "60-64", "65-69", "70-74", "75-79", "80+"),
each=2, times=2)) %>%
gather(Region, Vax, c(1:7)) %>%
spread(Dose, Vax)
#Bring in population data (based on ONS as NIMS is linked to lower level geographies only)
url <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland/mid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
malepop <- read_excel(temp, sheet="MYE2 - Males", range="B5:CQ431") %>%
filter(Geography1=="Region") %>%
gather(Age, Pop, c(4:94)) %>%
mutate(Region=case_when(
Name=="NORTH WEST" ~ "North West",
Name %in% c("EAST MIDLANDS", "WEST MIDLANDS") ~ "Midlands",
Name=="EAST" ~ "East of England",
Name=="LONDON" ~ "London",
Name=="SOUTH EAST" ~ "South East",
Name=="SOUTH WEST" ~ "South West",
TRUE ~ "North East & Yorkshire"),
Age=as.numeric(if_else(Age=="90+", "90", Age)),
Age=case_when(
Age<16~ "<16", Age<45 ~ "16-45", Age<50 ~ "45-49", Age<55 ~ "50-54", Age<60 ~ "55-59", Age<65 ~ "60-64",
Age<70 ~ "65-69", Age<75 ~ "70-74", Age<80 ~ "75-79", TRUE ~ "80+")) %>%
group_by(Region, Age) %>%
summarise(Pop=sum(Pop)) %>%
ungroup() %>%
mutate(Sex="Male")
femalepop <- read_excel(temp, sheet="MYE2 - Females", range="B5:CQ431") %>%
filter(Geography1=="Region") %>%
gather(Age, Pop, c(4:94)) %>%
mutate(Region=case_when(
Name=="NORTH WEST" ~ "North West",
Name %in% c("EAST MIDLANDS", "WEST MIDLANDS") ~ "Midlands",
Name=="EAST" ~ "East of England",
Name=="LONDON" ~ "London",
Name=="SOUTH EAST" ~ "South East",
Name=="SOUTH WEST" ~ "South West",
TRUE ~ "North East & Yorkshire"),
Age=as.numeric(if_else(Age=="90+", "90", Age)),
Age=case_when(
Age<16~ "<16", Age<45 ~ "16-45", Age<50 ~ "45-49", Age<55 ~ "50-54", Age<60 ~ "55-59", Age<65 ~ "60-64",
Age<70 ~ "65-69", Age<75 ~ "70-74", Age<80 ~ "75-79", TRUE ~ "80+")) %>%
group_by(Region, Age) %>%
summarise(Pop=sum(Pop)) %>%
ungroup() %>%
mutate(Sex="Female")
plotdata <- data %>%
merge(bind_rows(malepop, femalepop), by=c("Region", "Age", "Sex")) %>%
rowwise() %>%
mutate(Unvax=Pop-`1st`, Vax1Only=`1st`-`2nd`) %>%
ungroup() %>%
select(-c("1st", "Pop")) %>%
gather(Measure, Value, c("Unvax", "Vax1Only", "2nd")) %>%
mutate(SexMeasure=paste0(Sex, Measure),
Value=if_else(Value<0,0,Value),
Value=if_else(Sex=="Male", -Value, Value),
Age=factor(Age, levels=c("<16", "16-45", "45-49", "50-54", "55-59", "60-64",
"65-69", "70-74", "75-79", "80+")),
SexMeasure=factor(SexMeasure, levels=c("MaleUnvax", "MaleVax1Only", "Male2nd",
"FemaleUnvax", "FemaleVax1Only", "Female2nd")))
agg_tiff("Outputs/COVIDVaxxAgexSexxRegion.tiff", units="in", width=9, height=7, res=800)
ggplot(plotdata, aes(x=Value, y=Age, fill=SexMeasure))+
geom_col(position="stack", show.legend=FALSE)+
scale_x_continuous(name="", limits=c(-2100000, 2100000),
breaks=c(-2e06, -1e06, 0, 1e06, 2e06),
labels=c("2m", "1m", "0", "1m", "2m"))+
scale_y_discrete(name="Age group")+
scale_fill_manual(values=c("Grey80", "#be7dff", "#6600cc", "Grey80", "#7dffdd", "#00cc99"))+
facet_wrap(~Region)+
theme_classic()+
theme(axis.line.y=element_blank(), text=element_text(family="Roboto"),
plot.title=element_text(face="bold", size=rel(1.4)), plot.subtitle=element_markdown(),
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))+
labs(title="Regional COVID-19 vaccine delivery in England by age and sex",
subtitle="The number of people who are unvaccinated, men with one or two doses and women with one or two doses",
caption="Data from PHE, population figures from ONS\nPlot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDVaxUptakexAge.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(scales)
library(extrafont)
library(ragg)
library(readxl)
options(scipen=10000)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Download vaccination data from the dashboard
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=vaccinationsAgeDemographics&format=csv"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp) %>%
select(date, age, areaName, cumVaccinationFirstDoseUptakeByVaccinationDatePercentage,
cumVaccinationSecondDoseUptakeByVaccinationDatePercentage,
VaccineRegisterPopulationByVaccinationDate,
cumPeopleVaccinatedFirstDoseByVaccinationDate,
cumPeopleVaccinatedSecondDoseByVaccinationDate) %>%
set_names(c("date", "age", "country", "First dose_NIMS", "Second dose_NIMS", "pop_NIMS",
"Total1stDoses", "Total2ndDoses")) %>%
mutate(age=gsub("_", "-", age), date=as.Date(date))
#Add in ONS population estimates (mid-2020 figures)
url <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
ONSpop_2020 <- as.data.frame(t(read_excel(temp, sheet="MYE2 - Persons", range="E8:CQ384",
col_names=FALSE))) %>%
select(V1, V5, V377) %>%
set_names(c("age", "England", "Scotland")) %>%
gather(country, pop_ONS2020, c(2,3)) %>%
mutate(age=as.numeric(if_else(age=="90+", "90", age)),
pop_ONS2020=as.numeric(pop_ONS2020),
age=case_when(
age<12 ~ "u12", age<16 ~ "12-15", age<18 ~ "16-17",
age<25 & country=="England" ~ "18-24", age<30 & country=="England" ~ "25-29",
age<30 ~ "18-29",
age<35 & country=="England" ~ "30-34", age<40 & country=="England" ~ "35-39",
age<40 ~ "30-39",
age<45 & country=="England" ~ "40-44", age<50 & country=="England" ~ "45-49",
age<50 ~ "40-49", age<55 ~ "50-54", age<60 ~ "55-59",
age<65 ~ "60-64", age<70 ~ "65-69", age<75 ~ "70-74",
age<80 ~ "75-79", age<85 & country=="England" ~ "80-84", age<90 & country=="England" ~ "85-89",
country=="England" ~ "90+",
TRUE ~ "80+")) %>%
group_by(age, country) %>%
summarise(pop_ONS2020=sum(pop_ONS2020)) %>%
ungroup()
#Merge populations into data
datafull <- data %>%
merge(ONSpop_2020) %>%
mutate(`First dose_ONS2020`=Total1stDoses*100/pop_ONS2020,
`Second dose_ONS2020`=Total2ndDoses*100/pop_ONS2020)
#Separate out dataset for England only and for comparison with Scotland
#(with broader Scottish age bands)
datafull_e <- datafull %>%
filter(country=="England") %>%
group_by(date) %>%
summarise(pop_NIMS=sum(pop_NIMS), Total1stDoses=sum(Total1stDoses),
Total2ndDoses=sum(Total2ndDoses),
pop_ONS2020=sum(pop_ONS2020)) %>%
mutate(age="Total", `First dose_NIMS`=Total1stDoses*100/pop_NIMS,
`Second dose_NIMS`=Total2ndDoses*100/pop_NIMS,
`First dose_ONS2020`=Total1stDoses*100/pop_ONS2020,
`Second dose_ONS2020`=Total2ndDoses*100/pop_ONS2020) %>%
bind_rows(datafull %>%
filter(country=="England")) %>%
#Tidy up
pivot_longer(c(`First dose_NIMS`, `Second dose_NIMS`,
`First dose_ONS2020`, `Second dose_ONS2020`),
names_to=c("dose", "source"), names_sep="_",
values_to="prop") %>%
mutate(prop=prop/100, date=as.Date(date)) %>%
ungroup()
datafull_se <- datafull %>%
mutate(age=case_when(
age %in% c("18-24", "25-29") ~ "18-29",
age %in% c("30-34", "35-39") ~ "30-39",
age %in% c("40-44", "45-49") ~ "40-49",
age %in% c("80-84", "85-89", "90+") ~ "80+",
TRUE ~ age)) %>%
group_by(date, country, age) %>%
summarise(Total1stDoses=sum(Total1stDoses),
Total2ndDoses=sum(Total2ndDoses),
pop_ONS2020=sum(pop_ONS2020)) %>%
ungroup() %>%
mutate(`First dose`=Total1stDoses*100/pop_ONS2020,
`Second dose`=Total2ndDoses*100/pop_ONS2020) %>%
gather(dose, prop, c(`First dose`, `Second dose`))
agg_tiff("Outputs/COVIDVaxUptakexAge.tiff", units="in", width=9, height=6, res=800)
ggplot()+
geom_line(data=datafull_e %>% filter(age!="Total" & source=="NIMS"),
aes(x=date, y=prop, colour=age, group=age))+
geom_line(data=datafull_e %>% filter(age=="Total" & source=="NIMS"),
aes(x=date, y=prop), colour="Black", linetype=3)+
geom_hline(yintercept=1, colour="Grey80")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of age group vaccinated",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("pals::stepped", guide=guide_legend(reverse=TRUE),
name="Age")+
facet_wrap(~dose)+
theme_custom()+
theme(panel.grid.major.y=element_line(colour="Grey90"))+
labs(title="Vaccine uptake is lower in younger age groups",
subtitle="Cumulative proportion of English population vaccinated against COVID with one or two doses by age group.\nThe dotted line represents the overall proportion of the population aged 12+ who have been vaccinated",
caption="Data from coronavirus.data.gov.uk | Population estimates from NIMS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxUptakexAgeONS2020.tiff", units="in", width=9, height=6, res=800)
ggplot()+
geom_line(data=datafull_e %>% filter(age!="Total" & source=="ONS2020"),
aes(x=date, y=prop, colour=age, group=age))+
geom_line(data=datafull_e %>% filter(age=="Total" & source=="ONS2020"),
aes(x=date, y=prop), colour="Black", linetype=3)+
geom_hline(yintercept=1, colour="Grey80")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of age group vaccinated",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("pals::stepped", guide=guide_legend(reverse=TRUE),
name="Age")+
facet_wrap(~dose)+
theme_custom()+
theme(panel.grid.major.y=element_line(colour="Grey90"))+
labs(title="Vaccine uptake is lower in younger age groups",
subtitle="Cumulative proportion of English population vaccinated against COVID with one or two doses by age group.\nThe dotted line represents the overall proportion of the population aged 12+ who have been vaccinated",
caption="Data from coronavirus.data.gov.uk | Population data from ONS 2020 estimates | Plot by @VictimOfMaths")
dev.off()
#Faceted plot showing both estimates
agg_tiff("Outputs/COVIDVaxUptakexAgeComparisons.tiff", units="in",
width=8, height=8, res=800)
ggplot(datafull_e %>% filter(dose=="First dose"),
aes(x=date, y=prop, colour=source, group=source))+
geom_line()+
geom_hline(yintercept=1, colour="Grey80")+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of age group vaccinated",
labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("rcartocolor::Safe", name="Population\nsource:",
labels=c("NIMS", "ONS 2020\nestimates",
"ONS 2021\nprojections"))+
facet_wrap(~age)+
theme_custom()+
theme(legend.position="top")+
labs(title="NIMS gives a different picture of vaccine uptake to ONS population estimates",
subtitle="Cumulative proportion of English population vaccinated against COVID with at least one dose,\nusing alternative population estimates.",
caption="Data from coronavirus.data.gov.uk, NIMS & ONS | Plot by @VictimOfMaths")
dev.off()
#Just the populations
popdata <- datafull_e %>%
filter(date==max(date) & dose=="First dose" & source=="NIMS") %>%
select(age, pop_NIMS, pop_ONS2020) %>%
gather(source, pop, c(2:3))
agg_tiff("Outputs/EngPopEstimates.tiff", units="in", width=8, height=8, res=800)
ggplot(popdata %>% filter(age!="Total"), aes(x=pop/1000000, y=age, fill=source))+
geom_col(position="dodge")+
scale_x_continuous(name="Estimated population (millions)")+
scale_y_discrete(name="Age")+
scale_fill_paletteer_d("rcartocolor::Safe", name="Population\nsource:",
labels=c("NIMS", "ONS 2020\nestimates",
"ONS 2021\nprojections"))+
theme_custom()+
theme(legend.position="top")+
labs(title="Population estimates for younger age groups vary a lot between sources",
subtitle="Estimated English populations by age group from the National Immunisation Management Service (NIMS),\nONS mid-year population estimates for 2019 and ONS population projections for 2021 based on 2018 data.",
caption="data from NIMS & ONS | Plot by @VictimOfMaths")
dev.off()
#Comparing England & Scotland
agg_tiff("Outputs/COVIDVaxEngvsScotxAge.tiff", units="in", width=9, height=7, res=800)
ggplot(datafull_se %>% mutate(dosecountry=paste(dose, country)),
aes(x=date, y=prop/100, colour=country, linetype=dose, group=dosecountry))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of the population vaccinated",
labels=label_percent(accuracy=1))+
scale_colour_manual(values=c("#F44B4B", "#0076BB"), name="Country")+
scale_linetype_discrete(name="Dose")+
facet_wrap(~age)+
theme_custom()+
labs(title="Scotland is vaccinating under 18s faster than England",
subtitle="Vaccination coverage in England and Scotland by age",
caption="Vaccination data from coronavirus.gov.uk | Population estimates from ONS | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxEngvsScotxAgeu18.tiff", units="in", width=8, height=6, res=800)
ggplot(datafull_se %>% filter(age %in% c("12-15", "16-17")) %>%
mutate(dosecountry=paste(dose, country)),
aes(x=date, y=prop/100, colour=country, linetype=dose, group=dosecountry))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="Proportion of the population vaccinated",
labels=label_percent(accuracy=1))+
scale_colour_manual(values=c("#F44B4B", "#0076BB"), name="Country")+
scale_linetype_discrete(name="Dose")+
facet_wrap(~age)+
theme_custom()+
labs(title="Scotland is vaccinating under 18s faster than England",
subtitle="Vaccination coverage in England and Scotland by age",
caption="Vaccination data from coronavirus.gov.uk | Population estimates from ONS | Plot by @VictimOfMaths")
dev.off()
#########################
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-29-October-2021.xlsx"
temp <- tempfile()
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
Boosters <- read_excel(temp, sheet="Total Vaccinations by Age", range="B15:F29") %>%
select(-2) %>%
set_names("age", "1 doses", "2 doses", "3 dose") %>%
mutate(`1 dose`=`1 doses`-`2 doses`,
`2 dose`=`2 doses`-`3 dose`) %>%
merge(popdata %>% filter(source=="pop_ONS2020") %>%
mutate(age=case_when(
age %in% c("80-84", "85-89", "90+") ~ "80+",
age %in% c("12-15", "17-18") ~ "Under 18",
age=="Total" ~ "Total",
TRUE ~ age)) %>%
group_by(age) %>%
summarise(pop=sum(pop))) %>%
mutate(`Unvaccinated`=pop-`1 doses`,
age=if_else(age=="Under 18", "12-17", age)) %>%
gather(Doses, Vaccinated, c(Unvaccinated, `1 dose`, `2 dose`, `3 dose`)) %>%
mutate(Vaccinated=if_else(Vaccinated<0, 0, Vaccinated),
Doses=factor(Doses, levels=c("Unvaccinated", "1 dose", "2 dose", "3 dose")))
total <- Boosters %>% group_by(Doses) %>%
summarise(Vaccinated=sum(Vaccinated))
agg_tiff("Outputs/COVIDVaxBooster Pyramix.tiff", units="in", width=9, height=8, res=500)
ggplot(Boosters, aes(x=Vaccinated/1000000, y=age, fill=Doses))+
geom_col()+
scale_x_continuous(name="Number of people (millions)")+
scale_y_discrete(name="Age")+
scale_fill_manual(values=c("#01000E", "#FBA724", "#EE7E24", "#D42D24"), name="")+
theme_custom()+
labs(title="13% of people in England aged 12+ have now received a 3rd COVID jab",
subtitle="Number of vaccine doses delivered by age group in England. 3 doses includes both boosters and 3rd primary doses",
caption="Vaccination data from NHS England | Population data from ONS | plot by @VictimOfMaths\nNote that for ages 75+, ONS population estimates suggest >100% first dose coverage")
dev.off()
================================================
FILE: Heatmaps/COVIDVaxUptakexReg.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(extrafont)
library(ragg)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
temp <- tempfile()
url <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=vaccinationsAgeDemographics&format=csv"
temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp) %>%
select(areaName, date, age, cumVaccinationFirstDoseUptakeByVaccinationDatePercentage) %>%
rename("uptake"="cumVaccinationFirstDoseUptakeByVaccinationDatePercentage") %>%
filter(age=="12_15" & date>as.Date("2021-08-01")) %>%
mutate(date=as.Date(date))
agg_tiff("Outputs/COVIDVaxUptake1215xReg.tiff", units="in", width=8, height=6, res=500)
ggplot(data, aes(x=date, y=uptake/100, colour=areaName))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="First dose coverage", labels=label_percent(accuracy=1))+
scale_colour_paletteer_d("LaCroixColoR::paired", name="")+
theme_custom()+
labs(title="There is big regional variation in 12-15 COVID vaccination rates",
subtitle="Vaccine uptake among 12-15 year-olds in England by region",
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDVaxxAgeUKUSA.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(extrafont)
library(ggtext)
library(scales)
library(readxl)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#US data from https://covid.cdc.gov/covid-data-tracker/#vaccination-demographic
#Hard coded because I can't work out how to extract the download url from the PowerBI dashboard
USpop <- 331449281
USdata <- data.frame(age=c("<12", "12-15", "16-17", "18-24", "25-39", "40-49", "50-64",
"65-74", "75+"),
dose1=c(198609, 6388261, 3931936, 15268822, 36501123, 25352681, 45542907,
27423936, 18823020),
dose2=c(122769, 4607456, 3122352, 12411413, 30610887, 21683574, 39865850,
24394904, 16744576),
popperc=c(0.144, 0.05, 0.025, 0.092, 0.205, 0.122, 0.194, 0.098, 0.07)) %>%
mutate(pop=USpop*popperc,
unvax=pop-dose1,
dose1only=dose1-dose2,
agemin=case_when(
age=="<12" ~ 0,
TRUE ~ as.numeric(substr(age, 1, 2))),
agemax=case_when(
age=="<12" ~ 12,
age=="75+" ~ 100,
TRUE ~ as.numeric(substr(age, 4,5))+1),
agewidth=agemax-agemin,
dose2plot=dose2/agewidth,
dose1plot=dose1/agewidth,
unvaxplot=pop/agewidth)
#UK data from NHS vaccination spreadsheet
temp <- tempfile()
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/08/COVID-19-weekly-announced-vaccinations-05-August-2021.xlsx"
UKvax <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
UKpop <- read_excel(UKvax, sheet="Population estimates (ONS 2020)", range="B16:D29", col_names=FALSE) %>%
select(-`...2`) %>%
set_names(c("age", "pop"))
UKdata <- as.data.frame(t(read_excel(UKvax, sheet="NHS Region", range="D12:AH13", col_names=FALSE))) %>%
filter(!is.na(V1)) %>%
mutate(dose=rep(c("dose1", "dose2"), each=14),
V2=as.numeric(V2)) %>%
spread(dose, V2) %>%
rename(age=V1) %>%
merge(UKpop) %>%
mutate(unvax=pop-dose1,
dose1only=dose1-dose2,
agemin=case_when(
age=="Under 18" ~ 0,
TRUE ~ as.numeric(substr(age, 1, 2))),
agemax=case_when(
age=="Under 18" ~ 18,
age=="80+" ~ 100,
TRUE ~ as.numeric(substr(age, 4,5))+1),
agewidth=agemax-agemin,
dose2plot=dose2/agewidth,
dose1plot=dose1/agewidth,
unvaxplot=pop/agewidth)
tiff("Outputs/COVIDVaxxAgeUKUSA.tiff", units="in", width=9, height=6.6, res=500)
ggplot()+
geom_rect(data=UKdata, aes(xmin=0, xmax=dose2plot, ymin=agemin, ymax=agemax), fill="darkred")+
geom_rect(data=UKdata, aes(xmin=dose2plot, xmax=dose1plot, ymin=agemin, ymax=agemax), fill="tomato")+
geom_rect(data=UKdata, aes(xmin=dose1plot, xmax=unvaxplot, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_rect(data=USdata, aes(xmax=0, xmin=-dose2plot, ymin=agemin, ymax=agemax), fill="navyblue")+
geom_rect(data=USdata, aes(xmax=-dose2plot, xmin=-dose1plot, ymin=agemin, ymax=agemax), fill="royalblue")+
geom_rect(data=USdata, aes(xmax=-dose1plot, xmin=-unvaxplot, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_segment(aes(x=0, xend=0, y=0, yend=100), colour="White")+
scale_x_continuous(name="Number of people at each single year of age", labels=abs)+
scale_y_continuous(name="Age", limits=c(0,100))+
theme_custom()+
theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+
labs(title="The US has vaccinated fewer of its older population against COVID than England",
subtitle="The number of people in each country who are unvaccinated, have received one dose or are fully vaccinated.",
caption="Data from CDC, NHS England and ONS\nPlot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDVaxxAgeUKUSANorm.tiff", units="in", width=9, height=6.6, res=500)
ggplot()+
geom_rect(data=UKdata, aes(xmin=0, xmax=dose2plot, ymin=agemin, ymax=agemax), fill="darkred")+
geom_rect(data=UKdata, aes(xmin=dose2plot, xmax=dose1plot, ymin=agemin, ymax=agemax), fill="tomato")+
geom_rect(data=UKdata, aes(xmin=dose1plot, xmax=unvaxplot, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_rect(data=USdata, aes(xmax=0, xmin=-dose2plot/5.9, ymin=agemin, ymax=agemax), fill="navyblue")+
geom_rect(data=USdata, aes(xmax=-dose2plot/5.9, xmin=-dose1plot/5.9, ymin=agemin, ymax=agemax), fill="royalblue")+
geom_rect(data=USdata, aes(xmax=-dose1plot/5.9, xmin=-unvaxplot/5.9, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_segment(aes(x=0, xend=0, y=0, yend=100), colour="White")+
scale_x_continuous(name="Number of people at each single year of age",
breaks=c(-508474.6, 0, 500000), labels=c("3,000,000", "0", "500,000"))+
scale_y_continuous(name="Age", limits=c(0,100))+
theme_custom()+
theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+
labs(title="The US has vaccinated fewer of its older population against COVID than England",
subtitle="The number of people in each country who are unvaccinated, have received one dose or are fully vaccinated.
Areas are scaled to imply equal populations, so the x-axis scales on the left- and right- of the centre are different.",
caption="Data from CDC, NHS England and ONS\nPlot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDVaxxAgeUKUSANormUnvax.tiff", units="in", width=9, height=6.6, res=500)
ggplot()+
geom_rect(data=UKdata, aes(xmin=0, xmax=unvax/agewidth, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_rect(data=USdata, aes(xmax=0, xmin=-unvax/(agewidth*5.9), ymin=agemin, ymax=agemax), fill="Grey70")+
geom_segment(aes(x=0, xend=0, y=0, yend=100), colour="White")+
annotate("text", x=-500000, y=80, label="USA", colour="navyblue", family="Lato", size=rel(6),
fontface="bold")+
annotate("text", x=500000, y=80, label="England", colour="darkred", family="Lato", size=rel(6),
fontface="bold")+
scale_x_continuous(name="Number of people at each single year of age",
breaks=c(-508474.6, 0, 500000), labels=c("3,000,000", "0", "500,000"))+
scale_y_continuous(name="Age", limits=c(0,100))+
theme_custom()+
labs(title="The US has vaccinated fewer of its older population against COVID than England",
subtitle="The number of people in each country who are unvaccinated.\nAreas are scaled to imply equal populations, so the x-axis scales on the left- and right- of the centre are different.",
caption="Data from CDC, NHS England and ONS\nPlot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDVaxxAgeUKUSAPerc.tiff", units="in", width=9, height=6.6, res=500)
ggplot()+
geom_rect(data=UKdata, aes(xmin=0, xmax=dose2/pop, ymin=agemin, ymax=agemax), fill="darkred")+
geom_rect(data=UKdata, aes(xmin=dose2/pop, xmax=dose1/pop, ymin=agemin, ymax=agemax), fill="tomato")+
geom_rect(data=UKdata, aes(xmin=dose1/pop, xmax=1, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_rect(data=USdata, aes(xmax=0, xmin=-dose2/pop, ymin=agemin, ymax=agemax), fill="navyblue")+
geom_rect(data=USdata, aes(xmax=-dose2/pop, xmin=-dose1/pop, ymin=agemin, ymax=agemax), fill="royalblue")+
geom_rect(data=USdata, aes(xmax=-dose1/pop, xmin=-1, ymin=agemin, ymax=agemax), fill="Grey70")+
geom_segment(aes(x=0, xend=0, y=0, yend=100), colour="White")+
scale_x_continuous(name="Proportion of population", breaks=c(-1, -0.5, 0, 0.5, 1),
labels=c("100%", "50%", "0%", "50%", "100%"))+
scale_y_continuous(name="Age", limits=c(0,100))+
theme_custom()+
theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+
labs(title="The US has vaccinated fewer of its older population against COVID than England",
subtitle="The proportion of people at each age in each country who are unvaccinated, have received one dose or are fully vaccinated.",
caption="Data from CDC, NHS England and ONS\nPlot by @VictimOfMaths")
dev.off()
#CHRs from Dan Howdon
CHR2534 <- 0.015435
CHR3544 <- 0.022447
CHR4554 <- 0.02882
CHR5564 <- 0.0491
CHR6574 <- 0.115683
CHR7584 <- 0.270174
CHR85plus <- 0.419715
#Merge together
data <- UKdata %>% mutate(country="England") %>%
bind_rows(USdata %>% mutate(country="USA")) %>%
select(age, dose1only, dose2, unvax, pop, agemin, agemax, agewidth, country) %>%
gather(dose, number, c(dose1only, dose2, unvax)) %>%
#Calculate hospitalisation risk reduction from vaccinations using effectiveness data from
#https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1008919/Vaccine_surveillance_report_-_week_31.pdf
mutate(risk=case_when(
dose=="dose1only" ~ number*(1-0.8),
dose=="dose2" ~ number*(1-0.96),
TRUE ~ number)) %>%
group_by(age, pop, agemin, agemax, agewidth, country) %>%
summarise(risk=sum(risk)) %>%
ungroup() %>%
mutate(riskreduction=risk/pop) %>%
arrange(fct_rev(country), age) %>%
#Merge in CHRs calculated by Dan Howdon
#Weighted averages informed by pop data from https://data.census.gov/cedsci/table?q=United%20States&g=0100000US&y=2019&tid=ACSST1Y2019.S0101
#and ONS
mutate(CHR=case_when(
age %in% c("25-29", "30-34") ~ CHR2534,
age %in% c("35-39", "40-44") ~ CHR3544,
age %in% c("45-49", "50-54") ~ CHR4554,
age %in% c("55-59", "60-64") ~ CHR5564,
age %in% c("65-69", "70-74", "65-74") ~ CHR6574,
age %in% c("75-79") ~ CHR7584,
age=="25-39" ~ ((23.2+22.3)*CHR2534+21.7*CHR3544)/(23.2+22.3+21.7),
age=="40-49" ~ (20.2*CHR3544+20.4*CHR4554)/(20.2+20.4),
age=="50-64" ~ (20.5*CHR4554+(21.5+21.0)*CHR5564)/(20.5+21.5+21.0),
age=="75+" ~ ((9.8+6.3)*CHR7584+6.4*CHR85plus)/(9.8+6.3+6.4),
age=="80+" ~ (1.4*CHR7584+1.4*CHR85plus)/(1.4+1.4),
TRUE ~ 0),
hosp=risk*CHR, hosp_avert=pop*CHR-hosp)
#Visualise risk reduction
tiff("Outputs/COVIDVaxxAgeUKUSARiskRed.tiff", units="in", width=10, height=6.6, res=500)
ggplot(data)+
geom_rect(aes(xmin=agemin, xmax=agemax, ymin=0, ymax=riskreduction, fill=country), alpha=0.6,
show.legend=FALSE)+
geom_segment(aes(x=0, xend=100, y=1, yend=1))+
scale_x_continuous(name="Age")+
scale_y_continuous(name="Proportion of risk without vaccination", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("tomato", "royalblue"))+
theme_custom()+
theme(plot.title=element_markdown())+
labs(title="England's vaccine programme has reduced hospitalisation risk much more than the USA's",
subtitle="Shaded areas represent risk of hospitalisation from COVID as a proportion of the risk in an entirely unvaccinated population, by age.",
caption="Vaccination data from CDC and NHS England | Population data from US Census Bureau and ONS | Vaccine effectiveness data from PHE\nPlot by @VictimOfMaths")
dev.off()
#Visualise hospitalisations averted
tiff("Outputs/COVIDVaxxAgeUKUSARiskAdj.tiff", units="in", width=9, height=6.6, res=500)
ggplot()+
geom_rect(data=data %>% filter(country=="England"), aes(xmin=0, xmax=hosp/agewidth, ymin=agemin, ymax=agemax),
fill="tomato")+
geom_rect(data=data %>% filter(country=="England"), aes(xmin=hosp/agewidth, xmax=(hosp+hosp_avert)/agewidth, ymin=agemin, ymax=agemax),
fill="Grey70")+
geom_rect(data=data %>% filter(country=="USA"), aes(xmax=0, xmin=-hosp/agewidth, ymin=agemin, ymax=agemax),
fill="royalblue")+
geom_rect(data=data %>% filter(country=="USA"), aes(xmax=-hosp/agewidth, xmin=-(hosp+hosp_avert)/agewidth, ymin=agemin, ymax=agemax),
fill="Grey70")+
geom_segment(aes(x=0, xend=0, y=25, yend=100), colour="White")+
scale_x_continuous(name="Total hospitalisations for each single year of age",
labels=abs)+
scale_y_continuous(name="Age", limits=c(25,100))+
theme_custom()+
theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+
labs(title="Vaccination has reduced COVID hospitalisation risks more in England than in the US",
subtitle="Coloured areas represent the total number of hospital admissions we would expect in each country if everyone developed COVID,
based on current vaccination levels.Grey areas represent hospital admissions averted as a result of vaccination.",
caption="Vaccination data from CDC and NHS England | Population data from US Census Bureau and ONS\nVaccine effectiveness data from PHE | CHRs estimated by Dan Howdon\nPlot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDVaxxAgeUKUSARiskAdjNorm.tiff", units="in", width=9, height=6.6, res=500)
ggplot()+
geom_rect(data=data %>% filter(country=="England"), aes(xmin=0, xmax=hosp/agewidth, ymin=agemin, ymax=agemax),
fill="tomato")+
geom_rect(data=data %>% filter(country=="England"), aes(xmin=hosp/agewidth, xmax=(hosp+hosp_avert)/agewidth, ymin=agemin,
ymax=agemax),
fill="Grey70")+
geom_rect(data=data %>% filter(country=="USA"), aes(xmax=0, xmin=-hosp/(agewidth*5.9), ymin=agemin, ymax=agemax),
fill="royalblue")+
geom_rect(data=data %>% filter(country=="USA"), aes(xmax=-hosp/(agewidth*5.9), xmin=-hosp/(agewidth*5.9)-hosp_avert/(agewidth*5.9),
ymin=agemin, ymax=agemax),
fill="Grey70")+
geom_segment(aes(x=0, xend=0, y=25, yend=100), colour="White")+
scale_x_continuous(name="Total hospitalisations for each single year of age",
breaks=c(-50847.46, 0, 50000),
labels=c("300,000", "0", "50,000"),
limits=c(-110000, 110000))+
scale_y_continuous(name="Age", limits=c(25,100))+
theme_custom()+
theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+
labs(title="Vaccination has reduced COVID hospitalisation risks more in England than in the US",
subtitle="Coloured areas represent the total number of hospital admissions we would expect in each country if everyone developed COVID,
based on current vaccination levels.Grey areas represent hospital admissions averted as a result of vaccination.
Areas are scaled to imply equal populations, so the x-axis scales on the left- and right- of the centre are different.",
caption="Vaccination data from CDC and NHS England | Population data from US Census Bureau and ONS\nVaccine effectiveness data from PHE | CHRs estimated by Dan Howdon\nPlot by @VictimOfMaths")+
annotate("text", x=-60000, y=50, label="USA", colour="royalblue", family="Lato", size=rel(6),
fontface="bold")+
annotate("text", x=60000, y=50, label="England", colour="tomato", family="Lato", size=rel(6),
fontface="bold")+
annotate("text", x=-85000, y=90, label="Hospital admissions\nbased on current vaccinations", colour="Black",
family="Lato", size=rel(4))+
annotate("text", x=75000, y=90, label="Admissions averted\nby vaccinations", colour="Black", family="Lato", size=rel(4))+
geom_curve(aes(x=-58000, y=90, xend=-5000, yend=85),
colour="Black", curvature=-0.25, arrow=arrow(length=unit(0.1, "cm"), type="closed"),
lineend="round")+
geom_curve(aes(x=58000, y=90, xend=35000, yend=85),
colour="Black", curvature=-0.15, arrow=arrow(length=unit(0.1, "cm"), type="closed"),
lineend="round")
dev.off()
#Calculate actual numbers
data %>% group_by(country) %>%
summarise(hosp=sum(hosp), hosp_avert=sum(hosp_avert)) %>%
mutate(percchange=hosp_avert/(hosp+hosp_avert))
================================================
FILE: Heatmaps/COVIDVaxxEthnicityEngScot.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ggtext)
library(extrafont)
library(ragg)
library(paletteer)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
#Scottish data doesn't appear to be machine readable, sadface.
#https://www.scotlandscensus.gov.uk/webapi/jsf/tableView/tableView.xhtml
Scotdata <- data.frame(age=c("0-15", "16-24", "25-34", "35-49", "50-64", "65+"),
White=c(836005, 593489, 617472, 1101772, 1025729, 882940),
`Asian/Asian Scottish/Asian British`=c(31449, 28356, 33048, 29106, 12925, 5794),
`Black/African/Caribbean/Black British`=
c(7774+1499, 3915+924, 9081+1236, 7126+1847,1374+740, 368+294),
`Mixed/Other`=c(9097+3507, 3597+2207, 2945+3545, 2602+3230, 1080+1392,
494+444),
Country="Scotland") %>%
set_names(c("age", "White", "Asian/Asian Scottish/Asian British",
"Black/African/Caribbean/Black British", "Mixed/Other", "Country")) %>%
gather(Ethnicity, pop, c(2:5))
Engurl <- "https://www.ons.gov.uk/file?uri=/aboutus/transparencyandgovernance/freedomofinformationfoi/ethnicgroupsbysexandagefromthe2011census/dc2101ewethnicgroupbysexbyage.xlsx"
temp <- tempfile()
temp <- curl_download(url=Engurl, destfile=temp, quiet=FALSE, mode="wb")
Engdata <- read_excel(temp, sheet="All persons", range="A11:Y33") %>%
select(Age, `White: Total`, `Mixed/multiple ethnic group: Total`,
`Asian/Asian British: Total`, `Black/African/Caribbean/Black British: Total`,
`Other ethnic group: Total`) %>%
set_names(c("age", "White", "Mixed", "Asian/Asian Scottish/Asian British",
"Black/African/Caribbean/Black British", "Other")) %>%
rowwise() %>%
mutate(`Mixed/Other`=Mixed+Other) %>%
select(-c("Mixed", "Other")) %>%
gather(Ethnicity, pop, c(2:5)) %>%
mutate(age=case_when(
age %in% c("Age 0 to 4", "Age 5 to 7", "Age 8 to 9", "Age 10 to 14", "Age 15") ~ "0-15",
age %in% c("Age 16 to 17", "Age 18 to 19", "Age 20 to 24") ~ "16-24",
age %in% c("Age 25 to 29", "Age 30 to 34") ~ "25-34",
age %in% c("Age 35 to 39", "Age 40 to 44", "Age 45 to 49") ~ "35-49",
age %in% c("Age 50 to 54", "Age 55 to 59", "Age 60 to 64") ~ "50-64",
TRUE ~ "65+")) %>%
group_by(Ethnicity, age) %>%
summarise(pop=sum(pop)) %>%
ungroup() %>%
mutate(Country="England")
data <- bind_rows(Engdata, Scotdata)
agg_tiff("Outputs/EthnicityxAgeEngScot.tiff", units="in", width=8, height=6, res=800)
ggplot(data, aes(x=age, y=pop, fill=Ethnicity))+
geom_col(position="fill")+
scale_x_discrete(name="Age")+
scale_y_continuous(name="Proportion of population", labels=label_percent(accuracy=1))+
scale_fill_paletteer_d("rcartocolor::Safe")+
facet_wrap(~Country)+
theme_custom()+
labs(title="England has a much larger non-white population than Scotland",
subtitle="Population by age and self-reported ethnicity in the 2011 census",
caption="Data from ONS and NRS | Plot by @VictimOfMaths")
dev.off()
#Estimate uptake if all that mattered was ethnicity, using uptake by ethnicity
#approximated from PHE surveillance reports
calcs <- data %>%
group_by(Country, age) %>%
mutate(total=sum(pop)) %>%
ungroup() %>%
mutate(popprop=pop/total,
uptake=case_when(
Ethnicity=="White" ~ 0.929,
Ethnicity=="Asian/Asian Scottish/Asian British" ~ 0.83,
Ethnicity=="Black/African/Caribbean/Black British" ~ 0.67,
TRUE ~ 0.76),
vaxxed=popprop*uptake) %>%
group_by(Country, age) %>%
summarise(vaxxed=sum(vaxxed))
agg_tiff("Outputs/COVIDVaxxEthnicityModelledEngScot.tiff", units="in", width=8, height=6, res=800)
ggplot(calcs, aes(x=age, y=vaxxed, fill=Country))+
geom_col(position="dodge")+
scale_y_continuous(name="Proportion of population", labels=label_percent(accuracy=1))+
scale_fill_manual(values=c("#F44B4B", "#0076BB"), name="Country")+
theme_custom()+
labs(title="Ethnic differences mean you'd expect higher vaccine uptake in Scotland",
subtitle="Expected 1st dose vaccine uptake by age based on ethnic composition of each age group by country from the 2011 census and vaccine uptake rates from UKHSA",
caption="Data from UKHSA, ONS and NRS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/COVIDWaveComparisons.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(lubridate)
library(paletteer)
library(ggrepel)
library(extrafont)
library(ragg)
library(ggtext)
library(patchwork)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.5), hjust=0,
margin=margin(0,0,5.5,0)),
text=element_text(family="Lato"))
}
source <- "https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newAdmissionsRollingRate&metric=newCasesBySpecimenDateRollingRate&metric=newDeaths28DaysByDeathDateRollingRate&format=csv"
threshold <- 100
temp <- tempfile()
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- read.csv(temp) %>%
mutate(date=as.Date(date)) %>%
set_names(c("code", "name", "type", "date", "admissions", "cases", "deaths"))
ggplot(rawdata, aes(x=date, y=cases, group=name))+
geom_line()+
geom_hline(yintercept=threshold)
#Pick out date cases first exceeded 100/100,000 in 7-day period since 1st May
data <- rawdata %>%
merge(rawdata %>%
group_by(name, code) %>%
filter(date>as.Date("2021-05-01") & cases>threshold) %>%
summarise(startdatew4=min(date)) %>%
ungroup() %>%
select(code, startdatew4), by="code", all.x=TRUE) %>%
merge(rawdata %>%
group_by(name, code) %>%
filter(date>as.Date("2020-09-01") & cases>threshold) %>%
summarise(startdatew2=min(date)) %>%
ungroup() %>%
select(code, startdatew2), by="code", all.x=TRUE) %>%
mutate(dayssincew2=as.integer(if_else(date-startdatew2>=0, date-startdatew2, NA_real_)),
dayssincew4=as.integer(if_else(date-startdatew4>=0, date-startdatew4, NA_real_))) %>%
arrange(date)
cases <- ggplot()+
geom_line(data=data %>% filter(dayssincew2% filter(!is.na(dayssincew4)),
aes(x=dayssincew4, y=cases), colour="#FF4E86")+
scale_x_continuous(name="", limits=c(0,50))+
scale_y_continuous(name="Weekly cases per 100,000", limits=c(0,NA))+
facet_wrap(~name, ncol=1)+
theme_custom()+
theme(plot.title=element_text(face="plain"))+
labs(title="Cases")
admissions <- ggplot()+
geom_line(data=data %>% filter(dayssincew2% filter(!is.na(dayssincew4)),
aes(x=dayssincew4, y=admissions), colour="#FF4E86")+
scale_x_continuous(name="Days since start of wave",
limits=c(0,50))+
scale_y_continuous(name="Weekly admissions per 100,000", limits=c(0,NA))+
facet_wrap(~name, ncol=1)+
theme_custom()+
theme(plot.title=element_text(face="plain"))+
labs(title="Admissions")
deaths <- ggplot()+
geom_line(data=data %>% filter(dayssincew2% filter(!is.na(dayssincew4)),
aes(x=dayssincew4, y=deaths), colour="#FF4E86")+
scale_x_continuous(name="", limits=c(0,50))+
scale_y_continuous(name="Weekly deaths per 100,000", limits=c(0,NA))+
facet_wrap(~name, ncol=1)+
theme_custom()+
theme(plot.title=element_text(face="plain"))+
labs(title="Deaths")
plot <- cases+admissions+deaths+
plot_annotation(
title="COVID admissions and deaths are lower in this wave than in the Autumn",
subtitle=paste0("Trajectories of cases, admissions and deaths in the current wave compared to the second, autumn wave.
The start of each wave in each country is defined as the point at which cases first exceeded ",
threshold, " per 100,000 people per week."),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths",
theme=theme(plot.title=element_text(face="bold", size=rel(1.8)),
plot.subtitle=element_markdown(),
text=element_text(family="Lato")))
agg_tiff("Outputs/COVIDWaveComparisons.tiff", units="in", width=10, height=7, res=800)
plot
dev.off()
agg_tiff("Outputs/COVIDWaveComparisonsPathScotland.tiff", units="in", width=10, height=7, res=800)
ggplot()+
geom_path(data=data %>% filter(dayssincew2% filter(!is.na(dayssincew4) & name=="Scotland"),
aes(x=cases, y=admissions), colour="#FF4E86", show.legend=FALSE,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
scale_x_continuous(name="Cases per 100,000 people per week", limits=c(0,NA))+
scale_y_continuous(name="Admissions per 100,000 people per week", limits=c(0,NA))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The relationship between COVID cases and admissions in Scotland has changed significantly",
subtitle=paste0("Trajectories of cases, admissions and deaths in the current wave compared to the first 100 days of the second, autumn wave.
The start of each wave is defined as the point at which cases first exceeded ",
threshold, " per 100,000 people per week."),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDWaveComparisonsPathEngland.tiff", units="in", width=10, height=7, res=800)
ggplot()+
geom_path(data=data %>% filter(dayssincew2% filter(!is.na(dayssincew4) & name=="England"),
aes(x=cases, y=admissions), colour="#FF4E86", show.legend=FALSE,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
scale_x_continuous(name="Cases per 100,000 people per week", limits=c(0,NA))+
scale_y_continuous(name="Admissions per 100,000 people per week", limits=c(0,NA))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The relationship between COVID cases and admissions in England has changed significantly",
subtitle=paste0("Trajectories of cases, admissions and deaths in the current wave compared to the first 100 days of the second, autumn wave.
The start of each wave is defined as the point at which cases first exceeded ",
threshold, " per 100,000 people per week."),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDWaveComparisonsPathNI.tiff", units="in", width=10, height=7, res=800)
ggplot()+
geom_path(data=data %>% filter(dayssincew2% filter(!is.na(dayssincew4) & name=="Northern Ireland"),
aes(x=cases, y=admissions), colour="#FF4E86", show.legend=FALSE,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
scale_x_continuous(name="Cases per 100,000 people per week", limits=c(0,NA))+
scale_y_continuous(name="Admissions per 100,000 people per week", limits=c(0,NA))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The relationship between COVID cases and admissions in Northern Ireland has changed",
subtitle=paste0("Trajectories of cases, admissions and deaths in the current wave compared to the first 100 days of the second, autumn wave.
The start of each wave is defined as the point at which cases first exceeded ",
threshold, " per 100,000 people per week."),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDWaveComparisonsPathWales.tiff", units="in", width=10, height=7, res=800)
ggplot()+
geom_path(data=data %>% filter(dayssincew2% filter(!is.na(dayssincew4) & name=="Wales"),
aes(x=cases, y=admissions), colour="#FF4E86", show.legend=FALSE,
arrow = arrow(type = "closed", angle = 30, length = unit(0.05, "inches")))+
scale_x_continuous(name="Cases per 100,000 people per week", limits=c(0,NA))+
scale_y_continuous(name="Admissions per 100,000 people per week", limits=c(0,NA))+
theme_custom()+
theme(plot.subtitle=element_markdown())+
labs(title="The relationship between COVID cases and admissions in Wales has changed substantially",
subtitle=paste0("Trajectories of cases, admissions and deaths in the current wave compared to the first 100 days of the second, autumn wave.
The start of each wave is defined as the point at which cases first exceeded ",
threshold, " per 100,000 people per week."),
caption="Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/English LA Heatmaps.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(forcats)
library(RcppRoll)
library(data.table)
library(readxl)
library(cowplot)
library(sf)
library(rmapshaper)
library(gganimate)
library(paletteer)
library(ggtext)
options(scipen = 999)
#Read in COVID case data
temp <- tempfile()
source <- "https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- fread(temp)[,c(1:6)]
colnames(data) <- c("name", "code", "type", "date", "cases", "cumul_cases")
data$date <- as.Date(data$date)
data <- subset(data, type=="utla")
#Set up skeleton dataframe with dates
LAcodes <- unique(data$code)
min <- min(data$date)
max <- max(data$date)
skeleton <- data.frame(code=rep(LAcodes, each=(max-min+1), times=1), date=rep(seq.Date(from=min, to=max, by="day"), each=1, times=length(LAcodes)))
#Map data onto skeleton
fulldata <- merge(skeleton, data[,-c(1,3)], by=c("code", "date"), all.x=TRUE, all.y=TRUE)
#Bring in LA names
temp <- data %>%
group_by(code) %>%
slice(1L)
fulldata <- merge(fulldata, temp[,c(1,2)], by="code")
#Fill in blank days
fulldata$cases <- ifelse(is.na(fulldata$cases), 0, fulldata$cases)
#Calculate cumulative sums so far
fulldata <- fulldata %>%
group_by(code) %>%
mutate(cumul_cases=cumsum(cases))
#this is the deaths for each NHS trust (only deaths in hospital) - we dont have daily deaths by LA yet
#so need to map this to LA. Approach to do this developed by and code adapted from @Benj_barr.
#Need to manually update the link to the latest total announced deaths file here:
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-daily-deaths/
#and extend the final number value in rows 78 & 80 by 1 to capture additional days (67=1st May announcement date)
temp <- tempfile()
source <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/01/COVID-19-total-announced-deaths-8-January-2021-1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
deaths<-as.data.table(read_excel(temp, sheet=9, col_names = F))
deaths<-deaths[18:.N, c(1:318)]
deaths<- melt.data.table(deaths, id=1:4, measure.vars = 5:318)
deaths[, 2:=NULL]
names(deaths)<-c("region", "procode3","trust","variable","deaths")
deaths$procode3 <- substr(deaths$procode3, 1, 3)
deaths[order(variable), date:=1:.N, by=.(procode3)]
deaths[, date:=as.Date("2020-02-29")+as.numeric(substr(variable, 4, 6))-5]
deaths[, variable:=NULL]
deaths$deaths <- as.numeric(deaths$deaths)
#deaths<-deaths[, list(deaths=sum(as.numeric(deaths),na.rm = T)), by=.(procode3,trust)]
sum(deaths$deaths)
# this is the number of all emergency admissions in 2018-2019 for each trust split by LA
dt1<-fread("Data/la_trust_lk.csv")
dt1<-dt1[is.na(areacode)==F]
length(unique(dt1$areacode)) #150
sum(deaths$deaths)
deaths<-merge(deaths, dt1, by="procode3", all.x = T, allow.cartesian = TRUE)
deaths[, fraction:=CountAdm/sum(CountAdm,na.rm = T),by=.(procode3, date)]
# 66 deaths not allocated to LA, trust is not in look up
sum(deaths[is.na(fraction)==T]$deaths)
deaths<-deaths[is.na(fraction)==F]
#we then assume that deaths from each Trust were distributed between LAs based on the historical share of admissions from that LA
deaths[, deaths:=deaths*fraction]
# 2019 LA boundary changes
#deaths[areaname=="Bournemouth"|areaname=="Poole",`:=` (areacode="E10000009",areaname="Dorset CC")]
deaths[areaname=="Isles of Scilly",`:=` (areacode="E06000052",areaname="Cornwall")]
deaths[areacode=="E10000009",`:=` (areacode="E06000059")]
deaths[areacode=="E06000029",`:=` (areacode="E06000058")]
deaths <- deaths %>%
group_by(areacode, date) %>%
summarise(deaths=sum(deaths, na.rm=TRUE))
length(unique(deaths$areacode)) #147
sum(deaths$deaths)
colnames(deaths) <- c("code", "date", "deaths")
fulldata <- merge(fulldata, deaths, by=c("code", "date"), all.x=TRUE)
heatmap <- fulldata %>%
group_by(code) %>%
mutate(casesroll_avg=roll_mean(cases, 7, align="right", fill=0), deathsroll_avg=roll_mean(deaths, 7, align="right", fill=0)) %>%
mutate(totalcases=max(cumul_cases), maxcaserate=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcaserate)][1],
cumul_deaths=sum(deaths, na.rm=TRUE), totaldeaths=max(cumul_deaths, na.rm=TRUE), maxdeathrate=max(deathsroll_avg, na.rm=TRUE),
maxdeathsday=date[which(deathsroll_avg==maxdeathrate)][1])
heatmap$maxcaseprop <- heatmap$casesroll_avg/heatmap$maxcaserate
heatmap$maxdeathprop <- heatmap$deathsroll_avg/heatmap$maxdeathrate
#Enter dates to plot from and to
plotfrom <- "2020-03-03"
plotto <- max(heatmap$date)
#Plot case trajectories
casetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
#scale_fill_viridis_c()+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(size=rel(2.3)))
casebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
#scale_fill_viridis_c()+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDLACasesHeatmap.tiff", units="in", width=16, height=16, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
png("Outputs/COVIDLACasesHeatmap.png", units="in", width=16, height=16, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot death trajectories
deathtiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxdeathsday), fill=maxdeathprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="")+
scale_x_date(name="Date", limits=as.Date(c("2020-03-06", plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 deaths in hospital in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of estimated deaths, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of deaths. Bars on the right represent the absolute number of deaths estimated\nin each LA. Deaths are estimated as COVID-19 mortality data is only available from NHS England at hospital level. LA-level deaths are modelled using\n@Benj_Barr's approach, using the proportion of HES emergency admissions to each hospital in 2018-19 originating from each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from NHS England & Ben Barr | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text=element_text(colour="Black"), plot.title=element_text(size=rel(2.3)))
deathbars <- ggplot(subset(heatmap, date==maxdeathsday), aes(x=totaldeaths, y=fct_reorder(name, maxdeathsday), fill=totaldeaths))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed deaths")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDLADeathHeatmap.tiff", units="in", width=16, height=16, res=500)
plot_grid(deathtiles, deathbars, align="h", rel_widths=c(1,0.2))
dev.off()
png("Outputs/COVIDLADeathHeatmap.png", units="in", width=16, height=16, res=500)
plot_grid(deathtiles, deathbars, align="h", rel_widths=c(1,0.2))
dev.off()
##################################
#Absolute version of the heatmaps#
##################################
#Bring in population data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D367", col_names=TRUE)
colnames(LApop) <- c("code", "name", "geography", "pop")
heatmap <- merge(heatmap, LApop[,c(1,4)], by="code")
heatmap$cumul_caserate <- heatmap$totalcases*100000/heatmap$pop
heatmap$cumul_deathrate <- heatmap$totaldeaths*100000/heatmap$pop
heatmap$avgcaserates <- heatmap$casesroll_avg*100000/heatmap$pop
#Plot absolute case trajectories
abscasetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxcaseday), fill=casesroll_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases within each Local Authority.\nLAs are ordered by the date at which they reached their peak number of cases. Bars on the right represent the cumulative number of cases per 100,000 population in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text=element_text(colour="Black"))
abscasebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=cumul_caserate, y=fct_reorder(name, maxcaseday), fill=cumul_caserate))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases\nper 100,000 population", breaks=c(0,500,1000,1500))+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDLACasesHeatmapAbs.tiff", units="in", width=16, height=16, res=500)
plot_grid(abscasetiles, abscasebars, align="h", rel_widths=c(1,0.2))
dev.off()
png("Outputs/COVIDLACasesHeatmapAbs.png", units="in", width=16, height=16, res=500)
plot_grid(abscasetiles, abscasebars, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot absolute case rate trajectories
ratetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxcaseday), fill=avgcaserates))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 case rates in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases per 100,000 population within each Local Authority.\nLAs are ordered by the date at which they reached their peak number of cases. Bars on the right represent the total population of each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(1.2)), plot.title.position="plot",
axis.text=element_text(colour="Black"), plot.title=element_text(size=rel(2.3)))
ratebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDLARateHeatmap.tiff", units="in", width=16, height=16, res=500)
plot_grid(ratetiles, ratebars, align="h", rel_widths=c(1,0.2))
dev.off()
png("Outputs/COVIDLARateHeatmap.png", units="in", width=16, height=16, res=500)
plot_grid(ratetiles, ratebars, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot absolute death trajectories
death <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxdeathsday), fill=deathsroll_avg))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c("2020-03-06", plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 deaths in hospital in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of daily confirmed deaths within each Local Authority.\nLAs are ordered by the date at which they reached their peak number of deaths Bars on the right represent the cumulative number of cases per 100,000 population in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text=element_text(colour="Black"), plot.title=element_text(size=rel(2.3)))
deathbars <- ggplot(subset(heatmap, date==maxdeathsday), aes(x=cumul_deathrate, y=fct_reorder(name, maxdeathsday), fill=cumul_deathrate))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed deaths\nper 100,000 population", breaks=c(0,50,100))+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDLADeathsHeatmapAbs.tiff", units="in", width=16, height=16, res=500)
plot_grid(death, deathbars, align="h", rel_widths=c(1,0.2))
dev.off()
png("Outputs/COVIDLADeathsHeatmapAbs.png", units="in", width=16, height=16, res=500)
plot_grid(death, deathbars, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot death rate trajectories
deathrate <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxdeathsday), fill=deathsroll_avg*100000/pop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c("2020-03-06", plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 death rates in hospitals in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of daily confirmed deaths per 100,000 within each Local Authority.\nLAs are ordered by the date at which they reached their peak number of deaths Bars on the right represent the cumulative number of cases per 100,000 population in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from NHS England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text=element_text(colour="Black"), plot.title=element_text(size=rel(2.3)))
deathratebars <- ggplot(subset(heatmap, date==maxdeathsday), aes(x=pop, y=fct_reorder(name, maxdeathsday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDLADeathsRateHeatmap.tiff", units="in", width=16, height=16, res=500)
plot_grid(deathrate, deathratebars, align="h", rel_widths=c(1,0.2))
dev.off()
png("Outputs/COVIDLADeathsRateHeatmap.png", units="in", width=16, height=16, res=500)
plot_grid(deathrate, deathratebars, align="h", rel_widths=c(1,0.2))
dev.off()
##########################
#Map of case trajectories#
##########################
#Download shapefile of LA boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/6638c31a8e9842f98a037748f72258ed_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "ctyua17cd"] <- "code"
simplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)
#Duplicate data to account for shapefile using pre-2019 codes
int1 <- filter(heatmap, name=="Bournemouth, Christchurch and Poole")
int1$code <- "E06000028"
int2 <- filter(heatmap, name=="Bournemouth, Christchurch and Poole")
int2$code <- "E06000029"
int3 <- filter(heatmap, name=="Bournemouth, Christchurch and Poole")
int3$code <- "E10000009"
temp <- rbind(heatmap, int1, int2, int3)
#Calculate change in cases in the past week
change <- temp %>%
mutate(change=casesroll_avg-lag(casesroll_avg,7))
#Exclude most recent day as reporting is usually very incomplete
change <- subset(change, date==max-3)
map.change <- full_join(simplemap, change, by="code", all.y=TRUE)
map.change <- map.change %>% drop_na("maxcaseprop")
#Map of past week changes
changemap <- ggplot()+
geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA)+
geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill="#41ab5d", colour=NA)+
xlim(10000,655644)+
ylim(5337,700000)+
theme_classic()+
scale_fill_paletteer_c("scico::roma", limit=c(-1,1)*max(abs(map.change$change)),
name="Change in case numbers\nin the past week", breaks=c(-60,-30, 0,30,60),
labels=c("-60", "-30", "0", "+30", "+60"),direction=-1)+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.subtitle=element_markdown())+
labs(title="Recent changes in COVID-19 case numbers across England",
subtitle="Has the 7-day rolling average of case numbers risen or fallen in the past week?
Areas with 0 cases shown in green",
caption="Data from Public Health England | Plot by @VictimOfMaths")+
geom_rect(aes(xmin=500000, xmax=560000, ymin=156000, ymax=200000), fill="transparent",
colour="gray50")+
geom_rect(aes(xmin=310000, xmax=405000, ymin=370000, ymax=430000), fill="transparent",
colour="gray50")+
geom_rect(aes(xmin=405000, xmax=490000, ymin=505000, ymax=580000), fill="transparent",
colour="gray50")
#Add zoomed in areas
#London
London <- ggplot()+
geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA, show.legend=FALSE)+
geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill="#41ab5d", colour=NA)+
scale_x_continuous(limits=c(500000,560000), expand=c(0,0))+
scale_y_continuous(limits=c(156000,200000), expand=c(0,0))+
theme_classic()+
scale_fill_paletteer_c("scico::roma", limit=c(-1,1)*max(abs(map.change$change)), direction=-1)+
labs(title="Greater London")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(size=rel(0.9)))
#North-West England
NWEng <-ggplot()+
geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA, show.legend=FALSE)+
geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill="#41ab5d", colour=NA)+
scale_x_continuous(limits=c(310000,405000), expand=c(0,0))+
scale_y_continuous(limits=c(370000,430000), expand=c(0,0))+
theme_classic()+
scale_fill_paletteer_c("scico::roma", limit=c(-1,1)*max(abs(map.change$change)), direction=-1)+
labs(title="The North West")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(size=rel(0.9)))
#Tyne/Tees
NEEng <- ggplot()+
geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA, show.legend=FALSE)+
geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill="#41ab5d", colour=NA)+
scale_x_continuous(limits=c(405000,490000), expand=c(0,0))+
scale_y_continuous(limits=c(505000,580000), expand=c(0,0))+
theme_classic()+
scale_fill_paletteer_c("scico::roma", limit=c(-1,1)*max(abs(map.change$change)), direction=-1)+
labs(title="The North East")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(size=rel(0.9)))
tiff("Outputs/COVIDChangesmapEng.tiff", units="in", width=9, height=11, res=500)
ggdraw()+
draw_plot(changemap)+
draw_plot(London, 0.01,0.34,0.32,0.21)+
draw_plot(NWEng, 0.01,0.57, 0.32, 0.24)+
draw_plot(NEEng, 0.57, 0.62, 0.22, 0.22)
dev.off()
#For animation
map.data <- full_join(simplemap, temp, by="code", all.y=TRUE)
#remove areas with no HLE data (i.e. Scotland, Wales & NI)
map.data <- map.data %>% drop_na("maxcaseprop")
#Animation of case trajectories
CaseAnim <- ggplot(subset(map.data, date>as.Date("2020-02-25")), aes(geometry=geometry, fill=maxcaseprop))+
geom_sf(colour=NA)+
xlim(10000,655644)+
ylim(5337,700000)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily cases as a %\nof peak cases", breaks=c(0,0.25,0.5,0.75,1),
labels=c("0%", "25%", "50%", "75%", "100%"))+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average number of new confirmed cases coloured relative to the\npeak in each Local Authority (i.e. dark red represents the peak of new cases).\nDate: {frame_time}",
caption="Data from Public Health England | Visualisation by @VictimOfMaths")
animate(CaseAnim, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/CaseAnim.gif"), end_pause=60)
#Animation of death trajectories
DeathAnim <- ggplot(subset(map.data, date>as.Date("2020-03-03")), aes(geometry=geometry, fill=maxdeathprop))+
geom_sf(colour=NA)+
xlim(10000,655644)+
ylim(5337,700000)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily deaths as a %\nof peak deaths", breaks=c(0,0.25,0.5,0.75,1),
labels=c("0%", "25%", "50%", "75%", "100%"))+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average number of new confirmed deaths coloured relative to the\npeak in each Local Authority (i.e. dark red represents the peak in deaths).\nDate: {frame_time}",
caption="Data from NHS England | Visualisation by @VictimOfMaths")
animate(DeathAnim, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/DeathAnim.gif"), end_pause=60)
#Animation of absolute case numbers
CaseAnimAbs <- ggplot(subset(map.data, date>as.Date("2020-02-25")), aes(geometry=geometry, fill=casesroll_avg))+
geom_sf(colour=NA)+
xlim(10000,655644)+
ylim(5337,700000)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily confirmed cases", na.value="white")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average number of new confirmed cases.\nDate: {frame_time}",
caption="Data from Public Health England | Visualisation by @VictimOfMaths")
animate(CaseAnimAbs, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/CaseAnimAbs.gif"), end_pause=60)
#Animation of death rates
DeathRateAnim <- ggplot(subset(map.data, date>as.Date("2020-03-03")), aes(geometry=geometry, fill=deathsroll_avg*100000/pop))+
geom_sf(colour=NA)+
xlim(10000,655644)+
ylim(5337,700000)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily deaths\nper 100,000")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average number of new confirmed COVID-19 deaths in hospitals per 100,000\nDate: {frame_time}",
caption="Data from NHS England | Visualisation by @VictimOfMaths")
animate(DeathRateAnim, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/DeathRateAnim.gif"), end_pause=60)
#Quick analysis of potential COVID 'bumps'
temp1 <- subset(heatmap, name %in% c("Dorset", "Cornwall and Isles of Scilly", "Devon", "Bournemouth, Christchurch and Poole",
"West Sussex", "East Sussex", "Brighton and Hove"))
tiff("Outputs/COVIDSouthCoast.tiff", units="in", width=8, height=4, res=500)
ggplot(subset(temp1, date>"2020-05-01"), aes(x=date, y=name, fill=avgcaserates))+
geom_tile(colour="white")+
scale_fill_distiller(palette="Spectral", name="New cases\nper 100,000")+
scale_x_date(name="Date")+
scale_y_discrete(name="")+
theme_classic()+
labs(title="No clear signs of a rise in cases after the sunny May weather",
subtitle="7-day rolling average of new confirmed COVID-19 cases",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
temp2 <- subset(heatmap, name %in% c("Islington", "Camden", "Hackney", "Southwark", "Tower Hamlets",
"Lambeth", "Lewisham", "Haringey", "Westminster", "Kensington and Chelsea",
"Hammersmith and Fulham", "Wandsworth", "Lewisham", "Newham"))
tiff("Outputs/COVIDLondon.tiff", units="in", width=8, height=5, res=500)
ggplot(subset(temp2, date>"2020-05-01"), aes(x=date, y=name, fill=avgcaserates))+
geom_tile(colour="white")+
scale_fill_distiller(palette="Spectral", name="New cases\nper 100,000")+
scale_x_date(name="Date")+
scale_y_discrete(name="")+
theme_classic()+
labs(title="No clear evidence of a rise in cases after the protests in Central London",
subtitle="7-day rolling average of new confirmed COVID-19 cases",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
temp3 <- subset(heatmap, name %in% c("Leicester", "Bedford", "Barnsley", "Rotherham",
"Kirklees", "Bradford", "Rochdale", "Oldham",
"Tameside", "Blackburn with Darwen"))
tiff("Outputs/COVIDPillarsHeatmap.tiff", units="in", width=10, height=5, res=500)
ggplot(subset(temp3, date>"2020-05-01"), aes(x=date, y=name, fill=avgcaserates))+
geom_tile(colour="white")+
scale_fill_distiller(palette="Spectral", name="New cases\nper 100,000")+
scale_x_date(name="Date")+
scale_y_discrete(name="")+
theme_classic()+
labs(title="Mixed Pillar 1 trajectories in areas with high combined Pillar 1 and 2 tests in week 25",
subtitle="7-day rolling average of new confirmed COVID-19 cases",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
#Graph of pillar 1 tests in any LA you like
LA <- "Bradford"
tiff(paste0("Outputs/COVIDNewCases", LA, ".tiff"), units="in", width=8, height=6, res=500)
ggplot()+
geom_col(data=subset(heatmap, name==LA), aes(x=date, y=cases), fill="skyblue2")+
geom_line(data=subset(heatmap, name==LA & date%
filter(!(date==as.Date("2020-09-01") & State=="Bayern" & measure=="cases")) %>%
filter(!(date==as.Date("2020-09-01") & State=="Hamburg"))
#Some dates are missing, so set up skeleton dataset with all dates
#Set up skeleton dataframe with dates
States <- unique(data_long$State)
min <- min(data_long$date)
max <- max(data_long$date)
skeleton <- data.frame(State=rep(States, each=(max-min+1), times=2),
date=rep(seq.Date(from=min, to=max, by="day"), each=1, times=length(States)*2),
measure=rep(c("cases", "deaths"), each=length(States)*(max-min+1)))
#Map data onto skeleton
fulldata <- merge(skeleton, data_long[,-c(1)], by=c("State", "date", "measure"), all.x=TRUE, all.y=TRUE)
#Interpolate missing dates
fulldata <- fulldata %>%
group_by(State, measure) %>%
mutate(count=na.spline(count))
#Add in populations
fulldata <- fulldata %>%
mutate(pop=case_when(
State=="Baden-Württemberg" ~ 11069533,
State=="Bayern" ~ 13076721,
State=="Brandenburg" ~ 2511917,
State=="Berlin" ~ 2644826,
State=="Bremen" ~ 682986,
State=="Hamburg" ~ 1841179,
State=="Hessen" ~ 6265809,
State=="Mecklenburg-Vorpommern" ~ 1609675,
State=="Niedersachsen" ~ 7982448,
State=="Nordrhein-Westfalen" ~ 17932651,
State=="Rheinland-Pfalz" ~ 4084844,
State=="Saarland" ~ 990509,
State=="Sachsen-Anhalt" ~ 2208321,
State=="Sachsen" ~ 4077937,
State=="Schleswig-Holstein" ~ 2896712,
State=="Thüringen" ~ 2143145))
#Calculate daily figures
fulldata <- fulldata %>%
arrange(measure, State, date) %>%
group_by(State, measure) %>%
mutate(daycount=count-lag(count,1))
#Ignore days when cases go *down*, probably due to reallocation
fulldata$daycount <- ifelse(is.na(fulldata$daycount), 0, fulldata$daycount)
fulldata$daycount <- ifelse(fulldata$daycount<0, 0, fulldata$daycount)
heatmap <- fulldata %>%
group_by(State, measure) %>%
mutate(casesroll_avg=roll_mean(daycount, 7, align="right", fill=0)) %>%
mutate(maxcases=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcases)][1],
totalcases=max(count), maxcaseprop=casesroll_avg/maxcases,
caserate=daycount*100000/pop, caserate_avg=casesroll_avg*100000/pop)
#Enter dates to plot from and to
plotfrom <- "2020-03-21"
plotto <- max
#Plot case trajectories
casetiles <- ggplot(subset(heatmap, measure=="cases"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in German Bundesländer",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the State.\nStates are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each State.\nData updated to ", plotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)),
plot.title.position="plot",
axis.text.y=element_text(colour="Black"), plot.title=element_text(face="bold", size=rel(1.5)),
text=element_text(family="Lato"))
casebars <- ggplot(subset(heatmap, date==maxcaseday & measure=="cases"),
aes(x=totalcases/1000, y=fct_reorder(State, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases\n(1000s)")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"),
text=element_text(family="Lato"))
tiff("Outputs/COVIDGermanStateCasesHeatmap.tiff", units="in", width=11, height=6, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
#Plot case rate version
caseratetiles <- ggplot(subset(heatmap, measure=="cases"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White")+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily Cases\nper 100,000")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 case rates in German Bundesländer",
subtitle=paste0("The heatmap represents the 7-day rolling average of the rate of new confirmed cases per 100,000 population.\nStates are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the population of each State.\nData updated to ", plotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.5)))
caselegend <- get_legend(
caseratetiles + theme(legend.box.margin = margin(0, 0, 0, 12))
)
caseratebars <- ggplot(subset(heatmap, date==maxcaseday & measure=="cases"),
aes(x=pop/1000000, y=fct_reorder(State, maxcaseday), fill=pop))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Population\n(millions)")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"),
text=element_text(family="Lato"))
tiff("Outputs/COVIDGermanStateCaseRateHeatmap.tiff", units="in", width=13, height=6, res=500)
plot <- plot_grid(caseratetiles+theme(legend.position="none"), caseratebars, align="h", rel_widths=c(1,0.2))
plot_grid(plot, caselegend, rel_widths=c(1,0.1))
dev.off()
#Plot death trajectories
deathtiles <- ggplot(subset(heatmap, measure=="deaths"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 deaths in German Bundesländer",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of confirmed deaths, normalised to the maximum value within the State.\nStates are ordered by the date at which they reached their peak number of deaths. Bars on the right represent the absolute number of deaths in each State.\nData updated to ", plotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.5)))
deathbars <- ggplot(subset(heatmap, date==maxcaseday & measure=="deaths"),
aes(x=totalcases, y=fct_reorder(State, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed deaths")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"),
text=element_text(family="Lato"))
tiff("Outputs/COVIDGermanStateDeathsHeatmap.tiff", units="in", width=11, height=6, res=500)
plot_grid(deathtiles, deathbars, align="h", rel_widths=c(1,0.2))
dev.off()
#Death rates
deatratetiles <- ggplot(subset(heatmap, measure=="deaths"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=caserate_avg))+
geom_tile(colour="White")+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily deaths\nper 100,000")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 death rates in German Bundesländer",
subtitle=paste0("The heatmap represents the 7-day rolling average of the rate of new confirmed deaths per 100,000 population.\nStates are ordered by the date at which they reached their peak number of deaths. Bars on the right represent the population of each State.\nData updated to ", plotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.5)))
deathlegend <- get_legend(
deatratetiles + theme(legend.box.margin = margin(0, 0, 0, 12))
)
tiff("Outputs/COVIDGermanStateDeathRateHeatmap.tiff", units="in", width=11, height=6, res=500)
plot <- plot_grid(deatratetiles+theme(legend.position="none"), caseratebars, align="h", rel_widths=c(1,0.2))
plot_grid(plot, deathlegend, rel_widths=c(1,0.1))
dev.off()
#Try them as ridgeplots
library(ggridges)
tiff("Outputs/COVIDGermanStateCaseRidges.tiff", units="in", width=11, height=6, res=500)
ggplot(subset(heatmap, measure=="cases"), aes(x=date, y=fct_reorder(State, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity", rel_min_height=0.01)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in German Bundesländer",
caption="Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDGermanStateDeathsRidges.tiff", units="in", width=11, height=6, res=500)
ggplot(subset(heatmap, measure=="deaths"), aes(x=date, y=fct_reorder(State, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity", rel_min_height=0.01)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Deaths per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 deaths in German Bundesländer",
caption="Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/Irish County Heatmaps.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(forcats)
library(readxl)
library(RcppRoll)
library(cowplot)
library(sf)
library(paletteer)
#Read in data
temp <- tempfile()
#source <- "https://opendata.arcgis.com/datasets/d9be85b30d7748b5b7c09450b8aede63_0.csv?geometry=%7B%22xmin%22%3A-23.251%2C%22ymin%22%3A51.133%2C%22xmax%22%3A6.632%2C%22ymax%22%3A55.71%2C%22type%22%3A%22extent%22%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D"
source <- "https://opendata.arcgis.com/datasets/d9be85b30d7748b5b7c09450b8aede63_0.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read_csv(temp)
#Strip out geographical information
data <- data[,c(5,3,4,11,12)]
colnames(data) <- c("TimeStamp", "county", "pop", "cumul_cases", "caseprop")
#Convert timestamp to date
data$date <- as.Date(substr(data$TimeStamp, 1, 10))
#Calculate daily cases
data <- data %>%
arrange(county, date) %>%
group_by(county) %>%
mutate(cases=cumul_cases-lag(cumul_cases,1))
#Add in missing data for 30th June - assume no new cases
temp <- data.frame(date=as.Date("2020-06-30"),
county=unique(data$county),
cases=0)
data <- bind_rows(data, temp)
#For 3 counties (Leitrim, Limerick and Sligo) the case count goes *down* in early May. Ignore these for now
data$cases <- ifelse(is.na(data$cases), 0, data$cases)
data$cases <- ifelse(data$cases<0, 0, data$cases)
data$cumul_cases <- ifelse(is.na(data$cumul_cases), 0, data$cumul_cases)
heatmap <- data %>%
group_by(county) %>%
arrange(date) %>%
mutate(casesroll_avg=roll_mean(cases, 7, align="right", fill=0)) %>%
mutate(maxcaserate=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcaserate)][1],
totalcases=max(cumul_cases))
heatmap$maxcaseprop <- heatmap$casesroll_avg/heatmap$maxcaserate
#Enter dates to plot from and to
plotfrom <- "2020-03-21"
plotto <- max(heatmap$date)
#Plot case trajectories
casetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(county, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in Irish Counties",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the county.\nCounties are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each county.\nData updated to ", plotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from data.gov.ie | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
casebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=totalcases, y=fct_reorder(county, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDIrishLACasesHeatmap.tiff", units="in", width=11, height=6, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
library(ggridges)
tiff("Outputs/COVIDIrishCountyCaseRidges.tiff", units="in", width=11, height=6, res=500)
ggplot(heatmap, aes(x=date, y=fct_reorder(county, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity", rel_min_height=0.007)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Irish counties",
caption="Data from data.gov.ie | Plot by @VictimOfMaths")
dev.off()
#Download shapefile
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/0d5984f732c54246bd087768223c92eb_0.zip?outSR=%7B%22latestWkid%22%3A2157%2C%22wkid%22%3A2157%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
#Tidy up country names
shapefile$county <- paste0(substr(shapefile$COUNTY,1,1), tolower(substr(shapefile$COUNTY,2,99)))
mapdata <- heatmap %>%
filter(date==as.Date(plotto)) %>%
full_join(shapefile, by="county")
#Bring in NI data
NIdata <- read.csv("COVID_LA_Plots/LACases.csv")[,c(2,3,4,5,16)] %>%
filter(country=="Northern Ireland" & name!="Northern Ireland") %>%
mutate(date=as.Date(date))
#Align end dates
plotto <- min(plotto, max(NIdata$date[!is.na(NIdata$caserate_avg)]))
NIdata <- subset(NIdata, date==as.Date(plotto))
#NI shapefile
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile.NI <- st_read(file.path(temp2, name))
names(shapefile.NI)[names(shapefile.NI) == "lad19cd"] <- "code"
mapdata.NI <- full_join(shapefile.NI, NIdata, by="code")
mapdata.NI <- subset(mapdata.NI, !is.na(country))
#Transform to common projection (Irish Transverse Mercator)
mapdata.NI <- st_transform(mapdata.NI, 2157)
outline <- mapdata.NI %>%
summarise()
tiff("Outputs/COVIDIrelandRatesMap.tiff", units="in", width=8, height=8, res=500)
ggplot()+
geom_sf(data=mapdata, aes(geometry=geometry, fill=casesroll_avg*100000/pop), colour=NA)+
geom_sf(data=mapdata.NI, aes(geometry=geometry, fill=caserate_avg), colour=NA)+
geom_sf(data=outline, aes(geometry=geometry), fill=NA, colour="White")+
scale_fill_paletteer_c("viridis::inferno", name="Daily cases\nper 100,000")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold", size=rel(1.5)))+
labs(title="COVID-19 cases across Ireland",
subtitle=paste("Daily rates of confirmed new COVID-19 cases in the Republic of Ireland and Northern Ireland\nData from",plotto),
caption="Data from data.gov.ie and DoHNI | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/Misc Case Analysis.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(lubridate)
library(gt)
library(sf)
library(rmapshaper)
daydata <- read.csv("COVID_LA_Plots/LACases.csv")[,-c(1)]
daydata$date <- as.Date(daydata$date)
#New tiered system
tiers <- daydata %>% filter(country=="England" & name!="England")
tiers$tier <- case_when(
tiers$name %in% c("Barking and Dagenham", "Barnet", "Bexley", "Brent", "Bromley", "Camden",
"Croydon", "Ealing", "Enfield", "Greenwich", "Hackney and City of London",
"Haringey", "Havering", "Hillingdon", "Hounslow", "Islington",
"Kensington and Chelsea", "Kingston upon Thames", "Lambeth", "Lewisham",
"Merton", "Newham", "Redbridge", "Richmond upon Thames", "Southwark",
"Sutton", "Tower Hamlets", "Waltham Forest", "Wandsworth", "Westminster",
"Barrow-in-Furness", "Chesterfield", "Erewash", "North East Derbyshire",
"Basildon", "Braintree", "Brentwood", "Castle Point", "Chelmsford",
"Colchester", "Epping Forest", "Harlow", "Maldon", "Rochford", "Tendring",
"Uttlesford", "Elmbridge", "York") ~ "New Tier 2",
tiers$name %in% c("Cheshire West and Chester", "Cheshire East", "Warrington", "Manchester",
"Bolton", "Bury", "Stockport", "Tameside", "Trafford", "Wigan", "Salford",
"Rochdale", "Oldham",
"Leeds", "Bradford", "Kirklees", "Calderdale", "Wakefield", "Barnsley",
"Rotherham", "Doncaster", "Sheffield", "County Durham", "Northumberland",
"Newcastle upon Tyne",
"South Tyneside", "North Tyneside", "Gateshead", "Sunderland", "Middlesbrough",
"Redcar and Cleveland", "Stockton-on-Tees", "Darlington", "Hartlepool",
"Birmingham", "Sandwell", "Solihull", "Wolverhampton", "Walsall", "Leicester",
"Oadby and Wigston", "Ashfield", "Bassetlaw", "Broxtowe", "Gedling",
"Mansfield", "Newark and Sherwood", "Nottingham", "Rushcliffe") ~ "Tier 2",
tiers$name=="High Peak" ~ "Partial Tier 2",
tiers$name %in% c("Blackpool", "Blackburn with Darwen", "Burnley", "Chorley", "Fylde", "Hyndburn",
"Lancaster", "Pendle", "Preston", "Ribble Valley", "Rossendale", "South Ribble",
"West Lancashire", "Wyre") ~ "New Tier 3",
tiers$name %in% c("Liverpool", "Knowsley", "Wirral", "St. Helens", "Sefton", "Halton") ~ "Tier 3",
TRUE ~ "Tier 1"
)
ggplot(tiers)+
geom_line(aes(x=date, y=caserate_avg, group=name, colour=tier))+
scale_x_date(name="", limits=c(as.Date("2020-09-01"), as.Date(max(tiers$date)-days(4))))+
theme_classic()
#Sort out Buckinghamshire to match shapefile
temp <- subset(tiers, code=="E06000060")
tiers$code <- if_else(tiers$code=="E06000060", "E07000004", as.character(tiers$code))
tiers$name <- if_else(tiers$name=="Buckinghamshire", "Aylesbury Vale", as.character(tiers$name))
temp1 <- temp
temp1$code <- "E07000005"
temp1$name <- "Chiltern"
temp2 <- temp
temp2$code <- "E07000006"
temp2$name <- "South Bucks"
temp$code <- "E07000007"
temp$name <- "Wycombe"
tiers <- bind_rows(tiers, temp, temp1, temp2)
#Bring in map
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "lad19cd"] <- "code"
simplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)
map.tiers <- full_join(simplemap, tiers, by="code", all.y=TRUE)
map.tiers$date <- as.Date(map.tiers$date)
map.tiers$tier <- factor(map.tiers$tier, levels=c("Tier 1", "Partial Tier 2", "New Tier 2",
"Tier 2", "New Tier 3", "Tier 3"))
#Map of current cases and tiers
tiff("Outputs/COVIDTiersMap.tiff", units="in", width=8, height=9, res=500)
map.tiers %>%
filter(date==as.Date(max(tiers$date)-days(4))) %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=caserate_avg, colour=tier))+
scale_fill_distiller(palette="Spectral", name="Daily cases\nPer 100,000")+
scale_colour_paletteer_d("LaCroixColoR::Apricot", direction=-1, name="Restriction level")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
labs(title="COVID restriction levels and rates of new cases in England",
subtitle="Government COVID alert levels and rolling 7-day average of confirmed new cases in Local Authorities\nData up to 11th October",
caption="Data from DHSC & PHE | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDTiersBars.tiff", units="in", width=8, height=16, res=500)
map.tiers %>%
filter(date==as.Date(max(tiers$date)-days(4))) %>%
ggplot()+
geom_col(aes(x=caserate_avg, y=fct_reorder(name, caserate_avg), fill=tier))+
scale_fill_paletteer_d("LaCroixColoR::Apricot", direction=-1, name="Restriction level")+
scale_x_continuous(name="New COVID-19 cases per day per 100,000")+
scale_y_discrete(name="")+
theme_classic()+
theme(axis.text.y=element_text(size=rel(0.5)))
dev.off()
#Additional analysis of local lockdown restrictions
daydata$flag <- case_when(
daydata$name %in% c("Bolton", "Bury", "Manchester", "Oldham", "Rochdale", "Salford",
"Stockport", "Tameside", "Trafford", "Wigan")~ 1,
TRUE ~ 0)
tiff("Outputs/COVIDManchesterLAs.tiff", units="in", width=8, height=6, res=500)
ggplot()+
#geom_line(data=subset(daydata, date>as.Date("2020-07-01")),
# aes(x=date, y=caserate_avg, group=name), colour="Grey80")+
geom_line(data=subset(daydata, flag==1 & date>as.Date("2020-07-01")),
aes(x=date, y=caserate_avg, colour=name))+
geom_segment(aes(x=as.Date("2020-08-01"), xend=as.Date("2020-08-01"), y=0, yend=20),
colour="Red", linetype=2)+
scale_x_date(name="Date")+
scale_y_continuous(name="New cases per 100,000 population per day")+
scale_colour_paletteer_d("LaCroixColoR::paired", name="")+
theme_classic()+
labs(title="The case for wider relaxation of local restrictions in Manchester looks weak",
subtitle="Rolling 7-day average rates of new confirmed COVID-19 cases",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
up_arrow <- "▲"
down_arrow <- "▼"
daydata %>%
filter(date %in% c(as.Date("2020-08-01"), as.Date("2020-09-01")) & flag==1) %>%
select(name, date, casesroll_avg) %>%
spread(date, casesroll_avg) %>%
mutate(change=`2020-09-01`-`2020-08-01`, changeperc=change*100/`2020-08-01`) %>%
gt() %>%
tab_spanner(label="7-day average new cases",columns=vars(`2020-08-01`, `2020-09-01`)) %>%
tab_spanner(label="Change from start of restrictions", columns=vars(change, changeperc)) %>%
cols_label(name="", `2020-08-01`="1st August", `2020-09-01`="1st September",
change="Absolute", changeperc="Relative") %>%
fmt_number(columns=vars(`2020-08-01`, `2020-09-01`, change), decimals=1) %>%
fmt_number(columns=vars(changeperc), decimals=0) %>%
text_transform(locations=cells_body(columns="change", rows=change<0),
fn = function(x) paste(x, down_arrow)) %>%
text_transform(locations=cells_body(columns="change", rows=change>0),
fn = function(x) paste(x, up_arrow)) %>%
text_transform(locations=cells_body(columns="changeperc"),
fn = function(x) paste0(x, "%"))
daydata$flag2 <- case_when(
daydata$name %in% c("Manchester", "Bury", "Tameside", "Rochdale",
"Salford", "Oldham", "Preston", "Blackburn with Darwen",
"Pendle", "Bradford", "Calderdale", "Kirklees",
"Glasgow City", "West Dunbartonshire",
"East Renfrewshire", "Leicester",
"Bolton", "Trafford") ~ "Restrictions in place",
daydata$name %in% c("Stockport", "Burnley", "Hyndburn", "Wigan",
"Rossendale") ~ "Restrictions relaxed",
TRUE ~ "No Local Restrictions")
tiff("Outputs/COVIDRestrictions.tiff", units="in", width=10, height=10, res=500)
daydata %>%
group_by(name) %>%
mutate(max=max(date)) %>%
filter(date==max & caserate_avg>1.97 & !name %in% c("England", "Scotland",
"Wales", "Northern Ireland")) %>%
ggplot()+
geom_col(aes(x=caserate_avg*7, y=fct_reorder(name, caserate_avg), fill=flag2),
show.legend = FALSE)+
scale_x_continuous(name="New COVID-19 cases per 100,000 in the last 7 days")+
scale_y_discrete(name="")+
scale_fill_manual(values=c("Grey70", "#E41A1C", "#4DAF4A"))+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="Local COVID-related restrictions are being applied inconsistently",
subtitle="Local Authorities with restrictions in place or that have been relaxed in the past week",
caption="Data from ONS, NRS, DoHNI, PHE, PHW & PHS | Plot by @VictimOfMaths")
dev.off()
daydata$restrictions <- case_when(
daydata$name=="Leicester" & daydata$date>=as.Date("2020-06-29") ~ "Leicester",
daydata$name %in% c("Manchester", "Trafford", "Bury", "Tameside", "Rochdale", "Salford", "Bolton",
"Oldham", "Preston", "Blackburn with Darwen", "Pendle", "Bradford",
"Calderdale", "Kirklees") & daydata$date>=as.Date("2020-07-31") ~ "Northern England",
daydata$name %in% c("Wigan", "Rossendale") & daydata$date>=as.Date("2020-07-31") &
daydata$date=as.Date("2020-07-31") &
daydata$date=as.Date("2020-08-05") &
daydata$date=as.Date("2020-09-01") ~ "Glasgow")
daydata$restrictions <- factor(daydata$restrictions, levels=c("Leicester",
"Wigan & Rossendale",
"Stockport, Burnley & Hyndburn",
"Northern England",
"Aberdeen",
"Glasgow"))
temp <- daydata %>%
filter(!is.na(restrictions))
restrictedareas <- unique(temp$name)
tiff("Outputs/COVIDRestrictionsLeeds.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_line(data=daydata,
aes(x=date, y=caserate_avg, group=name), colour="grey75")+
geom_line(data=subset(daydata, !is.na(restrictions)),
aes(x=date, y=caserate_avg, group=name), colour="Tomato")+
geom_line(data=subset(daydata, name=="Leeds"),
aes(x=date, y=caserate_avg), colour="RoyalBlue")+
scale_x_date(limits=c(as.Date("2020-06-20"), as.Date("2020-09-04")), name="")+
scale_y_continuous(name="Daily confirmed new cases per 100,000")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="Leeds is under threat of new lockdown restrictions",
subtitle="Daily rates of new confirmed COVID-19 cases in Leeds compared to areas with local restrictions",
caption="Date from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDRestrictionsLeeds2.tiff", units="in", width=8, height=6, res=500)
ggplot()+
geom_line(data=daydata,
aes(x=date, y=caserate_avg, group=name), colour="grey75")+
geom_line(data=subset(daydata, name=="Leeds"),
aes(x=date, y=caserate_avg), colour="RoyalBlue")+
geom_line(data=subset(daydata, name=="Rossendale"),
aes(x=date, y=caserate_avg), colour="ForestGreen")+
geom_line(data=subset(daydata, name=="South Tyneside"),
aes(x=date, y=caserate_avg), colour="Purple")+
scale_x_date(limits=c(as.Date("2020-08-01"), as.Date("2020-09-04")), name="")+
scale_y_continuous(name="Daily confirmed new cases per 100,000")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="Is Leeds the only area under threat of new restrictions?",
subtitle="Daily rates of new confirmed COVID-19 cases in Leeds compared to Rossendale and South Tyneside",
caption="Date from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")
dev.off()
#National-level case figures
tiff("Outputs/COVIDCaserateUK.tiff", units="in", width=8, height=6, res=500)
daydata %>%
filter(name %in% c("England", "Wales", "Scotland", "Northern Ireland")) %>%
filter(date>=as.Date("2020-07-14") & date<=as.Date("2020-09-10")) %>%
ggplot()+
geom_line(aes(x=date, y=caserate_avg, colour=name))+
scale_colour_paletteer_d("fishualize::Scarus_quoyi", name="")+
scale_x_date(name="", date_breaks="1 week", date_labels="%d %b")+
scale_y_continuous(name="Daily new confirmed COVID-19 cases per 100,000")+
theme_classic()+
labs(title="The rise in new confirmed COVID-19 cases has slowed across the UK",
subtitle="It's not clear if this is due to a lack of available testing, slow processing of the tests that have been conducted,\na genuine slowdown in the increase in prevalence, or a combination of all three.\nHowever, other indicators suggest prevalence is still rising",
caption="Data from PHE, PHW, PHS, DoHNI | Plot by @VictimOfMaths")
dev.off()
#Comparisons of local restrictions vs. everywhere else
daydata$flag3 <- case_when(
daydata$name %in% c("East Renfrewshire", "Glasgow City", "West Dunbartonshire") ~ "Greater Glasgow phase 1",
daydata$name %in% c("East Dunbartonshire", "Renfrewshire") ~ "Greater Glasgow phase 2",
daydata$name %in% c("North Lanarkshire","South Lanarkshire") ~ "Lanarkshire",
daydata$name=="Caerphilly" ~ "Caerphilly",
daydata$name=="Rhondda Cynon Taf" ~ "Rhondda Cynon Taf",
daydata$name=="Leicester" ~ "Leicester",
daydata$name %in% c("Manchester", "Trafford", "Bury", "Tameside", "Rochdale", "Salford", "Bolton",
"Oldham", "Preston", "Blackburn with Darwen", "Pendle", "Bradford",
"Calderdale", "Kirklees") ~ "Northern England",
daydata$name %in% c("Wigan", "Rossendale") ~ "Wigan & Rossendale",
daydata$name %in% c("Stockport", "Burnley", "Hyndburn") ~ "Stockport, Burnley & Hyndburn",
daydata$name %in% c()
)
daydata$flag4 <- case_when(
daydata$name=="Leicester" ~ "Leicester",
daydata$name %in% c("Manchester", "Trafford", "Bury", "Tameside", "Rochdale", "Salford", "Oldham") ~ "Greater Manchester",
daydata$name =="Bolton" ~ "Bolton",
TRUE ~ as.character(daydata$country)
)
tiff("Outputs/COVIDLocalRestrictions1.tiff", units="in", width=10, height=7, res=500)
daydata %>%
group_by(flag4, date) %>%
filter(country=="England" & !flag4 %in% c("Bolton", "Greater Manchester")) %>%
summarise(casesroll_avg=sum(casesroll_avg), pop=sum(pop)) %>%
mutate(caserate_avg=casesroll_avg*100000/pop) %>%
ggplot()+
geom_line(aes(x=date, y=caserate_avg, colour=flag4), show.legend = FALSE)+
geom_segment(aes(x=as.Date("2020-06-29"), xend=as.Date("2020-06-29"), y=0, yend=25),
colour="#F89088FF", linetype=2)+
annotate("text", x=as.Date("2020-07-01"), y=23, label="Local restrictions introduced", hjust=0)+
scale_x_date(name="")+
scale_y_continuous(name="Daily new cases per 100,000")+
scale_colour_paletteer_d("palettetown::porygon")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="Local Restrictions in Leicester *might* have had a short-term effect",
subtitle="Rolling 7-day average of new COVID-19 case rates in Leicester compared to the rest of England (excluding Greater Manchester)",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDLocalRestrictions2.tiff", units="in", width=10, height=7, res=500)
daydata %>%
group_by(flag4, date) %>%
filter(country=="England" & flag4!="Leicester") %>%
summarise(casesroll_avg=sum(casesroll_avg), pop=sum(pop)) %>%
mutate(caserate_avg=casesroll_avg*100000/pop) %>%
ggplot()+
geom_line(aes(x=date, y=caserate_avg, colour=flag4), show.legend = FALSE)+
geom_segment(aes(x=as.Date("2020-07-31"), xend=as.Date("2020-07-31"), y=0, yend=35),
colour="#017A4AFF", linetype=2)+
annotate("text", x=as.Date("2020-06-30"), y=32, label="Local restrictions introduced")+
scale_x_date(name="")+
scale_y_continuous(name="Daily new cases per 100,000")+
scale_colour_paletteer_d("awtools::mpalette")+
theme_classic()+
theme(plot.subtitle=element_markdown())+
labs(title="Little evidence that local restrictions in Greater Manchester had much impact",
subtitle="Rolling 7-day average of new COVID-19 case rates in Bolton and the rest of Greater Manchester
compared to the rest of England (excluding Leicester)",
caption="Data from PHE | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/ONSInfectionSurvey.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(paletteer)
library(scales)
library(ragg)
library(extrafont)
#Read in data
temp <- tempfile()
#source <- "https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata"
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/covid19infectionsurveydatasets20210618england1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
rawdata <- read_excel(temp, sheet="1h", range="A7:V48", col_names=FALSE)
data <- rawdata %>%
select(c(1,2,5,8,11,14,17,20)) %>%
gather(age, prevalence, c(2:8)) %>%
mutate(age=case_when(
age=="...2" ~ "Age 2 - Year 6",
age=="...5" ~ "Year 7 - Year 11",
age=="...8" ~ "Year 12 - Age 24",
age=="...11" ~ "Ages 25 - 34",
age=="...14" ~ "Ages 35 - 49",
age=="...17" ~ "Ages 50 - 69",
age=="...20" ~ "Ages 70+"
),
date=as.Date(`...1`),
age=factor(age, levels=c("Age 2 - Year 6","Year 7 - Year 11","Year 12 - Age 24",
"Ages 25 - 34","Ages 35 - 49","Ages 50 - 69","Ages 70+")))
agg_tiff("Outputs/ONSInfSurveyxAge.tiff", units="in", width=11, height=4, res=500)
ggplot(data, aes(x=date, y=age, fill=prevalence))+
geom_tile()+
scale_x_date(name="")+
scale_y_discrete(name="")+
scale_fill_paletteer_c("viridis::inferno", name="Prevalence", labels=scales::label_percent(),
limits=c(0,NA))+
labs(title="The ONS infection survey shows a sharp rise in COVID prevalence in 25-34 year olds",
subtitle="Age-specific COVID-19 prevalence estimates from the latest ONS Infection Survey",
caption="Data from ONS | Plot by @VictimOfMaths")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"), plot.title.position="plot")
dev.off()
agg_tiff("Outputs/ONSInfSurveyxAgeLine.tiff", units="in", width=11, height=4, res=500)
ggplot(data, aes(x=date, y=prevalence, colour=age))+
geom_line()+
scale_x_date(name="")+
scale_y_continuous(name="", label=label_percent(accuracy=0.1), limits=c(0,NA))+
scale_colour_paletteer_d("awtools::a_palette", name="Age")+
labs(title="The ONS infection survey shows a sharp rise in COVID prevalence in 25-34 year olds",
subtitle="Age-specific COVID-19 prevalence estimates from the latest ONS Infection Survey",
caption="Data from ONS | Plot by @VictimOfMaths")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.2)),
text=element_text(family="Lato"), plot.title.position="plot")
dev.off()
================================================
FILE: Heatmaps/ScotlandCOVIDCasesxAge.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ggtext)
library(ggridges)
library(paletteer)
library(ggstream)
library(RcppRoll)
library(extrafont)
#Scottish age data
#https://www.opendata.nhs.scot/dataset/covid-19-in-scotland
temp <- tempfile()
source <- "https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/9393bd66-5012-4f01-9bc5-e7a10accacf4/download/trend_agesex_20210831.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp)
data <- data %>%
filter(!AgeGroup %in% c("Total", "0 to 59", "60+")) %>%
mutate(date=as.Date(as.character(Date), format="%Y%m%d"))
#Bring in populations
#Bring in LA populations
temp2 <- tempfile()
source2 <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls"
temp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode="wb")
pop.m <- as.data.frame(t(read_excel(temp2, sheet="MYE2 - Males", range="E387:CQ387", col_names=FALSE)))
pop.m$age <- c(0:90)
pop.m$Sex <- "Male"
pop.f <- as.data.frame(t(read_excel(temp2, sheet="MYE2 - Females", range="E387:CQ387", col_names=FALSE)))
pop.f$age <- c(0:90)
pop.f$Sex <- "Female"
pop <- bind_rows(pop.m, pop.f)
pop$age <- c(0:90)
pop$AgeGroup <- case_when(
pop$age<15 ~ "0 to 14",
pop$age<20 ~ "15 to 19",
pop$age<25 ~ "20 to 24",
pop$age<45 ~ "25 to 44",
pop$age<65 ~ "45 to 64",
pop$age<75 ~ "65 to 74",
pop$age<85 ~ "75 to 84",
TRUE ~ "85plus"
)
pop1 <- pop %>%
group_by(AgeGroup, Sex) %>%
summarise(pop=sum(V1))
pop2 <- pop %>%
group_by(AgeGroup) %>%
summarise(pop=sum(V1)) %>%
mutate(Sex="Total")
pop <- bind_rows(pop1, pop2)
data <- merge(data, pop, by=c("Sex", "AgeGroup"), all.x=TRUE)
data$posrate <- data$DailyPositive*100000/data$pop
#Take rolling 7-day averages
data <- data %>%
group_by(Sex, AgeGroup) %>%
arrange(date) %>%
mutate(cases_avg=roll_mean(DailyPositive, 7, align="right", fill=0),
posrate_avg=roll_mean(posrate, 7, align="right", fill=0))
tiff("Outputs/COVIDCasesStreamgraphScotlandxSex.tiff", units="in", width=10, height=6, res=500)
ggplot(subset(data, Sex!="Total"), aes(x=date, y=cases_avg, fill=AgeGroup))+
geom_stream(bw=0.2)+
scale_fill_paletteer_d("awtools::a_palette", name="Age",
labels=c("Under 15", "15-19", "20-24", "25-44", "45-64", "65-74", "75-84", "85+"))+
scale_y_continuous(name="New cases per day", labels=abs)+
scale_x_date(name="")+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Lato"), plot.title=element_text(face="bold", size=rel(1.6)))+
labs(title="Cases in Scotland are rising in the under 45s",
subtitle="Confirmed new COVID-19 cases in Scotland by sex and age",
caption="Date from Public Health Scotland | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDCasesStreamgraphScotland.tiff", units="in", width=10, height=6, res=500)
ggplot(subset(data, Sex=="Total"), aes(x=date, y=cases_avg, fill=AgeGroup))+
geom_stream(bw=0.2)+
scale_fill_paletteer_d("awtools::a_palette", name="Age",
labels=c("Under 15", "15-19", "20-24", "25-44", "45-64", "65-74", "75-84", "85+"))+
scale_y_continuous(name="New cases per day", labels=abs)+
scale_x_date(name="")+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"))+
labs(title="COVID-19 cases in Scotland have risen across all age groups",
subtitle="Confirmed new cases in Scotland by age",
caption="Date from Public Health Scotland | Plot by @VictimOfMaths")
dev.off()
#Heatmap
tiff("Outputs/COVIDCasesHeatmapScotland.tiff", units="in", width=10, height=3, res=500)
ggplot(subset(data, Sex=="Total" & date>=as.Date("2020-07-01") & date=as.Date("2020-07-01") & date=as.Date("2021-01-01") & date% mutate(date=as.Date(as.character(Date), format="%Y%m%d"))
#Take rolling 7-day averages
data.simd <- data.simd %>%
group_by(SIMDQuintile) %>%
arrange(date) %>%
mutate(cases_avg=roll_mean(DailyPositive, 7, align="right", fill=0),
deaths_avg=roll_mean(DailyDeaths, 7, align="right", fill=0))
tiff("Outputs/COVIDCasesHeatmapScotlandxIMD.tiff", units="in", width=10, height=3, res=500)
ggplot(subset(data.simd, date>=as.Date("2020-07-01") & date%
mutate(division=case_when(
`Division Letter`=="A" ~ "North East",
`Division Letter`=="D" ~ "Tayside",
`Division Letter`=="N" ~ "Highlands and Islands",
`Division Letter`=="C" ~ "Forth Valley",
`Division Letter`=="E" ~ "Edinburgh",
`Division Letter`=="J" ~ "The Lothians & Scottish Borders",
`Division Letter`=="P" ~ "Fife",
`Division Letter`=="G" ~ "Glasgow",
`Division Letter`=="U" ~ "Ayrshire",
`Division Letter`=="Q" ~ "Lanarkshire",
`Division Letter`=="L" ~ "Argyll and West Dunbartonshire",
`Division Letter`=="K" ~ "Renfreshire and Inverclyde",
`Division Letter`=="V" ~ "Dumfries & Galloway",
TRUE ~ NA_character_))
#Faff about with dates (probably a much cleverer way to do this)
#For a reason I cannot fathom, dates in the first half of the month are parsed
#As character strings that look like dates, while those in the second half are
#converted to the number of seconds since 01/01/1970, only with the days and weeks
#transposed. BECAUSE OF REASONS.
data <- data %>%
mutate(temp=as.numeric(Date),
date=coalesce(as.Date(as.character(as.Date("1970-01-01")+seconds(as.numeric(Date))),
format="%Y-%d-%m"),
as.Date(if_else(is.na(temp), as.character(Date), NA_character_),
format="%d/%m/%Y")))
#Set missing dates to have 0 incidents
data <- data %>%
complete(date, nesting(`SD Letter`, division, `Division Letter`, `Area Commands`)) %>%
mutate(incidents=if_else(is.na(`House Gatherings Attended`), 0,
`House Gatherings Attended`),
breaches=if_else(is.na(`House Gatherings in Breach of Restrictions`), 0,
`House Gatherings in Breach of Restrictions`),
FPNS=if_else(is.na(FPNS), 0, FPNS),
arrests=if_else(is.na(Arrests), 0, Arrests),
students=if_else(is.na(`House Gatherings involving Students`), 0,
`House Gatherings involving Students`)) %>%
select(date, `SD Letter`, division, `Area Commands`, incidents, breaches, FPNS,
arrests, students)
#Collapse to Division-level dataset
data.div <- data %>%
group_by(date, division) %>%
summarise(incidents=sum(incidents),
breaches=sum(breaches),
FPNS=sum(FPNS), arrests=sum(arrests),
students=sum(students))
#Map to Council areas - download population data
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/population-estimates/mid-19/mid-year-pop-est-19-data.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
pop <- read_excel(temp, sheet="Table 4", range="A8:C39", col_names = FALSE)
colnames(pop) <- c("code", "council", "pop")
#Match areas
pop <- pop %>%
mutate(division=case_when(
council %in% c("Argyll and Bute", "West Dunbartonshire") ~ "Argyll and West Dunbartonshire",
council %in% c("East Ayrshire", "North Ayrshire", "South Ayrshire") ~ "Ayrshire",
council=="Dumfries and Galloway" ~ "Dumfries & Galloway",
council=="City of Edinburgh" ~ "Edinburgh",
council=="Fife" ~ "Fife",
council %in% c("Clackmannanshire", "Falkirk", "Stirling") ~ "Forth Valley",
council %in% c("East Dunbartonshire", "East Renfrewshire", "Glasgow City") ~ "Glasgow",
council %in% c("Highland", "Na h-Eileanan Siar", "Orkney Islands", "Shetland Islands") ~ "Highlands and Islands",
council %in% c("North Lanarkshire", "South Lanarkshire") ~ "Lanarkshire",
council %in% c("Aberdeen City", "Aberdeenshire", "Moray") ~ "North East",
council %in% c("Inverclyde", "Renfrewshire") ~ "Renfreshire and Inverclyde",
council %in% c("Dundee City", "Angus", "Perth and Kinross") ~ "Tayside",
council %in% c("East Lothian", "Midlothian", "West Lothian", "Scottish Borders") ~ "The Lothians & Scottish Borders"
))
div.pop <- pop %>%
group_by(division) %>%
summarise(pop=sum(pop)) %>%
ungroup()
data.div <- merge(data.div, div.pop) %>%
mutate(non_students=incidents-students) %>%
gather(measure, incidents, c(3:7, 9)) %>%
mutate(incident_rate=incidents*100000/pop)
tiff("Outputs/HousePartyStudent.tiff", units="in", width=8, height=6, res=500)
data.div %>%
group_by(date, measure) %>%
summarise(incidents=sum(incidents)) %>%
filter(measure %in% c("students", "non_students")) %>%
ggplot()+
geom_area(aes(x=date, y=incidents, fill=measure), show.legend=FALSE)+
scale_x_date(name="")+
scale_y_continuous(name="House gatherings attended")+
scale_fill_paletteer_d("NineteenEightyR::electronic_night", direction=-1)+
theme_classic()+
theme(plot.title=element_text(face="bold"), plot.subtitle=element_markdown())+
labs(title="Students haven't been driving police callouts to illegal parties in Scotland",
subtitle="Police callouts to reported illegal house gatherings involving students and non-students",
caption="Data from BBC FoI request to Police Scotland | Plot by @VictimofMaths")
dev.off()
tiff("Outputs/HousePartyCouncil.tiff", units="in", width=10, height=7, res=500)
data.div %>%
filter(measure=="breaches") %>%
ggplot()+
geom_line(aes(x=date, y=incident_rate), colour="tomato")+
scale_x_date(name="")+
scale_y_continuous(name="Breaches per 100,000 population")+
geom_vline(xintercept=as.Date("2020-09-23"), linetype=2)+
facet_wrap(~division)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(0.8)),
plot.title=element_text(face="bold"))+
labs(title="Illegal house parties have continued since the new restrictions",
subtitle="Police recorded breaches of household gathering legislation in Scotland",
caption="Data from BBC FoI request to Police Scotland | Plot by @VictimofMaths")
dev.off()
data.sum <- data.div %>%
group_by(measure, division) %>%
summarise(incident_rate=sum(incident_rate))
#Download shapefile
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/910f48f3c4b3400aa9eb0af9f8989bbe_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "LAD20CD"] <- "code"
map.data <- pop %>%
merge(data.sum, by="division")
map.data <- full_join(map.data, shapefile, by="code")
tiff("Outputs/HousePartyMap.tiff", units="in", width=7, height=7, res=500)
map.data %>%
filter(measure=="breaches") %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=incident_rate), colour=NA)+
theme_classic()+
scale_fill_paletteer_c("viridis::viridis", name="Breaches per 100,000")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
labs(title="Glasgow has been Scotland's illegal house party capital",
subtitle="Rates of household gatherings found to breach restrictions",
caption="Data from BBC FoI request to Police Scotland | Plot by @VictimofMaths")
dev.off()
================================================
FILE: Heatmaps/Scottish HB Heatmaps.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(forcats)
library(readxl)
library(RcppRoll)
library(cowplot)
library(ggtext)
library(extrafont)
library(ggridges)
#Read in data
temp <- tempfile()
source <- "https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/2dd8534b-0a6f-4744-9253-9565d62f96c2/download/trend_hb_20211006.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read.csv(temp) %>%
mutate(date=as.Date(as.character(Date), format="%Y%m%d")) %>%
group_by(HB, HBName) %>%
arrange(date) %>%
mutate(casesroll_avg=roll_mean(DailyPositive, 7, align="right", fill=NA),
maxcaserate=max(casesroll_avg, na.rm=TRUE),
maxcaseday=Date[which(casesroll_avg==maxcaserate)][1],
totalcases=max(CumulativePositive, na.rm=TRUE),
maxcaseprop=casesroll_avg/maxcaserate) %>%
ungroup() %>%
mutate(HBName=gsub("NHS ", "", HBName))
heatmap <- data %>% filter(HBName!="Scotland")
#Enter dates to plot from and to
plotfrom <- "2020-03-04"
plotto <- max(heatmap$date)
#Plot case trajectories
casetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(HBName, maxcaseday),
fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
geom_segment(aes(x=as.Date("2020-06-15"), xend=as.Date("2020-06-15"), y=0.5, yend=14.5),
colour="grey20")+
annotate("text", x=as.Date("2020-06-15"), y=14.6, label="*", size=5)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
coord_cartesian(clip = 'off')+
labs(title="Timelines for COVID-19 cases in Scottish Health Boards",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Health Board.\nBoards are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each Health Board.\nData prior to 15th June 2020(denoted with an asterisk) excluded community (Pillar 2) testing.\nData updated to ", plotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Scottish Government | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)),
plot.title.position="plot",
axis.text.y=element_text(colour="Black"),
plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"))
casebars <- ggplot(subset(heatmap, Date==maxcaseday),
aes(x=totalcases, y=fct_reorder(HB, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"),
text=element_text(family="Lato"))
tiff("Outputs/COVIDScottishLACasesHeatmap.tiff", units="in", width=12, height=5, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
tiff("Outputs/COVIDScottishHBCaseRidges.tiff", units="in", width=9, height=6, res=500)
ggplot(heatmap, aes(x=date, y=fct_reorder(HBName, totalcases),
height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity", rel_min_height=0.001)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.caption.position="plot",
plot.title.position="plot", legend.position="top")+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Scottish Health Boards",
caption="Data from Scottish Government | Plot by @VictimOfMaths")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'),
barheight = unit(.5, 'lines')))
dev.off()
ggplot(heatmap)+
geom_col(aes(x=date , y=DailyPositive, fill=DailyPositive))+
facet_wrap(~HBName)+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
theme_classic()
#Download ICU data from https://www.gov.scot/publications/coronavirus-covid-19-trends-in-daily-data/
temp <- tempfile()
source <- "https://www.gov.scot/binaries/content/documents/govscot/publications/statistics/2020/04/coronavirus-covid-19-trends-in-daily-data/documents/covid-19-data-by-nhs-board/covid-19-data-by-nhs-board/govscot%3Adocument/COVID-19%2Bdaily%2Bdata%2B-%2Bby%2BNHS%2BBoard%2B-%2B6%2BOctober%2B2021.xlsx?forceDownload=true"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#Historic ICU data (using a slightly different definition)
ICUdata.hist <- read_excel(temp, sheet=6, range="A12:Q180", col_names=FALSE)
colnames(ICUdata.hist) <- c("Date", "Ayrshire & Arran", "Borders", "Dumfries & Galloway",
"Fife", "Forth Valley", "Grampian", "Greater Glasgow & Clyde",
"Highland", "Lanarkshire", "Lothian", "Orkney", "Shetland",
"Tayside", "Western Isles", "Golden Jubilee National Hospital",
"Scotland")
ICUdata.hist_long <- gather(ICUdata.hist, HB, cases, c(2:17))
ICUdata.hist_long$cases <- as.numeric(ifelse(ICUdata.hist_long$cases=="*", NA, ICUdata.hist_long$cases))
ICUdata.hist_long$Date <- as.Date(ICUdata.hist_long$Date)
#Recent ICU data
#Need to manually increment the numbers at the end of this range: 24 = 1st October
ICUdata <- read_excel(temp, sheet=4, range="A3:Q378")
ICUdata_long <- gather(ICUdata, HB, cases, c(2:17))
ICUdata_long$cases <- as.numeric(ifelse(ICUdata_long$cases=="*", NA, ICUdata_long$cases))
ICUdata_long$Date <- as.Date(ICUdata_long$`Reporting date`)
ICUdata_long$HB <- if_else(substr(ICUdata_long$HB, 1,3)=="NHS", substr(ICUdata_long$HB, 5, 100),
ICUdata_long$HB)
ICUdata_long$HB <- if_else(ICUdata_long$HB=="Scotland total", "Scotland", ICUdata_long$HB)
#need to use a custom max function as some HBs are all 0s
my.max <- function(x) ifelse( !all(is.na(x)), max(x, na.rm=T), NA)
ICUheatmap <- ICUdata_long %>%
bind_rows(., ICUdata.hist_long) %>%
arrange(HB, Date) %>%
group_by(HB) %>%
mutate(maxcases=my.max(cases), maxcaseday=Date[which(cases==maxcases)][1],
totalcases=sum(cases))
#Enter dates to plot from and to
ICUplotfrom <- "2020-03-26"
ICUplotto <- max(ICUheatmap$Date)
#Plot case trajectories
ICUcasetiles <- ggplot(subset(ICUheatmap, HB!="Scotland" & !is.na(maxcases)),
aes(x=Date, y=fct_reorder(HB, maxcaseday), fill=cases))+
geom_tile(colour="White")+
geom_vline(aes(xintercept=as.Date("2020-09-10")))+
theme_classic()+
scale_fill_distiller(palette="Spectral", na.value="White", name="Total patients",
limits=c(0,NA))+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(ICUplotfrom, ICUplotto)), expand=c(0,0))+
labs(title="We haven't (yet) seen a rise in COVID patients in Scottish Intensive Care Units this wave",
subtitle=paste0("The heatmap represents the number of ICU inpatients with confirmed COVID-19 in each Health Board. Numbers below 5 are censored and appear white. Health Boards with no non-missing days are excluded\nBoards are ordered by the date at which they reached their peak number of ICU cases. The definition of a COVID-19 patient was revised to a stricter definition after 10th September 2020 (denoted by the vertical line).\nData updated to ", ICUplotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Scottish Government | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)),
plot.title.position="plot",
axis.text.y=element_text(colour="Black"),
plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.caption.position="plot")
tiff("Outputs/COVIDScottishHBICUHeatmap.tiff", units="in", width=12, height=5, res=500)
ICUcasetiles
dev.off()
#Repeat for all hospital patients
Hospdata.hist <- read_excel(temp, sheet=7, range="A3:Q172")
Hospdata.hist_long <- gather(Hospdata.hist, HB, cases, c(2:17))
Hospdata.hist_long$cases <- as.numeric(ifelse(Hospdata.hist_long$cases=="*", NA, Hospdata.hist_long$cases))
Hospdata.hist_long$Date <- as.Date(Hospdata.hist_long$Date)
Hospdata.hist_long$HB <- if_else(substr(Hospdata.hist_long$HB, 1,3)=="NHS", substr(Hospdata.hist_long$HB, 5, 100),
Hospdata.hist_long$HB)
#Recent ICU data
#Need to manually increment the numbers at the end of this range: 24 = 1st October
Hospdata <- read_excel(temp, sheet=5, range="A3:Q375")
Hospdata_long <- gather(Hospdata, HB, cases, c(2:17))
Hospdata_long$cases <- as.numeric(ifelse(Hospdata_long$cases=="*", NA, Hospdata_long$cases))
Hospdata_long$Date <- as.Date(Hospdata_long$`Reporting date`)
Hospdata_long$HB <- if_else(substr(Hospdata_long$HB, 1,3)=="NHS", substr(Hospdata_long$HB, 5, 100),
Hospdata_long$HB)
Hospheatmap <- Hospdata_long %>%
bind_rows(., Hospdata.hist_long) %>%
arrange(HB, Date) %>%
group_by(HB) %>%
mutate(maxcases=my.max(cases), maxcaseday=Date[which(cases==maxcases)][1],
totalcases=sum(cases))
#Enter dates to plot from and to
Hospplotfrom <- "2020-03-26"
Hospplotto <- max(Hospheatmap$Date)
#Plot case trajectories
Hospcasetiles <- ggplot(subset(Hospheatmap, HB!="Scotland" & !is.na(maxcases)),
aes(x=Date, y=fct_reorder(HB, maxcaseday), fill=cases))+
geom_tile(colour="White")+
geom_vline(aes(xintercept=as.Date("2020-09-10")))+
theme_classic()+
scale_fill_distiller(palette="Spectral", na.value="White", name="Total patients",
limits=c(0,NA))+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(ICUplotfrom, ICUplotto)), expand=c(0,0))+
labs(title="The number of COVID-19 patients in Scottish hospitals is still low",
subtitle=paste0("The heatmap represents the number of hospital patients with confirmed COVID-19 in each Health Board. Numbers below 5 are censored and appear white. Health Boards with no non-missing days are excluded\nBoards are ordered by the date at which they reached their peak number of hospital patients. The definition of a COVID-19 patient was revised to a stricter definition after 10th September 2020 (denoted by the vertical line).\nData updated to ", ICUplotto,". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Scottish Government | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)),
plot.title.position="plot",
axis.text.y=element_text(colour="Black"),
plot.title=element_text(face="bold", size=rel(1.6)),
text=element_text(family="Lato"), plot.caption.position="plot")
tiff("Outputs/COVIDScottishHBHospHeatmap.tiff", units="in", width=12, height=5, res=500)
Hospcasetiles
dev.off()
#Plot cases, admissions and ICU occupancy for the whole country
natdata <- data %>%
filter(HBName=="Scotland") %>%
merge(., subset(Hospheatmap, HB=="Scotland"), by.x="date", by.y="Date") %>%
merge(., subset(ICUheatmap, HB=="Scotland"), by.x="date", by.y="Date") %>%
select(date, DailyPositive, cases.x, cases.y)
colnames(natdata) <- c("Date", "New cases", "Hospital patients", "ICU patients")
#Remove case data from 15th June as that's when the Pillar 2 data is added
natdata$`New cases` <- if_else(natdata$date==as.Date("2020-06-15"), 0, natdata$`New cases`)
#Calculate rolling averages
natdata <- natdata %>%
mutate(casesroll=roll_mean(`New cases`, 7, align="center", fill=NA),
hosproll=roll_mean(`Hospital patients`, 7, align="center", fill=NA),
ICUroll=roll_mean(`ICU patients`, 7, align="center", fill=NA))
limit <- abs(max(c(natdata$`New cases`, natdata$`Hospital patients`, natdata$`ICU patients`)))
tiff("Outputs/COVIDScottishHospBars.tiff", units="in", width=9, height=6, res=500)
ggplot(subset(natdata,Date>=as.Date("2020-09-11")))+
geom_col(aes(x=Date, y=`New cases`), fill="#47d4ae")+
geom_col(aes(x=Date, y=-`Hospital patients`), fill="#ff9f55")+
geom_col(aes(x=Date, y=-`ICU patients`), fill="#ff1437")+
geom_line(aes(x=Date, y=casesroll), colour="#09614a")+
geom_hline(yintercept=0)+
scale_x_date(name="")+
scale_y_continuous(name="", limits=c(-limit, limit), labels=abs,
position = "right")+
theme_classic()+
annotate(geom="text", x=as.Date("2020-09-12"), y=2800,
label="New cases in the population", hjust=0, family="Lato")+
annotate(geom="text", x=as.Date("2020-09-12"), y=-2600,
label="Total patients in hospital", hjust=0, family="Lato")+
#annotate(geom="text", x=as.Date("2020-10-06"), y=-70, label="Patients in ICU", colour="#a80b20")+
labs(title="Scottish COVID hospital numbers appear to have peaked",
subtitle="Daily confirmed new COVID-19 cases and patients with recently confirmed COVID-19
in Scottish hospitals and Intensive Care Units",
caption="Data from Scottish Government | Plot by @VictimOfMaths")+
theme(plot.subtitle=element_markdown(),
plot.title=element_text(face="bold", size=rel(1.5)),
plot.caption.position = "plot",
text=element_text(family="Lato"))
dev.off()
tiff("Outputs/COVIDScottishICUBars.tiff", units="in", width=10, height=8, res=500)
ggplot(natdata)+
geom_col(aes(x=Date, y=`ICU patients`, fill=`ICU patients`), show.legend = FALSE)+
geom_vline(xintercept=as.Date("2020-09-10"))+
scale_x_date(name="")+
scale_y_continuous(name="Total patients in ICU")+
scale_fill_distiller(palette="Spectral")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
plot.title.position = "plot",
text=element_text(family="Lato"))+
labs(title="The number of COVID-19 patients in Intensive Care in Scotland is rising",
subtitle=paste0("Hospital patients in Intensive Care Units with confirmed COVID-19.\nThe definition of a COVID-19 patient was revised to a stricter definition after 10th September 2020 (denoted by the vertical line).\nData for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Scottish Government | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/UK Hex Animations.R
================================================
rm(list=ls())
library(tidyverse)
library(geojsonio)
library(broom)
library(zoo)
library(gganimate)
#Get English UTLA-level case trajectories
#Prepared by COVID_LA_Plots/Underlying_Code.R
data <- read.csv("COVID_LA_Plots/LACases.csv")[,-c(1)]
#Sort out Buckinghamshire
temp <- subset(data, code=="E06000060")
data$code <- if_else(data$code=="E06000060", "E07000004", as.character(data$code))
data$name <- if_else(data$name=="Buckinghamshire", "Aylesbury Vale", as.character(data$name))
temp1 <- temp
temp1$code <- "E07000005"
temp1$name <- "Chiltern"
temp2 <- temp
temp2$code <- "E07000006"
temp2$name <- "South Bucks"
temp$code <- "E07000007"
temp$name <- "Wycombe"
data <- bind_rows(data, temp, temp1, temp2)
#Bring in hexmap
#Read in hex boundaries (adapted from from https://olihawkins.com/2018/02/1 and ODI Leeds)
hex <- geojson_read("Data/UKLA.geojson", what="sp")
# Fortify into a data frame format to be shown with ggplot2
hexes <- tidy(hex, region="id")
hexes$id <- if_else(hexes$id=="E09000001", "E09000012", hexes$id)
data <- left_join(hexes, data, by=c("id"="code"), all.y=TRUE)
data$date <- as.Date(data$date)
#Remove Isles of Scilly which are too small to have their own data
data <- subset(data, id!="E06000053")
#extract latest date with full UK data
data <- data %>%
group_by(country) %>%
mutate(min=min(date), max=max(date))
completefrom <- max(data$min, na.rm=TRUE)
completeto <- min(data$max, na.rm=TRUE)
HexAnimUK <- ggplot()+
geom_polygon(data=subset(data, date>as.Date("2020-03-06") & date<=completeto & country!="Republic of Ireland"),
aes(x=long, y=lat, group=id, fill=casesroll_avg))+
coord_fixed()+
scale_fill_distiller(palette="Spectral", name="Daily confirmed\ncases (7-day\nrolling avg.)", na.value="white")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of COVID-19 across the UK",
subtitle="Rolling 7-day average number of new confirmed cases.\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI\nVisualisation by @VictimOfMaths")
animate(HexAnimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/HexAnimUK.gif"),
end_pause=60)
================================================
FILE: Heatmaps/UKIRELA.geojson
================================================
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"n":"Hartlepool","id":"E06000001","lon":-1.27023005,"lat":54.67620087,"q":8,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.98561111267453],[0.5642558584958091,65.99491892044009],[0.5642558584958091,66.01353453597119],[0.5481342625387859,66.02284234373674],[0.5320126665817628,66.01353453597119],[0.5320126665817628,65.99491892044009],[0.5481342625387859,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Middlesbrough","id":"E06000002","lon":-1.21098995,"lat":54.54470062,"q":9,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.95768768937788],[0.5803774544528322,65.96699549714343],[0.5803774544528322,65.98561111267453],[0.5642558584958091,65.99491892044009],[0.5481342625387859,65.98561111267453],[0.5481342625387859,65.96699549714343],[0.5642558584958091,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Redcar and Cleveland","id":"E06000003","lon":-1.00610995,"lat":54.56750107,"q":9,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.98561111267453],[0.5964990504098553,65.99491892044009],[0.5964990504098553,66.01353453597119],[0.5803774544528322,66.02284234373674],[0.5642558584958091,66.01353453597119],[0.5642558584958091,65.99491892044009],[0.5803774544528322,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Stockton-on-Tees","id":"E06000004","lon":-1.30668998,"lat":54.55690002,"q":8,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.95768768937788],[0.5481342625387859,65.96699549714343],[0.5481342625387859,65.98561111267453],[0.5320126665817628,65.99491892044009],[0.5158910706247397,65.98561111267453],[0.5158910706247397,65.96699549714343],[0.5320126665817628,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Kingston upon Hull, City of","id":"E06000010","lon":-0.30379999,"lat":53.76979828,"q":10,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.8739174194879],[0.6287422423239015,65.88322522725345],[0.6287422423239015,65.90184084278455],[0.6126206463668784,65.9111486505501],[0.5964990504098553,65.90184084278455],[0.5964990504098553,65.88322522725345],[0.6126206463668784,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"East Riding of Yorkshire","id":"E06000011","lon":-0.66202998,"lat":53.88119888,"q":11,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.90184084278455],[0.6448638382809246,65.9111486505501],[0.6448638382809246,65.92976426608121],[0.6287422423239015,65.93907207384676],[0.6126206463668784,65.92976426608121],[0.6126206463668784,65.9111486505501],[0.6287422423239015,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Darlington","id":"E06000005","lon":-1.56834996,"lat":54.53530121,"q":7,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.95768768937788],[0.5158910706247397,65.96699549714343],[0.5158910706247397,65.98561111267453],[0.4997694746677166,65.99491892044009],[0.4836478787106935,65.98561111267453],[0.4836478787106935,65.96699549714343],[0.4997694746677166,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Halton","id":"E06000006","lon":-2.68852997,"lat":53.33420181,"q":1,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.76222372630126],[0.33855351509748544,65.77153153406681],[0.33855351509748544,65.79014714959791],[0.3224319191404623,65.79945495736347],[0.3063103231834392,65.79014714959791],[0.3063103231834392,65.77153153406681],[0.3224319191404623,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Slough","id":"E06000039","lon":-0.57617003,"lat":51.50350189,"q":7,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.53883633992798],[0.5320126665817628,65.54814414769353],[0.5320126665817628,65.56675976322464],[0.5158910706247397,65.57606757099019],[0.4997694746677166,65.56675976322464],[0.4997694746677166,65.54814414769353],[0.5158910706247397,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Warrington","id":"E06000007","lon":-2.56167006,"lat":53.39160156,"q":2,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.76222372630126],[0.37079670701153167,65.77153153406681],[0.37079670701153167,65.79014714959791],[0.35467511105450855,65.79945495736347],[0.33855351509748544,65.79014714959791],[0.33855351509748544,65.77153153406681],[0.35467511105450855,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Blackburn with Darwen","id":"E06000008","lon":-2.46359992,"lat":53.70080185,"q":4,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.8739174194879],[0.43528309083962413,65.88322522725345],[0.43528309083962413,65.90184084278455],[0.419161494882601,65.9111486505501],[0.4030398989255779,65.90184084278455],[0.4030398989255779,65.88322522725345],[0.419161494882601,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Blackpool","id":"E06000009","lon":-3.02284002,"lat":53.82160187,"q":2,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.8739174194879],[0.37079670701153167,65.88322522725345],[0.37079670701153167,65.90184084278455],[0.35467511105450855,65.9111486505501],[0.33855351509748544,65.90184084278455],[0.33855351509748544,65.88322522725345],[0.35467511105450855,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"North East Lincolnshire","id":"E06000012","lon":-0.13926999,"lat":53.52339935,"q":11,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.84599399619124],[0.6448638382809246,65.85530180395679],[0.6448638382809246,65.8739174194879],[0.6287422423239015,65.88322522725345],[0.6126206463668784,65.8739174194879],[0.6126206463668784,65.85530180395679],[0.6287422423239015,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"York","id":"E06000014","lon":-1.07375002,"lat":53.96580124,"q":9,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.92976426608122],[0.5964990504098553,65.93907207384677],[0.5964990504098553,65.95768768937788],[0.5803774544528322,65.96699549714343],[0.5642558584958091,65.95768768937788],[0.5642558584958091,65.93907207384677],[0.5803774544528322,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Derby","id":"E06000015","lon":-1.47188997,"lat":52.91460037,"q":6,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.76222372630126],[0.4997694746677166,65.77153153406681],[0.4997694746677166,65.79014714959791],[0.4836478787106935,65.79945495736347],[0.46752628275367036,65.79014714959791],[0.46752628275367036,65.77153153406681],[0.4836478787106935,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"North Lincolnshire","id":"E06000013","lon":-0.52410001,"lat":53.58639908,"q":10,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.84599399619124],[0.6126206463668784,65.85530180395679],[0.6126206463668784,65.8739174194879],[0.5964990504098553,65.88322522725345],[0.5803774544528322,65.8739174194879],[0.5803774544528322,65.85530180395679],[0.5964990504098553,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Leicester","id":"E06000016","lon":-1.13039994,"lat":52.63589859,"q":7,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.65053003311462],[0.5320126665817628,65.65983784088017],[0.5320126665817628,65.67845345641128],[0.5158910706247397,65.68776126417683],[0.4997694746677166,65.67845345641128],[0.4997694746677166,65.65983784088017],[0.5158910706247397,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Rutland","id":"E06000017","lon":-0.62629998,"lat":52.66759872,"q":9,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.67845345641128],[0.5803774544528322,65.68776126417683],[0.5803774544528322,65.70637687970793],[0.5642558584958091,65.71568468747348],[0.5481342625387859,65.70637687970793],[0.5481342625387859,65.68776126417683],[0.5642558584958091,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Nottingham","id":"E06000018","lon":-1.16666996,"lat":52.95420074,"q":8,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.70637687970795],[0.5642558584958091,65.7156846874735],[0.5642558584958091,65.7343003030046],[0.5481342625387859,65.74360811077015],[0.5320126665817628,65.7343003030046],[0.5320126665817628,65.7156846874735],[0.5481342625387859,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Herefordshire, County of","id":"E06000019","lon":-2.73931003,"lat":52.08150101,"q":3,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.62260660981796],[0.3869183029685548,65.63191441758352],[0.3869183029685548,65.65053003311462],[0.37079670701153167,65.65983784088017],[0.35467511105450855,65.65053003311462],[0.35467511105450855,65.63191441758352],[0.37079670701153167,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Telford and Wrekin","id":"E06000020","lon":-2.48940992,"lat":52.71419907,"q":3,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.67845345641128],[0.3869183029685548,65.68776126417683],[0.3869183029685548,65.70637687970793],[0.37079670701153167,65.71568468747348],[0.35467511105450855,65.70637687970793],[0.35467511105450855,65.68776126417683],[0.37079670701153167,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Stoke-on-Trent","id":"E06000021","lon":-2.15888,"lat":53.01710129,"q":4,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.7343003030046],[0.419161494882601,65.74360811077015],[0.419161494882601,65.76222372630126],[0.4030398989255779,65.77153153406681],[0.3869183029685548,65.76222372630126],[0.3869183029685548,65.74360811077015],[0.4030398989255779,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Luton","id":"E06000032","lon":-0.42319,"lat":51.89099884,"q":12,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.65053003311462],[0.693228626151994,65.65983784088017],[0.693228626151994,65.67845345641128],[0.6771070301949709,65.68776126417683],[0.6609854342379478,65.67845345641128],[0.6609854342379478,65.65983784088017],[0.6771070301949709,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Bath and North East Somerset","id":"E06000022","lon":-2.48654008,"lat":51.35599899,"q":3,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.51091291663133],[0.3869183029685548,65.52022072439688],[0.3869183029685548,65.53883633992798],[0.37079670701153167,65.54814414769353],[0.35467511105450855,65.53883633992798],[0.35467511105450855,65.52022072439688],[0.37079670701153167,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Southend-on-Sea","id":"E06000033","lon":0.70690602,"lat":51.54909897,"q":16,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.8060797978511558,65.53883633992798],[0.8222013938081789,65.54814414769353],[0.8222013938081789,65.56675976322464],[0.8060797978511558,65.57606757099019],[0.7899582018941327,65.56675976322464],[0.7899582018941327,65.54814414769353],[0.8060797978511558,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Bristol, City of","id":"E06000023","lon":-2.57742,"lat":51.47109985,"q":2,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.51091291663133],[0.35467511105450855,65.52022072439688],[0.35467511105450855,65.53883633992798],[0.33855351509748544,65.54814414769353],[0.3224319191404623,65.53883633992798],[0.3224319191404623,65.52022072439688],[0.33855351509748544,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Brentwood","id":"E07000068","lon":0.29009101,"lat":51.64110184,"q":15,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.56675976322464],[0.7738366059371096,65.57606757099019],[0.7738366059371096,65.5946831865213],[0.7577150099800865,65.60399099428685],[0.7415934140230633,65.5946831865213],[0.7415934140230633,65.57606757099019],[0.7577150099800865,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"North Somerset","id":"E06000024","lon":-2.75439,"lat":51.39709854,"q":1,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.48298949333467],[0.33855351509748544,65.49229730110022],[0.33855351509748544,65.51091291663133],[0.3224319191404623,65.52022072439688],[0.3063103231834392,65.51091291663133],[0.3063103231834392,65.49229730110022],[0.3224319191404623,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Worcester","id":"E07000237","lon":-2.2102499,"lat":52.19480133,"q":4,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.56675976322464],[0.419161494882601,65.57606757099019],[0.419161494882601,65.5946831865213],[0.4030398989255779,65.60399099428685],[0.3869183029685548,65.5946831865213],[0.3869183029685548,65.57606757099019],[0.4030398989255779,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"South Gloucestershire","id":"E06000025","lon":-2.46921992,"lat":51.54669952,"q":1,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.53883633992798],[0.33855351509748544,65.54814414769353],[0.33855351509748544,65.56675976322464],[0.3224319191404623,65.57606757099019],[0.3063103231834392,65.56675976322464],[0.3063103231834392,65.54814414769353],[0.3224319191404623,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Brent","id":"E09000005","lon":-0.27568001,"lat":51.56439972,"q":10,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.51091291663133],[0.6126206463668784,65.52022072439688],[0.6126206463668784,65.53883633992798],[0.5964990504098553,65.54814414769353],[0.5803774544528322,65.53883633992798],[0.5803774544528322,65.52022072439688],[0.5964990504098553,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Plymouth","id":"E06000026","lon":-4.1129899,"lat":50.4048996,"q":-3,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.1934591514842774,65.37129580014803],[0.2095807474413005,65.38060360791359],[0.2095807474413005,65.39921922344469],[0.1934591514842774,65.40852703121024],[0.17733755552725428,65.39921922344469],[0.17733755552725428,65.38060360791359],[0.1934591514842774,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Thurrock","id":"E06000034","lon":0.33490199,"lat":51.50989914,"q":15,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.51091291663133],[0.7738366059371096,65.52022072439688],[0.7738366059371096,65.53883633992798],[0.7577150099800865,65.54814414769353],[0.7415934140230633,65.53883633992798],[0.7415934140230633,65.52022072439688],[0.7577150099800865,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Medway","id":"E06000035","lon":0.563173,"lat":51.4477005,"q":16,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.8060797978511558,65.42714264674134],[0.8222013938081789,65.4364504545069],[0.8222013938081789,65.455066070038],[0.8060797978511558,65.46437387780355],[0.7899582018941327,65.455066070038],[0.7899582018941327,65.4364504545069],[0.8060797978511558,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Torbay","id":"E06000027","lon":-3.5552299,"lat":50.47090149,"q":-2,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.37129580014803],[0.24182393935534674,65.38060360791359],[0.24182393935534674,65.39921922344469],[0.22570234339832362,65.40852703121024],[0.2095807474413005,65.39921922344469],[0.2095807474413005,65.38060360791359],[0.22570234339832362,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Bracknell Forest","id":"E06000036","lon":-0.73363,"lat":51.41130066,"q":6,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.48298949333467],[0.4997694746677166,65.49229730110022],[0.4997694746677166,65.51091291663133],[0.4836478787106935,65.52022072439688],[0.46752628275367036,65.51091291663133],[0.46752628275367036,65.49229730110022],[0.4836478787106935,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Kingston upon Thames","id":"E09000021","lon":-0.28367001,"lat":51.39300156,"q":9,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.42714264674134],[0.5964990504098553,65.4364504545069],[0.5964990504098553,65.455066070038],[0.5803774544528322,65.46437387780355],[0.5642558584958091,65.455066070038],[0.5642558584958091,65.4364504545069],[0.5803774544528322,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Swindon","id":"E06000030","lon":-1.73367,"lat":51.57759857,"q":4,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.51091291663133],[0.419161494882601,65.52022072439688],[0.419161494882601,65.53883633992798],[0.4030398989255779,65.54814414769353],[0.3869183029685548,65.53883633992798],[0.3869183029685548,65.52022072439688],[0.4030398989255779,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Peterborough","id":"E06000031","lon":-0.26874,"lat":52.59209824,"q":13,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.70637687970795],[0.7254718180660402,65.7156846874735],[0.7254718180660402,65.7343003030046],[0.7093502221090171,65.74360811077015],[0.693228626151994,65.7343003030046],[0.693228626151994,65.7156846874735],[0.7093502221090171,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"West Berkshire","id":"E06000037","lon":-1.27364004,"lat":51.4455986,"q":4,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.48298949333467],[0.43528309083962413,65.49229730110022],[0.43528309083962413,65.51091291663133],[0.419161494882601,65.52022072439688],[0.4030398989255779,65.51091291663133],[0.4030398989255779,65.49229730110022],[0.419161494882601,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Reading","id":"E06000038","lon":-0.99071002,"lat":51.45299911,"q":5,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.48298949333467],[0.46752628275367036,65.49229730110022],[0.46752628275367036,65.51091291663133],[0.45140468679664725,65.52022072439688],[0.43528309083962413,65.51091291663133],[0.43528309083962413,65.49229730110022],[0.45140468679664725,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Windsor and Maidenhead","id":"E06000040","lon":-0.67540997,"lat":51.4803009,"q":8,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.53883633992798],[0.5642558584958091,65.54814414769353],[0.5642558584958091,65.56675976322464],[0.5481342625387859,65.57606757099019],[0.5320126665817628,65.56675976322464],[0.5320126665817628,65.54814414769353],[0.5481342625387859,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Wokingham","id":"E06000041","lon":-0.89934999,"lat":51.42300034,"q":7,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.51091291663133],[0.5158910706247397,65.52022072439688],[0.5158910706247397,65.53883633992798],[0.4997694746677166,65.54814414769353],[0.4836478787106935,65.53883633992798],[0.4836478787106935,65.52022072439688],[0.4997694746677166,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Lambeth","id":"E09000022","lon":-0.11385,"lat":51.46440125,"q":11,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.455066070038],[0.6448638382809246,65.46437387780355],[0.6448638382809246,65.48298949333466],[0.6287422423239015,65.49229730110021],[0.6126206463668784,65.48298949333466],[0.6126206463668784,65.46437387780355],[0.6287422423239015,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Milton Keynes","id":"E06000042","lon":-0.74070001,"lat":52.07239914,"q":10,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.65053003311462],[0.6287422423239015,65.65983784088017],[0.6287422423239015,65.67845345641128],[0.6126206463668784,65.68776126417683],[0.5964990504098553,65.67845345641128],[0.5964990504098553,65.65983784088017],[0.6126206463668784,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Brighton and Hove","id":"E06000043","lon":-0.15079001,"lat":50.8465004,"q":11,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.34337237685136],[0.6448638382809246,65.35268018461691],[0.6448638382809246,65.37129580014802],[0.6287422423239015,65.38060360791357],[0.6126206463668784,65.37129580014802],[0.6126206463668784,65.35268018461691],[0.6287422423239015,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Bromley","id":"E09000006","lon":0.039246,"lat":51.37269974,"q":12,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.42714264674134],[0.693228626151994,65.4364504545069],[0.693228626151994,65.455066070038],[0.6771070301949709,65.46437387780355],[0.6609854342379478,65.455066070038],[0.6609854342379478,65.4364504545069],[0.6771070301949709,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Portsmouth","id":"E06000044","lon":-1.07023001,"lat":50.80799866,"q":5,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.39921922344469],[0.45140468679664725,65.40852703121024],[0.45140468679664725,65.42714264674134],[0.43528309083962413,65.4364504545069],[0.419161494882601,65.42714264674134],[0.419161494882601,65.40852703121024],[0.43528309083962413,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Southampton","id":"E06000045","lon":-1.40024996,"lat":50.92039871,"q":3,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.455066070038],[0.3869183029685548,65.46437387780355],[0.3869183029685548,65.48298949333466],[0.37079670701153167,65.49229730110021],[0.35467511105450855,65.48298949333466],[0.35467511105450855,65.46437387780355],[0.37079670701153167,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Isle of Wight","id":"E06000046","lon":-1.33366001,"lat":50.67129898,"q":2,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.37129580014803],[0.37079670701153167,65.38060360791359],[0.37079670701153167,65.39921922344469],[0.35467511105450855,65.40852703121024],[0.33855351509748544,65.39921922344469],[0.33855351509748544,65.38060360791359],[0.35467511105450855,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"County Durham","id":"E06000047","lon":-1.8405,"lat":54.68510056,"q":6,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.95768768937788],[0.4836478787106935,65.96699549714343],[0.4836478787106935,65.98561111267453],[0.46752628275367036,65.99491892044009],[0.45140468679664725,65.98561111267453],[0.45140468679664725,65.96699549714343],[0.46752628275367036,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Cheshire East","id":"E06000049","lon":-2.29298997,"lat":53.16790009,"q":4,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.76222372630126],[0.43528309083962413,65.77153153406681],[0.43528309083962413,65.79014714959791],[0.419161494882601,65.79945495736347],[0.4030398989255779,65.79014714959791],[0.4030398989255779,65.77153153406681],[0.419161494882601,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Cheshire West and Chester","id":"E06000050","lon":-2.70298004,"lat":53.16339874,"q":3,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.76222372630126],[0.4030398989255779,65.77153153406681],[0.4030398989255779,65.79014714959791],[0.3869183029685548,65.79945495736347],[0.37079670701153167,65.79014714959791],[0.37079670701153167,65.77153153406681],[0.3869183029685548,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Shropshire","id":"E06000051","lon":-2.73667002,"lat":52.62210083,"q":2,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.65053003311462],[0.37079670701153167,65.65983784088017],[0.37079670701153167,65.67845345641128],[0.35467511105450855,65.68776126417683],[0.33855351509748544,65.67845345641128],[0.33855351509748544,65.65983784088017],[0.35467511105450855,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Cornwall","id":"E06000052","lon":-4.64248991,"lat":50.45019913,"q":-4,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.37129580014803],[0.17733755552725428,65.38060360791359],[0.17733755552725428,65.39921922344469],[0.16121595957023116,65.40852703121024],[0.14509436361320804,65.39921922344469],[0.14509436361320804,65.38060360791359],[0.16121595957023116,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Isles of Scilly","id":"E06000053","lon":-6.3021698,"lat":49.9233017,"q":-5,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.11285117169916181,65.34337237685136],[0.12897276765618493,65.35268018461691],[0.12897276765618493,65.37129580014802],[0.11285117169916181,65.38060360791357],[0.0967295757421387,65.37129580014802],[0.0967295757421387,65.35268018461691],[0.11285117169916181,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Wiltshire","id":"E06000054","lon":-1.92660999,"lat":51.3288002,"q":2,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.48298949333467],[0.37079670701153167,65.49229730110022],[0.37079670701153167,65.51091291663133],[0.35467511105450855,65.52022072439688],[0.33855351509748544,65.51091291663133],[0.33855351509748544,65.49229730110022],[0.35467511105450855,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Camden","id":"E09000007","lon":-0.16289,"lat":51.54309845,"q":11,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.53883633992798],[0.6609854342379478,65.54814414769353],[0.6609854342379478,65.56675976322464],[0.6448638382809246,65.57606757099019],[0.6287422423239015,65.56675976322464],[0.6287422423239015,65.54814414769353],[0.6448638382809246,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Bedford","id":"E06000055","lon":-0.45462999,"lat":52.19630051,"q":12,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.67845345641128],[0.6771070301949709,65.68776126417683],[0.6771070301949709,65.70637687970793],[0.6609854342379478,65.71568468747348],[0.6448638382809246,65.70637687970793],[0.6448638382809246,65.68776126417683],[0.6609854342379478,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Chiltern","id":"E07000005","lon":-0.62111998,"lat":51.67890167,"q":9,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.59468318652131],[0.5964990504098553,65.60399099428686],[0.5964990504098553,65.62260660981796],[0.5803774544528322,65.63191441758352],[0.5642558584958091,65.62260660981796],[0.5642558584958091,65.60399099428686],[0.5803774544528322,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Central Bedfordshire","id":"E06000056","lon":-0.47753999,"lat":51.99900055,"q":11,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.65053003311462],[0.6609854342379478,65.65983784088017],[0.6609854342379478,65.67845345641128],[0.6448638382809246,65.68776126417683],[0.6287422423239015,65.67845345641128],[0.6287422423239015,65.65983784088017],[0.6448638382809246,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Northumberland","id":"E06000057","lon":-2.07521009,"lat":55.30039978,"q":5,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,66.01353453597119],[0.45140468679664725,66.02284234373674],[0.45140468679664725,66.04145795926785],[0.43528309083962413,66.0507657670334],[0.419161494882601,66.04145795926785],[0.419161494882601,66.02284234373674],[0.43528309083962413,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Bournemouth, Christchurch and Poole","id":"E06000058","lon":-1.84807003,"lat":50.74610138,"q":1,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.42714264674134],[0.33855351509748544,65.4364504545069],[0.33855351509748544,65.455066070038],[0.3224319191404623,65.46437387780355],[0.3063103231834392,65.455066070038],[0.3063103231834392,65.4364504545069],[0.3224319191404623,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Dorset","id":"E06000059","lon":-2.41466999,"lat":50.79700089,"q":0,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.42714264674134],[0.3063103231834392,65.4364504545069],[0.3063103231834392,65.455066070038],[0.2901887272264161,65.46437387780355],[0.27406713126939297,65.455066070038],[0.27406713126939297,65.4364504545069],[0.2901887272264161,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Aylesbury Vale","id":"E07000004","lon":-0.87746,"lat":51.90039825,"q":10,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.62260660981796],[0.6126206463668784,65.63191441758352],[0.6126206463668784,65.65053003311462],[0.5964990504098553,65.65983784088017],[0.5803774544528322,65.65053003311462],[0.5803774544528322,65.63191441758352],[0.5964990504098553,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Croydon","id":"E09000008","lon":-0.07761,"lat":51.36600113,"q":12,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.39921922344469],[0.6771070301949709,65.40852703121024],[0.6771070301949709,65.42714264674134],[0.6609854342379478,65.4364504545069],[0.6448638382809246,65.42714264674134],[0.6448638382809246,65.40852703121024],[0.6609854342379478,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"South Bucks","id":"E07000006","lon":-0.58484,"lat":51.55939865,"q":9,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.56675976322464],[0.5803774544528322,65.57606757099019],[0.5803774544528322,65.5946831865213],[0.5642558584958091,65.60399099428685],[0.5481342625387859,65.5946831865213],[0.5481342625387859,65.57606757099019],[0.5642558584958091,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Wycombe","id":"E07000007","lon":-0.80883002,"lat":51.66619873,"q":8,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.56675976322464],[0.5481342625387859,65.57606757099019],[0.5481342625387859,65.5946831865213],[0.5320126665817628,65.60399099428685],[0.5158910706247397,65.5946831865213],[0.5158910706247397,65.57606757099019],[0.5320126665817628,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Cambridge","id":"E07000008","lon":0.126436,"lat":52.20019913,"q":14,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.67845345641128],[0.7415934140230633,65.68776126417683],[0.7415934140230633,65.70637687970793],[0.7254718180660402,65.71568468747348],[0.7093502221090171,65.70637687970793],[0.7093502221090171,65.68776126417683],[0.7254718180660402,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"East Cambridgeshire","id":"E07000009","lon":0.28316301,"lat":52.35789871,"q":14,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.70637687970795],[0.7577150099800865,65.7156846874735],[0.7577150099800865,65.7343003030046],[0.7415934140230633,65.74360811077015],[0.7254718180660402,65.7343003030046],[0.7254718180660402,65.7156846874735],[0.7415934140230633,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Basildon","id":"E07000066","lon":0.47505501,"lat":51.5904007,"q":16,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.7899582018941327,65.56675976322464],[0.8060797978511558,65.57606757099019],[0.8060797978511558,65.5946831865213],[0.7899582018941327,65.60399099428685],[0.7738366059371096,65.5946831865213],[0.7738366059371096,65.57606757099019],[0.7899582018941327,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Fenland","id":"E07000010","lon":0.009016,"lat":52.53540039,"q":13,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.7343003030046],[0.7093502221090171,65.74360811077015],[0.7093502221090171,65.76222372630126],[0.693228626151994,65.77153153406681],[0.6771070301949709,65.76222372630126],[0.6771070301949709,65.74360811077015],[0.693228626151994,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Bolsover","id":"E07000033","lon":-1.27227998,"lat":53.23880005,"q":8,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.76222372630126],[0.5642558584958091,65.77153153406681],[0.5642558584958091,65.79014714959791],[0.5481342625387859,65.79945495736347],[0.5320126665817628,65.79014714959791],[0.5320126665817628,65.77153153406681],[0.5481342625387859,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Huntingdonshire","id":"E07000011","lon":-0.22466999,"lat":52.35319901,"q":13,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.67845345641128],[0.7093502221090171,65.68776126417683],[0.7093502221090171,65.70637687970793],[0.693228626151994,65.71568468747348],[0.6771070301949709,65.70637687970793],[0.6771070301949709,65.68776126417683],[0.693228626151994,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Ealing","id":"E09000009","lon":-0.31406999,"lat":51.5243988,"q":10,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.53883633992798],[0.6287422423239015,65.54814414769353],[0.6287422423239015,65.56675976322464],[0.6126206463668784,65.57606757099019],[0.5964990504098553,65.56675976322464],[0.5964990504098553,65.54814414769353],[0.6126206463668784,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"South Cambridgeshire","id":"E07000012","lon":0.091017,"lat":52.10810089,"q":13,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.65053003311462],[0.7254718180660402,65.65983784088017],[0.7254718180660402,65.67845345641128],[0.7093502221090171,65.68776126417683],[0.693228626151994,65.67845345641128],[0.693228626151994,65.65983784088017],[0.7093502221090171,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Allerdale","id":"E07000026","lon":-3.28096008,"lat":54.68519974,"q":4,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.95768768937788],[0.419161494882601,65.96699549714343],[0.419161494882601,65.98561111267453],[0.4030398989255779,65.99491892044009],[0.3869183029685548,65.98561111267453],[0.3869183029685548,65.96699549714343],[0.4030398989255779,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Barrow-in-Furness","id":"E07000027","lon":-3.19975996,"lat":54.15739822,"q":2,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.92976426608122],[0.37079670701153167,65.93907207384677],[0.37079670701153167,65.95768768937788],[0.35467511105450855,65.96699549714343],[0.33855351509748544,65.95768768937788],[0.33855351509748544,65.93907207384677],[0.35467511105450855,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Carlisle","id":"E07000028","lon":-2.80704999,"lat":54.97869873,"q":4,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.98561111267453],[0.43528309083962413,65.99491892044009],[0.43528309083962413,66.01353453597119],[0.419161494882601,66.02284234373674],[0.4030398989255779,66.01353453597119],[0.4030398989255779,65.99491892044009],[0.419161494882601,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Copeland","id":"E07000029","lon":-3.37664008,"lat":54.46620178,"q":3,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.95768768937788],[0.3869183029685548,65.96699549714343],[0.3869183029685548,65.98561111267453],[0.37079670701153167,65.99491892044009],[0.35467511105450855,65.98561111267453],[0.35467511105450855,65.96699549714343],[0.37079670701153167,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Chesterfield","id":"E07000034","lon":-1.40114999,"lat":53.25569916,"q":9,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.79014714959791],[0.5803774544528322,65.79945495736347],[0.5803774544528322,65.81807057289457],[0.5642558584958091,65.82737838066012],[0.5481342625387859,65.81807057289457],[0.5481342625387859,65.79945495736347],[0.5642558584958091,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Derbyshire Dales","id":"E07000035","lon":-1.70711005,"lat":53.12329865,"q":7,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.79014714959791],[0.5158910706247397,65.79945495736347],[0.5158910706247397,65.81807057289457],[0.4997694746677166,65.82737838066012],[0.4836478787106935,65.81807057289457],[0.4836478787106935,65.79945495736347],[0.4997694746677166,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Eden","id":"E07000030","lon":-2.62678003,"lat":54.6310997,"q":5,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.95768768937788],[0.45140468679664725,65.96699549714343],[0.45140468679664725,65.98561111267453],[0.43528309083962413,65.99491892044009],[0.419161494882601,65.98561111267453],[0.419161494882601,65.96699549714343],[0.43528309083962413,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"South Lakeland","id":"E07000031","lon":-2.78108001,"lat":54.29909897,"q":4,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.92976426608122],[0.43528309083962413,65.93907207384677],[0.43528309083962413,65.95768768937788],[0.419161494882601,65.96699549714343],[0.4030398989255779,65.95768768937788],[0.4030398989255779,65.93907207384677],[0.419161494882601,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Amber Valley","id":"E07000032","lon":-1.46219003,"lat":53.02880096,"q":7,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.76222372630126],[0.5320126665817628,65.77153153406681],[0.5320126665817628,65.79014714959791],[0.5158910706247397,65.79945495736347],[0.4997694746677166,65.79014714959791],[0.4997694746677166,65.77153153406681],[0.5158910706247397,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Erewash","id":"E07000036","lon":-1.35090005,"lat":52.9382019,"q":7,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.7343003030046],[0.5158910706247397,65.74360811077015],[0.5158910706247397,65.76222372630126],[0.4997694746677166,65.77153153406681],[0.4836478787106935,65.76222372630126],[0.4836478787106935,65.74360811077015],[0.4997694746677166,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"High Peak","id":"E07000037","lon":-1.84397995,"lat":53.38570023,"q":7,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.81807057289458],[0.5320126665817628,65.82737838066014],[0.5320126665817628,65.84599399619124],[0.5158910706247397,65.85530180395679],[0.4997694746677166,65.84599399619124],[0.4997694746677166,65.82737838066014],[0.5158910706247397,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Exeter","id":"E07000041","lon":-3.51372004,"lat":50.71780014,"q":-1,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.39921922344469],[0.25794553531236986,65.40852703121024],[0.25794553531236986,65.42714264674134],[0.24182393935534674,65.4364504545069],[0.22570234339832362,65.42714264674134],[0.22570234339832362,65.40852703121024],[0.24182393935534674,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Mid Devon","id":"E07000042","lon":-3.59211993,"lat":50.86880112,"q":-1,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.42714264674134],[0.27406713126939297,65.4364504545069],[0.27406713126939297,65.455066070038],[0.25794553531236986,65.46437387780355],[0.24182393935534674,65.455066070038],[0.24182393935534674,65.4364504545069],[0.25794553531236986,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"North Devon","id":"E07000043","lon":-3.92690992,"lat":51.0760994,"q":-1,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.455066070038],[0.25794553531236986,65.46437387780355],[0.25794553531236986,65.48298949333466],[0.24182393935534674,65.49229730110021],[0.22570234339832362,65.48298949333466],[0.22570234339832362,65.46437387780355],[0.24182393935534674,65.455066070038]]]}},{"type":"Feature","properties":{"n":"South Hams","id":"E07000044","lon":-3.81994009,"lat":50.37189865,"q":-2,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,65.34337237685136],[0.22570234339832362,65.35268018461691],[0.22570234339832362,65.37129580014802],[0.2095807474413005,65.38060360791357],[0.1934591514842774,65.37129580014802],[0.1934591514842774,65.35268018461691],[0.2095807474413005,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"North East Derbyshire","id":"E07000038","lon":-1.44253004,"lat":53.16239929,"q":8,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.79014714959791],[0.5481342625387859,65.79945495736347],[0.5481342625387859,65.81807057289457],[0.5320126665817628,65.82737838066012],[0.5158910706247397,65.81807057289457],[0.5158910706247397,65.79945495736347],[0.5320126665817628,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Eastbourne","id":"E07000061","lon":0.258699,"lat":50.77410126,"q":14,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.34337237685136],[0.7415934140230633,65.35268018461691],[0.7415934140230633,65.37129580014802],[0.7254718180660402,65.38060360791357],[0.7093502221090171,65.37129580014802],[0.7093502221090171,65.35268018461691],[0.7254718180660402,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"South Derbyshire","id":"E07000039","lon":-1.53494,"lat":52.82490158,"q":6,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.7343003030046],[0.4836478787106935,65.74360811077015],[0.4836478787106935,65.76222372630126],[0.46752628275367036,65.77153153406681],[0.45140468679664725,65.76222372630126],[0.45140468679664725,65.74360811077015],[0.46752628275367036,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Hastings","id":"E07000062","lon":0.57942897,"lat":50.86769867,"q":14,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.37129580014803],[0.7577150099800865,65.38060360791359],[0.7577150099800865,65.39921922344469],[0.7415934140230633,65.40852703121024],[0.7254718180660402,65.39921922344469],[0.7254718180660402,65.38060360791359],[0.7415934140230633,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"East Devon","id":"E07000040","lon":-3.22380996,"lat":50.75759888,"q":0,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.39921922344469],[0.2901887272264161,65.40852703121024],[0.2901887272264161,65.42714264674134],[0.27406713126939297,65.4364504545069],[0.25794553531236986,65.42714264674134],[0.25794553531236986,65.40852703121024],[0.27406713126939297,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Teignbridge","id":"E07000045","lon":-3.65395999,"lat":50.61019897,"q":-1,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.37129580014803],[0.27406713126939297,65.38060360791359],[0.27406713126939297,65.39921922344469],[0.25794553531236986,65.40852703121024],[0.24182393935534674,65.39921922344469],[0.24182393935534674,65.38060360791359],[0.25794553531236986,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Torridge","id":"E07000046","lon":-4.21730995,"lat":50.90800095,"q":-2,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,65.39921922344469],[0.22570234339832362,65.40852703121024],[0.22570234339832362,65.42714264674134],[0.2095807474413005,65.4364504545069],[0.1934591514842774,65.42714264674134],[0.1934591514842774,65.40852703121024],[0.2095807474413005,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"West Devon","id":"E07000047","lon":-4.03356981,"lat":50.66490173,"q":-2,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.42714264674134],[0.24182393935534674,65.4364504545069],[0.24182393935534674,65.455066070038],[0.22570234339832362,65.46437387780355],[0.2095807474413005,65.455066070038],[0.2095807474413005,65.4364504545069],[0.22570234339832362,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Lewes","id":"E07000063","lon":0.007671,"lat":50.83340073,"q":12,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.34337237685136],[0.6771070301949709,65.35268018461691],[0.6771070301949709,65.37129580014802],[0.6609854342379478,65.38060360791357],[0.6448638382809246,65.37129580014802],[0.6448638382809246,65.35268018461691],[0.6609854342379478,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Enfield","id":"E09000010","lon":-0.08147,"lat":51.64889908,"q":12,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.56675976322464],[0.6771070301949709,65.57606757099019],[0.6771070301949709,65.5946831865213],[0.6609854342379478,65.60399099428685],[0.6448638382809246,65.5946831865213],[0.6448638382809246,65.57606757099019],[0.6609854342379478,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Rother","id":"E07000064","lon":0.543064,"lat":50.94869995,"q":13,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.37129580014803],[0.7254718180660402,65.38060360791359],[0.7254718180660402,65.39921922344469],[0.7093502221090171,65.40852703121024],[0.693228626151994,65.39921922344469],[0.693228626151994,65.38060360791359],[0.7093502221090171,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Wealden","id":"E07000065","lon":0.205153,"lat":50.93320084,"q":13,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.34337237685136],[0.7093502221090171,65.35268018461691],[0.7093502221090171,65.37129580014802],[0.693228626151994,65.38060360791357],[0.6771070301949709,65.37129580014802],[0.6771070301949709,65.35268018461691],[0.693228626151994,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Greenwich","id":"E09000011","lon":0.050108,"lat":51.4640007,"q":14,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.455066070038],[0.7415934140230633,65.46437387780355],[0.7415934140230633,65.48298949333466],[0.7254718180660402,65.49229730110021],[0.7093502221090171,65.48298949333466],[0.7093502221090171,65.46437387780355],[0.7254718180660402,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Braintree","id":"E07000067","lon":0.57591099,"lat":51.91630173,"q":16,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.7899582018941327,65.62260660981796],[0.8060797978511558,65.63191441758352],[0.8060797978511558,65.65053003311462],[0.7899582018941327,65.65983784088017],[0.7738366059371096,65.65053003311462],[0.7738366059371096,65.63191441758352],[0.7899582018941327,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Hackney","id":"E09000012","lon":-0.06045,"lat":51.55490112,"q":13,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.51091291663133],[0.7093502221090171,65.52022072439688],[0.7093502221090171,65.53883633992798],[0.693228626151994,65.54814414769353],[0.6771070301949709,65.53883633992798],[0.6771070301949709,65.52022072439688],[0.693228626151994,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Castle Point","id":"E07000069","lon":0.58808398,"lat":51.56159973,"q":16,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.7899582018941327,65.51091291663133],[0.8060797978511558,65.52022072439688],[0.8060797978511558,65.53883633992798],[0.7899582018941327,65.54814414769353],[0.7738366059371096,65.53883633992798],[0.7738366059371096,65.52022072439688],[0.7899582018941327,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Chelmsford","id":"E07000070","lon":0.49116299,"lat":51.73500061,"q":15,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.59468318652131],[0.7899582018941327,65.60399099428686],[0.7899582018941327,65.62260660981796],[0.7738366059371096,65.63191441758352],[0.7577150099800865,65.62260660981796],[0.7577150099800865,65.60399099428686],[0.7738366059371096,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Colchester","id":"E07000071","lon":0.85977602,"lat":51.8769989,"q":17,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.8222013938081789,65.62260660981796],[0.838322989765202,65.63191441758352],[0.838322989765202,65.65053003311462],[0.8222013938081789,65.65983784088017],[0.8060797978511558,65.65053003311462],[0.8060797978511558,65.63191441758352],[0.8222013938081789,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Epping Forest","id":"E07000072","lon":0.154147,"lat":51.71279907,"q":14,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.53883633992798],[0.7577150099800865,65.54814414769353],[0.7577150099800865,65.56675976322464],[0.7415934140230633,65.57606757099019],[0.7254718180660402,65.56675976322464],[0.7254718180660402,65.54814414769353],[0.7415934140230633,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Harlow","id":"E07000073","lon":0.103888,"lat":51.76610184,"q":15,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.53883633992798],[0.7899582018941327,65.54814414769353],[0.7899582018941327,65.56675976322464],[0.7738366059371096,65.57606757099019],[0.7577150099800865,65.56675976322464],[0.7577150099800865,65.54814414769353],[0.7738366059371096,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Maldon","id":"E07000074","lon":0.773857,"lat":51.77569962,"q":16,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.8060797978511558,65.59468318652131],[0.8222013938081789,65.60399099428686],[0.8222013938081789,65.62260660981796],[0.8060797978511558,65.63191441758352],[0.7899582018941327,65.62260660981796],[0.7899582018941327,65.60399099428686],[0.8060797978511558,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Fareham","id":"E07000087","lon":-1.23741996,"lat":50.85390091,"q":4,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.455066070038],[0.419161494882601,65.46437387780355],[0.419161494882601,65.48298949333466],[0.4030398989255779,65.49229730110021],[0.3869183029685548,65.48298949333466],[0.3869183029685548,65.46437387780355],[0.4030398989255779,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Rochford","id":"E07000075","lon":0.68347299,"lat":51.59090042,"q":17,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.8222013938081789,65.56675976322464],[0.838322989765202,65.57606757099019],[0.838322989765202,65.5946831865213],[0.8222013938081789,65.60399099428685],[0.8060797978511558,65.5946831865213],[0.8060797978511558,65.57606757099019],[0.8222013938081789,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Tendring","id":"E07000076","lon":1.10917997,"lat":51.85689926,"q":16,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.8060797978511558,65.65053003311462],[0.8222013938081789,65.65983784088017],[0.8222013938081789,65.67845345641128],[0.8060797978511558,65.68776126417683],[0.7899582018941327,65.67845345641128],[0.7899582018941327,65.65983784088017],[0.8060797978511558,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Uttlesford","id":"E07000077","lon":0.294485,"lat":51.93590164,"q":15,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.62260660981796],[0.7738366059371096,65.63191441758352],[0.7738366059371096,65.65053003311462],[0.7577150099800865,65.65983784088017],[0.7415934140230633,65.65053003311462],[0.7415934140230633,65.63191441758352],[0.7577150099800865,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Cheltenham","id":"E07000078","lon":-2.07515001,"lat":51.89860153,"q":4,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.53883633992798],[0.43528309083962413,65.54814414769353],[0.43528309083962413,65.56675976322464],[0.419161494882601,65.57606757099019],[0.4030398989255779,65.56675976322464],[0.4030398989255779,65.54814414769353],[0.419161494882601,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Cotswold","id":"E07000079","lon":-1.97059,"lat":51.77249908,"q":3,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.53883633992798],[0.4030398989255779,65.54814414769353],[0.4030398989255779,65.56675976322464],[0.3869183029685548,65.57606757099019],[0.37079670701153167,65.56675976322464],[0.37079670701153167,65.54814414769353],[0.3869183029685548,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Hammersmith and Fulham","id":"E09000013","lon":-0.21736,"lat":51.48740005,"q":9,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.48298949333467],[0.5964990504098553,65.49229730110022],[0.5964990504098553,65.51091291663133],[0.5803774544528322,65.52022072439688],[0.5642558584958091,65.51091291663133],[0.5642558584958091,65.49229730110022],[0.5803774544528322,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Forest of Dean","id":"E07000080","lon":-2.47755003,"lat":51.8125,"q":2,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.59468318652131],[0.37079670701153167,65.60399099428686],[0.37079670701153167,65.62260660981796],[0.35467511105450855,65.63191441758352],[0.33855351509748544,65.62260660981796],[0.33855351509748544,65.60399099428686],[0.35467511105450855,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Gloucester","id":"E07000081","lon":-2.23263001,"lat":51.84640121,"q":2,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.56675976322464],[0.35467511105450855,65.57606757099019],[0.35467511105450855,65.5946831865213],[0.33855351509748544,65.60399099428685],[0.3224319191404623,65.5946831865213],[0.3224319191404623,65.57606757099019],[0.33855351509748544,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Stroud","id":"E07000082","lon":-2.30819988,"lat":51.72000122,"q":2,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.53883633992798],[0.37079670701153167,65.54814414769353],[0.37079670701153167,65.56675976322464],[0.35467511105450855,65.57606757099019],[0.33855351509748544,65.56675976322464],[0.33855351509748544,65.54814414769353],[0.35467511105450855,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Gosport","id":"E07000088","lon":-1.16725004,"lat":50.8064003,"q":4,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.39921922344469],[0.419161494882601,65.40852703121024],[0.419161494882601,65.42714264674134],[0.4030398989255779,65.4364504545069],[0.3869183029685548,65.42714264674134],[0.3869183029685548,65.40852703121024],[0.4030398989255779,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Tewkesbury","id":"E07000083","lon":-2.19998002,"lat":51.93479919,"q":3,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.56675976322464],[0.3869183029685548,65.57606757099019],[0.3869183029685548,65.5946831865213],[0.37079670701153167,65.60399099428685],[0.35467511105450855,65.5946831865213],[0.35467511105450855,65.57606757099019],[0.37079670701153167,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Haringey","id":"E09000014","lon":-0.10667,"lat":51.58769989,"q":12,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.53883633992798],[0.693228626151994,65.54814414769353],[0.693228626151994,65.56675976322464],[0.6771070301949709,65.57606757099019],[0.6609854342379478,65.56675976322464],[0.6609854342379478,65.54814414769353],[0.6771070301949709,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Basingstoke and Deane","id":"E07000084","lon":-1.22020996,"lat":51.25939941,"q":5,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.455066070038],[0.45140468679664725,65.46437387780355],[0.45140468679664725,65.48298949333466],[0.43528309083962413,65.49229730110021],[0.419161494882601,65.48298949333466],[0.419161494882601,65.46437387780355],[0.43528309083962413,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Hart","id":"E07000089","lon":-0.88321,"lat":51.2820015,"q":6,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.455066070038],[0.4836478787106935,65.46437387780355],[0.4836478787106935,65.48298949333466],[0.46752628275367036,65.49229730110021],[0.45140468679664725,65.48298949333466],[0.45140468679664725,65.46437387780355],[0.46752628275367036,65.455066070038]]]}},{"type":"Feature","properties":{"n":"East Hampshire","id":"E07000085","lon":-0.93971002,"lat":51.05770111,"q":5,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.42714264674134],[0.46752628275367036,65.4364504545069],[0.46752628275367036,65.455066070038],[0.45140468679664725,65.46437387780355],[0.43528309083962413,65.455066070038],[0.43528309083962413,65.4364504545069],[0.45140468679664725,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Eastleigh","id":"E07000086","lon":-1.32942998,"lat":50.94869995,"q":3,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.42714264674134],[0.4030398989255779,65.4364504545069],[0.4030398989255779,65.455066070038],[0.3869183029685548,65.46437387780355],[0.37079670701153167,65.455066070038],[0.37079670701153167,65.4364504545069],[0.3869183029685548,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Havant","id":"E07000090","lon":-1.00399995,"lat":50.87229919,"q":6,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.39921922344469],[0.4836478787106935,65.40852703121024],[0.4836478787106935,65.42714264674134],[0.46752628275367036,65.4364504545069],[0.45140468679664725,65.42714264674134],[0.45140468679664725,65.40852703121024],[0.46752628275367036,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"New Forest","id":"E07000091","lon":-1.58936,"lat":50.85749817,"q":2,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.42714264674134],[0.37079670701153167,65.4364504545069],[0.37079670701153167,65.455066070038],[0.35467511105450855,65.46437387780355],[0.33855351509748544,65.455066070038],[0.33855351509748544,65.4364504545069],[0.35467511105450855,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Rushmoor","id":"E07000092","lon":-0.76806998,"lat":51.27809906,"q":7,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.455066070038],[0.5158910706247397,65.46437387780355],[0.5158910706247397,65.48298949333466],[0.4997694746677166,65.49229730110021],[0.4836478787106935,65.48298949333466],[0.4836478787106935,65.46437387780355],[0.4997694746677166,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Watford","id":"E07000103","lon":-0.40428999,"lat":51.67169952,"q":11,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.59468318652131],[0.6609854342379478,65.60399099428686],[0.6609854342379478,65.62260660981796],[0.6448638382809246,65.63191441758352],[0.6287422423239015,65.62260660981796],[0.6287422423239015,65.60399099428686],[0.6448638382809246,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Test Valley","id":"E07000093","lon":-1.50214005,"lat":51.13420105,"q":3,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.48298949333467],[0.4030398989255779,65.49229730110022],[0.4030398989255779,65.51091291663133],[0.3869183029685548,65.52022072439688],[0.37079670701153167,65.51091291663133],[0.37079670701153167,65.49229730110022],[0.3869183029685548,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Harrow","id":"E09000015","lon":-0.33603001,"lat":51.59469986,"q":10,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.56675976322464],[0.6126206463668784,65.57606757099019],[0.6126206463668784,65.5946831865213],[0.5964990504098553,65.60399099428685],[0.5803774544528322,65.5946831865213],[0.5803774544528322,65.57606757099019],[0.5964990504098553,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Winchester","id":"E07000094","lon":-1.24392998,"lat":51.02999878,"q":4,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.42714264674134],[0.43528309083962413,65.4364504545069],[0.43528309083962413,65.455066070038],[0.419161494882601,65.46437387780355],[0.4030398989255779,65.455066070038],[0.4030398989255779,65.4364504545069],[0.419161494882601,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Broxbourne","id":"E07000095","lon":-0.05073,"lat":51.72079849,"q":14,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.56675976322464],[0.7415934140230633,65.57606757099019],[0.7415934140230633,65.5946831865213],[0.7254718180660402,65.60399099428685],[0.7093502221090171,65.5946831865213],[0.7093502221090171,65.57606757099019],[0.7254718180660402,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Dacorum","id":"E07000096","lon":-0.55097997,"lat":51.76850128,"q":11,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.62260660981796],[0.6448638382809246,65.63191441758352],[0.6448638382809246,65.65053003311462],[0.6287422423239015,65.65983784088017],[0.6126206463668784,65.65053003311462],[0.6126206463668784,65.63191441758352],[0.6287422423239015,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Hertsmere","id":"E07000098","lon":-0.26899001,"lat":51.68019867,"q":12,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.59468318652131],[0.693228626151994,65.60399099428686],[0.693228626151994,65.62260660981796],[0.6771070301949709,65.63191441758352],[0.6609854342379478,65.62260660981796],[0.6609854342379478,65.60399099428686],[0.6771070301949709,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Burnley","id":"E07000117","lon":-2.23079991,"lat":53.77410126,"q":6,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.8739174194879],[0.4997694746677166,65.88322522725345],[0.4997694746677166,65.90184084278455],[0.4836478787106935,65.9111486505501],[0.46752628275367036,65.90184084278455],[0.46752628275367036,65.88322522725345],[0.4836478787106935,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"North Hertfordshire","id":"E07000099","lon":-0.22314,"lat":51.95740128,"q":13,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.62260660981796],[0.7093502221090171,65.63191441758352],[0.7093502221090171,65.65053003311462],[0.693228626151994,65.65983784088017],[0.6771070301949709,65.65053003311462],[0.6771070301949709,65.63191441758352],[0.693228626151994,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Three Rivers","id":"E07000102","lon":-0.45005,"lat":51.65629959,"q":10,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.59468318652131],[0.6287422423239015,65.60399099428686],[0.6287422423239015,65.62260660981796],[0.6126206463668784,65.63191441758352],[0.5964990504098553,65.62260660981796],[0.5964990504098553,65.60399099428686],[0.6126206463668784,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Ashford","id":"E07000105","lon":0.82337397,"lat":51.13100052,"q":15,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.39921922344469],[0.7738366059371096,65.40852703121024],[0.7738366059371096,65.42714264674134],[0.7577150099800865,65.4364504545069],[0.7415934140230633,65.42714264674134],[0.7415934140230633,65.40852703121024],[0.7577150099800865,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Pendle","id":"E07000122","lon":-2.18956995,"lat":53.88639832,"q":6,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.90184084278455],[0.4836478787106935,65.9111486505501],[0.4836478787106935,65.92976426608121],[0.46752628275367036,65.93907207384676],[0.45140468679664725,65.92976426608121],[0.45140468679664725,65.9111486505501],[0.46752628275367036,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Canterbury","id":"E07000106","lon":1.09625995,"lat":51.28099823,"q":16,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.7899582018941327,65.39921922344469],[0.8060797978511558,65.40852703121024],[0.8060797978511558,65.42714264674134],[0.7899582018941327,65.4364504545069],[0.7738366059371096,65.42714264674134],[0.7738366059371096,65.40852703121024],[0.7899582018941327,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Dartford","id":"E07000107","lon":0.245276,"lat":51.43370056,"q":15,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.455066070038],[0.7738366059371096,65.46437387780355],[0.7738366059371096,65.48298949333466],[0.7577150099800865,65.49229730110021],[0.7415934140230633,65.48298949333466],[0.7415934140230633,65.46437387780355],[0.7577150099800865,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Dover","id":"E07000108","lon":1.27692997,"lat":51.21170044,"q":17,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.8222013938081789,65.39921922344469],[0.838322989765202,65.40852703121024],[0.838322989765202,65.42714264674134],[0.8222013938081789,65.4364504545069],[0.8060797978511558,65.42714264674134],[0.8060797978511558,65.40852703121024],[0.8222013938081789,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Gravesham","id":"E07000109","lon":0.39874399,"lat":51.39649963,"q":16,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.7899582018941327,65.455066070038],[0.8060797978511558,65.46437387780355],[0.8060797978511558,65.48298949333466],[0.7899582018941327,65.49229730110021],[0.7738366059371096,65.48298949333466],[0.7738366059371096,65.46437387780355],[0.7899582018941327,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Maidstone","id":"E07000110","lon":0.58406103,"lat":51.2356987,"q":15,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.42714264674134],[0.7899582018941327,65.4364504545069],[0.7899582018941327,65.455066070038],[0.7738366059371096,65.46437387780355],[0.7577150099800865,65.455066070038],[0.7577150099800865,65.4364504545069],[0.7738366059371096,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Preston","id":"E07000123","lon":-2.71816993,"lat":53.8219986,"q":5,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.90184084278455],[0.45140468679664725,65.9111486505501],[0.45140468679664725,65.92976426608121],[0.43528309083962413,65.93907207384676],[0.419161494882601,65.92976426608121],[0.419161494882601,65.9111486505501],[0.43528309083962413,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Sevenoaks","id":"E07000111","lon":0.188936,"lat":51.27560043,"q":13,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.39921922344469],[0.7093502221090171,65.40852703121024],[0.7093502221090171,65.42714264674134],[0.693228626151994,65.4364504545069],[0.6771070301949709,65.42714264674134],[0.6771070301949709,65.40852703121024],[0.693228626151994,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Welwyn Hatfield","id":"E07000241","lon":-0.18517999,"lat":51.76089859,"q":13,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.59468318652131],[0.7254718180660402,65.60399099428686],[0.7254718180660402,65.62260660981796],[0.7093502221090171,65.63191441758352],[0.693228626151994,65.62260660981796],[0.693228626151994,65.60399099428686],[0.7093502221090171,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Folkestone and Hythe","id":"E07000112","lon":1.00080001,"lat":51.07220078,"q":15,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.37129580014803],[0.7899582018941327,65.38060360791359],[0.7899582018941327,65.39921922344469],[0.7738366059371096,65.40852703121024],[0.7577150099800865,65.39921922344469],[0.7577150099800865,65.38060360791359],[0.7738366059371096,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Swale","id":"E07000113","lon":0.77952999,"lat":51.32389832,"q":17,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.8222013938081789,65.455066070038],[0.838322989765202,65.46437387780355],[0.838322989765202,65.48298949333466],[0.8222013938081789,65.49229730110021],[0.8060797978511558,65.48298949333466],[0.8060797978511558,65.46437387780355],[0.8222013938081789,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Thanet","id":"E07000114","lon":1.3283,"lat":51.35250092,"q":17,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.838322989765202,65.42714264674134],[0.8544445857222251,65.4364504545069],[0.8544445857222251,65.455066070038],[0.838322989765202,65.46437387780355],[0.8222013938081789,65.455066070038],[0.8222013938081789,65.4364504545069],[0.838322989765202,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Tonbridge and Malling","id":"E07000115","lon":0.34930599,"lat":51.26060104,"q":14,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.42714264674134],[0.7577150099800865,65.4364504545069],[0.7577150099800865,65.455066070038],[0.7415934140230633,65.46437387780355],[0.7254718180660402,65.455066070038],[0.7254718180660402,65.4364504545069],[0.7415934140230633,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Rochdale","id":"E08000005","lon":-2.14784002,"lat":53.60739899,"q":7,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.84599399619124],[0.5158910706247397,65.85530180395679],[0.5158910706247397,65.8739174194879],[0.4997694746677166,65.88322522725345],[0.4836478787106935,65.8739174194879],[0.4836478787106935,65.85530180395679],[0.4997694746677166,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Tunbridge Wells","id":"E07000116","lon":0.471632,"lat":51.10250092,"q":14,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.39921922344469],[0.7415934140230633,65.40852703121024],[0.7415934140230633,65.42714264674134],[0.7254718180660402,65.4364504545069],[0.7093502221090171,65.42714264674134],[0.7093502221090171,65.40852703121024],[0.7254718180660402,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Chorley","id":"E07000118","lon":-2.61921,"lat":53.67240143,"q":3,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.84599399619124],[0.3869183029685548,65.85530180395679],[0.3869183029685548,65.8739174194879],[0.37079670701153167,65.88322522725345],[0.35467511105450855,65.8739174194879],[0.35467511105450855,65.85530180395679],[0.37079670701153167,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"South Ribble","id":"E07000126","lon":-2.72872996,"lat":53.72669983,"q":3,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.8739174194879],[0.4030398989255779,65.88322522725345],[0.4030398989255779,65.90184084278455],[0.3869183029685548,65.9111486505501],[0.37079670701153167,65.90184084278455],[0.37079670701153167,65.88322522725345],[0.3869183029685548,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Fylde","id":"E07000119","lon":-2.91901994,"lat":53.79710007,"q":4,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.90184084278455],[0.419161494882601,65.9111486505501],[0.419161494882601,65.92976426608121],[0.4030398989255779,65.93907207384676],[0.3869183029685548,65.92976426608121],[0.3869183029685548,65.9111486505501],[0.4030398989255779,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Hyndburn","id":"E07000120","lon":-2.38964009,"lat":53.75650024,"q":5,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.8739174194879],[0.46752628275367036,65.88322522725345],[0.46752628275367036,65.90184084278455],[0.45140468679664725,65.9111486505501],[0.43528309083962413,65.90184084278455],[0.43528309083962413,65.88322522725345],[0.45140468679664725,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Lancaster","id":"E07000121","lon":-2.66030002,"lat":54.07899857,"q":3,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.92976426608122],[0.4030398989255779,65.93907207384677],[0.4030398989255779,65.95768768937788],[0.3869183029685548,65.96699549714343],[0.37079670701153167,65.95768768937788],[0.37079670701153167,65.93907207384677],[0.3869183029685548,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Salford","id":"E08000006","lon":-2.38485003,"lat":53.47930145,"q":4,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.81807057289458],[0.43528309083962413,65.82737838066014],[0.43528309083962413,65.84599399619124],[0.419161494882601,65.85530180395679],[0.4030398989255779,65.84599399619124],[0.4030398989255779,65.82737838066014],[0.419161494882601,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Ribble Valley","id":"E07000124","lon":-2.41739988,"lat":53.92449951,"q":5,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.92976426608122],[0.46752628275367036,65.93907207384677],[0.46752628275367036,65.95768768937788],[0.45140468679664725,65.96699549714343],[0.43528309083962413,65.95768768937788],[0.43528309083962413,65.93907207384677],[0.45140468679664725,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Rossendale","id":"E07000125","lon":-2.26149011,"lat":53.68479919,"q":6,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.84599399619124],[0.4836478787106935,65.85530180395679],[0.4836478787106935,65.8739174194879],[0.46752628275367036,65.88322522725345],[0.45140468679664725,65.8739174194879],[0.45140468679664725,65.85530180395679],[0.46752628275367036,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"West Lancashire","id":"E07000127","lon":-2.8689301,"lat":53.6128006,"q":2,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.81807057289458],[0.37079670701153167,65.82737838066014],[0.37079670701153167,65.84599399619124],[0.35467511105450855,65.85530180395679],[0.33855351509748544,65.84599399619124],[0.33855351509748544,65.82737838066014],[0.35467511105450855,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Lewisham","id":"E09000023","lon":-0.01733,"lat":51.44229889,"q":13,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.455066070038],[0.7093502221090171,65.46437387780355],[0.7093502221090171,65.48298949333466],[0.693228626151994,65.49229730110021],[0.6771070301949709,65.48298949333466],[0.6771070301949709,65.46437387780355],[0.693228626151994,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Wyre","id":"E07000128","lon":-2.80462003,"lat":53.89989853,"q":3,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.90184084278455],[0.3869183029685548,65.9111486505501],[0.3869183029685548,65.92976426608121],[0.37079670701153167,65.93907207384676],[0.35467511105450855,65.92976426608121],[0.35467511105450855,65.9111486505501],[0.37079670701153167,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Blaby","id":"E07000129","lon":-1.19886994,"lat":52.57709885,"q":8,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.62260660981796],[0.5481342625387859,65.63191441758352],[0.5481342625387859,65.65053003311462],[0.5320126665817628,65.65983784088017],[0.5158910706247397,65.65053003311462],[0.5158910706247397,65.63191441758352],[0.5320126665817628,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Charnwood","id":"E07000130","lon":-1.13694,"lat":52.73989868,"q":8,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.67845345641128],[0.5481342625387859,65.68776126417683],[0.5481342625387859,65.70637687970793],[0.5320126665817628,65.71568468747348],[0.5158910706247397,65.70637687970793],[0.5158910706247397,65.68776126417683],[0.5320126665817628,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Harborough","id":"E07000131","lon":-0.90228999,"lat":52.53770065,"q":8,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.59468318652131],[0.5642558584958091,65.60399099428686],[0.5642558584958091,65.62260660981796],[0.5481342625387859,65.63191441758352],[0.5320126665817628,65.62260660981796],[0.5320126665817628,65.60399099428686],[0.5481342625387859,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Hinckley and Bosworth","id":"E07000132","lon":-1.41754997,"lat":52.60879898,"q":7,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.67845345641128],[0.5158910706247397,65.68776126417683],[0.5158910706247397,65.70637687970793],[0.4997694746677166,65.71568468747348],[0.4836478787106935,65.70637687970793],[0.4836478787106935,65.68776126417683],[0.4997694746677166,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"North West Leicestershire","id":"E07000134","lon":-1.42209005,"lat":52.74250031,"q":6,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.70637687970795],[0.4997694746677166,65.7156846874735],[0.4997694746677166,65.7343003030046],[0.4836478787106935,65.74360811077015],[0.46752628275367036,65.7343003030046],[0.46752628275367036,65.7156846874735],[0.4836478787106935,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Melton","id":"E07000133","lon":-0.85439998,"lat":52.80329895,"q":10,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.7343003030046],[0.6126206463668784,65.74360811077015],[0.6126206463668784,65.76222372630126],[0.5964990504098553,65.77153153406681],[0.5803774544528322,65.76222372630126],[0.5803774544528322,65.74360811077015],[0.5964990504098553,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Oadby and Wigston","id":"E07000135","lon":-1.09300005,"lat":52.58869934,"q":8,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.65053003311462],[0.5642558584958091,65.65983784088017],[0.5642558584958091,65.67845345641128],[0.5481342625387859,65.68776126417683],[0.5320126665817628,65.67845345641128],[0.5320126665817628,65.65983784088017],[0.5481342625387859,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Merton","id":"E09000024","lon":-0.18866999,"lat":51.41059875,"q":10,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.42714264674134],[0.6287422423239015,65.4364504545069],[0.6287422423239015,65.455066070038],[0.6126206463668784,65.46437387780355],[0.5964990504098553,65.455066070038],[0.5964990504098553,65.4364504545069],[0.6126206463668784,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Boston","id":"E07000136","lon":-0.11218,"lat":52.97790146,"q":12,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.79014714959791],[0.6771070301949709,65.79945495736347],[0.6771070301949709,65.81807057289457],[0.6609854342379478,65.82737838066012],[0.6448638382809246,65.81807057289457],[0.6448638382809246,65.79945495736347],[0.6609854342379478,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"East Lindsey","id":"E07000137","lon":0.020549,"lat":53.26480103,"q":11,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.81807057289458],[0.6609854342379478,65.82737838066014],[0.6609854342379478,65.84599399619124],[0.6448638382809246,65.85530180395679],[0.6287422423239015,65.84599399619124],[0.6287422423239015,65.82737838066014],[0.6448638382809246,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Lincoln","id":"E07000138","lon":-0.55848002,"lat":53.21920013,"q":11,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.79014714959791],[0.6448638382809246,65.79945495736347],[0.6448638382809246,65.81807057289457],[0.6287422423239015,65.82737838066012],[0.6126206463668784,65.81807057289457],[0.6126206463668784,65.79945495736347],[0.6287422423239015,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"St. Helens","id":"E08000013","lon":-2.70309997,"lat":53.45859909,"q":3,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.79014714959791],[0.3869183029685548,65.79945495736347],[0.3869183029685548,65.81807057289457],[0.37079670701153167,65.82737838066012],[0.35467511105450855,65.81807057289457],[0.35467511105450855,65.79945495736347],[0.37079670701153167,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"North Kesteven","id":"E07000139","lon":-0.47670001,"lat":53.08060074,"q":11,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.76222372630126],[0.6609854342379478,65.77153153406681],[0.6609854342379478,65.79014714959791],[0.6448638382809246,65.79945495736347],[0.6287422423239015,65.79014714959791],[0.6287422423239015,65.77153153406681],[0.6448638382809246,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Corby","id":"E07000150","lon":-0.7069,"lat":52.50699997,"q":11,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.70637687970795],[0.6609854342379478,65.7156846874735],[0.6609854342379478,65.7343003030046],[0.6448638382809246,65.74360811077015],[0.6287422423239015,65.7343003030046],[0.6287422423239015,65.7156846874735],[0.6448638382809246,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"South Holland","id":"E07000140","lon":-0.03058,"lat":52.78760147,"q":12,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.7343003030046],[0.6771070301949709,65.74360811077015],[0.6771070301949709,65.76222372630126],[0.6609854342379478,65.77153153406681],[0.6448638382809246,65.76222372630126],[0.6448638382809246,65.74360811077015],[0.6609854342379478,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Ashfield","id":"E07000170","lon":-1.25422001,"lat":53.09749985,"q":9,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.76222372630126],[0.5964990504098553,65.77153153406681],[0.5964990504098553,65.79014714959791],[0.5803774544528322,65.79945495736347],[0.5642558584958091,65.79014714959791],[0.5642558584958091,65.77153153406681],[0.5803774544528322,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"South Kesteven","id":"E07000141","lon":-0.49564999,"lat":52.84889984,"q":11,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.7343003030046],[0.6448638382809246,65.74360811077015],[0.6448638382809246,65.76222372630126],[0.6287422423239015,65.77153153406681],[0.6126206463668784,65.76222372630126],[0.6126206463668784,65.74360811077015],[0.6287422423239015,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Gedling","id":"E07000173","lon":-1.11907005,"lat":53.02429962,"q":9,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.70637687970795],[0.5964990504098553,65.7156846874735],[0.5964990504098553,65.7343003030046],[0.5803774544528322,65.74360811077015],[0.5642558584958091,65.7343003030046],[0.5642558584958091,65.7156846874735],[0.5803774544528322,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"West Lindsey","id":"E07000142","lon":-0.50774002,"lat":53.40039825,"q":10,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.81807057289458],[0.6287422423239015,65.82737838066014],[0.6287422423239015,65.84599399619124],[0.6126206463668784,65.85530180395679],[0.5964990504098553,65.84599399619124],[0.5964990504098553,65.82737838066014],[0.6126206463668784,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Breckland","id":"E07000143","lon":0.81871599,"lat":52.59420013,"q":15,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.7343003030046],[0.7738366059371096,65.74360811077015],[0.7738366059371096,65.76222372630126],[0.7577150099800865,65.77153153406681],[0.7415934140230633,65.76222372630126],[0.7415934140230633,65.74360811077015],[0.7577150099800865,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Broadland","id":"E07000144","lon":1.25232995,"lat":52.69620132,"q":16,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.7899582018941327,65.7343003030046],[0.8060797978511558,65.74360811077015],[0.8060797978511558,65.76222372630126],[0.7899582018941327,65.77153153406681],[0.7738366059371096,65.76222372630126],[0.7738366059371096,65.74360811077015],[0.7899582018941327,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Great Yarmouth","id":"E07000145","lon":1.64950001,"lat":52.68439865,"q":15,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.76222372630126],[0.7899582018941327,65.77153153406681],[0.7899582018941327,65.79014714959791],[0.7738366059371096,65.79945495736347],[0.7577150099800865,65.79014714959791],[0.7577150099800865,65.77153153406681],[0.7738366059371096,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"King's Lynn and West Norfolk","id":"E07000146","lon":0.53325802,"lat":52.71279907,"q":14,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.7343003030046],[0.7415934140230633,65.74360811077015],[0.7415934140230633,65.76222372630126],[0.7254718180660402,65.77153153406681],[0.7093502221090171,65.76222372630126],[0.7093502221090171,65.74360811077015],[0.7254718180660402,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"North Norfolk","id":"E07000147","lon":1.13218999,"lat":52.83380127,"q":14,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.76222372630126],[0.7577150099800865,65.77153153406681],[0.7577150099800865,65.79014714959791],[0.7415934140230633,65.79945495736347],[0.7254718180660402,65.79014714959791],[0.7254718180660402,65.77153153406681],[0.7415934140230633,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Norwich","id":"E07000148","lon":1.28498006,"lat":52.64009857,"q":15,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.70637687970795],[0.7899582018941327,65.7156846874735],[0.7899582018941327,65.7343003030046],[0.7738366059371096,65.74360811077015],[0.7577150099800865,65.7343003030046],[0.7577150099800865,65.7156846874735],[0.7738366059371096,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"South Norfolk","id":"E07000149","lon":1.37325001,"lat":52.5121994,"q":15,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.67845345641128],[0.7738366059371096,65.68776126417683],[0.7738366059371096,65.70637687970793],[0.7577150099800865,65.71568468747348],[0.7415934140230633,65.70637687970793],[0.7415934140230633,65.68776126417683],[0.7577150099800865,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Daventry","id":"E07000151","lon":-1.01446998,"lat":52.30989838,"q":9,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.62260660981796],[0.5803774544528322,65.63191441758352],[0.5803774544528322,65.65053003311462],[0.5642558584958091,65.65983784088017],[0.5481342625387859,65.65053003311462],[0.5481342625387859,65.63191441758352],[0.5642558584958091,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"East Northamptonshire","id":"E07000152","lon":-0.50919998,"lat":52.47909927,"q":12,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.70637687970795],[0.693228626151994,65.7156846874735],[0.693228626151994,65.7343003030046],[0.6771070301949709,65.74360811077015],[0.6609854342379478,65.7343003030046],[0.6609854342379478,65.7156846874735],[0.6771070301949709,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Mansfield","id":"E07000174","lon":-1.17804003,"lat":53.16699982,"q":9,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.7343003030046],[0.5803774544528322,65.74360811077015],[0.5803774544528322,65.76222372630126],[0.5642558584958091,65.77153153406681],[0.5481342625387859,65.76222372630126],[0.5481342625387859,65.74360811077015],[0.5642558584958091,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Kettering","id":"E07000153","lon":-0.76773,"lat":52.43719864,"q":10,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.70637687970795],[0.6287422423239015,65.7156846874735],[0.6287422423239015,65.7343003030046],[0.6126206463668784,65.74360811077015],[0.5964990504098553,65.7343003030046],[0.5964990504098553,65.7156846874735],[0.6126206463668784,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Northampton","id":"E07000154","lon":-0.88121003,"lat":52.2378006,"q":10,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.67845345641128],[0.6126206463668784,65.68776126417683],[0.6126206463668784,65.70637687970793],[0.5964990504098553,65.71568468747348],[0.5803774544528322,65.70637687970793],[0.5803774544528322,65.68776126417683],[0.5964990504098553,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"South Northamptonshire","id":"E07000155","lon":-1.08129001,"lat":52.11840057,"q":9,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.65053003311462],[0.5964990504098553,65.65983784088017],[0.5964990504098553,65.67845345641128],[0.5803774544528322,65.68776126417683],[0.5642558584958091,65.67845345641128],[0.5642558584958091,65.65983784088017],[0.5803774544528322,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Wellingborough","id":"E07000156","lon":-0.71425003,"lat":52.29259872,"q":11,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.67845345641128],[0.6448638382809246,65.68776126417683],[0.6448638382809246,65.70637687970793],[0.6287422423239015,65.71568468747348],[0.6126206463668784,65.70637687970793],[0.6126206463668784,65.68776126417683],[0.6287422423239015,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Craven","id":"E07000163","lon":-2.16167998,"lat":54.05379868,"q":6,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.92976426608122],[0.4997694746677166,65.93907207384677],[0.4997694746677166,65.95768768937788],[0.4836478787106935,65.96699549714343],[0.46752628275367036,65.95768768937788],[0.46752628275367036,65.93907207384677],[0.4836478787106935,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Hambleton","id":"E07000164","lon":-1.34048998,"lat":54.30870056,"q":10,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.92976426608122],[0.6287422423239015,65.93907207384677],[0.6287422423239015,65.95768768937788],[0.6126206463668784,65.96699549714343],[0.5964990504098553,65.95768768937788],[0.5964990504098553,65.93907207384677],[0.6126206463668784,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Oxford","id":"E07000178","lon":-1.24405003,"lat":51.75360107,"q":6,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.51091291663133],[0.4836478787106935,65.52022072439688],[0.4836478787106935,65.53883633992798],[0.46752628275367036,65.54814414769353],[0.45140468679664725,65.53883633992798],[0.45140468679664725,65.52022072439688],[0.46752628275367036,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Harrogate","id":"E07000165","lon":-1.58160996,"lat":54.07709885,"q":8,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.92976426608122],[0.5642558584958091,65.93907207384677],[0.5642558584958091,65.95768768937788],[0.5481342625387859,65.96699549714343],[0.5320126665817628,65.95768768937788],[0.5320126665817628,65.93907207384677],[0.5481342625387859,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Richmondshire","id":"E07000166","lon":-1.98552001,"lat":54.35760117,"q":7,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.92976426608122],[0.5320126665817628,65.93907207384677],[0.5320126665817628,65.95768768937788],[0.5158910706247397,65.96699549714343],[0.4997694746677166,65.95768768937788],[0.4997694746677166,65.93907207384677],[0.5158910706247397,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Cannock Chase","id":"E07000192","lon":-1.98276997,"lat":52.7016983,"q":4,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.70637687970795],[0.43528309083962413,65.7156846874735],[0.43528309083962413,65.7343003030046],[0.419161494882601,65.74360811077015],[0.4030398989255779,65.7343003030046],[0.4030398989255779,65.7156846874735],[0.419161494882601,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Ryedale","id":"E07000167","lon":-0.84276998,"lat":54.20019913,"q":10,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.90184084278455],[0.6126206463668784,65.9111486505501],[0.6126206463668784,65.92976426608121],[0.5964990504098553,65.93907207384676],[0.5803774544528322,65.92976426608121],[0.5803774544528322,65.9111486505501],[0.5964990504098553,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Scarborough","id":"E07000168","lon":-0.52780002,"lat":54.3465004,"q":10,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.95768768937788],[0.6126206463668784,65.96699549714343],[0.6126206463668784,65.98561111267453],[0.5964990504098553,65.99491892044009],[0.5803774544528322,65.98561111267453],[0.5803774544528322,65.96699549714343],[0.5964990504098553,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Selby","id":"E07000169","lon":-1.12908006,"lat":53.73329926,"q":9,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.90184084278455],[0.5803774544528322,65.9111486505501],[0.5803774544528322,65.92976426608121],[0.5642558584958091,65.93907207384676],[0.5481342625387859,65.92976426608121],[0.5481342625387859,65.9111486505501],[0.5642558584958091,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Bassetlaw","id":"E07000171","lon":-0.97869998,"lat":53.35599899,"q":10,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.79014714959791],[0.6126206463668784,65.79945495736347],[0.6126206463668784,65.81807057289457],[0.5964990504098553,65.82737838066012],[0.5803774544528322,65.81807057289457],[0.5803774544528322,65.79945495736347],[0.5964990504098553,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Broxtowe","id":"E07000172","lon":-1.25943995,"lat":52.9720993,"q":8,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.7343003030046],[0.5481342625387859,65.74360811077015],[0.5481342625387859,65.76222372630126],[0.5320126665817628,65.77153153406681],[0.5158910706247397,65.76222372630126],[0.5158910706247397,65.74360811077015],[0.5320126665817628,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Newark and Sherwood","id":"E07000175","lon":-0.94643003,"lat":53.10960007,"q":10,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.76222372630126],[0.6287422423239015,65.77153153406681],[0.6287422423239015,65.79014714959791],[0.6126206463668784,65.79945495736347],[0.5964990504098553,65.79014714959791],[0.5964990504098553,65.77153153406681],[0.6126206463668784,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Ipswich","id":"E07000202","lon":1.16327,"lat":52.05789948,"q":17,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.8222013938081789,65.67845345641128],[0.838322989765202,65.68776126417683],[0.838322989765202,65.70637687970793],[0.8222013938081789,65.71568468747348],[0.8060797978511558,65.70637687970793],[0.8060797978511558,65.68776126417683],[0.8222013938081789,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Rushcliffe","id":"E07000176","lon":-1.01097,"lat":52.91239929,"q":7,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.70637687970795],[0.5320126665817628,65.7156846874735],[0.5320126665817628,65.7343003030046],[0.5158910706247397,65.74360811077015],[0.4997694746677166,65.7343003030046],[0.4997694746677166,65.7156846874735],[0.5158910706247397,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Elmbridge","id":"E07000207","lon":-0.39441001,"lat":51.36100006,"q":8,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.42714264674134],[0.5642558584958091,65.4364504545069],[0.5642558584958091,65.455066070038],[0.5481342625387859,65.46437387780355],[0.5320126665817628,65.455066070038],[0.5320126665817628,65.4364504545069],[0.5481342625387859,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Epsom and Ewell","id":"E07000208","lon":-0.26172,"lat":51.33950043,"q":10,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.39921922344469],[0.6126206463668784,65.40852703121024],[0.6126206463668784,65.42714264674134],[0.5964990504098553,65.4364504545069],[0.5803774544528322,65.42714264674134],[0.5803774544528322,65.40852703121024],[0.5964990504098553,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Cherwell","id":"E07000177","lon":-1.28506005,"lat":51.8871994,"q":7,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.59468318652131],[0.5320126665817628,65.60399099428686],[0.5320126665817628,65.62260660981796],[0.5158910706247397,65.63191441758352],[0.4997694746677166,65.62260660981796],[0.4997694746677166,65.60399099428686],[0.5158910706247397,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"South Oxfordshire","id":"E07000179","lon":-1.07846999,"lat":51.6228981,"q":6,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.53883633992798],[0.4997694746677166,65.54814414769353],[0.4997694746677166,65.56675976322464],[0.4836478787106935,65.57606757099019],[0.46752628275367036,65.56675976322464],[0.46752628275367036,65.54814414769353],[0.4836478787106935,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Vale of White Horse","id":"E07000180","lon":-1.48543,"lat":51.65439987,"q":5,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.51091291663133],[0.45140468679664725,65.52022072439688],[0.45140468679664725,65.53883633992798],[0.43528309083962413,65.54814414769353],[0.419161494882601,65.53883633992798],[0.419161494882601,65.52022072439688],[0.43528309083962413,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Runnymede","id":"E07000212","lon":-0.53855002,"lat":51.3927002,"q":8,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.51091291663133],[0.5481342625387859,65.52022072439688],[0.5481342625387859,65.53883633992798],[0.5320126665817628,65.54814414769353],[0.5158910706247397,65.53883633992798],[0.5158910706247397,65.52022072439688],[0.5320126665817628,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"West Oxfordshire","id":"E07000181","lon":-1.50292003,"lat":51.83990097,"q":5,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.53883633992798],[0.46752628275367036,65.54814414769353],[0.46752628275367036,65.56675976322464],[0.45140468679664725,65.57606757099019],[0.43528309083962413,65.56675976322464],[0.43528309083962413,65.54814414769353],[0.45140468679664725,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Spelthorne","id":"E07000213","lon":-0.46254,"lat":51.41550064,"q":8,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.48298949333467],[0.5642558584958091,65.49229730110022],[0.5642558584958091,65.51091291663133],[0.5481342625387859,65.52022072439688],[0.5320126665817628,65.51091291663133],[0.5320126665817628,65.49229730110022],[0.5481342625387859,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Mendip","id":"E07000187","lon":-2.54177999,"lat":51.19480133,"q":2,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.455066070038],[0.35467511105450855,65.46437387780355],[0.35467511105450855,65.48298949333466],[0.33855351509748544,65.49229730110021],[0.3224319191404623,65.48298949333466],[0.3224319191404623,65.46437387780355],[0.33855351509748544,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Sedgemoor","id":"E07000188","lon":-2.88250995,"lat":51.19179916,"q":0,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.48298949333467],[0.3063103231834392,65.49229730110022],[0.3063103231834392,65.51091291663133],[0.2901887272264161,65.52022072439688],[0.27406713126939297,65.51091291663133],[0.27406713126939297,65.49229730110022],[0.2901887272264161,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"South Somerset","id":"E07000189","lon":-2.7758801,"lat":50.98400116,"q":1,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.455066070038],[0.3224319191404623,65.46437387780355],[0.3224319191404623,65.48298949333466],[0.3063103231834392,65.49229730110021],[0.2901887272264161,65.48298949333466],[0.2901887272264161,65.46437387780355],[0.3063103231834392,65.455066070038]]]}},{"type":"Feature","properties":{"n":"East Staffordshire","id":"E07000193","lon":-1.81438005,"lat":52.83649826,"q":5,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.76222372630126],[0.46752628275367036,65.77153153406681],[0.46752628275367036,65.79014714959791],[0.45140468679664725,65.79945495736347],[0.43528309083962413,65.79014714959791],[0.43528309083962413,65.77153153406681],[0.45140468679664725,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Lichfield","id":"E07000194","lon":-1.76048994,"lat":52.69620132,"q":5,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.70637687970795],[0.46752628275367036,65.7156846874735],[0.46752628275367036,65.7343003030046],[0.45140468679664725,65.74360811077015],[0.43528309083962413,65.7343003030046],[0.43528309083962413,65.7156846874735],[0.45140468679664725,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Surrey Heath","id":"E07000214","lon":-0.68985999,"lat":51.33610153,"q":7,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.48298949333467],[0.5320126665817628,65.49229730110022],[0.5320126665817628,65.51091291663133],[0.5158910706247397,65.52022072439688],[0.4997694746677166,65.51091291663133],[0.4997694746677166,65.49229730110022],[0.5158910706247397,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Newham","id":"E09000025","lon":0.027369,"lat":51.53129959,"q":13,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.48298949333467],[0.7254718180660402,65.49229730110022],[0.7254718180660402,65.51091291663133],[0.7093502221090171,65.52022072439688],[0.693228626151994,65.51091291663133],[0.693228626151994,65.49229730110022],[0.7093502221090171,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Newcastle-under-Lyme","id":"E07000195","lon":-2.32630992,"lat":53.0033989,"q":3,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.7343003030046],[0.3869183029685548,65.74360811077015],[0.3869183029685548,65.76222372630126],[0.37079670701153167,65.77153153406681],[0.35467511105450855,65.76222372630126],[0.35467511105450855,65.74360811077015],[0.37079670701153167,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Tandridge","id":"E07000215","lon":-0.04805,"lat":51.2358017,"q":12,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.37129580014803],[0.693228626151994,65.38060360791359],[0.693228626151994,65.39921922344469],[0.6771070301949709,65.40852703121024],[0.6609854342379478,65.39921922344469],[0.6609854342379478,65.38060360791359],[0.6771070301949709,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"South Staffordshire","id":"E07000196","lon":-2.1549499,"lat":52.69689941,"q":3,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.70637687970795],[0.4030398989255779,65.7156846874735],[0.4030398989255779,65.7343003030046],[0.3869183029685548,65.74360811077015],[0.37079670701153167,65.7343003030046],[0.37079670701153167,65.7156846874735],[0.3869183029685548,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Havering","id":"E09000016","lon":0.235368,"lat":51.56520081,"q":14,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.51091291663133],[0.7415934140230633,65.52022072439688],[0.7415934140230633,65.53883633992798],[0.7254718180660402,65.54814414769353],[0.7093502221090171,65.53883633992798],[0.7093502221090171,65.52022072439688],[0.7254718180660402,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Stafford","id":"E07000197","lon":-2.1647501,"lat":52.84790039,"q":2,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.70637687970795],[0.37079670701153167,65.7156846874735],[0.37079670701153167,65.7343003030046],[0.35467511105450855,65.74360811077015],[0.33855351509748544,65.7343003030046],[0.33855351509748544,65.7156846874735],[0.35467511105450855,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Redbridge","id":"E09000026","lon":0.070085,"lat":51.58589935,"q":13,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.53883633992798],[0.7254718180660402,65.54814414769353],[0.7254718180660402,65.56675976322464],[0.7093502221090171,65.57606757099019],[0.693228626151994,65.56675976322464],[0.693228626151994,65.54814414769353],[0.7093502221090171,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Staffordshire Moorlands","id":"E07000198","lon":-1.99334002,"lat":53.06919861,"q":5,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.7343003030046],[0.45140468679664725,65.74360811077015],[0.45140468679664725,65.76222372630126],[0.43528309083962413,65.77153153406681],[0.419161494882601,65.76222372630126],[0.419161494882601,65.74360811077015],[0.43528309083962413,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Tamworth","id":"E07000199","lon":-1.68450999,"lat":52.62030029,"q":6,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.67845345641128],[0.4836478787106935,65.68776126417683],[0.4836478787106935,65.70637687970793],[0.46752628275367036,65.71568468747348],[0.45140468679664725,65.70637687970793],[0.45140468679664725,65.68776126417683],[0.46752628275367036,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Babergh","id":"E07000200","lon":0.91623098,"lat":52.06420135,"q":16,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.7899582018941327,65.67845345641128],[0.8060797978511558,65.68776126417683],[0.8060797978511558,65.70637687970793],[0.7899582018941327,65.71568468747348],[0.7738366059371096,65.70637687970793],[0.7738366059371096,65.68776126417683],[0.7899582018941327,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Mid Suffolk","id":"E07000203","lon":1.09695005,"lat":52.21860123,"q":15,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.65053003311462],[0.7899582018941327,65.65983784088017],[0.7899582018941327,65.67845345641128],[0.7738366059371096,65.68776126417683],[0.7577150099800865,65.67845345641128],[0.7577150099800865,65.65983784088017],[0.7738366059371096,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Wandsworth","id":"E09000032","lon":-0.20021001,"lat":51.45240021,"q":10,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.455066070038],[0.6126206463668784,65.46437387780355],[0.6126206463668784,65.48298949333466],[0.5964990504098553,65.49229730110021],[0.5803774544528322,65.48298949333466],[0.5803774544528322,65.46437387780355],[0.5964990504098553,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Guildford","id":"E07000209","lon":-0.56256998,"lat":51.25370026,"q":7,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.42714264674134],[0.5320126665817628,65.4364504545069],[0.5320126665817628,65.455066070038],[0.5158910706247397,65.46437387780355],[0.4997694746677166,65.455066070038],[0.4997694746677166,65.4364504545069],[0.5158910706247397,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Manchester","id":"E08000003","lon":-2.23358989,"lat":53.4701004,"q":5,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.79014714959791],[0.45140468679664725,65.79945495736347],[0.45140468679664725,65.81807057289457],[0.43528309083962413,65.82737838066012],[0.419161494882601,65.81807057289457],[0.419161494882601,65.79945495736347],[0.43528309083962413,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Mole Valley","id":"E07000210","lon":-0.30603001,"lat":51.22750092,"q":9,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.39921922344469],[0.5803774544528322,65.40852703121024],[0.5803774544528322,65.42714264674134],[0.5642558584958091,65.4364504545069],[0.5481342625387859,65.42714264674134],[0.5481342625387859,65.40852703121024],[0.5642558584958091,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Reigate and Banstead","id":"E07000211","lon":-0.19870999,"lat":51.25849915,"q":10,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.37129580014803],[0.6287422423239015,65.38060360791359],[0.6287422423239015,65.39921922344469],[0.6126206463668784,65.40852703121024],[0.5964990504098553,65.39921922344469],[0.5964990504098553,65.38060360791359],[0.6126206463668784,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Westminster","id":"E09000033","lon":-0.15295,"lat":51.5121994,"q":11,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.48298949333467],[0.6609854342379478,65.49229730110022],[0.6609854342379478,65.51091291663133],[0.6448638382809246,65.52022072439688],[0.6287422423239015,65.51091291663133],[0.6287422423239015,65.49229730110022],[0.6448638382809246,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Waverley","id":"E07000216","lon":-0.62343001,"lat":51.1568985,"q":6,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.42714264674134],[0.4997694746677166,65.4364504545069],[0.4997694746677166,65.455066070038],[0.4836478787106935,65.46437387780355],[0.46752628275367036,65.455066070038],[0.46752628275367036,65.4364504545069],[0.4836478787106935,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Woking","id":"E07000217","lon":-0.57981998,"lat":51.3083992,"q":8,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.455066070038],[0.5481342625387859,65.46437387780355],[0.5481342625387859,65.48298949333466],[0.5320126665817628,65.49229730110021],[0.5158910706247397,65.48298949333466],[0.5158910706247397,65.46437387780355],[0.5320126665817628,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Ards and North Down","id":"N09000011","lon":-5.64567995,"lat":54.56409836,"q":-3,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.17733755552725428,65.90184084278455],[0.1934591514842774,65.9111486505501],[0.1934591514842774,65.92976426608121],[0.17733755552725428,65.93907207384676],[0.16121595957023116,65.92976426608121],[0.16121595957023116,65.9111486505501],[0.17733755552725428,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"North Warwickshire","id":"E07000218","lon":-1.62419999,"lat":52.56480026,"q":6,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.62260660981796],[0.4836478787106935,65.63191441758352],[0.4836478787106935,65.65053003311462],[0.46752628275367036,65.65983784088017],[0.45140468679664725,65.65053003311462],[0.45140468679664725,65.63191441758352],[0.46752628275367036,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Nuneaton and Bedworth","id":"E07000219","lon":-1.47965002,"lat":52.50090027,"q":6,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.65053003311462],[0.4997694746677166,65.65983784088017],[0.4997694746677166,65.67845345641128],[0.4836478787106935,65.68776126417683],[0.46752628275367036,65.67845345641128],[0.46752628275367036,65.65983784088017],[0.4836478787106935,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Oldham","id":"E08000004","lon":-2.0527401,"lat":53.55770111,"q":5,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.81807057289458],[0.46752628275367036,65.82737838066014],[0.46752628275367036,65.84599399619124],[0.45140468679664725,65.85530180395679],[0.43528309083962413,65.84599399619124],[0.43528309083962413,65.82737838066014],[0.45140468679664725,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Rugby","id":"E07000220","lon":-1.31827998,"lat":52.38230133,"q":6,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.59468318652131],[0.4997694746677166,65.60399099428686],[0.4997694746677166,65.62260660981796],[0.4836478787106935,65.63191441758352],[0.46752628275367036,65.62260660981796],[0.46752628275367036,65.60399099428686],[0.4836478787106935,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Stratford-on-Avon","id":"E07000221","lon":-1.63565004,"lat":52.16149902,"q":7,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.56675976322464],[0.5158910706247397,65.57606757099019],[0.5158910706247397,65.5946831865213],[0.4997694746677166,65.60399099428685],[0.4836478787106935,65.5946831865213],[0.4836478787106935,65.57606757099019],[0.4997694746677166,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Bromsgrove","id":"E07000234","lon":-2.0037601,"lat":52.36169815,"q":4,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.62260660981796],[0.419161494882601,65.63191441758352],[0.419161494882601,65.65053003311462],[0.4030398989255779,65.65983784088017],[0.3869183029685548,65.65053003311462],[0.3869183029685548,65.63191441758352],[0.4030398989255779,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Warwick","id":"E07000222","lon":-1.58369005,"lat":52.30139923,"q":7,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.62260660981796],[0.5158910706247397,65.63191441758352],[0.5158910706247397,65.65053003311462],[0.4997694746677166,65.65983784088017],[0.4836478787106935,65.65053003311462],[0.4836478787106935,65.63191441758352],[0.4997694746677166,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Adur","id":"E07000223","lon":-0.32433,"lat":50.84569931,"q":10,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.34337237685136],[0.6126206463668784,65.35268018461691],[0.6126206463668784,65.37129580014802],[0.5964990504098553,65.38060360791357],[0.5803774544528322,65.37129580014802],[0.5803774544528322,65.35268018461691],[0.5964990504098553,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Malvern Hills","id":"E07000235","lon":-2.33088994,"lat":52.16759872,"q":3,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.59468318652131],[0.4030398989255779,65.60399099428686],[0.4030398989255779,65.62260660981796],[0.3869183029685548,65.63191441758352],[0.37079670701153167,65.62260660981796],[0.37079670701153167,65.60399099428686],[0.3869183029685548,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Arun","id":"E07000224","lon":-0.64998001,"lat":50.84320068,"q":8,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.39921922344469],[0.5481342625387859,65.40852703121024],[0.5481342625387859,65.42714264674134],[0.5320126665817628,65.4364504545069],[0.5158910706247397,65.42714264674134],[0.5158910706247397,65.40852703121024],[0.5320126665817628,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Chichester","id":"E07000225","lon":-0.71630001,"lat":50.94179916,"q":7,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.39921922344469],[0.5158910706247397,65.40852703121024],[0.5158910706247397,65.42714264674134],[0.4997694746677166,65.4364504545069],[0.4836478787106935,65.42714264674134],[0.4836478787106935,65.40852703121024],[0.4997694746677166,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Crawley","id":"E07000226","lon":-0.19532999,"lat":51.12360001,"q":11,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.39921922344469],[0.6448638382809246,65.40852703121024],[0.6448638382809246,65.42714264674134],[0.6287422423239015,65.4364504545069],[0.6126206463668784,65.42714264674134],[0.6126206463668784,65.40852703121024],[0.6287422423239015,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Horsham","id":"E07000227","lon":-0.38123,"lat":51.00270081,"q":9,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.37129580014803],[0.5964990504098553,65.38060360791359],[0.5964990504098553,65.39921922344469],[0.5803774544528322,65.40852703121024],[0.5642558584958091,65.39921922344469],[0.5642558584958091,65.38060360791359],[0.5803774544528322,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Mid Sussex","id":"E07000228","lon":-0.10272,"lat":51.05950165,"q":11,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.37129580014803],[0.6609854342379478,65.38060360791359],[0.6609854342379478,65.39921922344469],[0.6448638382809246,65.40852703121024],[0.6287422423239015,65.39921922344469],[0.6287422423239015,65.38060360791359],[0.6448638382809246,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Worthing","id":"E07000229","lon":-0.40127,"lat":50.83309937,"q":8,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.37129580014803],[0.5642558584958091,65.38060360791359],[0.5642558584958091,65.39921922344469],[0.5481342625387859,65.40852703121024],[0.5320126665817628,65.39921922344469],[0.5320126665817628,65.38060360791359],[0.5481342625387859,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Redditch","id":"E07000236","lon":-1.94710004,"lat":52.28540039,"q":6,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.56675976322464],[0.4836478787106935,65.57606757099019],[0.4836478787106935,65.5946831865213],[0.46752628275367036,65.60399099428685],[0.45140468679664725,65.5946831865213],[0.45140468679664725,65.57606757099019],[0.46752628275367036,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Wychavon","id":"E07000238","lon":-2.01613998,"lat":52.12889862,"q":5,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.56675976322464],[0.45140468679664725,65.57606757099019],[0.45140468679664725,65.5946831865213],[0.43528309083962413,65.60399099428685],[0.419161494882601,65.5946831865213],[0.419161494882601,65.57606757099019],[0.43528309083962413,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Wyre Forest","id":"E07000239","lon":-2.23494005,"lat":52.38529968,"q":3,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.65053003311462],[0.4030398989255779,65.65983784088017],[0.4030398989255779,65.67845345641128],[0.3869183029685548,65.68776126417683],[0.37079670701153167,65.67845345641128],[0.37079670701153167,65.65983784088017],[0.3869183029685548,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"St Albans","id":"E07000240","lon":-0.3407,"lat":51.77360153,"q":12,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.62260660981796],[0.6771070301949709,65.63191441758352],[0.6771070301949709,65.65053003311462],[0.6609854342379478,65.65983784088017],[0.6448638382809246,65.65053003311462],[0.6448638382809246,65.63191441758352],[0.6609854342379478,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"East Hertfordshire","id":"E07000242","lon":0.002739,"lat":51.8647995,"q":14,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.59468318652131],[0.7577150099800865,65.60399099428686],[0.7577150099800865,65.62260660981796],[0.7415934140230633,65.63191441758352],[0.7254718180660402,65.62260660981796],[0.7254718180660402,65.60399099428686],[0.7415934140230633,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Stevenage","id":"E07000243","lon":-0.18987,"lat":51.90539932,"q":14,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.62260660981796],[0.7415934140230633,65.63191441758352],[0.7415934140230633,65.65053003311462],[0.7254718180660402,65.65983784088017],[0.7093502221090171,65.65053003311462],[0.7093502221090171,65.63191441758352],[0.7254718180660402,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"East Suffolk","id":"E07000244","lon":1.45608997,"lat":52.24349976,"q":16,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.8060797978511558,65.70637687970795],[0.8222013938081789,65.7156846874735],[0.8222013938081789,65.7343003030046],[0.8060797978511558,65.74360811077015],[0.7899582018941327,65.7343003030046],[0.7899582018941327,65.7156846874735],[0.8060797978511558,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"West Suffolk","id":"E07000245","lon":0.65276903,"lat":52.3083992,"q":14,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.65053003311462],[0.7577150099800865,65.65983784088017],[0.7577150099800865,65.67845345641128],[0.7415934140230633,65.68776126417683],[0.7254718180660402,65.67845345641128],[0.7254718180660402,65.65983784088017],[0.7415934140230633,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Somerset West and Taunton","id":"E07000246","lon":-3.35766006,"lat":51.06349945,"q":0,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.455066070038],[0.2901887272264161,65.46437387780355],[0.2901887272264161,65.48298949333466],[0.27406713126939297,65.49229730110021],[0.25794553531236986,65.48298949333466],[0.25794553531236986,65.46437387780355],[0.27406713126939297,65.455066070038]]]}},{"type":"Feature","properties":{"n":"North Tyneside","id":"E08000022","lon":-1.50923002,"lat":55.02899933,"q":6,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,66.01353453597119],[0.4836478787106935,66.02284234373674],[0.4836478787106935,66.04145795926785],[0.46752628275367036,66.0507657670334],[0.45140468679664725,66.04145795926785],[0.45140468679664725,66.02284234373674],[0.46752628275367036,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Bolton","id":"E08000001","lon":-2.47952008,"lat":53.58449936,"q":4,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.84599399619124],[0.419161494882601,65.85530180395679],[0.419161494882601,65.8739174194879],[0.4030398989255779,65.88322522725345],[0.3869183029685548,65.8739174194879],[0.3869183029685548,65.85530180395679],[0.4030398989255779,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Bury","id":"E08000002","lon":-2.30879998,"lat":53.5931015,"q":5,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.84599399619124],[0.45140468679664725,65.85530180395679],[0.45140468679664725,65.8739174194879],[0.43528309083962413,65.88322522725345],[0.419161494882601,65.8739174194879],[0.419161494882601,65.85530180395679],[0.43528309083962413,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"South Tyneside","id":"E08000023","lon":-1.44695997,"lat":54.96989822,"q":7,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,66.01353453597119],[0.5158910706247397,66.02284234373674],[0.5158910706247397,66.04145795926785],[0.4997694746677166,66.0507657670334],[0.4836478787106935,66.04145795926785],[0.4836478787106935,66.02284234373674],[0.4997694746677166,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Stockport","id":"E08000007","lon":-2.12467003,"lat":53.39120102,"q":6,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.79014714959791],[0.4836478787106935,65.79945495736347],[0.4836478787106935,65.81807057289457],[0.46752628275367036,65.82737838066012],[0.45140468679664725,65.81807057289457],[0.45140468679664725,65.79945495736347],[0.46752628275367036,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Tameside","id":"E08000008","lon":-2.0769999,"lat":53.47869873,"q":6,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.81807057289458],[0.4997694746677166,65.82737838066014],[0.4997694746677166,65.84599399619124],[0.4836478787106935,65.85530180395679],[0.46752628275367036,65.84599399619124],[0.46752628275367036,65.82737838066014],[0.4836478787106935,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Trafford","id":"E08000009","lon":-2.36572003,"lat":53.41669846,"q":4,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.79014714959791],[0.419161494882601,65.79945495736347],[0.419161494882601,65.81807057289457],[0.4030398989255779,65.82737838066012],[0.3869183029685548,65.81807057289457],[0.3869183029685548,65.79945495736347],[0.4030398989255779,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Wigan","id":"E08000010","lon":-2.57246995,"lat":53.51449966,"q":3,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.81807057289458],[0.4030398989255779,65.82737838066014],[0.4030398989255779,65.84599399619124],[0.3869183029685548,65.85530180395679],[0.37079670701153167,65.84599399619124],[0.37079670701153167,65.82737838066014],[0.3869183029685548,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Knowsley","id":"E08000011","lon":-2.8329699,"lat":53.43790054,"q":2,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.79014714959791],[0.35467511105450855,65.79945495736347],[0.35467511105450855,65.81807057289457],[0.33855351509748544,65.82737838066012],[0.3224319191404623,65.81807057289457],[0.3224319191404623,65.79945495736347],[0.33855351509748544,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Liverpool","id":"E08000012","lon":-2.91364002,"lat":53.40829849,"q":1,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.81807057289458],[0.33855351509748544,65.82737838066014],[0.33855351509748544,65.84599399619124],[0.3224319191404623,65.85530180395679],[0.3063103231834392,65.84599399619124],[0.3063103231834392,65.82737838066014],[0.3224319191404623,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Sefton","id":"E08000014","lon":-2.99203992,"lat":53.48210144,"q":2,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.84599399619124],[0.35467511105450855,65.85530180395679],[0.35467511105450855,65.8739174194879],[0.33855351509748544,65.88322522725345],[0.3224319191404623,65.8739174194879],[0.3224319191404623,65.85530180395679],[0.33855351509748544,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Wirral","id":"E08000015","lon":-3.06502008,"lat":53.37450027,"q":1,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.79014714959791],[0.3224319191404623,65.79945495736347],[0.3224319191404623,65.81807057289457],[0.3063103231834392,65.82737838066012],[0.2901887272264161,65.81807057289457],[0.2901887272264161,65.79945495736347],[0.3063103231834392,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Barnsley","id":"E08000016","lon":-1.54925001,"lat":53.5257988,"q":9,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.84599399619124],[0.5803774544528322,65.85530180395679],[0.5803774544528322,65.8739174194879],[0.5642558584958091,65.88322522725345],[0.5481342625387859,65.8739174194879],[0.5481342625387859,65.85530180395679],[0.5642558584958091,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Sunderland","id":"E08000024","lon":-1.43343997,"lat":54.85720062,"q":7,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.98561111267453],[0.5320126665817628,65.99491892044009],[0.5320126665817628,66.01353453597119],[0.5158910706247397,66.02284234373674],[0.4997694746677166,66.01353453597119],[0.4997694746677166,65.99491892044009],[0.5158910706247397,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Doncaster","id":"E08000017","lon":-1.10894001,"lat":53.52700043,"q":9,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.8739174194879],[0.5964990504098553,65.88322522725345],[0.5964990504098553,65.90184084278455],[0.5803774544528322,65.9111486505501],[0.5642558584958091,65.90184084278455],[0.5642558584958091,65.88322522725345],[0.5803774544528322,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Rotherham","id":"E08000018","lon":-1.28650999,"lat":53.39550018,"q":9,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.81807057289458],[0.5964990504098553,65.82737838066014],[0.5964990504098553,65.84599399619124],[0.5803774544528322,65.85530180395679],[0.5642558584958091,65.84599399619124],[0.5642558584958091,65.82737838066014],[0.5803774544528322,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Sheffield","id":"E08000019","lon":-1.54253995,"lat":53.40359879,"q":8,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.81807057289458],[0.5642558584958091,65.82737838066014],[0.5642558584958091,65.84599399619124],[0.5481342625387859,65.85530180395679],[0.5320126665817628,65.84599399619124],[0.5320126665817628,65.82737838066014],[0.5481342625387859,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Newcastle upon Tyne","id":"E08000021","lon":-1.65296996,"lat":55.02099991,"q":5,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.98561111267453],[0.46752628275367036,65.99491892044009],[0.46752628275367036,66.01353453597119],[0.45140468679664725,66.02284234373674],[0.43528309083962413,66.01353453597119],[0.43528309083962413,65.99491892044009],[0.45140468679664725,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Birmingham","id":"E08000025","lon":-1.88141,"lat":52.48400116,"q":5,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.62260660981796],[0.45140468679664725,65.63191441758352],[0.45140468679664725,65.65053003311462],[0.43528309083962413,65.65983784088017],[0.419161494882601,65.65053003311462],[0.419161494882601,65.63191441758352],[0.43528309083962413,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Coventry","id":"E08000026","lon":-1.51908004,"lat":52.41419983,"q":5,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.59468318652131],[0.46752628275367036,65.60399099428686],[0.46752628275367036,65.62260660981796],[0.45140468679664725,65.63191441758352],[0.43528309083962413,65.62260660981796],[0.43528309083962413,65.60399099428686],[0.45140468679664725,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Hillingdon","id":"E09000017","lon":-0.44182,"lat":51.53659821,"q":9,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.53883633992798],[0.5964990504098553,65.54814414769353],[0.5964990504098553,65.56675976322464],[0.5803774544528322,65.57606757099019],[0.5642558584958091,65.56675976322464],[0.5642558584958091,65.54814414769353],[0.5803774544528322,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Dudley","id":"E08000027","lon":-2.10171008,"lat":52.49509811,"q":4,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.65053003311462],[0.43528309083962413,65.65983784088017],[0.43528309083962413,65.67845345641128],[0.419161494882601,65.68776126417683],[0.4030398989255779,65.67845345641128],[0.4030398989255779,65.65983784088017],[0.419161494882601,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Sandwell","id":"E08000028","lon":-2.00770998,"lat":52.51480103,"q":5,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.65053003311462],[0.46752628275367036,65.65983784088017],[0.46752628275367036,65.67845345641128],[0.45140468679664725,65.68776126417683],[0.43528309083962413,65.67845345641128],[0.43528309083962413,65.65983784088017],[0.45140468679664725,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Hounslow","id":"E09000018","lon":-0.37843999,"lat":51.46239853,"q":9,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.51091291663133],[0.5803774544528322,65.52022072439688],[0.5803774544528322,65.53883633992798],[0.5642558584958091,65.54814414769353],[0.5481342625387859,65.53883633992798],[0.5481342625387859,65.52022072439688],[0.5642558584958091,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Islington","id":"E09000019","lon":-0.10992,"lat":51.54550171,"q":11,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.51091291663133],[0.6448638382809246,65.52022072439688],[0.6448638382809246,65.53883633992798],[0.6287422423239015,65.54814414769353],[0.6126206463668784,65.53883633992798],[0.6126206463668784,65.52022072439688],[0.6287422423239015,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Solihull","id":"E08000029","lon":-1.71557999,"lat":52.43099976,"q":4,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.59468318652131],[0.43528309083962413,65.60399099428686],[0.43528309083962413,65.62260660981796],[0.419161494882601,65.63191441758352],[0.4030398989255779,65.62260660981796],[0.4030398989255779,65.60399099428686],[0.419161494882601,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Walsall","id":"E08000030","lon":-1.97044003,"lat":52.60499954,"q":5,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.67845345641128],[0.45140468679664725,65.68776126417683],[0.45140468679664725,65.70637687970793],[0.43528309083962413,65.71568468747348],[0.419161494882601,65.70637687970793],[0.419161494882601,65.68776126417683],[0.43528309083962413,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Wolverhampton","id":"E08000031","lon":-2.12746,"lat":52.59790039,"q":4,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.67845345641128],[0.419161494882601,65.68776126417683],[0.419161494882601,65.70637687970793],[0.4030398989255779,65.71568468747348],[0.3869183029685548,65.70637687970793],[0.3869183029685548,65.68776126417683],[0.4030398989255779,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Bradford","id":"E08000032","lon":-1.87389004,"lat":53.84379959,"q":7,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.90184084278455],[0.5158910706247397,65.9111486505501],[0.5158910706247397,65.92976426608121],[0.4997694746677166,65.93907207384676],[0.4836478787106935,65.92976426608121],[0.4836478787106935,65.9111486505501],[0.4997694746677166,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Calderdale","id":"E08000033","lon":-1.96182001,"lat":53.72050095,"q":7,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.8739174194879],[0.5320126665817628,65.88322522725345],[0.5320126665817628,65.90184084278455],[0.5158910706247397,65.9111486505501],[0.4997694746677166,65.90184084278455],[0.4997694746677166,65.88322522725345],[0.5158910706247397,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Kirklees","id":"E08000034","lon":-1.78085005,"lat":53.64229965,"q":8,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.84599399619124],[0.5481342625387859,65.85530180395679],[0.5481342625387859,65.8739174194879],[0.5320126665817628,65.88322522725345],[0.5158910706247397,65.8739174194879],[0.5158910706247397,65.85530180395679],[0.5320126665817628,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Wakefield","id":"E08000036","lon":-1.42092001,"lat":53.65919876,"q":8,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.8739174194879],[0.5642558584958091,65.88322522725345],[0.5642558584958091,65.90184084278455],[0.5481342625387859,65.9111486505501],[0.5320126665817628,65.90184084278455],[0.5320126665817628,65.88322522725345],[0.5481342625387859,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Leeds","id":"E08000035","lon":-1.50735998,"lat":53.8227005,"q":8,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.90184084278455],[0.5481342625387859,65.9111486505501],[0.5481342625387859,65.92976426608121],[0.5320126665817628,65.93907207384676],[0.5158910706247397,65.92976426608121],[0.5158910706247397,65.9111486505501],[0.5320126665817628,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Bexley","id":"E09000004","lon":0.146212,"lat":51.45819855,"q":13,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.42714264674134],[0.7254718180660402,65.4364504545069],[0.7254718180660402,65.455066070038],[0.7093502221090171,65.46437387780355],[0.693228626151994,65.455066070038],[0.693228626151994,65.4364504545069],[0.7093502221090171,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Gateshead","id":"E08000037","lon":-1.6868,"lat":54.93119812,"q":6,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.98561111267453],[0.4997694746677166,65.99491892044009],[0.4997694746677166,66.01353453597119],[0.4836478787106935,66.02284234373674],[0.46752628275367036,66.01353453597119],[0.46752628275367036,65.99491892044009],[0.4836478787106935,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"City of London","id":"E09000001","lon":-0.09351,"lat":51.5155983,"q":12,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.51091291663133],[0.6771070301949709,65.52022072439688],[0.6771070301949709,65.53883633992798],[0.6609854342379478,65.54814414769353],[0.6448638382809246,65.53883633992798],[0.6448638382809246,65.52022072439688],[0.6609854342379478,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Barking and Dagenham","id":"E09000002","lon":0.12950601,"lat":51.54550171,"q":14,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.48298949333467],[0.7577150099800865,65.49229730110022],[0.7577150099800865,65.51091291663133],[0.7415934140230633,65.52022072439688],[0.7254718180660402,65.51091291663133],[0.7254718180660402,65.49229730110022],[0.7415934140230633,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Barnet","id":"E09000003","lon":-0.21821,"lat":51.61109924,"q":11,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.56675976322464],[0.6448638382809246,65.57606757099019],[0.6448638382809246,65.5946831865213],[0.6287422423239015,65.60399099428685],[0.6126206463668784,65.5946831865213],[0.6126206463668784,65.57606757099019],[0.6287422423239015,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Kensington and Chelsea","id":"E09000020","lon":-0.18976,"lat":51.49639893,"q":10,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.48298949333467],[0.6287422423239015,65.49229730110022],[0.6287422423239015,65.51091291663133],[0.6126206463668784,65.52022072439688],[0.5964990504098553,65.51091291663133],[0.5964990504098553,65.49229730110022],[0.6126206463668784,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Richmond upon Thames","id":"E09000027","lon":-0.28913999,"lat":51.44029999,"q":9,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.455066070038],[0.5803774544528322,65.46437387780355],[0.5803774544528322,65.48298949333466],[0.5642558584958091,65.49229730110021],[0.5481342625387859,65.48298949333466],[0.5481342625387859,65.46437387780355],[0.5642558584958091,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Southwark","id":"E09000028","lon":-0.07309,"lat":51.46590042,"q":12,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.455066070038],[0.6771070301949709,65.46437387780355],[0.6771070301949709,65.48298949333466],[0.6609854342379478,65.49229730110021],[0.6448638382809246,65.48298949333466],[0.6448638382809246,65.46437387780355],[0.6609854342379478,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Sutton","id":"E09000029","lon":-0.17227,"lat":51.35760117,"q":11,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.42714264674134],[0.6609854342379478,65.4364504545069],[0.6609854342379478,65.455066070038],[0.6448638382809246,65.46437387780355],[0.6287422423239015,65.455066070038],[0.6287422423239015,65.4364504545069],[0.6448638382809246,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Tower Hamlets","id":"E09000030","lon":-0.0364,"lat":51.51549911,"q":12,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.48298949333467],[0.693228626151994,65.49229730110022],[0.693228626151994,65.51091291663133],[0.6771070301949709,65.52022072439688],[0.6609854342379478,65.51091291663133],[0.6609854342379478,65.49229730110022],[0.6771070301949709,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Waltham Forest","id":"E09000031","lon":-0.01881,"lat":51.59460068,"q":13,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.56675976322464],[0.7093502221090171,65.57606757099019],[0.7093502221090171,65.5946831865213],[0.693228626151994,65.60399099428685],[0.6771070301949709,65.5946831865213],[0.6771070301949709,65.57606757099019],[0.693228626151994,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Antrim and Newtownabbey","id":"N09000001","lon":-6.17759991,"lat":54.69390106,"q":-4,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.14509436361320804,65.90184084278455],[0.16121595957023116,65.9111486505501],[0.16121595957023116,65.92976426608121],[0.14509436361320804,65.93907207384676],[0.12897276765618493,65.92976426608121],[0.12897276765618493,65.9111486505501],[0.14509436361320804,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Armagh City, Banbridge and Craigavon","id":"N09000002","lon":-6.43454981,"lat":54.38669968,"q":-5,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.11285117169916181,65.90184084278455],[0.12897276765618493,65.9111486505501],[0.12897276765618493,65.92976426608121],[0.11285117169916181,65.93907207384676],[0.0967295757421387,65.92976426608121],[0.0967295757421387,65.9111486505501],[0.11285117169916181,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Belfast","id":"N09000003","lon":-5.92535019,"lat":54.5984993,"q":-4,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.92976426608122],[0.17733755552725428,65.93907207384677],[0.17733755552725428,65.95768768937788],[0.16121595957023116,65.96699549714343],[0.14509436361320804,65.95768768937788],[0.14509436361320804,65.93907207384677],[0.16121595957023116,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Causeway Coast and Glens","id":"N09000004","lon":-6.59959984,"lat":55.03960037,"q":-5,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.11285117169916181,65.95768768937788],[0.12897276765618493,65.96699549714343],[0.12897276765618493,65.98561111267453],[0.11285117169916181,65.99491892044009],[0.0967295757421387,65.98561111267453],[0.0967295757421387,65.96699549714343],[0.11285117169916181,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Derry City and Strabane","id":"N09000005","lon":-7.42063999,"lat":54.80899811,"q":-6,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.92976426608122],[0.11285117169916181,65.93907207384677],[0.11285117169916181,65.95768768937788],[0.0967295757421387,65.96699549714343],[0.08060797978511558,65.95768768937788],[0.08060797978511558,65.93907207384677],[0.0967295757421387,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Fermanagh and Omagh","id":"N09000006","lon":-7.52710009,"lat":54.3852005,"q":-6,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.08060797978511558,65.90184084278455],[0.0967295757421387,65.9111486505501],[0.0967295757421387,65.92976426608121],[0.08060797978511558,65.93907207384676],[0.06448638382809246,65.92976426608121],[0.06448638382809246,65.9111486505501],[0.08060797978511558,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Lisburn and Castlereagh","id":"N09000007","lon":-6.03544998,"lat":54.49750137,"q":-5,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.12897276765618493,65.8739174194879],[0.14509436361320804,65.88322522725345],[0.14509436361320804,65.90184084278455],[0.12897276765618493,65.9111486505501],[0.11285117169916181,65.90184084278455],[0.11285117169916181,65.88322522725345],[0.12897276765618493,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Mid and East Antrim","id":"N09000008","lon":-6.14645004,"lat":54.86460114,"q":-4,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.14509436361320804,65.95768768937788],[0.16121595957023116,65.96699549714343],[0.16121595957023116,65.98561111267453],[0.14509436361320804,65.99491892044009],[0.12897276765618493,65.98561111267453],[0.12897276765618493,65.96699549714343],[0.14509436361320804,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Mid Ulster","id":"N09000009","lon":-6.8888998,"lat":54.55270004,"q":-5,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.12897276765618493,65.92976426608122],[0.14509436361320804,65.93907207384677],[0.14509436361320804,65.95768768937788],[0.12897276765618493,65.96699549714343],[0.11285117169916181,65.95768768937788],[0.11285117169916181,65.93907207384677],[0.12897276765618493,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Newry, Mourne and Down","id":"N09000010","lon":-6.0889101,"lat":54.1495018,"q":-4,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.8739174194879],[0.17733755552725428,65.88322522725345],[0.17733755552725428,65.90184084278455],[0.16121595957023116,65.9111486505501],[0.14509436361320804,65.90184084278455],[0.14509436361320804,65.88322522725345],[0.16121595957023116,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Clackmannanshire","id":"S12000005","lon":-3.7534399,"lat":56.14720154,"q":2,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.12522822915783],[0.35467511105450855,66.13453603692338],[0.35467511105450855,66.15315165245448],[0.33855351509748544,66.16245946022003],[0.3224319191404623,66.15315165245448],[0.3224319191404623,66.13453603692338],[0.33855351509748544,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"Dumfries and Galloway","id":"S12000006","lon":-4.02862978,"lat":55.09619904,"q":4,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,66.01353453597119],[0.419161494882601,66.02284234373674],[0.419161494882601,66.04145795926785],[0.4030398989255779,66.0507657670334],[0.3869183029685548,66.04145795926785],[0.3869183029685548,66.02284234373674],[0.4030398989255779,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"East Ayrshire","id":"S12000008","lon":-4.29056978,"lat":55.49670029,"q":3,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,66.01353453597119],[0.3869183029685548,66.02284234373674],[0.3869183029685548,66.04145795926785],[0.37079670701153167,66.0507657670334],[0.35467511105450855,66.04145795926785],[0.35467511105450855,66.02284234373674],[0.37079670701153167,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"East Lothian","id":"S12000010","lon":-2.72434998,"lat":55.94210052,"q":5,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,66.06938138256452],[0.45140468679664725,66.07868919033007],[0.45140468679664725,66.09730480586117],[0.43528309083962413,66.10661261362672],[0.419161494882601,66.09730480586117],[0.419161494882601,66.07868919033007],[0.43528309083962413,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"East Renfrewshire","id":"S12000011","lon":-4.36059999,"lat":55.74869919,"q":2,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.01353453597119],[0.35467511105450855,66.02284234373674],[0.35467511105450855,66.04145795926785],[0.33855351509748544,66.0507657670334],[0.3224319191404623,66.04145795926785],[0.3224319191404623,66.02284234373674],[0.33855351509748544,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Na h-Eileanan Siar","id":"S12000013","lon":-6.65721989,"lat":58.19940186,"q":-1,"r":27},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,66.20899849904781],[0.27406713126939297,66.21830630681336],[0.27406713126939297,66.23692192234446],[0.25794553531236986,66.24622973011002],[0.24182393935534674,66.23692192234446],[0.24182393935534674,66.21830630681336],[0.25794553531236986,66.20899849904781]]]}},{"type":"Feature","properties":{"n":"Falkirk","id":"S12000014","lon":-3.77060008,"lat":55.99599838,"q":2,"r":23},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,66.09730480586117],[0.37079670701153167,66.10661261362672],[0.37079670701153167,66.12522822915783],[0.35467511105450855,66.13453603692338],[0.33855351509748544,66.12522822915783],[0.33855351509748544,66.10661261362672],[0.35467511105450855,66.09730480586117]]]}},{"type":"Feature","properties":{"n":"Highland","id":"S12000017","lon":-4.66091013,"lat":57.58670044,"q":1,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.18107507575115],[0.3224319191404623,66.1903828835167],[0.3224319191404623,66.20899849904781],[0.3063103231834392,66.21830630681336],[0.2901887272264161,66.20899849904781],[0.2901887272264161,66.1903828835167],[0.3063103231834392,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"Inverclyde","id":"S12000018","lon":-4.75387001,"lat":55.90029907,"q":0,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,66.04145795926786],[0.3063103231834392,66.05076576703341],[0.3063103231834392,66.06938138256452],[0.2901887272264161,66.07868919033007],[0.27406713126939297,66.06938138256452],[0.27406713126939297,66.05076576703341],[0.2901887272264161,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Midlothian","id":"S12000019","lon":-3.1173799,"lat":55.82109833,"q":3,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,66.04145795926786],[0.4030398989255779,66.05076576703341],[0.4030398989255779,66.06938138256452],[0.3869183029685548,66.07868919033007],[0.37079670701153167,66.06938138256452],[0.37079670701153167,66.05076576703341],[0.3869183029685548,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Moray","id":"S12000020","lon":-3.20186996,"lat":57.47679901,"q":2,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.18107507575115],[0.35467511105450855,66.1903828835167],[0.35467511105450855,66.20899849904781],[0.33855351509748544,66.21830630681336],[0.3224319191404623,66.20899849904781],[0.3224319191404623,66.1903828835167],[0.33855351509748544,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"North Ayrshire","id":"S12000021","lon":-4.7247901,"lat":55.72790146,"q":1,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.01353453597119],[0.3224319191404623,66.02284234373674],[0.3224319191404623,66.04145795926785],[0.3063103231834392,66.0507657670334],[0.2901887272264161,66.04145795926785],[0.2901887272264161,66.02284234373674],[0.3063103231834392,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Orkney Islands","id":"S12000023","lon":-2.90028,"lat":58.94329834,"q":4,"r":28},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,66.23692192234446],[0.419161494882601,66.24622973011002],[0.419161494882601,66.26484534564112],[0.4030398989255779,66.27415315340667],[0.3869183029685548,66.26484534564112],[0.3869183029685548,66.24622973011002],[0.4030398989255779,66.23692192234446]]]}},{"type":"Feature","properties":{"n":"Scottish Borders","id":"S12000026","lon":-2.85865998,"lat":55.52590179,"q":4,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,66.04145795926786],[0.43528309083962413,66.05076576703341],[0.43528309083962413,66.06938138256452],[0.419161494882601,66.07868919033007],[0.4030398989255779,66.06938138256452],[0.4030398989255779,66.05076576703341],[0.419161494882601,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Shetland Islands","id":"S12000027","lon":-1.37344003,"lat":60.50500107,"q":5,"r":30},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,66.29276876893779],[0.45140468679664725,66.30207657670334],[0.45140468679664725,66.32069219223445],[0.43528309083962413,66.33],[0.419161494882601,66.32069219223445],[0.419161494882601,66.30207657670334],[0.43528309083962413,66.29276876893779]]]}},{"type":"Feature","properties":{"n":"South Ayrshire","id":"S12000028","lon":-4.72901011,"lat":55.23009872,"q":1,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.98561111267453],[0.33855351509748544,65.99491892044009],[0.33855351509748544,66.01353453597119],[0.3224319191404623,66.02284234373674],[0.3063103231834392,66.01353453597119],[0.3063103231834392,65.99491892044009],[0.3224319191404623,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"South Lanarkshire","id":"S12000029","lon":-3.83272004,"lat":55.60449982,"q":2,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,66.04145795926786],[0.37079670701153167,66.05076576703341],[0.37079670701153167,66.06938138256452],[0.35467511105450855,66.07868919033007],[0.33855351509748544,66.06938138256452],[0.33855351509748544,66.05076576703341],[0.35467511105450855,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Stirling","id":"S12000030","lon":-4.32595015,"lat":56.24950027,"q":1,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.12522822915783],[0.3224319191404623,66.13453603692338],[0.3224319191404623,66.15315165245448],[0.3063103231834392,66.16245946022003],[0.2901887272264161,66.15315165245448],[0.2901887272264161,66.13453603692338],[0.3063103231834392,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"Aberdeen City","id":"S12000033","lon":-2.20397997,"lat":57.16699982,"q":4,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,66.18107507575115],[0.419161494882601,66.1903828835167],[0.419161494882601,66.20899849904781],[0.4030398989255779,66.21830630681336],[0.3869183029685548,66.20899849904781],[0.3869183029685548,66.1903828835167],[0.4030398989255779,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"Aberdeenshire","id":"S12000034","lon":-2.79204988,"lat":57.23469925,"q":3,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,66.18107507575115],[0.3869183029685548,66.1903828835167],[0.3869183029685548,66.20899849904781],[0.37079670701153167,66.21830630681336],[0.35467511105450855,66.20899849904781],[0.35467511105450855,66.1903828835167],[0.37079670701153167,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"Argyll and Bute","id":"S12000035","lon":-5.22113991,"lat":56.28939819,"q":0,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,66.12522822915783],[0.2901887272264161,66.13453603692338],[0.2901887272264161,66.15315165245448],[0.27406713126939297,66.16245946022003],[0.25794553531236986,66.15315165245448],[0.25794553531236986,66.13453603692338],[0.27406713126939297,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"City of Edinburgh","id":"S12000036","lon":-3.27825999,"lat":55.91120148,"q":4,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,66.06938138256452],[0.419161494882601,66.07868919033007],[0.419161494882601,66.09730480586117],[0.4030398989255779,66.10661261362672],[0.3869183029685548,66.09730480586117],[0.3869183029685548,66.07868919033007],[0.4030398989255779,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"West Dunbartonshire","id":"S12000039","lon":-4.52074003,"lat":56.00139999,"q":0,"r":23},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,66.09730480586117],[0.3063103231834392,66.10661261362672],[0.3063103231834392,66.12522822915783],[0.2901887272264161,66.13453603692338],[0.27406713126939297,66.12522822915783],[0.27406713126939297,66.10661261362672],[0.2901887272264161,66.09730480586117]]]}},{"type":"Feature","properties":{"n":"Renfrewshire","id":"S12000038","lon":-4.56833982,"lat":55.84859848,"q":1,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.06938138256452],[0.3224319191404623,66.07868919033007],[0.3224319191404623,66.09730480586117],[0.3063103231834392,66.10661261362672],[0.2901887272264161,66.09730480586117],[0.2901887272264161,66.07868919033007],[0.3063103231834392,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"East Dunbartonshire","id":"S12000045","lon":-4.22417021,"lat":55.95830154,"q":1,"r":23},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,66.09730480586117],[0.33855351509748544,66.10661261362672],[0.33855351509748544,66.12522822915783],[0.3224319191404623,66.13453603692338],[0.3063103231834392,66.12522822915783],[0.3063103231834392,66.10661261362672],[0.3224319191404623,66.09730480586117]]]}},{"type":"Feature","properties":{"n":"Fife","id":"S12000047","lon":-2.98235011,"lat":56.23120117,"q":3,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,66.12522822915783],[0.3869183029685548,66.13453603692338],[0.3869183029685548,66.15315165245448],[0.37079670701153167,66.16245946022003],[0.35467511105450855,66.15315165245448],[0.35467511105450855,66.13453603692338],[0.37079670701153167,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"West Lothian","id":"S12000040","lon":-3.60909009,"lat":55.89920044,"q":3,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,66.06938138256452],[0.3869183029685548,66.07868919033007],[0.3869183029685548,66.09730480586117],[0.37079670701153167,66.10661261362672],[0.35467511105450855,66.09730480586117],[0.35467511105450855,66.07868919033007],[0.37079670701153167,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"Angus","id":"S12000041","lon":-2.89189005,"lat":56.72480011,"q":2,"r":25},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,66.1531516524545],[0.37079670701153167,66.16245946022005],[0.37079670701153167,66.18107507575115],[0.35467511105450855,66.1903828835167],[0.33855351509748544,66.18107507575115],[0.33855351509748544,66.16245946022005],[0.35467511105450855,66.1531516524545]]]}},{"type":"Feature","properties":{"n":"Dundee City","id":"S12000042","lon":-2.97094989,"lat":56.4776001,"q":3,"r":25},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,66.1531516524545],[0.4030398989255779,66.16245946022005],[0.4030398989255779,66.18107507575115],[0.3869183029685548,66.1903828835167],[0.37079670701153167,66.18107507575115],[0.37079670701153167,66.16245946022005],[0.3869183029685548,66.1531516524545]]]}},{"type":"Feature","properties":{"n":"Perth and Kinross","id":"S12000048","lon":-3.88479996,"lat":56.57529831,"q":1,"r":25},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,66.1531516524545],[0.33855351509748544,66.16245946022005],[0.33855351509748544,66.18107507575115],[0.3224319191404623,66.1903828835167],[0.3063103231834392,66.18107507575115],[0.3063103231834392,66.16245946022005],[0.3224319191404623,66.1531516524545]]]}},{"type":"Feature","properties":{"n":"Glasgow City","id":"S12000049","lon":-4,"lat":60,"q":1,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,66.04145795926786],[0.33855351509748544,66.05076576703341],[0.33855351509748544,66.06938138256452],[0.3224319191404623,66.07868919033007],[0.3063103231834392,66.06938138256452],[0.3063103231834392,66.05076576703341],[0.3224319191404623,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Bridgend","lad19nmw":"Pen-y-bont ar Ogwr","id":"W06000013","lon":-3.61359,"lat":51.56060028,"q":-1,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.56675976322464],[0.25794553531236986,65.57606757099019],[0.25794553531236986,65.5946831865213],[0.24182393935534674,65.60399099428685],[0.22570234339832362,65.5946831865213],[0.22570234339832362,65.57606757099019],[0.24182393935534674,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"North Lanarkshire","id":"S12000050","lon":-4,"lat":60,"q":2,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.06938138256452],[0.35467511105450855,66.07868919033007],[0.35467511105450855,66.09730480586117],[0.33855351509748544,66.10661261362672],[0.3224319191404623,66.09730480586117],[0.3224319191404623,66.07868919033007],[0.33855351509748544,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"Isle of Anglesey","lad19nmw":"Ynys Môn","id":"W06000001","lon":-4.32290983,"lat":53.27939987,"q":-2,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.70637687970795],[0.24182393935534674,65.7156846874735],[0.24182393935534674,65.7343003030046],[0.22570234339832362,65.74360811077015],[0.2095807474413005,65.7343003030046],[0.2095807474413005,65.7156846874735],[0.22570234339832362,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Gwynedd","lad19nmw":"Gwynedd","id":"W06000002","lon":-3.8155899,"lat":52.89830017,"q":1,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.67845345641128],[0.3224319191404623,65.68776126417683],[0.3224319191404623,65.70637687970793],[0.3063103231834392,65.71568468747348],[0.2901887272264161,65.70637687970793],[0.2901887272264161,65.68776126417683],[0.3063103231834392,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Conwy","lad19nmw":"Conwy","id":"W06000003","lon":-3.74645996,"lat":53.1473999,"q":0,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.67845345641128],[0.2901887272264161,65.68776126417683],[0.2901887272264161,65.70637687970793],[0.27406713126939297,65.71568468747348],[0.25794553531236986,65.70637687970793],[0.25794553531236986,65.68776126417683],[0.27406713126939297,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Denbighshire","lad19nmw":"Sir Ddinbych","id":"W06000004","lon":-3.34761,"lat":53.0882988,"q":1,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.70637687970795],[0.33855351509748544,65.7156846874735],[0.33855351509748544,65.7343003030046],[0.3224319191404623,65.74360811077015],[0.3063103231834392,65.7343003030046],[0.3063103231834392,65.7156846874735],[0.3224319191404623,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Flintshire","lad19nmw":"Sir y Fflint","id":"W06000005","lon":-3.17604995,"lat":53.21500015,"q":2,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.67845345641128],[0.35467511105450855,65.68776126417683],[0.35467511105450855,65.70637687970793],[0.33855351509748544,65.71568468747348],[0.3224319191404623,65.70637687970793],[0.3224319191404623,65.68776126417683],[0.33855351509748544,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Wrexham","lad19nmw":"Wrecsam","id":"W06000006","lon":-2.99202991,"lat":53.00170135,"q":2,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.7343003030046],[0.35467511105450855,65.74360811077015],[0.35467511105450855,65.76222372630126],[0.33855351509748544,65.77153153406681],[0.3224319191404623,65.76222372630126],[0.3224319191404623,65.74360811077015],[0.33855351509748544,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Ceredigion","lad19nmw":"Ceredigion","id":"W06000008","lon":-3.94993997,"lat":52.29800034,"q":-1,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.59468318652131],[0.27406713126939297,65.60399099428686],[0.27406713126939297,65.62260660981796],[0.25794553531236986,65.63191441758352],[0.24182393935534674,65.62260660981796],[0.24182393935534674,65.60399099428686],[0.25794553531236986,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Pembrokeshire","lad19nmw":"Sir Benfro","id":"W06000009","lon":-4.90818024,"lat":51.85509872,"q":-4,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.53883633992798],[0.17733755552725428,65.54814414769353],[0.17733755552725428,65.56675976322464],[0.16121595957023116,65.57606757099019],[0.14509436361320804,65.56675976322464],[0.14509436361320804,65.54814414769353],[0.16121595957023116,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Carmarthenshire","lad19nmw":"Sir Gaerfyrddin","id":"W06000010","lon":-4.2111001,"lat":51.89500046,"q":-2,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,65.56675976322464],[0.22570234339832362,65.57606757099019],[0.22570234339832362,65.5946831865213],[0.2095807474413005,65.60399099428685],[0.1934591514842774,65.5946831865213],[0.1934591514842774,65.57606757099019],[0.2095807474413005,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Swansea","lad19nmw":"Abertawe","id":"W06000011","lon":-3.96723008,"lat":51.65810013,"q":-3,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.1934591514842774,65.53883633992798],[0.2095807474413005,65.54814414769353],[0.2095807474413005,65.56675976322464],[0.1934591514842774,65.57606757099019],[0.17733755552725428,65.56675976322464],[0.17733755552725428,65.54814414769353],[0.1934591514842774,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Neath Port Talbot","lad19nmw":"Castell-nedd Port Talbot","id":"W06000012","lon":-3.74638009,"lat":51.64450073,"q":-2,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.53883633992798],[0.24182393935534674,65.54814414769353],[0.24182393935534674,65.56675976322464],[0.22570234339832362,65.57606757099019],[0.2095807474413005,65.56675976322464],[0.2095807474413005,65.54814414769353],[0.22570234339832362,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Vale of Glamorgan","lad19nmw":"Bro Morgannwg","id":"W06000014","lon":-3.39803004,"lat":51.44839859,"q":-1,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.51091291663133],[0.25794553531236986,65.52022072439688],[0.25794553531236986,65.53883633992798],[0.24182393935534674,65.54814414769353],[0.22570234339832362,65.53883633992798],[0.22570234339832362,65.52022072439688],[0.24182393935534674,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Cardiff","lad19nmw":"Caerdydd","id":"W06000015","lon":-3.22212005,"lat":51.50249863,"q":-1,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.53883633992798],[0.27406713126939297,65.54814414769353],[0.27406713126939297,65.56675976322464],[0.25794553531236986,65.57606757099019],[0.24182393935534674,65.56675976322464],[0.24182393935534674,65.54814414769353],[0.25794553531236986,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Rhondda Cynon Taf","lad19nmw":"Rhondda Cynon Taf","id":"W06000016","lon":-3.41358995,"lat":51.62179947,"q":0,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.59468318652131],[0.3063103231834392,65.60399099428686],[0.3063103231834392,65.62260660981796],[0.2901887272264161,65.63191441758352],[0.27406713126939297,65.62260660981796],[0.27406713126939297,65.60399099428686],[0.2901887272264161,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Torfaen","lad19nmw":"Torfaen","id":"W06000020","lon":-3.05100989,"lat":51.69839859,"q":1,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.56675976322464],[0.3224319191404623,65.57606757099019],[0.3224319191404623,65.5946831865213],[0.3063103231834392,65.60399099428685],[0.2901887272264161,65.5946831865213],[0.2901887272264161,65.57606757099019],[0.3063103231834392,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Caerphilly","lad19nmw":"Caerffili","id":"W06000018","lon":-3.19753003,"lat":51.65000153,"q":1,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.59468318652131],[0.33855351509748544,65.60399099428686],[0.33855351509748544,65.62260660981796],[0.3224319191404623,65.63191441758352],[0.3063103231834392,65.62260660981796],[0.3063103231834392,65.60399099428686],[0.3224319191404623,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Blaenau Gwent","lad19nmw":"Blaenau Gwent","id":"W06000019","lon":-3.18592,"lat":51.75360107,"q":0,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.56675976322464],[0.2901887272264161,65.57606757099019],[0.2901887272264161,65.5946831865213],[0.27406713126939297,65.60399099428685],[0.25794553531236986,65.5946831865213],[0.25794553531236986,65.57606757099019],[0.27406713126939297,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Merthyr Tydfil","lad19nmw":"Merthyr Tudful","id":"W06000024","lon":-3.36424994,"lat":51.74860001,"q":1,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.62260660981796],[0.3224319191404623,65.63191441758352],[0.3224319191404623,65.65053003311462],[0.3063103231834392,65.65983784088017],[0.2901887272264161,65.65053003311462],[0.2901887272264161,65.63191441758352],[0.3063103231834392,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Monmouthshire","lad19nmw":"Sir Fynwy","id":"W06000021","lon":-2.90280008,"lat":51.77830124,"q":2,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.62260660981796],[0.35467511105450855,65.63191441758352],[0.35467511105450855,65.65053003311462],[0.33855351509748544,65.65983784088017],[0.3224319191404623,65.65053003311462],[0.3224319191404623,65.63191441758352],[0.33855351509748544,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Newport","lad19nmw":"Casnewydd","id":"W06000022","lon":-2.89769006,"lat":51.58229828,"q":0,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.53883633992798],[0.3063103231834392,65.54814414769353],[0.3063103231834392,65.56675976322464],[0.2901887272264161,65.57606757099019],[0.27406713126939297,65.56675976322464],[0.27406713126939297,65.54814414769353],[0.2901887272264161,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Powys","lad19nmw":"Powys","id":"W06000023","lon":-3.43532991,"lat":52.34859848,"q":1,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.65053003311462],[0.33855351509748544,65.65983784088017],[0.33855351509748544,65.67845345641128],[0.3224319191404623,65.68776126417683],[0.3063103231834392,65.67845345641128],[0.3063103231834392,65.65983784088017],[0.3224319191404623,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Donegal","lad19nmw":"Donegal","id":"I00000001","lon":-3.1,"lat":52.1,"q":-7,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.06448638382809246,65.92976426608122],[0.08060797978511558,65.93907207384677],[0.08060797978511558,65.95768768937788],[0.06448638382809246,65.96699549714343],[0.04836478787106935,65.95768768937788],[0.04836478787106935,65.93907207384677],[0.06448638382809246,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Sligo","lad19nmw":"Sligo","id":"I00000002","lon":-3.11,"lat":52.11,"q":-7,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.04836478787106935,65.90184084278455],[0.06448638382809246,65.9111486505501],[0.06448638382809246,65.92976426608121],[0.04836478787106935,65.93907207384676],[0.03224319191404623,65.92976426608121],[0.03224319191404623,65.9111486505501],[0.04836478787106935,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Mayo","lad19nmw":"Mayo","id":"I00000003","lon":-3.12,"lat":52.12,"q":-8,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.03224319191404623,65.8739174194879],[0.04836478787106935,65.88322522725345],[0.04836478787106935,65.90184084278455],[0.03224319191404623,65.9111486505501],[0.016121595957023116,65.90184084278455],[0.016121595957023116,65.88322522725345],[0.03224319191404623,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Leitrim","lad19nmw":"Leitrim","id":"I00000004","lon":-3.13,"lat":52.13,"q":-7,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.06448638382809246,65.8739174194879],[0.08060797978511558,65.88322522725345],[0.08060797978511558,65.90184084278455],[0.06448638382809246,65.9111486505501],[0.04836478787106935,65.90184084278455],[0.04836478787106935,65.88322522725345],[0.06448638382809246,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Monaghan","lad19nmw":"Monaghan","id":"I00000005","lon":-3.14,"lat":52.14,"q":-6,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.8739174194879],[0.11285117169916181,65.88322522725345],[0.11285117169916181,65.90184084278455],[0.0967295757421387,65.9111486505501],[0.08060797978511558,65.90184084278455],[0.08060797978511558,65.88322522725345],[0.0967295757421387,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Galway","lad19nmw":"Galway","id":"I00000006","lon":-3.15,"lat":52.15,"q":-8,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.016121595957023116,65.84599399619124],[0.03224319191404623,65.85530180395679],[0.03224319191404623,65.8739174194879],[0.016121595957023116,65.88322522725345],[0,65.8739174194879],[0,65.85530180395679],[0.016121595957023116,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Roscommon","lad19nmw":"Roscommon","id":"I00000007","lon":-3.16,"lat":52.16,"q":-7,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.04836478787106935,65.84599399619124],[0.06448638382809246,65.85530180395679],[0.06448638382809246,65.8739174194879],[0.04836478787106935,65.88322522725345],[0.03224319191404623,65.8739174194879],[0.03224319191404623,65.85530180395679],[0.04836478787106935,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Cavan","lad19nmw":"Cavan","id":"I00000008","lon":-3.17,"lat":52.17,"q":-6,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.08060797978511558,65.84599399619124],[0.0967295757421387,65.85530180395679],[0.0967295757421387,65.8739174194879],[0.08060797978511558,65.88322522725345],[0.06448638382809246,65.8739174194879],[0.06448638382809246,65.85530180395679],[0.08060797978511558,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Meath","lad19nmw":"Meath","id":"I00000009","lon":-3.18,"lat":52.18,"q":-5,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.11285117169916181,65.84599399619124],[0.12897276765618493,65.85530180395679],[0.12897276765618493,65.8739174194879],[0.11285117169916181,65.88322522725345],[0.0967295757421387,65.8739174194879],[0.0967295757421387,65.85530180395679],[0.11285117169916181,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Louth","lad19nmw":"Louth","id":"I00000010","lon":-3.19,"lat":52.19,"q":-4,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.14509436361320804,65.84599399619124],[0.16121595957023116,65.85530180395679],[0.16121595957023116,65.8739174194879],[0.14509436361320804,65.88322522725345],[0.12897276765618493,65.8739174194879],[0.12897276765618493,65.85530180395679],[0.14509436361320804,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Clare","lad19nmw":"Clare","id":"I00000011","lon":-3.2,"lat":52.2,"q":-8,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.03224319191404623,65.81807057289458],[0.04836478787106935,65.82737838066014],[0.04836478787106935,65.84599399619124],[0.03224319191404623,65.85530180395679],[0.016121595957023116,65.84599399619124],[0.016121595957023116,65.82737838066014],[0.03224319191404623,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Longford","lad19nmw":"Longford","id":"I00000012","lon":-3.21,"lat":52.21,"q":-7,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.06448638382809246,65.81807057289458],[0.08060797978511558,65.82737838066014],[0.08060797978511558,65.84599399619124],[0.06448638382809246,65.85530180395679],[0.04836478787106935,65.84599399619124],[0.04836478787106935,65.82737838066014],[0.06448638382809246,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Westmeath","lad19nmw":"Westmeath","id":"I00000013","lon":-3.22,"lat":52.22,"q":-6,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.81807057289458],[0.11285117169916181,65.82737838066014],[0.11285117169916181,65.84599399619124],[0.0967295757421387,65.85530180395679],[0.08060797978511558,65.84599399619124],[0.08060797978511558,65.82737838066014],[0.0967295757421387,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Kildare","lad19nmw":"Kildare","id":"I00000014","lon":-3.23,"lat":52.23,"q":-5,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.12897276765618493,65.81807057289458],[0.14509436361320804,65.82737838066014],[0.14509436361320804,65.84599399619124],[0.12897276765618493,65.85530180395679],[0.11285117169916181,65.84599399619124],[0.11285117169916181,65.82737838066014],[0.12897276765618493,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Dublin","lad19nmw":"Dublin","id":"I00000015","lon":-3.24,"lat":52.24,"q":-4,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.81807057289458],[0.17733755552725428,65.82737838066014],[0.17733755552725428,65.84599399619124],[0.16121595957023116,65.85530180395679],[0.14509436361320804,65.84599399619124],[0.14509436361320804,65.82737838066014],[0.16121595957023116,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Limerick","lad19nmw":"Limerick","id":"I00000016","lon":-3.25,"lat":52.25,"q":-7,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.04836478787106935,65.79014714959791],[0.06448638382809246,65.79945495736347],[0.06448638382809246,65.81807057289457],[0.04836478787106935,65.82737838066012],[0.03224319191404623,65.81807057289457],[0.03224319191404623,65.79945495736347],[0.04836478787106935,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Offaly","lad19nmw":"Offaly","id":"I00000017","lon":-3.26,"lat":52.26,"q":-6,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.08060797978511558,65.79014714959791],[0.0967295757421387,65.79945495736347],[0.0967295757421387,65.81807057289457],[0.08060797978511558,65.82737838066012],[0.06448638382809246,65.81807057289457],[0.06448638382809246,65.79945495736347],[0.08060797978511558,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Laois","lad19nmw":"Laois","id":"I00000018","lon":-3.27,"lat":52.27,"q":-5,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.11285117169916181,65.79014714959791],[0.12897276765618493,65.79945495736347],[0.12897276765618493,65.81807057289457],[0.11285117169916181,65.82737838066012],[0.0967295757421387,65.81807057289457],[0.0967295757421387,65.79945495736347],[0.11285117169916181,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Wicklow","lad19nmw":"Wicklow","id":"I00000019","lon":-3.28,"lat":52.28,"q":-4,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.14509436361320804,65.79014714959791],[0.16121595957023116,65.79945495736347],[0.16121595957023116,65.81807057289457],[0.14509436361320804,65.82737838066012],[0.12897276765618493,65.81807057289457],[0.12897276765618493,65.79945495736347],[0.14509436361320804,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Kerry","lad19nmw":"Kerry","id":"I00000020","lon":-3.29,"lat":52.29,"q":-8,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.03224319191404623,65.76222372630126],[0.04836478787106935,65.77153153406681],[0.04836478787106935,65.79014714959791],[0.03224319191404623,65.79945495736347],[0.016121595957023116,65.79014714959791],[0.016121595957023116,65.77153153406681],[0.03224319191404623,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Tipperary","lad19nmw":"Tipperary","id":"I00000021","lon":-3.3,"lat":52.3,"q":-7,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.06448638382809246,65.76222372630126],[0.08060797978511558,65.77153153406681],[0.08060797978511558,65.79014714959791],[0.06448638382809246,65.79945495736347],[0.04836478787106935,65.79014714959791],[0.04836478787106935,65.77153153406681],[0.06448638382809246,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Kilkenny","lad19nmw":"Kilkenny","id":"I00000022","lon":-3.31,"lat":52.31,"q":-6,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.76222372630126],[0.11285117169916181,65.77153153406681],[0.11285117169916181,65.79014714959791],[0.0967295757421387,65.79945495736347],[0.08060797978511558,65.79014714959791],[0.08060797978511558,65.77153153406681],[0.0967295757421387,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Carlow","lad19nmw":"Carlow","id":"I00000023","lon":-3.32,"lat":52.32,"q":-5,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.12897276765618493,65.76222372630126],[0.14509436361320804,65.77153153406681],[0.14509436361320804,65.79014714959791],[0.12897276765618493,65.79945495736347],[0.11285117169916181,65.79014714959791],[0.11285117169916181,65.77153153406681],[0.12897276765618493,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Wexford","lad19nmw":"Wexford","id":"I00000024","lon":-3.33,"lat":52.33,"q":-4,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.76222372630126],[0.17733755552725428,65.77153153406681],[0.17733755552725428,65.79014714959791],[0.16121595957023116,65.79945495736347],[0.14509436361320804,65.79014714959791],[0.14509436361320804,65.77153153406681],[0.16121595957023116,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Cork","lad19nmw":"Cork","id":"I00000025","lon":-3.34,"lat":52.34,"q":-7,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.04836478787106935,65.7343003030046],[0.06448638382809246,65.74360811077015],[0.06448638382809246,65.76222372630126],[0.04836478787106935,65.77153153406681],[0.03224319191404623,65.76222372630126],[0.03224319191404623,65.74360811077015],[0.04836478787106935,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Waterford","lad19nmw":"Waterford","id":"I00000026","lon":-3.35,"lat":52.35,"q":-6,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.08060797978511558,65.7343003030046],[0.0967295757421387,65.74360811077015],[0.0967295757421387,65.76222372630126],[0.08060797978511558,65.77153153406681],[0.06448638382809246,65.76222372630126],[0.06448638382809246,65.74360811077015],[0.08060797978511558,65.7343003030046]]]}}]}
================================================
FILE: Heatmaps/UKLA.geojson
================================================
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"n":"Hartlepool","id":"E06000001","lon":-1.27023005,"lat":54.67620087,"q":8,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.98561111267453],[0.4997694746677166,65.99491892044009],[0.4997694746677166,66.01353453597119],[0.4836478787106935,66.02284234373674],[0.46752628275367036,66.01353453597119],[0.46752628275367036,65.99491892044009],[0.4836478787106935,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Middlesbrough","id":"E06000002","lon":-1.21098995,"lat":54.54470062,"q":9,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.95768768937788],[0.5158910706247397,65.96699549714343],[0.5158910706247397,65.98561111267453],[0.4997694746677166,65.99491892044009],[0.4836478787106935,65.98561111267453],[0.4836478787106935,65.96699549714343],[0.4997694746677166,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Redcar and Cleveland","id":"E06000003","lon":-1.00610995,"lat":54.56750107,"q":9,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.98561111267453],[0.5320126665817628,65.99491892044009],[0.5320126665817628,66.01353453597119],[0.5158910706247397,66.02284234373674],[0.4997694746677166,66.01353453597119],[0.4997694746677166,65.99491892044009],[0.5158910706247397,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Stockton-on-Tees","id":"E06000004","lon":-1.30668998,"lat":54.55690002,"q":8,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.95768768937788],[0.4836478787106935,65.96699549714343],[0.4836478787106935,65.98561111267453],[0.46752628275367036,65.99491892044009],[0.45140468679664725,65.98561111267453],[0.45140468679664725,65.96699549714343],[0.46752628275367036,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Kingston upon Hull, City of","id":"E06000010","lon":-0.30379999,"lat":53.76979828,"q":10,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.8739174194879],[0.5642558584958091,65.88322522725345],[0.5642558584958091,65.90184084278455],[0.5481342625387859,65.9111486505501],[0.5320126665817628,65.90184084278455],[0.5320126665817628,65.88322522725345],[0.5481342625387859,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"East Riding of Yorkshire","id":"E06000011","lon":-0.66202998,"lat":53.88119888,"q":11,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.90184084278455],[0.5803774544528322,65.9111486505501],[0.5803774544528322,65.92976426608121],[0.5642558584958091,65.93907207384676],[0.5481342625387859,65.92976426608121],[0.5481342625387859,65.9111486505501],[0.5642558584958091,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Darlington","id":"E06000005","lon":-1.56834996,"lat":54.53530121,"q":7,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.95768768937788],[0.45140468679664725,65.96699549714343],[0.45140468679664725,65.98561111267453],[0.43528309083962413,65.99491892044009],[0.419161494882601,65.98561111267453],[0.419161494882601,65.96699549714343],[0.43528309083962413,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Halton","id":"E06000006","lon":-2.68852997,"lat":53.33420181,"q":1,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.76222372630126],[0.27406713126939297,65.77153153406681],[0.27406713126939297,65.79014714959791],[0.25794553531236986,65.79945495736347],[0.24182393935534674,65.79014714959791],[0.24182393935534674,65.77153153406681],[0.25794553531236986,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Slough","id":"E06000039","lon":-0.57617003,"lat":51.50350189,"q":7,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.53883633992798],[0.46752628275367036,65.54814414769353],[0.46752628275367036,65.56675976322464],[0.45140468679664725,65.57606757099019],[0.43528309083962413,65.56675976322464],[0.43528309083962413,65.54814414769353],[0.45140468679664725,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Warrington","id":"E06000007","lon":-2.56167006,"lat":53.39160156,"q":2,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.76222372630126],[0.3063103231834392,65.77153153406681],[0.3063103231834392,65.79014714959791],[0.2901887272264161,65.79945495736347],[0.27406713126939297,65.79014714959791],[0.27406713126939297,65.77153153406681],[0.2901887272264161,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Blackburn with Darwen","id":"E06000008","lon":-2.46359992,"lat":53.70080185,"q":4,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.8739174194879],[0.37079670701153167,65.88322522725345],[0.37079670701153167,65.90184084278455],[0.35467511105450855,65.9111486505501],[0.33855351509748544,65.90184084278455],[0.33855351509748544,65.88322522725345],[0.35467511105450855,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Blackpool","id":"E06000009","lon":-3.02284002,"lat":53.82160187,"q":2,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.8739174194879],[0.3063103231834392,65.88322522725345],[0.3063103231834392,65.90184084278455],[0.2901887272264161,65.9111486505501],[0.27406713126939297,65.90184084278455],[0.27406713126939297,65.88322522725345],[0.2901887272264161,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"North East Lincolnshire","id":"E06000012","lon":-0.13926999,"lat":53.52339935,"q":11,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.84599399619124],[0.5803774544528322,65.85530180395679],[0.5803774544528322,65.8739174194879],[0.5642558584958091,65.88322522725345],[0.5481342625387859,65.8739174194879],[0.5481342625387859,65.85530180395679],[0.5642558584958091,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"York","id":"E06000014","lon":-1.07375002,"lat":53.96580124,"q":9,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.92976426608122],[0.5320126665817628,65.93907207384677],[0.5320126665817628,65.95768768937788],[0.5158910706247397,65.96699549714343],[0.4997694746677166,65.95768768937788],[0.4997694746677166,65.93907207384677],[0.5158910706247397,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Derby","id":"E06000015","lon":-1.47188997,"lat":52.91460037,"q":6,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.76222372630126],[0.43528309083962413,65.77153153406681],[0.43528309083962413,65.79014714959791],[0.419161494882601,65.79945495736347],[0.4030398989255779,65.79014714959791],[0.4030398989255779,65.77153153406681],[0.419161494882601,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"North Lincolnshire","id":"E06000013","lon":-0.52410001,"lat":53.58639908,"q":10,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.84599399619124],[0.5481342625387859,65.85530180395679],[0.5481342625387859,65.8739174194879],[0.5320126665817628,65.88322522725345],[0.5158910706247397,65.8739174194879],[0.5158910706247397,65.85530180395679],[0.5320126665817628,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Leicester","id":"E06000016","lon":-1.13039994,"lat":52.63589859,"q":7,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.65053003311462],[0.46752628275367036,65.65983784088017],[0.46752628275367036,65.67845345641128],[0.45140468679664725,65.68776126417683],[0.43528309083962413,65.67845345641128],[0.43528309083962413,65.65983784088017],[0.45140468679664725,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Rutland","id":"E06000017","lon":-0.62629998,"lat":52.66759872,"q":9,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.67845345641128],[0.5158910706247397,65.68776126417683],[0.5158910706247397,65.70637687970793],[0.4997694746677166,65.71568468747348],[0.4836478787106935,65.70637687970793],[0.4836478787106935,65.68776126417683],[0.4997694746677166,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Nottingham","id":"E06000018","lon":-1.16666996,"lat":52.95420074,"q":8,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.70637687970795],[0.4997694746677166,65.7156846874735],[0.4997694746677166,65.7343003030046],[0.4836478787106935,65.74360811077015],[0.46752628275367036,65.7343003030046],[0.46752628275367036,65.7156846874735],[0.4836478787106935,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Herefordshire, County of","id":"E06000019","lon":-2.73931003,"lat":52.08150101,"q":3,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.62260660981796],[0.3224319191404623,65.63191441758352],[0.3224319191404623,65.65053003311462],[0.3063103231834392,65.65983784088017],[0.2901887272264161,65.65053003311462],[0.2901887272264161,65.63191441758352],[0.3063103231834392,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Telford and Wrekin","id":"E06000020","lon":-2.48940992,"lat":52.71419907,"q":3,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.67845345641128],[0.3224319191404623,65.68776126417683],[0.3224319191404623,65.70637687970793],[0.3063103231834392,65.71568468747348],[0.2901887272264161,65.70637687970793],[0.2901887272264161,65.68776126417683],[0.3063103231834392,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Stoke-on-Trent","id":"E06000021","lon":-2.15888,"lat":53.01710129,"q":4,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.7343003030046],[0.35467511105450855,65.74360811077015],[0.35467511105450855,65.76222372630126],[0.33855351509748544,65.77153153406681],[0.3224319191404623,65.76222372630126],[0.3224319191404623,65.74360811077015],[0.33855351509748544,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Luton","id":"E06000032","lon":-0.42319,"lat":51.89099884,"q":12,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.65053003311462],[0.6287422423239015,65.65983784088017],[0.6287422423239015,65.67845345641128],[0.6126206463668784,65.68776126417683],[0.5964990504098553,65.67845345641128],[0.5964990504098553,65.65983784088017],[0.6126206463668784,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Bath and North East Somerset","id":"E06000022","lon":-2.48654008,"lat":51.35599899,"q":3,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.51091291663133],[0.3224319191404623,65.52022072439688],[0.3224319191404623,65.53883633992798],[0.3063103231834392,65.54814414769353],[0.2901887272264161,65.53883633992798],[0.2901887272264161,65.52022072439688],[0.3063103231834392,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Southend-on-Sea","id":"E06000033","lon":0.70690602,"lat":51.54909897,"q":16,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.53883633992798],[0.7577150099800865,65.54814414769353],[0.7577150099800865,65.56675976322464],[0.7415934140230633,65.57606757099019],[0.7254718180660402,65.56675976322464],[0.7254718180660402,65.54814414769353],[0.7415934140230633,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Bristol, City of","id":"E06000023","lon":-2.57742,"lat":51.47109985,"q":2,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.51091291663133],[0.2901887272264161,65.52022072439688],[0.2901887272264161,65.53883633992798],[0.27406713126939297,65.54814414769353],[0.25794553531236986,65.53883633992798],[0.25794553531236986,65.52022072439688],[0.27406713126939297,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Brentwood","id":"E07000068","lon":0.29009101,"lat":51.64110184,"q":15,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.56675976322464],[0.7093502221090171,65.57606757099019],[0.7093502221090171,65.5946831865213],[0.693228626151994,65.60399099428685],[0.6771070301949709,65.5946831865213],[0.6771070301949709,65.57606757099019],[0.693228626151994,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"North Somerset","id":"E06000024","lon":-2.75439,"lat":51.39709854,"q":1,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.48298949333467],[0.27406713126939297,65.49229730110022],[0.27406713126939297,65.51091291663133],[0.25794553531236986,65.52022072439688],[0.24182393935534674,65.51091291663133],[0.24182393935534674,65.49229730110022],[0.25794553531236986,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Worcester","id":"E07000237","lon":-2.2102499,"lat":52.19480133,"q":4,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.56675976322464],[0.35467511105450855,65.57606757099019],[0.35467511105450855,65.5946831865213],[0.33855351509748544,65.60399099428685],[0.3224319191404623,65.5946831865213],[0.3224319191404623,65.57606757099019],[0.33855351509748544,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"South Gloucestershire","id":"E06000025","lon":-2.46921992,"lat":51.54669952,"q":1,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.53883633992798],[0.27406713126939297,65.54814414769353],[0.27406713126939297,65.56675976322464],[0.25794553531236986,65.57606757099019],[0.24182393935534674,65.56675976322464],[0.24182393935534674,65.54814414769353],[0.25794553531236986,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Brent","id":"E09000005","lon":-0.27568001,"lat":51.56439972,"q":10,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.51091291663133],[0.5481342625387859,65.52022072439688],[0.5481342625387859,65.53883633992798],[0.5320126665817628,65.54814414769353],[0.5158910706247397,65.53883633992798],[0.5158910706247397,65.52022072439688],[0.5320126665817628,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Plymouth","id":"E06000026","lon":-4.1129899,"lat":50.4048996,"q":-3,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.12897276765618493,65.37129580014803],[0.14509436361320804,65.38060360791359],[0.14509436361320804,65.39921922344469],[0.12897276765618493,65.40852703121024],[0.11285117169916181,65.39921922344469],[0.11285117169916181,65.38060360791359],[0.12897276765618493,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Thurrock","id":"E06000034","lon":0.33490199,"lat":51.50989914,"q":15,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.51091291663133],[0.7093502221090171,65.52022072439688],[0.7093502221090171,65.53883633992798],[0.693228626151994,65.54814414769353],[0.6771070301949709,65.53883633992798],[0.6771070301949709,65.52022072439688],[0.693228626151994,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Medway","id":"E06000035","lon":0.563173,"lat":51.4477005,"q":16,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.42714264674134],[0.7577150099800865,65.4364504545069],[0.7577150099800865,65.455066070038],[0.7415934140230633,65.46437387780355],[0.7254718180660402,65.455066070038],[0.7254718180660402,65.4364504545069],[0.7415934140230633,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Torbay","id":"E06000027","lon":-3.5552299,"lat":50.47090149,"q":-2,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.37129580014803],[0.17733755552725428,65.38060360791359],[0.17733755552725428,65.39921922344469],[0.16121595957023116,65.40852703121024],[0.14509436361320804,65.39921922344469],[0.14509436361320804,65.38060360791359],[0.16121595957023116,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Bracknell Forest","id":"E06000036","lon":-0.73363,"lat":51.41130066,"q":6,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.48298949333467],[0.43528309083962413,65.49229730110022],[0.43528309083962413,65.51091291663133],[0.419161494882601,65.52022072439688],[0.4030398989255779,65.51091291663133],[0.4030398989255779,65.49229730110022],[0.419161494882601,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Kingston upon Thames","id":"E09000021","lon":-0.28367001,"lat":51.39300156,"q":9,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.42714264674134],[0.5320126665817628,65.4364504545069],[0.5320126665817628,65.455066070038],[0.5158910706247397,65.46437387780355],[0.4997694746677166,65.455066070038],[0.4997694746677166,65.4364504545069],[0.5158910706247397,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Swindon","id":"E06000030","lon":-1.73367,"lat":51.57759857,"q":4,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.51091291663133],[0.35467511105450855,65.52022072439688],[0.35467511105450855,65.53883633992798],[0.33855351509748544,65.54814414769353],[0.3224319191404623,65.53883633992798],[0.3224319191404623,65.52022072439688],[0.33855351509748544,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Peterborough","id":"E06000031","lon":-0.26874,"lat":52.59209824,"q":13,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.70637687970795],[0.6609854342379478,65.7156846874735],[0.6609854342379478,65.7343003030046],[0.6448638382809246,65.74360811077015],[0.6287422423239015,65.7343003030046],[0.6287422423239015,65.7156846874735],[0.6448638382809246,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"West Berkshire","id":"E06000037","lon":-1.27364004,"lat":51.4455986,"q":4,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.48298949333467],[0.37079670701153167,65.49229730110022],[0.37079670701153167,65.51091291663133],[0.35467511105450855,65.52022072439688],[0.33855351509748544,65.51091291663133],[0.33855351509748544,65.49229730110022],[0.35467511105450855,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Reading","id":"E06000038","lon":-0.99071002,"lat":51.45299911,"q":5,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.48298949333467],[0.4030398989255779,65.49229730110022],[0.4030398989255779,65.51091291663133],[0.3869183029685548,65.52022072439688],[0.37079670701153167,65.51091291663133],[0.37079670701153167,65.49229730110022],[0.3869183029685548,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Windsor and Maidenhead","id":"E06000040","lon":-0.67540997,"lat":51.4803009,"q":8,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.53883633992798],[0.4997694746677166,65.54814414769353],[0.4997694746677166,65.56675976322464],[0.4836478787106935,65.57606757099019],[0.46752628275367036,65.56675976322464],[0.46752628275367036,65.54814414769353],[0.4836478787106935,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Wokingham","id":"E06000041","lon":-0.89934999,"lat":51.42300034,"q":7,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.51091291663133],[0.45140468679664725,65.52022072439688],[0.45140468679664725,65.53883633992798],[0.43528309083962413,65.54814414769353],[0.419161494882601,65.53883633992798],[0.419161494882601,65.52022072439688],[0.43528309083962413,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Lambeth","id":"E09000022","lon":-0.11385,"lat":51.46440125,"q":11,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.455066070038],[0.5803774544528322,65.46437387780355],[0.5803774544528322,65.48298949333466],[0.5642558584958091,65.49229730110021],[0.5481342625387859,65.48298949333466],[0.5481342625387859,65.46437387780355],[0.5642558584958091,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Milton Keynes","id":"E06000042","lon":-0.74070001,"lat":52.07239914,"q":10,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.65053003311462],[0.5642558584958091,65.65983784088017],[0.5642558584958091,65.67845345641128],[0.5481342625387859,65.68776126417683],[0.5320126665817628,65.67845345641128],[0.5320126665817628,65.65983784088017],[0.5481342625387859,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Brighton and Hove","id":"E06000043","lon":-0.15079001,"lat":50.8465004,"q":11,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.34337237685136],[0.5803774544528322,65.35268018461691],[0.5803774544528322,65.37129580014802],[0.5642558584958091,65.38060360791357],[0.5481342625387859,65.37129580014802],[0.5481342625387859,65.35268018461691],[0.5642558584958091,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Bromley","id":"E09000006","lon":0.039246,"lat":51.37269974,"q":12,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.42714264674134],[0.6287422423239015,65.4364504545069],[0.6287422423239015,65.455066070038],[0.6126206463668784,65.46437387780355],[0.5964990504098553,65.455066070038],[0.5964990504098553,65.4364504545069],[0.6126206463668784,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Portsmouth","id":"E06000044","lon":-1.07023001,"lat":50.80799866,"q":5,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.39921922344469],[0.3869183029685548,65.40852703121024],[0.3869183029685548,65.42714264674134],[0.37079670701153167,65.4364504545069],[0.35467511105450855,65.42714264674134],[0.35467511105450855,65.40852703121024],[0.37079670701153167,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Southampton","id":"E06000045","lon":-1.40024996,"lat":50.92039871,"q":3,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.455066070038],[0.3224319191404623,65.46437387780355],[0.3224319191404623,65.48298949333466],[0.3063103231834392,65.49229730110021],[0.2901887272264161,65.48298949333466],[0.2901887272264161,65.46437387780355],[0.3063103231834392,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Isle of Wight","id":"E06000046","lon":-1.33366001,"lat":50.67129898,"q":2,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.37129580014803],[0.3063103231834392,65.38060360791359],[0.3063103231834392,65.39921922344469],[0.2901887272264161,65.40852703121024],[0.27406713126939297,65.39921922344469],[0.27406713126939297,65.38060360791359],[0.2901887272264161,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"County Durham","id":"E06000047","lon":-1.8405,"lat":54.68510056,"q":6,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.95768768937788],[0.419161494882601,65.96699549714343],[0.419161494882601,65.98561111267453],[0.4030398989255779,65.99491892044009],[0.3869183029685548,65.98561111267453],[0.3869183029685548,65.96699549714343],[0.4030398989255779,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Cheshire East","id":"E06000049","lon":-2.29298997,"lat":53.16790009,"q":4,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.76222372630126],[0.37079670701153167,65.77153153406681],[0.37079670701153167,65.79014714959791],[0.35467511105450855,65.79945495736347],[0.33855351509748544,65.79014714959791],[0.33855351509748544,65.77153153406681],[0.35467511105450855,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Cheshire West and Chester","id":"E06000050","lon":-2.70298004,"lat":53.16339874,"q":3,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.76222372630126],[0.33855351509748544,65.77153153406681],[0.33855351509748544,65.79014714959791],[0.3224319191404623,65.79945495736347],[0.3063103231834392,65.79014714959791],[0.3063103231834392,65.77153153406681],[0.3224319191404623,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Shropshire","id":"E06000051","lon":-2.73667002,"lat":52.62210083,"q":2,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.65053003311462],[0.3063103231834392,65.65983784088017],[0.3063103231834392,65.67845345641128],[0.2901887272264161,65.68776126417683],[0.27406713126939297,65.67845345641128],[0.27406713126939297,65.65983784088017],[0.2901887272264161,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Cornwall","id":"E06000052","lon":-4.64248991,"lat":50.45019913,"q":-4,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.37129580014803],[0.11285117169916181,65.38060360791359],[0.11285117169916181,65.39921922344469],[0.0967295757421387,65.40852703121024],[0.08060797978511558,65.39921922344469],[0.08060797978511558,65.38060360791359],[0.0967295757421387,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Isles of Scilly","id":"E06000053","lon":-6.3021698,"lat":49.9233017,"q":-5,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.04836478787106935,65.34337237685136],[0.06448638382809246,65.35268018461691],[0.06448638382809246,65.37129580014802],[0.04836478787106935,65.38060360791357],[0.03224319191404623,65.37129580014802],[0.03224319191404623,65.35268018461691],[0.04836478787106935,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Wiltshire","id":"E06000054","lon":-1.92660999,"lat":51.3288002,"q":2,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.48298949333467],[0.3063103231834392,65.49229730110022],[0.3063103231834392,65.51091291663133],[0.2901887272264161,65.52022072439688],[0.27406713126939297,65.51091291663133],[0.27406713126939297,65.49229730110022],[0.2901887272264161,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Camden","id":"E09000007","lon":-0.16289,"lat":51.54309845,"q":11,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.53883633992798],[0.5964990504098553,65.54814414769353],[0.5964990504098553,65.56675976322464],[0.5803774544528322,65.57606757099019],[0.5642558584958091,65.56675976322464],[0.5642558584958091,65.54814414769353],[0.5803774544528322,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Bedford","id":"E06000055","lon":-0.45462999,"lat":52.19630051,"q":12,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.67845345641128],[0.6126206463668784,65.68776126417683],[0.6126206463668784,65.70637687970793],[0.5964990504098553,65.71568468747348],[0.5803774544528322,65.70637687970793],[0.5803774544528322,65.68776126417683],[0.5964990504098553,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Chiltern","id":"E07000005","lon":-0.62111998,"lat":51.67890167,"q":9,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.59468318652131],[0.5320126665817628,65.60399099428686],[0.5320126665817628,65.62260660981796],[0.5158910706247397,65.63191441758352],[0.4997694746677166,65.62260660981796],[0.4997694746677166,65.60399099428686],[0.5158910706247397,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Central Bedfordshire","id":"E06000056","lon":-0.47753999,"lat":51.99900055,"q":11,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.65053003311462],[0.5964990504098553,65.65983784088017],[0.5964990504098553,65.67845345641128],[0.5803774544528322,65.68776126417683],[0.5642558584958091,65.67845345641128],[0.5642558584958091,65.65983784088017],[0.5803774544528322,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Northumberland","id":"E06000057","lon":-2.07521009,"lat":55.30039978,"q":5,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,66.01353453597119],[0.3869183029685548,66.02284234373674],[0.3869183029685548,66.04145795926785],[0.37079670701153167,66.0507657670334],[0.35467511105450855,66.04145795926785],[0.35467511105450855,66.02284234373674],[0.37079670701153167,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Bournemouth, Christchurch and Poole","id":"E06000058","lon":-1.84807003,"lat":50.74610138,"q":1,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.42714264674134],[0.27406713126939297,65.4364504545069],[0.27406713126939297,65.455066070038],[0.25794553531236986,65.46437387780355],[0.24182393935534674,65.455066070038],[0.24182393935534674,65.4364504545069],[0.25794553531236986,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Dorset","id":"E06000059","lon":-2.41466999,"lat":50.79700089,"q":0,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.42714264674134],[0.24182393935534674,65.4364504545069],[0.24182393935534674,65.455066070038],[0.22570234339832362,65.46437387780355],[0.2095807474413005,65.455066070038],[0.2095807474413005,65.4364504545069],[0.22570234339832362,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Aylesbury Vale","id":"E07000004","lon":-0.87746,"lat":51.90039825,"q":10,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.62260660981796],[0.5481342625387859,65.63191441758352],[0.5481342625387859,65.65053003311462],[0.5320126665817628,65.65983784088017],[0.5158910706247397,65.65053003311462],[0.5158910706247397,65.63191441758352],[0.5320126665817628,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Croydon","id":"E09000008","lon":-0.07761,"lat":51.36600113,"q":12,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.39921922344469],[0.6126206463668784,65.40852703121024],[0.6126206463668784,65.42714264674134],[0.5964990504098553,65.4364504545069],[0.5803774544528322,65.42714264674134],[0.5803774544528322,65.40852703121024],[0.5964990504098553,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"South Bucks","id":"E07000006","lon":-0.58484,"lat":51.55939865,"q":9,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.56675976322464],[0.5158910706247397,65.57606757099019],[0.5158910706247397,65.5946831865213],[0.4997694746677166,65.60399099428685],[0.4836478787106935,65.5946831865213],[0.4836478787106935,65.57606757099019],[0.4997694746677166,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Wycombe","id":"E07000007","lon":-0.80883002,"lat":51.66619873,"q":8,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.56675976322464],[0.4836478787106935,65.57606757099019],[0.4836478787106935,65.5946831865213],[0.46752628275367036,65.60399099428685],[0.45140468679664725,65.5946831865213],[0.45140468679664725,65.57606757099019],[0.46752628275367036,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Cambridge","id":"E07000008","lon":0.126436,"lat":52.20019913,"q":14,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.67845345641128],[0.6771070301949709,65.68776126417683],[0.6771070301949709,65.70637687970793],[0.6609854342379478,65.71568468747348],[0.6448638382809246,65.70637687970793],[0.6448638382809246,65.68776126417683],[0.6609854342379478,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"East Cambridgeshire","id":"E07000009","lon":0.28316301,"lat":52.35789871,"q":14,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.70637687970795],[0.693228626151994,65.7156846874735],[0.693228626151994,65.7343003030046],[0.6771070301949709,65.74360811077015],[0.6609854342379478,65.7343003030046],[0.6609854342379478,65.7156846874735],[0.6771070301949709,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Basildon","id":"E07000066","lon":0.47505501,"lat":51.5904007,"q":16,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.56675976322464],[0.7415934140230633,65.57606757099019],[0.7415934140230633,65.5946831865213],[0.7254718180660402,65.60399099428685],[0.7093502221090171,65.5946831865213],[0.7093502221090171,65.57606757099019],[0.7254718180660402,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Fenland","id":"E07000010","lon":0.009016,"lat":52.53540039,"q":13,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.7343003030046],[0.6448638382809246,65.74360811077015],[0.6448638382809246,65.76222372630126],[0.6287422423239015,65.77153153406681],[0.6126206463668784,65.76222372630126],[0.6126206463668784,65.74360811077015],[0.6287422423239015,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Bolsover","id":"E07000033","lon":-1.27227998,"lat":53.23880005,"q":8,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.76222372630126],[0.4997694746677166,65.77153153406681],[0.4997694746677166,65.79014714959791],[0.4836478787106935,65.79945495736347],[0.46752628275367036,65.79014714959791],[0.46752628275367036,65.77153153406681],[0.4836478787106935,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Huntingdonshire","id":"E07000011","lon":-0.22466999,"lat":52.35319901,"q":13,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.67845345641128],[0.6448638382809246,65.68776126417683],[0.6448638382809246,65.70637687970793],[0.6287422423239015,65.71568468747348],[0.6126206463668784,65.70637687970793],[0.6126206463668784,65.68776126417683],[0.6287422423239015,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Ealing","id":"E09000009","lon":-0.31406999,"lat":51.5243988,"q":10,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.53883633992798],[0.5642558584958091,65.54814414769353],[0.5642558584958091,65.56675976322464],[0.5481342625387859,65.57606757099019],[0.5320126665817628,65.56675976322464],[0.5320126665817628,65.54814414769353],[0.5481342625387859,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"South Cambridgeshire","id":"E07000012","lon":0.091017,"lat":52.10810089,"q":13,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.65053003311462],[0.6609854342379478,65.65983784088017],[0.6609854342379478,65.67845345641128],[0.6448638382809246,65.68776126417683],[0.6287422423239015,65.67845345641128],[0.6287422423239015,65.65983784088017],[0.6448638382809246,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Allerdale","id":"E07000026","lon":-3.28096008,"lat":54.68519974,"q":4,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.95768768937788],[0.35467511105450855,65.96699549714343],[0.35467511105450855,65.98561111267453],[0.33855351509748544,65.99491892044009],[0.3224319191404623,65.98561111267453],[0.3224319191404623,65.96699549714343],[0.33855351509748544,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Barrow-in-Furness","id":"E07000027","lon":-3.19975996,"lat":54.15739822,"q":2,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.92976426608122],[0.3063103231834392,65.93907207384677],[0.3063103231834392,65.95768768937788],[0.2901887272264161,65.96699549714343],[0.27406713126939297,65.95768768937788],[0.27406713126939297,65.93907207384677],[0.2901887272264161,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Carlisle","id":"E07000028","lon":-2.80704999,"lat":54.97869873,"q":4,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.98561111267453],[0.37079670701153167,65.99491892044009],[0.37079670701153167,66.01353453597119],[0.35467511105450855,66.02284234373674],[0.33855351509748544,66.01353453597119],[0.33855351509748544,65.99491892044009],[0.35467511105450855,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Copeland","id":"E07000029","lon":-3.37664008,"lat":54.46620178,"q":3,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.95768768937788],[0.3224319191404623,65.96699549714343],[0.3224319191404623,65.98561111267453],[0.3063103231834392,65.99491892044009],[0.2901887272264161,65.98561111267453],[0.2901887272264161,65.96699549714343],[0.3063103231834392,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Chesterfield","id":"E07000034","lon":-1.40114999,"lat":53.25569916,"q":9,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.79014714959791],[0.5158910706247397,65.79945495736347],[0.5158910706247397,65.81807057289457],[0.4997694746677166,65.82737838066012],[0.4836478787106935,65.81807057289457],[0.4836478787106935,65.79945495736347],[0.4997694746677166,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Derbyshire Dales","id":"E07000035","lon":-1.70711005,"lat":53.12329865,"q":7,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.79014714959791],[0.45140468679664725,65.79945495736347],[0.45140468679664725,65.81807057289457],[0.43528309083962413,65.82737838066012],[0.419161494882601,65.81807057289457],[0.419161494882601,65.79945495736347],[0.43528309083962413,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Eden","id":"E07000030","lon":-2.62678003,"lat":54.6310997,"q":5,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.95768768937788],[0.3869183029685548,65.96699549714343],[0.3869183029685548,65.98561111267453],[0.37079670701153167,65.99491892044009],[0.35467511105450855,65.98561111267453],[0.35467511105450855,65.96699549714343],[0.37079670701153167,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"South Lakeland","id":"E07000031","lon":-2.78108001,"lat":54.29909897,"q":4,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.92976426608122],[0.37079670701153167,65.93907207384677],[0.37079670701153167,65.95768768937788],[0.35467511105450855,65.96699549714343],[0.33855351509748544,65.95768768937788],[0.33855351509748544,65.93907207384677],[0.35467511105450855,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Amber Valley","id":"E07000032","lon":-1.46219003,"lat":53.02880096,"q":7,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.76222372630126],[0.46752628275367036,65.77153153406681],[0.46752628275367036,65.79014714959791],[0.45140468679664725,65.79945495736347],[0.43528309083962413,65.79014714959791],[0.43528309083962413,65.77153153406681],[0.45140468679664725,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Erewash","id":"E07000036","lon":-1.35090005,"lat":52.9382019,"q":7,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.7343003030046],[0.45140468679664725,65.74360811077015],[0.45140468679664725,65.76222372630126],[0.43528309083962413,65.77153153406681],[0.419161494882601,65.76222372630126],[0.419161494882601,65.74360811077015],[0.43528309083962413,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"High Peak","id":"E07000037","lon":-1.84397995,"lat":53.38570023,"q":7,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.81807057289458],[0.46752628275367036,65.82737838066014],[0.46752628275367036,65.84599399619124],[0.45140468679664725,65.85530180395679],[0.43528309083962413,65.84599399619124],[0.43528309083962413,65.82737838066014],[0.45140468679664725,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Exeter","id":"E07000041","lon":-3.51372004,"lat":50.71780014,"q":-1,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.17733755552725428,65.39921922344469],[0.1934591514842774,65.40852703121024],[0.1934591514842774,65.42714264674134],[0.17733755552725428,65.4364504545069],[0.16121595957023116,65.42714264674134],[0.16121595957023116,65.40852703121024],[0.17733755552725428,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Mid Devon","id":"E07000042","lon":-3.59211993,"lat":50.86880112,"q":-1,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.1934591514842774,65.42714264674134],[0.2095807474413005,65.4364504545069],[0.2095807474413005,65.455066070038],[0.1934591514842774,65.46437387780355],[0.17733755552725428,65.455066070038],[0.17733755552725428,65.4364504545069],[0.1934591514842774,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"North Devon","id":"E07000043","lon":-3.92690992,"lat":51.0760994,"q":-1,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.17733755552725428,65.455066070038],[0.1934591514842774,65.46437387780355],[0.1934591514842774,65.48298949333466],[0.17733755552725428,65.49229730110021],[0.16121595957023116,65.48298949333466],[0.16121595957023116,65.46437387780355],[0.17733755552725428,65.455066070038]]]}},{"type":"Feature","properties":{"n":"South Hams","id":"E07000044","lon":-3.81994009,"lat":50.37189865,"q":-2,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.14509436361320804,65.34337237685136],[0.16121595957023116,65.35268018461691],[0.16121595957023116,65.37129580014802],[0.14509436361320804,65.38060360791357],[0.12897276765618493,65.37129580014802],[0.12897276765618493,65.35268018461691],[0.14509436361320804,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"North East Derbyshire","id":"E07000038","lon":-1.44253004,"lat":53.16239929,"q":8,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.79014714959791],[0.4836478787106935,65.79945495736347],[0.4836478787106935,65.81807057289457],[0.46752628275367036,65.82737838066012],[0.45140468679664725,65.81807057289457],[0.45140468679664725,65.79945495736347],[0.46752628275367036,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Eastbourne","id":"E07000061","lon":0.258699,"lat":50.77410126,"q":14,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.34337237685136],[0.6771070301949709,65.35268018461691],[0.6771070301949709,65.37129580014802],[0.6609854342379478,65.38060360791357],[0.6448638382809246,65.37129580014802],[0.6448638382809246,65.35268018461691],[0.6609854342379478,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"South Derbyshire","id":"E07000039","lon":-1.53494,"lat":52.82490158,"q":6,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.7343003030046],[0.419161494882601,65.74360811077015],[0.419161494882601,65.76222372630126],[0.4030398989255779,65.77153153406681],[0.3869183029685548,65.76222372630126],[0.3869183029685548,65.74360811077015],[0.4030398989255779,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Hastings","id":"E07000062","lon":0.57942897,"lat":50.86769867,"q":14,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.37129580014803],[0.693228626151994,65.38060360791359],[0.693228626151994,65.39921922344469],[0.6771070301949709,65.40852703121024],[0.6609854342379478,65.39921922344469],[0.6609854342379478,65.38060360791359],[0.6771070301949709,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"East Devon","id":"E07000040","lon":-3.22380996,"lat":50.75759888,"q":0,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,65.39921922344469],[0.22570234339832362,65.40852703121024],[0.22570234339832362,65.42714264674134],[0.2095807474413005,65.4364504545069],[0.1934591514842774,65.42714264674134],[0.1934591514842774,65.40852703121024],[0.2095807474413005,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Teignbridge","id":"E07000045","lon":-3.65395999,"lat":50.61019897,"q":-1,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.1934591514842774,65.37129580014803],[0.2095807474413005,65.38060360791359],[0.2095807474413005,65.39921922344469],[0.1934591514842774,65.40852703121024],[0.17733755552725428,65.39921922344469],[0.17733755552725428,65.38060360791359],[0.1934591514842774,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Torridge","id":"E07000046","lon":-4.21730995,"lat":50.90800095,"q":-2,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.14509436361320804,65.39921922344469],[0.16121595957023116,65.40852703121024],[0.16121595957023116,65.42714264674134],[0.14509436361320804,65.4364504545069],[0.12897276765618493,65.42714264674134],[0.12897276765618493,65.40852703121024],[0.14509436361320804,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"West Devon","id":"E07000047","lon":-4.03356981,"lat":50.66490173,"q":-2,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.42714264674134],[0.17733755552725428,65.4364504545069],[0.17733755552725428,65.455066070038],[0.16121595957023116,65.46437387780355],[0.14509436361320804,65.455066070038],[0.14509436361320804,65.4364504545069],[0.16121595957023116,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Lewes","id":"E07000063","lon":0.007671,"lat":50.83340073,"q":12,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.34337237685136],[0.6126206463668784,65.35268018461691],[0.6126206463668784,65.37129580014802],[0.5964990504098553,65.38060360791357],[0.5803774544528322,65.37129580014802],[0.5803774544528322,65.35268018461691],[0.5964990504098553,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Enfield","id":"E09000010","lon":-0.08147,"lat":51.64889908,"q":12,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.56675976322464],[0.6126206463668784,65.57606757099019],[0.6126206463668784,65.5946831865213],[0.5964990504098553,65.60399099428685],[0.5803774544528322,65.5946831865213],[0.5803774544528322,65.57606757099019],[0.5964990504098553,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Rother","id":"E07000064","lon":0.543064,"lat":50.94869995,"q":13,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.37129580014803],[0.6609854342379478,65.38060360791359],[0.6609854342379478,65.39921922344469],[0.6448638382809246,65.40852703121024],[0.6287422423239015,65.39921922344469],[0.6287422423239015,65.38060360791359],[0.6448638382809246,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Wealden","id":"E07000065","lon":0.205153,"lat":50.93320084,"q":13,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.34337237685136],[0.6448638382809246,65.35268018461691],[0.6448638382809246,65.37129580014802],[0.6287422423239015,65.38060360791357],[0.6126206463668784,65.37129580014802],[0.6126206463668784,65.35268018461691],[0.6287422423239015,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Greenwich","id":"E09000011","lon":0.050108,"lat":51.4640007,"q":14,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.455066070038],[0.6771070301949709,65.46437387780355],[0.6771070301949709,65.48298949333466],[0.6609854342379478,65.49229730110021],[0.6448638382809246,65.48298949333466],[0.6448638382809246,65.46437387780355],[0.6609854342379478,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Braintree","id":"E07000067","lon":0.57591099,"lat":51.91630173,"q":16,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.62260660981796],[0.7415934140230633,65.63191441758352],[0.7415934140230633,65.65053003311462],[0.7254718180660402,65.65983784088017],[0.7093502221090171,65.65053003311462],[0.7093502221090171,65.63191441758352],[0.7254718180660402,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Hackney","id":"E09000012","lon":-0.06045,"lat":51.55490112,"q":13,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.51091291663133],[0.6448638382809246,65.52022072439688],[0.6448638382809246,65.53883633992798],[0.6287422423239015,65.54814414769353],[0.6126206463668784,65.53883633992798],[0.6126206463668784,65.52022072439688],[0.6287422423239015,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Castle Point","id":"E07000069","lon":0.58808398,"lat":51.56159973,"q":16,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.51091291663133],[0.7415934140230633,65.52022072439688],[0.7415934140230633,65.53883633992798],[0.7254718180660402,65.54814414769353],[0.7093502221090171,65.53883633992798],[0.7093502221090171,65.52022072439688],[0.7254718180660402,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Chelmsford","id":"E07000070","lon":0.49116299,"lat":51.73500061,"q":15,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.59468318652131],[0.7254718180660402,65.60399099428686],[0.7254718180660402,65.62260660981796],[0.7093502221090171,65.63191441758352],[0.693228626151994,65.62260660981796],[0.693228626151994,65.60399099428686],[0.7093502221090171,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Colchester","id":"E07000071","lon":0.85977602,"lat":51.8769989,"q":17,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.62260660981796],[0.7738366059371096,65.63191441758352],[0.7738366059371096,65.65053003311462],[0.7577150099800865,65.65983784088017],[0.7415934140230633,65.65053003311462],[0.7415934140230633,65.63191441758352],[0.7577150099800865,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Epping Forest","id":"E07000072","lon":0.154147,"lat":51.71279907,"q":14,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.53883633992798],[0.693228626151994,65.54814414769353],[0.693228626151994,65.56675976322464],[0.6771070301949709,65.57606757099019],[0.6609854342379478,65.56675976322464],[0.6609854342379478,65.54814414769353],[0.6771070301949709,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Harlow","id":"E07000073","lon":0.103888,"lat":51.76610184,"q":15,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.53883633992798],[0.7254718180660402,65.54814414769353],[0.7254718180660402,65.56675976322464],[0.7093502221090171,65.57606757099019],[0.693228626151994,65.56675976322464],[0.693228626151994,65.54814414769353],[0.7093502221090171,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Maldon","id":"E07000074","lon":0.773857,"lat":51.77569962,"q":16,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.59468318652131],[0.7577150099800865,65.60399099428686],[0.7577150099800865,65.62260660981796],[0.7415934140230633,65.63191441758352],[0.7254718180660402,65.62260660981796],[0.7254718180660402,65.60399099428686],[0.7415934140230633,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Fareham","id":"E07000087","lon":-1.23741996,"lat":50.85390091,"q":4,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.455066070038],[0.35467511105450855,65.46437387780355],[0.35467511105450855,65.48298949333466],[0.33855351509748544,65.49229730110021],[0.3224319191404623,65.48298949333466],[0.3224319191404623,65.46437387780355],[0.33855351509748544,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Rochford","id":"E07000075","lon":0.68347299,"lat":51.59090042,"q":17,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.56675976322464],[0.7738366059371096,65.57606757099019],[0.7738366059371096,65.5946831865213],[0.7577150099800865,65.60399099428685],[0.7415934140230633,65.5946831865213],[0.7415934140230633,65.57606757099019],[0.7577150099800865,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Tendring","id":"E07000076","lon":1.10917997,"lat":51.85689926,"q":16,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.65053003311462],[0.7577150099800865,65.65983784088017],[0.7577150099800865,65.67845345641128],[0.7415934140230633,65.68776126417683],[0.7254718180660402,65.67845345641128],[0.7254718180660402,65.65983784088017],[0.7415934140230633,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Uttlesford","id":"E07000077","lon":0.294485,"lat":51.93590164,"q":15,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.62260660981796],[0.7093502221090171,65.63191441758352],[0.7093502221090171,65.65053003311462],[0.693228626151994,65.65983784088017],[0.6771070301949709,65.65053003311462],[0.6771070301949709,65.63191441758352],[0.693228626151994,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Cheltenham","id":"E07000078","lon":-2.07515001,"lat":51.89860153,"q":4,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.53883633992798],[0.37079670701153167,65.54814414769353],[0.37079670701153167,65.56675976322464],[0.35467511105450855,65.57606757099019],[0.33855351509748544,65.56675976322464],[0.33855351509748544,65.54814414769353],[0.35467511105450855,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Cotswold","id":"E07000079","lon":-1.97059,"lat":51.77249908,"q":3,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.53883633992798],[0.33855351509748544,65.54814414769353],[0.33855351509748544,65.56675976322464],[0.3224319191404623,65.57606757099019],[0.3063103231834392,65.56675976322464],[0.3063103231834392,65.54814414769353],[0.3224319191404623,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Hammersmith and Fulham","id":"E09000013","lon":-0.21736,"lat":51.48740005,"q":9,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.48298949333467],[0.5320126665817628,65.49229730110022],[0.5320126665817628,65.51091291663133],[0.5158910706247397,65.52022072439688],[0.4997694746677166,65.51091291663133],[0.4997694746677166,65.49229730110022],[0.5158910706247397,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Forest of Dean","id":"E07000080","lon":-2.47755003,"lat":51.8125,"q":2,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.59468318652131],[0.3063103231834392,65.60399099428686],[0.3063103231834392,65.62260660981796],[0.2901887272264161,65.63191441758352],[0.27406713126939297,65.62260660981796],[0.27406713126939297,65.60399099428686],[0.2901887272264161,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Gloucester","id":"E07000081","lon":-2.23263001,"lat":51.84640121,"q":2,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.56675976322464],[0.2901887272264161,65.57606757099019],[0.2901887272264161,65.5946831865213],[0.27406713126939297,65.60399099428685],[0.25794553531236986,65.5946831865213],[0.25794553531236986,65.57606757099019],[0.27406713126939297,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Stroud","id":"E07000082","lon":-2.30819988,"lat":51.72000122,"q":2,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.53883633992798],[0.3063103231834392,65.54814414769353],[0.3063103231834392,65.56675976322464],[0.2901887272264161,65.57606757099019],[0.27406713126939297,65.56675976322464],[0.27406713126939297,65.54814414769353],[0.2901887272264161,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Gosport","id":"E07000088","lon":-1.16725004,"lat":50.8064003,"q":4,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.39921922344469],[0.35467511105450855,65.40852703121024],[0.35467511105450855,65.42714264674134],[0.33855351509748544,65.4364504545069],[0.3224319191404623,65.42714264674134],[0.3224319191404623,65.40852703121024],[0.33855351509748544,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Tewkesbury","id":"E07000083","lon":-2.19998002,"lat":51.93479919,"q":3,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.56675976322464],[0.3224319191404623,65.57606757099019],[0.3224319191404623,65.5946831865213],[0.3063103231834392,65.60399099428685],[0.2901887272264161,65.5946831865213],[0.2901887272264161,65.57606757099019],[0.3063103231834392,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Haringey","id":"E09000014","lon":-0.10667,"lat":51.58769989,"q":12,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.53883633992798],[0.6287422423239015,65.54814414769353],[0.6287422423239015,65.56675976322464],[0.6126206463668784,65.57606757099019],[0.5964990504098553,65.56675976322464],[0.5964990504098553,65.54814414769353],[0.6126206463668784,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Basingstoke and Deane","id":"E07000084","lon":-1.22020996,"lat":51.25939941,"q":5,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.455066070038],[0.3869183029685548,65.46437387780355],[0.3869183029685548,65.48298949333466],[0.37079670701153167,65.49229730110021],[0.35467511105450855,65.48298949333466],[0.35467511105450855,65.46437387780355],[0.37079670701153167,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Hart","id":"E07000089","lon":-0.88321,"lat":51.2820015,"q":6,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.455066070038],[0.419161494882601,65.46437387780355],[0.419161494882601,65.48298949333466],[0.4030398989255779,65.49229730110021],[0.3869183029685548,65.48298949333466],[0.3869183029685548,65.46437387780355],[0.4030398989255779,65.455066070038]]]}},{"type":"Feature","properties":{"n":"East Hampshire","id":"E07000085","lon":-0.93971002,"lat":51.05770111,"q":5,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.42714264674134],[0.4030398989255779,65.4364504545069],[0.4030398989255779,65.455066070038],[0.3869183029685548,65.46437387780355],[0.37079670701153167,65.455066070038],[0.37079670701153167,65.4364504545069],[0.3869183029685548,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Eastleigh","id":"E07000086","lon":-1.32942998,"lat":50.94869995,"q":3,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.42714264674134],[0.33855351509748544,65.4364504545069],[0.33855351509748544,65.455066070038],[0.3224319191404623,65.46437387780355],[0.3063103231834392,65.455066070038],[0.3063103231834392,65.4364504545069],[0.3224319191404623,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Havant","id":"E07000090","lon":-1.00399995,"lat":50.87229919,"q":6,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.39921922344469],[0.419161494882601,65.40852703121024],[0.419161494882601,65.42714264674134],[0.4030398989255779,65.4364504545069],[0.3869183029685548,65.42714264674134],[0.3869183029685548,65.40852703121024],[0.4030398989255779,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"New Forest","id":"E07000091","lon":-1.58936,"lat":50.85749817,"q":2,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.42714264674134],[0.3063103231834392,65.4364504545069],[0.3063103231834392,65.455066070038],[0.2901887272264161,65.46437387780355],[0.27406713126939297,65.455066070038],[0.27406713126939297,65.4364504545069],[0.2901887272264161,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Rushmoor","id":"E07000092","lon":-0.76806998,"lat":51.27809906,"q":7,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.455066070038],[0.45140468679664725,65.46437387780355],[0.45140468679664725,65.48298949333466],[0.43528309083962413,65.49229730110021],[0.419161494882601,65.48298949333466],[0.419161494882601,65.46437387780355],[0.43528309083962413,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Watford","id":"E07000103","lon":-0.40428999,"lat":51.67169952,"q":11,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.59468318652131],[0.5964990504098553,65.60399099428686],[0.5964990504098553,65.62260660981796],[0.5803774544528322,65.63191441758352],[0.5642558584958091,65.62260660981796],[0.5642558584958091,65.60399099428686],[0.5803774544528322,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Test Valley","id":"E07000093","lon":-1.50214005,"lat":51.13420105,"q":3,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.48298949333467],[0.33855351509748544,65.49229730110022],[0.33855351509748544,65.51091291663133],[0.3224319191404623,65.52022072439688],[0.3063103231834392,65.51091291663133],[0.3063103231834392,65.49229730110022],[0.3224319191404623,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Harrow","id":"E09000015","lon":-0.33603001,"lat":51.59469986,"q":10,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.56675976322464],[0.5481342625387859,65.57606757099019],[0.5481342625387859,65.5946831865213],[0.5320126665817628,65.60399099428685],[0.5158910706247397,65.5946831865213],[0.5158910706247397,65.57606757099019],[0.5320126665817628,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Winchester","id":"E07000094","lon":-1.24392998,"lat":51.02999878,"q":4,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.42714264674134],[0.37079670701153167,65.4364504545069],[0.37079670701153167,65.455066070038],[0.35467511105450855,65.46437387780355],[0.33855351509748544,65.455066070038],[0.33855351509748544,65.4364504545069],[0.35467511105450855,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Broxbourne","id":"E07000095","lon":-0.05073,"lat":51.72079849,"q":14,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.56675976322464],[0.6771070301949709,65.57606757099019],[0.6771070301949709,65.5946831865213],[0.6609854342379478,65.60399099428685],[0.6448638382809246,65.5946831865213],[0.6448638382809246,65.57606757099019],[0.6609854342379478,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Dacorum","id":"E07000096","lon":-0.55097997,"lat":51.76850128,"q":11,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.62260660981796],[0.5803774544528322,65.63191441758352],[0.5803774544528322,65.65053003311462],[0.5642558584958091,65.65983784088017],[0.5481342625387859,65.65053003311462],[0.5481342625387859,65.63191441758352],[0.5642558584958091,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Hertsmere","id":"E07000098","lon":-0.26899001,"lat":51.68019867,"q":12,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.59468318652131],[0.6287422423239015,65.60399099428686],[0.6287422423239015,65.62260660981796],[0.6126206463668784,65.63191441758352],[0.5964990504098553,65.62260660981796],[0.5964990504098553,65.60399099428686],[0.6126206463668784,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Burnley","id":"E07000117","lon":-2.23079991,"lat":53.77410126,"q":6,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.8739174194879],[0.43528309083962413,65.88322522725345],[0.43528309083962413,65.90184084278455],[0.419161494882601,65.9111486505501],[0.4030398989255779,65.90184084278455],[0.4030398989255779,65.88322522725345],[0.419161494882601,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"North Hertfordshire","id":"E07000099","lon":-0.22314,"lat":51.95740128,"q":13,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.62260660981796],[0.6448638382809246,65.63191441758352],[0.6448638382809246,65.65053003311462],[0.6287422423239015,65.65983784088017],[0.6126206463668784,65.65053003311462],[0.6126206463668784,65.63191441758352],[0.6287422423239015,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Three Rivers","id":"E07000102","lon":-0.45005,"lat":51.65629959,"q":10,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.59468318652131],[0.5642558584958091,65.60399099428686],[0.5642558584958091,65.62260660981796],[0.5481342625387859,65.63191441758352],[0.5320126665817628,65.62260660981796],[0.5320126665817628,65.60399099428686],[0.5481342625387859,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Ashford","id":"E07000105","lon":0.82337397,"lat":51.13100052,"q":15,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.39921922344469],[0.7093502221090171,65.40852703121024],[0.7093502221090171,65.42714264674134],[0.693228626151994,65.4364504545069],[0.6771070301949709,65.42714264674134],[0.6771070301949709,65.40852703121024],[0.693228626151994,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Pendle","id":"E07000122","lon":-2.18956995,"lat":53.88639832,"q":6,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.90184084278455],[0.419161494882601,65.9111486505501],[0.419161494882601,65.92976426608121],[0.4030398989255779,65.93907207384676],[0.3869183029685548,65.92976426608121],[0.3869183029685548,65.9111486505501],[0.4030398989255779,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Canterbury","id":"E07000106","lon":1.09625995,"lat":51.28099823,"q":16,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.39921922344469],[0.7415934140230633,65.40852703121024],[0.7415934140230633,65.42714264674134],[0.7254718180660402,65.4364504545069],[0.7093502221090171,65.42714264674134],[0.7093502221090171,65.40852703121024],[0.7254718180660402,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Dartford","id":"E07000107","lon":0.245276,"lat":51.43370056,"q":15,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.455066070038],[0.7093502221090171,65.46437387780355],[0.7093502221090171,65.48298949333466],[0.693228626151994,65.49229730110021],[0.6771070301949709,65.48298949333466],[0.6771070301949709,65.46437387780355],[0.693228626151994,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Dover","id":"E07000108","lon":1.27692997,"lat":51.21170044,"q":17,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.39921922344469],[0.7738366059371096,65.40852703121024],[0.7738366059371096,65.42714264674134],[0.7577150099800865,65.4364504545069],[0.7415934140230633,65.42714264674134],[0.7415934140230633,65.40852703121024],[0.7577150099800865,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Gravesham","id":"E07000109","lon":0.39874399,"lat":51.39649963,"q":16,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.455066070038],[0.7415934140230633,65.46437387780355],[0.7415934140230633,65.48298949333466],[0.7254718180660402,65.49229730110021],[0.7093502221090171,65.48298949333466],[0.7093502221090171,65.46437387780355],[0.7254718180660402,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Maidstone","id":"E07000110","lon":0.58406103,"lat":51.2356987,"q":15,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.42714264674134],[0.7254718180660402,65.4364504545069],[0.7254718180660402,65.455066070038],[0.7093502221090171,65.46437387780355],[0.693228626151994,65.455066070038],[0.693228626151994,65.4364504545069],[0.7093502221090171,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Preston","id":"E07000123","lon":-2.71816993,"lat":53.8219986,"q":5,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.90184084278455],[0.3869183029685548,65.9111486505501],[0.3869183029685548,65.92976426608121],[0.37079670701153167,65.93907207384676],[0.35467511105450855,65.92976426608121],[0.35467511105450855,65.9111486505501],[0.37079670701153167,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Sevenoaks","id":"E07000111","lon":0.188936,"lat":51.27560043,"q":13,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.39921922344469],[0.6448638382809246,65.40852703121024],[0.6448638382809246,65.42714264674134],[0.6287422423239015,65.4364504545069],[0.6126206463668784,65.42714264674134],[0.6126206463668784,65.40852703121024],[0.6287422423239015,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Welwyn Hatfield","id":"E07000241","lon":-0.18517999,"lat":51.76089859,"q":13,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.59468318652131],[0.6609854342379478,65.60399099428686],[0.6609854342379478,65.62260660981796],[0.6448638382809246,65.63191441758352],[0.6287422423239015,65.62260660981796],[0.6287422423239015,65.60399099428686],[0.6448638382809246,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Folkestone and Hythe","id":"E07000112","lon":1.00080001,"lat":51.07220078,"q":15,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.37129580014803],[0.7254718180660402,65.38060360791359],[0.7254718180660402,65.39921922344469],[0.7093502221090171,65.40852703121024],[0.693228626151994,65.39921922344469],[0.693228626151994,65.38060360791359],[0.7093502221090171,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Swale","id":"E07000113","lon":0.77952999,"lat":51.32389832,"q":17,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.455066070038],[0.7738366059371096,65.46437387780355],[0.7738366059371096,65.48298949333466],[0.7577150099800865,65.49229730110021],[0.7415934140230633,65.48298949333466],[0.7415934140230633,65.46437387780355],[0.7577150099800865,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Thanet","id":"E07000114","lon":1.3283,"lat":51.35250092,"q":17,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.7738366059371096,65.42714264674134],[0.7899582018941327,65.4364504545069],[0.7899582018941327,65.455066070038],[0.7738366059371096,65.46437387780355],[0.7577150099800865,65.455066070038],[0.7577150099800865,65.4364504545069],[0.7738366059371096,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Tonbridge and Malling","id":"E07000115","lon":0.34930599,"lat":51.26060104,"q":14,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.42714264674134],[0.693228626151994,65.4364504545069],[0.693228626151994,65.455066070038],[0.6771070301949709,65.46437387780355],[0.6609854342379478,65.455066070038],[0.6609854342379478,65.4364504545069],[0.6771070301949709,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Rochdale","id":"E08000005","lon":-2.14784002,"lat":53.60739899,"q":7,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.84599399619124],[0.45140468679664725,65.85530180395679],[0.45140468679664725,65.8739174194879],[0.43528309083962413,65.88322522725345],[0.419161494882601,65.8739174194879],[0.419161494882601,65.85530180395679],[0.43528309083962413,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Tunbridge Wells","id":"E07000116","lon":0.471632,"lat":51.10250092,"q":14,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.39921922344469],[0.6771070301949709,65.40852703121024],[0.6771070301949709,65.42714264674134],[0.6609854342379478,65.4364504545069],[0.6448638382809246,65.42714264674134],[0.6448638382809246,65.40852703121024],[0.6609854342379478,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Chorley","id":"E07000118","lon":-2.61921,"lat":53.67240143,"q":3,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.84599399619124],[0.3224319191404623,65.85530180395679],[0.3224319191404623,65.8739174194879],[0.3063103231834392,65.88322522725345],[0.2901887272264161,65.8739174194879],[0.2901887272264161,65.85530180395679],[0.3063103231834392,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"South Ribble","id":"E07000126","lon":-2.72872996,"lat":53.72669983,"q":3,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.8739174194879],[0.33855351509748544,65.88322522725345],[0.33855351509748544,65.90184084278455],[0.3224319191404623,65.9111486505501],[0.3063103231834392,65.90184084278455],[0.3063103231834392,65.88322522725345],[0.3224319191404623,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Fylde","id":"E07000119","lon":-2.91901994,"lat":53.79710007,"q":4,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.90184084278455],[0.35467511105450855,65.9111486505501],[0.35467511105450855,65.92976426608121],[0.33855351509748544,65.93907207384676],[0.3224319191404623,65.92976426608121],[0.3224319191404623,65.9111486505501],[0.33855351509748544,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Hyndburn","id":"E07000120","lon":-2.38964009,"lat":53.75650024,"q":5,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.8739174194879],[0.4030398989255779,65.88322522725345],[0.4030398989255779,65.90184084278455],[0.3869183029685548,65.9111486505501],[0.37079670701153167,65.90184084278455],[0.37079670701153167,65.88322522725345],[0.3869183029685548,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Lancaster","id":"E07000121","lon":-2.66030002,"lat":54.07899857,"q":3,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.92976426608122],[0.33855351509748544,65.93907207384677],[0.33855351509748544,65.95768768937788],[0.3224319191404623,65.96699549714343],[0.3063103231834392,65.95768768937788],[0.3063103231834392,65.93907207384677],[0.3224319191404623,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Salford","id":"E08000006","lon":-2.38485003,"lat":53.47930145,"q":4,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.81807057289458],[0.37079670701153167,65.82737838066014],[0.37079670701153167,65.84599399619124],[0.35467511105450855,65.85530180395679],[0.33855351509748544,65.84599399619124],[0.33855351509748544,65.82737838066014],[0.35467511105450855,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Ribble Valley","id":"E07000124","lon":-2.41739988,"lat":53.92449951,"q":5,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.92976426608122],[0.4030398989255779,65.93907207384677],[0.4030398989255779,65.95768768937788],[0.3869183029685548,65.96699549714343],[0.37079670701153167,65.95768768937788],[0.37079670701153167,65.93907207384677],[0.3869183029685548,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Rossendale","id":"E07000125","lon":-2.26149011,"lat":53.68479919,"q":6,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.84599399619124],[0.419161494882601,65.85530180395679],[0.419161494882601,65.8739174194879],[0.4030398989255779,65.88322522725345],[0.3869183029685548,65.8739174194879],[0.3869183029685548,65.85530180395679],[0.4030398989255779,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"West Lancashire","id":"E07000127","lon":-2.8689301,"lat":53.6128006,"q":2,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.81807057289458],[0.3063103231834392,65.82737838066014],[0.3063103231834392,65.84599399619124],[0.2901887272264161,65.85530180395679],[0.27406713126939297,65.84599399619124],[0.27406713126939297,65.82737838066014],[0.2901887272264161,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Lewisham","id":"E09000023","lon":-0.01733,"lat":51.44229889,"q":13,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.455066070038],[0.6448638382809246,65.46437387780355],[0.6448638382809246,65.48298949333466],[0.6287422423239015,65.49229730110021],[0.6126206463668784,65.48298949333466],[0.6126206463668784,65.46437387780355],[0.6287422423239015,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Wyre","id":"E07000128","lon":-2.80462003,"lat":53.89989853,"q":3,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.90184084278455],[0.3224319191404623,65.9111486505501],[0.3224319191404623,65.92976426608121],[0.3063103231834392,65.93907207384676],[0.2901887272264161,65.92976426608121],[0.2901887272264161,65.9111486505501],[0.3063103231834392,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Blaby","id":"E07000129","lon":-1.19886994,"lat":52.57709885,"q":8,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.62260660981796],[0.4836478787106935,65.63191441758352],[0.4836478787106935,65.65053003311462],[0.46752628275367036,65.65983784088017],[0.45140468679664725,65.65053003311462],[0.45140468679664725,65.63191441758352],[0.46752628275367036,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Charnwood","id":"E07000130","lon":-1.13694,"lat":52.73989868,"q":8,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.67845345641128],[0.4836478787106935,65.68776126417683],[0.4836478787106935,65.70637687970793],[0.46752628275367036,65.71568468747348],[0.45140468679664725,65.70637687970793],[0.45140468679664725,65.68776126417683],[0.46752628275367036,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Harborough","id":"E07000131","lon":-0.90228999,"lat":52.53770065,"q":8,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.59468318652131],[0.4997694746677166,65.60399099428686],[0.4997694746677166,65.62260660981796],[0.4836478787106935,65.63191441758352],[0.46752628275367036,65.62260660981796],[0.46752628275367036,65.60399099428686],[0.4836478787106935,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Hinckley and Bosworth","id":"E07000132","lon":-1.41754997,"lat":52.60879898,"q":7,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.67845345641128],[0.45140468679664725,65.68776126417683],[0.45140468679664725,65.70637687970793],[0.43528309083962413,65.71568468747348],[0.419161494882601,65.70637687970793],[0.419161494882601,65.68776126417683],[0.43528309083962413,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"North West Leicestershire","id":"E07000134","lon":-1.42209005,"lat":52.74250031,"q":6,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.70637687970795],[0.43528309083962413,65.7156846874735],[0.43528309083962413,65.7343003030046],[0.419161494882601,65.74360811077015],[0.4030398989255779,65.7343003030046],[0.4030398989255779,65.7156846874735],[0.419161494882601,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Melton","id":"E07000133","lon":-0.85439998,"lat":52.80329895,"q":10,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.7343003030046],[0.5481342625387859,65.74360811077015],[0.5481342625387859,65.76222372630126],[0.5320126665817628,65.77153153406681],[0.5158910706247397,65.76222372630126],[0.5158910706247397,65.74360811077015],[0.5320126665817628,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Oadby and Wigston","id":"E07000135","lon":-1.09300005,"lat":52.58869934,"q":8,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.65053003311462],[0.4997694746677166,65.65983784088017],[0.4997694746677166,65.67845345641128],[0.4836478787106935,65.68776126417683],[0.46752628275367036,65.67845345641128],[0.46752628275367036,65.65983784088017],[0.4836478787106935,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Merton","id":"E09000024","lon":-0.18866999,"lat":51.41059875,"q":10,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.42714264674134],[0.5642558584958091,65.4364504545069],[0.5642558584958091,65.455066070038],[0.5481342625387859,65.46437387780355],[0.5320126665817628,65.455066070038],[0.5320126665817628,65.4364504545069],[0.5481342625387859,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Boston","id":"E07000136","lon":-0.11218,"lat":52.97790146,"q":12,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.79014714959791],[0.6126206463668784,65.79945495736347],[0.6126206463668784,65.81807057289457],[0.5964990504098553,65.82737838066012],[0.5803774544528322,65.81807057289457],[0.5803774544528322,65.79945495736347],[0.5964990504098553,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"East Lindsey","id":"E07000137","lon":0.020549,"lat":53.26480103,"q":11,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.81807057289458],[0.5964990504098553,65.82737838066014],[0.5964990504098553,65.84599399619124],[0.5803774544528322,65.85530180395679],[0.5642558584958091,65.84599399619124],[0.5642558584958091,65.82737838066014],[0.5803774544528322,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Lincoln","id":"E07000138","lon":-0.55848002,"lat":53.21920013,"q":11,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.79014714959791],[0.5803774544528322,65.79945495736347],[0.5803774544528322,65.81807057289457],[0.5642558584958091,65.82737838066012],[0.5481342625387859,65.81807057289457],[0.5481342625387859,65.79945495736347],[0.5642558584958091,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"St. Helens","id":"E08000013","lon":-2.70309997,"lat":53.45859909,"q":3,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.79014714959791],[0.3224319191404623,65.79945495736347],[0.3224319191404623,65.81807057289457],[0.3063103231834392,65.82737838066012],[0.2901887272264161,65.81807057289457],[0.2901887272264161,65.79945495736347],[0.3063103231834392,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"North Kesteven","id":"E07000139","lon":-0.47670001,"lat":53.08060074,"q":11,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.76222372630126],[0.5964990504098553,65.77153153406681],[0.5964990504098553,65.79014714959791],[0.5803774544528322,65.79945495736347],[0.5642558584958091,65.79014714959791],[0.5642558584958091,65.77153153406681],[0.5803774544528322,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Corby","id":"E07000150","lon":-0.7069,"lat":52.50699997,"q":11,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.70637687970795],[0.5964990504098553,65.7156846874735],[0.5964990504098553,65.7343003030046],[0.5803774544528322,65.74360811077015],[0.5642558584958091,65.7343003030046],[0.5642558584958091,65.7156846874735],[0.5803774544528322,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"South Holland","id":"E07000140","lon":-0.03058,"lat":52.78760147,"q":12,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.7343003030046],[0.6126206463668784,65.74360811077015],[0.6126206463668784,65.76222372630126],[0.5964990504098553,65.77153153406681],[0.5803774544528322,65.76222372630126],[0.5803774544528322,65.74360811077015],[0.5964990504098553,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Ashfield","id":"E07000170","lon":-1.25422001,"lat":53.09749985,"q":9,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.76222372630126],[0.5320126665817628,65.77153153406681],[0.5320126665817628,65.79014714959791],[0.5158910706247397,65.79945495736347],[0.4997694746677166,65.79014714959791],[0.4997694746677166,65.77153153406681],[0.5158910706247397,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"South Kesteven","id":"E07000141","lon":-0.49564999,"lat":52.84889984,"q":11,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.7343003030046],[0.5803774544528322,65.74360811077015],[0.5803774544528322,65.76222372630126],[0.5642558584958091,65.77153153406681],[0.5481342625387859,65.76222372630126],[0.5481342625387859,65.74360811077015],[0.5642558584958091,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Gedling","id":"E07000173","lon":-1.11907005,"lat":53.02429962,"q":9,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.70637687970795],[0.5320126665817628,65.7156846874735],[0.5320126665817628,65.7343003030046],[0.5158910706247397,65.74360811077015],[0.4997694746677166,65.7343003030046],[0.4997694746677166,65.7156846874735],[0.5158910706247397,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"West Lindsey","id":"E07000142","lon":-0.50774002,"lat":53.40039825,"q":10,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.81807057289458],[0.5642558584958091,65.82737838066014],[0.5642558584958091,65.84599399619124],[0.5481342625387859,65.85530180395679],[0.5320126665817628,65.84599399619124],[0.5320126665817628,65.82737838066014],[0.5481342625387859,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Breckland","id":"E07000143","lon":0.81871599,"lat":52.59420013,"q":15,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.7343003030046],[0.7093502221090171,65.74360811077015],[0.7093502221090171,65.76222372630126],[0.693228626151994,65.77153153406681],[0.6771070301949709,65.76222372630126],[0.6771070301949709,65.74360811077015],[0.693228626151994,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Broadland","id":"E07000144","lon":1.25232995,"lat":52.69620132,"q":16,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.7343003030046],[0.7415934140230633,65.74360811077015],[0.7415934140230633,65.76222372630126],[0.7254718180660402,65.77153153406681],[0.7093502221090171,65.76222372630126],[0.7093502221090171,65.74360811077015],[0.7254718180660402,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Great Yarmouth","id":"E07000145","lon":1.64950001,"lat":52.68439865,"q":15,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.76222372630126],[0.7254718180660402,65.77153153406681],[0.7254718180660402,65.79014714959791],[0.7093502221090171,65.79945495736347],[0.693228626151994,65.79014714959791],[0.693228626151994,65.77153153406681],[0.7093502221090171,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"King's Lynn and West Norfolk","id":"E07000146","lon":0.53325802,"lat":52.71279907,"q":14,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.7343003030046],[0.6771070301949709,65.74360811077015],[0.6771070301949709,65.76222372630126],[0.6609854342379478,65.77153153406681],[0.6448638382809246,65.76222372630126],[0.6448638382809246,65.74360811077015],[0.6609854342379478,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"North Norfolk","id":"E07000147","lon":1.13218999,"lat":52.83380127,"q":14,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.76222372630126],[0.693228626151994,65.77153153406681],[0.693228626151994,65.79014714959791],[0.6771070301949709,65.79945495736347],[0.6609854342379478,65.79014714959791],[0.6609854342379478,65.77153153406681],[0.6771070301949709,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Norwich","id":"E07000148","lon":1.28498006,"lat":52.64009857,"q":15,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.70637687970795],[0.7254718180660402,65.7156846874735],[0.7254718180660402,65.7343003030046],[0.7093502221090171,65.74360811077015],[0.693228626151994,65.7343003030046],[0.693228626151994,65.7156846874735],[0.7093502221090171,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"South Norfolk","id":"E07000149","lon":1.37325001,"lat":52.5121994,"q":15,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.693228626151994,65.67845345641128],[0.7093502221090171,65.68776126417683],[0.7093502221090171,65.70637687970793],[0.693228626151994,65.71568468747348],[0.6771070301949709,65.70637687970793],[0.6771070301949709,65.68776126417683],[0.693228626151994,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Daventry","id":"E07000151","lon":-1.01446998,"lat":52.30989838,"q":9,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.62260660981796],[0.5158910706247397,65.63191441758352],[0.5158910706247397,65.65053003311462],[0.4997694746677166,65.65983784088017],[0.4836478787106935,65.65053003311462],[0.4836478787106935,65.63191441758352],[0.4997694746677166,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"East Northamptonshire","id":"E07000152","lon":-0.50919998,"lat":52.47909927,"q":12,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.70637687970795],[0.6287422423239015,65.7156846874735],[0.6287422423239015,65.7343003030046],[0.6126206463668784,65.74360811077015],[0.5964990504098553,65.7343003030046],[0.5964990504098553,65.7156846874735],[0.6126206463668784,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Mansfield","id":"E07000174","lon":-1.17804003,"lat":53.16699982,"q":9,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.7343003030046],[0.5158910706247397,65.74360811077015],[0.5158910706247397,65.76222372630126],[0.4997694746677166,65.77153153406681],[0.4836478787106935,65.76222372630126],[0.4836478787106935,65.74360811077015],[0.4997694746677166,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Kettering","id":"E07000153","lon":-0.76773,"lat":52.43719864,"q":10,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.70637687970795],[0.5642558584958091,65.7156846874735],[0.5642558584958091,65.7343003030046],[0.5481342625387859,65.74360811077015],[0.5320126665817628,65.7343003030046],[0.5320126665817628,65.7156846874735],[0.5481342625387859,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Northampton","id":"E07000154","lon":-0.88121003,"lat":52.2378006,"q":10,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.67845345641128],[0.5481342625387859,65.68776126417683],[0.5481342625387859,65.70637687970793],[0.5320126665817628,65.71568468747348],[0.5158910706247397,65.70637687970793],[0.5158910706247397,65.68776126417683],[0.5320126665817628,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"South Northamptonshire","id":"E07000155","lon":-1.08129001,"lat":52.11840057,"q":9,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.65053003311462],[0.5320126665817628,65.65983784088017],[0.5320126665817628,65.67845345641128],[0.5158910706247397,65.68776126417683],[0.4997694746677166,65.67845345641128],[0.4997694746677166,65.65983784088017],[0.5158910706247397,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Wellingborough","id":"E07000156","lon":-0.71425003,"lat":52.29259872,"q":11,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.67845345641128],[0.5803774544528322,65.68776126417683],[0.5803774544528322,65.70637687970793],[0.5642558584958091,65.71568468747348],[0.5481342625387859,65.70637687970793],[0.5481342625387859,65.68776126417683],[0.5642558584958091,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Craven","id":"E07000163","lon":-2.16167998,"lat":54.05379868,"q":6,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.92976426608122],[0.43528309083962413,65.93907207384677],[0.43528309083962413,65.95768768937788],[0.419161494882601,65.96699549714343],[0.4030398989255779,65.95768768937788],[0.4030398989255779,65.93907207384677],[0.419161494882601,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Hambleton","id":"E07000164","lon":-1.34048998,"lat":54.30870056,"q":10,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.92976426608122],[0.5642558584958091,65.93907207384677],[0.5642558584958091,65.95768768937788],[0.5481342625387859,65.96699549714343],[0.5320126665817628,65.95768768937788],[0.5320126665817628,65.93907207384677],[0.5481342625387859,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Oxford","id":"E07000178","lon":-1.24405003,"lat":51.75360107,"q":6,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.51091291663133],[0.419161494882601,65.52022072439688],[0.419161494882601,65.53883633992798],[0.4030398989255779,65.54814414769353],[0.3869183029685548,65.53883633992798],[0.3869183029685548,65.52022072439688],[0.4030398989255779,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Harrogate","id":"E07000165","lon":-1.58160996,"lat":54.07709885,"q":8,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.92976426608122],[0.4997694746677166,65.93907207384677],[0.4997694746677166,65.95768768937788],[0.4836478787106935,65.96699549714343],[0.46752628275367036,65.95768768937788],[0.46752628275367036,65.93907207384677],[0.4836478787106935,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Richmondshire","id":"E07000166","lon":-1.98552001,"lat":54.35760117,"q":7,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.92976426608122],[0.46752628275367036,65.93907207384677],[0.46752628275367036,65.95768768937788],[0.45140468679664725,65.96699549714343],[0.43528309083962413,65.95768768937788],[0.43528309083962413,65.93907207384677],[0.45140468679664725,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Cannock Chase","id":"E07000192","lon":-1.98276997,"lat":52.7016983,"q":4,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.70637687970795],[0.37079670701153167,65.7156846874735],[0.37079670701153167,65.7343003030046],[0.35467511105450855,65.74360811077015],[0.33855351509748544,65.7343003030046],[0.33855351509748544,65.7156846874735],[0.35467511105450855,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Ryedale","id":"E07000167","lon":-0.84276998,"lat":54.20019913,"q":10,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.90184084278455],[0.5481342625387859,65.9111486505501],[0.5481342625387859,65.92976426608121],[0.5320126665817628,65.93907207384676],[0.5158910706247397,65.92976426608121],[0.5158910706247397,65.9111486505501],[0.5320126665817628,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Scarborough","id":"E07000168","lon":-0.52780002,"lat":54.3465004,"q":10,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.95768768937788],[0.5481342625387859,65.96699549714343],[0.5481342625387859,65.98561111267453],[0.5320126665817628,65.99491892044009],[0.5158910706247397,65.98561111267453],[0.5158910706247397,65.96699549714343],[0.5320126665817628,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Selby","id":"E07000169","lon":-1.12908006,"lat":53.73329926,"q":9,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.90184084278455],[0.5158910706247397,65.9111486505501],[0.5158910706247397,65.92976426608121],[0.4997694746677166,65.93907207384676],[0.4836478787106935,65.92976426608121],[0.4836478787106935,65.9111486505501],[0.4997694746677166,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Bassetlaw","id":"E07000171","lon":-0.97869998,"lat":53.35599899,"q":10,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.79014714959791],[0.5481342625387859,65.79945495736347],[0.5481342625387859,65.81807057289457],[0.5320126665817628,65.82737838066012],[0.5158910706247397,65.81807057289457],[0.5158910706247397,65.79945495736347],[0.5320126665817628,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Broxtowe","id":"E07000172","lon":-1.25943995,"lat":52.9720993,"q":8,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.7343003030046],[0.4836478787106935,65.74360811077015],[0.4836478787106935,65.76222372630126],[0.46752628275367036,65.77153153406681],[0.45140468679664725,65.76222372630126],[0.45140468679664725,65.74360811077015],[0.46752628275367036,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Newark and Sherwood","id":"E07000175","lon":-0.94643003,"lat":53.10960007,"q":10,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.76222372630126],[0.5642558584958091,65.77153153406681],[0.5642558584958091,65.79014714959791],[0.5481342625387859,65.79945495736347],[0.5320126665817628,65.79014714959791],[0.5320126665817628,65.77153153406681],[0.5481342625387859,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Ipswich","id":"E07000202","lon":1.16327,"lat":52.05789948,"q":17,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.7577150099800865,65.67845345641128],[0.7738366059371096,65.68776126417683],[0.7738366059371096,65.70637687970793],[0.7577150099800865,65.71568468747348],[0.7415934140230633,65.70637687970793],[0.7415934140230633,65.68776126417683],[0.7577150099800865,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Rushcliffe","id":"E07000176","lon":-1.01097,"lat":52.91239929,"q":7,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.70637687970795],[0.46752628275367036,65.7156846874735],[0.46752628275367036,65.7343003030046],[0.45140468679664725,65.74360811077015],[0.43528309083962413,65.7343003030046],[0.43528309083962413,65.7156846874735],[0.45140468679664725,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Elmbridge","id":"E07000207","lon":-0.39441001,"lat":51.36100006,"q":8,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.42714264674134],[0.4997694746677166,65.4364504545069],[0.4997694746677166,65.455066070038],[0.4836478787106935,65.46437387780355],[0.46752628275367036,65.455066070038],[0.46752628275367036,65.4364504545069],[0.4836478787106935,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Epsom and Ewell","id":"E07000208","lon":-0.26172,"lat":51.33950043,"q":10,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.39921922344469],[0.5481342625387859,65.40852703121024],[0.5481342625387859,65.42714264674134],[0.5320126665817628,65.4364504545069],[0.5158910706247397,65.42714264674134],[0.5158910706247397,65.40852703121024],[0.5320126665817628,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Cherwell","id":"E07000177","lon":-1.28506005,"lat":51.8871994,"q":7,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.59468318652131],[0.46752628275367036,65.60399099428686],[0.46752628275367036,65.62260660981796],[0.45140468679664725,65.63191441758352],[0.43528309083962413,65.62260660981796],[0.43528309083962413,65.60399099428686],[0.45140468679664725,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"South Oxfordshire","id":"E07000179","lon":-1.07846999,"lat":51.6228981,"q":6,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.53883633992798],[0.43528309083962413,65.54814414769353],[0.43528309083962413,65.56675976322464],[0.419161494882601,65.57606757099019],[0.4030398989255779,65.56675976322464],[0.4030398989255779,65.54814414769353],[0.419161494882601,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Vale of White Horse","id":"E07000180","lon":-1.48543,"lat":51.65439987,"q":5,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.51091291663133],[0.3869183029685548,65.52022072439688],[0.3869183029685548,65.53883633992798],[0.37079670701153167,65.54814414769353],[0.35467511105450855,65.53883633992798],[0.35467511105450855,65.52022072439688],[0.37079670701153167,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Runnymede","id":"E07000212","lon":-0.53855002,"lat":51.3927002,"q":8,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.51091291663133],[0.4836478787106935,65.52022072439688],[0.4836478787106935,65.53883633992798],[0.46752628275367036,65.54814414769353],[0.45140468679664725,65.53883633992798],[0.45140468679664725,65.52022072439688],[0.46752628275367036,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"West Oxfordshire","id":"E07000181","lon":-1.50292003,"lat":51.83990097,"q":5,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.53883633992798],[0.4030398989255779,65.54814414769353],[0.4030398989255779,65.56675976322464],[0.3869183029685548,65.57606757099019],[0.37079670701153167,65.56675976322464],[0.37079670701153167,65.54814414769353],[0.3869183029685548,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Spelthorne","id":"E07000213","lon":-0.46254,"lat":51.41550064,"q":8,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.48298949333467],[0.4997694746677166,65.49229730110022],[0.4997694746677166,65.51091291663133],[0.4836478787106935,65.52022072439688],[0.46752628275367036,65.51091291663133],[0.46752628275367036,65.49229730110022],[0.4836478787106935,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Mendip","id":"E07000187","lon":-2.54177999,"lat":51.19480133,"q":2,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.455066070038],[0.2901887272264161,65.46437387780355],[0.2901887272264161,65.48298949333466],[0.27406713126939297,65.49229730110021],[0.25794553531236986,65.48298949333466],[0.25794553531236986,65.46437387780355],[0.27406713126939297,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Sedgemoor","id":"E07000188","lon":-2.88250995,"lat":51.19179916,"q":0,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.48298949333467],[0.24182393935534674,65.49229730110022],[0.24182393935534674,65.51091291663133],[0.22570234339832362,65.52022072439688],[0.2095807474413005,65.51091291663133],[0.2095807474413005,65.49229730110022],[0.22570234339832362,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"South Somerset","id":"E07000189","lon":-2.7758801,"lat":50.98400116,"q":1,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.455066070038],[0.25794553531236986,65.46437387780355],[0.25794553531236986,65.48298949333466],[0.24182393935534674,65.49229730110021],[0.22570234339832362,65.48298949333466],[0.22570234339832362,65.46437387780355],[0.24182393935534674,65.455066070038]]]}},{"type":"Feature","properties":{"n":"East Staffordshire","id":"E07000193","lon":-1.81438005,"lat":52.83649826,"q":5,"r":11},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.76222372630126],[0.4030398989255779,65.77153153406681],[0.4030398989255779,65.79014714959791],[0.3869183029685548,65.79945495736347],[0.37079670701153167,65.79014714959791],[0.37079670701153167,65.77153153406681],[0.3869183029685548,65.76222372630126]]]}},{"type":"Feature","properties":{"n":"Lichfield","id":"E07000194","lon":-1.76048994,"lat":52.69620132,"q":5,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.70637687970795],[0.4030398989255779,65.7156846874735],[0.4030398989255779,65.7343003030046],[0.3869183029685548,65.74360811077015],[0.37079670701153167,65.7343003030046],[0.37079670701153167,65.7156846874735],[0.3869183029685548,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Surrey Heath","id":"E07000214","lon":-0.68985999,"lat":51.33610153,"q":7,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.48298949333467],[0.46752628275367036,65.49229730110022],[0.46752628275367036,65.51091291663133],[0.45140468679664725,65.52022072439688],[0.43528309083962413,65.51091291663133],[0.43528309083962413,65.49229730110022],[0.45140468679664725,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Newham","id":"E09000025","lon":0.027369,"lat":51.53129959,"q":13,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.48298949333467],[0.6609854342379478,65.49229730110022],[0.6609854342379478,65.51091291663133],[0.6448638382809246,65.52022072439688],[0.6287422423239015,65.51091291663133],[0.6287422423239015,65.49229730110022],[0.6448638382809246,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Newcastle-under-Lyme","id":"E07000195","lon":-2.32630992,"lat":53.0033989,"q":3,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,65.7343003030046],[0.3224319191404623,65.74360811077015],[0.3224319191404623,65.76222372630126],[0.3063103231834392,65.77153153406681],[0.2901887272264161,65.76222372630126],[0.2901887272264161,65.74360811077015],[0.3063103231834392,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Tandridge","id":"E07000215","lon":-0.04805,"lat":51.2358017,"q":12,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.37129580014803],[0.6287422423239015,65.38060360791359],[0.6287422423239015,65.39921922344469],[0.6126206463668784,65.40852703121024],[0.5964990504098553,65.39921922344469],[0.5964990504098553,65.38060360791359],[0.6126206463668784,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"South Staffordshire","id":"E07000196","lon":-2.1549499,"lat":52.69689941,"q":3,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.70637687970795],[0.33855351509748544,65.7156846874735],[0.33855351509748544,65.7343003030046],[0.3224319191404623,65.74360811077015],[0.3063103231834392,65.7343003030046],[0.3063103231834392,65.7156846874735],[0.3224319191404623,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Havering","id":"E09000016","lon":0.235368,"lat":51.56520081,"q":14,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.51091291663133],[0.6771070301949709,65.52022072439688],[0.6771070301949709,65.53883633992798],[0.6609854342379478,65.54814414769353],[0.6448638382809246,65.53883633992798],[0.6448638382809246,65.52022072439688],[0.6609854342379478,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Stafford","id":"E07000197","lon":-2.1647501,"lat":52.84790039,"q":2,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,65.70637687970795],[0.3063103231834392,65.7156846874735],[0.3063103231834392,65.7343003030046],[0.2901887272264161,65.74360811077015],[0.27406713126939297,65.7343003030046],[0.27406713126939297,65.7156846874735],[0.2901887272264161,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Redbridge","id":"E09000026","lon":0.070085,"lat":51.58589935,"q":13,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.53883633992798],[0.6609854342379478,65.54814414769353],[0.6609854342379478,65.56675976322464],[0.6448638382809246,65.57606757099019],[0.6287422423239015,65.56675976322464],[0.6287422423239015,65.54814414769353],[0.6448638382809246,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Staffordshire Moorlands","id":"E07000198","lon":-1.99334002,"lat":53.06919861,"q":5,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.7343003030046],[0.3869183029685548,65.74360811077015],[0.3869183029685548,65.76222372630126],[0.37079670701153167,65.77153153406681],[0.35467511105450855,65.76222372630126],[0.35467511105450855,65.74360811077015],[0.37079670701153167,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Tamworth","id":"E07000199","lon":-1.68450999,"lat":52.62030029,"q":6,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.67845345641128],[0.419161494882601,65.68776126417683],[0.419161494882601,65.70637687970793],[0.4030398989255779,65.71568468747348],[0.3869183029685548,65.70637687970793],[0.3869183029685548,65.68776126417683],[0.4030398989255779,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Babergh","id":"E07000200","lon":0.91623098,"lat":52.06420135,"q":16,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.7254718180660402,65.67845345641128],[0.7415934140230633,65.68776126417683],[0.7415934140230633,65.70637687970793],[0.7254718180660402,65.71568468747348],[0.7093502221090171,65.70637687970793],[0.7093502221090171,65.68776126417683],[0.7254718180660402,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Mid Suffolk","id":"E07000203","lon":1.09695005,"lat":52.21860123,"q":15,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.7093502221090171,65.65053003311462],[0.7254718180660402,65.65983784088017],[0.7254718180660402,65.67845345641128],[0.7093502221090171,65.68776126417683],[0.693228626151994,65.67845345641128],[0.693228626151994,65.65983784088017],[0.7093502221090171,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Wandsworth","id":"E09000032","lon":-0.20021001,"lat":51.45240021,"q":10,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.455066070038],[0.5481342625387859,65.46437387780355],[0.5481342625387859,65.48298949333466],[0.5320126665817628,65.49229730110021],[0.5158910706247397,65.48298949333466],[0.5158910706247397,65.46437387780355],[0.5320126665817628,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Guildford","id":"E07000209","lon":-0.56256998,"lat":51.25370026,"q":7,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.42714264674134],[0.46752628275367036,65.4364504545069],[0.46752628275367036,65.455066070038],[0.45140468679664725,65.46437387780355],[0.43528309083962413,65.455066070038],[0.43528309083962413,65.4364504545069],[0.45140468679664725,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Manchester","id":"E08000003","lon":-2.23358989,"lat":53.4701004,"q":5,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.79014714959791],[0.3869183029685548,65.79945495736347],[0.3869183029685548,65.81807057289457],[0.37079670701153167,65.82737838066012],[0.35467511105450855,65.81807057289457],[0.35467511105450855,65.79945495736347],[0.37079670701153167,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Mole Valley","id":"E07000210","lon":-0.30603001,"lat":51.22750092,"q":9,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.39921922344469],[0.5158910706247397,65.40852703121024],[0.5158910706247397,65.42714264674134],[0.4997694746677166,65.4364504545069],[0.4836478787106935,65.42714264674134],[0.4836478787106935,65.40852703121024],[0.4997694746677166,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Reigate and Banstead","id":"E07000211","lon":-0.19870999,"lat":51.25849915,"q":10,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.37129580014803],[0.5642558584958091,65.38060360791359],[0.5642558584958091,65.39921922344469],[0.5481342625387859,65.40852703121024],[0.5320126665817628,65.39921922344469],[0.5320126665817628,65.38060360791359],[0.5481342625387859,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Westminster","id":"E09000033","lon":-0.15295,"lat":51.5121994,"q":11,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.48298949333467],[0.5964990504098553,65.49229730110022],[0.5964990504098553,65.51091291663133],[0.5803774544528322,65.52022072439688],[0.5642558584958091,65.51091291663133],[0.5642558584958091,65.49229730110022],[0.5803774544528322,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Waverley","id":"E07000216","lon":-0.62343001,"lat":51.1568985,"q":6,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.42714264674134],[0.43528309083962413,65.4364504545069],[0.43528309083962413,65.455066070038],[0.419161494882601,65.46437387780355],[0.4030398989255779,65.455066070038],[0.4030398989255779,65.4364504545069],[0.419161494882601,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Woking","id":"E07000217","lon":-0.57981998,"lat":51.3083992,"q":8,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.455066070038],[0.4836478787106935,65.46437387780355],[0.4836478787106935,65.48298949333466],[0.46752628275367036,65.49229730110021],[0.45140468679664725,65.48298949333466],[0.45140468679664725,65.46437387780355],[0.46752628275367036,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Ards and North Down","id":"N09000011","lon":-5.64567995,"lat":54.56409836,"q":-3,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.11285117169916181,65.90184084278455],[0.12897276765618493,65.9111486505501],[0.12897276765618493,65.92976426608121],[0.11285117169916181,65.93907207384676],[0.0967295757421387,65.92976426608121],[0.0967295757421387,65.9111486505501],[0.11285117169916181,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"North Warwickshire","id":"E07000218","lon":-1.62419999,"lat":52.56480026,"q":6,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.62260660981796],[0.419161494882601,65.63191441758352],[0.419161494882601,65.65053003311462],[0.4030398989255779,65.65983784088017],[0.3869183029685548,65.65053003311462],[0.3869183029685548,65.63191441758352],[0.4030398989255779,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Nuneaton and Bedworth","id":"E07000219","lon":-1.47965002,"lat":52.50090027,"q":6,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.65053003311462],[0.43528309083962413,65.65983784088017],[0.43528309083962413,65.67845345641128],[0.419161494882601,65.68776126417683],[0.4030398989255779,65.67845345641128],[0.4030398989255779,65.65983784088017],[0.419161494882601,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Oldham","id":"E08000004","lon":-2.0527401,"lat":53.55770111,"q":5,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.81807057289458],[0.4030398989255779,65.82737838066014],[0.4030398989255779,65.84599399619124],[0.3869183029685548,65.85530180395679],[0.37079670701153167,65.84599399619124],[0.37079670701153167,65.82737838066014],[0.3869183029685548,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Rugby","id":"E07000220","lon":-1.31827998,"lat":52.38230133,"q":6,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.59468318652131],[0.43528309083962413,65.60399099428686],[0.43528309083962413,65.62260660981796],[0.419161494882601,65.63191441758352],[0.4030398989255779,65.62260660981796],[0.4030398989255779,65.60399099428686],[0.419161494882601,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Stratford-on-Avon","id":"E07000221","lon":-1.63565004,"lat":52.16149902,"q":7,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.56675976322464],[0.45140468679664725,65.57606757099019],[0.45140468679664725,65.5946831865213],[0.43528309083962413,65.60399099428685],[0.419161494882601,65.5946831865213],[0.419161494882601,65.57606757099019],[0.43528309083962413,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Bromsgrove","id":"E07000234","lon":-2.0037601,"lat":52.36169815,"q":4,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.62260660981796],[0.35467511105450855,65.63191441758352],[0.35467511105450855,65.65053003311462],[0.33855351509748544,65.65983784088017],[0.3224319191404623,65.65053003311462],[0.3224319191404623,65.63191441758352],[0.33855351509748544,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Warwick","id":"E07000222","lon":-1.58369005,"lat":52.30139923,"q":7,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.62260660981796],[0.45140468679664725,65.63191441758352],[0.45140468679664725,65.65053003311462],[0.43528309083962413,65.65983784088017],[0.419161494882601,65.65053003311462],[0.419161494882601,65.63191441758352],[0.43528309083962413,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Adur","id":"E07000223","lon":-0.32433,"lat":50.84569931,"q":10,"r":-4},"geometry":{"type":"Polygon","coordinates":[[[0.5320126665817628,65.34337237685136],[0.5481342625387859,65.35268018461691],[0.5481342625387859,65.37129580014802],[0.5320126665817628,65.38060360791357],[0.5158910706247397,65.37129580014802],[0.5158910706247397,65.35268018461691],[0.5320126665817628,65.34337237685136]]]}},{"type":"Feature","properties":{"n":"Malvern Hills","id":"E07000235","lon":-2.33088994,"lat":52.16759872,"q":3,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.59468318652131],[0.33855351509748544,65.60399099428686],[0.33855351509748544,65.62260660981796],[0.3224319191404623,65.63191441758352],[0.3063103231834392,65.62260660981796],[0.3063103231834392,65.60399099428686],[0.3224319191404623,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Arun","id":"E07000224","lon":-0.64998001,"lat":50.84320068,"q":8,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.39921922344469],[0.4836478787106935,65.40852703121024],[0.4836478787106935,65.42714264674134],[0.46752628275367036,65.4364504545069],[0.45140468679664725,65.42714264674134],[0.45140468679664725,65.40852703121024],[0.46752628275367036,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Chichester","id":"E07000225","lon":-0.71630001,"lat":50.94179916,"q":7,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.39921922344469],[0.45140468679664725,65.40852703121024],[0.45140468679664725,65.42714264674134],[0.43528309083962413,65.4364504545069],[0.419161494882601,65.42714264674134],[0.419161494882601,65.40852703121024],[0.43528309083962413,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Crawley","id":"E07000226","lon":-0.19532999,"lat":51.12360001,"q":11,"r":-2},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.39921922344469],[0.5803774544528322,65.40852703121024],[0.5803774544528322,65.42714264674134],[0.5642558584958091,65.4364504545069],[0.5481342625387859,65.42714264674134],[0.5481342625387859,65.40852703121024],[0.5642558584958091,65.39921922344469]]]}},{"type":"Feature","properties":{"n":"Horsham","id":"E07000227","lon":-0.38123,"lat":51.00270081,"q":9,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.37129580014803],[0.5320126665817628,65.38060360791359],[0.5320126665817628,65.39921922344469],[0.5158910706247397,65.40852703121024],[0.4997694746677166,65.39921922344469],[0.4997694746677166,65.38060360791359],[0.5158910706247397,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Mid Sussex","id":"E07000228","lon":-0.10272,"lat":51.05950165,"q":11,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.37129580014803],[0.5964990504098553,65.38060360791359],[0.5964990504098553,65.39921922344469],[0.5803774544528322,65.40852703121024],[0.5642558584958091,65.39921922344469],[0.5642558584958091,65.38060360791359],[0.5803774544528322,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Worthing","id":"E07000229","lon":-0.40127,"lat":50.83309937,"q":8,"r":-3},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.37129580014803],[0.4997694746677166,65.38060360791359],[0.4997694746677166,65.39921922344469],[0.4836478787106935,65.40852703121024],[0.46752628275367036,65.39921922344469],[0.46752628275367036,65.38060360791359],[0.4836478787106935,65.37129580014803]]]}},{"type":"Feature","properties":{"n":"Redditch","id":"E07000236","lon":-1.94710004,"lat":52.28540039,"q":6,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.56675976322464],[0.419161494882601,65.57606757099019],[0.419161494882601,65.5946831865213],[0.4030398989255779,65.60399099428685],[0.3869183029685548,65.5946831865213],[0.3869183029685548,65.57606757099019],[0.4030398989255779,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Wychavon","id":"E07000238","lon":-2.01613998,"lat":52.12889862,"q":5,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.56675976322464],[0.3869183029685548,65.57606757099019],[0.3869183029685548,65.5946831865213],[0.37079670701153167,65.60399099428685],[0.35467511105450855,65.5946831865213],[0.35467511105450855,65.57606757099019],[0.37079670701153167,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Wyre Forest","id":"E07000239","lon":-2.23494005,"lat":52.38529968,"q":3,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.65053003311462],[0.33855351509748544,65.65983784088017],[0.33855351509748544,65.67845345641128],[0.3224319191404623,65.68776126417683],[0.3063103231834392,65.67845345641128],[0.3063103231834392,65.65983784088017],[0.3224319191404623,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"St Albans","id":"E07000240","lon":-0.3407,"lat":51.77360153,"q":12,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.62260660981796],[0.6126206463668784,65.63191441758352],[0.6126206463668784,65.65053003311462],[0.5964990504098553,65.65983784088017],[0.5803774544528322,65.65053003311462],[0.5803774544528322,65.63191441758352],[0.5964990504098553,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"East Hertfordshire","id":"E07000242","lon":0.002739,"lat":51.8647995,"q":14,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.59468318652131],[0.693228626151994,65.60399099428686],[0.693228626151994,65.62260660981796],[0.6771070301949709,65.63191441758352],[0.6609854342379478,65.62260660981796],[0.6609854342379478,65.60399099428686],[0.6771070301949709,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Stevenage","id":"E07000243","lon":-0.18987,"lat":51.90539932,"q":14,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.6609854342379478,65.62260660981796],[0.6771070301949709,65.63191441758352],[0.6771070301949709,65.65053003311462],[0.6609854342379478,65.65983784088017],[0.6448638382809246,65.65053003311462],[0.6448638382809246,65.63191441758352],[0.6609854342379478,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"East Suffolk","id":"E07000244","lon":1.45608997,"lat":52.24349976,"q":16,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.7415934140230633,65.70637687970795],[0.7577150099800865,65.7156846874735],[0.7577150099800865,65.7343003030046],[0.7415934140230633,65.74360811077015],[0.7254718180660402,65.7343003030046],[0.7254718180660402,65.7156846874735],[0.7415934140230633,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"West Suffolk","id":"E07000245","lon":0.65276903,"lat":52.3083992,"q":14,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.65053003311462],[0.693228626151994,65.65983784088017],[0.693228626151994,65.67845345641128],[0.6771070301949709,65.68776126417683],[0.6609854342379478,65.67845345641128],[0.6609854342379478,65.65983784088017],[0.6771070301949709,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Somerset West and Taunton","id":"E07000246","lon":-3.35766006,"lat":51.06349945,"q":0,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,65.455066070038],[0.22570234339832362,65.46437387780355],[0.22570234339832362,65.48298949333466],[0.2095807474413005,65.49229730110021],[0.1934591514842774,65.48298949333466],[0.1934591514842774,65.46437387780355],[0.2095807474413005,65.455066070038]]]}},{"type":"Feature","properties":{"n":"North Tyneside","id":"E08000022","lon":-1.50923002,"lat":55.02899933,"q":6,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,66.01353453597119],[0.419161494882601,66.02284234373674],[0.419161494882601,66.04145795926785],[0.4030398989255779,66.0507657670334],[0.3869183029685548,66.04145795926785],[0.3869183029685548,66.02284234373674],[0.4030398989255779,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Bolton","id":"E08000001","lon":-2.47952008,"lat":53.58449936,"q":4,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.84599399619124],[0.35467511105450855,65.85530180395679],[0.35467511105450855,65.8739174194879],[0.33855351509748544,65.88322522725345],[0.3224319191404623,65.8739174194879],[0.3224319191404623,65.85530180395679],[0.33855351509748544,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Bury","id":"E08000002","lon":-2.30879998,"lat":53.5931015,"q":5,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.84599399619124],[0.3869183029685548,65.85530180395679],[0.3869183029685548,65.8739174194879],[0.37079670701153167,65.88322522725345],[0.35467511105450855,65.8739174194879],[0.35467511105450855,65.85530180395679],[0.37079670701153167,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"South Tyneside","id":"E08000023","lon":-1.44695997,"lat":54.96989822,"q":7,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,66.01353453597119],[0.45140468679664725,66.02284234373674],[0.45140468679664725,66.04145795926785],[0.43528309083962413,66.0507657670334],[0.419161494882601,66.04145795926785],[0.419161494882601,66.02284234373674],[0.43528309083962413,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Stockport","id":"E08000007","lon":-2.12467003,"lat":53.39120102,"q":6,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.4030398989255779,65.79014714959791],[0.419161494882601,65.79945495736347],[0.419161494882601,65.81807057289457],[0.4030398989255779,65.82737838066012],[0.3869183029685548,65.81807057289457],[0.3869183029685548,65.79945495736347],[0.4030398989255779,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Tameside","id":"E08000008","lon":-2.0769999,"lat":53.47869873,"q":6,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.81807057289458],[0.43528309083962413,65.82737838066014],[0.43528309083962413,65.84599399619124],[0.419161494882601,65.85530180395679],[0.4030398989255779,65.84599399619124],[0.4030398989255779,65.82737838066014],[0.419161494882601,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Trafford","id":"E08000009","lon":-2.36572003,"lat":53.41669846,"q":4,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.79014714959791],[0.35467511105450855,65.79945495736347],[0.35467511105450855,65.81807057289457],[0.33855351509748544,65.82737838066012],[0.3224319191404623,65.81807057289457],[0.3224319191404623,65.79945495736347],[0.33855351509748544,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Wigan","id":"E08000010","lon":-2.57246995,"lat":53.51449966,"q":3,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,65.81807057289458],[0.33855351509748544,65.82737838066014],[0.33855351509748544,65.84599399619124],[0.3224319191404623,65.85530180395679],[0.3063103231834392,65.84599399619124],[0.3063103231834392,65.82737838066014],[0.3224319191404623,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Knowsley","id":"E08000011","lon":-2.8329699,"lat":53.43790054,"q":2,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.79014714959791],[0.2901887272264161,65.79945495736347],[0.2901887272264161,65.81807057289457],[0.27406713126939297,65.82737838066012],[0.25794553531236986,65.81807057289457],[0.25794553531236986,65.79945495736347],[0.27406713126939297,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Liverpool","id":"E08000012","lon":-2.91364002,"lat":53.40829849,"q":1,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.81807057289458],[0.27406713126939297,65.82737838066014],[0.27406713126939297,65.84599399619124],[0.25794553531236986,65.85530180395679],[0.24182393935534674,65.84599399619124],[0.24182393935534674,65.82737838066014],[0.25794553531236986,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Sefton","id":"E08000014","lon":-2.99203992,"lat":53.48210144,"q":2,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.84599399619124],[0.2901887272264161,65.85530180395679],[0.2901887272264161,65.8739174194879],[0.27406713126939297,65.88322522725345],[0.25794553531236986,65.8739174194879],[0.25794553531236986,65.85530180395679],[0.27406713126939297,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Wirral","id":"E08000015","lon":-3.06502008,"lat":53.37450027,"q":1,"r":12},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.79014714959791],[0.25794553531236986,65.79945495736347],[0.25794553531236986,65.81807057289457],[0.24182393935534674,65.82737838066012],[0.22570234339832362,65.81807057289457],[0.22570234339832362,65.79945495736347],[0.24182393935534674,65.79014714959791]]]}},{"type":"Feature","properties":{"n":"Barnsley","id":"E08000016","lon":-1.54925001,"lat":53.5257988,"q":9,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.84599399619124],[0.5158910706247397,65.85530180395679],[0.5158910706247397,65.8739174194879],[0.4997694746677166,65.88322522725345],[0.4836478787106935,65.8739174194879],[0.4836478787106935,65.85530180395679],[0.4997694746677166,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Sunderland","id":"E08000024","lon":-1.43343997,"lat":54.85720062,"q":7,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.98561111267453],[0.46752628275367036,65.99491892044009],[0.46752628275367036,66.01353453597119],[0.45140468679664725,66.02284234373674],[0.43528309083962413,66.01353453597119],[0.43528309083962413,65.99491892044009],[0.45140468679664725,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Doncaster","id":"E08000017","lon":-1.10894001,"lat":53.52700043,"q":9,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.8739174194879],[0.5320126665817628,65.88322522725345],[0.5320126665817628,65.90184084278455],[0.5158910706247397,65.9111486505501],[0.4997694746677166,65.90184084278455],[0.4997694746677166,65.88322522725345],[0.5158910706247397,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Rotherham","id":"E08000018","lon":-1.28650999,"lat":53.39550018,"q":9,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.81807057289458],[0.5320126665817628,65.82737838066014],[0.5320126665817628,65.84599399619124],[0.5158910706247397,65.85530180395679],[0.4997694746677166,65.84599399619124],[0.4997694746677166,65.82737838066014],[0.5158910706247397,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Sheffield","id":"E08000019","lon":-1.54253995,"lat":53.40359879,"q":8,"r":13},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.81807057289458],[0.4997694746677166,65.82737838066014],[0.4997694746677166,65.84599399619124],[0.4836478787106935,65.85530180395679],[0.46752628275367036,65.84599399619124],[0.46752628275367036,65.82737838066014],[0.4836478787106935,65.81807057289458]]]}},{"type":"Feature","properties":{"n":"Newcastle upon Tyne","id":"E08000021","lon":-1.65296996,"lat":55.02099991,"q":5,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.98561111267453],[0.4030398989255779,65.99491892044009],[0.4030398989255779,66.01353453597119],[0.3869183029685548,66.02284234373674],[0.37079670701153167,66.01353453597119],[0.37079670701153167,65.99491892044009],[0.3869183029685548,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"Birmingham","id":"E08000025","lon":-1.88141,"lat":52.48400116,"q":5,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.62260660981796],[0.3869183029685548,65.63191441758352],[0.3869183029685548,65.65053003311462],[0.37079670701153167,65.65983784088017],[0.35467511105450855,65.65053003311462],[0.35467511105450855,65.63191441758352],[0.37079670701153167,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Coventry","id":"E08000026","lon":-1.51908004,"lat":52.41419983,"q":5,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.59468318652131],[0.4030398989255779,65.60399099428686],[0.4030398989255779,65.62260660981796],[0.3869183029685548,65.63191441758352],[0.37079670701153167,65.62260660981796],[0.37079670701153167,65.60399099428686],[0.3869183029685548,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Hillingdon","id":"E09000017","lon":-0.44182,"lat":51.53659821,"q":9,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.5158910706247397,65.53883633992798],[0.5320126665817628,65.54814414769353],[0.5320126665817628,65.56675976322464],[0.5158910706247397,65.57606757099019],[0.4997694746677166,65.56675976322464],[0.4997694746677166,65.54814414769353],[0.5158910706247397,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Dudley","id":"E08000027","lon":-2.10171008,"lat":52.49509811,"q":4,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.65053003311462],[0.37079670701153167,65.65983784088017],[0.37079670701153167,65.67845345641128],[0.35467511105450855,65.68776126417683],[0.33855351509748544,65.67845345641128],[0.33855351509748544,65.65983784088017],[0.35467511105450855,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Sandwell","id":"E08000028","lon":-2.00770998,"lat":52.51480103,"q":5,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.3869183029685548,65.65053003311462],[0.4030398989255779,65.65983784088017],[0.4030398989255779,65.67845345641128],[0.3869183029685548,65.68776126417683],[0.37079670701153167,65.67845345641128],[0.37079670701153167,65.65983784088017],[0.3869183029685548,65.65053003311462]]]}},{"type":"Feature","properties":{"n":"Hounslow","id":"E09000018","lon":-0.37843999,"lat":51.46239853,"q":9,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.51091291663133],[0.5158910706247397,65.52022072439688],[0.5158910706247397,65.53883633992798],[0.4997694746677166,65.54814414769353],[0.4836478787106935,65.53883633992798],[0.4836478787106935,65.52022072439688],[0.4997694746677166,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Islington","id":"E09000019","lon":-0.10992,"lat":51.54550171,"q":11,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.51091291663133],[0.5803774544528322,65.52022072439688],[0.5803774544528322,65.53883633992798],[0.5642558584958091,65.54814414769353],[0.5481342625387859,65.53883633992798],[0.5481342625387859,65.52022072439688],[0.5642558584958091,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Solihull","id":"E08000029","lon":-1.71557999,"lat":52.43099976,"q":4,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,65.59468318652131],[0.37079670701153167,65.60399099428686],[0.37079670701153167,65.62260660981796],[0.35467511105450855,65.63191441758352],[0.33855351509748544,65.62260660981796],[0.33855351509748544,65.60399099428686],[0.35467511105450855,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Walsall","id":"E08000030","lon":-1.97044003,"lat":52.60499954,"q":5,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,65.67845345641128],[0.3869183029685548,65.68776126417683],[0.3869183029685548,65.70637687970793],[0.37079670701153167,65.71568468747348],[0.35467511105450855,65.70637687970793],[0.35467511105450855,65.68776126417683],[0.37079670701153167,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Wolverhampton","id":"E08000031","lon":-2.12746,"lat":52.59790039,"q":4,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,65.67845345641128],[0.35467511105450855,65.68776126417683],[0.35467511105450855,65.70637687970793],[0.33855351509748544,65.71568468747348],[0.3224319191404623,65.70637687970793],[0.3224319191404623,65.68776126417683],[0.33855351509748544,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Bradford","id":"E08000032","lon":-1.87389004,"lat":53.84379959,"q":7,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.43528309083962413,65.90184084278455],[0.45140468679664725,65.9111486505501],[0.45140468679664725,65.92976426608121],[0.43528309083962413,65.93907207384676],[0.419161494882601,65.92976426608121],[0.419161494882601,65.9111486505501],[0.43528309083962413,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Calderdale","id":"E08000033","lon":-1.96182001,"lat":53.72050095,"q":7,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.45140468679664725,65.8739174194879],[0.46752628275367036,65.88322522725345],[0.46752628275367036,65.90184084278455],[0.45140468679664725,65.9111486505501],[0.43528309083962413,65.90184084278455],[0.43528309083962413,65.88322522725345],[0.45140468679664725,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Kirklees","id":"E08000034","lon":-1.78085005,"lat":53.64229965,"q":8,"r":14},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.84599399619124],[0.4836478787106935,65.85530180395679],[0.4836478787106935,65.8739174194879],[0.46752628275367036,65.88322522725345],[0.45140468679664725,65.8739174194879],[0.45140468679664725,65.85530180395679],[0.46752628275367036,65.84599399619124]]]}},{"type":"Feature","properties":{"n":"Wakefield","id":"E08000036","lon":-1.42092001,"lat":53.65919876,"q":8,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.4836478787106935,65.8739174194879],[0.4997694746677166,65.88322522725345],[0.4997694746677166,65.90184084278455],[0.4836478787106935,65.9111486505501],[0.46752628275367036,65.90184084278455],[0.46752628275367036,65.88322522725345],[0.4836478787106935,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Leeds","id":"E08000035","lon":-1.50735998,"lat":53.8227005,"q":8,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.46752628275367036,65.90184084278455],[0.4836478787106935,65.9111486505501],[0.4836478787106935,65.92976426608121],[0.46752628275367036,65.93907207384676],[0.45140468679664725,65.92976426608121],[0.45140468679664725,65.9111486505501],[0.46752628275367036,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Bexley","id":"E09000004","lon":0.146212,"lat":51.45819855,"q":13,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.6448638382809246,65.42714264674134],[0.6609854342379478,65.4364504545069],[0.6609854342379478,65.455066070038],[0.6448638382809246,65.46437387780355],[0.6287422423239015,65.455066070038],[0.6287422423239015,65.4364504545069],[0.6448638382809246,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Gateshead","id":"E08000037","lon":-1.6868,"lat":54.93119812,"q":6,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.419161494882601,65.98561111267453],[0.43528309083962413,65.99491892044009],[0.43528309083962413,66.01353453597119],[0.419161494882601,66.02284234373674],[0.4030398989255779,66.01353453597119],[0.4030398989255779,65.99491892044009],[0.419161494882601,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"City of London","id":"E09000001","lon":-0.09351,"lat":51.5155983,"q":12,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.51091291663133],[0.6126206463668784,65.52022072439688],[0.6126206463668784,65.53883633992798],[0.5964990504098553,65.54814414769353],[0.5803774544528322,65.53883633992798],[0.5803774544528322,65.52022072439688],[0.5964990504098553,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Barking and Dagenham","id":"E09000002","lon":0.12950601,"lat":51.54550171,"q":14,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.6771070301949709,65.48298949333467],[0.693228626151994,65.49229730110022],[0.693228626151994,65.51091291663133],[0.6771070301949709,65.52022072439688],[0.6609854342379478,65.51091291663133],[0.6609854342379478,65.49229730110022],[0.6771070301949709,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Barnet","id":"E09000003","lon":-0.21821,"lat":51.61109924,"q":11,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.5642558584958091,65.56675976322464],[0.5803774544528322,65.57606757099019],[0.5803774544528322,65.5946831865213],[0.5642558584958091,65.60399099428685],[0.5481342625387859,65.5946831865213],[0.5481342625387859,65.57606757099019],[0.5642558584958091,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Kensington and Chelsea","id":"E09000020","lon":-0.18976,"lat":51.49639893,"q":10,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.5481342625387859,65.48298949333467],[0.5642558584958091,65.49229730110022],[0.5642558584958091,65.51091291663133],[0.5481342625387859,65.52022072439688],[0.5320126665817628,65.51091291663133],[0.5320126665817628,65.49229730110022],[0.5481342625387859,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Richmond upon Thames","id":"E09000027","lon":-0.28913999,"lat":51.44029999,"q":9,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.4997694746677166,65.455066070038],[0.5158910706247397,65.46437387780355],[0.5158910706247397,65.48298949333466],[0.4997694746677166,65.49229730110021],[0.4836478787106935,65.48298949333466],[0.4836478787106935,65.46437387780355],[0.4997694746677166,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Southwark","id":"E09000028","lon":-0.07309,"lat":51.46590042,"q":12,"r":0},"geometry":{"type":"Polygon","coordinates":[[[0.5964990504098553,65.455066070038],[0.6126206463668784,65.46437387780355],[0.6126206463668784,65.48298949333466],[0.5964990504098553,65.49229730110021],[0.5803774544528322,65.48298949333466],[0.5803774544528322,65.46437387780355],[0.5964990504098553,65.455066070038]]]}},{"type":"Feature","properties":{"n":"Sutton","id":"E09000029","lon":-0.17227,"lat":51.35760117,"q":11,"r":-1},"geometry":{"type":"Polygon","coordinates":[[[0.5803774544528322,65.42714264674134],[0.5964990504098553,65.4364504545069],[0.5964990504098553,65.455066070038],[0.5803774544528322,65.46437387780355],[0.5642558584958091,65.455066070038],[0.5642558584958091,65.4364504545069],[0.5803774544528322,65.42714264674134]]]}},{"type":"Feature","properties":{"n":"Tower Hamlets","id":"E09000030","lon":-0.0364,"lat":51.51549911,"q":12,"r":1},"geometry":{"type":"Polygon","coordinates":[[[0.6126206463668784,65.48298949333467],[0.6287422423239015,65.49229730110022],[0.6287422423239015,65.51091291663133],[0.6126206463668784,65.52022072439688],[0.5964990504098553,65.51091291663133],[0.5964990504098553,65.49229730110022],[0.6126206463668784,65.48298949333467]]]}},{"type":"Feature","properties":{"n":"Waltham Forest","id":"E09000031","lon":-0.01881,"lat":51.59460068,"q":13,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.6287422423239015,65.56675976322464],[0.6448638382809246,65.57606757099019],[0.6448638382809246,65.5946831865213],[0.6287422423239015,65.60399099428685],[0.6126206463668784,65.5946831865213],[0.6126206463668784,65.57606757099019],[0.6287422423239015,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Antrim and Newtownabbey","id":"N09000001","lon":-6.17759991,"lat":54.69390106,"q":-4,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.08060797978511558,65.90184084278455],[0.0967295757421387,65.9111486505501],[0.0967295757421387,65.92976426608121],[0.08060797978511558,65.93907207384676],[0.06448638382809246,65.92976426608121],[0.06448638382809246,65.9111486505501],[0.08060797978511558,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Armagh City, Banbridge and Craigavon","id":"N09000002","lon":-6.43454981,"lat":54.38669968,"q":-5,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.04836478787106935,65.90184084278455],[0.06448638382809246,65.9111486505501],[0.06448638382809246,65.92976426608121],[0.04836478787106935,65.93907207384676],[0.03224319191404623,65.92976426608121],[0.03224319191404623,65.9111486505501],[0.04836478787106935,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Belfast","id":"N09000003","lon":-5.92535019,"lat":54.5984993,"q":-4,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.92976426608122],[0.11285117169916181,65.93907207384677],[0.11285117169916181,65.95768768937788],[0.0967295757421387,65.96699549714343],[0.08060797978511558,65.95768768937788],[0.08060797978511558,65.93907207384677],[0.0967295757421387,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Causeway Coast and Glens","id":"N09000004","lon":-6.59959984,"lat":55.03960037,"q":-5,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.04836478787106935,65.95768768937788],[0.06448638382809246,65.96699549714343],[0.06448638382809246,65.98561111267453],[0.04836478787106935,65.99491892044009],[0.03224319191404623,65.98561111267453],[0.03224319191404623,65.96699549714343],[0.04836478787106935,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Derry City and Strabane","id":"N09000005","lon":-7.42063999,"lat":54.80899811,"q":-6,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.03224319191404623,65.92976426608122],[0.04836478787106935,65.93907207384677],[0.04836478787106935,65.95768768937788],[0.03224319191404623,65.96699549714343],[0.016121595957023116,65.95768768937788],[0.016121595957023116,65.93907207384677],[0.03224319191404623,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Fermanagh and Omagh","id":"N09000006","lon":-7.52710009,"lat":54.3852005,"q":-6,"r":16},"geometry":{"type":"Polygon","coordinates":[[[0.016121595957023116,65.90184084278455],[0.03224319191404623,65.9111486505501],[0.03224319191404623,65.92976426608121],[0.016121595957023116,65.93907207384676],[0,65.92976426608121],[0,65.9111486505501],[0.016121595957023116,65.90184084278455]]]}},{"type":"Feature","properties":{"n":"Lisburn and Castlereagh","id":"N09000007","lon":-6.03544998,"lat":54.49750137,"q":-5,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.06448638382809246,65.8739174194879],[0.08060797978511558,65.88322522725345],[0.08060797978511558,65.90184084278455],[0.06448638382809246,65.9111486505501],[0.04836478787106935,65.90184084278455],[0.04836478787106935,65.88322522725345],[0.06448638382809246,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Mid and East Antrim","id":"N09000008","lon":-6.14645004,"lat":54.86460114,"q":-4,"r":18},"geometry":{"type":"Polygon","coordinates":[[[0.08060797978511558,65.95768768937788],[0.0967295757421387,65.96699549714343],[0.0967295757421387,65.98561111267453],[0.08060797978511558,65.99491892044009],[0.06448638382809246,65.98561111267453],[0.06448638382809246,65.96699549714343],[0.08060797978511558,65.95768768937788]]]}},{"type":"Feature","properties":{"n":"Mid Ulster","id":"N09000009","lon":-6.8888998,"lat":54.55270004,"q":-5,"r":17},"geometry":{"type":"Polygon","coordinates":[[[0.06448638382809246,65.92976426608122],[0.08060797978511558,65.93907207384677],[0.08060797978511558,65.95768768937788],[0.06448638382809246,65.96699549714343],[0.04836478787106935,65.95768768937788],[0.04836478787106935,65.93907207384677],[0.06448638382809246,65.92976426608122]]]}},{"type":"Feature","properties":{"n":"Newry, Mourne and Down","id":"N09000010","lon":-6.0889101,"lat":54.1495018,"q":-4,"r":15},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.8739174194879],[0.11285117169916181,65.88322522725345],[0.11285117169916181,65.90184084278455],[0.0967295757421387,65.9111486505501],[0.08060797978511558,65.90184084278455],[0.08060797978511558,65.88322522725345],[0.0967295757421387,65.8739174194879]]]}},{"type":"Feature","properties":{"n":"Clackmannanshire","id":"S12000005","lon":-3.7534399,"lat":56.14720154,"q":2,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,66.12522822915783],[0.2901887272264161,66.13453603692338],[0.2901887272264161,66.15315165245448],[0.27406713126939297,66.16245946022003],[0.25794553531236986,66.15315165245448],[0.25794553531236986,66.13453603692338],[0.27406713126939297,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"Dumfries and Galloway","id":"S12000006","lon":-4.02862978,"lat":55.09619904,"q":4,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.01353453597119],[0.35467511105450855,66.02284234373674],[0.35467511105450855,66.04145795926785],[0.33855351509748544,66.0507657670334],[0.3224319191404623,66.04145795926785],[0.3224319191404623,66.02284234373674],[0.33855351509748544,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"East Ayrshire","id":"S12000008","lon":-4.29056978,"lat":55.49670029,"q":3,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.01353453597119],[0.3224319191404623,66.02284234373674],[0.3224319191404623,66.04145795926785],[0.3063103231834392,66.0507657670334],[0.2901887272264161,66.04145795926785],[0.2901887272264161,66.02284234373674],[0.3063103231834392,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"East Lothian","id":"S12000010","lon":-2.72434998,"lat":55.94210052,"q":5,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,66.06938138256452],[0.3869183029685548,66.07868919033007],[0.3869183029685548,66.09730480586117],[0.37079670701153167,66.10661261362672],[0.35467511105450855,66.09730480586117],[0.35467511105450855,66.07868919033007],[0.37079670701153167,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"East Renfrewshire","id":"S12000011","lon":-4.36059999,"lat":55.74869919,"q":2,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,66.01353453597119],[0.2901887272264161,66.02284234373674],[0.2901887272264161,66.04145795926785],[0.27406713126939297,66.0507657670334],[0.25794553531236986,66.04145795926785],[0.25794553531236986,66.02284234373674],[0.27406713126939297,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Na h-Eileanan Siar","id":"S12000013","lon":-6.65721989,"lat":58.19940186,"q":-1,"r":27},"geometry":{"type":"Polygon","coordinates":[[[0.1934591514842774,66.20899849904781],[0.2095807474413005,66.21830630681336],[0.2095807474413005,66.23692192234446],[0.1934591514842774,66.24622973011002],[0.17733755552725428,66.23692192234446],[0.17733755552725428,66.21830630681336],[0.1934591514842774,66.20899849904781]]]}},{"type":"Feature","properties":{"n":"Falkirk","id":"S12000014","lon":-3.77060008,"lat":55.99599838,"q":2,"r":23},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,66.09730480586117],[0.3063103231834392,66.10661261362672],[0.3063103231834392,66.12522822915783],[0.2901887272264161,66.13453603692338],[0.27406713126939297,66.12522822915783],[0.27406713126939297,66.10661261362672],[0.2901887272264161,66.09730480586117]]]}},{"type":"Feature","properties":{"n":"Highland","id":"S12000017","lon":-4.66091013,"lat":57.58670044,"q":1,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,66.18107507575115],[0.25794553531236986,66.1903828835167],[0.25794553531236986,66.20899849904781],[0.24182393935534674,66.21830630681336],[0.22570234339832362,66.20899849904781],[0.22570234339832362,66.1903828835167],[0.24182393935534674,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"Inverclyde","id":"S12000018","lon":-4.75387001,"lat":55.90029907,"q":0,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,66.04145795926786],[0.24182393935534674,66.05076576703341],[0.24182393935534674,66.06938138256452],[0.22570234339832362,66.07868919033007],[0.2095807474413005,66.06938138256452],[0.2095807474413005,66.05076576703341],[0.22570234339832362,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Midlothian","id":"S12000019","lon":-3.1173799,"lat":55.82109833,"q":3,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,66.04145795926786],[0.33855351509748544,66.05076576703341],[0.33855351509748544,66.06938138256452],[0.3224319191404623,66.07868919033007],[0.3063103231834392,66.06938138256452],[0.3063103231834392,66.05076576703341],[0.3224319191404623,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Moray","id":"S12000020","lon":-3.20186996,"lat":57.47679901,"q":2,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,66.18107507575115],[0.2901887272264161,66.1903828835167],[0.2901887272264161,66.20899849904781],[0.27406713126939297,66.21830630681336],[0.25794553531236986,66.20899849904781],[0.25794553531236986,66.1903828835167],[0.27406713126939297,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"North Ayrshire","id":"S12000021","lon":-4.7247901,"lat":55.72790146,"q":1,"r":20},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,66.01353453597119],[0.25794553531236986,66.02284234373674],[0.25794553531236986,66.04145795926785],[0.24182393935534674,66.0507657670334],[0.22570234339832362,66.04145795926785],[0.22570234339832362,66.02284234373674],[0.24182393935534674,66.01353453597119]]]}},{"type":"Feature","properties":{"n":"Orkney Islands","id":"S12000023","lon":-2.90028,"lat":58.94329834,"q":4,"r":28},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.23692192234446],[0.35467511105450855,66.24622973011002],[0.35467511105450855,66.26484534564112],[0.33855351509748544,66.27415315340667],[0.3224319191404623,66.26484534564112],[0.3224319191404623,66.24622973011002],[0.33855351509748544,66.23692192234446]]]}},{"type":"Feature","properties":{"n":"Scottish Borders","id":"S12000026","lon":-2.85865998,"lat":55.52590179,"q":4,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.35467511105450855,66.04145795926786],[0.37079670701153167,66.05076576703341],[0.37079670701153167,66.06938138256452],[0.35467511105450855,66.07868919033007],[0.33855351509748544,66.06938138256452],[0.33855351509748544,66.05076576703341],[0.35467511105450855,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Shetland Islands","id":"S12000027","lon":-1.37344003,"lat":60.50500107,"q":5,"r":30},"geometry":{"type":"Polygon","coordinates":[[[0.37079670701153167,66.29276876893779],[0.3869183029685548,66.30207657670334],[0.3869183029685548,66.32069219223445],[0.37079670701153167,66.33],[0.35467511105450855,66.32069219223445],[0.35467511105450855,66.30207657670334],[0.37079670701153167,66.29276876893779]]]}},{"type":"Feature","properties":{"n":"South Ayrshire","id":"S12000028","lon":-4.72901011,"lat":55.23009872,"q":1,"r":19},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.98561111267453],[0.27406713126939297,65.99491892044009],[0.27406713126939297,66.01353453597119],[0.25794553531236986,66.02284234373674],[0.24182393935534674,66.01353453597119],[0.24182393935534674,65.99491892044009],[0.25794553531236986,65.98561111267453]]]}},{"type":"Feature","properties":{"n":"South Lanarkshire","id":"S12000029","lon":-3.83272004,"lat":55.60449982,"q":2,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,66.04145795926786],[0.3063103231834392,66.05076576703341],[0.3063103231834392,66.06938138256452],[0.2901887272264161,66.07868919033007],[0.27406713126939297,66.06938138256452],[0.27406713126939297,66.05076576703341],[0.2901887272264161,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Stirling","id":"S12000030","lon":-4.32595015,"lat":56.24950027,"q":1,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,66.12522822915783],[0.25794553531236986,66.13453603692338],[0.25794553531236986,66.15315165245448],[0.24182393935534674,66.16245946022003],[0.22570234339832362,66.15315165245448],[0.22570234339832362,66.13453603692338],[0.24182393935534674,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"Aberdeen City","id":"S12000033","lon":-2.20397997,"lat":57.16699982,"q":4,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.18107507575115],[0.35467511105450855,66.1903828835167],[0.35467511105450855,66.20899849904781],[0.33855351509748544,66.21830630681336],[0.3224319191404623,66.20899849904781],[0.3224319191404623,66.1903828835167],[0.33855351509748544,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"Aberdeenshire","id":"S12000034","lon":-2.79204988,"lat":57.23469925,"q":3,"r":26},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.18107507575115],[0.3224319191404623,66.1903828835167],[0.3224319191404623,66.20899849904781],[0.3063103231834392,66.21830630681336],[0.2901887272264161,66.20899849904781],[0.2901887272264161,66.1903828835167],[0.3063103231834392,66.18107507575115]]]}},{"type":"Feature","properties":{"n":"Argyll and Bute","id":"S12000035","lon":-5.22113991,"lat":56.28939819,"q":0,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,66.12522822915783],[0.22570234339832362,66.13453603692338],[0.22570234339832362,66.15315165245448],[0.2095807474413005,66.16245946022003],[0.1934591514842774,66.15315165245448],[0.1934591514842774,66.13453603692338],[0.2095807474413005,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"City of Edinburgh","id":"S12000036","lon":-3.27825999,"lat":55.91120148,"q":4,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.33855351509748544,66.06938138256452],[0.35467511105450855,66.07868919033007],[0.35467511105450855,66.09730480586117],[0.33855351509748544,66.10661261362672],[0.3224319191404623,66.09730480586117],[0.3224319191404623,66.07868919033007],[0.33855351509748544,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"West Dunbartonshire","id":"S12000039","lon":-4.52074003,"lat":56.00139999,"q":0,"r":23},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,66.09730480586117],[0.24182393935534674,66.10661261362672],[0.24182393935534674,66.12522822915783],[0.22570234339832362,66.13453603692338],[0.2095807474413005,66.12522822915783],[0.2095807474413005,66.10661261362672],[0.22570234339832362,66.09730480586117]]]}},{"type":"Feature","properties":{"n":"Renfrewshire","id":"S12000038","lon":-4.56833982,"lat":55.84859848,"q":1,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,66.06938138256452],[0.25794553531236986,66.07868919033007],[0.25794553531236986,66.09730480586117],[0.24182393935534674,66.10661261362672],[0.22570234339832362,66.09730480586117],[0.22570234339832362,66.07868919033007],[0.24182393935534674,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"East Dunbartonshire","id":"S12000045","lon":-4.22417021,"lat":55.95830154,"q":1,"r":23},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,66.09730480586117],[0.27406713126939297,66.10661261362672],[0.27406713126939297,66.12522822915783],[0.25794553531236986,66.13453603692338],[0.24182393935534674,66.12522822915783],[0.24182393935534674,66.10661261362672],[0.25794553531236986,66.09730480586117]]]}},{"type":"Feature","properties":{"n":"Fife","id":"S12000047","lon":-2.98235011,"lat":56.23120117,"q":3,"r":24},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.12522822915783],[0.3224319191404623,66.13453603692338],[0.3224319191404623,66.15315165245448],[0.3063103231834392,66.16245946022003],[0.2901887272264161,66.15315165245448],[0.2901887272264161,66.13453603692338],[0.3063103231834392,66.12522822915783]]]}},{"type":"Feature","properties":{"n":"West Lothian","id":"S12000040","lon":-3.60909009,"lat":55.89920044,"q":3,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.3063103231834392,66.06938138256452],[0.3224319191404623,66.07868919033007],[0.3224319191404623,66.09730480586117],[0.3063103231834392,66.10661261362672],[0.2901887272264161,66.09730480586117],[0.2901887272264161,66.07868919033007],[0.3063103231834392,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"Angus","id":"S12000041","lon":-2.89189005,"lat":56.72480011,"q":2,"r":25},"geometry":{"type":"Polygon","coordinates":[[[0.2901887272264161,66.1531516524545],[0.3063103231834392,66.16245946022005],[0.3063103231834392,66.18107507575115],[0.2901887272264161,66.1903828835167],[0.27406713126939297,66.18107507575115],[0.27406713126939297,66.16245946022005],[0.2901887272264161,66.1531516524545]]]}},{"type":"Feature","properties":{"n":"Dundee City","id":"S12000042","lon":-2.97094989,"lat":56.4776001,"q":3,"r":25},"geometry":{"type":"Polygon","coordinates":[[[0.3224319191404623,66.1531516524545],[0.33855351509748544,66.16245946022005],[0.33855351509748544,66.18107507575115],[0.3224319191404623,66.1903828835167],[0.3063103231834392,66.18107507575115],[0.3063103231834392,66.16245946022005],[0.3224319191404623,66.1531516524545]]]}},{"type":"Feature","properties":{"n":"Perth and Kinross","id":"S12000048","lon":-3.88479996,"lat":56.57529831,"q":1,"r":25},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,66.1531516524545],[0.27406713126939297,66.16245946022005],[0.27406713126939297,66.18107507575115],[0.25794553531236986,66.1903828835167],[0.24182393935534674,66.18107507575115],[0.24182393935534674,66.16245946022005],[0.25794553531236986,66.1531516524545]]]}},{"type":"Feature","properties":{"n":"Glasgow City","id":"S12000049","lon":-4,"lat":60,"q":1,"r":21},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,66.04145795926786],[0.27406713126939297,66.05076576703341],[0.27406713126939297,66.06938138256452],[0.25794553531236986,66.07868919033007],[0.24182393935534674,66.06938138256452],[0.24182393935534674,66.05076576703341],[0.25794553531236986,66.04145795926786]]]}},{"type":"Feature","properties":{"n":"Bridgend","lad19nmw":"Pen-y-bont ar Ogwr","id":"W06000013","lon":-3.61359,"lat":51.56060028,"q":-1,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.17733755552725428,65.56675976322464],[0.1934591514842774,65.57606757099019],[0.1934591514842774,65.5946831865213],[0.17733755552725428,65.60399099428685],[0.16121595957023116,65.5946831865213],[0.16121595957023116,65.57606757099019],[0.17733755552725428,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"North Lanarkshire","id":"S12000050","lon":-4,"lat":60,"q":2,"r":22},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,66.06938138256452],[0.2901887272264161,66.07868919033007],[0.2901887272264161,66.09730480586117],[0.27406713126939297,66.10661261362672],[0.25794553531236986,66.09730480586117],[0.25794553531236986,66.07868919033007],[0.27406713126939297,66.06938138256452]]]}},{"type":"Feature","properties":{"n":"Isle of Anglesey","lad19nmw":"Ynys Môn","id":"W06000001","lon":-4.32290983,"lat":53.27939987,"q":-2,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.70637687970795],[0.17733755552725428,65.7156846874735],[0.17733755552725428,65.7343003030046],[0.16121595957023116,65.74360811077015],[0.14509436361320804,65.7343003030046],[0.14509436361320804,65.7156846874735],[0.16121595957023116,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Gwynedd","lad19nmw":"Gwynedd","id":"W06000002","lon":-3.8155899,"lat":52.89830017,"q":1,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.67845345641128],[0.25794553531236986,65.68776126417683],[0.25794553531236986,65.70637687970793],[0.24182393935534674,65.71568468747348],[0.22570234339832362,65.70637687970793],[0.22570234339832362,65.68776126417683],[0.24182393935534674,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Conwy","lad19nmw":"Conwy","id":"W06000003","lon":-3.74645996,"lat":53.1473999,"q":0,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,65.67845345641128],[0.22570234339832362,65.68776126417683],[0.22570234339832362,65.70637687970793],[0.2095807474413005,65.71568468747348],[0.1934591514842774,65.70637687970793],[0.1934591514842774,65.68776126417683],[0.2095807474413005,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Denbighshire","lad19nmw":"Sir Ddinbych","id":"W06000004","lon":-3.34761,"lat":53.0882988,"q":1,"r":9},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.70637687970795],[0.27406713126939297,65.7156846874735],[0.27406713126939297,65.7343003030046],[0.25794553531236986,65.74360811077015],[0.24182393935534674,65.7343003030046],[0.24182393935534674,65.7156846874735],[0.25794553531236986,65.70637687970795]]]}},{"type":"Feature","properties":{"n":"Flintshire","lad19nmw":"Sir y Fflint","id":"W06000005","lon":-3.17604995,"lat":53.21500015,"q":2,"r":8},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.67845345641128],[0.2901887272264161,65.68776126417683],[0.2901887272264161,65.70637687970793],[0.27406713126939297,65.71568468747348],[0.25794553531236986,65.70637687970793],[0.25794553531236986,65.68776126417683],[0.27406713126939297,65.67845345641128]]]}},{"type":"Feature","properties":{"n":"Wrexham","lad19nmw":"Wrecsam","id":"W06000006","lon":-2.99202991,"lat":53.00170135,"q":2,"r":10},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.7343003030046],[0.2901887272264161,65.74360811077015],[0.2901887272264161,65.76222372630126],[0.27406713126939297,65.77153153406681],[0.25794553531236986,65.76222372630126],[0.25794553531236986,65.74360811077015],[0.27406713126939297,65.7343003030046]]]}},{"type":"Feature","properties":{"n":"Ceredigion","lad19nmw":"Ceredigion","id":"W06000008","lon":-3.94993997,"lat":52.29800034,"q":-1,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.1934591514842774,65.59468318652131],[0.2095807474413005,65.60399099428686],[0.2095807474413005,65.62260660981796],[0.1934591514842774,65.63191441758352],[0.17733755552725428,65.62260660981796],[0.17733755552725428,65.60399099428686],[0.1934591514842774,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Pembrokeshire","lad19nmw":"Sir Benfro","id":"W06000009","lon":-4.90818024,"lat":51.85509872,"q":-4,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.0967295757421387,65.53883633992798],[0.11285117169916181,65.54814414769353],[0.11285117169916181,65.56675976322464],[0.0967295757421387,65.57606757099019],[0.08060797978511558,65.56675976322464],[0.08060797978511558,65.54814414769353],[0.0967295757421387,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Carmarthenshire","lad19nmw":"Sir Gaerfyrddin","id":"W06000010","lon":-4.2111001,"lat":51.89500046,"q":-2,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.14509436361320804,65.56675976322464],[0.16121595957023116,65.57606757099019],[0.16121595957023116,65.5946831865213],[0.14509436361320804,65.60399099428685],[0.12897276765618493,65.5946831865213],[0.12897276765618493,65.57606757099019],[0.14509436361320804,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Swansea","lad19nmw":"Abertawe","id":"W06000011","lon":-3.96723008,"lat":51.65810013,"q":-3,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.12897276765618493,65.53883633992798],[0.14509436361320804,65.54814414769353],[0.14509436361320804,65.56675976322464],[0.12897276765618493,65.57606757099019],[0.11285117169916181,65.56675976322464],[0.11285117169916181,65.54814414769353],[0.12897276765618493,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Neath Port Talbot","lad19nmw":"Castell-nedd Port Talbot","id":"W06000012","lon":-3.74638009,"lat":51.64450073,"q":-2,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.16121595957023116,65.53883633992798],[0.17733755552725428,65.54814414769353],[0.17733755552725428,65.56675976322464],[0.16121595957023116,65.57606757099019],[0.14509436361320804,65.56675976322464],[0.14509436361320804,65.54814414769353],[0.16121595957023116,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Vale of Glamorgan","lad19nmw":"Bro Morgannwg","id":"W06000014","lon":-3.39803004,"lat":51.44839859,"q":-1,"r":2},"geometry":{"type":"Polygon","coordinates":[[[0.17733755552725428,65.51091291663133],[0.1934591514842774,65.52022072439688],[0.1934591514842774,65.53883633992798],[0.17733755552725428,65.54814414769353],[0.16121595957023116,65.53883633992798],[0.16121595957023116,65.52022072439688],[0.17733755552725428,65.51091291663133]]]}},{"type":"Feature","properties":{"n":"Cardiff","lad19nmw":"Caerdydd","id":"W06000015","lon":-3.22212005,"lat":51.50249863,"q":-1,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.1934591514842774,65.53883633992798],[0.2095807474413005,65.54814414769353],[0.2095807474413005,65.56675976322464],[0.1934591514842774,65.57606757099019],[0.17733755552725428,65.56675976322464],[0.17733755552725428,65.54814414769353],[0.1934591514842774,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Rhondda Cynon Taf","lad19nmw":"Rhondda Cynon Taf","id":"W06000016","lon":-3.41358995,"lat":51.62179947,"q":0,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.59468318652131],[0.24182393935534674,65.60399099428686],[0.24182393935534674,65.62260660981796],[0.22570234339832362,65.63191441758352],[0.2095807474413005,65.62260660981796],[0.2095807474413005,65.60399099428686],[0.22570234339832362,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Torfaen","lad19nmw":"Torfaen","id":"W06000020","lon":-3.05100989,"lat":51.69839859,"q":1,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.56675976322464],[0.25794553531236986,65.57606757099019],[0.25794553531236986,65.5946831865213],[0.24182393935534674,65.60399099428685],[0.22570234339832362,65.5946831865213],[0.22570234339832362,65.57606757099019],[0.24182393935534674,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Caerphilly","lad19nmw":"Caerffili","id":"W06000018","lon":-3.19753003,"lat":51.65000153,"q":1,"r":5},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.59468318652131],[0.27406713126939297,65.60399099428686],[0.27406713126939297,65.62260660981796],[0.25794553531236986,65.63191441758352],[0.24182393935534674,65.62260660981796],[0.24182393935534674,65.60399099428686],[0.25794553531236986,65.59468318652131]]]}},{"type":"Feature","properties":{"n":"Blaenau Gwent","lad19nmw":"Blaenau Gwent","id":"W06000019","lon":-3.18592,"lat":51.75360107,"q":0,"r":4},"geometry":{"type":"Polygon","coordinates":[[[0.2095807474413005,65.56675976322464],[0.22570234339832362,65.57606757099019],[0.22570234339832362,65.5946831865213],[0.2095807474413005,65.60399099428685],[0.1934591514842774,65.5946831865213],[0.1934591514842774,65.57606757099019],[0.2095807474413005,65.56675976322464]]]}},{"type":"Feature","properties":{"n":"Merthyr Tydfil","lad19nmw":"Merthyr Tudful","id":"W06000024","lon":-3.36424994,"lat":51.74860001,"q":1,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.24182393935534674,65.62260660981796],[0.25794553531236986,65.63191441758352],[0.25794553531236986,65.65053003311462],[0.24182393935534674,65.65983784088017],[0.22570234339832362,65.65053003311462],[0.22570234339832362,65.63191441758352],[0.24182393935534674,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Monmouthshire","lad19nmw":"Sir Fynwy","id":"W06000021","lon":-2.90280008,"lat":51.77830124,"q":2,"r":6},"geometry":{"type":"Polygon","coordinates":[[[0.27406713126939297,65.62260660981796],[0.2901887272264161,65.63191441758352],[0.2901887272264161,65.65053003311462],[0.27406713126939297,65.65983784088017],[0.25794553531236986,65.65053003311462],[0.25794553531236986,65.63191441758352],[0.27406713126939297,65.62260660981796]]]}},{"type":"Feature","properties":{"n":"Newport","lad19nmw":"Casnewydd","id":"W06000022","lon":-2.89769006,"lat":51.58229828,"q":0,"r":3},"geometry":{"type":"Polygon","coordinates":[[[0.22570234339832362,65.53883633992798],[0.24182393935534674,65.54814414769353],[0.24182393935534674,65.56675976322464],[0.22570234339832362,65.57606757099019],[0.2095807474413005,65.56675976322464],[0.2095807474413005,65.54814414769353],[0.22570234339832362,65.53883633992798]]]}},{"type":"Feature","properties":{"n":"Powys","lad19nmw":"Powys","id":"W06000023","lon":-3.43532991,"lat":52.34859848,"q":1,"r":7},"geometry":{"type":"Polygon","coordinates":[[[0.25794553531236986,65.65053003311462],[0.27406713126939297,65.65983784088017],[0.27406713126939297,65.67845345641128],[0.25794553531236986,65.68776126417683],[0.24182393935534674,65.67845345641128],[0.24182393935534674,65.65983784088017],[0.25794553531236986,65.65053003311462]]]}}]}
================================================
FILE: Heatmaps/Welsh LA Heatmaps.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(forcats)
library(readxl)
library(RcppRoll)
library(cowplot)
#Read in data
temp <- tempfile()
source <- "http://www2.nphs.wales.nhs.uk:8080/CommunitySurveillanceDocs.nsf/3dc04669c9e1eaa880257062003b246b/77fdb9a33544aee88025855100300cab/$FILE/Rapid%20COVID-19%20surveillance%20data.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read_excel(temp, sheet=3)
colnames(data) <- c("LA", "date", "cases", "totalcases", "totalcaserate", "tests", "totaltests")
data$date <- as.Date(data$date)
heatmap <- data %>%
group_by(LA) %>%
mutate(casesroll_avg=roll_mean(cases, 7, align="left", fill=0)) %>%
mutate(maxcaserate=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcaserate)][1])
heatmap$maxcaseprop <- heatmap$casesroll_avg/heatmap$maxcaserate
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(heatmap$date)
#Plot case trajectories
casetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(LA, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in Welsh Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Wales | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
casebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=totalcases, y=fct_reorder(LA, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases", breaks=c(0,500,1000))+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDWelshLACasesHeatmap.tiff", units="in", width=10, height=6, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
library(ggridges)
tiff("Outputs/COVIDWelshLACaseRidges.tiff", units="in", width=10, height=6, res=500)
ggplot(heatmap, aes(x=date, y=fct_reorder(LA, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity")+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Welsh Local Authorities",
caption="Data from Public Health Wales | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Heatmaps/WelshLAHeatmap.R
================================================
rm(list=ls())
library(tidyverse)
library(forcats)
library(cowplot)
library(ggridges)
library(geojsonio)
library(broom)
library(sf)
library(curl)
library(rmapshaper)
library(gganimate)
#Read in data created by COVID_LA_Plots/UnderlyingCode.R, which lives here:
#https://github.com/VictimOfMaths/COVID_LA_Plots/blob/master/UnderlyingCode.R
data <- read.csv("COVID_LA_Plots/LACases.csv")[,-c(1,7,8,9)]
#########
#ENGLAND#
#########
data.e <- data %>%
group_by(name) %>%
filter(country=="England" & name!="England") %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.e$date)
#Plot case trajectories
casetiles <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in English Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health England | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
casebars <- ggplot(subset(data.e, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases")+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDLTLACasesHeatmap.tiff", units="in", width=16, height=30, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
#######
#WALES#
#######
data.w <- data %>%
group_by(name) %>%
filter(country=="Wales" & name!="Wales") %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.w$date)
#Plot case trajectories
casetiles <- ggplot(data.w, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in Welsh Local Authorities",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nLAs are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each LA.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Wales | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
casebars <- ggplot(subset(data.w, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases", breaks=c(0,1000,2000))+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDWelshLACasesHeatmap.tiff", units="in", width=12, height=6, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
tiff("Outputs/COVIDWelshLACaseRidges.tiff", units="in", width=10, height=6, res=500)
ggplot(data.w, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity")+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Welsh Local Authorities",
caption="Data from Public Health Wales | Plot by @VictimOfMaths")
dev.off()
##########
#Scotland#
##########
data.s <- data %>%
group_by(name) %>%
filter(country=="Scotland" & name!="Scotland") %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.s$date)
#Plot case trajectories
casetiles <- ggplot(data.s, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in Scottish Coucils",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Council area.\nCouncils are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each Council area.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Public Health Scotland | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
casebars <- ggplot(subset(data.s, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases", breaks=c(0,1000,2000,3000))+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDScottishCouncilCasesHeatmap.tiff", units="in", width=12, height=6, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
tiff("Outputs/COVIDScottishCouncilCaseRidges.tiff", units="in", width=10, height=6, res=500)
ggplot(data.s, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity")+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Scottish Council areas",
caption="Data from Public Health Scotland | Plot by @VictimOfMaths")
dev.off()
##########
#Northern Ireland#
##########
data.ni <- data %>%
group_by(name) %>%
filter(country=="Northern Ireland" & name!="Northern Ireland") %>%
mutate(date=as.Date(date), maxcaserate=max(caserate_avg),
maxcaseday=date[which(caserate_avg==maxcaserate)][1],
maxcaseprop=caserate_avg/maxcaserate,
totalcases=sum(cases))
#Enter dates to plot from and to
plotfrom <- "2020-03-01"
plotto <- max(data.ni$date)
#Plot case trajectories
casetiles <- ggplot(data.ni, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+
geom_tile(colour="White", show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_y_discrete(name="", expand=c(0,0))+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
labs(title="Timelines for COVID-19 cases in Northern Irish Local Authoritiess",
subtitle=paste0("The heatmap represents the 7-day rolling average of the number of new confirmed cases, normalised to the maximum value within the Local Authority.\nAuthorities are ordered by the date at which they reached their peak number of new cases. Bars on the right represent the absolute number of cases in each Local Authority.\nData updated to ", plotto, ". Data for most recent days is provisional and may be revised upwards as additional tests are processed."),
caption="Data from Department of Health NI | Plot by @VictimOfMaths")+
theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position="plot",
axis.text.y=element_text(colour="Black"))
casebars <- ggplot(subset(data.ni, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+
geom_col(show.legend=FALSE)+
theme_classic()+
scale_fill_distiller(palette="Spectral")+
scale_x_continuous(name="Total confirmed cases", breaks=c(0,1000,2000))+
theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),
axis.ticks.y=element_blank(), axis.text.x=element_text(colour="Black"))
tiff("Outputs/COVIDNILACasesHeatmap.tiff", units="in", width=12, height=6, res=500)
plot_grid(casetiles, casebars, align="h", rel_widths=c(1,0.2))
dev.off()
tiff("Outputs/COVIDNILACaseRidges.tiff", units="in", width=10, height=6, res=500)
ggplot(data.ni, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+
geom_density_ridges_gradient(stat="identity")+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Cases per day\n7-day rolling avg.")+
scale_x_date(name="Date", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+
scale_y_discrete(name="")+
labs(title="Timelines of confirmed COVID-19 cases in Northern Irish Local Authorities",
caption="Data from Department of Health NI | Plot by @VictimOfMaths")
dev.off()
############
#Animations#
############
#Hex map
data.hex <- data
#Sort out Buckinghamshire to match hex template
temp <- subset(data, code=="E06000060")
data.hex$code <- if_else(data$code=="E06000060", "E07000004", as.character(data$code))
data.hex$name <- if_else(data$name=="Buckinghamshire", "Aylesbury Vale", as.character(data$name))
temp1 <- temp
temp1$code <- "E07000005"
temp1$name <- "Chiltern"
temp2 <- temp
temp2$code <- "E07000006"
temp2$name <- "South Bucks"
temp$code <- "E07000007"
temp$name <- "Wycombe"
data.hex <- bind_rows(data.hex, temp, temp1, temp2)
#Bring in hexmap
#Read in hex boundaries (adapted from from https://olihawkins.com/2018/02/1 and ODI Leeds)
hex <- geojson_read("Data/UKLA.geojson", what="sp")
# Fortify into a data frame format to be shown with ggplot2
hexes <- tidy(hex, region="id")
hexes$id <- if_else(hexes$id=="E09000001", "E09000012", hexes$id)
data.hex <- left_join(hexes, data.hex, by=c("id"="code"), all.y=TRUE)
data.hex$date <- as.Date(data.hex$date)
#Remove Isles of Scilly which are too small to have their own data
data.hex <- subset(data.hex, id!="E06000053")
#extract latest date with full UK data
data.hex <- data.hex %>%
group_by(country) %>%
filter(country!="Republic of Ireland") %>%
mutate(min=min(date), max=max(date))
completefrom <- max(data.hex$min, na.rm=TRUE)
completeto <- min(data.hex$max, na.rm=TRUE)
HexAnimUK <- ggplot()+
geom_polygon(data=subset(data.hex, date>as.Date("2020-03-06") & date<=completeto),
aes(x=long, y=lat, group=id, fill=casesroll_avg))+
coord_fixed()+
scale_fill_distiller(palette="Spectral", name="Daily confirmed\ncases (7-day\nrolling avg.)", na.value="white")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of COVID-19 across the UK",
subtitle="Rolling 7-day average number of new confirmed cases.\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI\nVisualisation by @VictimOfMaths")
animate(HexAnimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/HexAnimUK.gif"),
end_pause=60)
#Rates version
HexAnimUKrate <- ggplot()+
geom_polygon(data=subset(data.hex, date>as.Date("2020-03-06") & date<=completeto),
aes(x=long, y=lat, group=id, fill=caserate_avg))+
coord_fixed()+
scale_fill_distiller(palette="Spectral", name="Daily confirmed\ncases/100,000\n(7-day rolling avg.)", na.value="white")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of COVID-19 across the UK",
subtitle="Rolling 7-day average number of new confirmed cases per 100,000.\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI\nVisualisation by @VictimOfMaths")
animate(HexAnimUKrate, duration=18, fps=10, width=2000, height=3000, res=300,
renderer=gifski_renderer("Outputs/HexAnimUKrate.gif"),
end_pause=60)
#Chloropeth map
data.map <- data
#Sort out Buckinghamshire to match hex template
temp <- subset(data.map, code=="E06000060")
data.map$code <- if_else(data.map$code=="E06000060", "E07000004", as.character(data.map$code))
data.map$name <- if_else(data.map$name=="Buckinghamshire", "Aylesbury Vale", as.character(data.map$name))
temp1 <- temp
temp1$code <- "E07000005"
temp1$name <- "Chiltern"
temp2 <- temp
temp2$code <- "E07000006"
temp2$name <- "South Bucks"
temp$code <- "E07000007"
temp$name <- "Wycombe"
data.map <- bind_rows(data.map, temp, temp1, temp2)
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
names(shapefile)[names(shapefile) == "lad19cd"] <- "code"
simplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)
map.cases <- full_join(simplemap, data.map, by="code", all.y=TRUE)
map.cases$date <- as.Date(map.cases$date)
#Map of current cases
tiff("Outputs/COVIDCaseMapUK.tiff", units="in", width=8, height=12, res=500)
map.cases %>%
filter(date==completeto & !name %in% c("England", "Wales", "Northern Ireland", "Scotland")) %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=casesroll_avg), colour=NA)+
scale_fill_distiller(palette="Spectral", name="Daily cases\n(rolling 7-day avg.)")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank())+
labs(title="Confirmed new COVID-19 cases in the UK",
subtitle=paste0("Rolling 7-day average of confirmed new cases at Local Authority/Council Area level\nData up to ", completeto),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDCaserateMapUK.tiff", units="in", width=8, height=12, res=500)
map.cases %>%
filter(date==completeto & !name %in% c("England", "Wales", "Northern Ireland", "Scotland")) %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=caserate_avg), colour=NA)+
scale_fill_distiller(palette="Spectral", name="Daily cases\nper 100,000\n(rolling 7-day avg.)")+
theme_classic()+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank())+
labs(title="Rates of confirmed new COVID-19 cases in the UK",
subtitle=paste0("Rolling 7-day average of confirmed new cases per 100,000 at Local Authority/Council Area level\nData up to ", completeto),
caption="Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths")
dev.off()
#These last 2 animations require a more powerful computer/more patience than I have, so I'm
#not 100% certain they actually work...
CaseAnimAbs <- map.cases %>%
filter(!name %in% c("England", "Wales", "Northern Ireland", "Scotland") & date>as.Date("2020-02-25")) %>%
ggplot(aes(geometry=geometry, fill=casesroll_avg))+
geom_sf(colour=NA)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily cases\n(rolling 7-day avg.)")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average number of new confirmed cases in each Local Authority/Council area\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths")
animate(CaseAnimAbs, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/CaseAnimAbs.gif"), end_pause=60)
CaseAnimRate <- ggplot(subset(map.cases, date>as.Date("2020-02-25")), aes(geometry=geometry, fill=caserate_avg))+
geom_sf(colour=NA)+
theme_classic()+
scale_fill_distiller(palette="Spectral", name="Daily cases\nper 100,000\n(rolling 7-day avg.)")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
transition_time(date)+
labs(title="Visualising the spread of the pandemic across England",
subtitle="Rolling 7-day average rate of new confirmed cases per 100,000 in each Local Authority/Council area\nDate: {frame_time}",
caption="Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths")
animate(CaseAnimRate, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer("Outputs/CaseAnimRate.gif"), end_pause=60)
================================================
FILE: Heatmaps/YorkshireVaxCartogram.R
================================================
rm(list=ls())
library(curl)
library(tidyverse)
library(readxl)
library(paletteer)
library(sf)
library(scales)
library(ragg)
library(gtools)
library(ggridges)
library(patchwork)
library(extrafont)
library(ggrepel)
library(cowplot)
#Download vaccination data by MSOA
#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/
maxdate <- "13th June"
vax <- tempfile()
url <- "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-17-June-2021.xlsx"
vax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode="wb")
vaxdata <- read_excel(vax, sheet="MSOA", range="F16:AH6806", col_names=FALSE) %>%
set_names("msoa11cd", "msoa11nm", "<25_1st", "25-29_1st", "30-34_1st", "35-39_1st", "40-44_1st",
"45-49_1st", "50-54_1st", "55-59_1st", "60-64_1st", "65-69_1st", "70-74_1st",
"75-79_1st", "80+_1st", "blank", "<25_2nd", "25-29_2nd", "30-34_2nd", "35-39_2nd", "40-44_2nd",
"45-49_2nd", "50-54_2nd", "55-59_2nd", "60-64_2nd", "65-69_2nd", "70-74_2nd",
"75-79_2nd", "80+_2nd") %>%
select(-blank) %>%
pivot_longer(c(3:28), names_to=c("age", "dose"), names_sep="_", values_to="vaccinated")
#Download IMD data
temp <- tempfile()
source <- ("https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMD <- read_excel(temp, sheet="IMD2019", range="A2:F32845", col_names=FALSE)[,c(1,2,5,6)]
colnames(IMD) <- c("LSOA11CD", "LSOA11NM", "IMDrank", "IMDdecile")
#Download LSOA to MSOA lookup
temp <- tempfile()
source <- ("https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv")
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
lookup <- read.csv(temp) %>%
select(LSOA11CD, MSOA11CD, RGN11NM) %>%
unique()
#Merge into IMD data
IMD <- merge(IMD, lookup, by="LSOA11CD")
#Bring in population data for LSOAs
temp <- tempfile()
temp2 <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
pop <- read_excel(file.path(temp2, "SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx"),
sheet="Mid-2019 Persons", range="A6:G34758", col_names=FALSE)[,c(1,7)]
colnames(pop) <- c("LSOA11CD", "pop")
#Merge into IMD data
IMD <- merge(IMD, pop)
#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population
IMD_MSOA <- IMD %>%
group_by(MSOA11CD) %>%
summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>%
ungroup()
pop2 <- read_excel(vax, sheet="Population estimates (NIMS)", range="V16:AK6806", col_names=FALSE) %>%
select(-c(2,3)) %>%
rename(msoa11cd=`...1`) %>%
gather(age, pop, c(2:14)) %>%
mutate(age=case_when(
age=="...4" ~ "<25",
age=="...5" ~ "25-29",
age=="...6" ~ "30-34",
age=="...7" ~ "35-39",
age=="...8" ~ "40-44",
age=="...9" ~ "45-49",
age=="...10" ~ "50-54",
age=="...11" ~ "55-59",
age=="...12" ~ "60-64",
age=="...13" ~ "65-69",
age=="...14" ~ "70-74",
age=="...15" ~ "75-79",
TRUE ~ "80+")) %>%
group_by(msoa11cd, age) %>%
summarise(pop=sum(pop)) %>%
ungroup()
#COMBINE
vaxdata <- merge(vaxdata, pop2) %>%
merge(IMD_MSOA %>% select(-pop), by.x="msoa11cd", by.y="MSOA11CD") %>%
mutate(vaxprop=vaccinated/pop)
#Download Carl Baker's lovely cartogram
msoa <- tempfile()
source <- ("https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg")
msoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode="wb")
BackgroundMSOA <- st_read(msoa, layer="5 Background")
MSOA <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(vaxdata, by="msoa11cd") %>%
mutate(RegionNation=case_when(
LA.label=="Hull" ~ "Yorkshire and The Humber",
TRUE ~ as.character(RegionNation)))
GroupsMSOA <- st_read(msoa, layer="2 Groups")
Group_labelsMSOA <- st_read(msoa, layer="1 Group labels") %>%
mutate(just=if_else(LabelPosit=="Left", 0, 1))
LAsMSOA <- st_read(msoa, layer="3 Local authority outlines (2019)")
LAlabels <- data.frame(x=c(34.3, 34, 39, 37, 34.2, 44.6, 44.7, 39.3, 42.7),
y=c(33.5, 40.5, 40.6, 35.7, 36.2, 34.3, 36.8, 36.4, 40.5),
label=c("Sheffield", "Bradford", "Leeds", "Barnsley", "Kirklees",
"NE Lincs", "Hull", "Wakefield", "York"))
Arealabels <- data.frame(x=c(41.5, 33.6, 40.3, 44.6), y=c(43, 40, 33.3, 38.3),
label=c("North Yorks", "West Yorks", "South Yorks", "East Yorks\n& Humber"))
plot <- ggplot()+
geom_sf(data=MSOA %>% filter(age=="Total" & RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom, fill=vaxprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom), fill=NA, colour="White", size=0.2)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom), fill=NA, colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of adults who have received\nat least one vaccine dose", limits=c(0,1),
labels=label_percent(accuracy=1))+
geom_text(data=LAlabels, aes(x=x, y=y, label=label))+
geom_text(data=Arealabels, aes(x=x, y=y, label=label), fontface="bold")+
theme_void()+
coord_sf(clip="off")+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Roboto"), plot.caption.position="plot",
legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in Yorkshire\n ",
caption="Data from NHS England\nMap by Colin Angus, University of Sheffield")+
annotate("text", x=44, y=42.2, label="88% of adults in\n Easingwold & Stillington\nhave been vaccinated",
family="Roboto", colour="Grey50")+
annotate("text", x=36, y=41.6, label="10% of adults\nin Leeds City Centre\nhave been vaccinated",
family="Roboto", colour="Grey50")+
annotate("text", x=44.6, y=39.5, label="Each hexagon represents an area\nof roughly 6,000 people",
family="Roboto", colour="Grey50")+
geom_curve(aes(x=42.38, y=42.55, xend=41, yend=41.5), curvature=0.2, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
geom_curve(aes(x=37.3, y=41.5, xend=38.22, yend=39), curvature=-0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
geom_curve(aes(x=43.7, y=39.1, xend=43.18, yend=38.7), curvature=-0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")
agg_tiff("Outputs/COVIDVaxMSOAYorkshire.tiff", units="in", width=10, height=8.5, res=800)
plot
dev.off()
#Replicate for the over 70s only
#Split into under and over 50
vaxdata3 <- vaxdata %>%
mutate(age2=if_else(age %in% c("<40", "40-44", "45-49", "50-54", "55-59", "60-64", "65-69"),
"<70", "70+")) %>%
group_by(msoa11cd, msoa11nm, IMDrank, age2) %>%
summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>%
ungroup() %>%
mutate(vaxprop=vaccinated/pop)
MSOA2 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(vaxdata3, by="msoa11cd") %>%
mutate(RegionNation=case_when(
LA.label=="Hull" ~ "Yorkshire and The Humber",
TRUE ~ as.character(RegionNation)))
plot2 <- ggplot()+
geom_sf(data=MSOA2 %>% filter(age2=="70+" & RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom, fill=vaxprop), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom), fill=NA, colour="White", size=0.2)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom), fill=NA, colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of adults aged 70+ who have received\nat least one vaccine dose", limits=c(0.4,1),
labels=label_percent(accuracy=1))+
geom_text(data=LAlabels, aes(x=x, y=y, label=label))+
geom_text(data=Arealabels, aes(x=x, y=y, label=label), fontface="bold")+
theme_void()+
coord_sf(clip="off")+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Roboto"), plot.caption.position="plot",
legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in Yorkshire\n ",
caption="Data from NHS England and ONS, Cartogram from House of Commons Library\nPlot by @VictimOfMaths")+
annotate("text", x=44, y=42.2, label="97% of people aged 70+\nin Newby & Scalby\nhave been vaccinated",
family="Roboto", colour="Grey50")+
annotate("text", x=36, y=41.6, label="72% of people aged 70+\nin Leeds Central\nhave been vaccinated",
family="Roboto", colour="Grey50")+
annotate("text", x=44.6, y=39.5, label="Each hexagon represents an area\nof roughly 6,000 people",
family="Roboto", colour="Grey50")+
geom_curve(aes(x=42.8, y=42.2, xend=41.7, yend=42.3), curvature=-0.15, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
geom_curve(aes(x=37.3, y=41.5, xend=38.85, yend=39.45), curvature=-0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
geom_curve(aes(x=43.7, y=39.1, xend=43.18, yend=38.7), curvature=-0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")
agg_tiff("Outputs/COVIDVaxMSOAYorkshirev2.tiff", units="in", width=10, height=8.5, res=800)
plot2
dev.off()
#Allocate to deciles
vaxdeciles <- MSOA2 %>%
filter(RegionNation=="Yorkshire and The Humber" & age2=="70+") %>%
mutate(decile=quantcut(-IMDrank, 10, labels=FALSE)) %>%
group_by(decile) %>%
mutate(decilemean=sum(vaccinated)/sum(pop)) %>%
ungroup()
agg_tiff("Outputs/COVIDVaxMSOAYorkshirev3.tiff", units="in", width=8, height=6, res=800)
ggplot(vaxdeciles, aes(x=vaxprop, y=as.factor(decile), fill=vaxprop))+
geom_density_ridges_gradient(aes(fill=stat(x)), rel_min_height=0.01, show.legend=FALSE)+
scale_y_discrete(name="Index of Multiple Deprivation", labels=c("1 - least deprived", "2", "3", "4", "5", "6", "7",
"8", "9", "10 - most deprived"))+
scale_x_continuous(name="Proportion of population vaccinated",
labels=label_percent(accuracy=1))+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1)+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)),
text=element_text(family="Roboto"), plot.title.position="plot")+
labs(title="Vaccination rates in Yorkshire are lower in more deprived areas",
subtitle="Distribution of vaccination rates for adults aged 70+ in neighbourhoods in Yorkshire",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Calculate uptake rates by age and region
reguptake <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(vaxdata, by="msoa11cd") %>%
group_by(RegionNation, age) %>%
summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>%
ungroup() %>%
mutate(vaxprop=vaccinated/pop) %>%
filter(RegionNation!="Wales")
agg_tiff("Outputs/COVIDVaxUptakexAgexReg.tiff", units="in", width=8, height=6, res=800)
ggplot(reguptake)+
geom_point(aes(x=vaxprop, y=age, colour=RegionNation), alpha=0.8)+
scale_x_continuous(name="Proportion of the population vaccinated",
labels=label_percent(accuracy=1))+
scale_y_discrete(name="Age group")+
scale_colour_paletteer_d("LaCroixColoR::paired", name="")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Roboto"))+
labs(title="Vaccine uptake is consistently lowest in London",
subtitle="Proportion of adults who have received at least one dose of COVID vaccine",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
agg_tiff("Outputs/COVIDVaxUptakexAgexRegYorkshire.tiff", units="in", width=8, height=6, res=800)
ggplot(reguptake)+
geom_point(aes(x=vaxprop, y=age), colour="Grey70", alpha=0.8)+
geom_point(data=reguptake %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(x=vaxprop, y=age), colour="#FF4E86", alpha=0.8)+
scale_x_continuous(name="Proportion of the population vaccinated",
labels=label_percent(accuracy=1))+
scale_y_discrete(name="Age group")+
scale_colour_paletteer_d("LaCroixColoR::paired", name="")+
theme_classic()+
theme(plot.title=element_text(face="bold", size=rel(1.4)),
text=element_text(family="Roboto"), plot.subtitle=element_markdown())+
labs(title="Yorkshire has done a great job vaccinating the oldest age groups,\nbut there is work to do in the younger ones",
subtitle="Proportion of adults who have received at least one dose of COVID vaccine
in Yorkshire compared to other English regions",
caption="Data from NHS England | Plot by @VictimOfMaths")
dev.off()
#Calculate age-standardised vaccination rate
asvax <- vaxdata %>%
select(-c(vaccinated, pop)) %>%
spread(age, vaxprop) %>%
mutate(asrate=(`<50`*45000+`50-54`*7000+`55-59`*6500+`60-64`*6000+`65-69`*5500+`70-74`*5000+
`75-79`*4000+`80+`*5000)/84000)
MSOA3 <- st_read(msoa, layer="4 MSOA hex") %>%
left_join(asvax, by="msoa11cd") %>%
mutate(RegionNation=case_when(
LA.label=="Hull" ~ "Yorkshire and The Humber",
TRUE ~ as.character(RegionNation)))
plot3 <- ggplot()+
geom_sf(data=MSOA3 %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom, fill=asrate), colour=NA)+
geom_sf(data=LAsMSOA %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom), fill=NA, colour="White", size=0.2)+
geom_sf(data=GroupsMSOA %>% filter(RegionNation=="Yorkshire and The Humber"),
aes(geometry=geom), fill=NA, colour="Black")+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Age standardised rates of adults receiving\nat least one vaccine dose", limits=c(0,NA),
labels=label_percent(accuracy=1))+
geom_text(data=LAlabels, aes(x=x, y=y, label=label))+
geom_text(data=Arealabels, aes(x=x, y=y, label=label), fontface="bold")+
theme_void()+
coord_sf(clip="off")+
theme(plot.title=element_text(face="bold", size=rel(2)),
text=element_text(family="Roboto"), plot.caption.position="plot",
legend.position="top")+
guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,
barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+
labs(title="Vaccination rates in Yorkshire\n ",
caption="Data from NHS England and ONS, Cartogram from House of Commons Library\nPlot by @VictimOfMaths")+
annotate("text", x=44.8, y=39.6, label="Vaccination rates are highest\nin Winterton & Winteringham\nand Newby & Scalby",
family="Roboto", colour="Grey50")+
annotate("text", x=36, y=41.6, label="Vaccination rates are lowest\nin Harehills South in the\ncentre of Leeds",
family="Roboto", colour="Grey50")+
annotate("text", x=43.2, y=33.6, label="Each hexagon represents an area\nof roughly 6,000 people",
family="Roboto", colour="Grey50")+
geom_curve(aes(x=44, y=40.2, xend=41.7, yend=42.3), curvature=0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
geom_curve(aes(x=43.6, y=39, xend=42.3, yend=36.1), curvature=0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
geom_curve(aes(x=37.1, y=41.3, xend=38.85, yend=39.45), curvature=-0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")+
geom_curve(aes(x=42.8, y=33.9, xend=43.45, yend=34.5), curvature=-0.25, colour="Grey50",
arrow=arrow(length=unit(0.1, "cm"), type="closed"), lineend="round")
agg_tiff("Outputs/COVIDVaxMSOAYorkshirev3.tiff", units="in", width=10, height=8.5, res=800)
plot3
dev.off()
#Actual Sheffield Map
#Download shapefile of LA boundaries
temp <- tempfile()
temp2 <- tempfile()
source <- "https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
unzip(zipfile=temp, exdir=temp2)
#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file
name <- list.files(temp2, pattern=".shp")
shapefile <- st_read(file.path(temp2, name))
map <- full_join(shapefile, MSOA %>% select(Laname, msoa11cd, IMDrank, vaxprop, pop, age2) %>% as.data.frame(),
by="msoa11cd", all.y=TRUE)
map %>%
filter(Laname=="Sheffield" & age2=="50+") %>%
ggplot()+
geom_sf(aes(geometry=geometry, fill=vaxprop), colour=NA)+
scale_fill_paletteer_c("pals::ocean.haline", direction=-1,
name="Proportion of\npopulation\nvaccinated", limits=c(0,1),
labels=label_percent(accuracy=1))+
theme_void()+
theme(plot.title=element_text(face="bold", size=rel(1.4)), text=element_text(family="Roboto"))+
labs(title="COVID-19 vaccination rates in Sheffield",
subtitle="Proportion of adults over 50 who have received at least one vaccine dose",
caption="Data from NHS England and ONS, Cartogram from @carlbaker/House of Commons Library\nPlot by @VictimOfMaths")
ggplot(MSOA %>% filter(age2=="50+" & Laname=="Sheffield"))+
geom_point(aes(x=vaxprop, y=IMDrank))
================================================
FILE: Heatmaps/la_trust_lk.csv
================================================
"areacode","areaname","procode3","CountAdm"
"E06000001","Hartlepool","RVW",13157
"E06000001","Hartlepool","RTR",1000
"E06000001","Hartlepool","RTD",172
"E06000001","Hartlepool","RX3",153
"E06000001","Hartlepool","RXP",43
"E06000001","Hartlepool","R0B",69
"E06000001","Hartlepool","RTF",15
"E06000001","Hartlepool","RNL",10
"E06000001","Hartlepool","RCB",9
"E06000001","Hartlepool","RCD",6
"E06000001","Hartlepool","RR8",5
"E06000001","Hartlepool","RRV",5
"E06000001","Hartlepool","RBA",4
"E06000001","Hartlepool","RWY",4
"E06000001","Hartlepool","RR7",4
"E06000001","Hartlepool","RWA",3
"E06000001","Hartlepool","R0A",3
"E06000001","Hartlepool","REM",3
"E06000001","Hartlepool","RXL",3
"E06000001","Hartlepool","R1H",3
"E06000001","Hartlepool","RN5",3
"E06000001","Hartlepool","RJ1",3
"E06000001","Hartlepool","RDU",2
"E06000001","Hartlepool","RAE",2
"E06000001","Hartlepool","RGT",2
"E06000001","Hartlepool","RXR",2
"E06000001","Hartlepool","RCX",2
"E06000001","Hartlepool","RBL",2
"E06000001","Hartlepool","RJL",2
"E06000001","Hartlepool","RRK",3
"E06000001","Hartlepool","RTX",2
"E06000001","Hartlepool","RW1",2
"E06000001","Hartlepool","RA2",1
"E06000001","Hartlepool","RHQ",1
"E06000001","Hartlepool","RAJ",1
"E06000001","Hartlepool","RNS",1
"E06000001","Hartlepool","RBS",1
"E06000001","Hartlepool","RFS",1
"E06000001","Hartlepool","RJ2",1
"E06000001","Hartlepool","RJR",1
"E06000001","Hartlepool","RM3",1
"E06000001","Hartlepool","RNQ",1
"E06000001","Hartlepool","RXC",1
"E06000001","Hartlepool","RXF",1
"E06000001","Hartlepool","RXQ",1
"E06000001","Hartlepool","RXW",1
"E06000001","Hartlepool","REF",1
"E06000001","Hartlepool","RW6",1
"E06000001","Hartlepool","RA9",1
"E06000001","Hartlepool","RAX",1
"E06000001","Hartlepool","RMP",1
"E06000001","Hartlepool","RX4",1
"E06000001","Hartlepool","RNZ",1
"E06000001","Hartlepool","RRF",1
"E06000001","Hartlepool","R1F",1
"E06000001","Hartlepool","RBT",1
"E06000001","Hartlepool","RBZ",1
"E06000001","Hartlepool","RHM",1
"E06000001","Hartlepool","RHW",1
"E06000001","Hartlepool","RWD",1
"E06000001","Hartlepool","RFR",1
"E06000001","Hartlepool","RGN",1
"E06000001","Hartlepool","RTE",1
"E06000001","Hartlepool","RXH",1
"E06000002","Middlesbrough","RTR",19409
"E06000002","Middlesbrough","RVW",518
"E06000002","Middlesbrough","RX3",348
"E06000002","Middlesbrough","RTD",167
"E06000002","Middlesbrough","RXP",31
"E06000002","Middlesbrough","RCB",22
"E06000002","Middlesbrough","R0A",9
"E06000002","Middlesbrough","RR8",9
"E06000002","Middlesbrough","RR7",7
"E06000002","Middlesbrough","RTF",7
"E06000002","Middlesbrough","R0B",7
"E06000002","Middlesbrough","RNL",6
"E06000002","Middlesbrough","RWA",6
"E06000002","Middlesbrough","RK5",5
"E06000002","Middlesbrough","RTH",5
"E06000002","Middlesbrough","R1H",4
"E06000002","Middlesbrough","RQM",4
"E06000002","Middlesbrough","RD8",4
"E06000002","Middlesbrough","RJ1",4
"E06000002","Middlesbrough","RWF",4
"E06000002","Middlesbrough","RWD",3
"E06000002","Middlesbrough","RRK",3
"E06000002","Middlesbrough","RJ7",3
"E06000002","Middlesbrough","RXL",3
"E06000002","Middlesbrough","RTX",3
"E06000002","Middlesbrough","RWW",3
"E06000002","Middlesbrough","RHM",3
"E06000002","Middlesbrough","RBN",2
"E06000002","Middlesbrough","RHQ",2
"E06000002","Middlesbrough","RRV",3
"E06000002","Middlesbrough","RXF",2
"E06000002","Middlesbrough","RYR",2
"E06000002","Middlesbrough","RBK",2
"E06000002","Middlesbrough","RCD",2
"E06000002","Middlesbrough","RGT",2
"E06000002","Middlesbrough","RX1",2
"E06000002","Middlesbrough","RWG",2
"E06000002","Middlesbrough","RC9",2
"E06000002","Middlesbrough","RTP",2
"E06000002","Middlesbrough","RW6",2
"E06000002","Middlesbrough","RN5",2
"E06000002","Middlesbrough","RX4",2
"E06000002","Middlesbrough","RD1",1
"E06000002","Middlesbrough","RDD",1
"E06000002","Middlesbrough","RFF",1
"E06000002","Middlesbrough","RKB",1
"E06000002","Middlesbrough","RAX",1
"E06000002","Middlesbrough","RBA",1
"E06000002","Middlesbrough","RC1",1
"E06000002","Middlesbrough","RGN",1
"E06000002","Middlesbrough","RNA",1
"E06000002","Middlesbrough","RAE",1
"E06000002","Middlesbrough","RJL",1
"E06000002","Middlesbrough","RQ8",1
"E06000002","Middlesbrough","RVJ",1
"E06000002","Middlesbrough","RWY",1
"E06000002","Middlesbrough","RAP",1
"E06000002","Middlesbrough","RP5",1
"E06000002","Middlesbrough","REM",1
"E06000002","Middlesbrough","RBL",1
"E06000002","Middlesbrough","RKE",1
"E06000002","Middlesbrough","RM3",1
"E06000002","Middlesbrough","RP6",1
"E06000002","Middlesbrough","RPC",1
"E06000002","Middlesbrough","RQW",1
"E06000002","Middlesbrough","RWJ",1
"E06000002","Middlesbrough","RAJ",1
"E06000002","Middlesbrough","RBS",1
"E06000002","Middlesbrough","RJZ",1
"E06000002","Middlesbrough","RTK",1
"E06000002","Middlesbrough","R1K",1
"E06000002","Middlesbrough","RA9",1
"E06000002","Middlesbrough","RBZ",1
"E06000002","Middlesbrough","RJR",1
"E06000002","Middlesbrough","RM1",1
"E06000002","Middlesbrough","RVV",1
"E06000002","Middlesbrough","RBT",1
"E06000002","Middlesbrough","RCX",1
"E06000002","Middlesbrough","RDE",1
"E06000002","Middlesbrough","RFR",1
"E06000002","Middlesbrough","RJ2",1
"E06000002","Middlesbrough","RTE",1
"E06000002","Middlesbrough","RWE",1
"E06000002","Middlesbrough","RXR",1
"E06000002","Middlesbrough","RYJ",1
"E06000003","Redcar and Cleveland","RTR",18210
"E06000003","Redcar and Cleveland","RVW",235
"E06000003","Redcar and Cleveland","RX3",228
"E06000003","Redcar and Cleveland","RTD",160
"E06000003","Redcar and Cleveland","RCB",31
"E06000003","Redcar and Cleveland","RXP",20
"E06000003","Redcar and Cleveland","RCD",12
"E06000003","Redcar and Cleveland","RR8",12
"E06000003","Redcar and Cleveland","RXF",7
"E06000003","Redcar and Cleveland","RNL",7
"E06000003","Redcar and Cleveland","RTF",7
"E06000003","Redcar and Cleveland","RJ1",6
"E06000003","Redcar and Cleveland","RWA",5
"E06000003","Redcar and Cleveland","RX1",5
"E06000003","Redcar and Cleveland","RTX",5
"E06000003","Redcar and Cleveland","R0B",6
"E06000003","Redcar and Cleveland","RBT",5
"E06000003","Redcar and Cleveland","RLQ",5
"E06000003","Redcar and Cleveland","RD8",4
"E06000003","Redcar and Cleveland","RR7",4
"E06000003","Redcar and Cleveland","RWE",4
"E06000003","Redcar and Cleveland","RXL",4
"E06000003","Redcar and Cleveland","RHM",4
"E06000003","Redcar and Cleveland","REF",3
"E06000003","Redcar and Cleveland","R0A",3
"E06000003","Redcar and Cleveland","RYJ",3
"E06000003","Redcar and Cleveland","RDE",2
"E06000003","Redcar and Cleveland","RHQ",2
"E06000003","Redcar and Cleveland","RTG",2
"E06000003","Redcar and Cleveland","RVJ",2
"E06000003","Redcar and Cleveland","RCX",2
"E06000003","Redcar and Cleveland","RJR",2
"E06000003","Redcar and Cleveland","RM1",2
"E06000003","Redcar and Cleveland","RRK",3
"E06000003","Redcar and Cleveland","RTE",2
"E06000003","Redcar and Cleveland","RD3",2
"E06000003","Redcar and Cleveland","RWD",2
"E06000003","Redcar and Cleveland","RAE",2
"E06000003","Redcar and Cleveland","RBL",2
"E06000003","Redcar and Cleveland","RJE",2
"E06000003","Redcar and Cleveland","R1H",2
"E06000003","Redcar and Cleveland","RCF",2
"E06000003","Redcar and Cleveland","RRV",2
"E06000003","Redcar and Cleveland","RAL",2
"E06000003","Redcar and Cleveland","RFF",2
"E06000003","Redcar and Cleveland","REM",2
"E06000003","Redcar and Cleveland","RWJ",2
"E06000003","Redcar and Cleveland","RA3",2
"E06000003","Redcar and Cleveland","RAS",2
"E06000003","Redcar and Cleveland","RJL",2
"E06000003","Redcar and Cleveland","RW6",2
"E06000003","Redcar and Cleveland","RXR",2
"E06000003","Redcar and Cleveland","RQ8",1
"E06000003","Redcar and Cleveland","R1K",1
"E06000003","Redcar and Cleveland","RAJ",1
"E06000003","Redcar and Cleveland","RBZ",1
"E06000003","Redcar and Cleveland","RJC",1
"E06000003","Redcar and Cleveland","RN5",1
"E06000003","Redcar and Cleveland","RNZ",1
"E06000003","Redcar and Cleveland","RPA",1
"E06000003","Redcar and Cleveland","RXH",1
"E06000003","Redcar and Cleveland","RXQ",1
"E06000003","Redcar and Cleveland","RDZ",1
"E06000003","Redcar and Cleveland","RGT",1
"E06000003","Redcar and Cleveland","RWW",1
"E06000003","Redcar and Cleveland","RXN",1
"E06000003","Redcar and Cleveland","RDU",1
"E06000003","Redcar and Cleveland","RJN",1
"E06000003","Redcar and Cleveland","RK5",1
"E06000003","Redcar and Cleveland","RWF",1
"E06000003","Redcar and Cleveland","RWP",1
"E06000003","Redcar and Cleveland","RYR",1
"E06000003","Redcar and Cleveland","RBN",1
"E06000003","Redcar and Cleveland","RBS",1
"E06000003","Redcar and Cleveland","RGM",1
"E06000003","Redcar and Cleveland","RJ2",1
"E06000003","Redcar and Cleveland","RM3",1
"E06000003","Redcar and Cleveland","RP5",1
"E06000003","Redcar and Cleveland","RT3",1
"E06000003","Redcar and Cleveland","RNQ",1
"E06000003","Redcar and Cleveland","RWG",1
"E06000003","Redcar and Cleveland","RX4",1
"E06000003","Redcar and Cleveland","RBA",1
"E06000003","Redcar and Cleveland","RBD",1
"E06000003","Redcar and Cleveland","RD1",1
"E06000003","Redcar and Cleveland","RN3",1
"E06000003","Redcar and Cleveland","RQX",1
"E06000003","Redcar and Cleveland","RV9",1
"E06000003","Redcar and Cleveland","RA2",1
"E06000003","Redcar and Cleveland","RJZ",1
"E06000003","Redcar and Cleveland","RN7",1
"E06000004","Stockton-on-Tees","RVW",25776
"E06000004","Stockton-on-Tees","RTR",2780
"E06000004","Stockton-on-Tees","RX3",304
"E06000004","Stockton-on-Tees","RTD",301
"E06000004","Stockton-on-Tees","RXP",126
"E06000004","Stockton-on-Tees","RCB",28
"E06000004","Stockton-on-Tees","R0B",35
"E06000004","Stockton-on-Tees","RTF",13
"E06000004","Stockton-on-Tees","R0A",12
"E06000004","Stockton-on-Tees","RR8",9
"E06000004","Stockton-on-Tees","R1H",8
"E06000004","Stockton-on-Tees","REM",9
"E06000004","Stockton-on-Tees","RXL",7
"E06000004","Stockton-on-Tees","RHQ",6
"E06000004","Stockton-on-Tees","RAL",6
"E06000004","Stockton-on-Tees","RCD",6
"E06000004","Stockton-on-Tees","RFS",6
"E06000004","Stockton-on-Tees","RNL",6
"E06000004","Stockton-on-Tees","RKB",5
"E06000004","Stockton-on-Tees","RTH",5
"E06000004","Stockton-on-Tees","RTX",5
"E06000004","Stockton-on-Tees","RJR",4
"E06000004","Stockton-on-Tees","RCX",4
"E06000004","Stockton-on-Tees","RFF",4
"E06000004","Stockton-on-Tees","RQM",4
"E06000004","Stockton-on-Tees","RR7",4
"E06000004","Stockton-on-Tees","RWA",4
"E06000004","Stockton-on-Tees","RVJ",4
"E06000004","Stockton-on-Tees","RTG",4
"E06000004","Stockton-on-Tees","RWW",4
"E06000004","Stockton-on-Tees","RVV",4
"E06000004","Stockton-on-Tees","RDU",3
"E06000004","Stockton-on-Tees","RJ1",3
"E06000004","Stockton-on-Tees","RNA",3
"E06000004","Stockton-on-Tees","RGT",3
"E06000004","Stockton-on-Tees","RJZ",3
"E06000004","Stockton-on-Tees","RWD",3
"E06000004","Stockton-on-Tees","RRK",4
"E06000004","Stockton-on-Tees","RWY",3
"E06000004","Stockton-on-Tees","RXN",3
"E06000004","Stockton-on-Tees","RA9",3
"E06000004","Stockton-on-Tees","RVY",3
"E06000004","Stockton-on-Tees","RN5",3
"E06000004","Stockton-on-Tees","RP5",3
"E06000004","Stockton-on-Tees","RX4",3
"E06000004","Stockton-on-Tees","RXF",3
"E06000004","Stockton-on-Tees","RCF",2
"E06000004","Stockton-on-Tees","RDZ",2
"E06000004","Stockton-on-Tees","RBA",2
"E06000004","Stockton-on-Tees","RDD",2
"E06000004","Stockton-on-Tees","RHW",2
"E06000004","Stockton-on-Tees","RK5",2
"E06000004","Stockton-on-Tees","RX1",2
"E06000004","Stockton-on-Tees","RBT",2
"E06000004","Stockton-on-Tees","RF4",2
"E06000004","Stockton-on-Tees","RBD",2
"E06000004","Stockton-on-Tees","REF",2
"E06000004","Stockton-on-Tees","RW6",2
"E06000004","Stockton-on-Tees","RWH",2
"E06000004","Stockton-on-Tees","R1F",2
"E06000004","Stockton-on-Tees","RAJ",2
"E06000004","Stockton-on-Tees","RJL",2
"E06000004","Stockton-on-Tees","RTE",2
"E06000004","Stockton-on-Tees","RJ2",2
"E06000004","Stockton-on-Tees","RXW",3
"E06000004","Stockton-on-Tees","RBQ",1
"E06000004","Stockton-on-Tees","RL4",1
"E06000004","Stockton-on-Tees","RP6",1
"E06000004","Stockton-on-Tees","RRV",1
"E06000004","Stockton-on-Tees","RXK",1
"E06000004","Stockton-on-Tees","RAX",1
"E06000004","Stockton-on-Tees","RHM",1
"E06000004","Stockton-on-Tees","RVR",1
"E06000004","Stockton-on-Tees","RXM",1
"E06000004","Stockton-on-Tees","RXY",1
"E06000004","Stockton-on-Tees","RA2",1
"E06000004","Stockton-on-Tees","RBS",1
"E06000004","Stockton-on-Tees","RC1",1
"E06000004","Stockton-on-Tees","RD3",1
"E06000004","Stockton-on-Tees","RJE",1
"E06000004","Stockton-on-Tees","RKE",1
"E06000004","Stockton-on-Tees","RQ3",1
"E06000004","Stockton-on-Tees","RQ8",1
"E06000004","Stockton-on-Tees","RTK",1
"E06000004","Stockton-on-Tees","RAE",1
"E06000004","Stockton-on-Tees","RM3",1
"E06000004","Stockton-on-Tees","RMP",1
"E06000004","Stockton-on-Tees","RNQ",1
"E06000004","Stockton-on-Tees","RYJ",1
"E06000004","Stockton-on-Tees","RCU",1
"E06000004","Stockton-on-Tees","RN7",1
"E06000004","Stockton-on-Tees","RXR",1
"E06000004","Stockton-on-Tees","R1K",1
"E06000004","Stockton-on-Tees","RAP",1
"E06000004","Stockton-on-Tees","RJ7",1
"E06000004","Stockton-on-Tees","RNS",1
"E06000004","Stockton-on-Tees","RXC",1
"E06000004","Stockton-on-Tees","RA4",1
"E06000004","Stockton-on-Tees","RLT",1
"E06000004","Stockton-on-Tees","RMC",1
"E06000004","Stockton-on-Tees","RWJ",1
"E06000004","Stockton-on-Tees","RXQ",1
"E06000004","Stockton-on-Tees","RBN",1
"E06000005","Darlington","RXP",12341
"E06000005","Darlington","RTR",613
"E06000005","Darlington","RX3",229
"E06000005","Darlington","RTD",193
"E06000005","Darlington","RVW",180
"E06000005","Darlington","RCB",18
"E06000005","Darlington","RTF",14
"E06000005","Darlington","RR8",10
"E06000005","Darlington","RNL",10
"E06000005","Darlington","R0B",17
"E06000005","Darlington","RTX",7
"E06000005","Darlington","RWD",6
"E06000005","Darlington","RFF",5
"E06000005","Darlington","R0A",4
"E06000005","Darlington","REF",4
"E06000005","Darlington","RDU",3
"E06000005","Darlington","RMY",3
"E06000005","Darlington","RP5",4
"E06000005","Darlington","RVR",3
"E06000005","Darlington","RCD",3
"E06000005","Darlington","RA7",3
"E06000005","Darlington","RXN",3
"E06000005","Darlington","RCF",2
"E06000005","Darlington","RGN",2
"E06000005","Darlington","RJC",2
"E06000005","Darlington","RKB",2
"E06000005","Darlington","RNZ",2
"E06000005","Darlington","RWA",2
"E06000005","Darlington","RD8",2
"E06000005","Darlington","RGM",2
"E06000005","Darlington","RL4",2
"E06000005","Darlington","RR7",2
"E06000005","Darlington","R1K",2
"E06000005","Darlington","RAE",2
"E06000005","Darlington","RCX",2
"E06000005","Darlington","RH8",2
"E06000005","Darlington","RHW",2
"E06000005","Darlington","RQM",2
"E06000005","Darlington","RX4",2
"E06000005","Darlington","RA9",2
"E06000005","Darlington","RNS",2
"E06000005","Darlington","RWJ",2
"E06000005","Darlington","REM",3
"E06000005","Darlington","RXK",2
"E06000005","Darlington","RBZ",1
"E06000005","Darlington","RFR",1
"E06000005","Darlington","RJZ",1
"E06000005","Darlington","RVJ",1
"E06000005","Darlington","RXQ",1
"E06000005","Darlington","RD1",1
"E06000005","Darlington","RFS",1
"E06000005","Darlington","RM3",1
"E06000005","Darlington","RRF",1
"E06000005","Darlington","RRK",2
"E06000005","Darlington","RWP",1
"E06000005","Darlington","RXF",1
"E06000005","Darlington","RAL",1
"E06000005","Darlington","RV9",1
"E06000005","Darlington","RVY",1
"E06000005","Darlington","R1F",1
"E06000005","Darlington","RAJ",1
"E06000005","Darlington","RJ1",1
"E06000005","Darlington","RTE",1
"E06000005","Darlington","RWW",1
"E06000005","Darlington","RBN",1
"E06000005","Darlington","RJL",1
"E06000005","Darlington","RBT",1
"E06000005","Darlington","RLQ",1
"E06000005","Darlington","RT5",1
"E06000005","Darlington","RA4",1
"E06000005","Darlington","RD3",1
"E06000005","Darlington","RGT",1
"E06000005","Darlington","RHM",1
"E06000005","Darlington","RHU",1
"E06000005","Darlington","RJR",1
"E06000005","Darlington","RQ8",1
"E06000005","Darlington","RXA",1
"E06000005","Darlington","RXW",1
"E06000005","Darlington","RQW",1
"E06000006","Halton","RBN",9944
"E06000006","Halton","RWW",7071
"E06000006","Halton","RBS",403
"E06000006","Halton","REM",540
"E06000006","Halton","RTV",229
"E06000006","Halton","RBQ",187
"E06000006","Halton","RJR",131
"E06000006","Halton","REN",77
"E06000006","Halton","RET",71
"E06000006","Halton","R0A",51
"E06000006","Halton","RM3",30
"E06000006","Halton","RBL",28
"E06000006","Halton","RBT",18
"E06000006","Halton","RBV",15
"E06000006","Halton","REP",15
"E06000006","Halton","RRF",13
"E06000006","Halton","RJE",9
"E06000006","Halton","RWJ",8
"E06000006","Halton","RVY",8
"E06000006","Halton","RW6",7
"E06000006","Halton","RXL",7
"E06000006","Halton","RJN",6
"E06000006","Halton","RR8",5
"E06000006","Halton","RRK",4
"E06000006","Halton","RW4",4
"E06000006","Halton","RAL",3
"E06000006","Halton","RKB",3
"E06000006","Halton","RTX",3
"E06000006","Halton","RMC",3
"E06000006","Halton","R1K",3
"E06000006","Halton","RXR",3
"E06000006","Halton","RDZ",2
"E06000006","Halton","RXA",2
"E06000006","Halton","RFS",2
"E06000006","Halton","RN5",2
"E06000006","Halton","RNL",2
"E06000006","Halton","RXH",2
"E06000006","Halton","RD3",2
"E06000006","Halton","RHM",2
"E06000006","Halton","RXN",2
"E06000006","Halton","RHQ",2
"E06000006","Halton","RBD",2
"E06000006","Halton","RDD",2
"E06000006","Halton","RXW",3
"E06000006","Halton","RC1",1
"E06000006","Halton","RD8",1
"E06000006","Halton","RDE",1
"E06000006","Halton","RDU",1
"E06000006","Halton","RJL",1
"E06000006","Halton","RLQ",1
"E06000006","Halton","RQ3",1
"E06000006","Halton","RNZ",1
"E06000006","Halton","RTG",1
"E06000006","Halton","RWF",1
"E06000006","Halton","RXQ",1
"E06000006","Halton","R1H",1
"E06000006","Halton","RA2",1
"E06000006","Halton","RNA",1
"E06000006","Halton","RWA",1
"E06000006","Halton","RXP",1
"E06000006","Halton","RA9",1
"E06000006","Halton","RTF",1
"E06000006","Halton","RX1",1
"E06000006","Halton","RAS",1
"E06000006","Halton","RFR",1
"E06000006","Halton","RTE",1
"E06000006","Halton","RHW",1
"E06000006","Halton","RTH",1
"E06000006","Halton","RTR",1
"E06000006","Halton","RWY",1
"E06000006","Halton","RCB",1
"E06000006","Halton","RCD",1
"E06000006","Halton","REF",1
"E06000006","Halton","RP5",1
"E06000006","Halton","RTD",1
"E06000007","Warrington","RWW",22145
"E06000007","Warrington","RBN",1151
"E06000007","Warrington","RBS",419
"E06000007","Warrington","RTV",349
"E06000007","Warrington","R0A",336
"E06000007","Warrington","REM",506
"E06000007","Warrington","RBQ",211
"E06000007","Warrington","RM3",196
"E06000007","Warrington","RET",141
"E06000007","Warrington","RJR",118
"E06000007","Warrington","RRF",111
"E06000007","Warrington","REN",104
"E06000007","Warrington","RBV",52
"E06000007","Warrington","RBT",36
"E06000007","Warrington","RBL",35
"E06000007","Warrington","REP",20
"E06000007","Warrington","RTX",20
"E06000007","Warrington","RWJ",18
"E06000007","Warrington","RXN",17
"E06000007","Warrington","RJE",14
"E06000007","Warrington","RW6",13
"E06000007","Warrington","RMC",11
"E06000007","Warrington","RXL",11
"E06000007","Warrington","RNL",10
"E06000007","Warrington","RJN",8
"E06000007","Warrington","RCB",7
"E06000007","Warrington","RR8",7
"E06000007","Warrington","R1H",7
"E06000007","Warrington","RVY",10
"E06000007","Warrington","RQM",7
"E06000007","Warrington","RMP",7
"E06000007","Warrington","RAP",6
"E06000007","Warrington","REF",6
"E06000007","Warrington","RGT",6
"E06000007","Warrington","RTD",6
"E06000007","Warrington","RXR",5
"E06000007","Warrington","RRK",8
"E06000007","Warrington","RRV",5
"E06000007","Warrington","R1K",5
"E06000007","Warrington","RDU",4
"E06000007","Warrington","RK9",4
"E06000007","Warrington","RWD",4
"E06000007","Warrington","RXW",5
"E06000007","Warrington","RJ1",4
"E06000007","Warrington","RNS",3
"E06000007","Warrington","RTR",3
"E06000007","Warrington","RAS",3
"E06000007","Warrington","RA4",3
"E06000007","Warrington","RHQ",3
"E06000007","Warrington","RGN",3
"E06000007","Warrington","RA9",3
"E06000007","Warrington","RFS",3
"E06000007","Warrington","RVV",3
"E06000007","Warrington","RHW",2
"E06000007","Warrington","RDE",2
"E06000007","Warrington","RH8",2
"E06000007","Warrington","RTH",2
"E06000007","Warrington","RWF",2
"E06000007","Warrington","RJ6",2
"E06000007","Warrington","RW4",2
"E06000007","Warrington","RWA",2
"E06000007","Warrington","RXA",2
"E06000007","Warrington","RM1",2
"E06000007","Warrington","RYJ",2
"E06000007","Warrington","RD8",2
"E06000007","Warrington","RL4",2
"E06000007","Warrington","RJC",2
"E06000007","Warrington","RVJ",2
"E06000007","Warrington","RJZ",2
"E06000007","Warrington","R1F",2
"E06000007","Warrington","RTF",2
"E06000007","Warrington","RTG",3
"E06000007","Warrington","RWY",2
"E06000007","Warrington","RD1",1
"E06000007","Warrington","RP5",1
"E06000007","Warrington","RPA",1
"E06000007","Warrington","RQW",1
"E06000007","Warrington","RHU",1
"E06000007","Warrington","RKB",1
"E06000007","Warrington","RLY",1
"E06000007","Warrington","RN7",1
"E06000007","Warrington","RX3",1
"E06000007","Warrington","RXE",1
"E06000007","Warrington","RYR",1
"E06000007","Warrington","RBD",1
"E06000007","Warrington","RJ7",1
"E06000007","Warrington","RWH",1
"E06000007","Warrington","RC1",1
"E06000007","Warrington","RFF",1
"E06000007","Warrington","RK5",1
"E06000007","Warrington","RWG",1
"E06000007","Warrington","RXK",2
"E06000007","Warrington","RA3",1
"E06000007","Warrington","RBK",1
"E06000007","Warrington","RCD",1
"E06000007","Warrington","RLQ",1
"E06000007","Warrington","RX1",1
"E06000007","Warrington","RNQ",1
"E06000007","Warrington","RXG",1
"E06000007","Warrington","RBZ",1
"E06000007","Warrington","RDD",1
"E06000007","Warrington","RGP",1
"E06000007","Warrington","RKE",1
"E06000007","Warrington","RTE",1
"E06000007","Warrington","RVR",1
"E06000007","Warrington","RXQ",1
"E06000007","Warrington","RC9",1
"E06000007","Warrington","RCF",1
"E06000007","Warrington","RF4",1
"E06000007","Warrington","RMY",1
"E06000007","Warrington","RQX",1
"E06000007","Warrington","RW5",1
"E06000008","Blackburn with Darwen","RXR",18496
"E06000008","Blackburn with Darwen","RXN",410
"E06000008","Blackburn with Darwen","R0A",260
"E06000008","Blackburn with Darwen","RW5",226
"E06000008","Blackburn with Darwen","RMC",204
"E06000008","Blackburn with Darwen","RXL",160
"E06000008","Blackburn with Darwen","RBV",39
"E06000008","Blackburn with Darwen","RW6",32
"E06000008","Blackburn with Darwen","RM3",29
"E06000008","Blackburn with Darwen","RTX",20
"E06000008","Blackburn with Darwen","RBS",19
"E06000008","Blackburn with Darwen","RVY",11
"E06000008","Blackburn with Darwen","RJE",9
"E06000008","Blackburn with Darwen","RRF",8
"E06000008","Blackburn with Darwen","RR8",7
"E06000008","Blackburn with Darwen","RTH",7
"E06000008","Blackburn with Darwen","R1H",7
"E06000008","Blackburn with Darwen","RWY",6
"E06000008","Blackburn with Darwen","RCB",6
"E06000008","Blackburn with Darwen","RDU",5
"E06000008","Blackburn with Darwen","RWJ",5
"E06000008","Blackburn with Darwen","RBN",5
"E06000008","Blackburn with Darwen","RWE",5
"E06000008","Blackburn with Darwen","RHW",5
"E06000008","Blackburn with Darwen","RBT",4
"E06000008","Blackburn with Darwen","RK9",4
"E06000008","Blackburn with Darwen","RQM",4
"E06000008","Blackburn with Darwen","RCF",4
"E06000008","Blackburn with Darwen","REM",8
"E06000008","Blackburn with Darwen","RA9",4
"E06000008","Blackburn with Darwen","RWW",4
"E06000008","Blackburn with Darwen","RXF",4
"E06000008","Blackburn with Darwen","RHQ",4
"E06000008","Blackburn with Darwen","RNL",3
"E06000008","Blackburn with Darwen","RXQ",3
"E06000008","Blackburn with Darwen","REF",3
"E06000008","Blackburn with Darwen","RFS",3
"E06000008","Blackburn with Darwen","RF4",3
"E06000008","Blackburn with Darwen","RRK",5
"E06000008","Blackburn with Darwen","RET",3
"E06000008","Blackburn with Darwen","RJL",2
"E06000008","Blackburn with Darwen","RJR",2
"E06000008","Blackburn with Darwen","RYJ",2
"E06000008","Blackburn with Darwen","RVW",2
"E06000008","Blackburn with Darwen","RWK",2
"E06000008","Blackburn with Darwen","RN5",2
"E06000008","Blackburn with Darwen","RRV",2
"E06000008","Blackburn with Darwen","RXW",2
"E06000008","Blackburn with Darwen","RNQ",2
"E06000008","Blackburn with Darwen","RPA",2
"E06000008","Blackburn with Darwen","RAE",2
"E06000008","Blackburn with Darwen","RMP",2
"E06000008","Blackburn with Darwen","RQX",2
"E06000008","Blackburn with Darwen","RAS",2
"E06000008","Blackburn with Darwen","RWA",2
"E06000008","Blackburn with Darwen","RWD",2
"E06000008","Blackburn with Darwen","RJ1",1
"E06000008","Blackburn with Darwen","RAX",1
"E06000008","Blackburn with Darwen","RC9",1
"E06000008","Blackburn with Darwen","RCX",1
"E06000008","Blackburn with Darwen","RD8",1
"E06000008","Blackburn with Darwen","RNS",1
"E06000008","Blackburn with Darwen","RTF",1
"E06000008","Blackburn with Darwen","TAD",1
"E06000008","Blackburn with Darwen","RA7",1
"E06000008","Blackburn with Darwen","RAT",1
"E06000008","Blackburn with Darwen","RBZ",1
"E06000008","Blackburn with Darwen","RDD",1
"E06000008","Blackburn with Darwen","RQ3",1
"E06000008","Blackburn with Darwen","RTR",2
"E06000008","Blackburn with Darwen","RVJ",1
"E06000008","Blackburn with Darwen","RXP",1
"E06000008","Blackburn with Darwen","RJ6",1
"E06000008","Blackburn with Darwen","RQW",1
"E06000008","Blackburn with Darwen","RTV",1
"E06000008","Blackburn with Darwen","RBL",1
"E06000008","Blackburn with Darwen","RJC",1
"E06000008","Blackburn with Darwen","RVV",1
"E06000008","Blackburn with Darwen","RX3",1
"E06000008","Blackburn with Darwen","RXE",1
"E06000008","Blackburn with Darwen","RAP",1
"E06000008","Blackburn with Darwen","RBA",1
"E06000008","Blackburn with Darwen","RGR",1
"E06000008","Blackburn with Darwen","RGT",1
"E06000008","Blackburn with Darwen","RHM",1
"E06000008","Blackburn with Darwen","RLQ",1
"E06000008","Blackburn with Darwen","RTE",1
"E06000008","Blackburn with Darwen","RVR",1
"E06000008","Blackburn with Darwen","RWF",1
"E06000008","Blackburn with Darwen","RBK",1
"E06000008","Blackburn with Darwen","RL4",1
"E06000008","Blackburn with Darwen","RR7",1
"E06000008","Blackburn with Darwen","RWP",1
"E06000008","Blackburn with Darwen","RXA",1
"E06000008","Blackburn with Darwen","RD1",1
"E06000008","Blackburn with Darwen","RJ7",1
"E06000008","Blackburn with Darwen","RJN",1
"E06000008","Blackburn with Darwen","RM1",1
"E06000008","Blackburn with Darwen","RTG",2
"E06000008","Blackburn with Darwen","RWH",1
"E06000008","Blackburn with Darwen","RX1",1
"E06000008","Blackburn with Darwen","RXK",1
"E06000009","Blackpool","RXL",18888
"E06000009","Blackpool","RXN",588
"E06000009","Blackpool","RW5",290
"E06000009","Blackpool","R0A",130
"E06000009","Blackpool","RXR",48
"E06000009","Blackpool","RBS",44
"E06000009","Blackpool","RTX",32
"E06000009","Blackpool","RW6",22
"E06000009","Blackpool","RM3",17
"E06000009","Blackpool","RAE",11
"E06000009","Blackpool","REM",14
"E06000009","Blackpool","RMC",10
"E06000009","Blackpool","RVY",13
"E06000009","Blackpool","RR8",9
"E06000009","Blackpool","RNL",7
"E06000009","Blackpool","RRF",7
"E06000009","Blackpool","RHQ",7
"E06000009","Blackpool","RJE",7
"E06000009","Blackpool","RBV",6
"E06000009","Blackpool","RBN",6
"E06000009","Blackpool","RQM",6
"E06000009","Blackpool","RWW",6
"E06000009","Blackpool","RCB",6
"E06000009","Blackpool","RRV",7
"E06000009","Blackpool","RWJ",6
"E06000009","Blackpool","RJZ",5
"E06000009","Blackpool","RBL",5
"E06000009","Blackpool","RKB",5
"E06000009","Blackpool","RVV",4
"E06000009","Blackpool","RXQ",4
"E06000009","Blackpool","RBT",4
"E06000009","Blackpool","RWP",4
"E06000009","Blackpool","RDU",4
"E06000009","Blackpool","RXC",4
"E06000009","Blackpool","RNS",4
"E06000009","Blackpool","RTF",3
"E06000009","Blackpool","RVJ",3
"E06000009","Blackpool","RWY",3
"E06000009","Blackpool","RX1",3
"E06000009","Blackpool","RJ2",3
"E06000009","Blackpool","RJN",3
"E06000009","Blackpool","RXP",3
"E06000009","Blackpool","RYJ",3
"E06000009","Blackpool","REF",3
"E06000009","Blackpool","RJC",3
"E06000009","Blackpool","RBZ",3
"E06000009","Blackpool","RNZ",3
"E06000009","Blackpool","RTP",3
"E06000009","Blackpool","RTV",3
"E06000009","Blackpool","RXF",3
"E06000009","Blackpool","RRK",4
"E06000009","Blackpool","RJ7",2
"E06000009","Blackpool","RK5",2
"E06000009","Blackpool","RMP",2
"E06000009","Blackpool","RXH",2
"E06000009","Blackpool","RXT",2
"E06000009","Blackpool","RTD",2
"E06000009","Blackpool","RA9",2
"E06000009","Blackpool","RBQ",2
"E06000009","Blackpool","RXK",4
"E06000009","Blackpool","RWD",2
"E06000009","Blackpool","RJL",2
"E06000009","Blackpool","RAL",2
"E06000009","Blackpool","RN3",2
"E06000009","Blackpool","RTH",2
"E06000009","Blackpool","RVR",2
"E06000009","Blackpool","RAT",1
"E06000009","Blackpool","RQX",1
"E06000009","Blackpool","RQW",1
"E06000009","Blackpool","RTE",1
"E06000009","Blackpool","RV3",1
"E06000009","Blackpool","RAS",1
"E06000009","Blackpool","RGP",1
"E06000009","Blackpool","RK9",1
"E06000009","Blackpool","RX4",1
"E06000009","Blackpool","RXW",1
"E06000009","Blackpool","RD3",1
"E06000009","Blackpool","RDY",1
"E06000009","Blackpool","RDZ",1
"E06000009","Blackpool","RFF",1
"E06000009","Blackpool","RFS",1
"E06000009","Blackpool","RJR",1
"E06000009","Blackpool","RL4",1
"E06000009","Blackpool","RTR",2
"E06000009","Blackpool","RWF",1
"E06000009","Blackpool","RA7",1
"E06000009","Blackpool","REP",1
"E06000009","Blackpool","RLQ",1
"E06000009","Blackpool","RNA",1
"E06000009","Blackpool","RCF",1
"E06000009","Blackpool","RTG",2
"E06000009","Blackpool","R1H",1
"E06000009","Blackpool","R1K",1
"E06000009","Blackpool","RCX",1
"E06000009","Blackpool","RMY",1
"E06000009","Blackpool","RWA",1
"E06000009","Blackpool","RWH",1
"E06000009","Blackpool","R0B",1
"E06000009","Blackpool","RF4",1
"E06000009","Blackpool","RHM",1
"E06000009","Blackpool","RHU",1
"E06000009","Blackpool","RJ1",1
"E06000009","Blackpool","RPC",1
"E06000009","Blackpool","RVW",1
"E06000009","Blackpool","RXA",1
"E06000010","Kingston upon Hull, City of","RWA",27857
"E06000010","Kingston upon Hull, City of","RV9",628
"E06000010","Kingston upon Hull, City of","RR8",96
"E06000010","Kingston upon Hull, City of","RCB",68
"E06000010","Kingston upon Hull, City of","RJL",38
"E06000010","Kingston upon Hull, City of","RXF",25
"E06000010","Kingston upon Hull, City of","R0A",17
"E06000010","Kingston upon Hull, City of","RTD",16
"E06000010","Kingston upon Hull, City of","RHQ",15
"E06000010","Kingston upon Hull, City of","RWD",14
"E06000010","Kingston upon Hull, City of","RP5",11
"E06000010","Kingston upon Hull, City of","RAE",9
"E06000010","Kingston upon Hull, City of","RRV",8
"E06000010","Kingston upon Hull, City of","RHM",7
"E06000010","Kingston upon Hull, City of","RXP",6
"E06000010","Kingston upon Hull, City of","RTR",7
"E06000010","Kingston upon Hull, City of","RTG",6
"E06000010","Kingston upon Hull, City of","RM3",6
"E06000010","Kingston upon Hull, City of","RXL",6
"E06000010","Kingston upon Hull, City of","RX3",5
"E06000010","Kingston upon Hull, City of","RCU",5
"E06000010","Kingston upon Hull, City of","RGT",5
"E06000010","Kingston upon Hull, City of","RTF",5
"E06000010","Kingston upon Hull, City of","RNL",5
"E06000010","Kingston upon Hull, City of","REM",7
"E06000010","Kingston upon Hull, City of","RWW",5
"E06000010","Kingston upon Hull, City of","R1K",5
"E06000010","Kingston upon Hull, City of","RXE",5
"E06000010","Kingston upon Hull, City of","RFF",5
"E06000010","Kingston upon Hull, City of","RA9",5
"E06000010","Kingston upon Hull, City of","RM1",4
"E06000010","Kingston upon Hull, City of","RRK",7
"E06000010","Kingston upon Hull, City of","RXK",4
"E06000010","Kingston upon Hull, City of","RJ1",4
"E06000010","Kingston upon Hull, City of","RWE",4
"E06000010","Kingston upon Hull, City of","RJE",4
"E06000010","Kingston upon Hull, City of","RVV",4
"E06000010","Kingston upon Hull, City of","RX1",4
"E06000010","Kingston upon Hull, City of","RBT",3
"E06000010","Kingston upon Hull, City of","REF",3
"E06000010","Kingston upon Hull, City of","RWP",3
"E06000010","Kingston upon Hull, City of","RMC",3
"E06000010","Kingston upon Hull, City of","RW6",3
"E06000010","Kingston upon Hull, City of","RQM",3
"E06000010","Kingston upon Hull, City of","RWY",3
"E06000010","Kingston upon Hull, City of","RD8",3
"E06000010","Kingston upon Hull, City of","RCX",3
"E06000010","Kingston upon Hull, City of","RQX",3
"E06000010","Kingston upon Hull, City of","RYJ",3
"E06000010","Kingston upon Hull, City of","RGD",3
"E06000010","Kingston upon Hull, City of","RJ2",2
"E06000010","Kingston upon Hull, City of","RJZ",2
"E06000010","Kingston upon Hull, City of","RMP",2
"E06000010","Kingston upon Hull, City of","RDZ",2
"E06000010","Kingston upon Hull, City of","RTH",2
"E06000010","Kingston upon Hull, City of","RVW",2
"E06000010","Kingston upon Hull, City of","RAS",2
"E06000010","Kingston upon Hull, City of","RAX",2
"E06000010","Kingston upon Hull, City of","RBK",2
"E06000010","Kingston upon Hull, City of","RXN",2
"E06000010","Kingston upon Hull, City of","RBN",2
"E06000010","Kingston upon Hull, City of","RFS",2
"E06000010","Kingston upon Hull, City of","RK5",2
"E06000010","Kingston upon Hull, City of","RVY",2
"E06000010","Kingston upon Hull, City of","RXR",2
"E06000010","Kingston upon Hull, City of","RWG",2
"E06000010","Kingston upon Hull, City of","RH8",2
"E06000010","Kingston upon Hull, City of","RJC",2
"E06000010","Kingston upon Hull, City of","RJR",2
"E06000010","Kingston upon Hull, City of","RNZ",2
"E06000010","Kingston upon Hull, City of","RCD",2
"E06000010","Kingston upon Hull, City of","RL4",2
"E06000010","Kingston upon Hull, City of","RPY",2
"E06000010","Kingston upon Hull, City of","RJ7",2
"E06000010","Kingston upon Hull, City of","RN7",2
"E06000010","Kingston upon Hull, City of","RDE",1
"E06000010","Kingston upon Hull, City of","RHW",1
"E06000010","Kingston upon Hull, City of","RJN",1
"E06000010","Kingston upon Hull, City of","RA3",1
"E06000010","Kingston upon Hull, City of","RCF",1
"E06000010","Kingston upon Hull, City of","RD1",1
"E06000010","Kingston upon Hull, City of","RGP",1
"E06000010","Kingston upon Hull, City of","RK9",1
"E06000010","Kingston upon Hull, City of","RNS",1
"E06000010","Kingston upon Hull, City of","RT3",1
"E06000010","Kingston upon Hull, City of","RXH",1
"E06000010","Kingston upon Hull, City of","R1F",1
"E06000010","Kingston upon Hull, City of","RH5",1
"E06000010","Kingston upon Hull, City of","RXW",1
"E06000010","Kingston upon Hull, City of","R1H",1
"E06000010","Kingston upon Hull, City of","RBL",1
"E06000010","Kingston upon Hull, City of","RC1",1
"E06000010","Kingston upon Hull, City of","RF4",1
"E06000010","Kingston upon Hull, City of","R0B",1
"E06000010","Kingston upon Hull, City of","RPA",1
"E06000010","Kingston upon Hull, City of","RWH",1
"E06000010","Kingston upon Hull, City of","RWJ",1
"E06000010","Kingston upon Hull, City of","RXG",1
"E06000010","Kingston upon Hull, City of","RBZ",1
"E06000010","Kingston upon Hull, City of","RA7",1
"E06000010","Kingston upon Hull, City of","RLQ",1
"E06000010","Kingston upon Hull, City of","RWF",1
"E06000010","Kingston upon Hull, City of","RAP",1
"E06000010","Kingston upon Hull, City of","RBS",1
"E06000010","Kingston upon Hull, City of","RN3",1
"E06000010","Kingston upon Hull, City of","RQ8",1
"E06000010","Kingston upon Hull, City of","RTX",1
"E06000010","Kingston upon Hull, City of","RAL",1
"E06000010","Kingston upon Hull, City of","RAT",1
"E06000010","Kingston upon Hull, City of","RGN",1
"E06000010","Kingston upon Hull, City of","RQW",1
"E06000010","Kingston upon Hull, City of","RW5",1
"E06000010","Kingston upon Hull, City of","RYR",1
"E06000011","East Riding of Yorkshire","RWA",20765
"E06000011","East Riding of Yorkshire","RCB",10087
"E06000011","East Riding of Yorkshire","RJL",1898
"E06000011","East Riding of Yorkshire","RP5",507
"E06000011","East Riding of Yorkshire","RV9",386
"E06000011","East Riding of Yorkshire","RR8",189
"E06000011","East Riding of Yorkshire","RXF",127
"E06000011","East Riding of Yorkshire","RX3",36
"E06000011","East Riding of Yorkshire","RHQ",36
"E06000011","East Riding of Yorkshire","RAE",23
"E06000011","East Riding of Yorkshire","RCU",22
"E06000011","East Riding of Yorkshire","R0A",21
"E06000011","East Riding of Yorkshire","RWD",20
"E06000011","East Riding of Yorkshire","RFF",18
"E06000011","East Riding of Yorkshire","RTR",19
"E06000011","East Riding of Yorkshire","RTF",16
"E06000011","East Riding of Yorkshire","RTD",14
"E06000011","East Riding of Yorkshire","RCD",14
"E06000011","East Riding of Yorkshire","RYJ",12
"E06000011","East Riding of Yorkshire","RWY",12
"E06000011","East Riding of Yorkshire","RTG",11
"E06000011","East Riding of Yorkshire","RNL",11
"E06000011","East Riding of Yorkshire","RTH",11
"E06000011","East Riding of Yorkshire","RXP",11
"E06000011","East Riding of Yorkshire","RWE",11
"E06000011","East Riding of Yorkshire","RGD",10
"E06000011","East Riding of Yorkshire","RX1",9
"E06000011","East Riding of Yorkshire","RXE",9
"E06000011","East Riding of Yorkshire","RTX",9
"E06000011","East Riding of Yorkshire","RBV",8
"E06000011","East Riding of Yorkshire","RFR",10
"E06000011","East Riding of Yorkshire","RCF",8
"E06000011","East Riding of Yorkshire","REF",8
"E06000011","East Riding of Yorkshire","RAL",7
"E06000011","East Riding of Yorkshire","RW6",7
"E06000011","East Riding of Yorkshire","RJE",7
"E06000011","East Riding of Yorkshire","RFS",7
"E06000011","East Riding of Yorkshire","RRV",9
"E06000011","East Riding of Yorkshire","RBN",6
"E06000011","East Riding of Yorkshire","RK5",6
"E06000011","East Riding of Yorkshire","RM1",6
"E06000011","East Riding of Yorkshire","RGP",6
"E06000011","East Riding of Yorkshire","R1H",6
"E06000011","East Riding of Yorkshire","RM3",5
"E06000011","East Riding of Yorkshire","REM",8
"E06000011","East Riding of Yorkshire","RDU",5
"E06000011","East Riding of Yorkshire","RN5",5
"E06000011","East Riding of Yorkshire","RRK",6
"E06000011","East Riding of Yorkshire","RJ1",5
"E06000011","East Riding of Yorkshire","RNZ",5
"E06000011","East Riding of Yorkshire","RGN",5
"E06000011","East Riding of Yorkshire","RXW",6
"E06000011","East Riding of Yorkshire","RWF",4
"E06000011","East Riding of Yorkshire","RC1",4
"E06000011","East Riding of Yorkshire","RWJ",4
"E06000011","East Riding of Yorkshire","RWG",4
"E06000011","East Riding of Yorkshire","RXL",4
"E06000011","East Riding of Yorkshire","RNS",4
"E06000011","East Riding of Yorkshire","RAX",4
"E06000011","East Riding of Yorkshire","RHM",4
"E06000011","East Riding of Yorkshire","RAS",3
"E06000011","East Riding of Yorkshire","RHW",3
"E06000011","East Riding of Yorkshire","RA7",3
"E06000011","East Riding of Yorkshire","RVJ",3
"E06000011","East Riding of Yorkshire","RXQ",3
"E06000011","East Riding of Yorkshire","RH8",3
"E06000011","East Riding of Yorkshire","RWW",3
"E06000011","East Riding of Yorkshire","RBA",3
"E06000011","East Riding of Yorkshire","RBK",3
"E06000011","East Riding of Yorkshire","RXN",3
"E06000011","East Riding of Yorkshire","RXR",3
"E06000011","East Riding of Yorkshire","RVY",3
"E06000011","East Riding of Yorkshire","RBL",3
"E06000011","East Riding of Yorkshire","RDD",3
"E06000011","East Riding of Yorkshire","RCX",3
"E06000011","East Riding of Yorkshire","RD3",2
"E06000011","East Riding of Yorkshire","RJR",2
"E06000011","East Riding of Yorkshire","RKE",2
"E06000011","East Riding of Yorkshire","RMP",2
"E06000011","East Riding of Yorkshire","RQW",2
"E06000011","East Riding of Yorkshire","RR7",2
"E06000011","East Riding of Yorkshire","RBT",2
"E06000011","East Riding of Yorkshire","R0B",2
"E06000011","East Riding of Yorkshire","RBS",2
"E06000011","East Riding of Yorkshire","RN3",2
"E06000011","East Riding of Yorkshire","RQM",2
"E06000011","East Riding of Yorkshire","RA9",2
"E06000011","East Riding of Yorkshire","RJC",2
"E06000011","East Riding of Yorkshire","RRF",2
"E06000011","East Riding of Yorkshire","R1K",2
"E06000011","East Riding of Yorkshire","RDE",2
"E06000011","East Riding of Yorkshire","RGM",2
"E06000011","East Riding of Yorkshire","RK9",2
"E06000011","East Riding of Yorkshire","RL4",2
"E06000011","East Riding of Yorkshire","RLT",2
"E06000011","East Riding of Yorkshire","RTE",2
"E06000011","East Riding of Yorkshire","RHU",2
"E06000011","East Riding of Yorkshire","RNQ",2
"E06000011","East Riding of Yorkshire","RGR",1
"E06000011","East Riding of Yorkshire","RJ7",1
"E06000011","East Riding of Yorkshire","RJN",1
"E06000011","East Riding of Yorkshire","RLQ",1
"E06000011","East Riding of Yorkshire","RXA",1
"E06000011","East Riding of Yorkshire","RJ2",1
"E06000011","East Riding of Yorkshire","RJZ",1
"E06000011","East Riding of Yorkshire","RWP",1
"E06000011","East Riding of Yorkshire","RXC",1
"E06000011","East Riding of Yorkshire","RF4",1
"E06000011","East Riding of Yorkshire","RRJ",1
"E06000011","East Riding of Yorkshire","R1F",1
"E06000011","East Riding of Yorkshire","RBZ",1
"E06000011","East Riding of Yorkshire","RMC",1
"E06000011","East Riding of Yorkshire","RBD",1
"E06000011","East Riding of Yorkshire","RC9",1
"E06000011","East Riding of Yorkshire","RD1",1
"E06000011","East Riding of Yorkshire","RD8",1
"E06000011","East Riding of Yorkshire","RP7",1
"E06000011","East Riding of Yorkshire","RVR",1
"E06000011","East Riding of Yorkshire","RVV",1
"E06000011","East Riding of Yorkshire","RJ6",1
"E06000011","East Riding of Yorkshire","RP1",1
"E06000011","East Riding of Yorkshire","RTP",1
"E06000011","East Riding of Yorkshire","RXK",2
"E06000011","East Riding of Yorkshire","RA3",1
"E06000011","East Riding of Yorkshire","RN7",1
"E06000011","East Riding of Yorkshire","RWH",1
"E06000011","East Riding of Yorkshire","RWK",1
"E06000012","North East Lincolnshire","RJL",15229
"E06000012","North East Lincolnshire","RWA",1013
"E06000012","North East Lincolnshire","RCU",105
"E06000012","North East Lincolnshire","RHQ",60
"E06000012","North East Lincolnshire","RR8",36
"E06000012","North East Lincolnshire","RWD",35
"E06000012","North East Lincolnshire","RP5",13
"E06000012","North East Lincolnshire","RXF",12
"E06000012","North East Lincolnshire","RCB",12
"E06000012","North East Lincolnshire","RJ7",10
"E06000012","North East Lincolnshire","RX1",10
"E06000012","North East Lincolnshire","RP7",6
"E06000012","North East Lincolnshire","RJZ",6
"E06000012","North East Lincolnshire","RKB",5
"E06000012","North East Lincolnshire","RM1",5
"E06000012","North East Lincolnshire","RWE",5
"E06000012","North East Lincolnshire","RDU",5
"E06000012","North East Lincolnshire","RGN",5
"E06000012","North East Lincolnshire","R0A",5
"E06000012","North East Lincolnshire","RW6",4
"E06000012","North East Lincolnshire","RFS",4
"E06000012","North East Lincolnshire","RTX",4
"E06000012","North East Lincolnshire","RGT",4
"E06000012","North East Lincolnshire","RK5",4
"E06000012","North East Lincolnshire","RTD",4
"E06000012","North East Lincolnshire","RBA",4
"E06000012","North East Lincolnshire","REF",4
"E06000012","North East Lincolnshire","RXE",4
"E06000012","North East Lincolnshire","R1H",3
"E06000012","North East Lincolnshire","RFF",3
"E06000012","North East Lincolnshire","RNS",3
"E06000012","North East Lincolnshire","RDE",3
"E06000012","North East Lincolnshire","RXP",3
"E06000012","North East Lincolnshire","R1K",3
"E06000012","North East Lincolnshire","REM",3
"E06000012","North East Lincolnshire","RQM",3
"E06000012","North East Lincolnshire","RWY",3
"E06000012","North East Lincolnshire","RXN",3
"E06000012","North East Lincolnshire","RRV",3
"E06000012","North East Lincolnshire","RTE",2
"E06000012","North East Lincolnshire","RVV",2
"E06000012","North East Lincolnshire","RVY",2
"E06000012","North East Lincolnshire","RXK",4
"E06000012","North East Lincolnshire","RYJ",2
"E06000012","North East Lincolnshire","RM3",2
"E06000012","North East Lincolnshire","RRF",2
"E06000012","North East Lincolnshire","RHW",2
"E06000012","North East Lincolnshire","R1F",2
"E06000012","North East Lincolnshire","RD1",2
"E06000012","North East Lincolnshire","RH8",2
"E06000012","North East Lincolnshire","RPA",2
"E06000012","North East Lincolnshire","RV9",2
"E06000012","North East Lincolnshire","RAL",2
"E06000012","North East Lincolnshire","RJR",2
"E06000012","North East Lincolnshire","RA9",2
"E06000012","North East Lincolnshire","RPY",2
"E06000012","North East Lincolnshire","RF4",2
"E06000012","North East Lincolnshire","RTR",2
"E06000012","North East Lincolnshire","RWW",2
"E06000012","North East Lincolnshire","RAE",2
"E06000012","North East Lincolnshire","RCX",2
"E06000012","North East Lincolnshire","RGP",2
"E06000012","North East Lincolnshire","RK9",2
"E06000012","North East Lincolnshire","RN5",2
"E06000012","North East Lincolnshire","RTG",2
"E06000012","North East Lincolnshire","RXW",2
"E06000012","North East Lincolnshire","RBS",1
"E06000012","North East Lincolnshire","RL1",1
"E06000012","North East Lincolnshire","RLQ",1
"E06000012","North East Lincolnshire","RQ8",1
"E06000012","North East Lincolnshire","RBD",1
"E06000012","North East Lincolnshire","RD3",1
"E06000012","North East Lincolnshire","RJ1",1
"E06000012","North East Lincolnshire","RL4",1
"E06000012","North East Lincolnshire","RTP",1
"E06000012","North East Lincolnshire","RVR",1
"E06000012","North East Lincolnshire","RBV",1
"E06000012","North East Lincolnshire","RA7",1
"E06000012","North East Lincolnshire","RFR",1
"E06000012","North East Lincolnshire","RHM",1
"E06000012","North East Lincolnshire","RVJ",1
"E06000012","North East Lincolnshire","RXQ",1
"E06000012","North East Lincolnshire","RAX",1
"E06000012","North East Lincolnshire","RC1",1
"E06000012","North East Lincolnshire","RGR",1
"E06000012","North East Lincolnshire","RJE",1
"E06000012","North East Lincolnshire","RN3",1
"E06000012","North East Lincolnshire","RWG",1
"E06000012","North East Lincolnshire","RWJ",1
"E06000012","North East Lincolnshire","RBL",1
"E06000012","North East Lincolnshire","RC9",1
"E06000012","North East Lincolnshire","RMC",1
"E06000012","North East Lincolnshire","RQX",1
"E06000012","North East Lincolnshire","RR7",1
"E06000012","North East Lincolnshire","RT5",1
"E06000012","North East Lincolnshire","RX3",1
"E06000012","North East Lincolnshire","RYR",1
"E06000012","North East Lincolnshire","RBK",1
"E06000012","North East Lincolnshire","RTF",1
"E06000012","North East Lincolnshire","RTH",1
"E06000012","North East Lincolnshire","RXH",1
"E06000013","North Lincolnshire","RJL",17088
"E06000013","North Lincolnshire","RWA",1788
"E06000013","North Lincolnshire","RP5",406
"E06000013","North Lincolnshire","RXE",260
"E06000013","North Lincolnshire","RCU",87
"E06000013","North Lincolnshire","RHQ",82
"E06000013","North Lincolnshire","RR8",58
"E06000013","North Lincolnshire","RWD",57
"E06000013","North Lincolnshire","RCB",29
"E06000013","North Lincolnshire","RXF",16
"E06000013","North Lincolnshire","REF",11
"E06000013","North Lincolnshire","RWE",8
"E06000013","North Lincolnshire","RFR",11
"E06000013","North Lincolnshire","RX1",7
"E06000013","North Lincolnshire","RTG",6
"E06000013","North Lincolnshire","R1H",5
"E06000013","North Lincolnshire","RNL",5
"E06000013","North Lincolnshire","RKB",4
"E06000013","North Lincolnshire","RXN",4
"E06000013","North Lincolnshire","RFF",4
"E06000013","North Lincolnshire","REM",7
"E06000013","North Lincolnshire","RK5",4
"E06000013","North Lincolnshire","RA9",4
"E06000013","North Lincolnshire","RGN",4
"E06000013","North Lincolnshire","RVV",4
"E06000013","North Lincolnshire","RHM",4
"E06000013","North Lincolnshire","RTR",4
"E06000013","North Lincolnshire","RCF",3
"E06000013","North Lincolnshire","RJ1",3
"E06000013","North Lincolnshire","RAE",3
"E06000013","North Lincolnshire","RGP",3
"E06000013","North Lincolnshire","RQM",3
"E06000013","North Lincolnshire","RGT",3
"E06000013","North Lincolnshire","R0A",3
"E06000013","North Lincolnshire","RTD",3
"E06000013","North Lincolnshire","RV9",3
"E06000013","North Lincolnshire","RNS",3
"E06000013","North Lincolnshire","RWF",3
"E06000013","North Lincolnshire","RFS",3
"E06000013","North Lincolnshire","RM3",3
"E06000013","North Lincolnshire","RTF",3
"E06000013","North Lincolnshire","RD1",2
"E06000013","North Lincolnshire","RA7",2
"E06000013","North Lincolnshire","RJ2",2
"E06000013","North Lincolnshire","RRV",2
"E06000013","North Lincolnshire","RT3",2
"E06000013","North Lincolnshire","RVW",2
"E06000013","North Lincolnshire","RJC",2
"E06000013","North Lincolnshire","RN5",2
"E06000013","North Lincolnshire","RRK",3
"E06000013","North Lincolnshire","RYJ",2
"E06000013","North Lincolnshire","RAL",2
"E06000013","North Lincolnshire","RCD",2
"E06000013","North Lincolnshire","RHW",2
"E06000013","North Lincolnshire","R1K",2
"E06000013","North Lincolnshire","RXL",2
"E06000013","North Lincolnshire","RM1",2
"E06000013","North Lincolnshire","RP7",2
"E06000013","North Lincolnshire","RXP",2
"E06000013","North Lincolnshire","RGM",2
"E06000013","North Lincolnshire","RJ7",1
"E06000013","North Lincolnshire","RWG",1
"E06000013","North Lincolnshire","RAP",1
"E06000013","North Lincolnshire","RBK",1
"E06000013","North Lincolnshire","RBL",1
"E06000013","North Lincolnshire","RJR",1
"E06000013","North Lincolnshire","RBA",1
"E06000013","North Lincolnshire","RF4",1
"E06000013","North Lincolnshire","RJ6",1
"E06000013","North Lincolnshire","RQ3",1
"E06000013","North Lincolnshire","RC1",1
"E06000013","North Lincolnshire","RV3",1
"E06000013","North Lincolnshire","RW1",1
"E06000013","North Lincolnshire","RBN",1
"E06000013","North Lincolnshire","RBQ",1
"E06000013","North Lincolnshire","RBZ",1
"E06000013","North Lincolnshire","RDU",1
"E06000013","North Lincolnshire","RHU",1
"E06000013","North Lincolnshire","RJE",1
"E06000013","North Lincolnshire","RWY",1
"E06000013","North Lincolnshire","RXW",1
"E06000013","North Lincolnshire","RA3",1
"E06000013","North Lincolnshire","RBT",1
"E06000013","North Lincolnshire","RC9",1
"E06000013","North Lincolnshire","RH8",1
"E06000013","North Lincolnshire","RN3",1
"E06000013","North Lincolnshire","RN7",1
"E06000013","North Lincolnshire","RXQ",1
"E06000013","North Lincolnshire","RCX",1
"E06000013","North Lincolnshire","REP",1
"E06000013","North Lincolnshire","RWJ",1
"E06000013","North Lincolnshire","RWP",1
"E06000013","North Lincolnshire","RXK",1
"E06000013","North Lincolnshire","RD8",1
"E06000013","North Lincolnshire","R0B",1
"E06000013","North Lincolnshire","RQ8",1
"E06000013","North Lincolnshire","RT5",1
"E06000013","North Lincolnshire","RTE",1
"E06000013","North Lincolnshire","RVR",1
"E06000013","North Lincolnshire","RVY",1
"E06000014","York","RCB",23251
"E06000014","York","RR8",342
"E06000014","York","RX3",338
"E06000014","York","RWA",327
"E06000014","York","RCD",44
"E06000014","York","RXF",33
"E06000014","York","RTR",27
"E06000014","York","R0A",18
"E06000014","York","RAE",15
"E06000014","York","RTF",15
"E06000014","York","RXP",14
"E06000014","York","RHQ",11
"E06000014","York","RJL",10
"E06000014","York","RJ1",10
"E06000014","York","RP5",10
"E06000014","York","RWY",9
"E06000014","York","RWE",8
"E06000014","York","R1H",8
"E06000014","York","RTD",8
"E06000014","York","RTX",8
"E06000014","York","REM",10
"E06000014","York","RVW",7
"E06000014","York","REF",7
"E06000014","York","RGT",7
"E06000014","York","RM1",7
"E06000014","York","RDE",6
"E06000014","York","RRK",7
"E06000014","York","RCU",5
"E06000014","York","RDU",5
"E06000014","York","RFF",5
"E06000014","York","RRV",5
"E06000014","York","RXQ",5
"E06000014","York","RM3",4
"E06000014","York","RWD",4
"E06000014","York","RCF",4
"E06000014","York","RGN",4
"E06000014","York","RK5",4
"E06000014","York","RJ7",4
"E06000014","York","RTG",5
"E06000014","York","RWG",3
"E06000014","York","RW6",3
"E06000014","York","RKB",3
"E06000014","York","R0B",3
"E06000014","York","RHW",3
"E06000014","York","RTH",3
"E06000014","York","RXL",3
"E06000014","York","RX4",3
"E06000014","York","RC9",3
"E06000014","York","RH8",3
"E06000014","York","RJC",3
"E06000014","York","RXC",3
"E06000014","York","RLQ",3
"E06000014","York","RN3",3
"E06000014","York","RNL",3
"E06000014","York","RHM",3
"E06000014","York","RTE",3
"E06000014","York","RWH",3
"E06000014","York","RTP",2
"E06000014","York","RBA",2
"E06000014","York","RD8",2
"E06000014","York","RQ8",2
"E06000014","York","RQM",2
"E06000014","York","RXR",2
"E06000014","York","RAL",2
"E06000014","York","RWJ",2
"E06000014","York","RA7",2
"E06000014","York","RBV",2
"E06000014","York","RVR",2
"E06000014","York","RWW",2
"E06000014","York","RQW",2
"E06000014","York","R1K",2
"E06000014","York","RBN",2
"E06000014","York","RGD",2
"E06000014","York","RJ2",3
"E06000014","York","RJN",2
"E06000014","York","RX1",2
"E06000014","York","RJE",1
"E06000014","York","RRF",1
"E06000014","York","RTK",1
"E06000014","York","RW5",1
"E06000014","York","RA3",1
"E06000014","York","RBD",1
"E06000014","York","RC1",1
"E06000014","York","RFS",1
"E06000014","York","RJ6",1
"E06000014","York","RMP",1
"E06000014","York","RWF",1
"E06000014","York","RNS",1
"E06000014","York","RXA",1
"E06000014","York","RA2",1
"E06000014","York","RAX",1
"E06000014","York","RBK",1
"E06000014","York","RHU",1
"E06000014","York","RNZ",1
"E06000014","York","RXW",1
"E06000014","York","RWP",1
"E06000014","York","RYR",1
"E06000014","York","RA4",1
"E06000014","York","RAS",1
"E06000014","York","RD1",1
"E06000014","York","RGP",1
"E06000014","York","RL4",1
"E06000014","York","RLT",1
"E06000014","York","RNA",1
"E06000014","York","RP6",1
"E06000014","York","RD3",1
"E06000014","York","RDY",1
"E06000014","York","RQ3",1
"E06000014","York","RYJ",1
"E06000015","Derby","RTG",25295
"E06000015","Derby","RX1",501
"E06000015","Derby","RXM",399
"E06000015","Derby","RWE",56
"E06000015","Derby","RWD",24
"E06000015","Derby","RFS",23
"E06000015","Derby","RGT",21
"E06000015","Derby","RRK",32
"E06000015","Derby","R0A",16
"E06000015","Derby","RHQ",15
"E06000015","Derby","R1H",12
"E06000015","Derby","RJC",11
"E06000015","Derby","RCU",11
"E06000015","Derby","RKB",11
"E06000015","Derby","RK5",11
"E06000015","Derby","RBK",10
"E06000015","Derby","RJE",10
"E06000015","Derby","RNQ",9
"E06000015","Derby","RA9",8
"E06000015","Derby","RR8",8
"E06000015","Derby","RXK",13
"E06000015","Derby","REF",7
"E06000015","Derby","RAX",7
"E06000015","Derby","RRV",7
"E06000015","Derby","RCB",7
"E06000015","Derby","RTH",7
"E06000015","Derby","RC9",7
"E06000015","Derby","RWA",6
"E06000015","Derby","RCD",6
"E06000015","Derby","RD8",6
"E06000015","Derby","RBT",5
"E06000015","Derby","RP5",7
"E06000015","Derby","RWJ",5
"E06000015","Derby","RXH",5
"E06000015","Derby","RTR",6
"E06000015","Derby","RH8",5
"E06000015","Derby","RBD",5
"E06000015","Derby","RAE",4
"E06000015","Derby","RQM",4
"E06000015","Derby","RBL",4
"E06000015","Derby","RBV",4
"E06000015","Derby","RBN",4
"E06000015","Derby","RHA",4
"E06000015","Derby","RW6",4
"E06000015","Derby","RJ1",4
"E06000015","Derby","RDE",4
"E06000015","Derby","RGP",4
"E06000015","Derby","RJL",4
"E06000015","Derby","RN7",4
"E06000015","Derby","RJ7",4
"E06000015","Derby","RQ3",4
"E06000015","Derby","RVJ",3
"E06000015","Derby","RC1",3
"E06000015","Derby","RMP",3
"E06000015","Derby","RN3",3
"E06000015","Derby","RYJ",3
"E06000015","Derby","RL4",3
"E06000015","Derby","RT5",3
"E06000015","Derby","RTE",3
"E06000015","Derby","RTX",3
"E06000015","Derby","RWG",3
"E06000015","Derby","RGN",3
"E06000015","Derby","RAL",3
"E06000015","Derby","RTF",3
"E06000015","Derby","RXW",4
"E06000015","Derby","RDU",3
"E06000015","Derby","RHU",3
"E06000015","Derby","RNS",3
"E06000015","Derby","RNA",3
"E06000015","Derby","RWH",3
"E06000015","Derby","RWP",3
"E06000015","Derby","RFF",2
"E06000015","Derby","RFR",3
"E06000015","Derby","RJN",2
"E06000015","Derby","RK9",2
"E06000015","Derby","RNL",2
"E06000015","Derby","RXL",2
"E06000015","Derby","REM",3
"E06000015","Derby","RJ2",4
"E06000015","Derby","RN5",2
"E06000015","Derby","RBA",2
"E06000015","Derby","RF4",2
"E06000015","Derby","RLT",2
"E06000015","Derby","RQX",2
"E06000015","Derby","RVW",2
"E06000015","Derby","RXP",2
"E06000015","Derby","RQW",2
"E06000015","Derby","RVY",2
"E06000015","Derby","RAS",2
"E06000015","Derby","RCF",2
"E06000015","Derby","RJZ",2
"E06000015","Derby","RLQ",2
"E06000015","Derby","RYR",2
"E06000015","Derby","TAJ",2
"E06000015","Derby","R1K",2
"E06000015","Derby","RM1",2
"E06000015","Derby","RTK",2
"E06000015","Derby","RVV",2
"E06000015","Derby","RD3",1
"E06000015","Derby","RHW",1
"E06000015","Derby","RMC",1
"E06000015","Derby","RRF",1
"E06000015","Derby","RA3",1
"E06000015","Derby","RWK",1
"E06000015","Derby","R1F",1
"E06000015","Derby","RGR",1
"E06000015","Derby","RP4",1
"E06000015","Derby","RR7",1
"E06000015","Derby","RVR",1
"E06000015","Derby","RXN",1
"E06000015","Derby","RY8",1
"E06000015","Derby","RCX",1
"E06000015","Derby","RWW",1
"E06000015","Derby","RJ6",1
"E06000015","Derby","RTP",1
"E06000015","Derby","RXR",1
"E06000015","Derby","RA4",1
"E06000015","Derby","RA7",1
"E06000015","Derby","RBQ",1
"E06000015","Derby","RD1",1
"E06000015","Derby","RDZ",1
"E06000015","Derby","RP7",1
"E06000015","Derby","RXC",1
"E06000015","Derby","RXF",1
"E06000016","Leicester","RWE",38178
"E06000016","Leicester","RT5",1582
"E06000016","Leicester","RX1",215
"E06000016","Leicester","RKB",72
"E06000016","Leicester","RTG",42
"E06000016","Leicester","RWD",41
"E06000016","Leicester","RNQ",36
"E06000016","Leicester","RRK",49
"E06000016","Leicester","R1H",23
"E06000016","Leicester","RQM",20
"E06000016","Leicester","R1K",20
"E06000016","Leicester","RLT",19
"E06000016","Leicester","RAL",18
"E06000016","Leicester","RJC",17
"E06000016","Leicester","RTH",14
"E06000016","Leicester","RDU",14
"E06000016","Leicester","RHQ",13
"E06000016","Leicester","RGN",12
"E06000016","Leicester","RNS",12
"E06000016","Leicester","RQ3",11
"E06000016","Leicester","RYJ",10
"E06000016","Leicester","RD8",9
"E06000016","Leicester","RAE",9
"E06000016","Leicester","RAS",9
"E06000016","Leicester","RC9",9
"E06000016","Leicester","RJ7",9
"E06000016","Leicester","RRV",8
"E06000016","Leicester","RGT",8
"E06000016","Leicester","RJZ",8
"E06000016","Leicester","RHM",8
"E06000016","Leicester","RWH",8
"E06000016","Leicester","RXF",8
"E06000016","Leicester","RJE",7
"E06000016","Leicester","RCX",7
"E06000016","Leicester","RGP",7
"E06000016","Leicester","R0A",7
"E06000016","Leicester","REF",7
"E06000016","Leicester","RHW",7
"E06000016","Leicester","RCB",7
"E06000016","Leicester","RF4",7
"E06000016","Leicester","RXK",15
"E06000016","Leicester","RP6",7
"E06000016","Leicester","RJ2",8
"E06000016","Leicester","RC1",6
"E06000016","Leicester","RMC",6
"E06000016","Leicester","RTE",6
"E06000016","Leicester","RBK",6
"E06000016","Leicester","RAP",6
"E06000016","Leicester","RXL",6
"E06000016","Leicester","RJ1",6
"E06000016","Leicester","RFS",5
"E06000016","Leicester","RR8",5
"E06000016","Leicester","RM3",5
"E06000016","Leicester","RVJ",5
"E06000016","Leicester","RL4",5
"E06000016","Leicester","RW6",5
"E06000016","Leicester","RXH",5
"E06000016","Leicester","RM1",5
"E06000016","Leicester","RWA",5
"E06000016","Leicester","RXQ",5
"E06000016","Leicester","RTP",5
"E06000016","Leicester","RA2",5
"E06000016","Leicester","RQX",4
"E06000016","Leicester","RXW",4
"E06000016","Leicester","RT3",4
"E06000016","Leicester","RA7",3
"E06000016","Leicester","RK5",3
"E06000016","Leicester","REM",3
"E06000016","Leicester","RTX",3
"E06000016","Leicester","RVV",3
"E06000016","Leicester","RVW",3
"E06000016","Leicester","RXP",3
"E06000016","Leicester","RWW",3
"E06000016","Leicester","RDE",3
"E06000016","Leicester","RH8",3
"E06000016","Leicester","RWY",3
"E06000016","Leicester","R1F",3
"E06000016","Leicester","RJL",3
"E06000016","Leicester","RWG",3
"E06000016","Leicester","RXN",3
"E06000016","Leicester","RVR",3
"E06000016","Leicester","RBA",2
"E06000016","Leicester","RCF",2
"E06000016","Leicester","RD3",2
"E06000016","Leicester","RD1",2
"E06000016","Leicester","RQW",2
"E06000016","Leicester","RW1",2
"E06000016","Leicester","RAX",2
"E06000016","Leicester","R0B",3
"E06000016","Leicester","RP5",4
"E06000016","Leicester","RTR",2
"E06000016","Leicester","RYR",2
"E06000016","Leicester","RFR",3
"E06000016","Leicester","RHA",2
"E06000016","Leicester","RJ6",2
"E06000016","Leicester","RP7",2
"E06000016","Leicester","RQ8",2
"E06000016","Leicester","RA4",2
"E06000016","Leicester","RN7",2
"E06000016","Leicester","RDZ",2
"E06000016","Leicester","RGM",2
"E06000016","Leicester","RNA",2
"E06000016","Leicester","RA9",2
"E06000016","Leicester","RTK",2
"E06000016","Leicester","RGR",1
"E06000016","Leicester","RNL",1
"E06000016","Leicester","RR7",1
"E06000016","Leicester","RV3",1
"E06000016","Leicester","RXR",1
"E06000016","Leicester","RA3",1
"E06000016","Leicester","RBS",1
"E06000016","Leicester","RWJ",1
"E06000016","Leicester","RBZ",1
"E06000016","Leicester","RKE",1
"E06000016","Leicester","RLQ",1
"E06000016","Leicester","RN5",1
"E06000016","Leicester","RJR",1
"E06000016","Leicester","RP4",1
"E06000016","Leicester","RTD",1
"E06000016","Leicester","RWK",1
"E06000016","Leicester","RXM",1
"E06000016","Leicester","RYG",1
"E06000016","Leicester","RAN",1
"E06000016","Leicester","RBL",1
"E06000016","Leicester","RMP",1
"E06000016","Leicester","RWP",1
"E06000016","Leicester","RXE",1
"E06000016","Leicester","RBQ",1
"E06000016","Leicester","RTF",1
"E06000016","Leicester","RN3",1
"E06000016","Leicester","RNZ",1
"E06000016","Leicester","RPA",1
"E06000016","Leicester","RVY",1
"E06000016","Leicester","RXC",1
"E06000016","Leicester","RXT",1
"E06000017","Rutland","RGN",2068
"E06000017","Rutland","RWE",852
"E06000017","Rutland","RNQ",180
"E06000017","Rutland","RT5",135
"E06000017","Rutland","RX1",30
"E06000017","Rutland","RGT",30
"E06000017","Rutland","RWD",13
"E06000017","Rutland","RNS",12
"E06000017","Rutland","RKB",8
"E06000017","Rutland","RJL",4
"E06000017","Rutland","RTG",4
"E06000017","Rutland","RGP",3
"E06000017","Rutland","RRK",4
"E06000017","Rutland","RTH",3
"E06000017","Rutland","RD1",3
"E06000017","Rutland","RYJ",3
"E06000017","Rutland","RGM",3
"E06000017","Rutland","RK5",3
"E06000017","Rutland","RP7",3
"E06000017","Rutland","RQW",3
"E06000017","Rutland","RYR",3
"E06000017","Rutland","RNZ",3
"E06000017","Rutland","RGR",3
"E06000017","Rutland","RAL",3
"E06000017","Rutland","RM1",3
"E06000017","Rutland","RQM",3
"E06000017","Rutland","RXL",2
"E06000017","Rutland","RHM",2
"E06000017","Rutland","RTE",2
"E06000017","Rutland","RXP",2
"E06000017","Rutland","R1H",2
"E06000017","Rutland","RHW",2
"E06000017","Rutland","RN5",2
"E06000017","Rutland","RA2",2
"E06000017","Rutland","RCX",2
"E06000017","Rutland","RDZ",2
"E06000017","Rutland","RRV",2
"E06000017","Rutland","RTF",2
"E06000017","Rutland","RC1",2
"E06000017","Rutland","RCD",2
"E06000017","Rutland","REF",2
"E06000017","Rutland","RJ1",2
"E06000017","Rutland","RTX",2
"E06000017","Rutland","RWA",2
"E06000017","Rutland","RXC",2
"E06000017","Rutland","RXW",2
"E06000017","Rutland","R0A",2
"E06000017","Rutland","RP1",2
"E06000017","Rutland","RD3",1
"E06000017","Rutland","RDU",1
"E06000017","Rutland","RP5",1
"E06000017","Rutland","RQ3",1
"E06000017","Rutland","RWH",1
"E06000017","Rutland","RAS",1
"E06000017","Rutland","RBD",1
"E06000017","Rutland","RCU",1
"E06000017","Rutland","RQ8",1
"E06000017","Rutland","RTR",1
"E06000017","Rutland","RBA",1
"E06000017","Rutland","RBN",1
"E06000017","Rutland","RT3",1
"E06000017","Rutland","RD8",1
"E06000017","Rutland","RDE",1
"E06000017","Rutland","RF4",1
"E06000017","Rutland","RHQ",1
"E06000017","Rutland","RJZ",1
"E06000017","Rutland","RNL",1
"E06000017","Rutland","REM",1
"E06000017","Rutland","RVR",1
"E06000017","Rutland","RJ2",1
"E06000017","Rutland","RJ7",1
"E06000017","Rutland","RL4",1
"E06000017","Rutland","RP6",1
"E06000017","Rutland","RRJ",1
"E06000017","Rutland","R1K",1
"E06000017","Rutland","RC9",1
"E06000017","Rutland","RCB",1
"E06000017","Rutland","RHU",1
"E06000017","Rutland","RRF",1
"E06000017","Rutland","RWG",1
"E06000017","Rutland","RYV",1
"E06000018","Nottingham","RX1",32217
"E06000018","Nottingham","RHA",326
"E06000018","Nottingham","RK5",126
"E06000018","Nottingham","RTG",100
"E06000018","Nottingham","RWD",55
"E06000018","Nottingham","RWE",54
"E06000018","Nottingham","RGT",20
"E06000018","Nottingham","R1H",19
"E06000018","Nottingham","RHQ",18
"E06000018","Nottingham","RRK",25
"E06000018","Nottingham","RP5",21
"E06000018","Nottingham","RJ7",13
"E06000018","Nottingham","RR8",13
"E06000018","Nottingham","RKB",12
"E06000018","Nottingham","RXK",15
"E06000018","Nottingham","RTH",12
"E06000018","Nottingham","RJ2",15
"E06000018","Nottingham","RAL",11
"E06000018","Nottingham","RJ1",11
"E06000018","Nottingham","RGN",11
"E06000018","Nottingham","RFS",10
"E06000018","Nottingham","RWA",10
"E06000018","Nottingham","RD8",9
"E06000018","Nottingham","RJL",9
"E06000018","Nottingham","RVJ",9
"E06000018","Nottingham","R1K",9
"E06000018","Nottingham","RM1",9
"E06000018","Nottingham","RGP",8
"E06000018","Nottingham","REF",8
"E06000018","Nottingham","RCB",8
"E06000018","Nottingham","RDU",7
"E06000018","Nottingham","R0A",7
"E06000018","Nottingham","RQM",7
"E06000018","Nottingham","RWH",7
"E06000018","Nottingham","RBK",7
"E06000018","Nottingham","RAE",6
"E06000018","Nottingham","RYJ",6
"E06000018","Nottingham","RA9",6
"E06000018","Nottingham","RHM",6
"E06000018","Nottingham","RL4",6
"E06000018","Nottingham","RF4",5
"E06000018","Nottingham","RCU",5
"E06000018","Nottingham","RXQ",5
"E06000018","Nottingham","RWG",5
"E06000018","Nottingham","RLT",5
"E06000018","Nottingham","RQX",5
"E06000018","Nottingham","RDE",4
"E06000018","Nottingham","RC1",4
"E06000018","Nottingham","RJC",4
"E06000018","Nottingham","RJE",4
"E06000018","Nottingham","RT5",4
"E06000018","Nottingham","RH8",4
"E06000018","Nottingham","RHU",4
"E06000018","Nottingham","RXP",4
"E06000018","Nottingham","RC9",4
"E06000018","Nottingham","RNQ",4
"E06000018","Nottingham","RA2",4
"E06000018","Nottingham","RA7",4
"E06000018","Nottingham","RQ3",5
"E06000018","Nottingham","RRV",4
"E06000018","Nottingham","RFR",3
"E06000018","Nottingham","RJ6",3
"E06000018","Nottingham","REM",4
"E06000018","Nottingham","RQW",3
"E06000018","Nottingham","RHW",3
"E06000018","Nottingham","RTP",3
"E06000018","Nottingham","RAP",3
"E06000018","Nottingham","RBD",3
"E06000018","Nottingham","RDZ",3
"E06000018","Nottingham","RXF",3
"E06000018","Nottingham","RXC",3
"E06000018","Nottingham","RCF",3
"E06000018","Nottingham","RTD",3
"E06000018","Nottingham","RXH",3
"E06000018","Nottingham","RBZ",3
"E06000018","Nottingham","RMP",3
"E06000018","Nottingham","RQ8",3
"E06000018","Nottingham","RTR",4
"E06000018","Nottingham","RTX",3
"E06000018","Nottingham","RWF",3
"E06000018","Nottingham","RGR",2
"E06000018","Nottingham","RVV",2
"E06000018","Nottingham","RW5",2
"E06000018","Nottingham","RW6",2
"E06000018","Nottingham","RXN",2
"E06000018","Nottingham","RTE",2
"E06000018","Nottingham","RAS",2
"E06000018","Nottingham","RGM",2
"E06000018","Nottingham","RNA",2
"E06000018","Nottingham","RVW",2
"E06000018","Nottingham","RCX",2
"E06000018","Nottingham","RDD",2
"E06000018","Nottingham","RWJ",2
"E06000018","Nottingham","RXL",2
"E06000018","Nottingham","RAX",2
"E06000018","Nottingham","RNZ",2
"E06000018","Nottingham","RTK",2
"E06000018","Nottingham","RWP",2
"E06000018","Nottingham","R1F",2
"E06000018","Nottingham","RFF",2
"E06000018","Nottingham","RD1",2
"E06000018","Nottingham","RM3",2
"E06000018","Nottingham","RN5",2
"E06000018","Nottingham","RD3",1
"E06000018","Nottingham","R0B",1
"E06000018","Nottingham","RMC",1
"E06000018","Nottingham","RP4",1
"E06000018","Nottingham","RVR",1
"E06000018","Nottingham","RXE",1
"E06000018","Nottingham","RCD",1
"E06000018","Nottingham","RN3",1
"E06000018","Nottingham","RXW",2
"E06000018","Nottingham","RNS",1
"E06000018","Nottingham","RXT",1
"E06000018","Nottingham","RYR",1
"E06000018","Nottingham","RBV",1
"E06000018","Nottingham","RK9",1
"E06000018","Nottingham","RNL",1
"E06000018","Nottingham","RVY",1
"E06000018","Nottingham","RBA",1
"E06000018","Nottingham","RP6",1
"E06000018","Nottingham","RXR",1
"E06000018","Nottingham","RBL",1
"E06000018","Nottingham","RBN",1
"E06000018","Nottingham","RJZ",1
"E06000018","Nottingham","RXM",1
"E06000018","Nottingham","RWK",1
"E06000018","Nottingham","RWY",1
"E06000019","Herefordshire, County of","RLQ",17010
"E06000019","Herefordshire, County of","RWP",718
"E06000019","Herefordshire, County of","RTE",439
"E06000019","Herefordshire, County of","RTQ",282
"E06000019","Herefordshire, County of","RRK",265
"E06000019","Herefordshire, County of","RVJ",56
"E06000019","Herefordshire, County of","RQ3",61
"E06000019","Herefordshire, County of","RXW",46
"E06000019","Herefordshire, County of","RA7",30
"E06000019","Herefordshire, County of","REF",17
"E06000019","Herefordshire, County of","RTH",13
"E06000019","Herefordshire, County of","RJE",12
"E06000019","Herefordshire, County of","RKB",12
"E06000019","Herefordshire, County of","RL1",11
"E06000019","Herefordshire, County of","RA9",10
"E06000019","Herefordshire, County of","RH8",10
"E06000019","Herefordshire, County of","RD1",9
"E06000019","Herefordshire, County of","RRV",10
"E06000019","Herefordshire, County of","RJC",7
"E06000019","Herefordshire, County of","RJ7",7
"E06000019","Herefordshire, County of","RXK",14
"E06000019","Herefordshire, County of","RBA",7
"E06000019","Herefordshire, County of","RDU",6
"E06000019","Herefordshire, County of","RYJ",6
"E06000019","Herefordshire, County of","RA3",6
"E06000019","Herefordshire, County of","RL4",6
"E06000019","Herefordshire, County of","RCB",6
"E06000019","Herefordshire, County of","RNA",6
"E06000019","Herefordshire, County of","RQM",6
"E06000019","Herefordshire, County of","RBT",6
"E06000019","Herefordshire, County of","RN3",6
"E06000019","Herefordshire, County of","R1A",5
"E06000019","Herefordshire, County of","RX1",5
"E06000019","Herefordshire, County of","RBZ",4
"E06000019","Herefordshire, County of","RHW",4
"E06000019","Herefordshire, County of","RA2",4
"E06000019","Herefordshire, County of","RDE",4
"E06000019","Herefordshire, County of","RBD",4
"E06000019","Herefordshire, County of","RPY",4
"E06000019","Herefordshire, County of","RGR",3
"E06000019","Herefordshire, County of","RWW",3
"E06000019","Herefordshire, County of","RHM",3
"E06000019","Herefordshire, County of","RNQ",3
"E06000019","Herefordshire, County of","RRJ",3
"E06000019","Herefordshire, County of","R1K",3
"E06000019","Herefordshire, County of","RK9",3
"E06000019","Herefordshire, County of","R1H",3
"E06000019","Herefordshire, County of","RJZ",3
"E06000019","Herefordshire, County of","RTG",4
"E06000019","Herefordshire, County of","R0A",3
"E06000019","Herefordshire, County of","RXC",3
"E06000019","Herefordshire, County of","RYR",3
"E06000019","Herefordshire, County of","RA4",3
"E06000019","Herefordshire, County of","RWF",3
"E06000019","Herefordshire, County of","RAX",2
"E06000019","Herefordshire, County of","RJ8",2
"E06000019","Herefordshire, County of","RRE",2
"E06000019","Herefordshire, County of","RTR",2
"E06000019","Herefordshire, County of","RTP",2
"E06000019","Herefordshire, County of","RDZ",2
"E06000019","Herefordshire, County of","RGT",2
"E06000019","Herefordshire, County of","RKE",2
"E06000019","Herefordshire, County of","RCF",2
"E06000019","Herefordshire, County of","RVR",2
"E06000019","Herefordshire, County of","RVV",2
"E06000019","Herefordshire, County of","RXH",2
"E06000019","Herefordshire, County of","RAL",2
"E06000019","Herefordshire, County of","RAP",2
"E06000019","Herefordshire, County of","RNZ",2
"E06000019","Herefordshire, County of","RHU",2
"E06000019","Herefordshire, County of","RWE",2
"E06000019","Herefordshire, County of","RFS",1
"E06000019","Herefordshire, County of","RXQ",1
"E06000019","Herefordshire, County of","RD3",1
"E06000019","Herefordshire, County of","REM",1
"E06000019","Herefordshire, County of","RP1",1
"E06000019","Herefordshire, County of","RP6",1
"E06000019","Herefordshire, County of","RBV",1
"E06000019","Herefordshire, County of","RPA",1
"E06000019","Herefordshire, County of","RR7",1
"E06000019","Herefordshire, County of","R1J",1
"E06000019","Herefordshire, County of","RAE",1
"E06000019","Herefordshire, County of","RJN",1
"E06000019","Herefordshire, County of","RN5",1
"E06000019","Herefordshire, County of","RP5",1
"E06000019","Herefordshire, County of","RWD",1
"E06000019","Herefordshire, County of","RC1",1
"E06000019","Herefordshire, County of","RJ1",1
"E06000019","Herefordshire, County of","RJ2",2
"E06000019","Herefordshire, County of","RJL",1
"E06000019","Herefordshire, County of","RQW",1
"E06000019","Herefordshire, County of","RR8",1
"E06000019","Herefordshire, County of","RWG",1
"E06000019","Herefordshire, County of","RWJ",1
"E06000019","Herefordshire, County of","RBL",1
"E06000019","Herefordshire, County of","RD8",1
"E06000019","Herefordshire, County of","RFF",1
"E06000019","Herefordshire, County of","RHQ",1
"E06000019","Herefordshire, County of","RNS",1
"E06000019","Herefordshire, County of","RVN",1
"E06000019","Herefordshire, County of","RWH",1
"E06000019","Herefordshire, County of","RXR",1
"E06000019","Herefordshire, County of","RM1",1
"E06000019","Herefordshire, County of","RNL",1
"E06000019","Herefordshire, County of","RTF",1
"E06000019","Herefordshire, County of","RW6",1
"E06000019","Herefordshire, County of","RXT",1
"E06000019","Herefordshire, County of","R1D",1
"E06000019","Herefordshire, County of","RJ6",1
"E06000019","Herefordshire, County of","RLT",1
"E06000019","Herefordshire, County of","RQX",1
"E06000019","Herefordshire, County of","RT3",1
"E06000020","Telford and Wrekin","RXW",20507
"E06000020","Telford and Wrekin","RRE",244
"E06000020","Telford and Wrekin","RJE",242
"E06000020","Telford and Wrekin","RL4",159
"E06000020","Telford and Wrekin","R1D",98
"E06000020","Telford and Wrekin","RRK",106
"E06000020","Telford and Wrekin","RQ3",51
"E06000020","Telford and Wrekin","RBS",22
"E06000020","Telford and Wrekin","RL1",18
"E06000020","Telford and Wrekin","RBK",17
"E06000020","Telford and Wrekin","RNA",14
"E06000020","Telford and Wrekin","RWP",11
"E06000020","Telford and Wrekin","RXK",19
"E06000020","Telford and Wrekin","RX1",11
"E06000020","Telford and Wrekin","REF",10
"E06000020","Telford and Wrekin","RLQ",8
"E06000020","Telford and Wrekin","RJR",8
"E06000020","Telford and Wrekin","R0A",7
"E06000020","Telford and Wrekin","RH8",6
"E06000020","Telford and Wrekin","RBT",6
"E06000020","Telford and Wrekin","RKB",6
"E06000020","Telford and Wrekin","RWD",5
"E06000020","Telford and Wrekin","RA9",5
"E06000020","Telford and Wrekin","RLY",5
"E06000020","Telford and Wrekin","RWE",5
"E06000020","Telford and Wrekin","RBL",4
"E06000020","Telford and Wrekin","RHM",4
"E06000020","Telford and Wrekin","RNL",4
"E06000020","Telford and Wrekin","RXF",4
"E06000020","Telford and Wrekin","RXP",4
"E06000020","Telford and Wrekin","RYJ",4
"E06000020","Telford and Wrekin","RVV",4
"E06000020","Telford and Wrekin","REM",5
"E06000020","Telford and Wrekin","RBA",3
"E06000020","Telford and Wrekin","RTX",3
"E06000020","Telford and Wrekin","RXH",3
"E06000020","Telford and Wrekin","TAJ",3
"E06000020","Telford and Wrekin","RHU",3
"E06000020","Telford and Wrekin","RTF",3
"E06000020","Telford and Wrekin","RTG",5
"E06000020","Telford and Wrekin","R1H",3
"E06000020","Telford and Wrekin","RAJ",3
"E06000020","Telford and Wrekin","RVJ",3
"E06000020","Telford and Wrekin","RBZ",3
"E06000020","Telford and Wrekin","RDU",3
"E06000020","Telford and Wrekin","RN5",3
"E06000020","Telford and Wrekin","RD8",3
"E06000020","Telford and Wrekin","RR8",3
"E06000020","Telford and Wrekin","RTD",3
"E06000020","Telford and Wrekin","RTH",3
"E06000020","Telford and Wrekin","RCF",2
"E06000020","Telford and Wrekin","RQM",2
"E06000020","Telford and Wrekin","RFS",2
"E06000020","Telford and Wrekin","RVY",2
"E06000020","Telford and Wrekin","RXL",2
"E06000020","Telford and Wrekin","RCB",2
"E06000020","Telford and Wrekin","RGT",2
"E06000020","Telford and Wrekin","RVW",2
"E06000020","Telford and Wrekin","RJZ",2
"E06000020","Telford and Wrekin","RWG",2
"E06000020","Telford and Wrekin","RDZ",2
"E06000020","Telford and Wrekin","RJC",2
"E06000020","Telford and Wrekin","RWA",2
"E06000020","Telford and Wrekin","RWF",2
"E06000020","Telford and Wrekin","RAS",2
"E06000020","Telford and Wrekin","RBD",2
"E06000020","Telford and Wrekin","RM1",2
"E06000020","Telford and Wrekin","RM3",2
"E06000020","Telford and Wrekin","RNS",2
"E06000020","Telford and Wrekin","RTE",2
"E06000020","Telford and Wrekin","RXN",2
"E06000020","Telford and Wrekin","RBV",2
"E06000020","Telford and Wrekin","RCX",2
"E06000020","Telford and Wrekin","RXQ",2
"E06000020","Telford and Wrekin","RFR",1
"E06000020","Telford and Wrekin","RN3",1
"E06000020","Telford and Wrekin","RT3",1
"E06000020","Telford and Wrekin","RAX",1
"E06000020","Telford and Wrekin","RCU",1
"E06000020","Telford and Wrekin","RDD",2
"E06000020","Telford and Wrekin","RK9",1
"E06000020","Telford and Wrekin","RQX",1
"E06000020","Telford and Wrekin","RHW",1
"E06000020","Telford and Wrekin","RWW",1
"E06000020","Telford and Wrekin","RA7",1
"E06000020","Telford and Wrekin","RCD",1
"E06000020","Telford and Wrekin","RJ1",1
"E06000020","Telford and Wrekin","RRV",1
"E06000020","Telford and Wrekin","R1K",1
"E06000020","Telford and Wrekin","RDE",1
"E06000020","Telford and Wrekin","RQW",1
"E06000020","Telford and Wrekin","RRF",1
"E06000020","Telford and Wrekin","RAL",1
"E06000020","Telford and Wrekin","RGR",1
"E06000020","Telford and Wrekin","RJ6",1
"E06000020","Telford and Wrekin","RJN",1
"E06000020","Telford and Wrekin","RK5",1
"E06000020","Telford and Wrekin","RBN",1
"E06000020","Telford and Wrekin","RET",1
"E06000020","Telford and Wrekin","RQ8",1
"E06000020","Telford and Wrekin","RYR",1
"E06000020","Telford and Wrekin","RA3",1
"E06000020","Telford and Wrekin","RJ7",1
"E06000021","Stoke-on-Trent","RJE",43043
"E06000021","Stoke-on-Trent","RLY",714
"E06000021","Stoke-on-Trent","RRE",283
"E06000021","Stoke-on-Trent","RBT",92
"E06000021","Stoke-on-Trent","RBS",64
"E06000021","Stoke-on-Trent","RRK",57
"E06000021","Stoke-on-Trent","RQ3",39
"E06000021","Stoke-on-Trent","R0A",29
"E06000021","Stoke-on-Trent","RTG",27
"E06000021","Stoke-on-Trent","RKB",15
"E06000021","Stoke-on-Trent","RJN",15
"E06000021","Stoke-on-Trent","RXL",13
"E06000021","Stoke-on-Trent","RL4",13
"E06000021","Stoke-on-Trent","REF",12
"E06000021","Stoke-on-Trent","RXW",19
"E06000021","Stoke-on-Trent","RBV",12
"E06000021","Stoke-on-Trent","RHQ",12
"E06000021","Stoke-on-Trent","RWJ",11
"E06000021","Stoke-on-Trent","RW6",8
"E06000021","Stoke-on-Trent","RJR",8
"E06000021","Stoke-on-Trent","RM3",8
"E06000021","Stoke-on-Trent","RX1",8
"E06000021","Stoke-on-Trent","RWE",7
"E06000021","Stoke-on-Trent","RC9",7
"E06000021","Stoke-on-Trent","RTH",6
"E06000021","Stoke-on-Trent","RWD",6
"E06000021","Stoke-on-Trent","R1H",6
"E06000021","Stoke-on-Trent","RXK",16
"E06000021","Stoke-on-Trent","RK5",5
"E06000021","Stoke-on-Trent","RLQ",5
"E06000021","Stoke-on-Trent","REM",6
"E06000021","Stoke-on-Trent","RQM",5
"E06000021","Stoke-on-Trent","RXC",5
"E06000021","Stoke-on-Trent","RJC",5
"E06000021","Stoke-on-Trent","RA9",5
"E06000021","Stoke-on-Trent","RWW",5
"E06000021","Stoke-on-Trent","RRV",4
"E06000021","Stoke-on-Trent","RBA",4
"E06000021","Stoke-on-Trent","RCB",4
"E06000021","Stoke-on-Trent","RD1",4
"E06000021","Stoke-on-Trent","RGM",4
"E06000021","Stoke-on-Trent","RBN",4
"E06000021","Stoke-on-Trent","RGN",4
"E06000021","Stoke-on-Trent","RXN",4
"E06000021","Stoke-on-Trent","RAE",4
"E06000021","Stoke-on-Trent","RBZ",3
"E06000021","Stoke-on-Trent","RVR",3
"E06000021","Stoke-on-Trent","RWP",3
"E06000021","Stoke-on-Trent","RXQ",3
"E06000021","Stoke-on-Trent","REP",3
"E06000021","Stoke-on-Trent","RTF",3
"E06000021","Stoke-on-Trent","RXT",3
"E06000021","Stoke-on-Trent","RBK",3
"E06000021","Stoke-on-Trent","RLT",3
"E06000021","Stoke-on-Trent","RN3",3
"E06000021","Stoke-on-Trent","RR8",3
"E06000021","Stoke-on-Trent","RAX",3
"E06000021","Stoke-on-Trent","RJ1",3
"E06000021","Stoke-on-Trent","RTR",3
"E06000021","Stoke-on-Trent","RYJ",3
"E06000021","Stoke-on-Trent","RGR",2
"E06000021","Stoke-on-Trent","RVN",2
"E06000021","Stoke-on-Trent","RNL",2
"E06000021","Stoke-on-Trent","RNS",2
"E06000021","Stoke-on-Trent","RVV",2
"E06000021","Stoke-on-Trent","RBL",2
"E06000021","Stoke-on-Trent","RCX",2
"E06000021","Stoke-on-Trent","RDE",2
"E06000021","Stoke-on-Trent","RTX",2
"E06000021","Stoke-on-Trent","RVY",2
"E06000021","Stoke-on-Trent","RA7",2
"E06000021","Stoke-on-Trent","RD3",2
"E06000021","Stoke-on-Trent","RF4",2
"E06000021","Stoke-on-Trent","RGP",2
"E06000021","Stoke-on-Trent","RKE",2
"E06000021","Stoke-on-Trent","RN7",2
"E06000021","Stoke-on-Trent","RXA",2
"E06000021","Stoke-on-Trent","RBQ",2
"E06000021","Stoke-on-Trent","RDU",2
"E06000021","Stoke-on-Trent","RDZ",2
"E06000021","Stoke-on-Trent","RXF",2
"E06000021","Stoke-on-Trent","RAL",2
"E06000021","Stoke-on-Trent","RJL",2
"E06000021","Stoke-on-Trent","RK9",2
"E06000021","Stoke-on-Trent","RMP",2
"E06000021","Stoke-on-Trent","RNA",2
"E06000021","Stoke-on-Trent","RH8",2
"E06000021","Stoke-on-Trent","RNQ",2
"E06000021","Stoke-on-Trent","RTE",2
"E06000021","Stoke-on-Trent","RTV",2
"E06000021","Stoke-on-Trent","RWG",2
"E06000021","Stoke-on-Trent","RP5",2
"E06000021","Stoke-on-Trent","RTP",1
"E06000021","Stoke-on-Trent","R1K",1
"E06000021","Stoke-on-Trent","RA3",1
"E06000021","Stoke-on-Trent","RCU",1
"E06000021","Stoke-on-Trent","RM1",1
"E06000021","Stoke-on-Trent","RMC",1
"E06000021","Stoke-on-Trent","RT3",1
"E06000021","Stoke-on-Trent","RWH",1
"E06000021","Stoke-on-Trent","RAS",1
"E06000021","Stoke-on-Trent","RGT",1
"E06000021","Stoke-on-Trent","RTD",1
"E06000021","Stoke-on-Trent","RYR",1
"E06000021","Stoke-on-Trent","TAJ",1
"E06000021","Stoke-on-Trent","RAJ",1
"E06000021","Stoke-on-Trent","RD8",1
"E06000021","Stoke-on-Trent","RHU",1
"E06000021","Stoke-on-Trent","RWK",1
"E06000021","Stoke-on-Trent","RCF",1
"E06000021","Stoke-on-Trent","RDD",1
"E06000021","Stoke-on-Trent","RFS",1
"E06000021","Stoke-on-Trent","RJ7",1
"E06000021","Stoke-on-Trent","RQ8",1
"E06000021","Stoke-on-Trent","RVJ",1
"E06000021","Stoke-on-Trent","R1A",1
"E06000021","Stoke-on-Trent","R0B",1
"E06000021","Stoke-on-Trent","RHW",1
"E06000021","Stoke-on-Trent","RJ2",1
"E06000021","Stoke-on-Trent","RJZ",1
"E06000021","Stoke-on-Trent","RN5",1
"E06000021","Stoke-on-Trent","RQW",1
"E06000021","Stoke-on-Trent","RWA",1
"E06000021","Stoke-on-Trent","RBD",1
"E06000021","Stoke-on-Trent","RFR",1
"E06000021","Stoke-on-Trent","RQX",1
"E06000021","Stoke-on-Trent","RR7",1
"E06000022","Bath and North East Somerset","RD1",16208
"E06000022","Bath and North East Somerset","RA7",1018
"E06000022","Bath and North East Somerset","RVJ",545
"E06000022","Bath and North East Somerset","RVN",116
"E06000022","Bath and North East Somerset","RBA",26
"E06000022","Bath and North East Somerset","REF",21
"E06000022","Bath and North East Somerset","RYJ",21
"E06000022","Bath and North East Somerset","RNZ",21
"E06000022","Bath and North East Somerset","RA3",21
"E06000022","Bath and North East Somerset","RTE",20
"E06000022","Bath and North East Somerset","NQT",22
"E06000022","Bath and North East Somerset","RN3",16
"E06000022","Bath and North East Somerset","RA4",15
"E06000022","Bath and North East Somerset","RH8",15
"E06000022","Bath and North East Somerset","RBD",13
"E06000022","Bath and North East Somerset","RA9",13
"E06000022","Bath and North East Somerset","RTH",9
"E06000022","Bath and North East Somerset","RJ1",9
"E06000022","Bath and North East Somerset","RBZ",8
"E06000022","Bath and North East Somerset","R0A",8
"E06000022","Bath and North East Somerset","RQM",7
"E06000022","Bath and North East Somerset","RJC",7
"E06000022","Bath and North East Somerset","RHW",7
"E06000022","Bath and North East Somerset","RK9",7
"E06000022","Bath and North East Somerset","RRK",13
"E06000022","Bath and North East Somerset","RDZ",7
"E06000022","Bath and North East Somerset","RDU",5
"E06000022","Bath and North East Somerset","RNU",5
"E06000022","Bath and North East Somerset","RD3",5
"E06000022","Bath and North East Somerset","RHM",5
"E06000022","Bath and North East Somerset","RJ7",5
"E06000022","Bath and North East Somerset","RH5",5
"E06000022","Bath and North East Somerset","RN5",5
"E06000022","Bath and North East Somerset","R1H",4
"E06000022","Bath and North East Somerset","RAX",4
"E06000022","Bath and North East Somerset","RJZ",4
"E06000022","Bath and North East Somerset","RAL",4
"E06000022","Bath and North East Somerset","REM",5
"E06000022","Bath and North East Somerset","RT3",4
"E06000022","Bath and North East Somerset","RVR",4
"E06000022","Bath and North East Somerset","RTP",4
"E06000022","Bath and North East Somerset","RXQ",4
"E06000022","Bath and North East Somerset","RNL",3
"E06000022","Bath and North East Somerset","RXL",3
"E06000022","Bath and North East Somerset","R1K",3
"E06000022","Bath and North East Somerset","RA2",3
"E06000022","Bath and North East Somerset","RWH",3
"E06000022","Bath and North East Somerset","RGN",3
"E06000022","Bath and North East Somerset","RHU",3
"E06000022","Bath and North East Somerset","RYR",3
"E06000022","Bath and North East Somerset","RTX",2
"E06000022","Bath and North East Somerset","RP4",2
"E06000022","Bath and North East Somerset","RTK",2
"E06000022","Bath and North East Somerset","RKB",2
"E06000022","Bath and North East Somerset","RXP",2
"E06000022","Bath and North East Somerset","RCD",2
"E06000022","Bath and North East Somerset","RLQ",2
"E06000022","Bath and North East Somerset","RWP",2
"E06000022","Bath and North East Somerset","RXW",3
"E06000022","Bath and North East Somerset","RRV",2
"E06000022","Bath and North East Somerset","RD8",2
"E06000022","Bath and North East Somerset","RDY",2
"E06000022","Bath and North East Somerset","RGT",2
"E06000022","Bath and North East Somerset","RAP",1
"E06000022","Bath and North East Somerset","RJ2",1
"E06000022","Bath and North East Somerset","RPY",1
"E06000022","Bath and North East Somerset","RQX",1
"E06000022","Bath and North East Somerset","RAS",1
"E06000022","Bath and North East Somerset","RQW",1
"E06000022","Bath and North East Somerset","RRE",1
"E06000022","Bath and North East Somerset","RWW",1
"E06000022","Bath and North East Somerset","RBK",1
"E06000022","Bath and North East Somerset","RC1",1
"E06000022","Bath and North East Somerset","RGP",1
"E06000022","Bath and North East Somerset","RXH",1
"E06000022","Bath and North East Somerset","RBL",1
"E06000022","Bath and North East Somerset","RBT",1
"E06000022","Bath and North East Somerset","R0B",2
"E06000022","Bath and North East Somerset","RP6",1
"E06000022","Bath and North East Somerset","RTG",1
"E06000022","Bath and North East Somerset","RWG",1
"E06000022","Bath and North East Somerset","RWY",1
"E06000022","Bath and North East Somerset","RX1",1
"E06000022","Bath and North East Somerset","RYV",1
"E06000022","Bath and North East Somerset","RJN",1
"E06000022","Bath and North East Somerset","RM1",1
"E06000022","Bath and North East Somerset","RP5",1
"E06000022","Bath and North East Somerset","RWD",1
"E06000022","Bath and North East Somerset","RXN",1
"E06000022","Bath and North East Somerset","RC9",1
"E06000022","Bath and North East Somerset","RDE",1
"E06000022","Bath and North East Somerset","RJE",1
"E06000022","Bath and North East Somerset","RJR",1
"E06000022","Bath and North East Somerset","RNS",1
"E06000022","Bath and North East Somerset","RQ8",1
"E06000022","Bath and North East Somerset","RVY",1
"E06000022","Bath and North East Somerset","RWK",1
"E06000022","Bath and North East Somerset","RXK",1
"E06000022","Bath and North East Somerset","RL4",1
"E06000022","Bath and North East Somerset","RLT",1
"E06000022","Bath and North East Somerset","RQ3",1
"E06000022","Bath and North East Somerset","RTD",1
"E06000022","Bath and North East Somerset","RTF",1
"E06000022","Bath and North East Somerset","RAJ",1
"E06000022","Bath and North East Somerset","RCB",1
"E06000022","Bath and North East Somerset","RNA",1
"E06000022","Bath and North East Somerset","RR8",1
"E06000022","Bath and North East Somerset","RVV",1
"E06000023","Bristol, City of","RA7",27633
"E06000023","Bristol, City of","RVJ",21182
"E06000023","Bristol, City of","RVN",344
"E06000023","Bristol, City of","RD1",223
"E06000023","Bristol, City of","RA3",78
"E06000023","Bristol, City of","RTE",62
"E06000023","Bristol, City of","RBA",62
"E06000023","Bristol, City of","REF",52
"E06000023","Bristol, City of","RA9",35
"E06000023","Bristol, City of","RTH",34
"E06000023","Bristol, City of","RH8",32
"E06000023","Bristol, City of","RN3",30
"E06000023","Bristol, City of","RA4",29
"E06000023","Bristol, City of","R1H",28
"E06000023","Bristol, City of","RK9",26
"E06000023","Bristol, City of","RBZ",23
"E06000023","Bristol, City of","RBD",21
"E06000023","Bristol, City of","RJ7",19
"E06000023","Bristol, City of","RYJ",16
"E06000023","Bristol, City of","RQM",16
"E06000023","Bristol, City of","RHW",14
"E06000023","Bristol, City of","RJ1",13
"E06000023","Bristol, City of","RT3",12
"E06000023","Bristol, City of","RRK",17
"E06000023","Bristol, City of","RD3",12
"E06000023","Bristol, City of","RRV",12
"E06000023","Bristol, City of","RDU",11
"E06000023","Bristol, City of","RNZ",10
"E06000023","Bristol, City of","R1K",9
"E06000023","Bristol, City of","RHU",9
"E06000023","Bristol, City of","RGT",9
"E06000023","Bristol, City of","RLQ",9
"E06000023","Bristol, City of","R0A",9
"E06000023","Bristol, City of","RTP",9
"E06000023","Bristol, City of","RDZ",9
"E06000023","Bristol, City of","RJC",9
"E06000023","Bristol, City of","RJZ",8
"E06000023","Bristol, City of","RX1",8
"E06000023","Bristol, City of","RVV",7
"E06000023","Bristol, City of","RWH",7
"E06000023","Bristol, City of","RHM",7
"E06000023","Bristol, City of","RXQ",7
"E06000023","Bristol, City of","RKB",7
"E06000023","Bristol, City of","RN5",7
"E06000023","Bristol, City of","RAL",7
"E06000023","Bristol, City of","REM",9
"E06000023","Bristol, City of","RWP",6
"E06000023","Bristol, City of","RJ2",9
"E06000023","Bristol, City of","RYR",6
"E06000023","Bristol, City of","RAX",6
"E06000023","Bristol, City of","RTX",6
"E06000023","Bristol, City of","RXL",5
"E06000023","Bristol, City of","RDE",5
"E06000023","Bristol, City of","RWE",5
"E06000023","Bristol, City of","RXK",6
"E06000023","Bristol, City of","RD8",5
"E06000023","Bristol, City of","RHQ",5
"E06000023","Bristol, City of","RA2",5
"E06000023","Bristol, City of","RCD",5
"E06000023","Bristol, City of","RWG",5
"E06000023","Bristol, City of","RJE",5
"E06000023","Bristol, City of","RM1",5
"E06000023","Bristol, City of","RTG",6
"E06000023","Bristol, City of","RAP",4
"E06000023","Bristol, City of","RBL",4
"E06000023","Bristol, City of","RXR",5
"E06000023","Bristol, City of","RQ8",4
"E06000023","Bristol, City of","RQX",4
"E06000023","Bristol, City of","RAS",4
"E06000023","Bristol, City of","RQW",4
"E06000023","Bristol, City of","RGN",3
"E06000023","Bristol, City of","RAE",3
"E06000023","Bristol, City of","RKE",3
"E06000023","Bristol, City of","RC9",3
"E06000023","Bristol, City of","RCF",3
"E06000023","Bristol, City of","RW6",3
"E06000023","Bristol, City of","R1F",3
"E06000023","Bristol, City of","RBT",3
"E06000023","Bristol, City of","RXH",3
"E06000023","Bristol, City of","RNL",3
"E06000023","Bristol, City of","RVR",3
"E06000023","Bristol, City of","RXW",3
"E06000023","Bristol, City of","RBK",3
"E06000023","Bristol, City of","RTF",3
"E06000023","Bristol, City of","RCB",2
"E06000023","Bristol, City of","RFS",2
"E06000023","Bristol, City of","RH5",2
"E06000023","Bristol, City of","RJ6",2
"E06000023","Bristol, City of","RP6",2
"E06000023","Bristol, City of","RWX",2
"E06000023","Bristol, City of","RDD",2
"E06000023","Bristol, City of","RW5",2
"E06000023","Bristol, City of","RWD",2
"E06000023","Bristol, City of","RWF",2
"E06000023","Bristol, City of","RF4",2
"E06000023","Bristol, City of","RNA",2
"E06000023","Bristol, City of","RNU",2
"E06000023","Bristol, City of","RTQ",2
"E06000023","Bristol, City of","RXC",2
"E06000023","Bristol, City of","RGP",2
"E06000023","Bristol, City of","RCX",2
"E06000023","Bristol, City of","R0B",4
"E06000023","Bristol, City of","RK5",2
"E06000023","Bristol, City of","RM3",2
"E06000023","Bristol, City of","RTK",2
"E06000023","Bristol, City of","RVY",2
"E06000023","Bristol, City of","RWA",2
"E06000023","Bristol, City of","RXF",2
"E06000023","Bristol, City of","RXN",2
"E06000023","Bristol, City of","RBS",1
"E06000023","Bristol, City of","RC1",1
"E06000023","Bristol, City of","RL4",1
"E06000023","Bristol, City of","RTD",1
"E06000023","Bristol, City of","RGR",1
"E06000023","Bristol, City of","RNQ",1
"E06000023","Bristol, City of","RR8",1
"E06000023","Bristol, City of","RDY",1
"E06000023","Bristol, City of","RPA",1
"E06000023","Bristol, City of","RW4",1
"E06000023","Bristol, City of","RJR",1
"E06000023","Bristol, City of","RXP",1
"E06000023","Bristol, City of","RN7",1
"E06000023","Bristol, City of","RNS",1
"E06000023","Bristol, City of","RP5",1
"E06000023","Bristol, City of","RTR",1
"E06000023","Bristol, City of","RWJ",1
"E06000023","Bristol, City of","RBN",1
"E06000023","Bristol, City of","R1A",1
"E06000023","Bristol, City of","RJL",1
"E06000023","Bristol, City of","RJN",1
"E06000023","Bristol, City of","RR7",1
"E06000023","Bristol, City of","RWK",1
"E06000023","Bristol, City of","RPC",1
"E06000023","Bristol, City of","RQ3",1
"E06000023","Bristol, City of","RW1",1
"E06000024","North Somerset","RA3",11057
"E06000024","North Somerset","RA7",7296
"E06000024","North Somerset","RVJ",5219
"E06000024","North Somerset","RBA",265
"E06000024","North Somerset","RVN",185
"E06000024","North Somerset","RD1",94
"E06000024","North Somerset","RTE",28
"E06000024","North Somerset","REF",28
"E06000024","North Somerset","RA4",22
"E06000024","North Somerset","RK9",19
"E06000024","North Somerset","RH8",19
"E06000024","North Somerset","RBZ",12
"E06000024","North Somerset","RYJ",12
"E06000024","North Somerset","RDU",10
"E06000024","North Somerset","RN3",10
"E06000024","North Somerset","RA9",9
"E06000024","North Somerset","RBD",7
"E06000024","North Somerset","RTH",6
"E06000024","North Somerset","RD3",6
"E06000024","North Somerset","RJ1",6
"E06000024","North Somerset","RWE",6
"E06000024","North Somerset","RWH",6
"E06000024","North Somerset","RAL",6
"E06000024","North Somerset","RLQ",5
"E06000024","North Somerset","RJE",5
"E06000024","North Somerset","RQM",5
"E06000024","North Somerset","RGT",5
"E06000024","North Somerset","RAS",5
"E06000024","North Somerset","RNZ",5
"E06000024","North Somerset","RCB",4
"E06000024","North Somerset","RR8",4
"E06000024","North Somerset","RHU",4
"E06000024","North Somerset","RHM",4
"E06000024","North Somerset","RRK",7
"E06000024","North Somerset","RTG",5
"E06000024","North Somerset","RXC",4
"E06000024","North Somerset","R1H",4
"E06000024","North Somerset","RCX",3
"E06000024","North Somerset","RBN",3
"E06000024","North Somerset","RD8",3
"E06000024","North Somerset","RH5",3
"E06000024","North Somerset","RWF",3
"E06000024","North Somerset","RJZ",3
"E06000024","North Somerset","R1F",3
"E06000024","North Somerset","RFS",2
"E06000024","North Somerset","REM",4
"E06000024","North Somerset","RT3",2
"E06000024","North Somerset","RDZ",2
"E06000024","North Somerset","RNQ",2
"E06000024","North Somerset","RTX",2
"E06000024","North Somerset","RTK",2
"E06000024","North Somerset","RTP",2
"E06000024","North Somerset","R1K",2
"E06000024","North Somerset","RKB",2
"E06000024","North Somerset","RN5",2
"E06000024","North Somerset","RNS",2
"E06000024","North Somerset","RXQ",2
"E06000024","North Somerset","RHW",2
"E06000024","North Somerset","RNA",2
"E06000024","North Somerset","RJC",2
"E06000024","North Somerset","RM1",2
"E06000024","North Somerset","RQ3",2
"E06000024","North Somerset","RWY",2
"E06000024","North Somerset","RVV",2
"E06000024","North Somerset","RXP",2
"E06000024","North Somerset","RMC",1
"E06000024","North Somerset","RXW",2
"E06000024","North Somerset","R1A",1
"E06000024","North Somerset","RQW",1
"E06000024","North Somerset","RAX",1
"E06000024","North Somerset","RBK",1
"E06000024","North Somerset","RPY",1
"E06000024","North Somerset","RTF",1
"E06000024","North Somerset","RJ8",1
"E06000024","North Somerset","RXL",1
"E06000024","North Somerset","RAE",1
"E06000024","North Somerset","RBL",1
"E06000024","North Somerset","R0B",1
"E06000024","North Somerset","RGN",1
"E06000024","North Somerset","RN7",1
"E06000024","North Somerset","RPC",1
"E06000024","North Somerset","RVW",1
"E06000024","North Somerset","RXH",1
"E06000024","North Somerset","RBT",1
"E06000024","North Somerset","RDD",1
"E06000024","North Somerset","RJ2",1
"E06000024","North Somerset","NQT",1
"E06000024","North Somerset","RDY",1
"E06000024","North Somerset","RFR",1
"E06000024","North Somerset","RGP",1
"E06000024","North Somerset","RNL",1
"E06000024","North Somerset","RQ8",1
"E06000024","North Somerset","RWG",1
"E06000024","North Somerset","RWP",1
"E06000024","North Somerset","TAJ",1
"E06000025","South Gloucestershire","RVJ",24137
"E06000025","South Gloucestershire","RA7",5073
"E06000025","South Gloucestershire","RD1",1574
"E06000025","South Gloucestershire","RTE",225
"E06000025","South Gloucestershire","RVN",101
"E06000025","South Gloucestershire","REF",39
"E06000025","South Gloucestershire","RA3",31
"E06000025","South Gloucestershire","RBA",26
"E06000025","South Gloucestershire","RN3",26
"E06000025","South Gloucestershire","RTH",23
"E06000025","South Gloucestershire","RH8",22
"E06000025","South Gloucestershire","RA9",20
"E06000025","South Gloucestershire","RBZ",20
"E06000025","South Gloucestershire","NLX",12
"E06000025","South Gloucestershire","RBD",11
"E06000025","South Gloucestershire","RD3",10
"E06000025","South Gloucestershire","RNZ",9
"E06000025","South Gloucestershire","RK9",9
"E06000025","South Gloucestershire","RA4",9
"E06000025","South Gloucestershire","RRK",14
"E06000025","South Gloucestershire","RJZ",7
"E06000025","South Gloucestershire","RQM",7
"E06000025","South Gloucestershire","RWP",7
"E06000025","South Gloucestershire","RAX",6
"E06000025","South Gloucestershire","R1H",5
"E06000025","South Gloucestershire","RJ1",5
"E06000025","South Gloucestershire","RHU",5
"E06000025","South Gloucestershire","RLQ",5
"E06000025","South Gloucestershire","RHW",4
"E06000025","South Gloucestershire","RN5",4
"E06000025","South Gloucestershire","R1F",4
"E06000025","South Gloucestershire","RXK",4
"E06000025","South Gloucestershire","R0B",4
"E06000025","South Gloucestershire","RVR",4
"E06000025","South Gloucestershire","RTX",4
"E06000025","South Gloucestershire","RHM",4
"E06000025","South Gloucestershire","RRV",5
"E06000025","South Gloucestershire","RJC",4
"E06000025","South Gloucestershire","RYJ",4
"E06000025","South Gloucestershire","RM3",3
"E06000025","South Gloucestershire","R0A",3
"E06000025","South Gloucestershire","RBL",3
"E06000025","South Gloucestershire","RT3",3
"E06000025","South Gloucestershire","RXH",3
"E06000025","South Gloucestershire","RXQ",3
"E06000025","South Gloucestershire","R1K",3
"E06000025","South Gloucestershire","RGT",3
"E06000025","South Gloucestershire","RKB",3
"E06000025","South Gloucestershire","RD8",3
"E06000025","South Gloucestershire","RNA",3
"E06000025","South Gloucestershire","REM",3
"E06000025","South Gloucestershire","RYR",3
"E06000025","South Gloucestershire","RAS",3
"E06000025","South Gloucestershire","RDE",3
"E06000025","South Gloucestershire","RNL",3
"E06000025","South Gloucestershire","RTD",3
"E06000025","South Gloucestershire","RX1",3
"E06000025","South Gloucestershire","RWG",2
"E06000025","South Gloucestershire","RDD",3
"E06000025","South Gloucestershire","RGP",2
"E06000025","South Gloucestershire","RTG",3
"E06000025","South Gloucestershire","RAE",2
"E06000025","South Gloucestershire","RXL",2
"E06000025","South Gloucestershire","RH5",2
"E06000025","South Gloucestershire","RXP",2
"E06000025","South Gloucestershire","RA2",2
"E06000025","South Gloucestershire","RDU",2
"E06000025","South Gloucestershire","RN7",2
"E06000025","South Gloucestershire","RDZ",2
"E06000025","South Gloucestershire","RTK",2
"E06000025","South Gloucestershire","RTP",2
"E06000025","South Gloucestershire","RXC",2
"E06000025","South Gloucestershire","RBT",2
"E06000025","South Gloucestershire","RXW",2
"E06000025","South Gloucestershire","R1J",2
"E06000025","South Gloucestershire","RCB",2
"E06000025","South Gloucestershire","RGN",2
"E06000025","South Gloucestershire","RQW",2
"E06000025","South Gloucestershire","RRF",2
"E06000025","South Gloucestershire","RCX",1
"E06000025","South Gloucestershire","RDY",1
"E06000025","South Gloucestershire","RF4",1
"E06000025","South Gloucestershire","RMY",1
"E06000025","South Gloucestershire","RNU",1
"E06000025","South Gloucestershire","RVW",1
"E06000025","South Gloucestershire","RWJ",1
"E06000025","South Gloucestershire","RWX",1
"E06000025","South Gloucestershire","RAL",1
"E06000025","South Gloucestershire","RCF",1
"E06000025","South Gloucestershire","RJ6",1
"E06000025","South Gloucestershire","RL4",1
"E06000025","South Gloucestershire","RQ3",1
"E06000025","South Gloucestershire","RWA",1
"E06000025","South Gloucestershire","RC1",1
"E06000025","South Gloucestershire","RJ2",1
"E06000025","South Gloucestershire","RMC",1
"E06000025","South Gloucestershire","RQ8",1
"E06000025","South Gloucestershire","RJR",1
"E06000025","South Gloucestershire","RTF",1
"E06000025","South Gloucestershire","RVV",1
"E06000025","South Gloucestershire","RJE",1
"E06000025","South Gloucestershire","RWD",1
"E06000025","South Gloucestershire","RXR",1
"E06000025","South Gloucestershire","RPY",1
"E06000025","South Gloucestershire","RWF",1
"E06000025","South Gloucestershire","RNS",1
"E06000025","South Gloucestershire","RPA",1
"E06000025","South Gloucestershire","RR8",1
"E06000025","South Gloucestershire","RWH",1
"E06000026","Plymouth","RK9",28512
"E06000026","Plymouth","RA7",91
"E06000026","Plymouth","REF",67
"E06000026","Plymouth","RA9",59
"E06000026","Plymouth","RH8",54
"E06000026","Plymouth","RBA",35
"E06000026","Plymouth","RVJ",23
"E06000026","Plymouth","RTE",17
"E06000026","Plymouth","RBZ",13
"E06000026","Plymouth","RHM",12
"E06000026","Plymouth","RHU",11
"E06000026","Plymouth","RRK",22
"E06000026","Plymouth","RA4",11
"E06000026","Plymouth","RXQ",11
"E06000026","Plymouth","RD1",11
"E06000026","Plymouth","RH5",10
"E06000026","Plymouth","RTH",9
"E06000026","Plymouth","RYJ",8
"E06000026","Plymouth","R1K",7
"E06000026","Plymouth","RDU",7
"E06000026","Plymouth","RBD",7
"E06000026","Plymouth","NR5",8
"E06000026","Plymouth","RRV",6
"E06000026","Plymouth","RT3",6
"E06000026","Plymouth","RA2",6
"E06000026","Plymouth","RDE",6
"E06000026","Plymouth","RN3",6
"E06000026","Plymouth","RLT",5
"E06000026","Plymouth","RXL",5
"E06000026","Plymouth","RAX",5
"E06000026","Plymouth","RHW",5
"E06000026","Plymouth","RDZ",5
"E06000026","Plymouth","REM",6
"E06000026","Plymouth","RVV",5
"E06000026","Plymouth","RKB",4
"E06000026","Plymouth","RTX",4
"E06000026","Plymouth","RCB",4
"E06000026","Plymouth","RQM",4
"E06000026","Plymouth","RW6",4
"E06000026","Plymouth","RXW",4
"E06000026","Plymouth","RD3",4
"E06000026","Plymouth","RN5",4
"E06000026","Plymouth","RAJ",3
"E06000026","Plymouth","RQX",3
"E06000026","Plymouth","RWA",3
"E06000026","Plymouth","R1H",3
"E06000026","Plymouth","RA3",3
"E06000026","Plymouth","RNQ",3
"E06000026","Plymouth","RF4",3
"E06000026","Plymouth","RJE",3
"E06000026","Plymouth","RJZ",3
"E06000026","Plymouth","RWE",3
"E06000026","Plymouth","RJ7",3
"E06000026","Plymouth","RJC",3
"E06000026","Plymouth","RNZ",3
"E06000026","Plymouth","RD8",3
"E06000026","Plymouth","RX1",3
"E06000026","Plymouth","RM1",2
"E06000026","Plymouth","RRE",2
"E06000026","Plymouth","R0A",2
"E06000026","Plymouth","RWW",2
"E06000026","Plymouth","RBT",2
"E06000026","Plymouth","RJ1",2
"E06000026","Plymouth","RVY",2
"E06000026","Plymouth","RXC",2
"E06000026","Plymouth","RHQ",2
"E06000026","Plymouth","RJ6",2
"E06000026","Plymouth","RTF",2
"E06000026","Plymouth","RWF",2
"E06000026","Plymouth","RWH",2
"E06000026","Plymouth","RAE",2
"E06000026","Plymouth","RPC",2
"E06000026","Plymouth","RTP",2
"E06000026","Plymouth","RXN",2
"E06000026","Plymouth","RAS",2
"E06000026","Plymouth","RGP",2
"E06000026","Plymouth","RNS",2
"E06000026","Plymouth","RTG",3
"E06000026","Plymouth","RTK",2
"E06000026","Plymouth","RGR",2
"E06000026","Plymouth","RGT",2
"E06000026","Plymouth","RJR",2
"E06000026","Plymouth","RXH",2
"E06000026","Plymouth","RCF",1
"E06000026","Plymouth","RL4",1
"E06000026","Plymouth","RLQ",1
"E06000026","Plymouth","RQ8",1
"E06000026","Plymouth","RXK",1
"E06000026","Plymouth","RBN",1
"E06000026","Plymouth","RC1",1
"E06000026","Plymouth","RKE",1
"E06000026","Plymouth","RXR",1
"E06000026","Plymouth","RBK",1
"E06000026","Plymouth","RFS",1
"E06000026","Plymouth","RJL",1
"E06000026","Plymouth","RPA",1
"E06000026","Plymouth","RXF",1
"E06000026","Plymouth","RWG",1
"E06000026","Plymouth","R1F",1
"E06000026","Plymouth","RFF",1
"E06000026","Plymouth","RGM",1
"E06000026","Plymouth","RGN",1
"E06000026","Plymouth","RJN",1
"E06000026","Plymouth","RQW",1
"E06000026","Plymouth","RR7",1
"E06000026","Plymouth","RTD",1
"E06000026","Plymouth","RVN",1
"E06000026","Plymouth","RXT",1
"E06000026","Plymouth","RDD",1
"E06000026","Plymouth","RJ8",1
"E06000026","Plymouth","RTQ",1
"E06000026","Plymouth","RAL",1
"E06000026","Plymouth","RAP",1
"E06000026","Plymouth","RBQ",1
"E06000026","Plymouth","RBS",1
"E06000026","Plymouth","RC9",1
"E06000026","Plymouth","RFR",1
"E06000026","Plymouth","RJ2",1
"E06000026","Plymouth","RV3",1
"E06000026","Plymouth","RWY",1
"E06000026","Plymouth","RYR",1
"E06000026","Plymouth","RYV",1
"E06000027","Torbay","RA9",19129
"E06000027","Torbay","RH8",388
"E06000027","Torbay","RK9",220
"E06000027","Torbay","RA7",66
"E06000027","Torbay","RBA",28
"E06000027","Torbay","RVJ",23
"E06000027","Torbay","REF",23
"E06000027","Torbay","RBZ",14
"E06000027","Torbay","RD1",11
"E06000027","Torbay","RJE",8
"E06000027","Torbay","RAS",8
"E06000027","Torbay","RTE",8
"E06000027","Torbay","RJ1",7
"E06000027","Torbay","RYR",7
"E06000027","Torbay","RDU",7
"E06000027","Torbay","RT3",7
"E06000027","Torbay","RN5",7
"E06000027","Torbay","RA3",6
"E06000027","Torbay","RRK",9
"E06000027","Torbay","RA4",6
"E06000027","Torbay","RJZ",6
"E06000027","Torbay","RHM",6
"E06000027","Torbay","RN3",6
"E06000027","Torbay","RGT",5
"E06000027","Torbay","RHW",5
"E06000027","Torbay","RBD",5
"E06000027","Torbay","RRV",6
"E06000027","Torbay","RXH",5
"E06000027","Torbay","RAX",5
"E06000027","Torbay","RWF",5
"E06000027","Torbay","R1K",4
"E06000027","Torbay","RHU",4
"E06000027","Torbay","R1F",4
"E06000027","Torbay","RW6",4
"E06000027","Torbay","RD3",4
"E06000027","Torbay","R1H",3
"E06000027","Torbay","RQ8",3
"E06000027","Torbay","RXK",5
"E06000027","Torbay","RJ2",4
"E06000027","Torbay","RYJ",3
"E06000027","Torbay","RNQ",3
"E06000027","Torbay","RLQ",3
"E06000027","Torbay","RXQ",3
"E06000027","Torbay","RC9",3
"E06000027","Torbay","RTH",3
"E06000027","Torbay","RWP",3
"E06000027","Torbay","RBT",3
"E06000027","Torbay","RDZ",3
"E06000027","Torbay","RQM",2
"E06000027","Torbay","RAL",2
"E06000027","Torbay","RVV",2
"E06000027","Torbay","RBS",2
"E06000027","Torbay","RH5",2
"E06000027","Torbay","RNZ",2
"E06000027","Torbay","RVR",2
"E06000027","Torbay","RBN",2
"E06000027","Torbay","RM1",2
"E06000027","Torbay","RM3",2
"E06000027","Torbay","RA2",2
"E06000027","Torbay","RF4",2
"E06000027","Torbay","RJC",2
"E06000027","Torbay","RNA",2
"E06000027","Torbay","RWV",2
"E06000027","Torbay","RJR",2
"E06000027","Torbay","RWW",2
"E06000027","Torbay","RXC",2
"E06000027","Torbay","RXW",3
"E06000027","Torbay","R0A",2
"E06000027","Torbay","RGN",2
"E06000027","Torbay","RPA",2
"E06000027","Torbay","RTK",2
"E06000027","Torbay","RNS",2
"E06000027","Torbay","RTG",3
"E06000027","Torbay","RVW",2
"E06000027","Torbay","RWA",2
"E06000027","Torbay","RQX",1
"E06000027","Torbay","RVY",1
"E06000027","Torbay","RAP",1
"E06000027","Torbay","RD8",1
"E06000027","Torbay","RP6",1
"E06000027","Torbay","RTP",1
"E06000027","Torbay","RWJ",1
"E06000027","Torbay","RXE",1
"E06000027","Torbay","RXP",1
"E06000027","Torbay","RDD",1
"E06000027","Torbay","RFR",1
"E06000027","Torbay","RMP",1
"E06000027","Torbay","RRJ",1
"E06000027","Torbay","RGM",1
"E06000027","Torbay","RK5",1
"E06000027","Torbay","RKB",1
"E06000027","Torbay","RR7",1
"E06000027","Torbay","RWG",1
"E06000027","Torbay","RBK",1
"E06000027","Torbay","RBQ",1
"E06000027","Torbay","RDE",1
"E06000027","Torbay","RWE",1
"E06000027","Torbay","RWH",1
"E06000027","Torbay","RCX",1
"E06000027","Torbay","RX1",1
"E06000027","Torbay","RJ7",1
"E06000027","Torbay","RJL",1
"E06000027","Torbay","RN7",1
"E06000027","Torbay","RP5",1
"E06000027","Torbay","RWD",1
"E06000028","Bournemouth","RDZ",18188
"E06000028","Bournemouth","RD3",7312
"E06000028","Bournemouth","RDY",242
"E06000028","Bournemouth","RHM",239
"E06000028","Bournemouth","RNZ",109
"E06000028","Bournemouth","RBD",68
"E06000028","Bournemouth","RVJ",27
"E06000028","Bournemouth","RTH",16
"E06000028","Bournemouth","RHU",16
"E06000028","Bournemouth","RYJ",15
"E06000028","Bournemouth","RDU",14
"E06000028","Bournemouth","RJ1",14
"E06000028","Bournemouth","REF",12
"E06000028","Bournemouth","RQM",12
"E06000028","Bournemouth","RYR",11
"E06000028","Bournemouth","RJ7",10
"E06000028","Bournemouth","RHW",9
"E06000028","Bournemouth","RN5",9
"E06000028","Bournemouth","RXH",9
"E06000028","Bournemouth","RAX",9
"E06000028","Bournemouth","RAL",9
"E06000028","Bournemouth","RRV",10
"E06000028","Bournemouth","RD1",8
"E06000028","Bournemouth","R1H",8
"E06000028","Bournemouth","RVR",8
"E06000028","Bournemouth","RBA",8
"E06000028","Bournemouth","RA9",8
"E06000028","Bournemouth","RJZ",8
"E06000028","Bournemouth","RA7",8
"E06000028","Bournemouth","RA4",7
"E06000028","Bournemouth","R1K",6
"E06000028","Bournemouth","RH8",6
"E06000028","Bournemouth","RTP",6
"E06000028","Bournemouth","RJC",6
"E06000028","Bournemouth","RD8",5
"E06000028","Bournemouth","RTE",5
"E06000028","Bournemouth","RWG",5
"E06000028","Bournemouth","RN3",5
"E06000028","Bournemouth","RVV",4
"E06000028","Bournemouth","RP4",4
"E06000028","Bournemouth","RP6",4
"E06000028","Bournemouth","RN7",4
"E06000028","Bournemouth","RNA",4
"E06000028","Bournemouth","RTK",4
"E06000028","Bournemouth","RWF",4
"E06000028","Bournemouth","RWH",4
"E06000028","Bournemouth","RAN",4
"E06000028","Bournemouth","RGT",4
"E06000028","Bournemouth","RQX",4
"E06000028","Bournemouth","RW1",3
"E06000028","Bournemouth","RXC",3
"E06000028","Bournemouth","RA2",3
"E06000028","Bournemouth","RJ2",6
"E06000028","Bournemouth","RJR",3
"E06000028","Bournemouth","RLQ",3
"E06000028","Bournemouth","RXQ",3
"E06000028","Bournemouth","RM1",3
"E06000028","Bournemouth","RNL",3
"E06000028","Bournemouth","RF4",3
"E06000028","Bournemouth","RGN",3
"E06000028","Bournemouth","RC9",3
"E06000028","Bournemouth","RC1",2
"E06000028","Bournemouth","RK9",2
"E06000028","Bournemouth","RKB",2
"E06000028","Bournemouth","RWW",2
"E06000028","Bournemouth","RA3",2
"E06000028","Bournemouth","RAE",2
"E06000028","Bournemouth","RHQ",2
"E06000028","Bournemouth","RLT",2
"E06000028","Bournemouth","RDD",3
"E06000028","Bournemouth","RGP",2
"E06000028","Bournemouth","RWD",2
"E06000028","Bournemouth","RCD",2
"E06000028","Bournemouth","RNS",2
"E06000028","Bournemouth","RWE",2
"E06000028","Bournemouth","R1F",2
"E06000028","Bournemouth","RRK",4
"E06000028","Bournemouth","RJE",2
"E06000028","Bournemouth","RP5",2
"E06000028","Bournemouth","RQW",2
"E06000028","Bournemouth","RBZ",2
"E06000028","Bournemouth","RCB",2
"E06000028","Bournemouth","RTG",2
"E06000028","Bournemouth","RXK",3
"E06000028","Bournemouth","RAS",1
"E06000028","Bournemouth","RBS",1
"E06000028","Bournemouth","RBT",1
"E06000028","Bournemouth","RR8",1
"E06000028","Bournemouth","RTV",1
"E06000028","Bournemouth","RWA",1
"E06000028","Bournemouth","RPC",1
"E06000028","Bournemouth","REM",1
"E06000028","Bournemouth","RT3",1
"E06000028","Bournemouth","RXW",1
"E06000028","Bournemouth","RQ8",1
"E06000028","Bournemouth","RAP",1
"E06000028","Bournemouth","RT5",1
"E06000028","Bournemouth","RTF",1
"E06000028","Bournemouth","RW6",1
"E06000028","Bournemouth","R0A",1
"E06000028","Bournemouth","RFS",1
"E06000028","Bournemouth","RAT",1
"E06000028","Bournemouth","RCU",1
"E06000028","Bournemouth","RJ6",1
"E06000028","Bournemouth","RMY",1
"E06000028","Bournemouth","RXR",1
"E06000028","Bournemouth","RXX",1
"E06000028","Bournemouth","RMC",1
"E06000028","Bournemouth","RTR",1
"E06000028","Bournemouth","RX2",1
"E06000028","Bournemouth","RXL",1
"E06000029","Poole","RD3",17655
"E06000029","Poole","RDZ",2107
"E06000029","Poole","RDY",207
"E06000029","Poole","RHM",188
"E06000029","Poole","RNZ",87
"E06000029","Poole","RBD",70
"E06000029","Poole","RVJ",16
"E06000029","Poole","RHU",13
"E06000029","Poole","RT3",9
"E06000029","Poole","RA4",9
"E06000029","Poole","RBA",8
"E06000029","Poole","RYR",8
"E06000029","Poole","RN5",8
"E06000029","Poole","RD1",7
"E06000029","Poole","RTH",7
"E06000029","Poole","RYJ",6
"E06000029","Poole","REF",6
"E06000029","Poole","RJC",6
"E06000029","Poole","RAL",5
"E06000029","Poole","RBZ",5
"E06000029","Poole","RRK",9
"E06000029","Poole","RJ1",5
"E06000029","Poole","RJ7",5
"E06000029","Poole","RRV",5
"E06000029","Poole","RHW",5
"E06000029","Poole","RNS",5
"E06000029","Poole","RXH",4
"E06000029","Poole","RQM",4
"E06000029","Poole","RH8",4
"E06000029","Poole","RK9",4
"E06000029","Poole","RWE",3
"E06000029","Poole","R0A",3
"E06000029","Poole","RVR",3
"E06000029","Poole","RWH",3
"E06000029","Poole","R1H",3
"E06000029","Poole","R1F",3
"E06000029","Poole","RQX",3
"E06000029","Poole","RTE",3
"E06000029","Poole","RN3",3
"E06000029","Poole","RTK",3
"E06000029","Poole","RWF",3
"E06000029","Poole","RAS",2
"E06000029","Poole","R1K",2
"E06000029","Poole","RJZ",2
"E06000029","Poole","RWP",2
"E06000029","Poole","RX1",2
"E06000029","Poole","RXQ",2
"E06000029","Poole","RA3",2
"E06000029","Poole","RA7",2
"E06000029","Poole","RA2",2
"E06000029","Poole","RCB",2
"E06000029","Poole","RDD",2
"E06000029","Poole","RDU",2
"E06000029","Poole","RF4",2
"E06000029","Poole","RGR",2
"E06000029","Poole","RA9",2
"E06000029","Poole","RC9",2
"E06000029","Poole","REM",3
"E06000029","Poole","RNQ",2
"E06000029","Poole","RWG",2
"E06000029","Poole","RAP",1
"E06000029","Poole","RJ6",1
"E06000029","Poole","RTP",1
"E06000029","Poole","RBS",1
"E06000029","Poole","RFR",1
"E06000029","Poole","RJR",1
"E06000029","Poole","RW1",1
"E06000029","Poole","RXL",1
"E06000029","Poole","RBL",1
"E06000029","Poole","RLT",1
"E06000029","Poole","RNL",1
"E06000029","Poole","RLQ",1
"E06000029","Poole","RXW",1
"E06000029","Poole","R0B",1
"E06000029","Poole","RR8",1
"E06000029","Poole","RTF",1
"E06000029","Poole","RVV",1
"E06000029","Poole","RJ2",1
"E06000029","Poole","RXK",2
"E06000029","Poole","RD8",1
"E06000029","Poole","RFF",1
"E06000029","Poole","RGT",1
"E06000029","Poole","RM1",1
"E06000029","Poole","RXR",1
"E06000029","Poole","RXY",1
"E06000029","Poole","RQ3",1
"E06000029","Poole","RQW",1
"E06000029","Poole","RRF",1
"E06000030","Swindon","RN3",27878
"E06000030","Swindon","RTH",448
"E06000030","Swindon","RA7",227
"E06000030","Swindon","RTE",151
"E06000030","Swindon","RVJ",111
"E06000030","Swindon","RVN",102
"E06000030","Swindon","RD1",30
"E06000030","Swindon","RHW",22
"E06000030","Swindon","RDU",16
"E06000030","Swindon","RD3",15
"E06000030","Swindon","RNZ",13
"E06000030","Swindon","RA9",13
"E06000030","Swindon","REF",12
"E06000030","Swindon","RBD",12
"E06000030","Swindon","RNU",11
"E06000030","Swindon","RDZ",11
"E06000030","Swindon","RHM",11
"E06000030","Swindon","RH8",10
"E06000030","Swindon","RBA",9
"E06000030","Swindon","RQM",9
"E06000030","Swindon","RN5",9
"E06000030","Swindon","R1K",8
"E06000030","Swindon","RD8",8
"E06000030","Swindon","RWP",8
"E06000030","Swindon","RTK",8
"E06000030","Swindon","R1F",8
"E06000030","Swindon","RHU",8
"E06000030","Swindon","RXC",7
"E06000030","Swindon","RT3",7
"E06000030","Swindon","R1H",6
"E06000030","Swindon","RK9",6
"E06000030","Swindon","RAL",6
"E06000030","Swindon","RJ1",6
"E06000030","Swindon","RRK",10
"E06000030","Swindon","RA4",5
"E06000030","Swindon","RAE",4
"E06000030","Swindon","RAS",4
"E06000030","Swindon","RJZ",4
"E06000030","Swindon","RYJ",4
"E06000030","Swindon","RJE",4
"E06000030","Swindon","RR8",4
"E06000030","Swindon","AXG",4
"E06000030","Swindon","RA3",4
"E06000030","Swindon","RJ7",4
"E06000030","Swindon","RDD",4
"E06000030","Swindon","RVR",4
"E06000030","Swindon","RWG",3
"E06000030","Swindon","RXH",3
"E06000030","Swindon","RXQ",3
"E06000030","Swindon","RYR",3
"E06000030","Swindon","RBZ",3
"E06000030","Swindon","RRV",3
"E06000030","Swindon","RCB",3
"E06000030","Swindon","RJ2",4
"E06000030","Swindon","RWD",3
"E06000030","Swindon","RAP",2
"E06000030","Swindon","RXP",2
"E06000030","Swindon","RBN",2
"E06000030","Swindon","RLQ",2
"E06000030","Swindon","RXK",3
"E06000030","Swindon","R0B",2
"E06000030","Swindon","RA2",2
"E06000030","Swindon","RVV",2
"E06000030","Swindon","RX1",2
"E06000030","Swindon","RJC",2
"E06000030","Swindon","RK5",2
"E06000030","Swindon","RGN",2
"E06000030","Swindon","RJ6",2
"E06000030","Swindon","R0A",1
"E06000030","Swindon","RBS",1
"E06000030","Swindon","REM",1
"E06000030","Swindon","RFS",1
"E06000030","Swindon","RPY",1
"E06000030","Swindon","RQ3",1
"E06000030","Swindon","RTD",1
"E06000030","Swindon","RWH",1
"E06000030","Swindon","RXW",2
"E06000030","Swindon","RP4",1
"E06000030","Swindon","RWE",1
"E06000030","Swindon","RBK",1
"E06000030","Swindon","RC9",1
"E06000030","Swindon","RFF",1
"E06000030","Swindon","RHQ",1
"E06000030","Swindon","RLT",1
"E06000030","Swindon","RNL",1
"E06000030","Swindon","RQX",1
"E06000030","Swindon","RWA",1
"E06000030","Swindon","RX3",1
"E06000030","Swindon","RXN",1
"E06000030","Swindon","RXR",1
"E06000030","Swindon","RKB",1
"E06000030","Swindon","RM1",1
"E06000030","Swindon","RP5",1
"E06000030","Swindon","RP7",1
"E06000030","Swindon","RXF",1
"E06000030","Swindon","RTQ",1
"E06000030","Swindon","RTR",1
"E06000030","Swindon","RCF",1
"E06000030","Swindon","RNQ",1
"E06000030","Swindon","RTP",1
"E06000030","Swindon","RDY",1
"E06000030","Swindon","RF4",1
"E06000030","Swindon","RH5",1
"E06000030","Swindon","RTF",1
"E06000030","Swindon","RV3",1
"E06000030","Swindon","RAJ",1
"E06000030","Swindon","RJR",1
"E06000030","Swindon","RTG",1
"E06000030","Swindon","RTX",1
"E06000031","Peterborough","RGN",19162
"E06000031","Peterborough","RGT",484
"E06000031","Peterborough","RGM",161
"E06000031","Peterborough","RWE",127
"E06000031","Peterborough","RT1",55
"E06000031","Peterborough","RCX",39
"E06000031","Peterborough","RWD",31
"E06000031","Peterborough","RX1",19
"E06000031","Peterborough","RNQ",18
"E06000031","Peterborough","RAE",17
"E06000031","Peterborough","RYJ",13
"E06000031","Peterborough","RM1",13
"E06000031","Peterborough","RTG",13
"E06000031","Peterborough","R1H",13
"E06000031","Peterborough","RRK",16
"E06000031","Peterborough","RQ8",11
"E06000031","Peterborough","RC9",10
"E06000031","Peterborough","RJ1",10
"E06000031","Peterborough","RRV",12
"E06000031","Peterborough","RKB",9
"E06000031","Peterborough","REF",9
"E06000031","Peterborough","RGP",9
"E06000031","Peterborough","RQW",8
"E06000031","Peterborough","RYV",8
"E06000031","Peterborough","RNS",8
"E06000031","Peterborough","RQM",7
"E06000031","Peterborough","RWH",7
"E06000031","Peterborough","RDU",7
"E06000031","Peterborough","RHQ",7
"E06000031","Peterborough","R1K",6
"E06000031","Peterborough","RTE",6
"E06000031","Peterborough","RC1",6
"E06000031","Peterborough","RTH",6
"E06000031","Peterborough","RWF",5
"E06000031","Peterborough","RHW",5
"E06000031","Peterborough","RDE",5
"E06000031","Peterborough","RP7",5
"E06000031","Peterborough","RGR",4
"E06000031","Peterborough","RWA",4
"E06000031","Peterborough","RXK",6
"E06000031","Peterborough","RJL",4
"E06000031","Peterborough","RAJ",4
"E06000031","Peterborough","RJZ",4
"E06000031","Peterborough","RTP",4
"E06000031","Peterborough","RP6",4
"E06000031","Peterborough","RWW",4
"E06000031","Peterborough","RWG",4
"E06000031","Peterborough","RD3",4
"E06000031","Peterborough","RM3",3
"E06000031","Peterborough","RP1",3
"E06000031","Peterborough","RXC",3
"E06000031","Peterborough","RK5",3
"E06000031","Peterborough","RN5",3
"E06000031","Peterborough","RAS",3
"E06000031","Peterborough","RH8",3
"E06000031","Peterborough","RAL",3
"E06000031","Peterborough","RR8",3
"E06000031","Peterborough","R1L",3
"E06000031","Peterborough","R0A",3
"E06000031","Peterborough","RBA",3
"E06000031","Peterborough","RCB",3
"E06000031","Peterborough","RJ2",2
"E06000031","Peterborough","RMP",2
"E06000031","Peterborough","RW6",2
"E06000031","Peterborough","RK9",2
"E06000031","Peterborough","RP5",2
"E06000031","Peterborough","RTD",2
"E06000031","Peterborough","RVJ",2
"E06000031","Peterborough","RWJ",2
"E06000031","Peterborough","RXF",2
"E06000031","Peterborough","RA2",2
"E06000031","Peterborough","RFS",2
"E06000031","Peterborough","RN7",2
"E06000031","Peterborough","RP4",2
"E06000031","Peterborough","RBN",2
"E06000031","Peterborough","RJ7",2
"E06000031","Peterborough","RNL",2
"E06000031","Peterborough","RXW",3
"E06000031","Peterborough","RDZ",2
"E06000031","Peterborough","RXP",2
"E06000031","Peterborough","RYR",2
"E06000031","Peterborough","RLQ",2
"E06000031","Peterborough","RTX",2
"E06000031","Peterborough","RAP",1
"E06000031","Peterborough","RAT",1
"E06000031","Peterborough","RDD",1
"E06000031","Peterborough","REM",2
"E06000031","Peterborough","RJ6",1
"E06000031","Peterborough","R1F",1
"E06000031","Peterborough","RA7",1
"E06000031","Peterborough","RAX",1
"E06000031","Peterborough","RCD",1
"E06000031","Peterborough","RJE",1
"E06000031","Peterborough","RX4",1
"E06000031","Peterborough","RGD",1
"E06000031","Peterborough","RNA",1
"E06000031","Peterborough","RBD",1
"E06000031","Peterborough","RTK",1
"E06000031","Peterborough","RTR",2
"E06000031","Peterborough","RVV",1
"E06000031","Peterborough","RWY",1
"E06000031","Peterborough","RXL",1
"E06000031","Peterborough","RA9",1
"E06000031","Peterborough","RJR",1
"E06000031","Peterborough","RKE",1
"E06000031","Peterborough","RW1",1
"E06000031","Peterborough","RXQ",1
"E06000031","Peterborough","RD8",1
"E06000031","Peterborough","RF4",1
"E06000031","Peterborough","RQ3",1
"E06000031","Peterborough","RVR",1
"E06000031","Peterborough","RCF",1
"E06000031","Peterborough","RJC",1
"E06000031","Peterborough","RWP",1
"E06000031","Peterborough","RQX",1
"E06000031","Peterborough","RTF",1
"E06000031","Peterborough","RVW",1
"E06000031","Peterborough","RXN",1
"E06000032","Luton","RC9",27151
"E06000032","Luton","RWH",569
"E06000032","Luton","RWK",511
"E06000032","Luton","RGT",191
"E06000032","Luton","RT3",147
"E06000032","Luton","RC1",121
"E06000032","Luton","RWG",85
"E06000032","Luton","RAL",73
"E06000032","Luton","RYJ",68
"E06000032","Luton","RD8",65
"E06000032","Luton","R1H",53
"E06000032","Luton","R1K",48
"E06000032","Luton","RRV",66
"E06000032","Luton","RXQ",23
"E06000032","Luton","RJ1",21
"E06000032","Luton","RQ8",20
"E06000032","Luton","RDU",17
"E06000032","Luton","RTH",15
"E06000032","Luton","RJ7",13
"E06000032","Luton","RNS",12
"E06000032","Luton","RRK",18
"E06000032","Luton","RF4",10
"E06000032","Luton","RQM",10
"E06000032","Luton","RAP",10
"E06000032","Luton","RDE",9
"E06000032","Luton","RAS",9
"E06000032","Luton","RP6",9
"E06000032","Luton","RGP",9
"E06000032","Luton","RAE",9
"E06000032","Luton","RJZ",9
"E06000032","Luton","RQW",8
"E06000032","Luton","RP4",8
"E06000032","Luton","RQX",8
"E06000032","Luton","REF",8
"E06000032","Luton","RGM",7
"E06000032","Luton","RA9",7
"E06000032","Luton","RL4",6
"E06000032","Luton","RWF",6
"E06000032","Luton","RWE",6
"E06000032","Luton","R1F",6
"E06000032","Luton","RXC",6
"E06000032","Luton","R0A",6
"E06000032","Luton","RX1",6
"E06000032","Luton","RJE",6
"E06000032","Luton","RFF",5
"E06000032","Luton","RVV",5
"E06000032","Luton","RGN",5
"E06000032","Luton","RKB",5
"E06000032","Luton","RNQ",5
"E06000032","Luton","RTK",5
"E06000032","Luton","RDZ",5
"E06000032","Luton","RJ2",6
"E06000032","Luton","RWA",4
"E06000032","Luton","RQ3",4
"E06000032","Luton","RHU",4
"E06000032","Luton","RM1",4
"E06000032","Luton","RAN",4
"E06000032","Luton","RD1",4
"E06000032","Luton","RTE",4
"E06000032","Luton","RWD",4
"E06000032","Luton","RHQ",4
"E06000032","Luton","RJ6",3
"E06000032","Luton","RNZ",3
"E06000032","Luton","RJC",3
"E06000032","Luton","RXW",3
"E06000032","Luton","R1L",3
"E06000032","Luton","RVR",3
"E06000032","Luton","REM",3
"E06000032","Luton","RCX",3
"E06000032","Luton","RFS",3
"E06000032","Luton","RTP",3
"E06000032","Luton","RH8",3
"E06000032","Luton","RDD",4
"E06000032","Luton","RMC",3
"E06000032","Luton","RXK",6
"E06000032","Luton","RKE",2
"E06000032","Luton","RLT",2
"E06000032","Luton","RN7",2
"E06000032","Luton","RV3",2
"E06000032","Luton","RXH",2
"E06000032","Luton","RXL",2
"E06000032","Luton","RWY",2
"E06000032","Luton","RXR",2
"E06000032","Luton","RHM",2
"E06000032","Luton","RAJ",2
"E06000032","Luton","RBK",2
"E06000032","Luton","RN5",2
"E06000032","Luton","RR8",2
"E06000032","Luton","RNU",1
"E06000032","Luton","RTR",1
"E06000032","Luton","RBT",1
"E06000032","Luton","RHW",1
"E06000032","Luton","RAX",1
"E06000032","Luton","RV9",1
"E06000032","Luton","RYR",1
"E06000032","Luton","RBN",1
"E06000032","Luton","RP1",1
"E06000032","Luton","RCB",1
"E06000032","Luton","RW6",1
"E06000032","Luton","RXN",1
"E06000032","Luton","RGR",1
"E06000032","Luton","RK5",1
"E06000032","Luton","RN3",1
"E06000032","Luton","RNA",1
"E06000032","Luton","RP5",1
"E06000032","Luton","RXF",1
"E06000032","Luton","RBZ",1
"E06000032","Luton","RCD",1
"E06000032","Luton","RTD",1
"E06000032","Luton","RA4",1
"E06000032","Luton","RBA",1
"E06000032","Luton","RD3",1
"E06000032","Luton","RVJ",1
"E06000032","Luton","RWP",1
"E06000033","Southend-on-Sea","RAJ",22069
"E06000033","Southend-on-Sea","R1L",567
"E06000033","Southend-on-Sea","RQ8",464
"E06000033","Southend-on-Sea","RDD",439
"E06000033","Southend-on-Sea","R1H",207
"E06000033","Southend-on-Sea","RJ1",47
"E06000033","Southend-on-Sea","RF4",42
"E06000033","Southend-on-Sea","RGT",39
"E06000033","Southend-on-Sea","RRV",31
"E06000033","Southend-on-Sea","RDE",23
"E06000033","Southend-on-Sea","RYJ",17
"E06000033","Southend-on-Sea","RQX",14
"E06000033","Southend-on-Sea","RQW",13
"E06000033","Southend-on-Sea","RWF",12
"E06000033","Southend-on-Sea","RJZ",12
"E06000033","Southend-on-Sea","RVV",12
"E06000033","Southend-on-Sea","RAL",11
"E06000033","Southend-on-Sea","RT3",10
"E06000033","Southend-on-Sea","RYR",9
"E06000033","Southend-on-Sea","RXC",7
"E06000033","Southend-on-Sea","RAP",7
"E06000033","Southend-on-Sea","R1K",7
"E06000033","Southend-on-Sea","RP4",6
"E06000033","Southend-on-Sea","RWK",6
"E06000033","Southend-on-Sea","RGM",6
"E06000033","Southend-on-Sea","RM1",6
"E06000033","Southend-on-Sea","REF",6
"E06000033","Southend-on-Sea","RXP",6
"E06000033","Southend-on-Sea","RJ7",6
"E06000033","Southend-on-Sea","RA9",5
"E06000033","Southend-on-Sea","RDU",5
"E06000033","Southend-on-Sea","RAN",5
"E06000033","Southend-on-Sea","RN7",5
"E06000033","Southend-on-Sea","RGP",4
"E06000033","Southend-on-Sea","RTX",4
"E06000033","Southend-on-Sea","RTH",4
"E06000033","Southend-on-Sea","RX1",4
"E06000033","Southend-on-Sea","RJ2",5
"E06000033","Southend-on-Sea","RGR",4
"E06000033","Southend-on-Sea","RHM",4
"E06000033","Southend-on-Sea","RPA",4
"E06000033","Southend-on-Sea","RPY",4
"E06000033","Southend-on-Sea","RTP",3
"E06000033","Southend-on-Sea","RAX",3
"E06000033","Southend-on-Sea","RN5",3
"E06000033","Southend-on-Sea","RWG",3
"E06000033","Southend-on-Sea","RWH",3
"E06000033","Southend-on-Sea","RA3",3
"E06000033","Southend-on-Sea","RN3",3
"E06000033","Southend-on-Sea","R1F",3
"E06000033","Southend-on-Sea","RQM",3
"E06000033","Southend-on-Sea","RXH",3
"E06000033","Southend-on-Sea","RA7",3
"E06000033","Southend-on-Sea","R0A",2
"E06000033","Southend-on-Sea","RBZ",2
"E06000033","Southend-on-Sea","RHW",2
"E06000033","Southend-on-Sea","RA2",2
"E06000033","Southend-on-Sea","RBD",2
"E06000033","Southend-on-Sea","RH8",2
"E06000033","Southend-on-Sea","RM3",2
"E06000033","Southend-on-Sea","RVR",2
"E06000033","Southend-on-Sea","RXL",2
"E06000033","Southend-on-Sea","RD8",2
"E06000033","Southend-on-Sea","RNZ",2
"E06000033","Southend-on-Sea","RWD",2
"E06000033","Southend-on-Sea","RBN",2
"E06000033","Southend-on-Sea","RCB",2
"E06000033","Southend-on-Sea","RD3",2
"E06000033","Southend-on-Sea","RP6",2
"E06000033","Southend-on-Sea","RAT",2
"E06000033","Southend-on-Sea","RBT",2
"E06000033","Southend-on-Sea","RHU",2
"E06000033","Southend-on-Sea","RK9",2
"E06000033","Southend-on-Sea","RJL",2
"E06000033","Southend-on-Sea","RNL",2
"E06000033","Southend-on-Sea","RNS",2
"E06000033","Southend-on-Sea","RVJ",2
"E06000033","Southend-on-Sea","RXQ",2
"E06000033","Southend-on-Sea","RTG",1
"E06000033","Southend-on-Sea","RGN",1
"E06000033","Southend-on-Sea","RHQ",1
"E06000033","Southend-on-Sea","RMY",1
"E06000033","Southend-on-Sea","RNA",1
"E06000033","Southend-on-Sea","RTF",1
"E06000033","Southend-on-Sea","RXW",2
"E06000033","Southend-on-Sea","RFS",1
"E06000033","Southend-on-Sea","RLQ",1
"E06000033","Southend-on-Sea","RTR",1
"E06000033","Southend-on-Sea","RCD",1
"E06000033","Southend-on-Sea","RKB",1
"E06000033","Southend-on-Sea","RKE",1
"E06000033","Southend-on-Sea","RRK",1
"E06000033","Southend-on-Sea","RTE",1
"E06000033","Southend-on-Sea","RVY",2
"E06000033","Southend-on-Sea","RWW",1
"E06000033","Southend-on-Sea","RVW",1
"E06000033","Southend-on-Sea","RC9",1
"E06000033","Southend-on-Sea","RJ6",1
"E06000033","Southend-on-Sea","RRE",1
"E06000033","Southend-on-Sea","RWP",1
"E06000033","Southend-on-Sea","RD1",1
"E06000033","Southend-on-Sea","REM",1
"E06000033","Southend-on-Sea","RJR",1
"E06000033","Southend-on-Sea","RL4",1
"E06000033","Southend-on-Sea","RPG",1
"E06000033","Southend-on-Sea","RWR",1
"E06000034","Thurrock","RDD",17245
"E06000034","Thurrock","RQ8",477
"E06000034","Thurrock","RF4",463
"E06000034","Thurrock","R1H",419
"E06000034","Thurrock","R1L",309
"E06000034","Thurrock","RN7",244
"E06000034","Thurrock","RAJ",185
"E06000034","Thurrock","RJ1",53
"E06000034","Thurrock","RRV",54
"E06000034","Thurrock","RDE",31
"E06000034","Thurrock","RYJ",31
"E06000034","Thurrock","RQX",26
"E06000034","Thurrock","RJZ",24
"E06000034","Thurrock","RAL",20
"E06000034","Thurrock","RGT",20
"E06000034","Thurrock","RPA",19
"E06000034","Thurrock","RP6",14
"E06000034","Thurrock","RQW",13
"E06000034","Thurrock","RAP",10
"E06000034","Thurrock","RVV",10
"E06000034","Thurrock","RT3",9
"E06000034","Thurrock","RJ7",9
"E06000034","Thurrock","RJ2",14
"E06000034","Thurrock","R1K",8
"E06000034","Thurrock","RGP",7
"E06000034","Thurrock","RM1",7
"E06000034","Thurrock","RP4",7
"E06000034","Thurrock","RDU",7
"E06000034","Thurrock","RTH",7
"E06000034","Thurrock","RQM",7
"E06000034","Thurrock","RWF",7
"E06000034","Thurrock","RC9",6
"E06000034","Thurrock","RPY",6
"E06000034","Thurrock","RAS",5
"E06000034","Thurrock","RGR",5
"E06000034","Thurrock","RWH",4
"E06000034","Thurrock","RGM",4
"E06000034","Thurrock","RVJ",4
"E06000034","Thurrock","RXC",4
"E06000034","Thurrock","R0A",4
"E06000034","Thurrock","RXH",4
"E06000034","Thurrock","RX1",4
"E06000034","Thurrock","RDZ",4
"E06000034","Thurrock","RAT",3
"E06000034","Thurrock","RFS",3
"E06000034","Thurrock","RAN",3
"E06000034","Thurrock","RD8",3
"E06000034","Thurrock","RBD",3
"E06000034","Thurrock","RCX",3
"E06000034","Thurrock","RWG",3
"E06000034","Thurrock","RRK",3
"E06000034","Thurrock","RD3",3
"E06000034","Thurrock","RHQ",2
"E06000034","Thurrock","RXQ",2
"E06000034","Thurrock","RXR",2
"E06000034","Thurrock","RA4",2
"E06000034","Thurrock","RK9",2
"E06000034","Thurrock","RPC",2
"E06000034","Thurrock","RXP",2
"E06000034","Thurrock","REF",2
"E06000034","Thurrock","RHW",2
"E06000034","Thurrock","RN5",2
"E06000034","Thurrock","RC1",2
"E06000034","Thurrock","RTK",2
"E06000034","Thurrock","RVR",2
"E06000034","Thurrock","RWE",2
"E06000034","Thurrock","RJN",2
"E06000034","Thurrock","RVW",2
"E06000034","Thurrock","RYR",2
"E06000034","Thurrock","RD1",2
"E06000034","Thurrock","RN3",2
"E06000034","Thurrock","RA2",1
"E06000034","Thurrock","RAX",1
"E06000034","Thurrock","RJ6",1
"E06000034","Thurrock","RJC",1
"E06000034","Thurrock","RKB",1
"E06000034","Thurrock","RNL",1
"E06000034","Thurrock","RTE",1
"E06000034","Thurrock","RBZ",1
"E06000034","Thurrock","RCD",1
"E06000034","Thurrock","RHM",1
"E06000034","Thurrock","RKE",1
"E06000034","Thurrock","RNA",1
"E06000034","Thurrock","RWA",1
"E06000034","Thurrock","RXK",1
"E06000034","Thurrock","RFF",1
"E06000034","Thurrock","RHU",1
"E06000034","Thurrock","RPG",1
"E06000034","Thurrock","RWK",1
"E06000034","Thurrock","RXN",1
"E06000034","Thurrock","RTP",1
"E06000034","Thurrock","RTR",1
"E06000034","Thurrock","RW6",1
"E06000034","Thurrock","R1F",1
"E06000034","Thurrock","RCB",1
"E06000034","Thurrock","R0B",1
"E06000034","Thurrock","RNS",1
"E06000034","Thurrock","RL4",1
"E06000034","Thurrock","RTF",1
"E06000034","Thurrock","RTG",1
"E06000034","Thurrock","RJE",1
"E06000034","Thurrock","RQ3",1
"E06000034","Thurrock","RR7",1
"E06000034","Thurrock","RXW",1
"E06000035","Medway","RPA",25743
"E06000035","Medway","RWF",955
"E06000035","Medway","RN7",456
"E06000035","Medway","RPC",421
"E06000035","Medway","RVV",383
"E06000035","Medway","RXY",345
"E06000035","Medway","RJZ",220
"E06000035","Medway","RJ1",206
"E06000035","Medway","R1H",54
"E06000035","Medway","RRV",50
"E06000035","Medway","RJ7",34
"E06000035","Medway","RJ2",47
"E06000035","Medway","RYJ",22
"E06000035","Medway","RXC",21
"E06000035","Medway","RQM",19
"E06000035","Medway","RT3",16
"E06000035","Medway","RPY",15
"E06000035","Medway","NQ7",15
"E06000035","Medway","RDD",14
"E06000035","Medway","RTP",11
"E06000035","Medway","RDU",11
"E06000035","Medway","RYR",11
"E06000035","Medway","RXH",10
"E06000035","Medway","RTK",9
"E06000035","Medway","RP6",9
"E06000035","Medway","RGP",8
"E06000035","Medway","RHU",8
"E06000035","Medway","RQX",8
"E06000035","Medway","RTH",8
"E06000035","Medway","RVR",7
"E06000035","Medway","RDE",7
"E06000035","Medway","RJ6",7
"E06000035","Medway","RHM",7
"E06000035","Medway","RF4",7
"E06000035","Medway","R1K",6
"E06000035","Medway","RHQ",6
"E06000035","Medway","RK9",6
"E06000035","Medway","RXQ",6
"E06000035","Medway","RCB",6
"E06000035","Medway","RKB",6
"E06000035","Medway","RBD",6
"E06000035","Medway","R0A",5
"E06000035","Medway","RA7",5
"E06000035","Medway","RX2",5
"E06000035","Medway","REF",5
"E06000035","Medway","RAJ",5
"E06000035","Medway","RAP",4
"E06000035","Medway","RN5",4
"E06000035","Medway","RBZ",4
"E06000035","Medway","RM1",4
"E06000035","Medway","RRK",6
"E06000035","Medway","RTE",4
"E06000035","Medway","RAL",4
"E06000035","Medway","RA9",4
"E06000035","Medway","RJE",4
"E06000035","Medway","RQ8",4
"E06000035","Medway","R1F",4
"E06000035","Medway","RWK",4
"E06000035","Medway","RBA",3
"E06000035","Medway","RNA",3
"E06000035","Medway","RLQ",3
"E06000035","Medway","RPG",3
"E06000035","Medway","RVJ",3
"E06000035","Medway","RD3",3
"E06000035","Medway","RGN",3
"E06000035","Medway","RA2",3
"E06000035","Medway","RH8",3
"E06000035","Medway","RWD",3
"E06000035","Medway","RNL",3
"E06000035","Medway","RWH",3
"E06000035","Medway","RGT",3
"E06000035","Medway","RAN",3
"E06000035","Medway","RGR",3
"E06000035","Medway","RWW",3
"E06000035","Medway","RHW",2
"E06000035","Medway","RQW",2
"E06000035","Medway","RWP",2
"E06000035","Medway","RNQ",2
"E06000035","Medway","RNZ",2
"E06000035","Medway","RXN",2
"E06000035","Medway","RA4",2
"E06000035","Medway","RC9",2
"E06000035","Medway","RL4",2
"E06000035","Medway","RTD",2
"E06000035","Medway","RWG",2
"E06000035","Medway","RAX",2
"E06000035","Medway","RJN",2
"E06000035","Medway","RM3",2
"E06000035","Medway","RWY",2
"E06000035","Medway","RD1",2
"E06000035","Medway","RXP",2
"E06000035","Medway","RAE",2
"E06000035","Medway","RP4",2
"E06000035","Medway","RDZ",2
"E06000035","Medway","RVY",2
"E06000035","Medway","RC1",1
"E06000035","Medway","RD8",1
"E06000035","Medway","RCD",1
"E06000035","Medway","RJR",1
"E06000035","Medway","RKE",1
"E06000035","Medway","RN3",1
"E06000035","Medway","RP5",2
"E06000035","Medway","RTG",2
"E06000035","Medway","RWA",1
"E06000035","Medway","REM",2
"E06000035","Medway","RJC",1
"E06000035","Medway","RTF",1
"E06000035","Medway","RAS",1
"E06000035","Medway","RBK",1
"E06000035","Medway","RBN",1
"E06000035","Medway","RW1",1
"E06000035","Medway","RXF",1
"E06000035","Medway","RFF",1
"E06000035","Medway","RMC",1
"E06000035","Medway","RBL",1
"E06000035","Medway","RGM",1
"E06000035","Medway","RR8",1
"E06000035","Medway","RTR",1
"E06000035","Medway","RW6",1
"E06000035","Medway","RWE",1
"E06000036","Bracknell Forest","RDU",8498
"E06000036","Bracknell Forest","RHW",2126
"E06000036","Bracknell Forest","RA2",122
"E06000036","Bracknell Forest","RWX",88
"E06000036","Bracknell Forest","RTH",84
"E06000036","Bracknell Forest","RJ7",40
"E06000036","Bracknell Forest","RHM",39
"E06000036","Bracknell Forest","RTK",35
"E06000036","Bracknell Forest","RJ1",25
"E06000036","Bracknell Forest","RN5",23
"E06000036","Bracknell Forest","RYJ",20
"E06000036","Bracknell Forest","RXQ",19
"E06000036","Bracknell Forest","RQM",19
"E06000036","Bracknell Forest","RPY",13
"E06000036","Bracknell Forest","RAS",9
"E06000036","Bracknell Forest","RN3",9
"E06000036","Bracknell Forest","RHU",8
"E06000036","Bracknell Forest","REF",8
"E06000036","Bracknell Forest","RXH",7
"E06000036","Bracknell Forest","RDZ",7
"E06000036","Bracknell Forest","RT3",7
"E06000036","Bracknell Forest","RH8",7
"E06000036","Bracknell Forest","R1K",7
"E06000036","Bracknell Forest","RA9",6
"E06000036","Bracknell Forest","R1H",6
"E06000036","Bracknell Forest","RP6",6
"E06000036","Bracknell Forest","RYR",5
"E06000036","Bracknell Forest","RA7",5
"E06000036","Bracknell Forest","RA4",4
"E06000036","Bracknell Forest","RGT",4
"E06000036","Bracknell Forest","RTD",4
"E06000036","Bracknell Forest","RAX",4
"E06000036","Bracknell Forest","RBZ",4
"E06000036","Bracknell Forest","RK9",4
"E06000036","Bracknell Forest","RRV",5
"E06000036","Bracknell Forest","RGN",3
"E06000036","Bracknell Forest","RLQ",3
"E06000036","Bracknell Forest","RXC",3
"E06000036","Bracknell Forest","RXW",4
"E06000036","Bracknell Forest","RD1",3
"E06000036","Bracknell Forest","RD3",3
"E06000036","Bracknell Forest","RJ2",4
"E06000036","Bracknell Forest","RTP",3
"E06000036","Bracknell Forest","RNZ",3
"E06000036","Bracknell Forest","RWG",3
"E06000036","Bracknell Forest","RC9",2
"E06000036","Bracknell Forest","RCB",2
"E06000036","Bracknell Forest","RRK",4
"E06000036","Bracknell Forest","RAL",2
"E06000036","Bracknell Forest","REM",3
"E06000036","Bracknell Forest","RK5",2
"E06000036","Bracknell Forest","RWE",2
"E06000036","Bracknell Forest","RWP",2
"E06000036","Bracknell Forest","RXP",2
"E06000036","Bracknell Forest","RM1",2
"E06000036","Bracknell Forest","RDD",2
"E06000036","Bracknell Forest","RX1",2
"E06000036","Bracknell Forest","RXX",2
"E06000036","Bracknell Forest","RBD",2
"E06000036","Bracknell Forest","RFF",2
"E06000036","Bracknell Forest","RJZ",2
"E06000036","Bracknell Forest","RL4",2
"E06000036","Bracknell Forest","RWH",2
"E06000036","Bracknell Forest","RKB",2
"E06000036","Bracknell Forest","RVV",2
"E06000036","Bracknell Forest","RPC",1
"E06000036","Bracknell Forest","RCX",1
"E06000036","Bracknell Forest","RJC",1
"E06000036","Bracknell Forest","RP1",1
"E06000036","Bracknell Forest","RP4",1
"E06000036","Bracknell Forest","RPA",1
"E06000036","Bracknell Forest","RQX",1
"E06000036","Bracknell Forest","RTE",1
"E06000036","Bracknell Forest","RTR",1
"E06000036","Bracknell Forest","RVJ",1
"E06000036","Bracknell Forest","RVR",1
"E06000036","Bracknell Forest","RWK",1
"E06000036","Bracknell Forest","RBK",1
"E06000036","Bracknell Forest","RDY",1
"E06000036","Bracknell Forest","RET",1
"E06000036","Bracknell Forest","RXL",1
"E06000036","Bracknell Forest","RA3",1
"E06000036","Bracknell Forest","RCF",1
"E06000036","Bracknell Forest","RJR",1
"E06000036","Bracknell Forest","RAJ",1
"E06000036","Bracknell Forest","RD8",1
"E06000036","Bracknell Forest","RGR",1
"E06000036","Bracknell Forest","RJ8",1
"E06000036","Bracknell Forest","RXF",1
"E06000036","Bracknell Forest","RJ6",1
"E06000036","Bracknell Forest","RMC",1
"E06000036","Bracknell Forest","RTF",1
"E06000036","Bracknell Forest","RWF",1
"E06000036","Bracknell Forest","R1F",1
"E06000036","Bracknell Forest","RNS",1
"E06000036","Bracknell Forest","RQ8",1
"E06000036","Bracknell Forest","RXN",1
"E06000036","Bracknell Forest","RJE",1
"E06000036","Bracknell Forest","RNL",1
"E06000037","West Berkshire","RHW",8421
"E06000037","West Berkshire","RN5",2682
"E06000037","West Berkshire","RN3",1485
"E06000037","West Berkshire","RTH",610
"E06000037","West Berkshire","RWX",172
"E06000037","West Berkshire","RDU",100
"E06000037","West Berkshire","RHM",56
"E06000037","West Berkshire","RA2",25
"E06000037","West Berkshire","RYJ",24
"E06000037","West Berkshire","RNZ",20
"E06000037","West Berkshire","RT3",18
"E06000037","West Berkshire","R1H",16
"E06000037","West Berkshire","RVJ",15
"E06000037","West Berkshire","RQM",14
"E06000037","West Berkshire","RA7",12
"E06000037","West Berkshire","RHU",12
"E06000037","West Berkshire","RA9",12
"E06000037","West Berkshire","RJ1",11
"E06000037","West Berkshire","RXQ",11
"E06000037","West Berkshire","REF",10
"E06000037","West Berkshire","RRV",10
"E06000037","West Berkshire","RDZ",9
"E06000037","West Berkshire","RRK",11
"E06000037","West Berkshire","RBD",7
"E06000037","West Berkshire","RD1",7
"E06000037","West Berkshire","RK9",7
"E06000037","West Berkshire","RJC",7
"E06000037","West Berkshire","RH8",7
"E06000037","West Berkshire","RTE",7
"E06000037","West Berkshire","RW1",7
"E06000037","West Berkshire","R1K",7
"E06000037","West Berkshire","RYR",7
"E06000037","West Berkshire","RD3",6
"E06000037","West Berkshire","RJ7",6
"E06000037","West Berkshire","RJ2",6
"E06000037","West Berkshire","RLQ",5
"E06000037","West Berkshire","RPY",5
"E06000037","West Berkshire","RKB",5
"E06000037","West Berkshire","RAL",5
"E06000037","West Berkshire","RM1",5
"E06000037","West Berkshire","RVR",5
"E06000037","West Berkshire","RA3",4
"E06000037","West Berkshire","RD8",4
"E06000037","West Berkshire","RTD",4
"E06000037","West Berkshire","RVV",4
"E06000037","West Berkshire","RC9",4
"E06000037","West Berkshire","RCB",4
"E06000037","West Berkshire","RBA",4
"E06000037","West Berkshire","RAX",3
"E06000037","West Berkshire","RP6",3
"E06000037","West Berkshire","RWD",3
"E06000037","West Berkshire","RBZ",3
"E06000037","West Berkshire","RGR",3
"E06000037","West Berkshire","RGT",3
"E06000037","West Berkshire","R0A",2
"E06000037","West Berkshire","RTF",2
"E06000037","West Berkshire","RQW",2
"E06000037","West Berkshire","RTP",2
"E06000037","West Berkshire","RDE",2
"E06000037","West Berkshire","RFR",2
"E06000037","West Berkshire","RXC",2
"E06000037","West Berkshire","RC1",2
"E06000037","West Berkshire","RJ8",2
"E06000037","West Berkshire","REM",2
"E06000037","West Berkshire","RTX",2
"E06000037","West Berkshire","RXW",3
"E06000037","West Berkshire","RNS",2
"E06000037","West Berkshire","RWW",2
"E06000037","West Berkshire","RWH",2
"E06000037","West Berkshire","RFF",2
"E06000037","West Berkshire","RGN",2
"E06000037","West Berkshire","RWP",2
"E06000037","West Berkshire","RDD",1
"E06000037","West Berkshire","RFS",1
"E06000037","West Berkshire","RGP",1
"E06000037","West Berkshire","RP4",1
"E06000037","West Berkshire","RAE",1
"E06000037","West Berkshire","RBT",1
"E06000037","West Berkshire","RJE",1
"E06000037","West Berkshire","RVY",1
"E06000037","West Berkshire","RBN",1
"E06000037","West Berkshire","RBS",1
"E06000037","West Berkshire","RAP",1
"E06000037","West Berkshire","RK5",1
"E06000037","West Berkshire","RTK",1
"E06000037","West Berkshire","RWE",1
"E06000037","West Berkshire","RXH",1
"E06000037","West Berkshire","RV5",1
"E06000037","West Berkshire","RWG",1
"E06000037","West Berkshire","R1F",1
"E06000037","West Berkshire","RAN",1
"E06000037","West Berkshire","RCX",1
"E06000037","West Berkshire","RET",1
"E06000037","West Berkshire","RNQ",1
"E06000037","West Berkshire","RX1",1
"E06000037","West Berkshire","RGM",1
"E06000037","West Berkshire","RJZ",1
"E06000037","West Berkshire","RNU",1
"E06000037","West Berkshire","RP5",1
"E06000037","West Berkshire","RQ8",1
"E06000037","West Berkshire","RTG",1
"E06000037","West Berkshire","RXK",1
"E06000038","Reading","RHW",14750
"E06000038","Reading","RTH",362
"E06000038","Reading","RWX",249
"E06000038","Reading","RDU",122
"E06000038","Reading","RN5",36
"E06000038","Reading","RXQ",27
"E06000038","Reading","RHM",23
"E06000038","Reading","RYJ",20
"E06000038","Reading","RQM",14
"E06000038","Reading","RJ1",14
"E06000038","Reading","RJ7",14
"E06000038","Reading","R1K",13
"E06000038","Reading","RA2",13
"E06000038","Reading","RRV",11
"E06000038","Reading","R1H",10
"E06000038","Reading","RYR",9
"E06000038","Reading","RT3",9
"E06000038","Reading","RBZ",8
"E06000038","Reading","RAS",8
"E06000038","Reading","RD3",8
"E06000038","Reading","RN3",8
"E06000038","Reading","REF",7
"E06000038","Reading","RAL",7
"E06000038","Reading","RPY",6
"E06000038","Reading","RTE",6
"E06000038","Reading","RJZ",5
"E06000038","Reading","RBD",5
"E06000038","Reading","RD8",5
"E06000038","Reading","RA7",5
"E06000038","Reading","RBA",5
"E06000038","Reading","RK9",5
"E06000038","Reading","RDZ",5
"E06000038","Reading","RXC",5
"E06000038","Reading","RBK",4
"E06000038","Reading","RNZ",4
"E06000038","Reading","RDD",4
"E06000038","Reading","RNS",4
"E06000038","Reading","RAE",4
"E06000038","Reading","RD1",4
"E06000038","Reading","RTK",4
"E06000038","Reading","RRK",6
"E06000038","Reading","RWE",4
"E06000038","Reading","RA3",3
"E06000038","Reading","RAX",3
"E06000038","Reading","RXK",3
"E06000038","Reading","RLQ",3
"E06000038","Reading","RA9",3
"E06000038","Reading","RWF",3
"E06000038","Reading","RQX",3
"E06000038","Reading","RXH",3
"E06000038","Reading","RA4",2
"E06000038","Reading","RGP",2
"E06000038","Reading","RF4",2
"E06000038","Reading","RGR",2
"E06000038","Reading","RH8",2
"E06000038","Reading","RHU",2
"E06000038","Reading","RM1",2
"E06000038","Reading","RNU",2
"E06000038","Reading","RTD",2
"E06000038","Reading","RGN",2
"E06000038","Reading","R1F",2
"E06000038","Reading","RJ6",2
"E06000038","Reading","RJC",2
"E06000038","Reading","RQ8",2
"E06000038","Reading","RVJ",2
"E06000038","Reading","RCX",2
"E06000038","Reading","RK5",2
"E06000038","Reading","RKE",2
"E06000038","Reading","RTP",2
"E06000038","Reading","RAP",2
"E06000038","Reading","RWH",2
"E06000038","Reading","RXW",2
"E06000038","Reading","RHQ",2
"E06000038","Reading","RQ3",2
"E06000038","Reading","RKB",1
"E06000038","Reading","RNA",1
"E06000038","Reading","RWA",1
"E06000038","Reading","RAJ",1
"E06000038","Reading","RDE",1
"E06000038","Reading","RRF",1
"E06000038","Reading","RTG",2
"E06000038","Reading","RVR",1
"E06000038","Reading","RWK",1
"E06000038","Reading","RDY",1
"E06000038","Reading","RWY",1
"E06000038","Reading","RGT",1
"E06000038","Reading","RMP",1
"E06000038","Reading","RMY",1
"E06000038","Reading","RPC",1
"E06000038","Reading","RTF",1
"E06000038","Reading","RTX",1
"E06000038","Reading","RV3",1
"E06000038","Reading","RWD",1
"E06000038","Reading","RLT",1
"E06000038","Reading","RFR",1
"E06000038","Reading","RFS",1
"E06000038","Reading","RL4",1
"E06000038","Reading","RW6",1
"E06000038","Reading","RWP",1
"E06000038","Reading","RX1",1
"E06000038","Reading","RCB",1
"E06000038","Reading","RJ2",1
"E06000038","Reading","RXF",1
"E06000038","Reading","R0A",1
"E06000038","Reading","REM",1
"E06000039","Slough","RDU",18231
"E06000039","Slough","RTH",252
"E06000039","Slough","RXQ",244
"E06000039","Slough","RHW",216
"E06000039","Slough","RWX",149
"E06000039","Slough","R1K",146
"E06000039","Slough","RAS",94
"E06000039","Slough","RQM",90
"E06000039","Slough","RYJ",69
"E06000039","Slough","RTK",22
"E06000039","Slough","RWH",19
"E06000039","Slough","RRV",23
"E06000039","Slough","RJ1",16
"E06000039","Slough","RHM",14
"E06000039","Slough","RJ7",14
"E06000039","Slough","RT3",14
"E06000039","Slough","R1H",13
"E06000039","Slough","RAL",13
"E06000039","Slough","RWG",13
"E06000039","Slough","RYR",11
"E06000039","Slough","RF4",10
"E06000039","Slough","RAX",9
"E06000039","Slough","RP6",9
"E06000039","Slough","RDZ",8
"E06000039","Slough","RPA",8
"E06000039","Slough","RC9",7
"E06000039","Slough","RRK",8
"E06000039","Slough","RA2",7
"E06000039","Slough","RJZ",6
"E06000039","Slough","RVR",6
"E06000039","Slough","RW6",6
"E06000039","Slough","R1F",5
"E06000039","Slough","RD8",5
"E06000039","Slough","RHU",5
"E06000039","Slough","RXK",8
"E06000039","Slough","RLQ",5
"E06000039","Slough","RDE",5
"E06000039","Slough","RN3",5
"E06000039","Slough","RN5",5
"E06000039","Slough","RQX",4
"E06000039","Slough","RNZ",4
"E06000039","Slough","RGP",4
"E06000039","Slough","RNS",4
"E06000039","Slough","RTP",4
"E06000039","Slough","RR8",3
"E06000039","Slough","RP4",3
"E06000039","Slough","RA9",3
"E06000039","Slough","RA7",3
"E06000039","Slough","RVV",3
"E06000039","Slough","RJE",3
"E06000039","Slough","RVJ",3
"E06000039","Slough","RAP",3
"E06000039","Slough","RKB",3
"E06000039","Slough","RL4",3
"E06000039","Slough","R0A",2
"E06000039","Slough","REM",2
"E06000039","Slough","RWW",2
"E06000039","Slough","RC1",2
"E06000039","Slough","REF",2
"E06000039","Slough","RMC",2
"E06000039","Slough","RX1",2
"E06000039","Slough","RXX",2
"E06000039","Slough","RWF",1
"E06000039","Slough","RAT",1
"E06000039","Slough","RGT",1
"E06000039","Slough","RQ8",1
"E06000039","Slough","RX3",1
"E06000039","Slough","RXH",1
"E06000039","Slough","RBZ",1
"E06000039","Slough","RFF",1
"E06000039","Slough","RK9",1
"E06000039","Slough","RN7",1
"E06000039","Slough","RNU",1
"E06000039","Slough","RXG",1
"E06000039","Slough","RAN",1
"E06000039","Slough","RTF",1
"E06000039","Slough","RWE",1
"E06000039","Slough","RAE",1
"E06000039","Slough","RAJ",1
"E06000039","Slough","RTD",1
"E06000039","Slough","RTE",1
"E06000039","Slough","RXC",1
"E06000039","Slough","RBA",1
"E06000039","Slough","RBK",1
"E06000039","Slough","RBD",1
"E06000039","Slough","RCB",1
"E06000039","Slough","RJ2",1
"E06000039","Slough","RJ6",1
"E06000039","Slough","RM1",1
"E06000039","Slough","RNQ",1
"E06000039","Slough","RA4",1
"E06000039","Slough","RD3",1
"E06000039","Slough","RTX",1
"E06000039","Slough","RWA",1
"E06000040","Windsor and Maidenhead","RDU",15264
"E06000040","Windsor and Maidenhead","RHW",628
"E06000040","Windsor and Maidenhead","RXQ",291
"E06000040","Windsor and Maidenhead","RTH",257
"E06000040","Windsor and Maidenhead","RTK",238
"E06000040","Windsor and Maidenhead","RWX",135
"E06000040","Windsor and Maidenhead","RYJ",79
"E06000040","Windsor and Maidenhead","R1K",60
"E06000040","Windsor and Maidenhead","RA2",50
"E06000040","Windsor and Maidenhead","RQM",44
"E06000040","Windsor and Maidenhead","RAS",34
"E06000040","Windsor and Maidenhead","RJ7",26
"E06000040","Windsor and Maidenhead","RRV",23
"E06000040","Windsor and Maidenhead","RJ1",22
"E06000040","Windsor and Maidenhead","RHM",20
"E06000040","Windsor and Maidenhead","R1H",19
"E06000040","Windsor and Maidenhead","RT3",17
"E06000040","Windsor and Maidenhead","RPY",16
"E06000040","Windsor and Maidenhead","RWH",14
"E06000040","Windsor and Maidenhead","RN5",12
"E06000040","Windsor and Maidenhead","RAX",11
"E06000040","Windsor and Maidenhead","REF",11
"E06000040","Windsor and Maidenhead","RD3",9
"E06000040","Windsor and Maidenhead","RJZ",8
"E06000040","Windsor and Maidenhead","RAL",8
"E06000040","Windsor and Maidenhead","RWG",8
"E06000040","Windsor and Maidenhead","RP6",7
"E06000040","Windsor and Maidenhead","RVR",7
"E06000040","Windsor and Maidenhead","RK9",7
"E06000040","Windsor and Maidenhead","RA7",6
"E06000040","Windsor and Maidenhead","RA9",6
"E06000040","Windsor and Maidenhead","RXC",6
"E06000040","Windsor and Maidenhead","RN3",5
"E06000040","Windsor and Maidenhead","RD8",5
"E06000040","Windsor and Maidenhead","RWE",5
"E06000040","Windsor and Maidenhead","RDZ",5
"E06000040","Windsor and Maidenhead","RXH",5
"E06000040","Windsor and Maidenhead","RD1",4
"E06000040","Windsor and Maidenhead","RM1",4
"E06000040","Windsor and Maidenhead","RVJ",4
"E06000040","Windsor and Maidenhead","RC1",4
"E06000040","Windsor and Maidenhead","RCB",4
"E06000040","Windsor and Maidenhead","RYR",4
"E06000040","Windsor and Maidenhead","RHU",4
"E06000040","Windsor and Maidenhead","RRK",6
"E06000040","Windsor and Maidenhead","RJC",3
"E06000040","Windsor and Maidenhead","RNZ",3
"E06000040","Windsor and Maidenhead","RHQ",3
"E06000040","Windsor and Maidenhead","RC9",3
"E06000040","Windsor and Maidenhead","RTX",3
"E06000040","Windsor and Maidenhead","RKE",3
"E06000040","Windsor and Maidenhead","RAN",3
"E06000040","Windsor and Maidenhead","RWF",3
"E06000040","Windsor and Maidenhead","R1F",2
"E06000040","Windsor and Maidenhead","RR8",2
"E06000040","Windsor and Maidenhead","RCX",2
"E06000040","Windsor and Maidenhead","REM",2
"E06000040","Windsor and Maidenhead","RWJ",2
"E06000040","Windsor and Maidenhead","RXW",3
"E06000040","Windsor and Maidenhead","RWY",2
"E06000040","Windsor and Maidenhead","RTD",2
"E06000040","Windsor and Maidenhead","RFS",2
"E06000040","Windsor and Maidenhead","RGT",2
"E06000040","Windsor and Maidenhead","RH8",2
"E06000040","Windsor and Maidenhead","RTG",2
"E06000040","Windsor and Maidenhead","RBZ",2
"E06000040","Windsor and Maidenhead","RGN",2
"E06000040","Windsor and Maidenhead","RJ2",2
"E06000040","Windsor and Maidenhead","RNU",2
"E06000040","Windsor and Maidenhead","RTE",2
"E06000040","Windsor and Maidenhead","RW1",2
"E06000040","Windsor and Maidenhead","RAE",2
"E06000040","Windsor and Maidenhead","RBK",2
"E06000040","Windsor and Maidenhead","RXT",2
"E06000040","Windsor and Maidenhead","RXX",2
"E06000040","Windsor and Maidenhead","RJN",1
"E06000040","Windsor and Maidenhead","RN7",1
"E06000040","Windsor and Maidenhead","RP5",1
"E06000040","Windsor and Maidenhead","RQX",1
"E06000040","Windsor and Maidenhead","RJL",1
"E06000040","Windsor and Maidenhead","RNL",1
"E06000040","Windsor and Maidenhead","RTP",1
"E06000040","Windsor and Maidenhead","RJE",1
"E06000040","Windsor and Maidenhead","RWP",1
"E06000040","Windsor and Maidenhead","RXK",2
"E06000040","Windsor and Maidenhead","RA4",1
"E06000040","Windsor and Maidenhead","RP4",1
"E06000040","Windsor and Maidenhead","RQW",1
"E06000040","Windsor and Maidenhead","RTR",1
"E06000040","Windsor and Maidenhead","RBD",1
"E06000040","Windsor and Maidenhead","RVW",1
"E06000040","Windsor and Maidenhead","RBL",1
"E06000040","Windsor and Maidenhead","RNS",1
"E06000040","Windsor and Maidenhead","RX1",1
"E06000040","Windsor and Maidenhead","R0A",1
"E06000040","Windsor and Maidenhead","RBT",1
"E06000040","Windsor and Maidenhead","RCU",1
"E06000040","Windsor and Maidenhead","RGM",1
"E06000040","Windsor and Maidenhead","RGR",1
"E06000040","Windsor and Maidenhead","RNA",1
"E06000040","Windsor and Maidenhead","RTF",1
"E06000040","Windsor and Maidenhead","RVY",1
"E06000040","Windsor and Maidenhead","RXR",1
"E06000041","Wokingham","RHW",11742
"E06000041","Wokingham","RDU",1067
"E06000041","Wokingham","RTH",320
"E06000041","Wokingham","RWX",158
"E06000041","Wokingham","RN5",40
"E06000041","Wokingham","RA2",33
"E06000041","Wokingham","RXQ",30
"E06000041","Wokingham","RYJ",19
"E06000041","Wokingham","RJ7",18
"E06000041","Wokingham","RHM",17
"E06000041","Wokingham","R1H",17
"E06000041","Wokingham","RJ1",14
"E06000041","Wokingham","RTK",12
"E06000041","Wokingham","REF",12
"E06000041","Wokingham","RRV",12
"E06000041","Wokingham","RDZ",11
"E06000041","Wokingham","RAS",10
"E06000041","Wokingham","RQM",9
"E06000041","Wokingham","R1K",8
"E06000041","Wokingham","RP6",8
"E06000041","Wokingham","RPY",8
"E06000041","Wokingham","RVR",8
"E06000041","Wokingham","R0A",8
"E06000041","Wokingham","RBD",7
"E06000041","Wokingham","RTE",7
"E06000041","Wokingham","RRK",8
"E06000041","Wokingham","RJZ",6
"E06000041","Wokingham","RN3",6
"E06000041","Wokingham","RBA",6
"E06000041","Wokingham","RJC",5
"E06000041","Wokingham","RAL",5
"E06000041","Wokingham","RKB",5
"E06000041","Wokingham","RYR",5
"E06000041","Wokingham","RD8",4
"E06000041","Wokingham","RJ6",4
"E06000041","Wokingham","RVV",4
"E06000041","Wokingham","RA7",4
"E06000041","Wokingham","RD3",4
"E06000041","Wokingham","RH8",4
"E06000041","Wokingham","RWG",4
"E06000041","Wokingham","RT3",4
"E06000041","Wokingham","R1F",3
"E06000041","Wokingham","RAX",3
"E06000041","Wokingham","RBZ",3
"E06000041","Wokingham","RHU",3
"E06000041","Wokingham","RK9",3
"E06000041","Wokingham","RNZ",3
"E06000041","Wokingham","RA3",3
"E06000041","Wokingham","RA9",3
"E06000041","Wokingham","RJE",3
"E06000041","Wokingham","RVJ",3
"E06000041","Wokingham","RXK",3
"E06000041","Wokingham","RA4",3
"E06000041","Wokingham","RCX",3
"E06000041","Wokingham","RBN",3
"E06000041","Wokingham","RGP",2
"E06000041","Wokingham","RQ8",2
"E06000041","Wokingham","RXP",2
"E06000041","Wokingham","RTP",2
"E06000041","Wokingham","RGT",2
"E06000041","Wokingham","RWE",2
"E06000041","Wokingham","RWW",2
"E06000041","Wokingham","RXW",2
"E06000041","Wokingham","RXH",2
"E06000041","Wokingham","RCB",2
"E06000041","Wokingham","RCF",2
"E06000041","Wokingham","RC1",2
"E06000041","Wokingham","RFS",2
"E06000041","Wokingham","RTX",2
"E06000041","Wokingham","RXN",2
"E06000041","Wokingham","RJ2",3
"E06000041","Wokingham","RAE",1
"E06000041","Wokingham","RBK",1
"E06000041","Wokingham","RBQ",1
"E06000041","Wokingham","RD1",1
"E06000041","Wokingham","RJN",1
"E06000041","Wokingham","RKE",1
"E06000041","Wokingham","RW1",1
"E06000041","Wokingham","RWH",1
"E06000041","Wokingham","RWK",1
"E06000041","Wokingham","RAN",1
"E06000041","Wokingham","RTQ",1
"E06000041","Wokingham","RTR",1
"E06000041","Wokingham","RXC",1
"E06000041","Wokingham","RC9",1
"E06000041","Wokingham","RDE",1
"E06000041","Wokingham","RXF",1
"E06000041","Wokingham","RCD",1
"E06000041","Wokingham","RNQ",1
"E06000041","Wokingham","RPA",1
"E06000041","Wokingham","RBL",1
"E06000041","Wokingham","RF4",1
"E06000041","Wokingham","RGN",1
"E06000041","Wokingham","RQW",1
"E06000041","Wokingham","RGR",1
"E06000041","Wokingham","RJR",1
"E06000041","Wokingham","RMP",1
"E06000041","Wokingham","RW6",1
"E06000041","Wokingham","RDD",1
"E06000041","Wokingham","RM1",1
"E06000041","Wokingham","RTD",1
"E06000041","Wokingham","RWP",1
"E06000041","Wokingham","RHQ",1
"E06000041","Wokingham","RJL",1
"E06000041","Wokingham","RNN",1
"E06000041","Wokingham","RQX",1
"E06000041","Wokingham","RR8",1
"E06000041","Wokingham","RTF",1
"E06000041","Wokingham","RW5",1
"E06000042","Milton Keynes","RD8",30803
"E06000042","Milton Keynes","RTH",967
"E06000042","Milton Keynes","RNS",393
"E06000042","Milton Keynes","RV3",316
"E06000042","Milton Keynes","RXQ",291
"E06000042","Milton Keynes","RC1",245
"E06000042","Milton Keynes","RC9",218
"E06000042","Milton Keynes","RGT",43
"E06000042","Milton Keynes","R1H",36
"E06000042","Milton Keynes","RNQ",29
"E06000042","Milton Keynes","RJ1",29
"E06000042","Milton Keynes","RKB",25
"E06000042","Milton Keynes","RRV",28
"E06000042","Milton Keynes","RYJ",22
"E06000042","Milton Keynes","R1K",22
"E06000042","Milton Keynes","RQM",21
"E06000042","Milton Keynes","RWH",18
"E06000042","Milton Keynes","RP1",16
"E06000042","Milton Keynes","RWG",16
"E06000042","Milton Keynes","RJZ",15
"E06000042","Milton Keynes","RAL",14
"E06000042","Milton Keynes","RHM",14
"E06000042","Milton Keynes","RTE",13
"E06000042","Milton Keynes","RK9",13
"E06000042","Milton Keynes","RDE",12
"E06000042","Milton Keynes","RT3",12
"E06000042","Milton Keynes","RWD",11
"E06000042","Milton Keynes","RWK",10
"E06000042","Milton Keynes","RRK",18
"E06000042","Milton Keynes","RCX",9
"E06000042","Milton Keynes","RGN",9
"E06000042","Milton Keynes","RWE",9
"E06000042","Milton Keynes","RDZ",8
"E06000042","Milton Keynes","REF",8
"E06000042","Milton Keynes","RAS",8
"E06000042","Milton Keynes","RVV",8
"E06000042","Milton Keynes","RH8",7
"E06000042","Milton Keynes","RD3",7
"E06000042","Milton Keynes","RP6",7
"E06000042","Milton Keynes","RGP",6
"E06000042","Milton Keynes","R0A",6
"E06000042","Milton Keynes","RXL",5
"E06000042","Milton Keynes","RBZ",5
"E06000042","Milton Keynes","RGR",5
"E06000042","Milton Keynes","RHW",5
"E06000042","Milton Keynes","RYR",5
"E06000042","Milton Keynes","RX1",5
"E06000042","Milton Keynes","RXK",6
"E06000042","Milton Keynes","REM",7
"E06000042","Milton Keynes","RA9",5
"E06000042","Milton Keynes","RCB",5
"E06000042","Milton Keynes","RDU",5
"E06000042","Milton Keynes","RJ7",4
"E06000042","Milton Keynes","RQX",4
"E06000042","Milton Keynes","RN7",4
"E06000042","Milton Keynes","RBA",4
"E06000042","Milton Keynes","RJC",4
"E06000042","Milton Keynes","RWF",4
"E06000042","Milton Keynes","RF4",4
"E06000042","Milton Keynes","RTG",4
"E06000042","Milton Keynes","RDD",4
"E06000042","Milton Keynes","RN5",4
"E06000042","Milton Keynes","RTP",4
"E06000042","Milton Keynes","RXH",4
"E06000042","Milton Keynes","RXP",4
"E06000042","Milton Keynes","RJ2",3
"E06000042","Milton Keynes","RKE",3
"E06000042","Milton Keynes","RM1",3
"E06000042","Milton Keynes","RPA",3
"E06000042","Milton Keynes","RXW",3
"E06000042","Milton Keynes","RMP",3
"E06000042","Milton Keynes","RPY",3
"E06000042","Milton Keynes","RTX",3
"E06000042","Milton Keynes","RVY",3
"E06000042","Milton Keynes","RQW",3
"E06000042","Milton Keynes","RAE",3
"E06000042","Milton Keynes","RAN",3
"E06000042","Milton Keynes","RQ8",3
"E06000042","Milton Keynes","RA4",3
"E06000042","Milton Keynes","RAP",3
"E06000042","Milton Keynes","RAX",3
"E06000042","Milton Keynes","RTK",3
"E06000042","Milton Keynes","RA7",3
"E06000042","Milton Keynes","RHA",3
"E06000042","Milton Keynes","RNU",3
"E06000042","Milton Keynes","RNZ",3
"E06000042","Milton Keynes","RXC",3
"E06000042","Milton Keynes","RD1",2
"E06000042","Milton Keynes","RHQ",2
"E06000042","Milton Keynes","R1F",2
"E06000042","Milton Keynes","RBD",2
"E06000042","Milton Keynes","RFF",2
"E06000042","Milton Keynes","RW6",2
"E06000042","Milton Keynes","RLQ",2
"E06000042","Milton Keynes","RBN",2
"E06000042","Milton Keynes","RJE",2
"E06000042","Milton Keynes","RW1",2
"E06000042","Milton Keynes","RA2",2
"E06000042","Milton Keynes","RWA",2
"E06000042","Milton Keynes","RAJ",2
"E06000042","Milton Keynes","RFR",2
"E06000042","Milton Keynes","RHU",1
"E06000042","Milton Keynes","RR7",1
"E06000042","Milton Keynes","RT5",1
"E06000042","Milton Keynes","RTD",1
"E06000042","Milton Keynes","RVJ",1
"E06000042","Milton Keynes","RXT",1
"E06000042","Milton Keynes","R0B",1
"E06000042","Milton Keynes","RJ6",1
"E06000042","Milton Keynes","RL4",1
"E06000042","Milton Keynes","RGM",1
"E06000042","Milton Keynes","RLT",1
"E06000042","Milton Keynes","RVN",1
"E06000042","Milton Keynes","RJN",1
"E06000042","Milton Keynes","RK5",1
"E06000042","Milton Keynes","RBK",1
"E06000042","Milton Keynes","RBT",1
"E06000042","Milton Keynes","RH5",1
"E06000042","Milton Keynes","RN3",1
"E06000042","Milton Keynes","R1L",1
"E06000042","Milton Keynes","RA3",1
"E06000042","Milton Keynes","RJR",1
"E06000042","Milton Keynes","RNL",1
"E06000042","Milton Keynes","RWJ",1
"E06000042","Milton Keynes","RWY",1
"E06000042","Milton Keynes","RBL",1
"E06000042","Milton Keynes","RMC",1
"E06000042","Milton Keynes","RXR",1
"E06000042","Milton Keynes","RJL",1
"E06000042","Milton Keynes","RM3",1
"E06000042","Milton Keynes","RP4",1
"E06000042","Milton Keynes","RTF",1
"E06000043","Brighton and Hove","RXH",19212
"E06000043","Brighton and Hove","RYR",685
"E06000043","Brighton and Hove","RX2",295
"E06000043","Brighton and Hove","RPC",206
"E06000043","Brighton and Hove","RXC",62
"E06000043","Brighton and Hove","RJ1",58
"E06000043","Brighton and Hove","RJ7",44
"E06000043","Brighton and Hove","RTP",42
"E06000043","Brighton and Hove","RPY",32
"E06000043","Brighton and Hove","RJZ",32
"E06000043","Brighton and Hove","RA2",30
"E06000043","Brighton and Hove","RYJ",27
"E06000043","Brighton and Hove","RRV",28
"E06000043","Brighton and Hove","R1H",26
"E06000043","Brighton and Hove","RWF",26
"E06000043","Brighton and Hove","RHU",20
"E06000043","Brighton and Hove","RHM",16
"E06000043","Brighton and Hove","RQM",16
"E06000043","Brighton and Hove","RDZ",16
"E06000043","Brighton and Hove","RT3",16
"E06000043","Brighton and Hove","R1F",14
"E06000043","Brighton and Hove","R1K",14
"E06000043","Brighton and Hove","RDU",13
"E06000043","Brighton and Hove","RVR",12
"E06000043","Brighton and Hove","RD3",10
"E06000043","Brighton and Hove","REF",10
"E06000043","Brighton and Hove","RTH",10
"E06000043","Brighton and Hove","RVV",10
"E06000043","Brighton and Hove","R0A",9
"E06000043","Brighton and Hove","RAX",9
"E06000043","Brighton and Hove","RVJ",9
"E06000043","Brighton and Hove","RN7",8
"E06000043","Brighton and Hove","RQX",8
"E06000043","Brighton and Hove","RAL",8
"E06000043","Brighton and Hove","RGT",7
"E06000043","Brighton and Hove","RJ2",12
"E06000043","Brighton and Hove","RC1",7
"E06000043","Brighton and Hove","RWG",7
"E06000043","Brighton and Hove","RA4",6
"E06000043","Brighton and Hove","RKE",6
"E06000043","Brighton and Hove","RGN",6
"E06000043","Brighton and Hove","RN5",5
"E06000043","Brighton and Hove","RNQ",5
"E06000043","Brighton and Hove","RNZ",5
"E06000043","Brighton and Hove","RXQ",5
"E06000043","Brighton and Hove","RM1",5
"E06000043","Brighton and Hove","RTE",5
"E06000043","Brighton and Hove","RH8",5
"E06000043","Brighton and Hove","RAS",5
"E06000043","Brighton and Hove","RWH",5
"E06000043","Brighton and Hove","RQ8",5
"E06000043","Brighton and Hove","RTK",5
"E06000043","Brighton and Hove","RTF",4
"E06000043","Brighton and Hove","RWK",4
"E06000043","Brighton and Hove","RBD",4
"E06000043","Brighton and Hove","RDR",4
"E06000043","Brighton and Hove","RBA",4
"E06000043","Brighton and Hove","RD8",4
"E06000043","Brighton and Hove","RJL",4
"E06000043","Brighton and Hove","RNS",4
"E06000043","Brighton and Hove","RWY",3
"E06000043","Brighton and Hove","RX1",3
"E06000043","Brighton and Hove","RDE",3
"E06000043","Brighton and Hove","RHW",3
"E06000043","Brighton and Hove","RBZ",3
"E06000043","Brighton and Hove","RF4",3
"E06000043","Brighton and Hove","RLQ",3
"E06000043","Brighton and Hove","RA7",3
"E06000043","Brighton and Hove","RAP",2
"E06000043","Brighton and Hove","RXX",2
"E06000043","Brighton and Hove","RQW",2
"E06000043","Brighton and Hove","RAE",2
"E06000043","Brighton and Hove","RKB",2
"E06000043","Brighton and Hove","R0B",3
"E06000043","Brighton and Hove","RR7",2
"E06000043","Brighton and Hove","RW6",2
"E06000043","Brighton and Hove","RDD",3
"E06000043","Brighton and Hove","RM3",2
"E06000043","Brighton and Hove","RP6",2
"E06000043","Brighton and Hove","RTR",2
"E06000043","Brighton and Hove","RGP",2
"E06000043","Brighton and Hove","RJ6",2
"E06000043","Brighton and Hove","RW1",2
"E06000043","Brighton and Hove","RA3",1
"E06000043","Brighton and Hove","RCB",1
"E06000043","Brighton and Hove","RPA",1
"E06000043","Brighton and Hove","RPG",1
"E06000043","Brighton and Hove","RXK",1
"E06000043","Brighton and Hove","RXP",1
"E06000043","Brighton and Hove","RXW",1
"E06000043","Brighton and Hove","RJ8",1
"E06000043","Brighton and Hove","RTD",1
"E06000043","Brighton and Hove","RA9",1
"E06000043","Brighton and Hove","RBL",1
"E06000043","Brighton and Hove","RDY",1
"E06000043","Brighton and Hove","RP4",1
"E06000043","Brighton and Hove","RR8",1
"E06000043","Brighton and Hove","RV3",1
"E06000043","Brighton and Hove","RWD",1
"E06000043","Brighton and Hove","RWW",1
"E06000043","Brighton and Hove","RBT",1
"E06000043","Brighton and Hove","RH5",1
"E06000043","Brighton and Hove","RD1",1
"E06000043","Brighton and Hove","RN3",1
"E06000043","Brighton and Hove","RWP",1
"E06000043","Brighton and Hove","RCF",1
"E06000043","Brighton and Hove","RGR",1
"E06000043","Brighton and Hove","RHQ",1
"E06000043","Brighton and Hove","RJE",1
"E06000043","Brighton and Hove","RK9",1
"E06000043","Brighton and Hove","RL4",1
"E06000043","Brighton and Hove","REM",1
"E06000043","Brighton and Hove","RNL",1
"E06000043","Brighton and Hove","RRK",2
"E06000043","Brighton and Hove","RVW",1
"E06000043","Brighton and Hove","RAN",1
"E06000043","Brighton and Hove","RCD",1
"E06000043","Brighton and Hove","RK5",1
"E06000043","Brighton and Hove","RP5",1
"E06000043","Brighton and Hove","RXF",1
"E06000043","Brighton and Hove","RXL",1
"E06000044","Portsmouth","RHU",18935
"E06000044","Portsmouth","RHM",414
"E06000044","Portsmouth","RYR",90
"E06000044","Portsmouth","RNZ",31
"E06000044","Portsmouth","RN5",25
"E06000044","Portsmouth","RA2",24
"E06000044","Portsmouth","RJ1",19
"E06000044","Portsmouth","RW1",18
"E06000044","Portsmouth","RDU",17
"E06000044","Portsmouth","R1F",17
"E06000044","Portsmouth","RDZ",16
"E06000044","Portsmouth","RTP",14
"E06000044","Portsmouth","RXH",14
"E06000044","Portsmouth","RN3",13
"E06000044","Portsmouth","RD3",12
"E06000044","Portsmouth","RYJ",11
"E06000044","Portsmouth","REF",11
"E06000044","Portsmouth","RJZ",11
"E06000044","Portsmouth","RTH",10
"E06000044","Portsmouth","RJ7",10
"E06000044","Portsmouth","R1H",10
"E06000044","Portsmouth","RRK",10
"E06000044","Portsmouth","RVR",9
"E06000044","Portsmouth","RVJ",8
"E06000044","Portsmouth","RWG",8
"E06000044","Portsmouth","RHW",8
"E06000044","Portsmouth","RQM",7
"E06000044","Portsmouth","RH8",7
"E06000044","Portsmouth","RBD",7
"E06000044","Portsmouth","RK9",6
"E06000044","Portsmouth","RAX",6
"E06000044","Portsmouth","RA4",5
"E06000044","Portsmouth","RRV",7
"E06000044","Portsmouth","RAL",5
"E06000044","Portsmouth","RC9",4
"E06000044","Portsmouth","RXC",4
"E06000044","Portsmouth","RAS",4
"E06000044","Portsmouth","RVV",4
"E06000044","Portsmouth","RD1",4
"E06000044","Portsmouth","RWH",4
"E06000044","Portsmouth","RA9",4
"E06000044","Portsmouth","RGT",3
"E06000044","Portsmouth","RTX",3
"E06000044","Portsmouth","RDD",3
"E06000044","Portsmouth","RKB",3
"E06000044","Portsmouth","RQX",3
"E06000044","Portsmouth","RCX",3
"E06000044","Portsmouth","RWF",3
"E06000044","Portsmouth","RBZ",3
"E06000044","Portsmouth","RF4",3
"E06000044","Portsmouth","R1K",3
"E06000044","Portsmouth","RD8",3
"E06000044","Portsmouth","RBA",2
"E06000044","Portsmouth","RJC",2
"E06000044","Portsmouth","REM",2
"E06000044","Portsmouth","RBT",2
"E06000044","Portsmouth","RAP",2
"E06000044","Portsmouth","RH5",2
"E06000044","Portsmouth","RTK",2
"E06000044","Portsmouth","RVW",2
"E06000044","Portsmouth","RXW",2
"E06000044","Portsmouth","RAN",2
"E06000044","Portsmouth","RC1",2
"E06000044","Portsmouth","RM3",2
"E06000044","Portsmouth","RN7",2
"E06000044","Portsmouth","RQ8",2
"E06000044","Portsmouth","RP4",2
"E06000044","Portsmouth","RWD",2
"E06000044","Portsmouth","RWE",2
"E06000044","Portsmouth","RXQ",2
"E06000044","Portsmouth","R0A",2
"E06000044","Portsmouth","RJE",2
"E06000044","Portsmouth","RT3",2
"E06000044","Portsmouth","RWP",2
"E06000044","Portsmouth","RP6",2
"E06000044","Portsmouth","RCB",1
"E06000044","Portsmouth","RGM",1
"E06000044","Portsmouth","RGN",1
"E06000044","Portsmouth","RGP",1
"E06000044","Portsmouth","RHQ",1
"E06000044","Portsmouth","RNU",1
"E06000044","Portsmouth","RK5",1
"E06000044","Portsmouth","RLT",1
"E06000044","Portsmouth","RNL",1
"E06000044","Portsmouth","RPC",1
"E06000044","Portsmouth","RWK",1
"E06000044","Portsmouth","R0B",1
"E06000044","Portsmouth","RP5",1
"E06000044","Portsmouth","RTV",1
"E06000044","Portsmouth","RXP",1
"E06000044","Portsmouth","RBL",1
"E06000044","Portsmouth","RCF",1
"E06000044","Portsmouth","RDE",1
"E06000044","Portsmouth","RQW",1
"E06000044","Portsmouth","RTE",1
"E06000044","Portsmouth","RWX",1
"E06000044","Portsmouth","RXT",1
"E06000044","Portsmouth","RA7",1
"E06000044","Portsmouth","RBN",1
"E06000044","Portsmouth","RFF",1
"E06000044","Portsmouth","RLQ",1
"E06000044","Portsmouth","RMP",1
"E06000044","Portsmouth","RTD",1
"E06000044","Portsmouth","RJ6",1
"E06000044","Portsmouth","RX4",1
"E06000044","Portsmouth","RXN",1
"E06000044","Portsmouth","RKE",1
"E06000044","Portsmouth","RNN",1
"E06000044","Portsmouth","RA3",1
"E06000044","Portsmouth","RGR",1
"E06000044","Portsmouth","RJL",1
"E06000044","Portsmouth","RM1",1
"E06000044","Portsmouth","RTR",1
"E06000044","Portsmouth","RVN",1
"E06000044","Portsmouth","RWW",1
"E06000044","Portsmouth","RX1",1
"E06000045","Southampton","RHM",28729
"E06000045","Southampton","RHU",274
"E06000045","Southampton","RW1",257
"E06000045","Southampton","RN5",167
"E06000045","Southampton","RNZ",94
"E06000045","Southampton","RDZ",43
"E06000045","Southampton","RDU",35
"E06000045","Southampton","RD3",34
"E06000045","Southampton","RYR",27
"E06000045","Southampton","R1C",27
"E06000045","Southampton","RJ1",20
"E06000045","Southampton","RTH",18
"E06000045","Southampton","RBD",16
"E06000045","Southampton","RA2",14
"E06000045","Southampton","RTP",13
"E06000045","Southampton","RJ7",13
"E06000045","Southampton","REF",12
"E06000045","Southampton","RVJ",12
"E06000045","Southampton","RA4",10
"E06000045","Southampton","RYJ",10
"E06000045","Southampton","R1F",9
"E06000045","Southampton","RD1",9
"E06000045","Southampton","RH8",9
"E06000045","Southampton","RXH",8
"E06000045","Southampton","RHW",8
"E06000045","Southampton","RAX",8
"E06000045","Southampton","RQM",7
"E06000045","Southampton","R1H",7
"E06000045","Southampton","RNS",7
"E06000045","Southampton","RBA",7
"E06000045","Southampton","RWF",7
"E06000045","Southampton","RAL",6
"E06000045","Southampton","RWE",6
"E06000045","Southampton","RA7",5
"E06000045","Southampton","RRV",8
"E06000045","Southampton","RRK",7
"E06000045","Southampton","RBZ",5
"E06000045","Southampton","RJZ",5
"E06000045","Southampton","RTX",5
"E06000045","Southampton","RXK",8
"E06000045","Southampton","RGT",5
"E06000045","Southampton","RA9",5
"E06000045","Southampton","RWK",5
"E06000045","Southampton","RK9",5
"E06000045","Southampton","RWH",4
"E06000045","Southampton","R1K",4
"E06000045","Southampton","RTE",4
"E06000045","Southampton","RGM",4
"E06000045","Southampton","RJC",4
"E06000045","Southampton","RN3",4
"E06000045","Southampton","RKB",4
"E06000045","Southampton","RM1",4
"E06000045","Southampton","RWJ",4
"E06000045","Southampton","RJ6",3
"E06000045","Southampton","RTK",3
"E06000045","Southampton","RWD",3
"E06000045","Southampton","RQ8",3
"E06000045","Southampton","RA3",3
"E06000045","Southampton","RXQ",3
"E06000045","Southampton","RP5",4
"E06000045","Southampton","RVW",3
"E06000045","Southampton","RNU",3
"E06000045","Southampton","RXL",3
"E06000045","Southampton","RAJ",3
"E06000045","Southampton","RAP",3
"E06000045","Southampton","RD8",3
"E06000045","Southampton","RGN",2
"E06000045","Southampton","RN7",2
"E06000045","Southampton","RDE",2
"E06000045","Southampton","R0A",2
"E06000045","Southampton","RBT",2
"E06000045","Southampton","RT3",2
"E06000045","Southampton","RWA",2
"E06000045","Southampton","RAN",2
"E06000045","Southampton","RPY",2
"E06000045","Southampton","RAS",2
"E06000045","Southampton","RDY",2
"E06000045","Southampton","RXC",2
"E06000045","Southampton","RBL",2
"E06000045","Southampton","RJR",2
"E06000045","Southampton","RR8",2
"E06000045","Southampton","RVR",2
"E06000045","Southampton","RJE",2
"E06000045","Southampton","RTG",2
"E06000045","Southampton","RWG",2
"E06000045","Southampton","RKE",1
"E06000045","Southampton","RQ3",1
"E06000045","Southampton","RX1",1
"E06000045","Southampton","RXE",1
"E06000045","Southampton","RQX",1
"E06000045","Southampton","RWW",1
"E06000045","Southampton","RX4",1
"E06000045","Southampton","RC9",1
"E06000045","Southampton","RPA",1
"E06000045","Southampton","REM",2
"E06000045","Southampton","RTD",1
"E06000045","Southampton","RXF",1
"E06000045","Southampton","RXN",1
"E06000045","Southampton","RH5",1
"E06000045","Southampton","RP4",1
"E06000045","Southampton","RNL",1
"E06000045","Southampton","RJ2",1
"E06000045","Southampton","RLQ",1
"E06000045","Southampton","RMP",1
"E06000045","Southampton","RXR",1
"E06000045","Southampton","RBK",1
"E06000045","Southampton","RF4",1
"E06000045","Southampton","RMY",1
"E06000045","Southampton","RAE",1
"E06000045","Southampton","RXX",1
"E06000046","Isle of Wight","R1F",12544
"E06000046","Isle of Wight","RHM",438
"E06000046","Isle of Wight","RHU",233
"E06000046","Isle of Wight","RNZ",46
"E06000046","Isle of Wight","RDU",19
"E06000046","Isle of Wight","RJ1",13
"E06000046","Isle of Wight","RYR",12
"E06000046","Isle of Wight","RTH",9
"E06000046","Isle of Wight","RVR",8
"E06000046","Isle of Wight","RQM",8
"E06000046","Isle of Wight","RAX",8
"E06000046","Isle of Wight","RJ7",8
"E06000046","Isle of Wight","RN5",7
"E06000046","Isle of Wight","RD3",7
"E06000046","Isle of Wight","RTP",7
"E06000046","Isle of Wight","RXH",7
"E06000046","Isle of Wight","RRK",10
"E06000046","Isle of Wight","REF",6
"E06000046","Isle of Wight","RGT",6
"E06000046","Isle of Wight","RXQ",6
"E06000046","Isle of Wight","R1K",6
"E06000046","Isle of Wight","RT3",6
"E06000046","Isle of Wight","R1H",5
"E06000046","Isle of Wight","RXC",5
"E06000046","Isle of Wight","RA2",5
"E06000046","Isle of Wight","RHW",5
"E06000046","Isle of Wight","RD1",5
"E06000046","Isle of Wight","RRV",5
"E06000046","Isle of Wight","RCB",5
"E06000046","Isle of Wight","RWH",5
"E06000046","Isle of Wight","RA9",5
"E06000046","Isle of Wight","RDZ",5
"E06000046","Isle of Wight","RBA",5
"E06000046","Isle of Wight","RJ2",4
"E06000046","Isle of Wight","RYJ",4
"E06000046","Isle of Wight","RWF",4
"E06000046","Isle of Wight","RLQ",4
"E06000046","Isle of Wight","RA4",4
"E06000046","Isle of Wight","RM1",3
"E06000046","Isle of Wight","RKE",3
"E06000046","Isle of Wight","RM3",3
"E06000046","Isle of Wight","RPY",3
"E06000046","Isle of Wight","RN7",3
"E06000046","Isle of Wight","RNL",2
"E06000046","Isle of Wight","RC9",2
"E06000046","Isle of Wight","RGM",2
"E06000046","Isle of Wight","RK9",2
"E06000046","Isle of Wight","RR8",2
"E06000046","Isle of Wight","RTE",2
"E06000046","Isle of Wight","RJC",2
"E06000046","Isle of Wight","RWE",2
"E06000046","Isle of Wight","RXN",2
"E06000046","Isle of Wight","RA7",2
"E06000046","Isle of Wight","RAP",2
"E06000046","Isle of Wight","RJN",2
"E06000046","Isle of Wight","RQX",2
"E06000046","Isle of Wight","RVJ",2
"E06000046","Isle of Wight","RVV",2
"E06000046","Isle of Wight","RAL",2
"E06000046","Isle of Wight","RTF",2
"E06000046","Isle of Wight","RDD",1
"E06000046","Isle of Wight","RH5",1
"E06000046","Isle of Wight","RH8",1
"E06000046","Isle of Wight","REM",2
"E06000046","Isle of Wight","RTX",1
"E06000046","Isle of Wight","RX1",1
"E06000046","Isle of Wight","RXK",1
"E06000046","Isle of Wight","RDE",1
"E06000046","Isle of Wight","RP6",1
"E06000046","Isle of Wight","RTK",1
"E06000046","Isle of Wight","RW1",1
"E06000046","Isle of Wight","RP4",1
"E06000046","Isle of Wight","RR7",1
"E06000046","Isle of Wight","RTG",1
"E06000046","Isle of Wight","RK5",1
"E06000046","Isle of Wight","RL4",1
"E06000046","Isle of Wight","RTD",1
"E06000046","Isle of Wight","RXF",1
"E06000046","Isle of Wight","RXL",1
"E06000046","Isle of Wight","RXW",1
"E06000046","Isle of Wight","RBZ",1
"E06000046","Isle of Wight","RF4",1
"E06000046","Isle of Wight","RQ8",1
"E06000046","Isle of Wight","RJ6",1
"E06000046","Isle of Wight","RJZ",1
"E06000046","Isle of Wight","RNQ",1
"E06000046","Isle of Wight","RXP",1
"E06000046","Isle of Wight","RCD",1
"E06000046","Isle of Wight","RWG",1
"E06000046","Isle of Wight","RBD",1
"E06000046","Isle of Wight","RBL",1
"E06000046","Isle of Wight","RKB",1
"E06000047","County Durham","RXP",47301
"E06000047","County Durham","R0B",6818
"E06000047","County Durham","RVW",6185
"E06000047","County Durham","RTD",2248
"E06000047","County Durham","RTR",1642
"E06000047","County Durham","RR7",900
"E06000047","County Durham","RX3",792
"E06000047","County Durham","RTF",146
"E06000047","County Durham","RCB",57
"E06000047","County Durham","RNL",41
"E06000047","County Durham","R0A",25
"E06000047","County Durham","RR8",17
"E06000047","County Durham","RX4",15
"E06000047","County Durham","RXL",15
"E06000047","County Durham","RWD",15
"E06000047","County Durham","RCD",14
"E06000047","County Durham","RX1",12
"E06000047","County Durham","RRV",12
"E06000047","County Durham","RM1",10
"E06000047","County Durham","RDU",9
"E06000047","County Durham","RTX",9
"E06000047","County Durham","RWY",8
"E06000047","County Durham","RHQ",8
"E06000047","County Durham","RW6",8
"E06000047","County Durham","RJL",8
"E06000047","County Durham","RQM",8
"E06000047","County Durham","RAL",8
"E06000047","County Durham","RJ7",8
"E06000047","County Durham","RJE",8
"E06000047","County Durham","RWA",8
"E06000047","County Durham","RXF",7
"E06000047","County Durham","RTH",6
"E06000047","County Durham","RCX",6
"E06000047","County Durham","RJC",6
"E06000047","County Durham","RTG",7
"E06000047","County Durham","RTE",6
"E06000047","County Durham","RFS",6
"E06000047","County Durham","RD8",5
"E06000047","County Durham","RGT",5
"E06000047","County Durham","RYR",5
"E06000047","County Durham","RDZ",5
"E06000047","County Durham","R1H",5
"E06000047","County Durham","RDE",5
"E06000047","County Durham","RJR",5
"E06000047","County Durham","RAE",5
"E06000047","County Durham","RM3",5
"E06000047","County Durham","RXQ",5
"E06000047","County Durham","RVV",5
"E06000047","County Durham","RGP",5
"E06000047","County Durham","RJ1",5
"E06000047","County Durham","RWJ",5
"E06000047","County Durham","RKB",5
"E06000047","County Durham","RP5",7
"E06000047","County Durham","REM",9
"E06000047","County Durham","RHM",4
"E06000047","County Durham","RWP",4
"E06000047","County Durham","R1K",4
"E06000047","County Durham","RA2",4
"E06000047","County Durham","RBD",4
"E06000047","County Durham","RBL",4
"E06000047","County Durham","RXN",4
"E06000047","County Durham","RWW",4
"E06000047","County Durham","RAS",4
"E06000047","County Durham","RBA",4
"E06000047","County Durham","RQ8",4
"E06000047","County Durham","RCF",4
"E06000047","County Durham","RK9",4
"E06000047","County Durham","RBN",4
"E06000047","County Durham","RFF",4
"E06000047","County Durham","RRK",6
"E06000047","County Durham","RWE",4
"E06000047","County Durham","RTK",3
"E06000047","County Durham","RNS",3
"E06000047","County Durham","RXH",3
"E06000047","County Durham","RFR",3
"E06000047","County Durham","RWH",3
"E06000047","County Durham","RNZ",3
"E06000047","County Durham","RC1",3
"E06000047","County Durham","RJ2",5
"E06000047","County Durham","RGN",3
"E06000047","County Durham","RHW",3
"E06000047","County Durham","RA7",2
"E06000047","County Durham","RK5",2
"E06000047","County Durham","RA4",2
"E06000047","County Durham","RC9",2
"E06000047","County Durham","RQX",2
"E06000047","County Durham","RTP",2
"E06000047","County Durham","RBZ",2
"E06000047","County Durham","RN5",2
"E06000047","County Durham","RXR",2
"E06000047","County Durham","RW5",2
"E06000047","County Durham","RWF",2
"E06000047","County Durham","RXW",2
"E06000047","County Durham","RQW",2
"E06000047","County Durham","RJZ",2
"E06000047","County Durham","RMP",2
"E06000047","County Durham","RNQ",2
"E06000047","County Durham","RHU",2
"E06000047","County Durham","RMC",2
"E06000047","County Durham","RVY",2
"E06000047","County Durham","RL4",2
"E06000047","County Durham","RT5",1
"E06000047","County Durham","RXC",1
"E06000047","County Durham","RXK",2
"E06000047","County Durham","RYV",1
"E06000047","County Durham","RAP",1
"E06000047","County Durham","RAT",1
"E06000047","County Durham","RLT",1
"E06000047","County Durham","RNA",1
"E06000047","County Durham","RRF",1
"E06000047","County Durham","RWG",1
"E06000047","County Durham","RYJ",1
"E06000047","County Durham","RAX",1
"E06000047","County Durham","RD1",1
"E06000047","County Durham","RGD",1
"E06000047","County Durham","RGR",1
"E06000047","County Durham","RPY",1
"E06000047","County Durham","RXE",1
"E06000047","County Durham","RAJ",1
"E06000047","County Durham","RLQ",1
"E06000047","County Durham","RN3",1
"E06000047","County Durham","RA9",1
"E06000047","County Durham","RNN",1
"E06000047","County Durham","R1F",1
"E06000047","County Durham","RDD",1
"E06000047","County Durham","REF",1
"E06000047","County Durham","RF4",1
"E06000047","County Durham","RP7",1
"E06000047","County Durham","RCU",1
"E06000049","Cheshire East","RBT",23340
"E06000049","Cheshire East","RJN",12825
"E06000049","Cheshire East","R0A",2687
"E06000049","Cheshire East","RJE",2176
"E06000049","Cheshire East","RWJ",1835
"E06000049","Cheshire East","RBV",450
"E06000049","Cheshire East","RXA",408
"E06000049","Cheshire East","RM3",315
"E06000049","Cheshire East","RJR",158
"E06000049","Cheshire East","RBN",140
"E06000049","Cheshire East","RBS",139
"E06000049","Cheshire East","RWW",137
"E06000049","Cheshire East","REM",108
"E06000049","Cheshire East","RTX",26
"E06000049","Cheshire East","RW6",23
"E06000049","Cheshire East","RBL",23
"E06000049","Cheshire East","RXW",29
"E06000049","Cheshire East","RRK",25
"E06000049","Cheshire East","RET",14
"E06000049","Cheshire East","REF",14
"E06000049","Cheshire East","REP",14
"E06000049","Cheshire East","RHQ",14
"E06000049","Cheshire East","RXL",13
"E06000049","Cheshire East","RXR",13
"E06000049","Cheshire East","RCB",13
"E06000049","Cheshire East","RR8",12
"E06000049","Cheshire East","RMP",12
"E06000049","Cheshire East","RTH",11
"E06000049","Cheshire East","RBQ",11
"E06000049","Cheshire East","RNL",11
"E06000049","Cheshire East","REN",10
"E06000049","Cheshire East","RRF",9
"E06000049","Cheshire East","RVY",9
"E06000049","Cheshire East","RRV",9
"E06000049","Cheshire East","RJ1",8
"E06000049","Cheshire East","RGT",8
"E06000049","Cheshire East","RTG",12
"E06000049","Cheshire East","RNS",8
"E06000049","Cheshire East","RTF",8
"E06000049","Cheshire East","RWP",7
"E06000049","Cheshire East","RDU",6
"E06000049","Cheshire East","RX1",6
"E06000049","Cheshire East","RLQ",6
"E06000049","Cheshire East","RLY",6
"E06000049","Cheshire East","RQ3",6
"E06000049","Cheshire East","RBD",6
"E06000049","Cheshire East","RWE",6
"E06000049","Cheshire East","RFS",6
"E06000049","Cheshire East","RH8",6
"E06000049","Cheshire East","RCD",5
"E06000049","Cheshire East","RHM",5
"E06000049","Cheshire East","RJZ",5
"E06000049","Cheshire East","RXH",5
"E06000049","Cheshire East","RAL",5
"E06000049","Cheshire East","RL1",5
"E06000049","Cheshire East","RWD",5
"E06000049","Cheshire East","RQM",5
"E06000049","Cheshire East","R1H",5
"E06000049","Cheshire East","RVV",5
"E06000049","Cheshire East","R1F",5
"E06000049","Cheshire East","RXN",5
"E06000049","Cheshire East","RA9",5
"E06000049","Cheshire East","RYR",5
"E06000049","Cheshire East","RTE",4
"E06000049","Cheshire East","RWY",4
"E06000049","Cheshire East","RBZ",4
"E06000049","Cheshire East","RYJ",4
"E06000049","Cheshire East","RJC",4
"E06000049","Cheshire East","RWG",4
"E06000049","Cheshire East","RC9",4
"E06000049","Cheshire East","RBA",4
"E06000049","Cheshire East","RD3",4
"E06000049","Cheshire East","RGR",3
"E06000049","Cheshire East","RN3",3
"E06000049","Cheshire East","RRE",3
"E06000049","Cheshire East","RA7",3
"E06000049","Cheshire East","RDZ",3
"E06000049","Cheshire East","RNZ",3
"E06000049","Cheshire East","RTD",3
"E06000049","Cheshire East","RWF",3
"E06000049","Cheshire East","RL4",3
"E06000049","Cheshire East","RD8",3
"E06000049","Cheshire East","RM1",3
"E06000049","Cheshire East","RTV",3
"E06000049","Cheshire East","RXK",5
"E06000049","Cheshire East","RAS",3
"E06000049","Cheshire East","RP5",3
"E06000049","Cheshire East","RXP",3
"E06000049","Cheshire East","RAE",3
"E06000049","Cheshire East","RNA",3
"E06000049","Cheshire East","RCF",2
"E06000049","Cheshire East","RK9",2
"E06000049","Cheshire East","RA2",2
"E06000049","Cheshire East","RKB",2
"E06000049","Cheshire East","RVR",2
"E06000049","Cheshire East","RLT",2
"E06000049","Cheshire East","RMC",2
"E06000049","Cheshire East","RGP",2
"E06000049","Cheshire East","RVW",2
"E06000049","Cheshire East","R1K",2
"E06000049","Cheshire East","RBK",2
"E06000049","Cheshire East","RQ8",2
"E06000049","Cheshire East","RQW",2
"E06000049","Cheshire East","RXF",2
"E06000049","Cheshire East","RGN",2
"E06000049","Cheshire East","RHW",2
"E06000049","Cheshire East","RJ7",2
"E06000049","Cheshire East","RTR",3
"E06000049","Cheshire East","RWH",2
"E06000049","Cheshire East","RXC",2
"E06000049","Cheshire East","RVJ",2
"E06000049","Cheshire East","R1L",1
"E06000049","Cheshire East","RA3",1
"E06000049","Cheshire East","RA4",1
"E06000049","Cheshire East","RDE",1
"E06000049","Cheshire East","RF4",1
"E06000049","Cheshire East","RN5",1
"E06000049","Cheshire East","RW5",1
"E06000049","Cheshire East","RFF",1
"E06000049","Cheshire East","RAJ",1
"E06000049","Cheshire East","RD1",1
"E06000049","Cheshire East","RN7",1
"E06000049","Cheshire East","RW4",1
"E06000049","Cheshire East","RCX",1
"E06000049","Cheshire East","RKE",1
"E06000049","Cheshire East","RTK",1
"E06000049","Cheshire East","RFR",1
"E06000049","Cheshire East","RJL",1
"E06000049","Cheshire East","RX4",1
"E06000049","Cheshire East","R0B",1
"E06000049","Cheshire East","RXT",1
"E06000049","Cheshire East","RDD",1
"E06000049","Cheshire East","RXQ",1
"E06000050","Cheshire West and Chester","RJR",22851
"E06000050","Cheshire West and Chester","RBT",12822
"E06000050","Cheshire West and Chester","RBL",2367
"E06000050","Cheshire West and Chester","RWW",610
"E06000050","Cheshire West and Chester","RJE",497
"E06000050","Cheshire West and Chester","RBS",314
"E06000050","Cheshire West and Chester","RXA",304
"E06000050","Cheshire West and Chester","R0A",286
"E06000050","Cheshire West and Chester","REM",431
"E06000050","Cheshire West and Chester","REN",243
"E06000050","Cheshire West and Chester","RBQ",230
"E06000050","Cheshire West and Chester","RBN",211
"E06000050","Cheshire West and Chester","RET",135
"E06000050","Cheshire West and Chester","RBV",122
"E06000050","Cheshire West and Chester","RJN",101
"E06000050","Cheshire West and Chester","RM3",56
"E06000050","Cheshire West and Chester","RTX",23
"E06000050","Cheshire West and Chester","RWJ",21
"E06000050","Cheshire West and Chester","RXW",29
"E06000050","Cheshire West and Chester","RW6",16
"E06000050","Cheshire West and Chester","REP",15
"E06000050","Cheshire West and Chester","RJ1",15
"E06000050","Cheshire West and Chester","REF",14
"E06000050","Cheshire West and Chester","RXL",14
"E06000050","Cheshire West and Chester","RCB",11
"E06000050","Cheshire West and Chester","RTG",10
"E06000050","Cheshire West and Chester","RVY",14
"E06000050","Cheshire West and Chester","RL1",10
"E06000050","Cheshire West and Chester","RR8",9
"E06000050","Cheshire West and Chester","RRF",9
"E06000050","Cheshire West and Chester","RRV",9
"E06000050","Cheshire West and Chester","RQM",8
"E06000050","Cheshire West and Chester","RTE",8
"E06000050","Cheshire West and Chester","RTH",7
"E06000050","Cheshire West and Chester","RNL",7
"E06000050","Cheshire West and Chester","RAL",7
"E06000050","Cheshire West and Chester","RH8",7
"E06000050","Cheshire West and Chester","RRK",12
"E06000050","Cheshire West and Chester","RYJ",7
"E06000050","Cheshire West and Chester","RA7",6
"E06000050","Cheshire West and Chester","RA9",6
"E06000050","Cheshire West and Chester","RHQ",6
"E06000050","Cheshire West and Chester","RKB",6
"E06000050","Cheshire West and Chester","RTF",6
"E06000050","Cheshire West and Chester","RXN",6
"E06000050","Cheshire West and Chester","RJ7",5
"E06000050","Cheshire West and Chester","R1H",5
"E06000050","Cheshire West and Chester","RD1",5
"E06000050","Cheshire West and Chester","RGN",5
"E06000050","Cheshire West and Chester","RHU",5
"E06000050","Cheshire West and Chester","RLQ",4
"E06000050","Cheshire West and Chester","RJC",4
"E06000050","Cheshire West and Chester","RWP",4
"E06000050","Cheshire West and Chester","RGT",4
"E06000050","Cheshire West and Chester","RVW",4
"E06000050","Cheshire West and Chester","RNQ",4
"E06000050","Cheshire West and Chester","R1F",3
"E06000050","Cheshire West and Chester","RD8",3
"E06000050","Cheshire West and Chester","RLT",3
"E06000050","Cheshire West and Chester","RWG",3
"E06000050","Cheshire West and Chester","RX1",3
"E06000050","Cheshire West and Chester","RC9",3
"E06000050","Cheshire West and Chester","RN5",3
"E06000050","Cheshire West and Chester","RVJ",3
"E06000050","Cheshire West and Chester","RHM",3
"E06000050","Cheshire West and Chester","RTD",3
"E06000050","Cheshire West and Chester","RDD",3
"E06000050","Cheshire West and Chester","RP5",4
"E06000050","Cheshire West and Chester","RDE",3
"E06000050","Cheshire West and Chester","RK9",3
"E06000050","Cheshire West and Chester","RTV",3
"E06000050","Cheshire West and Chester","RWD",3
"E06000050","Cheshire West and Chester","RXK",3
"E06000050","Cheshire West and Chester","RD3",3
"E06000050","Cheshire West and Chester","RN3",3
"E06000050","Cheshire West and Chester","RQX",3
"E06000050","Cheshire West and Chester","RAE",2
"E06000050","Cheshire West and Chester","RXR",2
"E06000050","Cheshire West and Chester","RFS",2
"E06000050","Cheshire West and Chester","RK5",2
"E06000050","Cheshire West and Chester","RCD",2
"E06000050","Cheshire West and Chester","RCF",2
"E06000050","Cheshire West and Chester","RHW",2
"E06000050","Cheshire West and Chester","R1K",2
"E06000050","Cheshire West and Chester","RC1",2
"E06000050","Cheshire West and Chester","RJ6",2
"E06000050","Cheshire West and Chester","RN7",2
"E06000050","Cheshire West and Chester","RTR",2
"E06000050","Cheshire West and Chester","RXP",2
"E06000050","Cheshire West and Chester","RJZ",2
"E06000050","Cheshire West and Chester","RVR",2
"E06000050","Cheshire West and Chester","RWY",2
"E06000050","Cheshire West and Chester","RDU",2
"E06000050","Cheshire West and Chester","RW4",2
"E06000050","Cheshire West and Chester","RA4",2
"E06000050","Cheshire West and Chester","RBZ",2
"E06000050","Cheshire West and Chester","RL4",2
"E06000050","Cheshire West and Chester","RMP",2
"E06000050","Cheshire West and Chester","RNA",2
"E06000050","Cheshire West and Chester","RA2",1
"E06000050","Cheshire West and Chester","RBD",1
"E06000050","Cheshire West and Chester","RMC",1
"E06000050","Cheshire West and Chester","RPA",1
"E06000050","Cheshire West and Chester","RTP",1
"E06000050","Cheshire West and Chester","RWE",1
"E06000050","Cheshire West and Chester","R1D",1
"E06000050","Cheshire West and Chester","RBA",1
"E06000050","Cheshire West and Chester","RGP",1
"E06000050","Cheshire West and Chester","RQ3",1
"E06000050","Cheshire West and Chester","RRE",1
"E06000050","Cheshire West and Chester","RTK",1
"E06000050","Cheshire West and Chester","RBK",1
"E06000050","Cheshire West and Chester","RDZ",1
"E06000050","Cheshire West and Chester","RH5",1
"E06000050","Cheshire West and Chester","RWA",1
"E06000050","Cheshire West and Chester","RXQ",1
"E06000050","Cheshire West and Chester","RJL",1
"E06000050","Cheshire West and Chester","RQW",1
"E06000050","Cheshire West and Chester","RAP",1
"E06000050","Cheshire West and Chester","RAX",1
"E06000050","Cheshire West and Chester","RCX",1
"E06000050","Cheshire West and Chester","RJ2",1
"E06000050","Cheshire West and Chester","RXC",1
"E06000050","Cheshire West and Chester","RYR",1
"E06000050","Cheshire West and Chester","RCU",1
"E06000050","Cheshire West and Chester","RT3",1
"E06000050","Cheshire West and Chester","RWF",1
"E06000050","Cheshire West and Chester","RXE",1
"E06000050","Cheshire West and Chester","RP7",1
"E06000050","Cheshire West and Chester","RVV",1
"E06000050","Cheshire West and Chester","RAJ",1
"E06000050","Cheshire West and Chester","RAS",1
"E06000050","Cheshire West and Chester","RF4",1
"E06000050","Cheshire West and Chester","RGM",1
"E06000050","Cheshire West and Chester","RGR",1
"E06000050","Cheshire West and Chester","RW1",1
"E06000051","Shropshire","RXW",29590
"E06000051","Shropshire","RLQ",973
"E06000051","Shropshire","RJE",785
"E06000051","Shropshire","RWP",567
"E06000051","Shropshire","RL4",505
"E06000051","Shropshire","R1D",399
"E06000051","Shropshire","RRE",366
"E06000051","Shropshire","RBT",146
"E06000051","Shropshire","RNA",140
"E06000051","Shropshire","RRK",166
"E06000051","Shropshire","RL1",93
"E06000051","Shropshire","RJR",58
"E06000051","Shropshire","RQ3",56
"E06000051","Shropshire","R0A",30
"E06000051","Shropshire","RBS",24
"E06000051","Shropshire","RQM",16
"E06000051","Shropshire","RBQ",14
"E06000051","Shropshire","REF",14
"E06000051","Shropshire","RTH",13
"E06000051","Shropshire","REM",18
"E06000051","Shropshire","RET",11
"E06000051","Shropshire","RTE",11
"E06000051","Shropshire","RBV",10
"E06000051","Shropshire","RXK",23
"E06000051","Shropshire","RYJ",9
"E06000051","Shropshire","RBA",9
"E06000051","Shropshire","RBL",9
"E06000051","Shropshire","RA9",8
"E06000051","Shropshire","RBN",8
"E06000051","Shropshire","RTR",8
"E06000051","Shropshire","RTX",8
"E06000051","Shropshire","RDU",8
"E06000051","Shropshire","RKB",7
"E06000051","Shropshire","RDZ",7
"E06000051","Shropshire","RHM",7
"E06000051","Shropshire","RBK",7
"E06000051","Shropshire","RCB",7
"E06000051","Shropshire","RVJ",6
"E06000051","Shropshire","RXN",6
"E06000051","Shropshire","R1H",6
"E06000051","Shropshire","RC1",6
"E06000051","Shropshire","RJC",6
"E06000051","Shropshire","RH8",6
"E06000051","Shropshire","RD1",5
"E06000051","Shropshire","RRV",6
"E06000051","Shropshire","RWE",5
"E06000051","Shropshire","RBZ",5
"E06000051","Shropshire","RVY",6
"E06000051","Shropshire","RA4",5
"E06000051","Shropshire","RHU",5
"E06000051","Shropshire","RGT",5
"E06000051","Shropshire","RHQ",5
"E06000051","Shropshire","RXQ",5
"E06000051","Shropshire","RJ1",4
"E06000051","Shropshire","RR8",4
"E06000051","Shropshire","RTG",8
"E06000051","Shropshire","RXP",4
"E06000051","Shropshire","RGM",4
"E06000051","Shropshire","RGN",4
"E06000051","Shropshire","RHW",4
"E06000051","Shropshire","R1K",4
"E06000051","Shropshire","RFS",4
"E06000051","Shropshire","RX1",4
"E06000051","Shropshire","RJL",4
"E06000051","Shropshire","RM3",4
"E06000051","Shropshire","RTF",4
"E06000051","Shropshire","RXL",4
"E06000051","Shropshire","RK9",4
"E06000051","Shropshire","RTP",4
"E06000051","Shropshire","RN3",3
"E06000051","Shropshire","RTK",3
"E06000051","Shropshire","RXR",3
"E06000051","Shropshire","RK5",3
"E06000051","Shropshire","RWF",3
"E06000051","Shropshire","RD8",3
"E06000051","Shropshire","R1A",3
"E06000051","Shropshire","RTD",3
"E06000051","Shropshire","TAJ",3
"E06000051","Shropshire","RA7",3
"E06000051","Shropshire","RR7",3
"E06000051","Shropshire","RCF",3
"E06000051","Shropshire","RWW",3
"E06000051","Shropshire","RJN",2
"E06000051","Shropshire","RN7",2
"E06000051","Shropshire","RVR",2
"E06000051","Shropshire","RW6",2
"E06000051","Shropshire","RWA",2
"E06000051","Shropshire","RF4",2
"E06000051","Shropshire","RN5",2
"E06000051","Shropshire","RXC",2
"E06000051","Shropshire","RA3",2
"E06000051","Shropshire","R0B",2
"E06000051","Shropshire","RXF",2
"E06000051","Shropshire","RC9",2
"E06000051","Shropshire","RLY",2
"E06000051","Shropshire","RP5",2
"E06000051","Shropshire","RRJ",2
"E06000051","Shropshire","RCU",2
"E06000051","Shropshire","RD3",2
"E06000051","Shropshire","RGP",2
"E06000051","Shropshire","RJZ",2
"E06000051","Shropshire","RNL",2
"E06000051","Shropshire","RAE",2
"E06000051","Shropshire","RBD",2
"E06000051","Shropshire","RCD",2
"E06000051","Shropshire","RDE",2
"E06000051","Shropshire","RYR",2
"E06000051","Shropshire","RQ8",1
"E06000051","Shropshire","RQW",1
"E06000051","Shropshire","RWG",1
"E06000051","Shropshire","RXA",1
"E06000051","Shropshire","RWD",1
"E06000051","Shropshire","RAX",1
"E06000051","Shropshire","RFF",1
"E06000051","Shropshire","RJ7",1
"E06000051","Shropshire","RP6",1
"E06000051","Shropshire","RAJ",1
"E06000051","Shropshire","RAL",1
"E06000051","Shropshire","RCX",1
"E06000051","Shropshire","REN",1
"E06000051","Shropshire","RJ2",1
"E06000051","Shropshire","RNS",1
"E06000051","Shropshire","RPC",1
"E06000051","Shropshire","RA2",1
"E06000051","Shropshire","RM1",1
"E06000051","Shropshire","RWH",1
"E06000051","Shropshire","RWJ",1
"E06000051","Shropshire","R1F",1
"E06000051","Shropshire","RPY",1
"E06000051","Shropshire","RGR",1
"E06000051","Shropshire","RP7",1
"E06000051","Shropshire","RVV",1
"E06000051","Shropshire","RXH",1
"E06000052","Cornwall","REF",44725
"E06000052","Cornwall","RK9",11986
"E06000052","Cornwall","RBZ",1552
"E06000052","Cornwall","RJ8",550
"E06000052","Cornwall","RH8",248
"E06000052","Cornwall","RA7",239
"E06000052","Cornwall","RBA",59
"E06000052","Cornwall","RA9",55
"E06000052","Cornwall","RVJ",52
"E06000052","Cornwall","RTH",34
"E06000052","Cornwall","RTE",32
"E06000052","Cornwall","RDU",22
"E06000052","Cornwall","RJ1",21
"E06000052","Cornwall","RD1",21
"E06000052","Cornwall","RJZ",18
"E06000052","Cornwall","RHM",18
"E06000052","Cornwall","R1H",16
"E06000052","Cornwall","RA4",15
"E06000052","Cornwall","RBD",15
"E06000052","Cornwall","RYJ",15
"E06000052","Cornwall","RDZ",14
"E06000052","Cornwall","RHW",14
"E06000052","Cornwall","RRV",17
"E06000052","Cornwall","RYR",14
"E06000052","Cornwall","RHU",13
"E06000052","Cornwall","RNZ",12
"E06000052","Cornwall","RN5",11
"E06000052","Cornwall","RRK",18
"E06000052","Cornwall","RDE",11
"E06000052","Cornwall","RLQ",10
"E06000052","Cornwall","RQM",10
"E06000052","Cornwall","RA3",10
"E06000052","Cornwall","R0A",10
"E06000052","Cornwall","RT3",10
"E06000052","Cornwall","RQ8",10
"E06000052","Cornwall","RXQ",10
"E06000052","Cornwall","RA2",9
"E06000052","Cornwall","RC9",9
"E06000052","Cornwall","RJ7",9
"E06000052","Cornwall","RKB",9
"E06000052","Cornwall","RH5",9
"E06000052","Cornwall","RWP",9
"E06000052","Cornwall","RW6",9
"E06000052","Cornwall","RVV",9
"E06000052","Cornwall","RN3",9
"E06000052","Cornwall","RD3",9
"E06000052","Cornwall","RWE",9
"E06000052","Cornwall","RTG",11
"E06000052","Cornwall","RTP",8
"E06000052","Cornwall","RJC",8
"E06000052","Cornwall","RWF",8
"E06000052","Cornwall","RTX",8
"E06000052","Cornwall","RJE",8
"E06000052","Cornwall","RM1",7
"E06000052","Cornwall","RAX",7
"E06000052","Cornwall","RNS",7
"E06000052","Cornwall","RWG",7
"E06000052","Cornwall","RDD",6
"E06000052","Cornwall","RXC",6
"E06000052","Cornwall","RXH",6
"E06000052","Cornwall","R1K",6
"E06000052","Cornwall","RVR",6
"E06000052","Cornwall","RWD",5
"E06000052","Cornwall","RX1",5
"E06000052","Cornwall","RCF",5
"E06000052","Cornwall","RPA",5
"E06000052","Cornwall","RXL",5
"E06000052","Cornwall","REM",9
"E06000052","Cornwall","RWW",5
"E06000052","Cornwall","RCB",5
"E06000052","Cornwall","RQ3",5
"E06000052","Cornwall","RGN",4
"E06000052","Cornwall","RGR",4
"E06000052","Cornwall","R1F",4
"E06000052","Cornwall","RAS",4
"E06000052","Cornwall","RR8",4
"E06000052","Cornwall","RGT",4
"E06000052","Cornwall","RAL",4
"E06000052","Cornwall","RFF",4
"E06000052","Cornwall","RJL",4
"E06000052","Cornwall","RWA",4
"E06000052","Cornwall","RTK",4
"E06000052","Cornwall","RBL",3
"E06000052","Cornwall","RXN",3
"E06000052","Cornwall","RBT",3
"E06000052","Cornwall","RD8",3
"E06000052","Cornwall","RL4",3
"E06000052","Cornwall","RNQ",3
"E06000052","Cornwall","RJ2",5
"E06000052","Cornwall","RLT",3
"E06000052","Cornwall","RFS",3
"E06000052","Cornwall","RXW",6
"E06000052","Cornwall","RAP",3
"E06000052","Cornwall","RC1",3
"E06000052","Cornwall","RVY",3
"E06000052","Cornwall","RHQ",3
"E06000052","Cornwall","RQW",3
"E06000052","Cornwall","RBK",2
"E06000052","Cornwall","RPC",2
"E06000052","Cornwall","RXR",2
"E06000052","Cornwall","RAJ",2
"E06000052","Cornwall","RT5",2
"E06000052","Cornwall","RTF",2
"E06000052","Cornwall","RXF",2
"E06000052","Cornwall","RAN",2
"E06000052","Cornwall","RGM",2
"E06000052","Cornwall","RTR",4
"E06000052","Cornwall","RDY",2
"E06000052","Cornwall","RM3",2
"E06000052","Cornwall","RWH",2
"E06000052","Cornwall","R1L",2
"E06000052","Cornwall","RNA",2
"E06000052","Cornwall","RP5",2
"E06000052","Cornwall","RN7",1
"E06000052","Cornwall","RP4",1
"E06000052","Cornwall","RRF",1
"E06000052","Cornwall","RCX",1
"E06000052","Cornwall","RP6",1
"E06000052","Cornwall","RXK",2
"E06000052","Cornwall","R0B",1
"E06000052","Cornwall","RJ6",1
"E06000052","Cornwall","RJR",1
"E06000052","Cornwall","RMC",1
"E06000052","Cornwall","RMP",1
"E06000052","Cornwall","RAE",1
"E06000052","Cornwall","RBS",1
"E06000052","Cornwall","RET",1
"E06000052","Cornwall","RGP",1
"E06000052","Cornwall","RPY",1
"E06000052","Cornwall","RWJ",1
"E06000052","Cornwall","RKE",1
"E06000052","Cornwall","RVW",1
"E06000052","Cornwall","RW5",1
"E06000052","Cornwall","RXE",1
"E06000052","Cornwall","RXP",1
"E06000052","Cornwall","RBQ",1
"E06000052","Cornwall","RXX",1
"E06000052","Cornwall","RAT",1
"E06000052","Cornwall","RNL",1
"E06000052","Cornwall","RR7",1
"E06000052","Cornwall","RW1",1
"E06000053","Isles of Scilly","REF",133
"E06000053","Isles of Scilly","RJ8",89
"E06000053","Isles of Scilly","RK9",4
"E06000053","Isles of Scilly","RA9",3
"E06000053","Isles of Scilly","R1H",1
"E06000053","Isles of Scilly","RJ1",1
"E06000053","Isles of Scilly","RA3",1
"E06000054","Wiltshire","RD1",18764
"E06000054","Wiltshire","RNZ",15993
"E06000054","Wiltshire","RN3",12194
"E06000054","Wiltshire","RVJ",619
"E06000054","Wiltshire","RHM",582
"E06000054","Wiltshire","RA7",532
"E06000054","Wiltshire","RTH",238
"E06000054","Wiltshire","RVN",201
"E06000054","Wiltshire","RN5",186
"E06000054","Wiltshire","RDZ",151
"E06000054","Wiltshire","RTE",141
"E06000054","Wiltshire","AXG",202
"E06000054","Wiltshire","RA4",86
"E06000054","Wiltshire","RHU",85
"E06000054","Wiltshire","RD3",55
"E06000054","Wiltshire","RDU",51
"E06000054","Wiltshire","RBA",48
"E06000054","Wiltshire","REF",46
"E06000054","Wiltshire","RBD",45
"E06000054","Wiltshire","RJ1",32
"E06000054","Wiltshire","RH8",31
"E06000054","Wiltshire","RYJ",27
"E06000054","Wiltshire","RA9",26
"E06000054","Wiltshire","RBZ",24
"E06000054","Wiltshire","RRK",34
"E06000054","Wiltshire","RT3",23
"E06000054","Wiltshire","RHW",23
"E06000054","Wiltshire","RQM",22
"E06000054","Wiltshire","R1H",19
"E06000054","Wiltshire","RA2",17
"E06000054","Wiltshire","RJ7",17
"E06000054","Wiltshire","RK9",17
"E06000054","Wiltshire","RWP",17
"E06000054","Wiltshire","RNU",16
"E06000054","Wiltshire","RRV",17
"E06000054","Wiltshire","RA3",15
"E06000054","Wiltshire","RTP",14
"E06000054","Wiltshire","RYR",13
"E06000054","Wiltshire","RH5",13
"E06000054","Wiltshire","RAL",12
"E06000054","Wiltshire","RLQ",10
"E06000054","Wiltshire","RXC",10
"E06000054","Wiltshire","RJE",10
"E06000054","Wiltshire","RGR",10
"E06000054","Wiltshire","R1K",9
"E06000054","Wiltshire","RAX",9
"E06000054","Wiltshire","RJZ",9
"E06000054","Wiltshire","RXQ",8
"E06000054","Wiltshire","RCB",8
"E06000054","Wiltshire","RTX",8
"E06000054","Wiltshire","RVV",8
"E06000054","Wiltshire","RGT",7
"E06000054","Wiltshire","RN7",7
"E06000054","Wiltshire","RWD",7
"E06000054","Wiltshire","RDE",7
"E06000054","Wiltshire","RD8",7
"E06000054","Wiltshire","RDY",7
"E06000054","Wiltshire","RTG",10
"E06000054","Wiltshire","RJC",6
"E06000054","Wiltshire","RTF",6
"E06000054","Wiltshire","RTK",6
"E06000054","Wiltshire","RWG",6
"E06000054","Wiltshire","RWF",6
"E06000054","Wiltshire","RKB",6
"E06000054","Wiltshire","RNL",6
"E06000054","Wiltshire","RNS",6
"E06000054","Wiltshire","RAS",6
"E06000054","Wiltshire","RL4",5
"E06000054","Wiltshire","R0A",5
"E06000054","Wiltshire","RBT",5
"E06000054","Wiltshire","RXL",5
"E06000054","Wiltshire","RJ6",5
"E06000054","Wiltshire","RXW",8
"E06000054","Wiltshire","RGN",5
"E06000054","Wiltshire","RX1",5
"E06000054","Wiltshire","RXP",5
"E06000054","Wiltshire","RXR",4
"E06000054","Wiltshire","RJ2",7
"E06000054","Wiltshire","RQ8",4
"E06000054","Wiltshire","RXK",7
"E06000054","Wiltshire","R1F",4
"E06000054","Wiltshire","RCX",4
"E06000054","Wiltshire","RRE",4
"E06000054","Wiltshire","RTD",4
"E06000054","Wiltshire","RF4",4
"E06000054","Wiltshire","RHQ",4
"E06000054","Wiltshire","RVR",4
"E06000054","Wiltshire","RW1",4
"E06000054","Wiltshire","RW6",4
"E06000054","Wiltshire","RWE",4
"E06000054","Wiltshire","RPY",4
"E06000054","Wiltshire","RVY",4
"E06000054","Wiltshire","RBN",3
"E06000054","Wiltshire","REM",4
"E06000054","Wiltshire","RR8",3
"E06000054","Wiltshire","RM1",3
"E06000054","Wiltshire","RNA",3
"E06000054","Wiltshire","RQX",3
"E06000054","Wiltshire","RWH",3
"E06000054","Wiltshire","RXF",3
"E06000054","Wiltshire","RBL",3
"E06000054","Wiltshire","RXH",3
"E06000054","Wiltshire","RAP",2
"E06000054","Wiltshire","RCF",2
"E06000054","Wiltshire","RJL",2
"E06000054","Wiltshire","RXN",2
"E06000054","Wiltshire","RWX",2
"E06000054","Wiltshire","RFS",2
"E06000054","Wiltshire","RNQ",2
"E06000054","Wiltshire","RP6",2
"E06000054","Wiltshire","RQ3",4
"E06000054","Wiltshire","RC9",2
"E06000054","Wiltshire","RP4",2
"E06000054","Wiltshire","RWJ",2
"E06000054","Wiltshire","RWA",2
"E06000054","Wiltshire","RC1",2
"E06000054","Wiltshire","RJR",2
"E06000054","Wiltshire","RPA",2
"E06000054","Wiltshire","RTR",3
"E06000054","Wiltshire","RBK",2
"E06000054","Wiltshire","RJN",2
"E06000054","Wiltshire","RAT",1
"E06000054","Wiltshire","RCD",1
"E06000054","Wiltshire","RJ8",1
"E06000054","Wiltshire","RVW",1
"E06000054","Wiltshire","R0B",1
"E06000054","Wiltshire","RFF",1
"E06000054","Wiltshire","RAJ",1
"E06000054","Wiltshire","RGM",1
"E06000054","Wiltshire","RMY",1
"E06000054","Wiltshire","RRJ",1
"E06000054","Wiltshire","RWK",1
"E06000054","Wiltshire","RAE",1
"E06000054","Wiltshire","RFR",1
"E06000054","Wiltshire","RPC",1
"E06000054","Wiltshire","RGP",1
"E06000054","Wiltshire","RP5",2
"E06000054","Wiltshire","RQW",1
"E06000054","Wiltshire","RXG",1
"E06000054","Wiltshire","RDD",1
"E06000054","Wiltshire","R1J",1
"E06000054","Wiltshire","RKE",1
"E06000054","Wiltshire","RLT",1
"E06000054","Wiltshire","RRF",1
"E06000054","Wiltshire","RWW",1
"E06000054","Wiltshire","RXY",1
"E06000055","Bedford","RC1",17249
"E06000055","Bedford","RC9",505
"E06000055","Bedford","RGT",488
"E06000055","Bedford","RWK",301
"E06000055","Bedford","RWH",291
"E06000055","Bedford","RGN",217
"E06000055","Bedford","RD8",120
"E06000055","Bedford","RNQ",95
"E06000055","Bedford","RNS",90
"E06000055","Bedford","RGM",79
"E06000055","Bedford","RP6",35
"E06000055","Bedford","R1H",34
"E06000055","Bedford","RYV",31
"E06000055","Bedford","RXQ",28
"E06000055","Bedford","RRV",26
"E06000055","Bedford","RYJ",22
"E06000055","Bedford","RJ1",18
"E06000055","Bedford","RTH",14
"E06000055","Bedford","RGP",14
"E06000055","Bedford","RWE",11
"E06000055","Bedford","RWG",11
"E06000055","Bedford","RAL",10
"E06000055","Bedford","RKB",10
"E06000055","Bedford","RJC",9
"E06000055","Bedford","RCX",8
"E06000055","Bedford","R1K",8
"E06000055","Bedford","RX1",8
"E06000055","Bedford","RYR",8
"E06000055","Bedford","R1L",7
"E06000055","Bedford","RP4",7
"E06000055","Bedford","RQM",7
"E06000055","Bedford","RL4",7
"E06000055","Bedford","RM1",6
"E06000055","Bedford","RAS",5
"E06000055","Bedford","RBD",5
"E06000055","Bedford","RXC",5
"E06000055","Bedford","REF",5
"E06000055","Bedford","RA9",5
"E06000055","Bedford","RAN",4
"E06000055","Bedford","RDZ",4
"E06000055","Bedford","RK5",4
"E06000055","Bedford","RQX",4
"E06000055","Bedford","RCB",4
"E06000055","Bedford","RTE",4
"E06000055","Bedford","RW6",4
"E06000055","Bedford","RP1",4
"E06000055","Bedford","RN3",4
"E06000055","Bedford","RT3",4
"E06000055","Bedford","RD1",4
"E06000055","Bedford","RWD",4
"E06000055","Bedford","RXH",4
"E06000055","Bedford","RJ7",3
"E06000055","Bedford","RHW",3
"E06000055","Bedford","RAP",3
"E06000055","Bedford","RJZ",3
"E06000055","Bedford","RK9",3
"E06000055","Bedford","RQ8",3
"E06000055","Bedford","RQW",3
"E06000055","Bedford","RXW",4
"E06000055","Bedford","RLT",3
"E06000055","Bedford","RT1",3
"E06000055","Bedford","RXN",3
"E06000055","Bedford","RDU",3
"E06000055","Bedford","RTF",3
"E06000055","Bedford","RHQ",2
"E06000055","Bedford","RM3",2
"E06000055","Bedford","RP5",3
"E06000055","Bedford","RVR",2
"E06000055","Bedford","RVW",2
"E06000055","Bedford","RA7",2
"E06000055","Bedford","RBT",2
"E06000055","Bedford","RD3",2
"E06000055","Bedford","RDE",2
"E06000055","Bedford","RF4",2
"E06000055","Bedford","RFS",2
"E06000055","Bedford","RH8",2
"E06000055","Bedford","RHM",2
"E06000055","Bedford","RPA",2
"E06000055","Bedford","RWA",2
"E06000055","Bedford","RQ3",2
"E06000055","Bedford","RRK",3
"E06000055","Bedford","RN5",2
"E06000055","Bedford","RCD",2
"E06000055","Bedford","RDD",2
"E06000055","Bedford","R0B",2
"E06000055","Bedford","RXK",2
"E06000055","Bedford","RJR",2
"E06000055","Bedford","RVY",3
"E06000055","Bedford","RAX",1
"E06000055","Bedford","RBK",1
"E06000055","Bedford","RET",1
"E06000055","Bedford","RA2",1
"E06000055","Bedford","RBS",1
"E06000055","Bedford","RJ2",1
"E06000055","Bedford","RTG",1
"E06000055","Bedford","RXT",1
"E06000055","Bedford","RN7",1
"E06000055","Bedford","RTD",1
"E06000055","Bedford","RBN",1
"E06000055","Bedford","RNZ",1
"E06000055","Bedford","RGR",1
"E06000055","Bedford","RWP",1
"E06000055","Bedford","RNL",1
"E06000055","Bedford","RR8",1
"E06000055","Bedford","RTP",1
"E06000055","Bedford","RWF",1
"E06000055","Bedford","RWJ",1
"E06000055","Bedford","RWW",1
"E06000055","Bedford","R1F",1
"E06000055","Bedford","RA4",1
"E06000055","Bedford","RJL",1
"E06000055","Bedford","RVV",1
"E06000055","Bedford","RXL",1
"E06000055","Bedford","RVJ",1
"E06000056","Central Bedfordshire","RC9",13887
"E06000056","Central Bedfordshire","RC1",7886
"E06000056","Central Bedfordshire","RWH",4549
"E06000056","Central Bedfordshire","RD8",1836
"E06000056","Central Bedfordshire","RXQ",652
"E06000056","Central Bedfordshire","RGT",569
"E06000056","Central Bedfordshire","RWK",383
"E06000056","Central Bedfordshire","RT3",115
"E06000056","Central Bedfordshire","RTH",95
"E06000056","Central Bedfordshire","RWG",73
"E06000056","Central Bedfordshire","RRV",86
"E06000056","Central Bedfordshire","RAL",54
"E06000056","Central Bedfordshire","RYJ",47
"E06000056","Central Bedfordshire","RGM",43
"E06000056","Central Bedfordshire","RGN",43
"E06000056","Central Bedfordshire","RNS",42
"E06000056","Central Bedfordshire","R1H",38
"E06000056","Central Bedfordshire","RP6",33
"E06000056","Central Bedfordshire","RJ1",32
"E06000056","Central Bedfordshire","R1K",30
"E06000056","Central Bedfordshire","RGP",16
"E06000056","Central Bedfordshire","RM1",15
"E06000056","Central Bedfordshire","RDU",13
"E06000056","Central Bedfordshire","RJ7",13
"E06000056","Central Bedfordshire","REF",12
"E06000056","Central Bedfordshire","RQ8",11
"E06000056","Central Bedfordshire","RQM",11
"E06000056","Central Bedfordshire","RP4",11
"E06000056","Central Bedfordshire","RYV",11
"E06000056","Central Bedfordshire","RCX",10
"E06000056","Central Bedfordshire","RNQ",10
"E06000056","Central Bedfordshire","RAS",10
"E06000056","Central Bedfordshire","RDE",9
"E06000056","Central Bedfordshire","RD3",8
"E06000056","Central Bedfordshire","RJZ",8
"E06000056","Central Bedfordshire","RWE",8
"E06000056","Central Bedfordshire","RRK",10
"E06000056","Central Bedfordshire","RYR",7
"E06000056","Central Bedfordshire","RAJ",7
"E06000056","Central Bedfordshire","RHW",7
"E06000056","Central Bedfordshire","RA2",6
"E06000056","Central Bedfordshire","RX1",6
"E06000056","Central Bedfordshire","RXH",6
"E06000056","Central Bedfordshire","RPA",5
"E06000056","Central Bedfordshire","RBD",5
"E06000056","Central Bedfordshire","RPY",5
"E06000056","Central Bedfordshire","RBZ",5
"E06000056","Central Bedfordshire","RBA",5
"E06000056","Central Bedfordshire","RDZ",5
"E06000056","Central Bedfordshire","RH8",5
"E06000056","Central Bedfordshire","RNL",5
"E06000056","Central Bedfordshire","RXC",5
"E06000056","Central Bedfordshire","RHU",5
"E06000056","Central Bedfordshire","RAP",4
"E06000056","Central Bedfordshire","RKB",4
"E06000056","Central Bedfordshire","RTE",4
"E06000056","Central Bedfordshire","RKE",4
"E06000056","Central Bedfordshire","RVV",4
"E06000056","Central Bedfordshire","RA7",4
"E06000056","Central Bedfordshire","RTG",5
"E06000056","Central Bedfordshire","RBT",4
"E06000056","Central Bedfordshire","RHQ",4
"E06000056","Central Bedfordshire","RK9",4
"E06000056","Central Bedfordshire","RTX",4
"E06000056","Central Bedfordshire","RVR",4
"E06000056","Central Bedfordshire","RGR",3
"E06000056","Central Bedfordshire","RHM",3
"E06000056","Central Bedfordshire","RN3",3
"E06000056","Central Bedfordshire","RWA",3
"E06000056","Central Bedfordshire","R1F",3
"E06000056","Central Bedfordshire","RF4",3
"E06000056","Central Bedfordshire","RQX",3
"E06000056","Central Bedfordshire","R1L",3
"E06000056","Central Bedfordshire","REM",3
"E06000056","Central Bedfordshire","RD1",3
"E06000056","Central Bedfordshire","RJR",3
"E06000056","Central Bedfordshire","RK5",3
"E06000056","Central Bedfordshire","RNZ",3
"E06000056","Central Bedfordshire","RQW",3
"E06000056","Central Bedfordshire","RR7",3
"E06000056","Central Bedfordshire","RWD",3
"E06000056","Central Bedfordshire","RXP",3
"E06000056","Central Bedfordshire","RA3",3
"E06000056","Central Bedfordshire","RN5",3
"E06000056","Central Bedfordshire","RVJ",3
"E06000056","Central Bedfordshire","RV3",3
"E06000056","Central Bedfordshire","R0A",2
"E06000056","Central Bedfordshire","RAX",2
"E06000056","Central Bedfordshire","RJE",2
"E06000056","Central Bedfordshire","RTF",2
"E06000056","Central Bedfordshire","RTP",2
"E06000056","Central Bedfordshire","RCF",2
"E06000056","Central Bedfordshire","RW6",2
"E06000056","Central Bedfordshire","RAE",2
"E06000056","Central Bedfordshire","RJ2",3
"E06000056","Central Bedfordshire","RJC",2
"E06000056","Central Bedfordshire","RP5",2
"E06000056","Central Bedfordshire","RWP",2
"E06000056","Central Bedfordshire","RXL",2
"E06000056","Central Bedfordshire","RP1",2
"E06000056","Central Bedfordshire","RVW",2
"E06000056","Central Bedfordshire","RXN",2
"E06000056","Central Bedfordshire","RAN",2
"E06000056","Central Bedfordshire","RFS",2
"E06000056","Central Bedfordshire","RTR",2
"E06000056","Central Bedfordshire","RVY",1
"E06000056","Central Bedfordshire","RXK",1
"E06000056","Central Bedfordshire","RXW",3
"E06000056","Central Bedfordshire","RA9",1
"E06000056","Central Bedfordshire","RL1",1
"E06000056","Central Bedfordshire","RN7",1
"E06000056","Central Bedfordshire","RBN",1
"E06000056","Central Bedfordshire","RDD",1
"E06000056","Central Bedfordshire","RMP",1
"E06000056","Central Bedfordshire","RMY",1
"E06000056","Central Bedfordshire","RCB",1
"E06000056","Central Bedfordshire","RCU",1
"E06000056","Central Bedfordshire","RL4",1
"E06000056","Central Bedfordshire","RWY",1
"E06000056","Central Bedfordshire","RAT",1
"E06000056","Central Bedfordshire","RBK",1
"E06000056","Central Bedfordshire","RBL",1
"E06000056","Central Bedfordshire","RLT",1
"E06000056","Central Bedfordshire","RM3",1
"E06000056","Central Bedfordshire","RTQ",1
"E06000056","Central Bedfordshire","RWF",1
"E06000056","Central Bedfordshire","RWX",1
"E06000056","Central Bedfordshire","R0B",1
"E06000056","Central Bedfordshire","RMC",1
"E06000056","Central Bedfordshire","RR8",1
"E06000056","Central Bedfordshire","RW1",1
"E06000056","Central Bedfordshire","RFF",1
"E06000056","Central Bedfordshire","RJL",1
"E06000056","Central Bedfordshire","RLQ",1
"E06000056","Central Bedfordshire","RXF",1
"E06000057","Northumberland","RTF",36176
"E06000057","Northumberland","RTD",5931
"E06000057","Northumberland","RX4",376
"E06000057","Northumberland","RNL",266
"E06000057","Northumberland","RR7",124
"E06000057","Northumberland","RXP",84
"E06000057","Northumberland","R0B",81
"E06000057","Northumberland","RCB",19
"E06000057","Northumberland","RTX",14
"E06000057","Northumberland","RVW",13
"E06000057","Northumberland","RTR",12
"E06000057","Northumberland","RXL",9
"E06000057","Northumberland","RR8",8
"E06000057","Northumberland","RX1",8
"E06000057","Northumberland","RWA",7
"E06000057","Northumberland","RRK",8
"E06000057","Northumberland","RWG",7
"E06000057","Northumberland","RAS",6
"E06000057","Northumberland","RTH",6
"E06000057","Northumberland","RWD",6
"E06000057","Northumberland","RDE",6
"E06000057","Northumberland","RRV",6
"E06000057","Northumberland","RD1",5
"E06000057","Northumberland","RM1",5
"E06000057","Northumberland","RTE",5
"E06000057","Northumberland","RJ1",5
"E06000057","Northumberland","RJR",5
"E06000057","Northumberland","R0A",5
"E06000057","Northumberland","RFS",4
"E06000057","Northumberland","RAL",4
"E06000057","Northumberland","RCF",4
"E06000057","Northumberland","RCD",4
"E06000057","Northumberland","RVV",4
"E06000057","Northumberland","RHW",4
"E06000057","Northumberland","RJC",4
"E06000057","Northumberland","RGN",4
"E06000057","Northumberland","RHU",4
"E06000057","Northumberland","RK5",4
"E06000057","Northumberland","RWH",4
"E06000057","Northumberland","RBT",4
"E06000057","Northumberland","R1H",4
"E06000057","Northumberland","RXK",3
"E06000057","Northumberland","RA2",3
"E06000057","Northumberland","RCX",3
"E06000057","Northumberland","RGT",3
"E06000057","Northumberland","RPA",3
"E06000057","Northumberland","RTG",5
"E06000057","Northumberland","RHQ",3
"E06000057","Northumberland","RF4",3
"E06000057","Northumberland","RKB",3
"E06000057","Northumberland","RGP",3
"E06000057","Northumberland","RH8",3
"E06000057","Northumberland","RJL",3
"E06000057","Northumberland","RBA",3
"E06000057","Northumberland","RBZ",3
"E06000057","Northumberland","REF",3
"E06000057","Northumberland","RWP",3
"E06000057","Northumberland","RJE",3
"E06000057","Northumberland","RQM",3
"E06000057","Northumberland","RX3",3
"E06000057","Northumberland","RA7",2
"E06000057","Northumberland","RK9",2
"E06000057","Northumberland","REM",4
"E06000057","Northumberland","RWE",2
"E06000057","Northumberland","RXR",2
"E06000057","Northumberland","R1K",2
"E06000057","Northumberland","RAE",2
"E06000057","Northumberland","RXH",2
"E06000057","Northumberland","RJ2",2
"E06000057","Northumberland","RJN",2
"E06000057","Northumberland","RQW",2
"E06000057","Northumberland","RFF",2
"E06000057","Northumberland","RYJ",2
"E06000057","Northumberland","RFR",3
"E06000057","Northumberland","RJ7",2
"E06000057","Northumberland","RVY",2
"E06000057","Northumberland","RVR",2
"E06000057","Northumberland","RW6",2
"E06000057","Northumberland","RAJ",1
"E06000057","Northumberland","RD3",1
"E06000057","Northumberland","RGM",1
"E06000057","Northumberland","RJZ",1
"E06000057","Northumberland","RXW",2
"E06000057","Northumberland","RYR",1
"E06000057","Northumberland","RNA",1
"E06000057","Northumberland","RNN",1
"E06000057","Northumberland","RRF",1
"E06000057","Northumberland","RT3",1
"E06000057","Northumberland","RW1",1
"E06000057","Northumberland","RWY",1
"E06000057","Northumberland","RBD",1
"E06000057","Northumberland","RWJ",1
"E06000057","Northumberland","R1F",1
"E06000057","Northumberland","RHM",1
"E06000057","Northumberland","RN5",1
"E06000057","Northumberland","RP5",1
"E06000057","Northumberland","RTK",1
"E06000057","Northumberland","RXN",1
"E06000057","Northumberland","RDD",1
"E06000057","Northumberland","RNZ",1
"E06000057","Northumberland","RWF",1
"E06000057","Northumberland","RWW",1
"E06000057","Northumberland","RA4",1
"E06000057","Northumberland","RA9",1
"E06000057","Northumberland","RMC",1
"E06000057","Northumberland","RN3",1
"E06000057","Northumberland","RC1",1
"E06000057","Northumberland","RL4",1
"E06000057","Northumberland","RMP",1
"E06000057","Northumberland","RNS",1
"E06000057","Northumberland","RC9",1
"E06000057","Northumberland","RDU",1
"E06000057","Northumberland","RDZ",1
"E06000057","Northumberland","RLQ",1
NA,NA,"RDZ",2
NA,NA,"RD3",2
"E10000002","Buckinghamshire","RXQ",36430
"E10000002","Buckinghamshire","RD8",3132
"E10000002","Buckinghamshire","RTH",2849
"E10000002","Buckinghamshire","RC9",414
"E10000002","Buckinghamshire","RNU",389
"E10000002","Buckinghamshire","RT3",235
"E10000002","Buckinghamshire","RNS",71
"E10000002","Buckinghamshire","RWG",226
"E10000002","Buckinghamshire","RYJ",257
"E10000002","Buckinghamshire","RDU",13882
"E10000002","Buckinghamshire","RQM",92
"E10000002","Buckinghamshire","RC1",30
"E10000002","Buckinghamshire","RRV",138
"E10000002","Buckinghamshire","RAS",432
"E10000002","Buckinghamshire","R1K",193
"E10000002","Buckinghamshire","R1H",57
"E10000002","Buckinghamshire","RHW",262
"E10000002","Buckinghamshire","RJ1",71
"E10000002","Buckinghamshire","RWH",81
"E10000002","Buckinghamshire","REF",34
"E10000002","Buckinghamshire","RAL",62
"E10000002","Buckinghamshire","RKB",20
"E10000002","Buckinghamshire","RA9",23
"E10000002","Buckinghamshire","RDZ",24
"E10000002","Buckinghamshire","RJC",13
"E10000002","Buckinghamshire","RQW",11
"E10000002","Buckinghamshire","RGN",10
"E10000002","Buckinghamshire","RHM",32
"E10000002","Buckinghamshire","RTE",16
"E10000002","Buckinghamshire","RA2",20
"E10000002","Buckinghamshire","RH8",17
"E10000002","Buckinghamshire","RN5",18
"E10000002","Buckinghamshire","RQX",8
"E10000002","Buckinghamshire","RWF",11
"E10000002","Buckinghamshire","RWE",13
"E10000002","Buckinghamshire","RN3",15
"E10000002","Buckinghamshire","RBD",11
"E10000002","Buckinghamshire","RGT",13
"E10000002","Buckinghamshire","RX1",10
"E10000002","Buckinghamshire","RYR",24
"E10000002","Buckinghamshire","RHU",9
"E10000002","Buckinghamshire","RV3",7
"E10000002","Buckinghamshire","RA4",7
"E10000002","Buckinghamshire","RRK",30
"E10000002","Buckinghamshire","RJZ",14
"E10000002","Buckinghamshire","RM1",8
"E10000002","Buckinghamshire","RWK",5
"E10000002","Buckinghamshire","R1F",8
"E10000002","Buckinghamshire","RJ7",28
"E10000002","Buckinghamshire","R0B",6
"E10000002","Buckinghamshire","RNZ",7
"E10000002","Buckinghamshire","RWD",5
"E10000002","Buckinghamshire","RD1",10
"E10000002","Buckinghamshire","RD3",17
"E10000002","Buckinghamshire","RBA",8
"E10000002","Buckinghamshire","RCX",6
"E10000002","Buckinghamshire","RTG",10
"E10000002","Buckinghamshire","RTR",9
"E10000002","Buckinghamshire","RWA",4
"E10000002","Buckinghamshire","RP1",8
"E10000002","Buckinghamshire","RBZ",10
"E10000002","Buckinghamshire","RGM",4
"E10000002","Buckinghamshire","RXW",5
"E10000002","Buckinghamshire","RBK",3
"E10000002","Buckinghamshire","RGR",6
"E10000002","Buckinghamshire","RVJ",11
"E10000002","Buckinghamshire","RA7",8
"E10000002","Buckinghamshire","RDD",7
"E10000002","Buckinghamshire","RJE",7
"E10000002","Buckinghamshire","RP6",6
"E10000002","Buckinghamshire","RTF",4
"E10000002","Buckinghamshire","RVN",2
"E10000002","Buckinghamshire","RA3",2
"E10000002","Buckinghamshire","RGP",7
"E10000002","Buckinghamshire","RNQ",4
"E10000002","Buckinghamshire","RW6",5
"E10000002","Buckinghamshire","RK9",12
"E10000002","Buckinghamshire","RWP",2
"E10000002","Buckinghamshire","RXH",7
"E10000002","Buckinghamshire","RXK",10
"E10000002","Buckinghamshire","RXL",7
"E10000002","Buckinghamshire","RK5",3
"E10000002","Buckinghamshire","RR8",6
"E10000002","Buckinghamshire","RTP",5
"E10000002","Buckinghamshire","RBT",3
"E10000002","Buckinghamshire","RDE",11
"E10000002","Buckinghamshire","RJ2",6
"E10000002","Buckinghamshire","RLQ",7
"E10000002","Buckinghamshire","RPY",15
"E10000002","Buckinghamshire","REM",4
"E10000002","Buckinghamshire","RCB",3
"E10000002","Buckinghamshire","RVR",5
"E10000002","Buckinghamshire","RXF",3
"E10000002","Buckinghamshire","RAX",8
"E10000002","Buckinghamshire","RET",1
"E10000002","Buckinghamshire","RVV",9
"E10000002","Buckinghamshire","RXC",4
"E10000002","Buckinghamshire","RKE",9
"E10000002","Buckinghamshire","RNA",2
"E10000002","Buckinghamshire","RQ8",6
"E10000002","Buckinghamshire","RWW",2
"E10000002","Buckinghamshire","RXP",2
"E10000002","Buckinghamshire","RHQ",3
"E10000002","Buckinghamshire","RAN",2
"E10000002","Buckinghamshire","RFS",2
"E10000002","Buckinghamshire","RN7",2
"E10000002","Buckinghamshire","RTK",21
"E10000002","Buckinghamshire","RAP",2
"E10000002","Buckinghamshire","RF4",4
"E10000002","Buckinghamshire","RP4",6
"E10000002","Buckinghamshire","RTQ",1
"E10000002","Buckinghamshire","RTX",10
"E10000002","Buckinghamshire","R0A",11
"E10000002","Buckinghamshire","RCF",3
"E10000002","Buckinghamshire","RXR",6
"E10000002","Buckinghamshire","RJR",1
"E10000002","Buckinghamshire","RTD",5
"E10000002","Buckinghamshire","RNL",6
"E10000002","Buckinghamshire","RJ6",5
"E10000002","Buckinghamshire","RBV",1
"E10000002","Buckinghamshire","R1L",1
"E10000002","Buckinghamshire","RFF",1
"E10000002","Buckinghamshire","NR5",1
"E10000002","Buckinghamshire","RRJ",1
"E10000002","Buckinghamshire","RAE",2
"E10000002","Buckinghamshire","RBS",1
"E10000002","Buckinghamshire","RM3",1
"E10000002","Buckinghamshire","RWX",11
"E10000002","Buckinghamshire","RW1",3
"E10000002","Buckinghamshire","RT5",2
"E10000002","Buckinghamshire","RVW",1
"E10000002","Buckinghamshire","RVY",2
"E10000002","Buckinghamshire","RBL",2
"E10000002","Buckinghamshire","RP5",2
"E10000002","Buckinghamshire","RWJ",1
"E10000002","Buckinghamshire","RQ3",3
"E10000002","Buckinghamshire","RFR",2
"E10000002","Buckinghamshire","RRF",1
"E10000002","Buckinghamshire","RXN",1
"E10000002","Buckinghamshire","RWY",1
"E10000002","Buckinghamshire","RPC",1
"E10000002","Buckinghamshire","RQY",1
"E10000002","Buckinghamshire","RL4",1
"E10000002","Buckinghamshire","RAJ",1
"E10000002","Buckinghamshire","RPA",1
"E10000003","Cambridgeshire","RGT",31501
"E10000003","Cambridgeshire","RT1",250
"E10000003","Cambridgeshire","RGM",531
"E10000003","Cambridgeshire","RGN",21917
"E10000003","Cambridgeshire","RGR",886
"E10000003","Cambridgeshire","RM1",182
"E10000003","Cambridgeshire","RYJ",45
"E10000003","Cambridgeshire","R1H",54
"E10000003","Cambridgeshire","RRV",43
"E10000003","Cambridgeshire","RTH",31
"E10000003","Cambridgeshire","RWH",253
"E10000003","Cambridgeshire","RA2",13
"E10000003","Cambridgeshire","RDE",40
"E10000003","Cambridgeshire","RCX",5810
"E10000003","Cambridgeshire","RYV",3619
"E10000003","Cambridgeshire","RWD",38
"E10000003","Cambridgeshire","R0A",12
"E10000003","Cambridgeshire","RXH",15
"E10000003","Cambridgeshire","RDU",17
"E10000003","Cambridgeshire","R1K",14
"E10000003","Cambridgeshire","RQM",17
"E10000003","Cambridgeshire","RC1",215
"E10000003","Cambridgeshire","RWF",13
"E10000003","Cambridgeshire","RD1",10
"E10000003","Cambridgeshire","RAL",22
"E10000003","Cambridgeshire","RKB",14
"E10000003","Cambridgeshire","RQX",7
"E10000003","Cambridgeshire","RWE",49
"E10000003","Cambridgeshire","RNL",11
"E10000003","Cambridgeshire","RQ8",36
"E10000003","Cambridgeshire","RJ1",26
"E10000003","Cambridgeshire","RQW",24
"E10000003","Cambridgeshire","RJ2",10
"E10000003","Cambridgeshire","RJL",9
"E10000003","Cambridgeshire","RN7",9
"E10000003","Cambridgeshire","RNS",17
"E10000003","Cambridgeshire","RTF",8
"E10000003","Cambridgeshire","RVR",10
"E10000003","Cambridgeshire","RCB",12
"E10000003","Cambridgeshire","RVJ",7
"E10000003","Cambridgeshire","RTD",10
"E10000003","Cambridgeshire","RXQ",16
"E10000003","Cambridgeshire","RC9",36
"E10000003","Cambridgeshire","REF",20
"E10000003","Cambridgeshire","RMY",15
"E10000003","Cambridgeshire","RA9",16
"E10000003","Cambridgeshire","RHQ",8
"E10000003","Cambridgeshire","RPY",5
"E10000003","Cambridgeshire","RTE",15
"E10000003","Cambridgeshire","RWJ",2
"E10000003","Cambridgeshire","RDZ",11
"E10000003","Cambridgeshire","RXK",6
"E10000003","Cambridgeshire","RBL",2
"E10000003","Cambridgeshire","RBN",5
"E10000003","Cambridgeshire","RVV",7
"E10000003","Cambridgeshire","RHM",11
"E10000003","Cambridgeshire","RT3",7
"E10000003","Cambridgeshire","RX1",16
"E10000003","Cambridgeshire","RAJ",5
"E10000003","Cambridgeshire","RAN",3
"E10000003","Cambridgeshire","RAX",7
"E10000003","Cambridgeshire","RNQ",25
"E10000003","Cambridgeshire","REM",7
"E10000003","Cambridgeshire","RTP",5
"E10000003","Cambridgeshire","RYR",15
"E10000003","Cambridgeshire","RAP",9
"E10000003","Cambridgeshire","RP6",4
"E10000003","Cambridgeshire","RWG",14
"E10000003","Cambridgeshire","RFF",3
"E10000003","Cambridgeshire","RJZ",17
"E10000003","Cambridgeshire","RXW",8
"E10000003","Cambridgeshire","RD8",15
"E10000003","Cambridgeshire","RF4",8
"E10000003","Cambridgeshire","RFS",4
"E10000003","Cambridgeshire","RK9",9
"E10000003","Cambridgeshire","RLT",7
"E10000003","Cambridgeshire","RR8",3
"E10000003","Cambridgeshire","RRK",19
"E10000003","Cambridgeshire","RXC",3
"E10000003","Cambridgeshire","RBS",5
"E10000003","Cambridgeshire","RJ7",9
"E10000003","Cambridgeshire","RWK",2
"E10000003","Cambridgeshire","RWY",2
"E10000003","Cambridgeshire","R0B",2
"E10000003","Cambridgeshire","RLQ",5
"E10000003","Cambridgeshire","RTG",13
"E10000003","Cambridgeshire","R1L",4
"E10000003","Cambridgeshire","RBD",7
"E10000003","Cambridgeshire","RBK",2
"E10000003","Cambridgeshire","RCD",3
"E10000003","Cambridgeshire","RGP",25
"E10000003","Cambridgeshire","RJC",10
"E10000003","Cambridgeshire","RPA",4
"E10000003","Cambridgeshire","RA4",3
"E10000003","Cambridgeshire","RK5",3
"E10000003","Cambridgeshire","RQ3",4
"E10000003","Cambridgeshire","RTK",3
"E10000003","Cambridgeshire","RTX",6
"E10000003","Cambridgeshire","RA7",10
"E10000003","Cambridgeshire","R1F",1
"E10000003","Cambridgeshire","RCF",2
"E10000003","Cambridgeshire","RXN",5
"E10000003","Cambridgeshire","RN3",6
"E10000003","Cambridgeshire","RL4",7
"E10000003","Cambridgeshire","RBZ",5
"E10000003","Cambridgeshire","RH8",12
"E10000003","Cambridgeshire","RV5",2
"E10000003","Cambridgeshire","RJ6",4
"E10000003","Cambridgeshire","RD3",7
"E10000003","Cambridgeshire","RHW",7
"E10000003","Cambridgeshire","RXR",2
"E10000003","Cambridgeshire","RMC",1
"E10000003","Cambridgeshire","RBA",6
"E10000003","Cambridgeshire","RWP",5
"E10000003","Cambridgeshire","RAS",10
"E10000003","Cambridgeshire","RJE",7
"E10000003","Cambridgeshire","RNZ",3
"E10000003","Cambridgeshire","RDD",12
"E10000003","Cambridgeshire","RW6",3
"E10000003","Cambridgeshire","RAE",4
"E10000003","Cambridgeshire","RJR",2
"E10000003","Cambridgeshire","RXY",3
"E10000003","Cambridgeshire","RHU",6
"E10000003","Cambridgeshire","RT5",3
"E10000003","Cambridgeshire","RP5",4
"E10000003","Cambridgeshire","RXL",3
"E10000003","Cambridgeshire","RXP",5
"E10000003","Cambridgeshire","RN5",4
"E10000003","Cambridgeshire","RWW",3
"E10000003","Cambridgeshire","RYG",1
"E10000003","Cambridgeshire","RFR",2
"E10000003","Cambridgeshire","RXM",1
"E10000003","Cambridgeshire","RTR",4
"E10000003","Cambridgeshire","RKE",5
"E10000003","Cambridgeshire","RWA",4
"E10000003","Cambridgeshire","RBT",4
"E10000003","Cambridgeshire","RVY",2
"E10000003","Cambridgeshire","RP4",3
"E10000003","Cambridgeshire","RNU",2
"E10000003","Cambridgeshire","RRF",1
"E10000003","Cambridgeshire","RXE",1
"E10000003","Cambridgeshire","RXF",1
"E10000003","Cambridgeshire","RY3",1
"E10000003","Cambridgeshire","RMP",1
"E10000003","Cambridgeshire","RM3",1
"E10000003","Cambridgeshire","RR7",1
"E10000003","Cambridgeshire","RJ8",1
"E10000003","Cambridgeshire","RWR",1
"E10000003","Cambridgeshire","RNA",1
"E10000003","Cambridgeshire","RPC",1
"E10000006","Cumbria","RNL",33406
"E10000006","Cumbria","RNN",795
"E10000006","Cumbria","RTD",976
"E10000006","Cumbria","RTR",82
"E10000006","Cumbria","RTF",94
"E10000006","Cumbria","RTX",19469
"E10000006","Cumbria","RXP",31
"E10000006","Cumbria","RXN",460
"E10000006","Cumbria","RCB",30
"E10000006","Cumbria","RXL",276
"E10000006","Cumbria","R0B",40
"E10000006","Cumbria","RR8",22
"E10000006","Cumbria","R0A",148
"E10000006","Cumbria","RVY",14
"E10000006","Cumbria","RR7",10
"E10000006","Cumbria","RGT",8
"E10000006","Cumbria","RX4",24
"E10000006","Cumbria","REM",44
"E10000006","Cumbria","RJ1",12
"E10000006","Cumbria","RN5",6
"E10000006","Cumbria","RBT",13
"E10000006","Cumbria","RHQ",12
"E10000006","Cumbria","RM3",23
"E10000006","Cumbria","RRV",15
"E10000006","Cumbria","RW6",19
"E10000006","Cumbria","REF",7
"E10000006","Cumbria","RET",4
"E10000006","Cumbria","RTK",4
"E10000006","Cumbria","RBN",10
"E10000006","Cumbria","RHU",3
"E10000006","Cumbria","RVJ",5
"E10000006","Cumbria","RJ2",2
"E10000006","Cumbria","RBS",58
"E10000006","Cumbria","RXW",7
"E10000006","Cumbria","RX1",9
"E10000006","Cumbria","RXK",5
"E10000006","Cumbria","RDU",9
"E10000006","Cumbria","RJE",9
"E10000006","Cumbria","RNQ",1
"E10000006","Cumbria","RQM",3
"E10000006","Cumbria","RTG",11
"E10000006","Cumbria","RWA",6
"E10000006","Cumbria","RYR",5
"E10000006","Cumbria","RAE",4
"E10000006","Cumbria","RJR",6
"E10000006","Cumbria","RXC",2
"E10000006","Cumbria","RAS",1
"E10000006","Cumbria","RC1",4
"E10000006","Cumbria","RD3",5
"E10000006","Cumbria","RTE",5
"E10000006","Cumbria","RAX",3
"E10000006","Cumbria","RBL",4
"E10000006","Cumbria","RCF",11
"E10000006","Cumbria","RJN",3
"E10000006","Cumbria","RQW",2
"E10000006","Cumbria","RWG",3
"E10000006","Cumbria","RWP",5
"E10000006","Cumbria","RXR",26
"E10000006","Cumbria","R1K",7
"E10000006","Cumbria","RJ7",2
"E10000006","Cumbria","RNZ",2
"E10000006","Cumbria","RP5",10
"E10000006","Cumbria","RRK",13
"E10000006","Cumbria","RWJ",10
"E10000006","Cumbria","RWY",5
"E10000006","Cumbria","RF4",1
"E10000006","Cumbria","RKB",6
"E10000006","Cumbria","RVW",20
"E10000006","Cumbria","RNA",2
"E10000006","Cumbria","RL4",3
"E10000006","Cumbria","RWD",2
"E10000006","Cumbria","RW5",9
"E10000006","Cumbria","RWW",10
"E10000006","Cumbria","RBV",11
"E10000006","Cumbria","RCU",2
"E10000006","Cumbria","RK9",7
"E10000006","Cumbria","RA2",2
"E10000006","Cumbria","RBA",8
"E10000006","Cumbria","RPA",3
"E10000006","Cumbria","RBD",2
"E10000006","Cumbria","RRF",12
"E10000006","Cumbria","RXF",5
"E10000006","Cumbria","REP",1
"E10000006","Cumbria","RA9",3
"E10000006","Cumbria","RD1",1
"E10000006","Cumbria","RWF",2
"E10000006","Cumbria","RCD",7
"E10000006","Cumbria","RTH",7
"E10000006","Cumbria","R1F",3
"E10000006","Cumbria","RA4",4
"E10000006","Cumbria","RAL",5
"E10000006","Cumbria","RGN",2
"E10000006","Cumbria","RHW",3
"E10000006","Cumbria","RWH",5
"E10000006","Cumbria","RN3",3
"E10000006","Cumbria","R1H",5
"E10000006","Cumbria","RH8",5
"E10000006","Cumbria","RVV",2
"E10000006","Cumbria","RJ6",2
"E10000006","Cumbria","RPC",1
"E10000006","Cumbria","RQX",1
"E10000006","Cumbria","RCX",3
"E10000006","Cumbria","RDZ",2
"E10000006","Cumbria","RJL",3
"E10000006","Cumbria","RHM",5
"E10000006","Cumbria","RJC",6
"E10000006","Cumbria","RJZ",2
"E10000006","Cumbria","RNS",5
"E10000006","Cumbria","RBK",2
"E10000006","Cumbria","RGR",3
"E10000006","Cumbria","RMC",4
"E10000006","Cumbria","RX3",3
"E10000006","Cumbria","RKE",2
"E10000006","Cumbria","RM1",4
"E10000006","Cumbria","RVR",2
"E10000006","Cumbria","RYJ",7
"E10000006","Cumbria","RWE",4
"E10000006","Cumbria","RC9",3
"E10000006","Cumbria","RXQ",2
"E10000006","Cumbria","RFS",4
"E10000006","Cumbria","RLQ",2
"E10000006","Cumbria","RK5",2
"E10000006","Cumbria","RTP",1
"E10000006","Cumbria","RWK",1
"E10000006","Cumbria","RGM",1
"E10000006","Cumbria","RBZ",1
"E10000006","Cumbria","RDE",1
"E10000006","Cumbria","RFF",1
"E10000006","Cumbria","RXH",1
"E10000006","Cumbria","RA7",1
"E10000006","Cumbria","RN7",1
"E10000007","Derbyshire","RTG",28912
"E10000007","Derbyshire","RK5",4605
"E10000007","Derbyshire","RX1",5949
"E10000007","Derbyshire","RFS",34614
"E10000007","Derbyshire","RXM",769
"E10000007","Derbyshire","RHQ",3246
"E10000007","Derbyshire","RWE",128
"E10000007","Derbyshire","RY8",239
"E10000007","Derbyshire","RWD",98
"E10000007","Derbyshire","RRK",77
"E10000007","Derbyshire","RCB",61
"E10000007","Derbyshire","RA9",26
"E10000007","Derbyshire","RR8",47
"E10000007","Derbyshire","RWA",16
"E10000007","Derbyshire","REF",49
"E10000007","Derbyshire","RJE",124
"E10000007","Derbyshire","RJR",7
"E10000007","Derbyshire","RNQ",8
"E10000007","Derbyshire","RCU",358
"E10000007","Derbyshire","RNL",11
"E10000007","Derbyshire","RTH",16
"E10000007","Derbyshire","REM",18
"E10000007","Derbyshire","RDE",13
"E10000007","Derbyshire","RP5",741
"E10000007","Derbyshire","R1F",9
"E10000007","Derbyshire","RTE",26
"E10000007","Derbyshire","RYR",14
"E10000007","Derbyshire","RCX",10
"E10000007","Derbyshire","RFF",18
"E10000007","Derbyshire","RKB",31
"E10000007","Derbyshire","RN5",6
"E10000007","Derbyshire","RBV",167
"E10000007","Derbyshire","RGP",12
"E10000007","Derbyshire","RBD",8
"E10000007","Derbyshire","RJZ",8
"E10000007","Derbyshire","RXH",7
"E10000007","Derbyshire","RGT",26
"E10000007","Derbyshire","RJ1",10
"E10000007","Derbyshire","RXL",25
"E10000007","Derbyshire","R0A",659
"E10000007","Derbyshire","RQM",7
"E10000007","Derbyshire","RXP",11
"E10000007","Derbyshire","RHA",22
"E10000007","Derbyshire","RK9",13
"E10000007","Derbyshire","RM1",12
"E10000007","Derbyshire","RWG",5
"E10000007","Derbyshire","RBZ",11
"E10000007","Derbyshire","RNS",10
"E10000007","Derbyshire","RTR",8
"E10000007","Derbyshire","RXW",9
"E10000007","Derbyshire","RC9",5
"E10000007","Derbyshire","RD3",11
"E10000007","Derbyshire","RJL",20
"E10000007","Derbyshire","RQ3",14
"E10000007","Derbyshire","RTX",17
"E10000007","Derbyshire","RX3",4
"E10000007","Derbyshire","RBK",9
"E10000007","Derbyshire","RBT",17
"E10000007","Derbyshire","RJ2",4
"E10000007","Derbyshire","RJ6",2
"E10000007","Derbyshire","RTF",21
"E10000007","Derbyshire","RXC",3
"E10000007","Derbyshire","TAJ",3
"E10000007","Derbyshire","RA3",7
"E10000007","Derbyshire","RA4",7
"E10000007","Derbyshire","RAX",3
"E10000007","Derbyshire","RCF",2
"E10000007","Derbyshire","RJ7",9
"E10000007","Derbyshire","R1H",13
"E10000007","Derbyshire","R1K",6
"E10000007","Derbyshire","RLT",3
"E10000007","Derbyshire","RTP",4
"E10000007","Derbyshire","RM3",151
"E10000007","Derbyshire","RTD",8
"E10000007","Derbyshire","RVV",8
"E10000007","Derbyshire","RWP",6
"E10000007","Derbyshire","RXK",22
"E10000007","Derbyshire","RAE",5
"E10000007","Derbyshire","RDZ",10
"E10000007","Derbyshire","RH8",15
"E10000007","Derbyshire","RJC",9
"E10000007","Derbyshire","RJN",848
"E10000007","Derbyshire","RLQ",4
"E10000007","Derbyshire","RAL",9
"E10000007","Derbyshire","RR7",4
"E10000007","Derbyshire","RRE",5
"E10000007","Derbyshire","RVY",5
"E10000007","Derbyshire","RBA",8
"E10000007","Derbyshire","RCD",7
"E10000007","Derbyshire","RD1",10
"E10000007","Derbyshire","RMC",3
"E10000007","Derbyshire","RN3",3
"E10000007","Derbyshire","RNZ",7
"E10000007","Derbyshire","RQW",4
"E10000007","Derbyshire","RRV",10
"E10000007","Derbyshire","RWF",10
"E10000007","Derbyshire","RFR",65
"E10000007","Derbyshire","RMY",3
"E10000007","Derbyshire","RGN",6
"E10000007","Derbyshire","RWJ",4933
"E10000007","Derbyshire","RHU",7
"E10000007","Derbyshire","RNA",2
"E10000007","Derbyshire","RVR",2
"E10000007","Derbyshire","RBL",4
"E10000007","Derbyshire","RQ8",2
"E10000007","Derbyshire","RXG",1
"E10000007","Derbyshire","RBQ",3
"E10000007","Derbyshire","RW6",38
"E10000007","Derbyshire","RYJ",7
"E10000007","Derbyshire","RWY",6
"E10000007","Derbyshire","RW5",2
"E10000007","Derbyshire","RXN",3
"E10000007","Derbyshire","RDD",3
"E10000007","Derbyshire","RXF",8
"E10000007","Derbyshire","RDU",12
"E10000007","Derbyshire","RGM",5
"E10000007","Derbyshire","RA2",8
"E10000007","Derbyshire","RWW",12
"E10000007","Derbyshire","RHM",5
"E10000007","Derbyshire","RT5",12
"E10000007","Derbyshire","RV9",2
"E10000007","Derbyshire","RTV",1
"E10000007","Derbyshire","RL4",8
"E10000007","Derbyshire","RWH",3
"E10000007","Derbyshire","RD8",3
"E10000007","Derbyshire","RVJ",7
"E10000007","Derbyshire","RXX",1
"E10000007","Derbyshire","RP7",1
"E10000007","Derbyshire","RPA",3
"E10000007","Derbyshire","RT3",1
"E10000007","Derbyshire","RBS",6
"E10000007","Derbyshire","RHW",4
"E10000007","Derbyshire","R0B",5
"E10000007","Derbyshire","RA7",6
"E10000007","Derbyshire","RMP",2496
"E10000007","Derbyshire","RLY",5
"E10000007","Derbyshire","RQX",1
"E10000007","Derbyshire","RTK",2
"E10000007","Derbyshire","RRF",4
"E10000007","Derbyshire","NTX",1
"E10000007","Derbyshire","RBN",4
"E10000007","Derbyshire","RGR",2
"E10000007","Derbyshire","RPY",1
"E10000007","Derbyshire","RP1",2
"E10000007","Derbyshire","RXQ",7
"E10000007","Derbyshire","RC1",4
"E10000007","Derbyshire","RVW",1
"E10000007","Derbyshire","RAS",1
"E10000007","Derbyshire","RP6",1
"E10000007","Derbyshire","RPC",2
"E10000007","Derbyshire","RRJ",2
"E10000007","Derbyshire","RXA",3
"E10000007","Derbyshire","RW4",2
"E10000007","Derbyshire","RL1",1
"E10000007","Derbyshire","RET",1
"E10000007","Derbyshire","RXR",1
"E10000007","Derbyshire","RX4",1
"E10000008","Devon","RH8",39576
"E10000008","Devon","RBA",1324
"E10000008","Devon","RBD",168
"E10000008","Devon","RK9",8447
"E10000008","Devon","RA7",325
"E10000008","Devon","RA9",16347
"E10000008","Devon","RBZ",18265
"E10000008","Devon","RVJ",136
"E10000008","Devon","REF",179
"E10000008","Devon","RA4",59
"E10000008","Devon","RDU",36
"E10000008","Devon","R1H",35
"E10000008","Devon","RD3",30
"E10000008","Devon","RHM",34
"E10000008","Devon","RYR",20
"E10000008","Devon","RTH",43
"E10000008","Devon","RWF",20
"E10000008","Devon","R0A",14
"E10000008","Devon","RAL",11
"E10000008","Devon","RGN",8
"E10000008","Devon","RRK",34
"E10000008","Devon","RNZ",18
"E10000008","Devon","RYJ",30
"E10000008","Devon","RD1",41
"E10000008","Devon","RAX",14
"E10000008","Devon","RHW",23
"E10000008","Devon","RT3",35
"E10000008","Devon","RHU",19
"E10000008","Devon","RTE",33
"E10000008","Devon","RWH",9
"E10000008","Devon","RJC",16
"E10000008","Devon","RWP",13
"E10000008","Devon","RRV",26
"E10000008","Devon","RJ7",20
"E10000008","Devon","RX1",8
"E10000008","Devon","RJZ",17
"E10000008","Devon","RN3",33
"E10000008","Devon","RDZ",20
"E10000008","Devon","RTP",10
"E10000008","Devon","RAS",11
"E10000008","Devon","RCF",4
"E10000008","Devon","RDY",5
"E10000008","Devon","RQW",13
"E10000008","Devon","R1K",16
"E10000008","Devon","RTF",5
"E10000008","Devon","RTX",9
"E10000008","Devon","RA3",29
"E10000008","Devon","RLQ",17
"E10000008","Devon","RXK",10
"E10000008","Devon","RGT",10
"E10000008","Devon","RJE",11
"E10000008","Devon","RTG",13
"E10000008","Devon","RXW",6
"E10000008","Devon","RJ6",7
"E10000008","Devon","RWV",13
"E10000008","Devon","RDE",12
"E10000008","Devon","RH5",10
"E10000008","Devon","RN5",19
"E10000008","Devon","RVV",10
"E10000008","Devon","RXC",7
"E10000008","Devon","RNS",10
"E10000008","Devon","RTK",6
"E10000008","Devon","RNQ",6
"E10000008","Devon","RPY",5
"E10000008","Devon","RBT",6
"E10000008","Devon","RCB",9
"E10000008","Devon","REM",13
"E10000008","Devon","RGP",4
"E10000008","Devon","RHQ",10
"E10000008","Devon","RJ1",24
"E10000008","Devon","RM3",4
"E10000008","Devon","RCD",3
"E10000008","Devon","RD8",9
"E10000008","Devon","RKB",10
"E10000008","Devon","RPC",3
"E10000008","Devon","RR8",7
"E10000008","Devon","RWD",4
"E10000008","Devon","RJ8",4
"E10000008","Devon","RJL",6
"E10000008","Devon","RQX",2
"E10000008","Devon","RN7",3
"E10000008","Devon","RWY",2
"E10000008","Devon","RXQ",9
"E10000008","Devon","RFF",2
"E10000008","Devon","RXP",2
"E10000008","Devon","RKE",2
"E10000008","Devon","RW6",3
"E10000008","Devon","RXH",12
"E10000008","Devon","RFS",2
"E10000008","Devon","RM1",7
"E10000008","Devon","RPA",3
"E10000008","Devon","RQM",17
"E10000008","Devon","RVR",12
"E10000008","Devon","RWE",2
"E10000008","Devon","RBL",3
"E10000008","Devon","RC9",6
"E10000008","Devon","RGM",4
"E10000008","Devon","RQ3",3
"E10000008","Devon","RVY",2
"E10000008","Devon","RQ8",5
"E10000008","Devon","RBN",8
"E10000008","Devon","RVW",2
"E10000008","Devon","RAJ",4
"E10000008","Devon","RBK",2
"E10000008","Devon","RJ2",8
"E10000008","Devon","RDD",6
"E10000008","Devon","RRE",1
"E10000008","Devon","RTD",3
"E10000008","Devon","RCX",3
"E10000008","Devon","R0B",6
"E10000008","Devon","RC1",3
"E10000008","Devon","RNL",4
"E10000008","Devon","RVN",2
"E10000008","Devon","RBS",2
"E10000008","Devon","RRF",4
"E10000008","Devon","RWW",2
"E10000008","Devon","REN",1
"E10000008","Devon","RNA",5
"E10000008","Devon","RK5",3
"E10000008","Devon","RP6",6
"E10000008","Devon","RLT",1
"E10000008","Devon","RWA",5
"E10000008","Devon","R1F",11
"E10000008","Devon","RR7",2
"E10000008","Devon","RXL",3
"E10000008","Devon","RBV",1
"E10000008","Devon","RJN",1
"E10000008","Devon","RF4",3
"E10000008","Devon","R1A",1
"E10000008","Devon","RA2",6
"E10000008","Devon","RXN",1
"E10000008","Devon","RXR",1
"E10000008","Devon","NR5",96
"E10000008","Devon","RDR",1
"E10000008","Devon","RLY",1
"E10000008","Devon","RMC",1
"E10000008","Devon","RL4",1
"E10000008","Devon","RFR",1
"E10000008","Devon","RXF",1
"E10000008","Devon","RWG",1
"E10000009","Dorset","RDZ",11734
"E10000009","Dorset","RD3",11842
"E10000009","Dorset","RHM",592
"E10000009","Dorset","RDY",894
"E10000009","Dorset","RNZ",2912
"E10000009","Dorset","RBD",19345
"E10000009","Dorset","RW1",25
"E10000009","Dorset","RN3",17
"E10000009","Dorset","RVJ",98
"E10000009","Dorset","RBA",194
"E10000009","Dorset","RH8",115
"E10000009","Dorset","REF",26
"E10000009","Dorset","RQM",20
"E10000009","Dorset","RA9",19
"E10000009","Dorset","RJ7",20
"E10000009","Dorset","RAS",9
"E10000009","Dorset","RAL",17
"E10000009","Dorset","RHW",19
"E10000009","Dorset","RMP",2
"E10000009","Dorset","RYJ",14
"E10000009","Dorset","R1H",19
"E10000009","Dorset","RHU",37
"E10000009","Dorset","RTE",27
"E10000009","Dorset","RWF",12
"E10000009","Dorset","RJ1",25
"E10000009","Dorset","RWH",5
"E10000009","Dorset","RD8",7
"E10000009","Dorset","RTP",9
"E10000009","Dorset","RJ2",6
"E10000009","Dorset","RLQ",5
"E10000009","Dorset","RN5",31
"E10000009","Dorset","RX1",6
"E10000009","Dorset","RDU",24
"E10000009","Dorset","RJC",4
"E10000009","Dorset","RRK",11
"E10000009","Dorset","RVR",9
"E10000009","Dorset","RCD",3
"E10000009","Dorset","RKE",1
"E10000009","Dorset","RM1",5
"E10000009","Dorset","RTH",29
"E10000009","Dorset","RWP",4
"E10000009","Dorset","RGT",10
"E10000009","Dorset","RTD",1
"E10000009","Dorset","RXL",2
"E10000009","Dorset","R1F",7
"E10000009","Dorset","RBZ",13
"E10000009","Dorset","R0B",3
"E10000009","Dorset","RPA",3
"E10000009","Dorset","R0A",6
"E10000009","Dorset","RJZ",12
"E10000009","Dorset","RWG",7
"E10000009","Dorset","RXC",10
"E10000009","Dorset","RYR",19
"E10000009","Dorset","RDE",7
"E10000009","Dorset","RFS",2
"E10000009","Dorset","RTF",2
"E10000009","Dorset","RXW",8
"E10000009","Dorset","RA7",42
"E10000009","Dorset","RM3",1
"E10000009","Dorset","RNS",3
"E10000009","Dorset","RT3",10
"E10000009","Dorset","RW6",7
"E10000009","Dorset","R1K",11
"E10000009","Dorset","RD1",33
"E10000009","Dorset","RK9",17
"E10000009","Dorset","RA4",3249
"E10000009","Dorset","RAX",11
"E10000009","Dorset","RRV",9
"E10000009","Dorset","RA2",13
"E10000009","Dorset","RJ6",3
"E10000009","Dorset","RVY",2
"E10000009","Dorset","RNQ",3
"E10000009","Dorset","RWK",3
"E10000009","Dorset","RA3",3
"E10000009","Dorset","RC9",2
"E10000009","Dorset","RPY",9
"E10000009","Dorset","RQ8",2
"E10000009","Dorset","RT5",1
"E10000009","Dorset","RTR",5
"E10000009","Dorset","RN7",2
"E10000009","Dorset","REM",6
"E10000009","Dorset","RWE",2
"E10000009","Dorset","RXH",9
"E10000009","Dorset","RGN",2
"E10000009","Dorset","RP4",1
"E10000009","Dorset","RWY",1
"E10000009","Dorset","RXQ",8
"E10000009","Dorset","RAN",4
"E10000009","Dorset","RBN",5
"E10000009","Dorset","RBT",2
"E10000009","Dorset","RK5",1
"E10000009","Dorset","RRF",1
"E10000009","Dorset","RKB",9
"E10000009","Dorset","RMC",1
"E10000009","Dorset","RV3",1
"E10000009","Dorset","RWJ",2
"E10000009","Dorset","RAJ",2
"E10000009","Dorset","RP6",6
"E10000009","Dorset","RR8",3
"E10000009","Dorset","RVN",3
"E10000009","Dorset","RVV",5
"E10000009","Dorset","RCB",3
"E10000009","Dorset","RH5",8
"E10000009","Dorset","RWD",2
"E10000009","Dorset","RNL",3
"E10000009","Dorset","RJL",3
"E10000009","Dorset","RWA",1
"E10000009","Dorset","RQX",3
"E10000009","Dorset","RAE",2
"E10000009","Dorset","RFR",2
"E10000009","Dorset","RXP",3
"E10000009","Dorset","RHQ",3
"E10000009","Dorset","RTK",2
"E10000009","Dorset","RGP",3
"E10000009","Dorset","RX2",1
"E10000009","Dorset","RQW",1
"E10000009","Dorset","RC1",2
"E10000009","Dorset","RF4",3
"E10000009","Dorset","RCF",1
"E10000009","Dorset","RJR",1
"E10000009","Dorset","RJN",1
"E10000009","Dorset","RQ3",1
"E10000009","Dorset","RTX",3
"E10000009","Dorset","RJE",2
"E10000009","Dorset","RLT",1
"E10000009","Dorset","RWW",1
"E10000009","Dorset","RCX",1
"E10000009","Dorset","RAP",1
"E10000009","Dorset","RTQ",1
"E10000009","Dorset","RXR",1
"E10000009","Dorset","RNA",2
"E10000009","Dorset","RGM",2
"E10000009","Dorset","RBQ",1
"E10000009","Dorset","RTG",2
"E10000009","Dorset","RXY",1
"E10000009","Dorset","RGR",1
"E10000009","Dorset","RAT",1
"E10000011","East Sussex","RXC",47185
"E10000011","East Sussex","RXH",10662
"E10000011","East Sussex","RX2",517
"E10000011","East Sussex","RPC",683
"E10000011","East Sussex","RYR",118
"E10000011","East Sussex","RWF",5140
"E10000011","East Sussex","RTP",244
"E10000011","East Sussex","RJZ",117
"E10000011","East Sussex","RJ1",170
"E10000011","East Sussex","RA2",54
"E10000011","East Sussex","RJ7",80
"E10000011","East Sussex","R1H",38
"E10000011","East Sussex","RHU",23
"E10000011","East Sussex","RRV",44
"E10000011","East Sussex","RDZ",14
"E10000011","East Sussex","RQM",32
"E10000011","East Sussex","RVR",27
"E10000011","East Sussex","RT3",26
"E10000011","East Sussex","RTK",11
"E10000011","East Sussex","RD8",8
"E10000011","East Sussex","RH8",12
"E10000011","East Sussex","RAL",12
"E10000011","East Sussex","REF",21
"E10000011","East Sussex","RTH",23
"E10000011","East Sussex","RWH",6
"E10000011","East Sussex","RBA",14
"E10000011","East Sussex","RGR",10
"E10000011","East Sussex","RHM",19
"E10000011","East Sussex","RP6",11
"E10000011","East Sussex","RYJ",29
"E10000011","East Sussex","RGN",6
"E10000011","East Sussex","RRK",10
"E10000011","East Sussex","RJ2",19
"E10000011","East Sussex","RA7",5
"E10000011","East Sussex","RJ6",14
"E10000011","East Sussex","R1K",15
"E10000011","East Sussex","RDE",10
"E10000011","East Sussex","RN5",8
"E10000011","East Sussex","RTG",7
"E10000011","East Sussex","RVV",86
"E10000011","East Sussex","R1F",11
"E10000011","East Sussex","RD3",9
"E10000011","East Sussex","RDD",7
"E10000011","East Sussex","RN7",13
"E10000011","East Sussex","RAX",15
"E10000011","East Sussex","RNL",4
"E10000011","East Sussex","RQX",9
"E10000011","East Sussex","RD1",6
"E10000011","East Sussex","RPY",28
"E10000011","East Sussex","RDU",24
"E10000011","East Sussex","RWG",9
"E10000011","East Sussex","RA3",1
"E10000011","East Sussex","RBT",2
"E10000011","East Sussex","RK5",4
"E10000011","East Sussex","RLQ",4
"E10000011","East Sussex","RM1",5
"E10000011","East Sussex","RN3",6
"E10000011","East Sussex","RTX",3
"E10000011","East Sussex","RC9",9
"E10000011","East Sussex","RF4",3
"E10000011","East Sussex","RGM",1
"E10000011","East Sussex","RNZ",5
"E10000011","East Sussex","RR8",3
"E10000011","East Sussex","RXN",5
"E10000011","East Sussex","RAE",1
"E10000011","East Sussex","RCF",2
"E10000011","East Sussex","RHQ",3
"E10000011","East Sussex","RVY",2
"E10000011","East Sussex","RW6",3
"E10000011","East Sussex","RA4",3
"E10000011","East Sussex","RA9",12
"E10000011","East Sussex","RHW",8
"E10000011","East Sussex","RMC",1
"E10000011","East Sussex","RAS",8
"E10000011","East Sussex","RBL",3
"E10000011","East Sussex","RJC",5
"E10000011","East Sussex","RQW",6
"E10000011","East Sussex","RVN",1
"E10000011","East Sussex","RXW",6
"E10000011","East Sussex","NXM",2
"E10000011","East Sussex","RBD",12
"E10000011","East Sussex","RBN",1
"E10000011","East Sussex","RKB",4
"E10000011","East Sussex","RWD",3
"E10000011","East Sussex","RTE",10
"E10000011","East Sussex","RAN",2
"E10000011","East Sussex","RC1",2
"E10000011","East Sussex","RCD",4
"E10000011","East Sussex","RPA",18
"E10000011","East Sussex","RVJ",2
"E10000011","East Sussex","RXR",4
"E10000011","East Sussex","RKE",8
"E10000011","East Sussex","R0A",7
"E10000011","East Sussex","RBZ",5
"E10000011","East Sussex","RJL",2
"E10000011","East Sussex","REM",1
"E10000011","East Sussex","RX1",4
"E10000011","East Sussex","RCB",5
"E10000011","East Sussex","RXL",5
"E10000011","East Sussex","RBQ",1
"E10000011","East Sussex","RWJ",2
"E10000011","East Sussex","RCX",8
"E10000011","East Sussex","RK9",9
"E10000011","East Sussex","RXQ",9
"E10000011","East Sussex","RP4",2
"E10000011","East Sussex","RXX",1
"E10000011","East Sussex","RBK",1
"E10000011","East Sussex","RWK",1
"E10000011","East Sussex","RDR",117
"E10000011","East Sussex","RQ8",7
"E10000011","East Sussex","RXF",3
"E10000011","East Sussex","RWP",4
"E10000011","East Sussex","R1A",1
"E10000011","East Sussex","RJE",3
"E10000011","East Sussex","RJN",2
"E10000011","East Sussex","RNA",2
"E10000011","East Sussex","R0B",2
"E10000011","East Sussex","RRE",1
"E10000011","East Sussex","RTD",5
"E10000011","East Sussex","RX3",1
"E10000011","East Sussex","RXP",3
"E10000011","East Sussex","RFS",2
"E10000011","East Sussex","RGP",3
"E10000011","East Sussex","RJR",1
"E10000011","East Sussex","RAP",1
"E10000011","East Sussex","RL4",1
"E10000011","East Sussex","RNQ",5
"E10000011","East Sussex","RGT",5
"E10000011","East Sussex","RWW",4
"E10000011","East Sussex","RXK",2
"E10000011","East Sussex","RDY",2
"E10000011","East Sussex","RWA",1
"E10000011","East Sussex","RH5",1
"E10000011","East Sussex","RM3",1
"E10000011","East Sussex","RNS",5
"E10000011","East Sussex","RV3",1
"E10000011","East Sussex","RMY",1
"E10000011","East Sussex","RAJ",2
"E10000011","East Sussex","RP5",1
"E10000011","East Sussex","RQ3",1
"E10000011","East Sussex","RW1",1
"E10000011","East Sussex","RWY",1
"E10000011","East Sussex","RVW",1
"E10000012","Essex","RDD",31830
"E10000012","Essex","RQ8",35966
"E10000012","Essex","R1L",2571
"E10000012","Essex","RAJ",18455
"E10000012","Essex","R1H",5564
"E10000012","Essex","RF4",3960
"E10000012","Essex","RDE",39565
"E10000012","Essex","RJ1",217
"E10000012","Essex","RRV",361
"E10000012","Essex","RAL",266
"E10000012","Essex","RYJ",124
"E10000012","Essex","RGT",4152
"E10000012","Essex","RJZ",65
"E10000012","Essex","RQM",55
"E10000012","Essex","RXC",37
"E10000012","Essex","RGR",382
"E10000012","Essex","RQW",20906
"E10000012","Essex","R1K",78
"E10000012","Essex","RN7",46
"E10000012","Essex","RGP",75
"E10000012","Essex","RQX",102
"E10000012","Essex","RP6",206
"E10000012","Essex","RM1",107
"E10000012","Essex","RYR",36
"E10000012","Essex","RP4",48
"E10000012","Essex","RAP",209
"E10000012","Essex","RDU",35
"E10000012","Essex","RAN",28
"E10000012","Essex","RTH",40
"E10000012","Essex","RA9",21
"E10000012","Essex","RT3",59
"E10000012","Essex","RDZ",22
"E10000012","Essex","RPY",34
"E10000012","Essex","RXQ",22
"E10000012","Essex","RC9",29
"E10000012","Essex","RJ2",46
"E10000012","Essex","RVV",45
"E10000012","Essex","RJ7",51
"E10000012","Essex","RNQ",13
"E10000012","Essex","RAX",16
"E10000012","Essex","RHU",13
"E10000012","Essex","RJE",15
"E10000012","Essex","RRK",36
"E10000012","Essex","REF",42
"E10000012","Essex","RK9",18
"E10000012","Essex","RTP",23
"E10000012","Essex","RGN",32
"E10000012","Essex","RHM",24
"E10000012","Essex","RWK",11
"E10000012","Essex","RAT",20
"E10000012","Essex","RCX",42
"E10000012","Essex","RTK",12
"E10000012","Essex","RWD",23
"E10000012","Essex","RAS",21
"E10000012","Essex","RTF",10
"E10000012","Essex","RGM",77
"E10000012","Essex","RPA",22
"E10000012","Essex","RWF",38
"E10000012","Essex","RX1",21
"E10000012","Essex","RXH",27
"E10000012","Essex","RJ6",10
"E10000012","Essex","RKE",25
"E10000012","Essex","RTD",7
"E10000012","Essex","RXW",9
"E10000012","Essex","RBZ",19
"E10000012","Essex","RN5",18
"E10000012","Essex","RWH",233
"E10000012","Essex","RCB",27
"E10000012","Essex","RNS",16
"E10000012","Essex","RN3",18
"E10000012","Essex","RA2",16
"E10000012","Essex","RBS",2
"E10000012","Essex","RTE",16
"E10000012","Essex","RXP",8
"E10000012","Essex","RBA",17
"E10000012","Essex","REM",14
"E10000012","Essex","RFS",12
"E10000012","Essex","RT5",1
"E10000012","Essex","RXL",9
"E10000012","Essex","RA4",10
"E10000012","Essex","RHW",18
"E10000012","Essex","RP5",6
"E10000012","Essex","RWE",15
"E10000012","Essex","RWG",35
"E10000012","Essex","RBD",13
"E10000012","Essex","RD1",20
"E10000012","Essex","RPC",3
"E10000012","Essex","RXF",3
"E10000012","Essex","R1F",9
"E10000012","Essex","RJC",10
"E10000012","Essex","RK5",7
"E10000012","Essex","RWJ",5
"E10000012","Essex","RX2",2
"E10000012","Essex","RXK",9
"E10000012","Essex","RD8",21
"E10000012","Essex","RKB",15
"E10000012","Essex","RVR",16
"E10000012","Essex","RYV",1
"E10000012","Essex","RH8",28
"E10000012","Essex","RXY",2
"E10000012","Essex","RWY",5
"E10000012","Essex","RMY",9
"E10000012","Essex","RD3",22
"E10000012","Essex","RW6",4
"E10000012","Essex","RNL",15
"E10000012","Essex","RR8",9
"E10000012","Essex","RVJ",11
"E10000012","Essex","RLQ",12
"E10000012","Essex","RM3",6
"E10000012","Essex","RTG",21
"E10000012","Essex","RTX",12
"E10000012","Essex","RMP",1
"E10000012","Essex","R0A",18
"E10000012","Essex","RJR",2
"E10000012","Essex","RLT",1
"E10000012","Essex","RXN",4
"E10000012","Essex","RL4",3
"E10000012","Essex","RWP",5
"E10000012","Essex","RNA",3
"E10000012","Essex","RA7",19
"E10000012","Essex","RTR",8
"E10000012","Essex","RCD",4
"E10000012","Essex","RWA",6
"E10000012","Essex","RBV",1
"E10000012","Essex","RRE",1
"E10000012","Essex","RC1",14
"E10000012","Essex","RNZ",11
"E10000012","Essex","RJL",4
"E10000012","Essex","RW1",1
"E10000012","Essex","RBT",5
"E10000012","Essex","RCF",3
"E10000012","Essex","REN",1
"E10000012","Essex","RFF",2
"E10000012","Essex","RHQ",4
"E10000012","Essex","RDR",1
"E10000012","Essex","RJN",2
"E10000012","Essex","RVW",5
"E10000012","Essex","NQ1",55
"E10000012","Essex","RBN",5
"E10000012","Essex","RJ8",1
"E10000012","Essex","RRF",1
"E10000012","Essex","RAE",2
"E10000012","Essex","R0B",2
"E10000012","Essex","RWW",2
"E10000012","Essex","RMC",2
"E10000012","Essex","RA3",4
"E10000012","Essex","RCU",1
"E10000012","Essex","REP",1
"E10000012","Essex","RH5",1
"E10000012","Essex","RBL",4
"E10000012","Essex","RV3",1
"E10000012","Essex","RWR",3
"E10000012","Essex","RVY",1
"E10000012","Essex","RBK",1
"E10000012","Essex","RR7",3
"E10000012","Essex","RXR",1
"E10000012","Essex","RXG",2
"E10000012","Essex","RFR",1
"E10000012","Essex","TAD",1
"E10000012","Essex","RP7",1
"E10000013","Gloucestershire","RTE",52002
"E10000013","Gloucestershire","RTQ",643
"E10000013","Gloucestershire","RA7",721
"E10000013","Gloucestershire","RVJ",953
"E10000013","Gloucestershire","R1J",475
"E10000013","Gloucestershire","RTH",545
"E10000013","Gloucestershire","RN3",2462
"E10000013","Gloucestershire","RWP",156
"E10000013","Gloucestershire","RRK",111
"E10000013","Gloucestershire","RA9",32
"E10000013","Gloucestershire","REF",45
"E10000013","Gloucestershire","RLQ",148
"E10000013","Gloucestershire","RRV",16
"E10000013","Gloucestershire","RD1",88
"E10000013","Gloucestershire","RA3",26
"E10000013","Gloucestershire","RDZ",22
"E10000013","Gloucestershire","RK9",24
"E10000013","Gloucestershire","RDU",35
"E10000013","Gloucestershire","RBA",37
"E10000013","Gloucestershire","RH8",31
"E10000013","Gloucestershire","RJC",268
"E10000013","Gloucestershire","RNU",8
"E10000013","Gloucestershire","RYR",11
"E10000013","Gloucestershire","R0A",22
"E10000013","Gloucestershire","RWG",7
"E10000013","Gloucestershire","RXC",9
"E10000013","Gloucestershire","RKB",31
"E10000013","Gloucestershire","RNL",7
"E10000013","Gloucestershire","RWF",9
"E10000013","Gloucestershire","R1F",9
"E10000013","Gloucestershire","RD3",15
"E10000013","Gloucestershire","REM",10
"E10000013","Gloucestershire","RAX",9
"E10000013","Gloucestershire","RXK",24
"E10000013","Gloucestershire","RXQ",20
"E10000013","Gloucestershire","RBD",13
"E10000013","Gloucestershire","RKE",4
"E10000013","Gloucestershire","RYJ",14
"E10000013","Gloucestershire","RCB",12
"E10000013","Gloucestershire","RT3",9
"E10000013","Gloucestershire","RVW",5
"E10000013","Gloucestershire","RQM",19
"E10000013","Gloucestershire","RHM",11
"E10000013","Gloucestershire","RN5",12
"E10000013","Gloucestershire","RXH",8
"E10000013","Gloucestershire","RA4",7
"E10000013","Gloucestershire","RCX",7
"E10000013","Gloucestershire","RHW",12
"E10000013","Gloucestershire","RM1",8
"E10000013","Gloucestershire","RDE",8
"E10000013","Gloucestershire","RJE",9
"E10000013","Gloucestershire","RWE",15
"E10000013","Gloucestershire","RAS",2
"E10000013","Gloucestershire","RBT",7
"E10000013","Gloucestershire","RTX",10
"E10000013","Gloucestershire","RGT",6
"E10000013","Gloucestershire","RNZ",12
"E10000013","Gloucestershire","RVV",3
"E10000013","Gloucestershire","RX1",5
"E10000013","Gloucestershire","RXN",5
"E10000013","Gloucestershire","R1A",7
"E10000013","Gloucestershire","RVR",4
"E10000013","Gloucestershire","RXR",5
"E10000013","Gloucestershire","RXW",10
"E10000013","Gloucestershire","R1K",11
"E10000013","Gloucestershire","RJ6",3
"E10000013","Gloucestershire","RN7",3
"E10000013","Gloucestershire","RH5",3
"E10000013","Gloucestershire","RJ7",11
"E10000013","Gloucestershire","RNQ",3
"E10000013","Gloucestershire","RXP",3
"E10000013","Gloucestershire","RC1",3
"E10000013","Gloucestershire","RD8",2
"E10000013","Gloucestershire","RHQ",3
"E10000013","Gloucestershire","RM3",4
"E10000013","Gloucestershire","RP6",2
"E10000013","Gloucestershire","RTG",6
"E10000013","Gloucestershire","RXY",1
"E10000013","Gloucestershire","R1H",20
"E10000013","Gloucestershire","RAL",6
"E10000013","Gloucestershire","RJ2",7
"E10000013","Gloucestershire","RA2",8
"E10000013","Gloucestershire","RBZ",28
"E10000013","Gloucestershire","RF4",2
"E10000013","Gloucestershire","RJ1",18
"E10000013","Gloucestershire","RTD",4
"E10000013","Gloucestershire","RWH",8
"E10000013","Gloucestershire","RP5",3
"E10000013","Gloucestershire","RVN",7
"E10000013","Gloucestershire","RX2",1
"E10000013","Gloucestershire","RTK",5
"E10000013","Gloucestershire","RPY",7
"E10000013","Gloucestershire","RFR",5
"E10000013","Gloucestershire","RTP",10
"E10000013","Gloucestershire","RNS",5
"E10000013","Gloucestershire","RYG",2
"E10000013","Gloucestershire","RQX",4
"E10000013","Gloucestershire","RRJ",3
"E10000013","Gloucestershire","RGN",3
"E10000013","Gloucestershire","RQ8",6
"E10000013","Gloucestershire","RDD",4
"E10000013","Gloucestershire","RWW",1
"E10000013","Gloucestershire","RHU",6
"E10000013","Gloucestershire","RW5",1
"E10000013","Gloucestershire","RL4",7
"E10000013","Gloucestershire","RPA",3
"E10000013","Gloucestershire","RTF",3
"E10000013","Gloucestershire","RQ3",6
"E10000013","Gloucestershire","RNA",3
"E10000013","Gloucestershire","RW6",1
"E10000013","Gloucestershire","TAJ",1
"E10000013","Gloucestershire","RBN",1
"E10000013","Gloucestershire","RDY",3
"E10000013","Gloucestershire","RXL",2
"E10000013","Gloucestershire","RJN",1
"E10000013","Gloucestershire","RR8",1
"E10000013","Gloucestershire","RC9",4
"E10000013","Gloucestershire","RCF",1
"E10000013","Gloucestershire","RJZ",6
"E10000013","Gloucestershire","RMC",2
"E10000013","Gloucestershire","RMP",1
"E10000013","Gloucestershire","RAE",1
"E10000013","Gloucestershire","RGM",1
"E10000013","Gloucestershire","RWA",1
"E10000013","Gloucestershire","RWD",2
"E10000013","Gloucestershire","RAP",1
"E10000013","Gloucestershire","RJL",2
"E10000013","Gloucestershire","RP7",1
"E10000013","Gloucestershire","RWK",3
"E10000013","Gloucestershire","RK5",2
"E10000013","Gloucestershire","RBK",2
"E10000013","Gloucestershire","RTR",2
"E10000013","Gloucestershire","RAJ",2
"E10000013","Gloucestershire","RGP",3
"E10000013","Gloucestershire","RCD",2
"E10000013","Gloucestershire","RWX",1
"E10000013","Gloucestershire","RX3",1
"E10000013","Gloucestershire","RCU",1
"E10000013","Gloucestershire","RWY",1
"E10000013","Gloucestershire","RT5",1
"E10000013","Gloucestershire","RFF",9
"E10000013","Gloucestershire","RWJ",3
"E10000013","Gloucestershire","REN",2
"E10000013","Gloucestershire","RVY",1
"E10000013","Gloucestershire","R0B",1
"E10000013","Gloucestershire","RQW",1
"E10000013","Gloucestershire","RL1",1
"E10000013","Gloucestershire","RW1",1
"E10000013","Gloucestershire","RJR",1
"E10000014","Hampshire","RN5",40968
"E10000014","Hampshire","RDU",17478
"E10000014","Hampshire","RHM",28748
"E10000014","Hampshire","RHW",295
"E10000014","Hampshire","RW1",3043
"E10000014","Hampshire","RA2",4097
"E10000014","Hampshire","RHU",36104
"E10000014","Hampshire","RTH",176
"E10000014","Hampshire","RNZ",2694
"E10000014","Hampshire","RJ1",152
"E10000014","Hampshire","RJ7",232
"E10000014","Hampshire","RN3",70
"E10000014","Hampshire","RDZ",5009
"E10000014","Hampshire","RT3",60
"E10000014","Hampshire","RJZ",47
"E10000014","Hampshire","REF",93
"E10000014","Hampshire","RYR",695
"E10000014","Hampshire","RWG",22
"E10000014","Hampshire","RBZ",37
"E10000014","Hampshire","RD3",747
"E10000014","Hampshire","R1K",35
"E10000014","Hampshire","R1F",68
"E10000014","Hampshire","RTK",102
"E10000014","Hampshire","RYJ",66
"E10000014","Hampshire","RRV",48
"E10000014","Hampshire","RA7",27
"E10000014","Hampshire","RVJ",35
"E10000014","Hampshire","RWX",10
"E10000014","Hampshire","RBD",88
"E10000014","Hampshire","RA9",46
"E10000014","Hampshire","RH8",49
"E10000014","Hampshire","RA4",28
"E10000014","Hampshire","RPY",36
"E10000014","Hampshire","RQM",99
"E10000014","Hampshire","RP6",11
"E10000014","Hampshire","RTG",20
"E10000014","Hampshire","RXQ",28
"E10000014","Hampshire","R1H",48
"E10000014","Hampshire","RK9",47
"E10000014","Hampshire","RXH",54
"E10000014","Hampshire","RWF",21
"E10000014","Hampshire","RRK",35
"E10000014","Hampshire","R0A",13
"E10000014","Hampshire","RXW",18
"E10000014","Hampshire","RAS",20
"E10000014","Hampshire","RTP",39
"E10000014","Hampshire","RAX",43
"E10000014","Hampshire","RXC",39
"E10000014","Hampshire","RTX",13
"E10000014","Hampshire","RBA",31
"E10000014","Hampshire","RTD",9
"E10000014","Hampshire","RTE",34
"E10000014","Hampshire","RC9",8
"E10000014","Hampshire","RGT",26
"E10000014","Hampshire","RJC",11
"E10000014","Hampshire","RNU",4
"E10000014","Hampshire","RVV",19
"E10000014","Hampshire","RGN",10
"E10000014","Hampshire","RWH",21
"E10000014","Hampshire","RX1",9
"E10000014","Hampshire","RJ2",16
"E10000014","Hampshire","RAL",30
"E10000014","Hampshire","RD1",41
"E10000014","Hampshire","RDY",10
"E10000014","Hampshire","RL4",4
"E10000014","Hampshire","RN7",8
"E10000014","Hampshire","RR8",10
"E10000014","Hampshire","RV5",2
"E10000014","Hampshire","RW4",1
"E10000014","Hampshire","RWD",12
"E10000014","Hampshire","RWE",12
"E10000014","Hampshire","RWJ",9
"E10000014","Hampshire","RXF",4
"E10000014","Hampshire","RXP",7
"E10000014","Hampshire","RM1",14
"E10000014","Hampshire","RMC",3
"E10000014","Hampshire","RQW",7
"E10000014","Hampshire","RWA",10
"E10000014","Hampshire","RAJ",4
"E10000014","Hampshire","RC1",13
"E10000014","Hampshire","RDD",11
"E10000014","Hampshire","RFS",7
"E10000014","Hampshire","RJ6",12
"E10000014","Hampshire","RNQ",11
"E10000014","Hampshire","REM",10
"E10000014","Hampshire","RBK",2
"E10000014","Hampshire","RBL",7
"E10000014","Hampshire","RJE",13
"E10000014","Hampshire","RVW",8
"E10000014","Hampshire","RA3",7
"E10000014","Hampshire","RP4",4
"E10000014","Hampshire","RTF",7
"E10000014","Hampshire","RXN",3
"E10000014","Hampshire","RKE",2
"E10000014","Hampshire","RQX",12
"E10000014","Hampshire","RR7",4
"E10000014","Hampshire","RWK",8
"E10000014","Hampshire","RWY",3
"E10000014","Hampshire","RXK",5
"E10000014","Hampshire","RXL",8
"E10000014","Hampshire","RXX",156
"E10000014","Hampshire","RCB",18
"E10000014","Hampshire","RDE",19
"E10000014","Hampshire","RGP",6
"E10000014","Hampshire","RQ8",7
"E10000014","Hampshire","RAN",11
"E10000014","Hampshire","RGM",6
"E10000014","Hampshire","RJ8",2
"E10000014","Hampshire","RKB",19
"E10000014","Hampshire","RLQ",5
"E10000014","Hampshire","RPC",31
"E10000014","Hampshire","RVR",46
"E10000014","Hampshire","RNL",12
"E10000014","Hampshire","RNS",16
"E10000014","Hampshire","RCX",8
"E10000014","Hampshire","RPA",10
"E10000014","Hampshire","RAP",6
"E10000014","Hampshire","RNA",2
"E10000014","Hampshire","RTR",7
"E10000014","Hampshire","RF4",6
"E10000014","Hampshire","RX2",6
"E10000014","Hampshire","RCD",5
"E10000014","Hampshire","RHQ",7
"E10000014","Hampshire","RBN",4
"E10000014","Hampshire","RQ3",1
"E10000014","Hampshire","RGR",10
"E10000014","Hampshire","RWP",9
"E10000014","Hampshire","RBT",6
"E10000014","Hampshire","RAE",6
"E10000014","Hampshire","RVN",6
"E10000014","Hampshire","NDA",1
"E10000014","Hampshire","R1C",1
"E10000014","Hampshire","RXR",6
"E10000014","Hampshire","RVY",3
"E10000014","Hampshire","RFF",8
"E10000014","Hampshire","RK5",2
"E10000014","Hampshire","RD8",17
"E10000014","Hampshire","RCF",3
"E10000014","Hampshire","RH5",7
"E10000014","Hampshire","RET",1
"E10000014","Hampshire","RM3",2
"E10000014","Hampshire","RX3",2
"E10000014","Hampshire","RJR",5
"E10000014","Hampshire","R0B",4
"E10000014","Hampshire","RJL",5
"E10000014","Hampshire","RYV",2
"E10000014","Hampshire","RLT",1
"E10000014","Hampshire","RRF",2
"E10000014","Hampshire","RDR",1
"E10000014","Hampshire","RW6",2
"E10000014","Hampshire","RV3",1
"E10000014","Hampshire","RWW",6
"E10000014","Hampshire","RJN",1
"E10000014","Hampshire","R1L",2
"E10000014","Hampshire","RCU",2
"E10000014","Hampshire","RNN",1
"E10000014","Hampshire","RHA",1
"E10000014","Hampshire","AXG",2
"E10000014","Hampshire","RBS",1
"E10000014","Hampshire","RRE",1
"E10000015","Hertfordshire","RQW",11943
"E10000015","Hertfordshire","RAL",9677
"E10000015","Hertfordshire","RAP",1349
"E10000015","Hertfordshire","RWH",39622
"E10000015","Hertfordshire","R1H",490
"E10000015","Hertfordshire","RRV",905
"E10000015","Hertfordshire","RQ8",278
"E10000015","Hertfordshire","RGT",2354
"E10000015","Hertfordshire","RWR",318
"E10000015","Hertfordshire","RF4",81
"E10000015","Hertfordshire","RDD",99
"E10000015","Hertfordshire","RP6",246
"E10000015","Hertfordshire","RWG",39181
"E10000015","Hertfordshire","RJ1",219
"E10000015","Hertfordshire","RC9",4533
"E10000015","Hertfordshire","RKE",54
"E10000015","Hertfordshire","RYJ",685
"E10000015","Hertfordshire","RQX",47
"E10000015","Hertfordshire","R1K",804
"E10000015","Hertfordshire","RT3",528
"E10000015","Hertfordshire","RDE",87
"E10000015","Hertfordshire","RQM",179
"E10000015","Hertfordshire","RCX",36
"E10000015","Hertfordshire","RJ7",61
"E10000015","Hertfordshire","RP4",54
"E10000015","Hertfordshire","RJC",17
"E10000015","Hertfordshire","RXH",32
"E10000015","Hertfordshire","RDU",111
"E10000015","Hertfordshire","RJZ",62
"E10000015","Hertfordshire","RGP",52
"E10000015","Hertfordshire","RD8",79
"E10000015","Hertfordshire","RM1",53
"E10000015","Hertfordshire","RRK",36
"E10000015","Hertfordshire","RAN",43
"E10000015","Hertfordshire","R1L",12
"E10000015","Hertfordshire","RN7",12
"E10000015","Hertfordshire","RXR",9
"E10000015","Hertfordshire","RAJ",15
"E10000015","Hertfordshire","RC1",103
"E10000015","Hertfordshire","RGN",39
"E10000015","Hertfordshire","RHU",18
"E10000015","Hertfordshire","RP5",11
"E10000015","Hertfordshire","RTH",139
"E10000015","Hertfordshire","RPY",35
"E10000015","Hertfordshire","RKB",13
"E10000015","Hertfordshire","RA7",22
"E10000015","Hertfordshire","RDZ",37
"E10000015","Hertfordshire","RGR",21
"E10000015","Hertfordshire","RXC",26
"E10000015","Hertfordshire","RBD",31
"E10000015","Hertfordshire","RK9",18
"E10000015","Hertfordshire","RVW",4
"E10000015","Hertfordshire","R1F",18
"E10000015","Hertfordshire","RH8",21
"E10000015","Hertfordshire","RXQ",1936
"E10000015","Hertfordshire","RWD",22
"E10000015","Hertfordshire","RGM",27
"E10000015","Hertfordshire","RNS",40
"E10000015","Hertfordshire","RJ2",22
"E10000015","Hertfordshire","RAX",27
"E10000015","Hertfordshire","RVV",21
"E10000015","Hertfordshire","RAS",168
"E10000015","Hertfordshire","RCB",34
"E10000015","Hertfordshire","RTF",12
"E10000015","Hertfordshire","RTP",10
"E10000015","Hertfordshire","RVJ",11
"E10000015","Hertfordshire","RXL",5
"E10000015","Hertfordshire","R0B",6
"E10000015","Hertfordshire","RJE",11
"E10000015","Hertfordshire","RTK",21
"E10000015","Hertfordshire","RYR",29
"E10000015","Hertfordshire","RA9",19
"E10000015","Hertfordshire","RBT",9
"E10000015","Hertfordshire","RXF",5
"E10000015","Hertfordshire","RXW",13
"E10000015","Hertfordshire","RN5",17
"E10000015","Hertfordshire","RPA",8
"E10000015","Hertfordshire","RWE",20
"E10000015","Hertfordshire","RWF",16
"E10000015","Hertfordshire","RYV",8
"E10000015","Hertfordshire","RA4",7
"E10000015","Hertfordshire","REM",14
"E10000015","Hertfordshire","RXK",6
"E10000015","Hertfordshire","RXN",3
"E10000015","Hertfordshire","RBZ",10
"E10000015","Hertfordshire","RD3",27
"E10000015","Hertfordshire","RXP",8
"E10000015","Hertfordshire","RVY",2
"E10000015","Hertfordshire","REF",39
"E10000015","Hertfordshire","RHM",28
"E10000015","Hertfordshire","RNA",1
"E10000015","Hertfordshire","RNL",10
"E10000015","Hertfordshire","RTR",6
"E10000015","Hertfordshire","RX1",17
"E10000015","Hertfordshire","RNQ",11
"E10000015","Hertfordshire","RNU",5
"E10000015","Hertfordshire","RV3",7
"E10000015","Hertfordshire","RTE",25
"E10000015","Hertfordshire","RBA",12
"E10000015","Hertfordshire","RBK",3
"E10000015","Hertfordshire","RHW",20
"E10000015","Hertfordshire","RA2",14
"E10000015","Hertfordshire","RLQ",15
"E10000015","Hertfordshire","RD1",19
"E10000015","Hertfordshire","RLT",5
"E10000015","Hertfordshire","RVR",12
"E10000015","Hertfordshire","RN3",12
"E10000015","Hertfordshire","RBS",2
"E10000015","Hertfordshire","RR8",12
"E10000015","Hertfordshire","RWY",4
"E10000015","Hertfordshire","RWA",6
"E10000015","Hertfordshire","R0A",20
"E10000015","Hertfordshire","RRF",2
"E10000015","Hertfordshire","RAE",6
"E10000015","Hertfordshire","RNZ",11
"E10000015","Hertfordshire","RWK",14
"E10000015","Hertfordshire","RCD",5
"E10000015","Hertfordshire","RTG",12
"E10000015","Hertfordshire","RHQ",6
"E10000015","Hertfordshire","RJ8",1
"E10000015","Hertfordshire","RTD",15
"E10000015","Hertfordshire","RMY",5
"E10000015","Hertfordshire","RWP",6
"E10000015","Hertfordshire","RJN",6
"E10000015","Hertfordshire","RJ6",5
"E10000015","Hertfordshire","RK5",6
"E10000015","Hertfordshire","RV5",1
"E10000015","Hertfordshire","RT1",17
"E10000015","Hertfordshire","RJR",6
"E10000015","Hertfordshire","RR7",2
"E10000015","Hertfordshire","RXY",1
"E10000015","Hertfordshire","RFF",2
"E10000015","Hertfordshire","RXT",2
"E10000015","Hertfordshire","RBL",3
"E10000015","Hertfordshire","RW6",6
"E10000015","Hertfordshire","RTX",11
"E10000015","Hertfordshire","RPC",3
"E10000015","Hertfordshire","RCF",2
"E10000015","Hertfordshire","RWJ",4
"E10000015","Hertfordshire","RM3",2
"E10000015","Hertfordshire","RW1",2
"E10000015","Hertfordshire","RDY",1
"E10000015","Hertfordshire","RCU",2
"E10000015","Hertfordshire","RW4",1
"E10000015","Hertfordshire","RDR",1
"E10000015","Hertfordshire","RMC",6
"E10000015","Hertfordshire","RAT",2
"E10000015","Hertfordshire","RWW",3
"E10000015","Hertfordshire","RL4",3
"E10000015","Hertfordshire","RQ3",2
"E10000015","Hertfordshire","RA3",2
"E10000015","Hertfordshire","RT5",1
"E10000016","Kent","RVV",72500
"E10000016","Kent","RWF",48633
"E10000016","Kent","RXY",1611
"E10000016","Kent","RXC",439
"E10000016","Kent","RPC",1674
"E10000016","Kent","RJ1",1520
"E10000016","Kent","RJZ",1930
"E10000016","Kent","RPA",12571
"E10000016","Kent","RP6",145
"E10000016","Kent","R1H",271
"E10000016","Kent","RRV",189
"E10000016","Kent","RTP",188
"E10000016","Kent","RN7",26614
"E10000016","Kent","RJ7",151
"E10000016","Kent","RAL",53
"E10000016","Kent","RJ2",440
"E10000016","Kent","RPY",88
"E10000016","Kent","RQM",84
"E10000016","Kent","RJ6",45
"E10000016","Kent","RYJ",103
"E10000016","Kent","RDU",48
"E10000016","Kent","RXH",120
"E10000016","Kent","RVR",45
"E10000016","Kent","RA9",28
"E10000016","Kent","RT3",38
"E10000016","Kent","RYR",64
"E10000016","Kent","REF",57
"E10000016","Kent","RH8",39
"E10000016","Kent","RTH",36
"E10000016","Kent","RWD",25
"E10000016","Kent","RGR",31
"E10000016","Kent","RHM",40
"E10000016","Kent","RJE",15
"E10000016","Kent","RD3",31
"E10000016","Kent","RDD",97
"E10000016","Kent","RWH",25
"E10000016","Kent","RBZ",24
"E10000016","Kent","RDE",32
"E10000016","Kent","RGT",36
"E10000016","Kent","RBD",24
"E10000016","Kent","RTE",23
"E10000016","Kent","RNS",10
"E10000016","Kent","RHW",29
"E10000016","Kent","RAS",12
"E10000016","Kent","RGM",8
"E10000016","Kent","R0A",16
"E10000016","Kent","RA2",44
"E10000016","Kent","RC9",14
"E10000016","Kent","RNL",6
"E10000016","Kent","RK9",33
"E10000016","Kent","RQX",30
"E10000016","Kent","RWE",24
"E10000016","Kent","RWP",7
"E10000016","Kent","RNZ",9
"E10000016","Kent","RRK",28
"E10000016","Kent","RTR",12
"E10000016","Kent","RWG",20
"E10000016","Kent","RBA",27
"E10000016","Kent","RTK",25
"E10000016","Kent","RD8",14
"E10000016","Kent","RQ8",46
"E10000016","Kent","RWY",5
"E10000016","Kent","RN5",43
"E10000016","Kent","RP4",10
"E10000016","Kent","RXP",11
"E10000016","Kent","RXQ",19
"E10000016","Kent","RAX",33
"E10000016","Kent","RC1",10
"E10000016","Kent","RCF",6
"E10000016","Kent","RGP",24
"E10000016","Kent","RW1",6
"E10000016","Kent","RXL",6
"E10000016","Kent","RTF",17
"E10000016","Kent","RTX",8
"E10000016","Kent","RA7",25
"E10000016","Kent","RBT",5
"E10000016","Kent","RM3",3
"E10000016","Kent","RXW",11
"E10000016","Kent","RBL",5
"E10000016","Kent","RM1",25
"E10000016","Kent","REM",14
"E10000016","Kent","R1K",51
"E10000016","Kent","RA4",10
"E10000016","Kent","RAP",15
"E10000016","Kent","RDZ",32
"E10000016","Kent","RN3",18
"E10000016","Kent","RW6",7
"E10000016","Kent","RX1",14
"E10000016","Kent","RJN",3
"E10000016","Kent","RK5",12
"E10000016","Kent","RKB",10
"E10000016","Kent","RTG",10
"E10000016","Kent","RF4",34
"E10000016","Kent","RGN",25
"E10000016","Kent","RCB",22
"E10000016","Kent","RHU",35
"E10000016","Kent","RD1",22
"E10000016","Kent","RLQ",8
"E10000016","Kent","RAJ",24
"E10000016","Kent","RJL",7
"E10000016","Kent","RWK",4
"E10000016","Kent","RVJ",13
"E10000016","Kent","RCX",9
"E10000016","Kent","RVW",5
"E10000016","Kent","RA3",8
"E10000016","Kent","RAN",20
"E10000016","Kent","RMC",2
"E10000016","Kent","RQW",16
"E10000016","Kent","RKE",11
"E10000016","Kent","RBK",6
"E10000016","Kent","RFS",3
"E10000016","Kent","RNU",2
"E10000016","Kent","RTD",8
"E10000016","Kent","RWJ",6
"E10000016","Kent","RXK",12
"E10000016","Kent","RJR",6
"E10000016","Kent","RR8",10
"E10000016","Kent","RP5",8
"E10000016","Kent","RAT",4
"E10000016","Kent","R1L",2
"E10000016","Kent","RRF",6
"E10000016","Kent","RPG",18
"E10000016","Kent","NDA",50
"E10000016","Kent","R1F",21
"E10000016","Kent","RFR",4
"E10000016","Kent","RX2",7
"E10000016","Kent","RJC",11
"E10000016","Kent","RBS",1
"E10000016","Kent","RCD",8
"E10000016","Kent","RXF",3
"E10000016","Kent","RXT",1
"E10000016","Kent","RXN",5
"E10000016","Kent","RBN",5
"E10000016","Kent","RHQ",4
"E10000016","Kent","RWA",7
"E10000016","Kent","RAE",6
"E10000016","Kent","RR7",5
"E10000016","Kent","RNA",4
"E10000016","Kent","RQ3",4
"E10000016","Kent","RXR",1
"E10000016","Kent","RNQ",5
"E10000016","Kent","RV3",2
"E10000016","Kent","RET",2
"E10000016","Kent","RCU",1
"E10000016","Kent","RWW",3
"E10000016","Kent","RYV",1
"E10000016","Kent","RDR",1
"E10000016","Kent","RBQ",1
"E10000016","Kent","R0B",2
"E10000016","Kent","RFF",1
"E10000016","Kent","NQ7",3
"E10000016","Kent","RDY",1
"E10000016","Kent","RV5",3
"E10000016","Kent","RW4",2
"E10000016","Kent","RX3",1
"E10000016","Kent","RWX",1
"E10000017","Lancashire","RXR",39504
"E10000017","Lancashire","RXN",46508
"E10000017","Lancashire","R0A",1473
"E10000017","Lancashire","RW5",1429
"E10000017","Lancashire","RXL",18847
"E10000017","Lancashire","RCF",2865
"E10000017","Lancashire","RM3",304
"E10000017","Lancashire","RBS",474
"E10000017","Lancashire","RW6",1576
"E10000017","Lancashire","RCB",66
"E10000017","Lancashire","RTX",17149
"E10000017","Lancashire","REM",1326
"E10000017","Lancashire","RAE",143
"E10000017","Lancashire","RX1",25
"E10000017","Lancashire","RRF",2382
"E10000017","Lancashire","RMC",273
"E10000017","Lancashire","RJE",38
"E10000017","Lancashire","RHQ",36
"E10000017","Lancashire","RBN",375
"E10000017","Lancashire","RR8",159
"E10000017","Lancashire","RFF",8
"E10000017","Lancashire","RA9",20
"E10000017","Lancashire","RBV",142
"E10000017","Lancashire","RWY",35
"E10000017","Lancashire","RA2",16
"E10000017","Lancashire","RET",95
"E10000017","Lancashire","RKB",18
"E10000017","Lancashire","RP5",13
"E10000017","Lancashire","RTG",16
"E10000017","Lancashire","RWJ",30
"E10000017","Lancashire","RJC",8
"E10000017","Lancashire","RRV",17
"E10000017","Lancashire","R1K",12
"E10000017","Lancashire","RBT",29
"E10000017","Lancashire","RNL",68
"E10000017","Lancashire","RDU",16
"E10000017","Lancashire","RH8",12
"E10000017","Lancashire","RXF",25
"E10000017","Lancashire","RWE",14
"E10000017","Lancashire","RDE",8
"E10000017","Lancashire","RBQ",157
"E10000017","Lancashire","RC9",3
"E10000017","Lancashire","RTH",15
"E10000017","Lancashire","RWD",21
"E10000017","Lancashire","RWW",50
"E10000017","Lancashire","RTE",11
"E10000017","Lancashire","RD3",11
"E10000017","Lancashire","RJ1",25
"E10000017","Lancashire","RN5",5
"E10000017","Lancashire","RTR",16
"E10000017","Lancashire","RWP",9
"E10000017","Lancashire","RXK",9
"E10000017","Lancashire","RYV",1
"E10000017","Lancashire","R1H",29
"E10000017","Lancashire","RK9",7
"E10000017","Lancashire","RMP",23
"E10000017","Lancashire","RTK",4
"E10000017","Lancashire","RVY",11198
"E10000017","Lancashire","RXG",1
"E10000017","Lancashire","RBD",5
"E10000017","Lancashire","RCD",13
"E10000017","Lancashire","REF",33
"E10000017","Lancashire","RJ7",20
"E10000017","Lancashire","RJN",14
"E10000017","Lancashire","RXW",14
"E10000017","Lancashire","RBL",28
"E10000017","Lancashire","RWA",16
"E10000017","Lancashire","RLQ",6
"E10000017","Lancashire","RNZ",6
"E10000017","Lancashire","RTD",37
"E10000017","Lancashire","RRK",40
"E10000017","Lancashire","RTV",20
"E10000017","Lancashire","RBK",9
"E10000017","Lancashire","RHW",8
"E10000017","Lancashire","RYR",6
"E10000017","Lancashire","RWG",11
"E10000017","Lancashire","RBZ",3
"E10000017","Lancashire","RCX",12
"E10000017","Lancashire","RQM",15
"E10000017","Lancashire","RTF",18
"E10000017","Lancashire","RD8",8
"E10000017","Lancashire","REN",53
"E10000017","Lancashire","RGM",1
"E10000017","Lancashire","RGT",15
"E10000017","Lancashire","RXQ",8
"E10000017","Lancashire","RD1",9
"E10000017","Lancashire","RF4",3
"E10000017","Lancashire","RNQ",5
"E10000017","Lancashire","RBA",5
"E10000017","Lancashire","R0B",4
"E10000017","Lancashire","REP",13
"E10000017","Lancashire","RJ2",6
"E10000017","Lancashire","RJR",21
"E10000017","Lancashire","RJZ",4
"E10000017","Lancashire","RL4",4
"E10000017","Lancashire","RXP",15
"E10000017","Lancashire","RTP",3
"E10000017","Lancashire","RVR",5
"E10000017","Lancashire","RA7",6
"E10000017","Lancashire","RA3",5
"E10000017","Lancashire","RGP",7
"E10000017","Lancashire","RNS",13
"E10000017","Lancashire","RFR",6
"E10000017","Lancashire","RGN",7
"E10000017","Lancashire","RVV",11
"E10000017","Lancashire","RFS",9
"E10000017","Lancashire","RLY",7
"E10000017","Lancashire","RNN",2
"E10000017","Lancashire","RXC",7
"E10000017","Lancashire","RHM",9
"E10000017","Lancashire","RWF",7
"E10000017","Lancashire","RAL",12
"E10000017","Lancashire","RQ8",7
"E10000017","Lancashire","RVW",6
"E10000017","Lancashire","RXA",6
"E10000017","Lancashire","RAP",5
"E10000017","Lancashire","RQW",4
"E10000017","Lancashire","RRE",5
"E10000017","Lancashire","RR7",5
"E10000017","Lancashire","RXH",2
"E10000017","Lancashire","RN3",6
"E10000017","Lancashire","RN7",6
"E10000017","Lancashire","RYW",1
"E10000017","Lancashire","RAX",4
"E10000017","Lancashire","RGR",2
"E10000017","Lancashire","RLT",5
"E10000017","Lancashire","RX4",1
"E10000017","Lancashire","RDZ",6
"E10000017","Lancashire","RYJ",10
"E10000017","Lancashire","RAJ",2
"E10000017","Lancashire","RJL",4
"E10000017","Lancashire","RM1",9
"E10000017","Lancashire","RWH",4
"E10000017","Lancashire","RNA",5
"E10000017","Lancashire","RPA",2
"E10000017","Lancashire","RT3",1
"E10000017","Lancashire","RAS",6
"E10000017","Lancashire","RKE",5
"E10000017","Lancashire","RJ6",3
"E10000017","Lancashire","RCU",3
"E10000017","Lancashire","RHU",4
"E10000017","Lancashire","RYG",1
"E10000017","Lancashire","RK5",6
"E10000017","Lancashire","RV3",1
"E10000017","Lancashire","TAD",3
"E10000017","Lancashire","RP4",1
"E10000017","Lancashire","RQX",3
"E10000017","Lancashire","RVJ",7
"E10000017","Lancashire","RPY",1
"E10000017","Lancashire","R1F",2
"E10000017","Lancashire","RWK",1
"E10000017","Lancashire","RW4",8
"E10000017","Lancashire","RXX",1
"E10000017","Lancashire","RA4",3
"E10000017","Lancashire","RGD",1
"E10000017","Lancashire","RX3",1
"E10000017","Lancashire","RDD",3
"E10000017","Lancashire","RQ3",3
"E10000017","Lancashire","RC1",3
"E10000017","Lancashire","RHA",1
"E10000018","Leicestershire","RWE",54261
"E10000018","Leicestershire","RT5",3235
"E10000018","Leicestershire","RKB",1819
"E10000018","Leicestershire","RLT",2865
"E10000018","Leicestershire","RX1",2334
"E10000018","Leicestershire","RRK",127
"E10000018","Leicestershire","RTG",4202
"E10000018","Leicestershire","R1H",26
"E10000018","Leicestershire","REF",37
"E10000018","Leicestershire","R0A",23
"E10000018","Leicestershire","RHQ",22
"E10000018","Leicestershire","RNS",115
"E10000018","Leicestershire","RQ3",39
"E10000018","Leicestershire","RCB",32
"E10000018","Leicestershire","RWD",401
"E10000018","Leicestershire","RP6",13
"E10000018","Leicestershire","RRV",18
"E10000018","Leicestershire","RFS",11
"E10000018","Leicestershire","RXK",28
"E10000018","Leicestershire","RJ1",18
"E10000018","Leicestershire","RJ7",7
"E10000018","Leicestershire","RGP",21
"E10000018","Leicestershire","RJ6",4
"E10000018","Leicestershire","REM",10
"E10000018","Leicestershire","R1K",13
"E10000018","Leicestershire","RC1",9
"E10000018","Leicestershire","RCX",39
"E10000018","Leicestershire","RGN",96
"E10000018","Leicestershire","RK5",27
"E10000018","Leicestershire","RWG",11
"E10000018","Leicestershire","RNQ",1690
"E10000018","Leicestershire","RXF",13
"E10000018","Leicestershire","RXP",7
"E10000018","Leicestershire","RBZ",9
"E10000018","Leicestershire","RVJ",6
"E10000018","Leicestershire","RDU",19
"E10000018","Leicestershire","RGT",28
"E10000018","Leicestershire","RM1",19
"E10000018","Leicestershire","RTF",8
"E10000018","Leicestershire","RWH",9
"E10000018","Leicestershire","RDZ",8
"E10000018","Leicestershire","RTE",14
"E10000018","Leicestershire","RLQ",5
"E10000018","Leicestershire","RWJ",8
"E10000018","Leicestershire","RGR",5
"E10000018","Leicestershire","RVW",3
"E10000018","Leicestershire","RWY",6
"E10000018","Leicestershire","RYJ",14
"E10000018","Leicestershire","RBA",10
"E10000018","Leicestershire","RBQ",1
"E10000018","Leicestershire","RFF",8
"E10000018","Leicestershire","RQM",18
"E10000018","Leicestershire","RA3",5
"E10000018","Leicestershire","RA9",21
"E10000018","Leicestershire","RCD",5
"E10000018","Leicestershire","RFR",4
"E10000018","Leicestershire","RNZ",5
"E10000018","Leicestershire","RHA",9
"E10000018","Leicestershire","RHM",9
"E10000018","Leicestershire","RP5",13
"E10000018","Leicestershire","RPY",6
"E10000018","Leicestershire","RWW",3
"E10000018","Leicestershire","RXC",14
"E10000018","Leicestershire","RXQ",8
"E10000018","Leicestershire","RYR",4
"E10000018","Leicestershire","RA2",4
"E10000018","Leicestershire","RBK",8
"E10000018","Leicestershire","RK9",15
"E10000018","Leicestershire","RH8",21
"E10000018","Leicestershire","RJL",12
"E10000018","Leicestershire","RR8",13
"E10000018","Leicestershire","RA7",10
"E10000018","Leicestershire","RQW",10
"E10000018","Leicestershire","RW1",1
"E10000018","Leicestershire","RHU",7
"E10000018","Leicestershire","RXH",5
"E10000018","Leicestershire","RXL",6
"E10000018","Leicestershire","RAJ",2
"E10000018","Leicestershire","RD1",5
"E10000018","Leicestershire","RJC",28
"E10000018","Leicestershire","RPC",1
"E10000018","Leicestershire","RRJ",2
"E10000018","Leicestershire","RXW",11
"E10000018","Leicestershire","RTH",50
"E10000018","Leicestershire","RJE",36
"E10000018","Leicestershire","RC9",18
"E10000018","Leicestershire","RWF",11
"E10000018","Leicestershire","RBD",10
"E10000018","Leicestershire","RTD",6
"E10000018","Leicestershire","RM3",12
"E10000018","Leicestershire","RWA",5
"E10000018","Leicestershire","RD8",14
"E10000018","Leicestershire","RTX",8
"E10000018","Leicestershire","RHW",6
"E10000018","Leicestershire","RF4",7
"E10000018","Leicestershire","RNL",6
"E10000018","Leicestershire","RGM",10
"E10000018","Leicestershire","RL4",10
"E10000018","Leicestershire","RN3",8
"E10000018","Leicestershire","RQ8",11
"E10000018","Leicestershire","RWP",10
"E10000018","Leicestershire","RXN",3
"E10000018","Leicestershire","R1F",8
"E10000018","Leicestershire","RN5",10
"E10000018","Leicestershire","RN7",2
"E10000018","Leicestershire","RAP",2
"E10000018","Leicestershire","RBN",5
"E10000018","Leicestershire","RD3",6
"E10000018","Leicestershire","RTP",3
"E10000018","Leicestershire","RBL",4
"E10000018","Leicestershire","RCF",2
"E10000018","Leicestershire","RDE",6
"E10000018","Leicestershire","RAL",3
"E10000018","Leicestershire","R0B",6
"E10000018","Leicestershire","RT3",2
"E10000018","Leicestershire","RLY",1
"E10000018","Leicestershire","RP1",5
"E10000018","Leicestershire","RW6",5
"E10000018","Leicestershire","RVV",4
"E10000018","Leicestershire","RBS",2
"E10000018","Leicestershire","RDD",4
"E10000018","Leicestershire","RKE",2
"E10000018","Leicestershire","RTR",1
"E10000018","Leicestershire","RVR",8
"E10000018","Leicestershire","RAX",2
"E10000018","Leicestershire","RJZ",4
"E10000018","Leicestershire","RBT",6
"E10000018","Leicestershire","RA4",4
"E10000018","Leicestershire","RCU",3
"E10000018","Leicestershire","RXM",6
"E10000018","Leicestershire","RBV",2
"E10000018","Leicestershire","RXR",3
"E10000018","Leicestershire","RYG",1
"E10000018","Leicestershire","RR7",2
"E10000018","Leicestershire","RXT",3
"E10000018","Leicestershire","RTK",6
"E10000018","Leicestershire","RP7",4
"E10000018","Leicestershire","RAE",2
"E10000018","Leicestershire","RP4",2
"E10000018","Leicestershire","RRF",2
"E10000018","Leicestershire","RQX",1
"E10000018","Leicestershire","RAS",4
"E10000018","Leicestershire","RJR",1
"E10000018","Leicestershire","RNU",1
"E10000018","Leicestershire","RJ2",1
"E10000018","Leicestershire","RNA",1
"E10000018","Leicestershire","RMC",2
"E10000018","Leicestershire","RPA",2
"E10000018","Leicestershire","REN",1
"E10000019","Lincolnshire","RWD",54560
"E10000019","Lincolnshire","RX1",1546
"E10000019","Lincolnshire","RP7",720
"E10000019","Lincolnshire","RWE",490
"E10000019","Lincolnshire","RGN",9049
"E10000019","Lincolnshire","RCX",2670
"E10000019","Lincolnshire","RTG",216
"E10000019","Lincolnshire","RGT",288
"E10000019","Lincolnshire","RJL",6588
"E10000019","Lincolnshire","RM1",83
"E10000019","Lincolnshire","RP6",33
"E10000019","Lincolnshire","RTH",22
"E10000019","Lincolnshire","RQ8",19
"E10000019","Lincolnshire","RCU",67
"E10000019","Lincolnshire","RD8",15
"E10000019","Lincolnshire","RWA",450
"E10000019","Lincolnshire","RWH",16
"E10000019","Lincolnshire","RRV",23
"E10000019","Lincolnshire","RYJ",23
"E10000019","Lincolnshire","RRK",28
"E10000019","Lincolnshire","R0A",24
"E10000019","Lincolnshire","RGP",30
"E10000019","Lincolnshire","RDU",22
"E10000019","Lincolnshire","RXP",15
"E10000019","Lincolnshire","RGM",64
"E10000019","Lincolnshire","RP5",113
"E10000019","Lincolnshire","RK5",169
"E10000019","Lincolnshire","RVJ",8
"E10000019","Lincolnshire","RWP",7
"E10000019","Lincolnshire","RGR",7
"E10000019","Lincolnshire","RCB",63
"E10000019","Lincolnshire","RKB",16
"E10000019","Lincolnshire","R1H",32
"E10000019","Lincolnshire","RHQ",149
"E10000019","Lincolnshire","RJC",8
"E10000019","Lincolnshire","RP4",3
"E10000019","Lincolnshire","RCD",15
"E10000019","Lincolnshire","RHU",12
"E10000019","Lincolnshire","RHM",10
"E10000019","Lincolnshire","REM",17
"E10000019","Lincolnshire","RTP",13
"E10000019","Lincolnshire","RXW",14
"E10000019","Lincolnshire","R1F",7
"E10000019","Lincolnshire","RA3",4
"E10000019","Lincolnshire","RDD",10
"E10000019","Lincolnshire","RH8",7
"E10000019","Lincolnshire","RTR",17
"E10000019","Lincolnshire","RWG",13
"E10000019","Lincolnshire","RAL",14
"E10000019","Lincolnshire","RCF",4
"E10000019","Lincolnshire","REF",23
"E10000019","Lincolnshire","RFS",16
"E10000019","Lincolnshire","RHW",8
"E10000019","Lincolnshire","RK9",8
"E10000019","Lincolnshire","RN7",2
"E10000019","Lincolnshire","RNS",7
"E10000019","Lincolnshire","RR8",46
"E10000019","Lincolnshire","RY5",46
"E10000019","Lincolnshire","RBZ",6
"E10000019","Lincolnshire","RDZ",5
"E10000019","Lincolnshire","RFF",16
"E10000019","Lincolnshire","RJ7",6
"E10000019","Lincolnshire","RN3",10
"E10000019","Lincolnshire","RYR",4
"E10000019","Lincolnshire","RC1",12
"E10000019","Lincolnshire","RD1",11
"E10000019","Lincolnshire","RQ3",6
"E10000019","Lincolnshire","RWW",8
"E10000019","Lincolnshire","RAX",4
"E10000019","Lincolnshire","RC9",16
"E10000019","Lincolnshire","RJ2",8
"E10000019","Lincolnshire","RQW",13
"E10000019","Lincolnshire","RA2",7
"E10000019","Lincolnshire","RJ1",14
"E10000019","Lincolnshire","RJZ",8
"E10000019","Lincolnshire","RLT",6
"E10000019","Lincolnshire","RPY",2
"E10000019","Lincolnshire","RXF",22
"E10000019","Lincolnshire","RTF",18
"E10000019","Lincolnshire","RVW",10
"E10000019","Lincolnshire","RFR",17
"E10000019","Lincolnshire","RWF",10
"E10000019","Lincolnshire","RXQ",14
"E10000019","Lincolnshire","RBV",6
"E10000019","Lincolnshire","RDE",16
"E10000019","Lincolnshire","RAE",9
"E10000019","Lincolnshire","RA9",10
"E10000019","Lincolnshire","RTX",9
"E10000019","Lincolnshire","RTD",17
"E10000019","Lincolnshire","RJE",13
"E10000019","Lincolnshire","RWY",5
"E10000019","Lincolnshire","RA7",5
"E10000019","Lincolnshire","RAP",5
"E10000019","Lincolnshire","RAS",6
"E10000019","Lincolnshire","RBK",8
"E10000019","Lincolnshire","R0B",6
"E10000019","Lincolnshire","RXY",2
"E10000019","Lincolnshire","RBT",9
"E10000019","Lincolnshire","RHA",7
"E10000019","Lincolnshire","RNL",9
"E10000019","Lincolnshire","RNQ",30
"E10000019","Lincolnshire","RNZ",3
"E10000019","Lincolnshire","RM3",5
"E10000019","Lincolnshire","RPA",3
"E10000019","Lincolnshire","RWJ",6
"E10000019","Lincolnshire","RT5",13
"E10000019","Lincolnshire","RYV",8
"E10000019","Lincolnshire","RAN",2
"E10000019","Lincolnshire","RBQ",1
"E10000019","Lincolnshire","RL4",1
"E10000019","Lincolnshire","RXH",8
"E10000019","Lincolnshire","RJ6",5
"E10000019","Lincolnshire","RTK",5
"E10000019","Lincolnshire","RAJ",6
"E10000019","Lincolnshire","RVV",7
"E10000019","Lincolnshire","RN5",8
"E10000019","Lincolnshire","RNA",5
"E10000019","Lincolnshire","RWK",1
"E10000019","Lincolnshire","RXE",3
"E10000019","Lincolnshire","RXN",2
"E10000019","Lincolnshire","RBL",6
"E10000019","Lincolnshire","RJN",1
"E10000019","Lincolnshire","RTE",13
"E10000019","Lincolnshire","RV9",2
"E10000019","Lincolnshire","RA4",5
"E10000019","Lincolnshire","RXL",10
"E10000019","Lincolnshire","R1K",10
"E10000019","Lincolnshire","RQM",14
"E10000019","Lincolnshire","RVR",4
"E10000019","Lincolnshire","RW6",4
"E10000019","Lincolnshire","RXR",3
"E10000019","Lincolnshire","RJR",6
"E10000019","Lincolnshire","RXK",4
"E10000019","Lincolnshire","RLQ",2
"E10000019","Lincolnshire","RBA",8
"E10000019","Lincolnshire","RMP",4
"E10000019","Lincolnshire","RR7",2
"E10000019","Lincolnshire","RBS",2
"E10000019","Lincolnshire","RF4",6
"E10000019","Lincolnshire","RX4",2
"E10000019","Lincolnshire","RBD",4
"E10000019","Lincolnshire","RRF",4
"E10000019","Lincolnshire","RBN",4
"E10000019","Lincolnshire","RD3",6
"E10000019","Lincolnshire","RXC",5
"E10000019","Lincolnshire","RMY",1
"E10000019","Lincolnshire","RRJ",2
"E10000019","Lincolnshire","RQX",2
"E10000019","Lincolnshire","RT1",1
"E10000019","Lincolnshire","RX3",1
"E10000019","Lincolnshire","RVY",1
"E10000019","Lincolnshire","RXM",1
"E10000020","Norfolk","RM1",54327
"E10000020","Norfolk","RGR",3641
"E10000020","Norfolk","RCX",26178
"E10000020","Norfolk","RGT",1076
"E10000020","Norfolk","RMY",1113
"E10000020","Norfolk","RDE",163
"E10000020","Norfolk","RGP",12675
"E10000020","Norfolk","RGM",81
"E10000020","Norfolk","RQ8",69
"E10000020","Norfolk","RYJ",42
"E10000020","Norfolk","RJZ",20
"E10000020","Norfolk","RWD",45
"E10000020","Norfolk","RVV",15
"E10000020","Norfolk","RQW",20
"E10000020","Norfolk","RGN",116
"E10000020","Norfolk","RY3",82
"E10000020","Norfolk","RF4",16
"E10000020","Norfolk","RX1",30
"E10000020","Norfolk","RJE",6
"E10000020","Norfolk","RP6",8
"E10000020","Norfolk","RWP",8
"E10000020","Norfolk","R1H",69
"E10000020","Norfolk","RAL",20
"E10000020","Norfolk","RC9",18
"E10000020","Norfolk","RDU",20
"E10000020","Norfolk","R1F",8
"E10000020","Norfolk","RDZ",5
"E10000020","Norfolk","R1K",20
"E10000020","Norfolk","RCB",20
"E10000020","Norfolk","RJ1",31
"E10000020","Norfolk","RR8",10
"E10000020","Norfolk","RTH",33
"E10000020","Norfolk","RT3",6
"E10000020","Norfolk","RJL",8
"E10000020","Norfolk","RBZ",13
"E10000020","Norfolk","REF",18
"E10000020","Norfolk","RTE",11
"E10000020","Norfolk","RTF",8
"E10000020","Norfolk","RWG",11
"E10000020","Norfolk","RHM",13
"E10000020","Norfolk","RWA",8
"E10000020","Norfolk","RDD",19
"E10000020","Norfolk","R0A",13
"E10000020","Norfolk","RD8",16
"E10000020","Norfolk","RNQ",10
"E10000020","Norfolk","RHQ",14
"E10000020","Norfolk","RKB",13
"E10000020","Norfolk","RA2",9
"E10000020","Norfolk","RBA",6
"E10000020","Norfolk","RC1",18
"E10000020","Norfolk","RTX",14
"E10000020","Norfolk","RWH",22
"E10000020","Norfolk","RAJ",9
"E10000020","Norfolk","RLQ",7
"E10000020","Norfolk","RXF",6
"E10000020","Norfolk","RXQ",19
"E10000020","Norfolk","RBT",5
"E10000020","Norfolk","RL4",3
"E10000020","Norfolk","RT1",2
"E10000020","Norfolk","RVR",5
"E10000020","Norfolk","RXT",1
"E10000020","Norfolk","RBK",2
"E10000020","Norfolk","RJ2",9
"E10000020","Norfolk","RLT",2
"E10000020","Norfolk","RPA",11
"E10000020","Norfolk","RBD",6
"E10000020","Norfolk","RCD",4
"E10000020","Norfolk","RHW",8
"E10000020","Norfolk","RN3",8
"E10000020","Norfolk","RP4",11
"E10000020","Norfolk","RTR",8
"E10000020","Norfolk","RWF",14
"E10000020","Norfolk","RHU",6
"E10000020","Norfolk","RNS",11
"E10000020","Norfolk","RR7",3
"E10000020","Norfolk","RRV",33
"E10000020","Norfolk","RVY",1
"E10000020","Norfolk","RH8",4
"E10000020","Norfolk","RQX",15
"E10000020","Norfolk","RRK",21
"E10000020","Norfolk","RXC",7
"E10000020","Norfolk","RXL",3
"E10000020","Norfolk","RYR",8
"E10000020","Norfolk","RAS",6
"E10000020","Norfolk","RCU",1
"E10000020","Norfolk","RFS",6
"E10000020","Norfolk","RJ7",8
"E10000020","Norfolk","RJC",2
"E10000020","Norfolk","RK5",5
"E10000020","Norfolk","RN5",9
"E10000020","Norfolk","RNZ",4
"E10000020","Norfolk","REM",7
"E10000020","Norfolk","RRF",3
"E10000020","Norfolk","RTK",5
"E10000020","Norfolk","RVJ",9
"E10000020","Norfolk","RWE",17
"E10000020","Norfolk","RAP",5
"E10000020","Norfolk","RP5",4
"E10000020","Norfolk","RTP",8
"E10000020","Norfolk","RXH",14
"E10000020","Norfolk","RQM",26
"E10000020","Norfolk","RNL",8
"E10000020","Norfolk","RN7",7
"E10000020","Norfolk","RK9",7
"E10000020","Norfolk","RA9",5
"E10000020","Norfolk","RTG",15
"E10000020","Norfolk","RA3",2
"E10000020","Norfolk","RXP",7
"E10000020","Norfolk","RXW",12
"E10000020","Norfolk","RAE",2
"E10000020","Norfolk","RTD",4
"E10000020","Norfolk","RAX",7
"E10000020","Norfolk","RET",1
"E10000020","Norfolk","RNA",4
"E10000020","Norfolk","RA7",4
"E10000020","Norfolk","RPY",7
"E10000020","Norfolk","RAN",4
"E10000020","Norfolk","RD3",3
"E10000020","Norfolk","RX3",1
"E10000020","Norfolk","NAX",24
"E10000020","Norfolk","RD1",5
"E10000020","Norfolk","RXN",4
"E10000020","Norfolk","R1L",4
"E10000020","Norfolk","R0B",5
"E10000020","Norfolk","RBS",2
"E10000020","Norfolk","RJ6",3
"E10000020","Norfolk","RBL",3
"E10000020","Norfolk","RMC",3
"E10000020","Norfolk","RW6",3
"E10000020","Norfolk","RFF",3
"E10000020","Norfolk","RJR",3
"E10000020","Norfolk","RCF",5
"E10000020","Norfolk","RWR",2
"E10000020","Norfolk","RFR",1
"E10000020","Norfolk","RWK",2
"E10000020","Norfolk","RBN",1
"E10000020","Norfolk","RWW",2
"E10000020","Norfolk","RQ3",1
"E10000020","Norfolk","RYV",1
"E10000020","Norfolk","RM3",1
"E10000020","Norfolk","RWY",1
"E10000020","Norfolk","RXY",1
"E10000020","Norfolk","RBQ",1
"E10000020","Norfolk","RT5",4
"E10000020","Norfolk","RJN",1
"E10000020","Norfolk","RXE",1
"E10000020","Norfolk","RXR",2
"E10000020","Norfolk","RXX",1
"E10000020","Norfolk","RVW",2
"E10000020","Norfolk","RV9",1
"E10000020","Norfolk","RWJ",3
"E10000020","Norfolk","RXK",3
"E10000021","Northamptonshire","RNQ",33459
"E10000021","Northamptonshire","RNS",46672
"E10000021","Northamptonshire","RWE",1121
"E10000021","Northamptonshire","RP1",772
"E10000021","Northamptonshire","RKB",1172
"E10000021","Northamptonshire","RGN",1126
"E10000021","Northamptonshire","RTH",3939
"E10000021","Northamptonshire","RX1",92
"E10000021","Northamptonshire","RGT",104
"E10000021","Northamptonshire","RD8",1386
"E10000021","Northamptonshire","RWD",55
"E10000021","Northamptonshire","RCX",33
"E10000021","Northamptonshire","RT5",33
"E10000021","Northamptonshire","RQ3",43
"E10000021","Northamptonshire","RC9",82
"E10000021","Northamptonshire","RGP",31
"E10000021","Northamptonshire","REF",30
"E10000021","Northamptonshire","RJZ",15
"E10000021","Northamptonshire","RGM",16
"E10000021","Northamptonshire","RAL",34
"E10000021","Northamptonshire","RCB",25
"E10000021","Northamptonshire","RDE",14
"E10000021","Northamptonshire","RJ7",16
"E10000021","Northamptonshire","RBA",10
"E10000021","Northamptonshire","RRK",73
"E10000021","Northamptonshire","RD3",17
"E10000021","Northamptonshire","RDZ",24
"E10000021","Northamptonshire","RTG",16
"E10000021","Northamptonshire","R1K",15
"E10000021","Northamptonshire","RK9",18
"E10000021","Northamptonshire","RC1",188
"E10000021","Northamptonshire","RTE",13
"E10000021","Northamptonshire","RA7",6
"E10000021","Northamptonshire","RW5",3
"E10000021","Northamptonshire","RWG",27
"E10000021","Northamptonshire","RAP",9
"E10000021","Northamptonshire","RCD",9
"E10000021","Northamptonshire","RCU",7
"E10000021","Northamptonshire","RD1",11
"E10000021","Northamptonshire","RJ1",26
"E10000021","Northamptonshire","RP5",7
"E10000021","Northamptonshire","REM",10
"E10000021","Northamptonshire","RVN",1
"E10000021","Northamptonshire","RWA",8
"E10000021","Northamptonshire","RXQ",100
"E10000021","Northamptonshire","RYJ",16
"E10000021","Northamptonshire","RDU",20
"E10000021","Northamptonshire","RWY",5
"E10000021","Northamptonshire","RBD",13
"E10000021","Northamptonshire","RM1",28
"E10000021","Northamptonshire","RAX",6
"E10000021","Northamptonshire","RBN",2
"E10000021","Northamptonshire","RXC",8
"E10000021","Northamptonshire","RJ6",2
"E10000021","Northamptonshire","RWH",26
"E10000021","Northamptonshire","R1L",3
"E10000021","Northamptonshire","RJ2",6
"E10000021","Northamptonshire","RJL",6
"E10000021","Northamptonshire","RK5",9
"E10000021","Northamptonshire","RNA",7
"E10000021","Northamptonshire","RRV",29
"E10000021","Northamptonshire","RWF",6
"E10000021","Northamptonshire","RAN",4
"E10000021","Northamptonshire","RN5",11
"E10000021","Northamptonshire","RTX",12
"E10000021","Northamptonshire","RVV",11
"E10000021","Northamptonshire","RFR",1
"E10000021","Northamptonshire","RHQ",6
"E10000021","Northamptonshire","RTK",12
"E10000021","Northamptonshire","RTR",5
"E10000021","Northamptonshire","RWK",11
"E10000021","Northamptonshire","RJC",43
"E10000021","Northamptonshire","RYG",7
"E10000021","Northamptonshire","RT3",24
"E10000021","Northamptonshire","R0A",16
"E10000021","Northamptonshire","RNU",19
"E10000021","Northamptonshire","RV3",23
"E10000021","Northamptonshire","RWP",16
"E10000021","Northamptonshire","RA9",19
"E10000021","Northamptonshire","RN7",7
"E10000021","Northamptonshire","TAJ",4
"E10000021","Northamptonshire","RJE",13
"E10000021","Northamptonshire","RXK",19
"E10000021","Northamptonshire","RAS",8
"E10000021","Northamptonshire","RBK",6
"E10000021","Northamptonshire","RLT",9
"E10000021","Northamptonshire","RQX",10
"E10000021","Northamptonshire","RL4",8
"E10000021","Northamptonshire","RTF",7
"E10000021","Northamptonshire","RXH",13
"E10000021","Northamptonshire","RXP",6
"E10000021","Northamptonshire","RQW",9
"E10000021","Northamptonshire","RYR",12
"E10000021","Northamptonshire","RHW",9
"E10000021","Northamptonshire","RTD",2
"E10000021","Northamptonshire","R1H",34
"E10000021","Northamptonshire","RP4",4
"E10000021","Northamptonshire","RHU",4
"E10000021","Northamptonshire","RXL",8
"E10000021","Northamptonshire","RXN",5
"E10000021","Northamptonshire","RXW",7
"E10000021","Northamptonshire","RA4",3
"E10000021","Northamptonshire","RCF",5
"E10000021","Northamptonshire","RHM",16
"E10000021","Northamptonshire","RGR",11
"E10000021","Northamptonshire","RJN",1
"E10000021","Northamptonshire","RMP",1
"E10000021","Northamptonshire","RNZ",6
"E10000021","Northamptonshire","RPY",3
"E10000021","Northamptonshire","RTP",8
"E10000021","Northamptonshire","RH8",8
"E10000021","Northamptonshire","RMC",3
"E10000021","Northamptonshire","RPA",3
"E10000021","Northamptonshire","RR8",7
"E10000021","Northamptonshire","RVJ",7
"E10000021","Northamptonshire","RW4",1
"E10000021","Northamptonshire","RYV",24
"E10000021","Northamptonshire","RPC",6
"E10000021","Northamptonshire","R1F",9
"E10000021","Northamptonshire","RQM",23
"E10000021","Northamptonshire","RBZ",8
"E10000021","Northamptonshire","RVR",11
"E10000021","Northamptonshire","RDD",6
"E10000021","Northamptonshire","RQ8",9
"E10000021","Northamptonshire","RBT",7
"E10000021","Northamptonshire","RBQ",1
"E10000021","Northamptonshire","RN3",4
"E10000021","Northamptonshire","RNL",2
"E10000021","Northamptonshire","RW6",4
"E10000021","Northamptonshire","RXF",6
"E10000021","Northamptonshire","RXY",2
"E10000021","Northamptonshire","RAJ",6
"E10000021","Northamptonshire","RT1",1
"E10000021","Northamptonshire","RLY",1
"E10000021","Northamptonshire","RP7",2
"E10000021","Northamptonshire","RXE",3
"E10000021","Northamptonshire","RWW",3
"E10000021","Northamptonshire","RA2",5
"E10000021","Northamptonshire","R0B",6
"E10000021","Northamptonshire","RWJ",4
"E10000021","Northamptonshire","RXR",2
"E10000021","Northamptonshire","RAE",4
"E10000021","Northamptonshire","RJR",3
"E10000021","Northamptonshire","RWX",6
"E10000021","Northamptonshire","RFS",4
"E10000021","Northamptonshire","RLQ",5
"E10000021","Northamptonshire","RP6",6
"E10000021","Northamptonshire","RF4",3
"E10000021","Northamptonshire","RBL",3
"E10000021","Northamptonshire","RVY",2
"E10000021","Northamptonshire","RRE",1
"E10000021","Northamptonshire","RVW",1
"E10000021","Northamptonshire","RM3",1
"E10000021","Northamptonshire","RMY",2
"E10000021","Northamptonshire","RKE",1
"E10000021","Northamptonshire","RR7",2
"E10000021","Northamptonshire","RTQ",1
"E10000021","Northamptonshire","RHA",3
"E10000021","Northamptonshire","RA3",2
"E10000021","Northamptonshire","RXM",1
"E10000021","Northamptonshire","RRF",1
"E10000023","North Yorkshire","RCF",5187
"E10000023","North Yorkshire","RTX",653
"E10000023","North Yorkshire","RAE",436
"E10000023","North Yorkshire","RR8",1717
"E10000023","North Yorkshire","TAD",37
"E10000023","North Yorkshire","RCD",16016
"E10000023","North Yorkshire","RXN",32
"E10000023","North Yorkshire","RXR",25
"E10000023","North Yorkshire","RTD",178
"E10000023","North Yorkshire","RWY",27
"E10000023","North Yorkshire","RXL",23
"E10000023","North Yorkshire","RNL",25
"E10000023","North Yorkshire","RXF",1017
"E10000023","North Yorkshire","RTR",11715
"E10000023","North Yorkshire","R0A",33
"E10000023","North Yorkshire","RRK",23
"E10000023","North Yorkshire","RCB",28217
"E10000023","North Yorkshire","REM",24
"E10000023","North Yorkshire","RBD",5
"E10000023","North Yorkshire","RJE",7
"E10000023","North Yorkshire","RJ1",13
"E10000023","North Yorkshire","RK9",7
"E10000023","North Yorkshire","RHQ",48
"E10000023","North Yorkshire","RBV",6
"E10000023","North Yorkshire","RJC",6
"E10000023","North Yorkshire","RTF",38
"E10000023","North Yorkshire","RVY",7
"E10000023","North Yorkshire","RCU",13
"E10000023","North Yorkshire","RDU",17
"E10000023","North Yorkshire","RP5",145
"E10000023","North Yorkshire","RX3",644
"E10000023","North Yorkshire","RBS",2
"E10000023","North Yorkshire","RTG",18
"E10000023","North Yorkshire","RAX",2
"E10000023","North Yorkshire","RFR",5
"E10000023","North Yorkshire","RJR",6
"E10000023","North Yorkshire","RQ8",4
"E10000023","North Yorkshire","RRV",9
"E10000023","North Yorkshire","RJL",62
"E10000023","North Yorkshire","RXW",9
"E10000023","North Yorkshire","RAL",7
"E10000023","North Yorkshire","RC9",6
"E10000023","North Yorkshire","RFS",9
"E10000023","North Yorkshire","RWH",7
"E10000023","North Yorkshire","RD3",6
"E10000023","North Yorkshire","REF",23
"E10000023","North Yorkshire","RGP",3
"E10000023","North Yorkshire","RM3",10
"E10000023","North Yorkshire","RNN",1
"E10000023","North Yorkshire","RWA",780
"E10000023","North Yorkshire","RXQ",7
"E10000023","North Yorkshire","RYJ",14
"E10000023","North Yorkshire","RX1",11
"E10000023","North Yorkshire","RA9",10
"E10000023","North Yorkshire","RJZ",5
"E10000023","North Yorkshire","RDZ",3
"E10000023","North Yorkshire","RN5",3
"E10000023","North Yorkshire","RXP",2017
"E10000023","North Yorkshire","RVW",91
"E10000023","North Yorkshire","RW6",10
"E10000023","North Yorkshire","RTH",17
"E10000023","North Yorkshire","RK5",13
"E10000023","North Yorkshire","RGT",11
"E10000023","North Yorkshire","RTP",4
"E10000023","North Yorkshire","RWD",23
"E10000023","North Yorkshire","RWJ",6
"E10000023","North Yorkshire","R0B",20
"E10000023","North Yorkshire","RWF",11
"E10000023","North Yorkshire","RBT",5
"E10000023","North Yorkshire","RHW",2
"E10000023","North Yorkshire","RNS",2
"E10000023","North Yorkshire","RNZ",13
"E10000023","North Yorkshire","RA7",4
"E10000023","North Yorkshire","RHU",3
"E10000023","North Yorkshire","RN7",1
"E10000023","North Yorkshire","RQ3",1
"E10000023","North Yorkshire","RV9",261
"E10000023","North Yorkshire","RD1",7
"E10000023","North Yorkshire","RWP",1
"E10000023","North Yorkshire","R1K",8
"E10000023","North Yorkshire","RAS",5
"E10000023","North Yorkshire","RCX",5
"E10000023","North Yorkshire","RDD",1
"E10000023","North Yorkshire","RFF",20
"E10000023","North Yorkshire","RGN",6
"E10000023","North Yorkshire","RGR",5
"E10000023","North Yorkshire","RHM",8
"E10000023","North Yorkshire","RKB",8
"E10000023","North Yorkshire","RQM",7
"E10000023","North Yorkshire","RVJ",4
"E10000023","North Yorkshire","RXH",7
"E10000023","North Yorkshire","RA2",10
"E10000023","North Yorkshire","RBL",5
"E10000023","North Yorkshire","RBZ",2
"E10000023","North Yorkshire","RGD",6
"E10000023","North Yorkshire","RJ2",4
"E10000023","North Yorkshire","RJ6",4
"E10000023","North Yorkshire","RXK",5
"E10000023","North Yorkshire","R1H",9
"E10000023","North Yorkshire","RDE",9
"E10000023","North Yorkshire","RH8",7
"E10000023","North Yorkshire","RMP",3
"E10000023","North Yorkshire","RBA",3
"E10000023","North Yorkshire","RJ7",7
"E10000023","North Yorkshire","RVV",4
"E10000023","North Yorkshire","RA4",2
"E10000023","North Yorkshire","RQX",3
"E10000023","North Yorkshire","RTV",2
"E10000023","North Yorkshire","RKE",2
"E10000023","North Yorkshire","RN3",2
"E10000023","North Yorkshire","RBN",5
"E10000023","North Yorkshire","RMC",3
"E10000023","North Yorkshire","RBQ",1
"E10000023","North Yorkshire","RC1",1
"E10000023","North Yorkshire","RWG",1
"E10000023","North Yorkshire","RX4",2
"E10000023","North Yorkshire","RXC",2
"E10000023","North Yorkshire","RPA",3
"E10000023","North Yorkshire","RWW",2
"E10000023","North Yorkshire","RL4",1
"E10000023","North Yorkshire","RD8",6
"E10000023","North Yorkshire","REP",1
"E10000023","North Yorkshire","RWE",5
"E10000023","North Yorkshire","RXE",2
"E10000023","North Yorkshire","RTE",4
"E10000023","North Yorkshire","RP7",2
"E10000023","North Yorkshire","RR7",1
"E10000023","North Yorkshire","RRF",4
"E10000023","North Yorkshire","RM1",6
"E10000023","North Yorkshire","RLQ",4
"E10000023","North Yorkshire","RNQ",3
"E10000023","North Yorkshire","RA3",1
"E10000023","North Yorkshire","RP6",2
"E10000023","North Yorkshire","RBK",1
"E10000023","North Yorkshire","RNA",2
"E10000023","North Yorkshire","R1F",3
"E10000023","North Yorkshire","RTK",1
"E10000023","North Yorkshire","RV5",1
"E10000023","North Yorkshire","RGM",4
"E10000023","North Yorkshire","RXG",4
"E10000023","North Yorkshire","RYR",3
"E10000024","Nottinghamshire","RK5",33362
"E10000024","Nottinghamshire","RX1",38883
"E10000024","Nottinghamshire","RTG",501
"E10000024","Nottinghamshire","RHA",553
"E10000024","Nottinghamshire","RFS",212
"E10000024","Nottinghamshire","RWD",1127
"E10000024","Nottinghamshire","RWE",203
"E10000024","Nottinghamshire","RCU",164
"E10000024","Nottinghamshire","RHQ",735
"E10000024","Nottinghamshire","R0A",33
"E10000024","Nottinghamshire","RP5",13266
"E10000024","Nottinghamshire","RRK",48
"E10000024","Nottinghamshire","RCB",65
"E10000024","Nottinghamshire","RQ3",12
"E10000024","Nottinghamshire","RGT",44
"E10000024","Nottinghamshire","RJC",12
"E10000024","Nottinghamshire","RQX",7
"E10000024","Nottinghamshire","RFR",84
"E10000024","Nottinghamshire","RM3",6
"E10000024","Nottinghamshire","REF",40
"E10000024","Nottinghamshire","RWG",11
"E10000024","Nottinghamshire","RCX",24
"E10000024","Nottinghamshire","RRF",5
"E10000024","Nottinghamshire","RH8",17
"E10000024","Nottinghamshire","RTD",26
"E10000024","Nottinghamshire","RGP",28
"E10000024","Nottinghamshire","R1H",13
"E10000024","Nottinghamshire","RBD",6
"E10000024","Nottinghamshire","RTH",20
"E10000024","Nottinghamshire","RXF",14
"E10000024","Nottinghamshire","RCD",12
"E10000024","Nottinghamshire","RM1",31
"E10000024","Nottinghamshire","RAS",10
"E10000024","Nottinghamshire","RDU",14
"E10000024","Nottinghamshire","RTE",8
"E10000024","Nottinghamshire","R1F",12
"E10000024","Nottinghamshire","REM",10
"E10000024","Nottinghamshire","RHM",7
"E10000024","Nottinghamshire","RJL",54
"E10000024","Nottinghamshire","RKB",28
"E10000024","Nottinghamshire","RTX",6
"E10000024","Nottinghamshire","RVR",4
"E10000024","Nottinghamshire","RJE",15
"E10000024","Nottinghamshire","RBT",13
"E10000024","Nottinghamshire","RA2",4
"E10000024","Nottinghamshire","RC9",11
"E10000024","Nottinghamshire","RK9",14
"E10000024","Nottinghamshire","RXC",5
"E10000024","Nottinghamshire","RJR",10
"E10000024","Nottinghamshire","RR8",38
"E10000024","Nottinghamshire","RJ6",5
"E10000024","Nottinghamshire","RPC",1
"E10000024","Nottinghamshire","RVV",7
"E10000024","Nottinghamshire","RXK",20
"E10000024","Nottinghamshire","RD1",18
"E10000024","Nottinghamshire","RGM",4
"E10000024","Nottinghamshire","RL4",5
"E10000024","Nottinghamshire","RP1",1
"E10000024","Nottinghamshire","RVY",2
"E10000024","Nottinghamshire","RAJ",1
"E10000024","Nottinghamshire","RBK",2
"E10000024","Nottinghamshire","RDZ",9
"E10000024","Nottinghamshire","RGN",31
"E10000024","Nottinghamshire","RNZ",4
"E10000024","Nottinghamshire","RTF",16
"E10000024","Nottinghamshire","RY8",12
"E10000024","Nottinghamshire","R0B",7
"E10000024","Nottinghamshire","RT5",10
"E10000024","Nottinghamshire","RVW",5
"E10000024","Nottinghamshire","RWA",23
"E10000024","Nottinghamshire","RXL",11
"E10000024","Nottinghamshire","RYR",6
"E10000024","Nottinghamshire","RBL",2
"E10000024","Nottinghamshire","RQW",3
"E10000024","Nottinghamshire","RW6",2
"E10000024","Nottinghamshire","RWJ",6
"E10000024","Nottinghamshire","RXP",10
"E10000024","Nottinghamshire","RA9",17
"E10000024","Nottinghamshire","RAE",6
"E10000024","Nottinghamshire","RAX",5
"E10000024","Nottinghamshire","RD8",5
"E10000024","Nottinghamshire","RMP",1
"E10000024","Nottinghamshire","RRV",17
"E10000024","Nottinghamshire","RWP",9
"E10000024","Nottinghamshire","RXM",12
"E10000024","Nottinghamshire","RXE",13
"E10000024","Nottinghamshire","RFF",18
"E10000024","Nottinghamshire","RN7",9
"E10000024","Nottinghamshire","RTR",19
"E10000024","Nottinghamshire","RXR",5
"E10000024","Nottinghamshire","RBZ",8
"E10000024","Nottinghamshire","RHU",14
"E10000024","Nottinghamshire","RJ1",9
"E10000024","Nottinghamshire","RXH",8
"E10000024","Nottinghamshire","RA4",5
"E10000024","Nottinghamshire","RDE",14
"E10000024","Nottinghamshire","RXQ",9
"E10000024","Nottinghamshire","RJ7",10
"E10000024","Nottinghamshire","RNS",15
"E10000024","Nottinghamshire","RVJ",6
"E10000024","Nottinghamshire","RBA",16
"E10000024","Nottinghamshire","RTK",3
"E10000024","Nottinghamshire","RXW",10
"E10000024","Nottinghamshire","RA3",5
"E10000024","Nottinghamshire","RN5",16
"E10000024","Nottinghamshire","RWW",5
"E10000024","Nottinghamshire","RWY",5
"E10000024","Nottinghamshire","R1K",9
"E10000024","Nottinghamshire","RWH",8
"E10000024","Nottinghamshire","RNA",3
"E10000024","Nottinghamshire","RNQ",8
"E10000024","Nottinghamshire","RXN",8
"E10000024","Nottinghamshire","RMC",1
"E10000024","Nottinghamshire","RAL",9
"E10000024","Nottinghamshire","RLQ",3
"E10000024","Nottinghamshire","RQM",11
"E10000024","Nottinghamshire","RD3",6
"E10000024","Nottinghamshire","RGR",5
"E10000024","Nottinghamshire","RQ8",7
"E10000024","Nottinghamshire","RYJ",9
"E10000024","Nottinghamshire","RLT",5
"E10000024","Nottinghamshire","RTP",4
"E10000024","Nottinghamshire","RA7",10
"E10000024","Nottinghamshire","RWF",3
"E10000024","Nottinghamshire","RNL",9
"E10000024","Nottinghamshire","RN3",2
"E10000024","Nottinghamshire","RW5",1
"E10000024","Nottinghamshire","RBS",1
"E10000024","Nottinghamshire","RBN",1
"E10000024","Nottinghamshire","RF4",5
"E10000024","Nottinghamshire","RHW",4
"E10000024","Nottinghamshire","RR7",2
"E10000024","Nottinghamshire","RP7",2
"E10000024","Nottinghamshire","RAP",3
"E10000024","Nottinghamshire","RPA",4
"E10000024","Nottinghamshire","RVN",1
"E10000024","Nottinghamshire","RC1",4
"E10000024","Nottinghamshire","RX3",1
"E10000024","Nottinghamshire","RJZ",3
"E10000024","Nottinghamshire","RV9",2
"E10000024","Nottinghamshire","RT3",4
"E10000024","Nottinghamshire","RDD",3
"E10000024","Nottinghamshire","RP6",3
"E10000024","Nottinghamshire","RCF",2
"E10000024","Nottinghamshire","RET",2
"E10000024","Nottinghamshire","RT1",1
"E10000024","Nottinghamshire","RP4",1
"E10000024","Nottinghamshire","RAT",1
"E10000024","Nottinghamshire","RBQ",1
"E10000024","Nottinghamshire","RPY",1
"E10000024","Nottinghamshire","REN",1
"E10000024","Nottinghamshire","RJ2",1
"E10000025","Oxfordshire","RTH",63239
"E10000025","Oxfordshire","RNU",890
"E10000025","Oxfordshire","RJC",66
"E10000025","Oxfordshire","RD8",53
"E10000025","Oxfordshire","RXQ",1290
"E10000025","Oxfordshire","RKB",43
"E10000025","Oxfordshire","RDU",86
"E10000025","Oxfordshire","RHM",45
"E10000025","Oxfordshire","REF",38
"E10000025","Oxfordshire","RJ1",46
"E10000025","Oxfordshire","RRK",43
"E10000025","Oxfordshire","RRV",44
"E10000025","Oxfordshire","RN5",39
"E10000025","Oxfordshire","RYJ",53
"E10000025","Oxfordshire","RAL",22
"E10000025","Oxfordshire","RAX",19
"E10000025","Oxfordshire","RBZ",20
"E10000025","Oxfordshire","RDZ",27
"E10000025","Oxfordshire","RVJ",38
"E10000025","Oxfordshire","RCB",15
"E10000025","Oxfordshire","RD3",22
"E10000025","Oxfordshire","RNS",21
"E10000025","Oxfordshire","RQM",56
"E10000025","Oxfordshire","R1H",42
"E10000025","Oxfordshire","RTE",66
"E10000025","Oxfordshire","RT3",24
"E10000025","Oxfordshire","RWE",17
"E10000025","Oxfordshire","RHW",2782
"E10000025","Oxfordshire","RWD",11
"E10000025","Oxfordshire","R1K",21
"E10000025","Oxfordshire","RYR",15
"E10000025","Oxfordshire","RH8",26
"E10000025","Oxfordshire","RK9",27
"E10000025","Oxfordshire","RBA",17
"E10000025","Oxfordshire","RN3",1349
"E10000025","Oxfordshire","RA9",24
"E10000025","Oxfordshire","RD1",29
"E10000025","Oxfordshire","RA2",19
"E10000025","Oxfordshire","RA3",13
"E10000025","Oxfordshire","RGT",22
"E10000025","Oxfordshire","RJE",13
"E10000025","Oxfordshire","RJZ",16
"E10000025","Oxfordshire","RA7",29
"E10000025","Oxfordshire","RP4",4
"E10000025","Oxfordshire","RHU",19
"E10000025","Oxfordshire","RXH",16
"E10000025","Oxfordshire","RDE",21
"E10000025","Oxfordshire","RNL",13
"E10000025","Oxfordshire","RWP",13
"E10000025","Oxfordshire","RXK",9
"E10000025","Oxfordshire","R1F",5
"E10000025","Oxfordshire","RA4",10
"E10000025","Oxfordshire","RAS",14
"E10000025","Oxfordshire","RGN",8
"E10000025","Oxfordshire","RVR",8
"E10000025","Oxfordshire","RBD",27
"E10000025","Oxfordshire","RVW",4
"E10000025","Oxfordshire","RJL",3
"E10000025","Oxfordshire","RNQ",9
"E10000025","Oxfordshire","RR8",11
"E10000025","Oxfordshire","RTG",6
"E10000025","Oxfordshire","RM1",9
"E10000025","Oxfordshire","RWH",9
"E10000025","Oxfordshire","RX1",9
"E10000025","Oxfordshire","RNZ",13
"E10000025","Oxfordshire","RQ3",2
"E10000025","Oxfordshire","RAE",6
"E10000025","Oxfordshire","RP1",2
"E10000025","Oxfordshire","RFR",1
"E10000025","Oxfordshire","RJ2",12
"E10000025","Oxfordshire","RJ7",25
"E10000025","Oxfordshire","RW6",4
"E10000025","Oxfordshire","RXW",10
"E10000025","Oxfordshire","RBK",3
"E10000025","Oxfordshire","RTK",4
"E10000025","Oxfordshire","RXC",9
"E10000025","Oxfordshire","RXN",1
"E10000025","Oxfordshire","RHQ",7
"E10000025","Oxfordshire","RJN",1
"E10000025","Oxfordshire","RN7",7
"E10000025","Oxfordshire","RWF",9
"E10000025","Oxfordshire","RCX",9
"E10000025","Oxfordshire","RKE",4
"E10000025","Oxfordshire","RP6",3
"E10000025","Oxfordshire","RQW",1
"E10000025","Oxfordshire","RTP",9
"E10000025","Oxfordshire","RTX",10
"E10000025","Oxfordshire","RXL",5
"E10000025","Oxfordshire","RAP",5
"E10000025","Oxfordshire","RW1",2
"E10000025","Oxfordshire","RYV",1
"E10000025","Oxfordshire","RET",1
"E10000025","Oxfordshire","RRF",5
"E10000025","Oxfordshire","RVV",14
"E10000025","Oxfordshire","RWY",2
"E10000025","Oxfordshire","RBS",2
"E10000025","Oxfordshire","RCD",5
"E10000025","Oxfordshire","RFS",4
"E10000025","Oxfordshire","RGP",6
"E10000025","Oxfordshire","RGR",7
"E10000025","Oxfordshire","RLT",3
"E10000025","Oxfordshire","RNA",7
"E10000025","Oxfordshire","RRE",1
"E10000025","Oxfordshire","RVN",4
"E10000025","Oxfordshire","RWA",4
"E10000025","Oxfordshire","RWJ",4
"E10000025","Oxfordshire","RXP",4
"E10000025","Oxfordshire","RXR",2
"E10000025","Oxfordshire","RLQ",12
"E10000025","Oxfordshire","RQX",6
"E10000025","Oxfordshire","R0A",19
"E10000025","Oxfordshire","RC1",6
"E10000025","Oxfordshire","RF4",3
"E10000025","Oxfordshire","RTF",7
"E10000025","Oxfordshire","RWG",11
"E10000025","Oxfordshire","RQ8",8
"E10000025","Oxfordshire","RBT",4
"E10000025","Oxfordshire","RFF",2
"E10000025","Oxfordshire","RWW",5
"E10000025","Oxfordshire","RJR",2
"E10000025","Oxfordshire","RPA",4
"E10000025","Oxfordshire","REM",5
"E10000025","Oxfordshire","RBL",6
"E10000025","Oxfordshire","RDD",3
"E10000025","Oxfordshire","RMY",1
"E10000025","Oxfordshire","RTR",3
"E10000025","Oxfordshire","RAJ",2
"E10000025","Oxfordshire","RJ6",2
"E10000025","Oxfordshire","RWX",3
"E10000025","Oxfordshire","RXF",1
"E10000025","Oxfordshire","RVY",1
"E10000025","Oxfordshire","RWK",1
"E10000025","Oxfordshire","RPY",12
"E10000025","Oxfordshire","RC9",2
"E10000025","Oxfordshire","RP5",4
"E10000025","Oxfordshire","RMC",1
"E10000025","Oxfordshire","RTD",3
"E10000025","Oxfordshire","RCF",1
"E10000025","Oxfordshire","RH5",2
"E10000025","Oxfordshire","RM3",3
"E10000025","Oxfordshire","RGM",2
"E10000025","Oxfordshire","RT5",1
"E10000025","Oxfordshire","RL4",2
"E10000025","Oxfordshire","R0B",1
"E10000025","Oxfordshire","RTQ",4
"E10000025","Oxfordshire","R1J",2
"E10000025","Oxfordshire","RK5",1
"E10000025","Oxfordshire","RXT",1
"E10000027","Somerset","RD1",6650
"E10000027","Somerset","RA4",19029
"E10000027","Somerset","RBA",38951
"E10000027","Somerset","RH5",1183
"E10000027","Somerset","RVJ",922
"E10000027","Somerset","RA7",915
"E10000027","Somerset","RA3",2923
"E10000027","Somerset","RBD",357
"E10000027","Somerset","RNZ",74
"E10000027","Somerset","RH8",357
"E10000027","Somerset","REF",75
"E10000027","Somerset","NTP",18
"E10000027","Somerset","RA9",68
"E10000027","Somerset","RHM",52
"E10000027","Somerset","RN5",14
"E10000027","Somerset","RK9",61
"E10000027","Somerset","RTE",29
"E10000027","Somerset","RD3",39
"E10000027","Somerset","RTH",32
"E10000027","Somerset","R1H",21
"E10000027","Somerset","RQM",20
"E10000027","Somerset","RJ1",19
"E10000027","Somerset","RLQ",14
"E10000027","Somerset","RAX",10
"E10000027","Somerset","RVN",7
"E10000027","Somerset","RN3",15
"E10000027","Somerset","RDZ",24
"E10000027","Somerset","RDU",19
"E10000027","Somerset","RJ7",13
"E10000027","Somerset","RBZ",70
"E10000027","Somerset","RRK",32
"E10000027","Somerset","RX1",6
"E10000027","Somerset","R1K",12
"E10000027","Somerset","RYJ",19
"E10000027","Somerset","RKE",3
"E10000027","Somerset","RXH",12
"E10000027","Somerset","RYR",9
"E10000027","Somerset","RAT",2
"E10000027","Somerset","RT3",13
"E10000027","Somerset","RVV",13
"E10000027","Somerset","RW6",3
"E10000027","Somerset","R0A",5
"E10000027","Somerset","RWG",8
"E10000027","Somerset","RQX",2
"E10000027","Somerset","RDY",12
"E10000027","Somerset","RGR",3
"E10000027","Somerset","RGT",5
"E10000027","Somerset","RJZ",8
"E10000027","Somerset","RWE",6
"E10000027","Somerset","RAS",6
"E10000027","Somerset","RHU",10
"E10000027","Somerset","RCB",6
"E10000027","Somerset","RAL",12
"E10000027","Somerset","RCX",4
"E10000027","Somerset","RM3",3
"E10000027","Somerset","RW1",1
"E10000027","Somerset","RWD",4
"E10000027","Somerset","RWP",10
"E10000027","Somerset","RA2",4
"E10000027","Somerset","RBL",2
"E10000027","Somerset","RBS",1
"E10000027","Somerset","RGP",2
"E10000027","Somerset","RTD",3
"E10000027","Somerset","RWH",6
"E10000027","Somerset","RXC",4
"E10000027","Somerset","RCD",4
"E10000027","Somerset","RJC",4
"E10000027","Somerset","RTF",2
"E10000027","Somerset","RTP",6
"E10000027","Somerset","RWJ",5
"E10000027","Somerset","RXQ",12
"E10000027","Somerset","RF4",2
"E10000027","Somerset","RFS",3
"E10000027","Somerset","RGN",6
"E10000027","Somerset","RJ2",2
"E10000027","Somerset","RNU",1
"E10000027","Somerset","RPY",1
"E10000027","Somerset","RPC",1
"E10000027","Somerset","RLT",2
"E10000027","Somerset","RTG",11
"E10000027","Somerset","RC1",5
"E10000027","Somerset","RDE",7
"E10000027","Somerset","RMC",3
"E10000027","Somerset","RNQ",5
"E10000027","Somerset","RQW",2
"E10000027","Somerset","RC9",4
"E10000027","Somerset","RHQ",1
"E10000027","Somerset","RXW",9
"E10000027","Somerset","RVR",7
"E10000027","Somerset","RJE",6
"E10000027","Somerset","RRV",12
"E10000027","Somerset","RBN",6
"E10000027","Somerset","RM1",5
"E10000027","Somerset","RNA",3
"E10000027","Somerset","RHW",15
"E10000027","Somerset","RNS",7
"E10000027","Somerset","REM",6
"E10000027","Somerset","RXK",3
"E10000027","Somerset","RXP",4
"E10000027","Somerset","R1F",8
"E10000027","Somerset","RAP",3
"E10000027","Somerset","RJ8",1
"E10000027","Somerset","RKB",5
"E10000027","Somerset","RQ3",2
"E10000027","Somerset","RWF",7
"E10000027","Somerset","RNL",2
"E10000027","Somerset","RTQ",1
"E10000027","Somerset","RWW",1
"E10000027","Somerset","RXL",7
"E10000027","Somerset","RXF",2
"E10000027","Somerset","RQ8",2
"E10000027","Somerset","RTK",4
"E10000027","Somerset","RVY",1
"E10000027","Somerset","RBK",1
"E10000027","Somerset","RJ6",4
"E10000027","Somerset","RXN",6
"E10000027","Somerset","RGM",3
"E10000027","Somerset","RCF",3
"E10000027","Somerset","RL4",2
"E10000027","Somerset","RAN",1
"E10000027","Somerset","RXR",2
"E10000027","Somerset","RAJ",6
"E10000027","Somerset","RK5",1
"E10000027","Somerset","RP5",2
"E10000027","Somerset","RWA",2
"E10000027","Somerset","RN7",2
"E10000027","Somerset","RWY",1
"E10000027","Somerset","RD8",3
"E10000027","Somerset","RPA",1
"E10000027","Somerset","RXE",1
"E10000027","Somerset","RDD",2
"E10000027","Somerset","RBV",1
"E10000027","Somerset","R0B",4
"E10000027","Somerset","RET",2
"E10000027","Somerset","RJN",1
"E10000027","Somerset","RTX",1
"E10000028","Staffordshire","RJE",53337
"E10000028","Staffordshire","RL4",10246
"E10000028","Staffordshire","RBK",3514
"E10000028","Staffordshire","RTG",23100
"E10000028","Staffordshire","RRE",1054
"E10000028","Staffordshire","RRK",13685
"E10000028","Staffordshire","RQ3",329
"E10000028","Staffordshire","RNA",2039
"E10000028","Staffordshire","RXK",149
"E10000028","Staffordshire","RXW",464
"E10000028","Staffordshire","RX1",169
"E10000028","Staffordshire","RKB",100
"E10000028","Staffordshire","RWE",57
"E10000028","Staffordshire","RCB",29
"E10000028","Staffordshire","RA9",30
"E10000028","Staffordshire","RWP",53
"E10000028","Staffordshire","RTH",30
"E10000028","Staffordshire","RJC",16
"E10000028","Staffordshire","RGT",13
"E10000028","Staffordshire","RJ1",14
"E10000028","Staffordshire","R0A",84
"E10000028","Staffordshire","REF",49
"E10000028","Staffordshire","RWD",21
"E10000028","Staffordshire","RTX",18
"E10000028","Staffordshire","RVV",11
"E10000028","Staffordshire","RHW",10
"E10000028","Staffordshire","RAX",5
"E10000028","Staffordshire","RBN",14
"E10000028","Staffordshire","RK9",16
"E10000028","Staffordshire","R1H",13
"E10000028","Staffordshire","RA3",12
"E10000028","Staffordshire","RL1",11
"E10000028","Staffordshire","RRJ",24
"E10000028","Staffordshire","RXC",4
"E10000028","Staffordshire","RAS",7
"E10000028","Staffordshire","RCD",6
"E10000028","Staffordshire","RM1",11
"E10000028","Staffordshire","RDZ",7
"E10000028","Staffordshire","RBD",9
"E10000028","Staffordshire","RLQ",14
"E10000028","Staffordshire","RLT",89
"E10000028","Staffordshire","RXL",29
"E10000028","Staffordshire","RBT",202
"E10000028","Staffordshire","RM3",27
"E10000028","Staffordshire","RA4",4
"E10000028","Staffordshire","RNZ",8
"E10000028","Staffordshire","RQX",2
"E10000028","Staffordshire","RA7",10
"E10000028","Staffordshire","RLY",452
"E10000028","Staffordshire","RNL",12
"E10000028","Staffordshire","RR8",10
"E10000028","Staffordshire","RTF",7
"E10000028","Staffordshire","RD1",4
"E10000028","Staffordshire","RD8",12
"E10000028","Staffordshire","RHM",10
"E10000028","Staffordshire","RJR",12
"E10000028","Staffordshire","RTP",5
"E10000028","Staffordshire","RWF",5
"E10000028","Staffordshire","RBA",16
"E10000028","Staffordshire","RBL",13
"E10000028","Staffordshire","REM",23
"E10000028","Staffordshire","RVY",3
"E10000028","Staffordshire","RC1",7
"E10000028","Staffordshire","RD3",9
"E10000028","Staffordshire","RGP",6
"E10000028","Staffordshire","RWA",7
"E10000028","Staffordshire","R1K",11
"E10000028","Staffordshire","RA2",4
"E10000028","Staffordshire","RDU",14
"E10000028","Staffordshire","RH8",17
"E10000028","Staffordshire","RNS",10
"E10000028","Staffordshire","RT3",5
"E10000028","Staffordshire","RTE",16
"E10000028","Staffordshire","R1F",6
"E10000028","Staffordshire","RHQ",20
"E10000028","Staffordshire","RN3",14
"E10000028","Staffordshire","RRV",18
"E10000028","Staffordshire","RTD",10
"E10000028","Staffordshire","RBZ",18
"E10000028","Staffordshire","RJ8",1
"E10000028","Staffordshire","RNQ",12
"E10000028","Staffordshire","RQM",5
"E10000028","Staffordshire","RWG",5
"E10000028","Staffordshire","RWJ",41
"E10000028","Staffordshire","RFS",22
"E10000028","Staffordshire","RN5",10
"E10000028","Staffordshire","RDE",15
"E10000028","Staffordshire","RY8",6
"E10000028","Staffordshire","RJL",8
"E10000028","Staffordshire","RK5",15
"E10000028","Staffordshire","RXF",7
"E10000028","Staffordshire","RCX",9
"E10000028","Staffordshire","RC9",6
"E10000028","Staffordshire","RGN",6
"E10000028","Staffordshire","RRF",6
"E10000028","Staffordshire","TAJ",19
"E10000028","Staffordshire","RJN",830
"E10000028","Staffordshire","RET",6
"E10000028","Staffordshire","RGR",2
"E10000028","Staffordshire","R0B",4
"E10000028","Staffordshire","RWH",4
"E10000028","Staffordshire","RAE",2
"E10000028","Staffordshire","RP5",8
"E10000028","Staffordshire","RVJ",12
"E10000028","Staffordshire","RXE",1
"E10000028","Staffordshire","RXR",2
"E10000028","Staffordshire","RTR",7
"E10000028","Staffordshire","RMC",6
"E10000028","Staffordshire","RW6",7
"E10000028","Staffordshire","RYJ",5
"E10000028","Staffordshire","RVR",6
"E10000028","Staffordshire","RT5",1
"E10000028","Staffordshire","RXN",10
"E10000028","Staffordshire","RCU",2
"E10000028","Staffordshire","RFF",3
"E10000028","Staffordshire","RHU",6
"E10000028","Staffordshire","RPA",2
"E10000028","Staffordshire","RXM",2
"E10000028","Staffordshire","R1A",7
"E10000028","Staffordshire","RBV",48
"E10000028","Staffordshire","RYR",7
"E10000028","Staffordshire","RJZ",5
"E10000028","Staffordshire","RJ7",5
"E10000028","Staffordshire","RBS",62
"E10000028","Staffordshire","RTK",7
"E10000028","Staffordshire","RXT",6
"E10000028","Staffordshire","RKE",2
"E10000028","Staffordshire","RMP",2
"E10000028","Staffordshire","RBQ",3
"E10000028","Staffordshire","RQW",1
"E10000028","Staffordshire","RFR",1
"E10000028","Staffordshire","RWW",8
"E10000028","Staffordshire","RXH",4
"E10000028","Staffordshire","RXP",3
"E10000028","Staffordshire","RXA",3
"E10000028","Staffordshire","RDY",1
"E10000028","Staffordshire","RJ6",2
"E10000028","Staffordshire","RJ2",3
"E10000028","Staffordshire","RAL",6
"E10000028","Staffordshire","RP1",1
"E10000028","Staffordshire","RX3",2
"E10000028","Staffordshire","R1D",4
"E10000028","Staffordshire","RGM",3
"E10000028","Staffordshire","RVN",1
"E10000028","Staffordshire","RDD",1
"E10000028","Staffordshire","REP",3
"E10000028","Staffordshire","RCF",3
"E10000028","Staffordshire","RQ8",1
"E10000028","Staffordshire","RAP",1
"E10000028","Staffordshire","RPC",1
"E10000028","Staffordshire","RXQ",1
"E10000028","Staffordshire","RPY",1
"E10000028","Staffordshire","RYG",2
"E10000028","Staffordshire","RWK",1
"E10000029","Suffolk","RDE",35991
"E10000029","Suffolk","RGR",22294
"E10000029","Suffolk","RGT",4445
"E10000029","Suffolk","RMY",723
"E10000029","Suffolk","RQ8",160
"E10000029","Suffolk","RM1",2595
"E10000029","Suffolk","RGM",347
"E10000029","Suffolk","RDD",74
"E10000029","Suffolk","REF",24
"E10000029","Suffolk","R1H",77
"E10000029","Suffolk","RRV",27
"E10000029","Suffolk","RYJ",29
"E10000029","Suffolk","R1L",19
"E10000029","Suffolk","RGN",36
"E10000029","Suffolk","RGP",11263
"E10000029","Suffolk","RJ1",51
"E10000029","Suffolk","RWH",21
"E10000029","Suffolk","RAJ",16
"E10000029","Suffolk","RTH",15
"E10000029","Suffolk","RPY",7
"E10000029","Suffolk","RJZ",20
"E10000029","Suffolk","RTP",10
"E10000029","Suffolk","RXC",17
"E10000029","Suffolk","RCX",61
"E10000029","Suffolk","RF4",22
"E10000029","Suffolk","RA9",11
"E10000029","Suffolk","RBA",9
"E10000029","Suffolk","R0A",12
"E10000029","Suffolk","RQW",25
"E10000029","Suffolk","RAL",22
"E10000029","Suffolk","RHW",5
"E10000029","Suffolk","RJ7",18
"E10000029","Suffolk","RNQ",10
"E10000029","Suffolk","RQM",20
"E10000029","Suffolk","RTF",7
"E10000029","Suffolk","RVY",2
"E10000029","Suffolk","RHM",8
"E10000029","Suffolk","RT1",2
"E10000029","Suffolk","RTR",7
"E10000029","Suffolk","RXH",18
"E10000029","Suffolk","RHU",7
"E10000029","Suffolk","RVV",22
"E10000029","Suffolk","RAS",6
"E10000029","Suffolk","RD8",11
"E10000029","Suffolk","RTD",6
"E10000029","Suffolk","RC9",17
"E10000029","Suffolk","RDU",19
"E10000029","Suffolk","RTX",14
"E10000029","Suffolk","RXP",4
"E10000029","Suffolk","RYR",13
"E10000029","Suffolk","NQ1",1
"E10000029","Suffolk","R1F",4
"E10000029","Suffolk","RNS",6
"E10000029","Suffolk","RXK",5
"E10000029","Suffolk","R1K",11
"E10000029","Suffolk","RCB",10
"E10000029","Suffolk","RNL",7
"E10000029","Suffolk","RPC",4
"E10000029","Suffolk","RR8",3
"E10000029","Suffolk","RBK",1
"E10000029","Suffolk","RN3",9
"E10000029","Suffolk","RC1",9
"E10000029","Suffolk","RVJ",3
"E10000029","Suffolk","RWG",9
"E10000029","Suffolk","RA7",10
"E10000029","Suffolk","RBD",7
"E10000029","Suffolk","RKB",12
"E10000029","Suffolk","RP6",9
"E10000029","Suffolk","REM",5
"E10000029","Suffolk","RTG",5
"E10000029","Suffolk","RWD",17
"E10000029","Suffolk","RXN",3
"E10000029","Suffolk","RJ2",15
"E10000029","Suffolk","RLQ",3
"E10000029","Suffolk","RN5",7
"E10000029","Suffolk","RP4",12
"E10000029","Suffolk","RXQ",9
"E10000029","Suffolk","RAN",4
"E10000029","Suffolk","RNZ",6
"E10000029","Suffolk","RX1",10
"E10000029","Suffolk","RJL",8
"E10000029","Suffolk","RNA",2
"E10000029","Suffolk","RRK",15
"E10000029","Suffolk","RCD",3
"E10000029","Suffolk","RD3",4
"E10000029","Suffolk","RWF",8
"E10000029","Suffolk","RBV",1
"E10000029","Suffolk","RQ3",3
"E10000029","Suffolk","RTE",12
"E10000029","Suffolk","RDZ",4
"E10000029","Suffolk","RJ6",5
"E10000029","Suffolk","RJC",2
"E10000029","Suffolk","RXW",9
"E10000029","Suffolk","RQX",7
"E10000029","Suffolk","RD1",12
"E10000029","Suffolk","RWE",7
"E10000029","Suffolk","RWP",5
"E10000029","Suffolk","RVR",3
"E10000029","Suffolk","RH8",6
"E10000029","Suffolk","RHQ",4
"E10000029","Suffolk","RN7",4
"E10000029","Suffolk","RXF",6
"E10000029","Suffolk","RWW",2
"E10000029","Suffolk","RAP",2
"E10000029","Suffolk","RL4",3
"E10000029","Suffolk","RRJ",1
"E10000029","Suffolk","RCU",1
"E10000029","Suffolk","RJE",5
"E10000029","Suffolk","RP7",1
"E10000029","Suffolk","RPA",6
"E10000029","Suffolk","RW6",3
"E10000029","Suffolk","RBZ",3
"E10000029","Suffolk","RK5",2
"E10000029","Suffolk","RK9",6
"E10000029","Suffolk","RA2",4
"E10000029","Suffolk","RP5",2
"E10000029","Suffolk","RR7",2
"E10000029","Suffolk","RBL",2
"E10000029","Suffolk","RXT",2
"E10000029","Suffolk","RTK",3
"E10000029","Suffolk","RCF",3
"E10000029","Suffolk","RM3",1
"E10000029","Suffolk","RRF",2
"E10000029","Suffolk","RMC",2
"E10000029","Suffolk","RXR",1
"E10000029","Suffolk","RAE",1
"E10000029","Suffolk","RJN",2
"E10000029","Suffolk","RXL",1
"E10000029","Suffolk","RAX",6
"E10000029","Suffolk","RWK",3
"E10000029","Suffolk","RA4",3
"E10000029","Suffolk","RYV",4
"E10000029","Suffolk","RA3",3
"E10000029","Suffolk","RMP",2
"E10000029","Suffolk","RDY",1
"E10000029","Suffolk","RWX",1
"E10000029","Suffolk","RT3",5
"E10000029","Suffolk","RWA",6
"E10000029","Suffolk","RBT",1
"E10000029","Suffolk","RH5",1
"E10000029","Suffolk","RFS",5
"E10000029","Suffolk","RKE",1
"E10000029","Suffolk","RJR",2
"E10000029","Suffolk","RWJ",2
"E10000029","Suffolk","RXE",1
"E10000029","Suffolk","NAX",21
"E10000029","Suffolk","RWR",1
"E10000029","Suffolk","RWY",1
"E10000029","Suffolk","R0B",1
"E10000030","Surrey","RTK",24538
"E10000030","Surrey","RAX",5114
"E10000030","Surrey","RA2",26568
"E10000030","Surrey","RVR",17337
"E10000030","Surrey","RJ7",3056
"E10000030","Surrey","RXX",965
"E10000030","Surrey","RQM",710
"E10000030","Surrey","RPY",465
"E10000030","Surrey","RDU",15328
"E10000030","Surrey","RJ1",408
"E10000030","Surrey","RP6",154
"E10000030","Surrey","RYJ",233
"E10000030","Surrey","RJZ",286
"E10000030","Surrey","RRV",151
"E10000030","Surrey","NTV",136
"E10000030","Surrey","RT3",151
"E10000030","Surrey","RTP",18327
"E10000030","Surrey","RYR",198
"E10000030","Surrey","REF",62
"E10000030","Surrey","R1H",145
"E10000030","Surrey","RDZ",60
"E10000030","Surrey","R1K",61
"E10000030","Surrey","RAL",49
"E10000030","Surrey","RHU",73
"E10000030","Surrey","RPC",535
"E10000030","Surrey","RHM",131
"E10000030","Surrey","RTH",80
"E10000030","Surrey","RH8",38
"E10000030","Surrey","RWF",152
"E10000030","Surrey","RXC",66
"E10000030","Surrey","RWG",23
"E10000030","Surrey","RN3",19
"E10000030","Surrey","RD3",41
"E10000030","Surrey","RJ6",270
"E10000030","Surrey","RAS",90
"E10000030","Surrey","RHW",66
"E10000030","Surrey","RXP",10
"E10000030","Surrey","RXH",209
"E10000030","Surrey","RWA",12
"E10000030","Surrey","RN5",77
"E10000030","Surrey","RTE",26
"E10000030","Surrey","RVV",37
"E10000030","Surrey","RNS",18
"E10000030","Surrey","RQX",21
"E10000030","Surrey","RA7",19
"E10000030","Surrey","RA9",24
"E10000030","Surrey","RK5",4
"E10000030","Surrey","RK9",23
"E10000030","Surrey","RQY",7
"E10000030","Surrey","RBD",33
"E10000030","Surrey","RTX",13
"E10000030","Surrey","RAN",14
"E10000030","Surrey","RC1",13
"E10000030","Surrey","RA4",31
"E10000030","Surrey","REM",13
"E10000030","Surrey","RWY",8
"E10000030","Surrey","RGT",26
"E10000030","Surrey","RRK",32
"E10000030","Surrey","RCF",6
"E10000030","Surrey","RGR",20
"E10000030","Surrey","RJ2",21
"E10000030","Surrey","R0A",11
"E10000030","Surrey","RCD",7
"E10000030","Surrey","RMC",1
"E10000030","Surrey","RTR",8
"E10000030","Surrey","RCB",12
"E10000030","Surrey","RDE",15
"E10000030","Surrey","RW6",4
"E10000030","Surrey","RXQ",28
"E10000030","Surrey","RC9",29
"E10000030","Surrey","R0B",2
"E10000030","Surrey","RM1",17
"E10000030","Surrey","RTF",8
"E10000030","Surrey","RTG",6
"E10000030","Surrey","RVJ",12
"E10000030","Surrey","RWD",8
"E10000030","Surrey","RBL",7
"E10000030","Surrey","RJC",10
"E10000030","Surrey","RLT",4
"E10000030","Surrey","RM3",2
"E10000030","Surrey","RQ8",9
"E10000030","Surrey","RVW",6
"E10000030","Surrey","RCX",8
"E10000030","Surrey","RMP",2
"E10000030","Surrey","RP5",3
"E10000030","Surrey","R1F",27
"E10000030","Surrey","RD1",20
"E10000030","Surrey","RJN",4
"E10000030","Surrey","RW1",6
"E10000030","Surrey","RWP",5
"E10000030","Surrey","RXW",10
"E10000030","Surrey","RD8",17
"E10000030","Surrey","RJL",6
"E10000030","Surrey","RNZ",22
"E10000030","Surrey","RQW",8
"E10000030","Surrey","RWH",10
"E10000030","Surrey","RBT",9
"E10000030","Surrey","RPA",14
"E10000030","Surrey","RX2",52
"E10000030","Surrey","RV3",10
"E10000030","Surrey","RTD",11
"E10000030","Surrey","RBA",18
"E10000030","Surrey","RNA",3
"E10000030","Surrey","RXN",6
"E10000030","Surrey","RXY",3
"E10000030","Surrey","RDD",12
"E10000030","Surrey","RWE",17
"E10000030","Surrey","RL4",4
"E10000030","Surrey","RX1",12
"E10000030","Surrey","RXF",7
"E10000030","Surrey","RFS",6
"E10000030","Surrey","RGN",13
"E10000030","Surrey","RGP",11
"E10000030","Surrey","RNQ",6
"E10000030","Surrey","RR8",7
"E10000030","Surrey","RKE",10
"E10000030","Surrey","RVN",2
"E10000030","Surrey","RF4",9
"E10000030","Surrey","RQ3",2
"E10000030","Surrey","RFR",3
"E10000030","Surrey","RAJ",6
"E10000030","Surrey","RAP",8
"E10000030","Surrey","RXK",5
"E10000030","Surrey","RBK",1
"E10000030","Surrey","RVY",6
"E10000030","Surrey","RJE",6
"E10000030","Surrey","RP4",6
"E10000030","Surrey","RA3",1
"E10000030","Surrey","RKB",11
"E10000030","Surrey","RN7",15
"E10000030","Surrey","RBZ",20
"E10000030","Surrey","RWJ",6
"E10000030","Surrey","RHQ",4
"E10000030","Surrey","RXR",2
"E10000030","Surrey","RPG",2
"E10000030","Surrey","RV5",4
"E10000030","Surrey","RNL",5
"E10000030","Surrey","RWK",6
"E10000030","Surrey","RXA",1
"E10000030","Surrey","RDR",7
"E10000030","Surrey","RDY",2
"E10000030","Surrey","RXL",3
"E10000030","Surrey","RWW",4
"E10000030","Surrey","RBS",1
"E10000030","Surrey","RGM",4
"E10000030","Surrey","RLQ",9
"E10000030","Surrey","RWX",3
"E10000030","Surrey","RBQ",2
"E10000030","Surrey","RBN",4
"E10000030","Surrey","RCU",1
"E10000030","Surrey","RAT",2
"E10000030","Surrey","RAE",3
"E10000030","Surrey","RBV",4
"E10000030","Surrey","RRJ",1
"E10000030","Surrey","RFF",2
"E10000030","Surrey","RMY",1
"E10000030","Surrey","RXG",1
"E10000030","Surrey","RJR",1
"E10000030","Surrey","RRF",2
"E10000030","Surrey","RNU",2
"E10000030","Surrey","RT5",1
"E10000030","Surrey","RW5",1
"E10000031","Warwickshire","RLT",13160
"E10000031","Warwickshire","RRK",2633
"E10000031","Warwickshire","RKB",17930
"E10000031","Warwickshire","RTG",165
"E10000031","Warwickshire","RQ3",319
"E10000031","Warwickshire","RYG",672
"E10000031","Warwickshire","RWE",192
"E10000031","Warwickshire","RJC",22659
"E10000031","Warwickshire","RJE",37
"E10000031","Warwickshire","RTH",745
"E10000031","Warwickshire","RWD",33
"E10000031","Warwickshire","RX1",36
"E10000031","Warwickshire","RXK",68
"E10000031","Warwickshire","REF",36
"E10000031","Warwickshire","RNA",19
"E10000031","Warwickshire","R0A",15
"E10000031","Warwickshire","RBK",18
"E10000031","Warwickshire","RWP",1558
"E10000031","Warwickshire","RRE",5
"E10000031","Warwickshire","RA9",16
"E10000031","Warwickshire","RTE",70
"E10000031","Warwickshire","RCU",3
"E10000031","Warwickshire","RD1",11
"E10000031","Warwickshire","RNS",67
"E10000031","Warwickshire","RVJ",7
"E10000031","Warwickshire","RDU",20
"E10000031","Warwickshire","RH8",18
"E10000031","Warwickshire","RGP",9
"E10000031","Warwickshire","RBA",15
"E10000031","Warwickshire","RJL",4
"E10000031","Warwickshire","RWA",7
"E10000031","Warwickshire","RA2",9
"E10000031","Warwickshire","RWG",11
"E10000031","Warwickshire","R1K",5
"E10000031","Warwickshire","RTD",8
"E10000031","Warwickshire","RXH",10
"E10000031","Warwickshire","R1H",16
"E10000031","Warwickshire","RT5",12
"E10000031","Warwickshire","RCB",19
"E10000031","Warwickshire","RD8",17
"E10000031","Warwickshire","RDE",5
"E10000031","Warwickshire","RAS",5
"E10000031","Warwickshire","RGN",6
"E10000031","Warwickshire","RA7",10
"E10000031","Warwickshire","RJZ",8
"E10000031","Warwickshire","RM1",10
"E10000031","Warwickshire","RTR",7
"E10000031","Warwickshire","RAX",5
"E10000031","Warwickshire","RHW",3
"E10000031","Warwickshire","RA3",7
"E10000031","Warwickshire","RBZ",17
"E10000031","Warwickshire","RHU",7
"E10000031","Warwickshire","RJ7",11
"E10000031","Warwickshire","RL4",34
"E10000031","Warwickshire","RTX",14
"E10000031","Warwickshire","RDZ",16
"E10000031","Warwickshire","RXT",10
"E10000031","Warwickshire","RXW",16
"E10000031","Warwickshire","RYJ",16
"E10000031","Warwickshire","R1F",8
"E10000031","Warwickshire","RFS",6
"E10000031","Warwickshire","RVV",7
"E10000031","Warwickshire","RXN",5
"E10000031","Warwickshire","RBT",6
"E10000031","Warwickshire","RJR",5
"E10000031","Warwickshire","RPY",4
"E10000031","Warwickshire","RRV",17
"E10000031","Warwickshire","RWK",1
"E10000031","Warwickshire","RJ1",18
"E10000031","Warwickshire","REM",16
"E10000031","Warwickshire","RNQ",20
"E10000031","Warwickshire","RGM",4
"E10000031","Warwickshire","RHM",18
"E10000031","Warwickshire","RCX",6
"E10000031","Warwickshire","RLQ",6
"E10000031","Warwickshire","RBV",3
"E10000031","Warwickshire","RGT",16
"E10000031","Warwickshire","RBD",11
"E10000031","Warwickshire","RHQ",12
"E10000031","Warwickshire","RNL",11
"E10000031","Warwickshire","RXL",4
"E10000031","Warwickshire","RXQ",6
"E10000031","Warwickshire","RC9",10
"E10000031","Warwickshire","RK5",10
"E10000031","Warwickshire","RXP",8
"E10000031","Warwickshire","RWF",10
"E10000031","Warwickshire","RXF",2
"E10000031","Warwickshire","RD3",10
"E10000031","Warwickshire","RK9",12
"E10000031","Warwickshire","RMP",1
"E10000031","Warwickshire","RA4",2
"E10000031","Warwickshire","R0B",3
"E10000031","Warwickshire","RGR",5
"E10000031","Warwickshire","RJ2",6
"E10000031","Warwickshire","RN5",7
"E10000031","Warwickshire","RQW",5
"E10000031","Warwickshire","RTP",4
"E10000031","Warwickshire","RW1",1
"E10000031","Warwickshire","RXG",2
"E10000031","Warwickshire","RXR",1
"E10000031","Warwickshire","RMC",1
"E10000031","Warwickshire","RKE",2
"E10000031","Warwickshire","RPA",2
"E10000031","Warwickshire","RTK",3
"E10000031","Warwickshire","RYR",8
"E10000031","Warwickshire","RT1",2
"E10000031","Warwickshire","RBL",4
"E10000031","Warwickshire","RN7",2
"E10000031","Warwickshire","RVW",1
"E10000031","Warwickshire","RQM",13
"E10000031","Warwickshire","RTF",8
"E10000031","Warwickshire","RNZ",2
"E10000031","Warwickshire","RWH",4
"E10000031","Warwickshire","RWJ",3
"E10000031","Warwickshire","RWW",4
"E10000031","Warwickshire","RXC",3
"E10000031","Warwickshire","RFF",1
"E10000031","Warwickshire","RAJ",1
"E10000031","Warwickshire","RC1",3
"E10000031","Warwickshire","RX3",1
"E10000031","Warwickshire","RM3",5
"E10000031","Warwickshire","RL1",1
"E10000031","Warwickshire","RP5",4
"E10000031","Warwickshire","RAE",1
"E10000031","Warwickshire","RAL",4
"E10000031","Warwickshire","RBS",1
"E10000031","Warwickshire","RN3",8
"E10000031","Warwickshire","RRJ",6
"E10000031","Warwickshire","RVR",3
"E10000031","Warwickshire","R1A",9
"E10000031","Warwickshire","RQX",5
"E10000031","Warwickshire","RT3",3
"E10000031","Warwickshire","RTQ",2
"E10000031","Warwickshire","RF4",2
"E10000031","Warwickshire","R1J",2
"E10000031","Warwickshire","RNU",1
"E10000031","Warwickshire","RP6",2
"E10000031","Warwickshire","RCF",2
"E10000031","Warwickshire","RRF",1
"E10000031","Warwickshire","RVY",2
"E10000031","Warwickshire","RW6",1
"E10000031","Warwickshire","REN",3
"E10000031","Warwickshire","RDD",3
"E10000031","Warwickshire","RR8",2
"E10000031","Warwickshire","RCD",2
"E10000031","Warwickshire","RLY",2
"E10000031","Warwickshire","RAP",1
"E10000031","Warwickshire","RPC",1
"E10000031","Warwickshire","RWY",1
"E10000031","Warwickshire","RET",1
"E10000032","West Sussex","RYR",57881
"E10000032","West Sussex","RXH",13485
"E10000032","West Sussex","RDR",1991
"E10000032","West Sussex","RPC",875
"E10000032","West Sussex","RX2",625
"E10000032","West Sussex","RHM",394
"E10000032","West Sussex","RJ1",160
"E10000032","West Sussex","RTP",17009
"E10000032","West Sussex","RJZ",87
"E10000032","West Sussex","RJ7",374
"E10000032","West Sussex","RHU",1160
"E10000032","West Sussex","RA2",1727
"E10000032","West Sussex","RT3",50
"E10000032","West Sussex","RXC",75
"E10000032","West Sussex","REF",45
"E10000032","West Sussex","RWE",11
"E10000032","West Sussex","RPY",73
"E10000032","West Sussex","RYJ",65
"E10000032","West Sussex","RGT",21
"E10000032","West Sussex","RH8",11
"E10000032","West Sussex","RDE",23
"E10000032","West Sussex","RDU",112
"E10000032","West Sussex","RTE",15
"E10000032","West Sussex","RWF",155
"E10000032","West Sussex","RRK",21
"E10000032","West Sussex","RNZ",24
"E10000032","West Sussex","R1H",76
"E10000032","West Sussex","RA7",11
"E10000032","West Sussex","RJC",13
"E10000032","West Sussex","RDZ",32
"E10000032","West Sussex","RTH",48
"E10000032","West Sussex","RAL",21
"E10000032","West Sussex","RBA",11
"E10000032","West Sussex","RWG",10
"E10000032","West Sussex","R1K",27
"E10000032","West Sussex","RAS",17
"E10000032","West Sussex","RJ2",18
"E10000032","West Sussex","RXW",10
"E10000032","West Sussex","RAX",24
"E10000032","West Sussex","RN3",13
"E10000032","West Sussex","RNL",4
"E10000032","West Sussex","RRV",67
"E10000032","West Sussex","RVJ",11
"E10000032","West Sussex","RXQ",16
"E10000032","West Sussex","RVR",147
"E10000032","West Sussex","R1F",23
"E10000032","West Sussex","RJE",7
"E10000032","West Sussex","RDD",7
"E10000032","West Sussex","RQM",51
"E10000032","West Sussex","RXL",3
"E10000032","West Sussex","RF4",4
"E10000032","West Sussex","RJL",3
"E10000032","West Sussex","RC1",9
"E10000032","West Sussex","RVV",20
"E10000032","West Sussex","RJ6",40
"E10000032","West Sussex","RTK",33
"E10000032","West Sussex","RD1",27
"E10000032","West Sussex","RA9",10
"E10000032","West Sussex","RHW",20
"E10000032","West Sussex","RCB",9
"E10000032","West Sussex","RBD",25
"E10000032","West Sussex","RN5",25
"E10000032","West Sussex","RWH",10
"E10000032","West Sussex","RLQ",6
"E10000032","West Sussex","RBZ",14
"E10000032","West Sussex","RD3",22
"E10000032","West Sussex","RD8",6
"E10000032","West Sussex","RQW",5
"E10000032","West Sussex","RKB",7
"E10000032","West Sussex","RA4",15
"E10000032","West Sussex","RBT",6
"E10000032","West Sussex","RPA",8
"E10000032","West Sussex","RWY",3
"E10000032","West Sussex","RBN",4
"E10000032","West Sussex","RBV",3
"E10000032","West Sussex","RGP",9
"E10000032","West Sussex","RTX",9
"E10000032","West Sussex","RGR",5
"E10000032","West Sussex","RQ8",7
"E10000032","West Sussex","RLT",3
"E10000032","West Sussex","RP6",35
"E10000032","West Sussex","RQX",8
"E10000032","West Sussex","RWW",3
"E10000032","West Sussex","RAP",3
"E10000032","West Sussex","RCF",2
"E10000032","West Sussex","RCX",6
"E10000032","West Sussex","REM",8
"E10000032","West Sussex","RTF",8
"E10000032","West Sussex","RXK",6
"E10000032","West Sussex","RXX",10
"E10000032","West Sussex","R0A",7
"E10000032","West Sussex","RFS",4
"E10000032","West Sussex","RWD",7
"E10000032","West Sussex","RC9",3
"E10000032","West Sussex","RX1",10
"E10000032","West Sussex","RP4",2
"E10000032","West Sussex","RP5",2
"E10000032","West Sussex","RM1",6
"E10000032","West Sussex","RFF",2
"E10000032","West Sussex","RNQ",4
"E10000032","West Sussex","RA3",1
"E10000032","West Sussex","RAE",8
"E10000032","West Sussex","RGN",5
"E10000032","West Sussex","RVW",3
"E10000032","West Sussex","RW1",14
"E10000032","West Sussex","RXR",6
"E10000032","West Sussex","RL4",3
"E10000032","West Sussex","RQ3",2
"E10000032","West Sussex","RHQ",5
"E10000032","West Sussex","RXP",4
"E10000032","West Sussex","RBS",2
"E10000032","West Sussex","RK5",1
"E10000032","West Sussex","RN7",12
"E10000032","West Sussex","RWP",6
"E10000032","West Sussex","RFR",1
"E10000032","West Sussex","RTD",3
"E10000032","West Sussex","RAJ",5
"E10000032","West Sussex","RK9",9
"E10000032","West Sussex","RKE",3
"E10000032","West Sussex","RWK",5
"E10000032","West Sussex","RNS",5
"E10000032","West Sussex","RGM",2
"E10000032","West Sussex","RP7",1
"E10000032","West Sussex","RPG",1
"E10000032","West Sussex","RBL",1
"E10000032","West Sussex","RXN",1
"E10000032","West Sussex","RMP",1
"E10000032","West Sussex","RW6",4
"E10000032","West Sussex","RTG",8
"E10000032","West Sussex","RTR",4
"E10000032","West Sussex","RWX",1
"E10000032","West Sussex","RAN",4
"E10000032","West Sussex","RM3",1
"E10000032","West Sussex","RX4",2
"E10000032","West Sussex","RCD",2
"E10000032","West Sussex","RBK",2
"E10000032","West Sussex","RJR",2
"E10000032","West Sussex","RP1",1
"E10000032","West Sussex","RWA",2
"E10000032","West Sussex","RXY",1
"E10000032","West Sussex","RJ8",1
"E10000032","West Sussex","RVN",1
"E10000032","West Sussex","RHA",1
"E10000032","West Sussex","RX3",3
"E10000032","West Sussex","RH5",1
"E10000032","West Sussex","RR8",1
"E10000032","West Sussex","RXF",1
"E10000034","Worcestershire","RWP",48147
"E10000034","Worcestershire","RRK",3943
"E10000034","Worcestershire","RNA",1063
"E10000034","Worcestershire","R1A",2001
"E10000034","Worcestershire","RQ3",684
"E10000034","Worcestershire","RXK",187
"E10000034","Worcestershire","RKB",190
"E10000034","Worcestershire","RJC",326
"E10000034","Worcestershire","RL4",100
"E10000034","Worcestershire","RBK",20
"E10000034","Worcestershire","RJE",37
"E10000034","Worcestershire","RA3",25
"E10000034","Worcestershire","RA9",35
"E10000034","Worcestershire","RRJ",89
"E10000034","Worcestershire","RTH",74
"E10000034","Worcestershire","RWE",17
"E10000034","Worcestershire","RQM",9
"E10000034","Worcestershire","REF",50
"E10000034","Worcestershire","RH8",30
"E10000034","Worcestershire","RHU",13
"E10000034","Worcestershire","RXT",11
"E10000034","Worcestershire","RAX",6
"E10000034","Worcestershire","RLQ",428
"E10000034","Worcestershire","RDU",18
"E10000034","Worcestershire","RYW",4
"E10000034","Worcestershire","RXW",35
"E10000034","Worcestershire","RX1",19
"E10000034","Worcestershire","RD3",9
"E10000034","Worcestershire","RNS",7
"E10000034","Worcestershire","RRV",6
"E10000034","Worcestershire","RYG",10
"E10000034","Worcestershire","RA7",45
"E10000034","Worcestershire","RHW",7
"E10000034","Worcestershire","RD1",13
"E10000034","Worcestershire","RGN",6
"E10000034","Worcestershire","RWA",5
"E10000034","Worcestershire","RBT",6
"E10000034","Worcestershire","RF4",4
"E10000034","Worcestershire","RM1",7
"E10000034","Worcestershire","RTG",15
"E10000034","Worcestershire","RTE",1072
"E10000034","Worcestershire","TAJ",6
"E10000034","Worcestershire","RBZ",10
"E10000034","Worcestershire","RTF",5
"E10000034","Worcestershire","RWF",5
"E10000034","Worcestershire","RBA",17
"E10000034","Worcestershire","RDZ",7
"E10000034","Worcestershire","RLT",2
"E10000034","Worcestershire","RVJ",41
"E10000034","Worcestershire","RBL",3
"E10000034","Worcestershire","RJ2",1
"E10000034","Worcestershire","RJL",5
"E10000034","Worcestershire","RK5",5
"E10000034","Worcestershire","RLY",3
"E10000034","Worcestershire","RC9",1
"E10000034","Worcestershire","RGM",1
"E10000034","Worcestershire","RTR",4
"E10000034","Worcestershire","RTX",9
"E10000034","Worcestershire","RWY",4
"E10000034","Worcestershire","RXF",5
"E10000034","Worcestershire","RJN",2
"E10000034","Worcestershire","RTP",4
"E10000034","Worcestershire","RWG",7
"E10000034","Worcestershire","RXN",2
"E10000034","Worcestershire","R0A",13
"E10000034","Worcestershire","RDD",3
"E10000034","Worcestershire","RDE",2
"E10000034","Worcestershire","RN5",11
"E10000034","Worcestershire","RQX",1
"E10000034","Worcestershire","RWD",5
"E10000034","Worcestershire","RWJ",2
"E10000034","Worcestershire","RA2",8
"E10000034","Worcestershire","RA4",7
"E10000034","Worcestershire","RJ7",8
"E10000034","Worcestershire","RTK",1
"E10000034","Worcestershire","RXM",1
"E10000034","Worcestershire","RYR",7
"E10000034","Worcestershire","RBV",4
"E10000034","Worcestershire","RC1",3
"E10000034","Worcestershire","RCB",13
"E10000034","Worcestershire","RCX",4
"E10000034","Worcestershire","RN7",4
"E10000034","Worcestershire","RAL",3
"E10000034","Worcestershire","RNL",6
"E10000034","Worcestershire","RR8",3
"E10000034","Worcestershire","RVR",5
"E10000034","Worcestershire","RJZ",6
"E10000034","Worcestershire","RPA",3
"E10000034","Worcestershire","RTD",6
"E10000034","Worcestershire","RVW",1
"E10000034","Worcestershire","RFF",10
"E10000034","Worcestershire","RN3",21
"E10000034","Worcestershire","R1J",4
"E10000034","Worcestershire","RR7",3
"E10000034","Worcestershire","REM",7
"E10000034","Worcestershire","RXC",4
"E10000034","Worcestershire","R1F",9
"E10000034","Worcestershire","RJ1",12
"E10000034","Worcestershire","RK9",10
"E10000034","Worcestershire","RPY",3
"E10000034","Worcestershire","RD8",5
"E10000034","Worcestershire","RJR",3
"E10000034","Worcestershire","RYJ",11
"E10000034","Worcestershire","RCF",2
"E10000034","Worcestershire","RNQ",3
"E10000034","Worcestershire","RW6",3
"E10000034","Worcestershire","RCD",1
"E10000034","Worcestershire","RMP",1
"E10000034","Worcestershire","RP6",2
"E10000034","Worcestershire","RWX",1
"E10000034","Worcestershire","RAS",3
"E10000034","Worcestershire","RGR",3
"E10000034","Worcestershire","RHM",9
"E10000034","Worcestershire","RNZ",7
"E10000034","Worcestershire","R0B",3
"E10000034","Worcestershire","RP4",1
"E10000034","Worcestershire","RAN",1
"E10000034","Worcestershire","RXH",4
"E10000034","Worcestershire","RXP",5
"E10000034","Worcestershire","RBD",12
"E10000034","Worcestershire","R1H",12
"E10000034","Worcestershire","RXL",6
"E10000034","Worcestershire","RHQ",6
"E10000034","Worcestershire","RT3",5
"E10000034","Worcestershire","RQW",3
"E10000034","Worcestershire","RGT",3
"E10000034","Worcestershire","RFR",1
"E10000034","Worcestershire","RAJ",1
"E10000034","Worcestershire","RAE",1
"E10000034","Worcestershire","RVY",4
"E10000034","Worcestershire","RXQ",2
"E10000034","Worcestershire","RM3",4
"E10000034","Worcestershire","RTQ",9
"E10000034","Worcestershire","RWW",2
"E10000034","Worcestershire","RP5",2
"E10000034","Worcestershire","RBS",3
"E10000034","Worcestershire","RXR",1
"E10000034","Worcestershire","R1K",4
"E10000034","Worcestershire","RFS",5
"E10000034","Worcestershire","RT5",1
"E10000034","Worcestershire","RQ8",2
"E10000034","Worcestershire","RGP",2
"E10000034","Worcestershire","RDY",1
"E10000034","Worcestershire","RWH",2
"E10000034","Worcestershire","RET",2
"E10000034","Worcestershire","RVV",1
"E10000034","Worcestershire","REP",1
"E10000034","Worcestershire","R1D",1
"E10000034","Worcestershire","RL1",1
"E10000015","Hertfordshire","RBN",2
"E10000015","Hertfordshire","RFS",4
"E10000015","Hertfordshire","RH5",1
"E10000015","Hertfordshire","RJL",4
"E10000015","Hertfordshire","RX4",1
"E10000015","Hertfordshire","TAD",1
"E10000015","Hertfordshire","RMP",2
NA,NA,"RMY",1
"E08000001","Bolton","RMC",27522
"E08000001","Bolton","RM3",1392
"E08000001","Bolton","R0A",1213
"E08000001","Bolton","RRF",461
"E08000001","Bolton","RW6",326
"E08000001","Bolton","RBV",308
"E08000001","Bolton","RXN",237
"E08000001","Bolton","RXR",235
"E08000001","Bolton","RXL",39
"E08000001","Bolton","RBS",36
"E08000001","Bolton","RTX",29
"E08000001","Bolton","RWJ",25
"E08000001","Bolton","RR8",20
"E08000001","Bolton","REM",23
"E08000001","Bolton","RBN",15
"E08000001","Bolton","RVY",15
"E08000001","Bolton","RWW",14
"E08000001","Bolton","RTV",12
"E08000001","Bolton","RCB",12
"E08000001","Bolton","RMP",11
"E08000001","Bolton","R1H",11
"E08000001","Bolton","RTD",9
"E08000001","Bolton","RXF",9
"E08000001","Bolton","RJE",8
"E08000001","Bolton","RAE",7
"E08000001","Bolton","RRV",8
"E08000001","Bolton","RTE",7
"E08000001","Bolton","RBL",7
"E08000001","Bolton","RF4",7
"E08000001","Bolton","RNL",7
"E08000001","Bolton","RHQ",6
"E08000001","Bolton","RLQ",6
"E08000001","Bolton","RX1",6
"E08000001","Bolton","RJR",6
"E08000001","Bolton","RFF",6
"E08000001","Bolton","RCF",5
"E08000001","Bolton","RQW",5
"E08000001","Bolton","RRK",9
"E08000001","Bolton","RWE",5
"E08000001","Bolton","RXQ",5
"E08000001","Bolton","RWA",5
"E08000001","Bolton","RKB",5
"E08000001","Bolton","RDU",4
"E08000001","Bolton","REF",4
"E08000001","Bolton","R1K",4
"E08000001","Bolton","RWY",4
"E08000001","Bolton","RJ1",4
"E08000001","Bolton","RBT",4
"E08000001","Bolton","RQM",4
"E08000001","Bolton","RWD",4
"E08000001","Bolton","RC9",4
"E08000001","Bolton","RFR",3
"E08000001","Bolton","RH8",3
"E08000001","Bolton","RN3",3
"E08000001","Bolton","RXP",3
"E08000001","Bolton","RA9",3
"E08000001","Bolton","RHM",3
"E08000001","Bolton","RTH",3
"E08000001","Bolton","RDZ",3
"E08000001","Bolton","RAL",2
"E08000001","Bolton","RET",2
"E08000001","Bolton","RN7",2
"E08000001","Bolton","RW5",2
"E08000001","Bolton","RGN",2
"E08000001","Bolton","RL4",2
"E08000001","Bolton","RVV",2
"E08000001","Bolton","RJ2",2
"E08000001","Bolton","RP5",2
"E08000001","Bolton","RBQ",2
"E08000001","Bolton","RD3",2
"E08000001","Bolton","RM1",2
"E08000001","Bolton","RXW",3
"E08000001","Bolton","RAP",2
"E08000001","Bolton","RAX",2
"E08000001","Bolton","RJZ",2
"E08000001","Bolton","RT3",2
"E08000001","Bolton","RXK",3
"E08000001","Bolton","RBZ",2
"E08000001","Bolton","RRE",2
"E08000001","Bolton","RHU",2
"E08000001","Bolton","RJ7",2
"E08000001","Bolton","RTG",2
"E08000001","Bolton","RXA",1
"E08000001","Bolton","RD1",1
"E08000001","Bolton","RTP",1
"E08000001","Bolton","REN",1
"E08000001","Bolton","RNU",1
"E08000001","Bolton","RQX",1
"E08000001","Bolton","RTR",2
"E08000001","Bolton","RWP",1
"E08000001","Bolton","RCX",1
"E08000001","Bolton","RGT",1
"E08000001","Bolton","RHW",1
"E08000001","Bolton","RJL",1
"E08000001","Bolton","RK9",1
"E08000001","Bolton","RPA",1
"E08000001","Bolton","RVW",1
"E08000001","Bolton","RWG",1
"E08000001","Bolton","RWH",1
"E08000001","Bolton","RCU",1
"E08000001","Bolton","RFS",1
"E08000001","Bolton","RGP",1
"E08000001","Bolton","RNQ",1
"E08000001","Bolton","RQ3",1
"E08000001","Bolton","RVR",1
"E08000001","Bolton","R1F",1
"E08000001","Bolton","RBD",1
"E08000001","Bolton","RCD",1
"E08000001","Bolton","RJ6",1
"E08000001","Bolton","R0B",1
"E08000001","Bolton","RN5",1
"E08000001","Bolton","RXH",1
"E08000001","Bolton","RA7",1
"E08000001","Bolton","RD8",1
"E08000001","Bolton","RK5",1
"E08000001","Bolton","RLY",1
"E08000002","Bury","RW6",18997
"E08000002","Bury","R0A",1345
"E08000002","Bury","RM3",1168
"E08000002","Bury","RMC",1115
"E08000002","Bury","RBV",341
"E08000002","Bury","RXR",86
"E08000002","Bury","RXN",28
"E08000002","Bury","RBS",24
"E08000002","Bury","RMP",24
"E08000002","Bury","RXL",22
"E08000002","Bury","RRF",19
"E08000002","Bury","RTX",18
"E08000002","Bury","RR8",16
"E08000002","Bury","RWJ",16
"E08000002","Bury","RVY",14
"E08000002","Bury","RWW",13
"E08000002","Bury","REM",14
"E08000002","Bury","RBT",9
"E08000002","Bury","RTD",7
"E08000002","Bury","RHQ",6
"E08000002","Bury","RBN",6
"E08000002","Bury","RJR",5
"E08000002","Bury","RCF",5
"E08000002","Bury","R1H",5
"E08000002","Bury","RJE",5
"E08000002","Bury","R1K",5
"E08000002","Bury","RA9",5
"E08000002","Bury","RAE",5
"E08000002","Bury","RRK",9
"E08000002","Bury","RCB",4
"E08000002","Bury","RJL",4
"E08000002","Bury","RNL",4
"E08000002","Bury","RAL",4
"E08000002","Bury","RQM",4
"E08000002","Bury","RXP",4
"E08000002","Bury","RBA",3
"E08000002","Bury","RBQ",3
"E08000002","Bury","RGP",3
"E08000002","Bury","RM1",3
"E08000002","Bury","RTG",3
"E08000002","Bury","RX1",3
"E08000002","Bury","RA2",3
"E08000002","Bury","RTE",3
"E08000002","Bury","RWA",3
"E08000002","Bury","RJ7",3
"E08000002","Bury","RRV",3
"E08000002","Bury","RCD",2
"E08000002","Bury","RFF",2
"E08000002","Bury","RVJ",2
"E08000002","Bury","RA7",2
"E08000002","Bury","RCU",2
"E08000002","Bury","RTP",2
"E08000002","Bury","RDU",2
"E08000002","Bury","RD8",2
"E08000002","Bury","RH8",2
"E08000002","Bury","RQW",2
"E08000002","Bury","RVR",2
"E08000002","Bury","RTV",2
"E08000002","Bury","RBL",2
"E08000002","Bury","RN3",2
"E08000002","Bury","RWG",2
"E08000002","Bury","RWY",2
"E08000002","Bury","RA3",1
"E08000002","Bury","RAX",1
"E08000002","Bury","RD1",1
"E08000002","Bury","RJ2",2
"E08000002","Bury","RJC",1
"E08000002","Bury","RVW",1
"E08000002","Bury","RJN",1
"E08000002","Bury","RVV",1
"E08000002","Bury","RA4",1
"E08000002","Bury","RAS",1
"E08000002","Bury","RBK",1
"E08000002","Bury","RGR",1
"E08000002","Bury","RK5",1
"E08000002","Bury","RL4",1
"E08000002","Bury","RHM",1
"E08000002","Bury","RKB",1
"E08000002","Bury","RNQ",1
"E08000002","Bury","RPC",1
"E08000002","Bury","RGT",1
"E08000002","Bury","RK9",1
"E08000002","Bury","RNU",1
"E08000002","Bury","RRJ",1
"E08000002","Bury","RWP",1
"E08000002","Bury","RX3",1
"E08000002","Bury","RXC",1
"E08000002","Bury","RXE",1
"E08000002","Bury","REF",1
"E08000002","Bury","RQ8",1
"E08000002","Bury","RTH",1
"E08000002","Bury","RWD",1
"E08000002","Bury","RXW",2
"E08000002","Bury","RYR",1
"E08000002","Bury","RN7",1
"E08000002","Bury","RWF",1
"E08000002","Bury","TAJ",1
"E08000002","Bury","RC1",1
"E08000002","Bury","RJ1",1
"E08000002","Bury","RP5",1
"E08000002","Bury","RW5",1
"E08000003","Manchester","R0A",48911
"E08000003","Manchester","RW6",16401
"E08000003","Manchester","RM3",1783
"E08000003","Manchester","RBV",794
"E08000003","Manchester","RWJ",619
"E08000003","Manchester","RMP",298
"E08000003","Manchester","RXL",46
"E08000003","Manchester","RMC",45
"E08000003","Manchester","RR8",42
"E08000003","Manchester","RXR",36
"E08000003","Manchester","R1H",34
"E08000003","Manchester","RBT",33
"E08000003","Manchester","RJN",29
"E08000003","Manchester","RHQ",28
"E08000003","Manchester","REM",36
"E08000003","Manchester","RBS",26
"E08000003","Manchester","RTX",24
"E08000003","Manchester","RXN",24
"E08000003","Manchester","RWW",23
"E08000003","Manchester","RJE",22
"E08000003","Manchester","RBN",22
"E08000003","Manchester","RRF",22
"E08000003","Manchester","RCB",20
"E08000003","Manchester","RAE",20
"E08000003","Manchester","RRV",16
"E08000003","Manchester","RX1",15
"E08000003","Manchester","RBL",15
"E08000003","Manchester","RJR",14
"E08000003","Manchester","RRK",24
"E08000003","Manchester","RXK",19
"E08000003","Manchester","RDU",13
"E08000003","Manchester","RTG",14
"E08000003","Manchester","RWY",12
"E08000003","Manchester","RTD",11
"E08000003","Manchester","RYJ",11
"E08000003","Manchester","RJ7",11
"E08000003","Manchester","RVJ",11
"E08000003","Manchester","RNL",10
"E08000003","Manchester","RTH",10
"E08000003","Manchester","RVY",11
"E08000003","Manchester","RQM",10
"E08000003","Manchester","RJ1",10
"E08000003","Manchester","RWE",9
"E08000003","Manchester","RXF",9
"E08000003","Manchester","RQ3",9
"E08000003","Manchester","RQX",9
"E08000003","Manchester","RBQ",8
"E08000003","Manchester","R1K",8
"E08000003","Manchester","RA7",8
"E08000003","Manchester","RXP",8
"E08000003","Manchester","RJZ",8
"E08000003","Manchester","RHU",7
"E08000003","Manchester","RA9",7
"E08000003","Manchester","RJ2",12
"E08000003","Manchester","RWA",7
"E08000003","Manchester","RM1",6
"E08000003","Manchester","RK9",6
"E08000003","Manchester","RTF",6
"E08000003","Manchester","RWH",6
"E08000003","Manchester","RWP",6
"E08000003","Manchester","RAL",5
"E08000003","Manchester","RNZ",5
"E08000003","Manchester","RET",5
"E08000003","Manchester","RN5",5
"E08000003","Manchester","RJ6",5
"E08000003","Manchester","RQ8",5
"E08000003","Manchester","RC1",5
"E08000003","Manchester","RH8",5
"E08000003","Manchester","REF",5
"E08000003","Manchester","RTR",5
"E08000003","Manchester","RAX",5
"E08000003","Manchester","RVW",5
"E08000003","Manchester","RDE",4
"E08000003","Manchester","RAS",4
"E08000003","Manchester","RC9",4
"E08000003","Manchester","RCF",4
"E08000003","Manchester","RF4",4
"E08000003","Manchester","RKB",4
"E08000003","Manchester","RL4",4
"E08000003","Manchester","RNS",4
"E08000003","Manchester","RTV",4
"E08000003","Manchester","RWG",4
"E08000003","Manchester","RD8",4
"E08000003","Manchester","RFR",4
"E08000003","Manchester","RGT",4
"E08000003","Manchester","RXA",4
"E08000003","Manchester","RTE",4
"E08000003","Manchester","RD1",3
"E08000003","Manchester","RHW",3
"E08000003","Manchester","RP5",4
"E08000003","Manchester","RFF",3
"E08000003","Manchester","RLQ",3
"E08000003","Manchester","RK5",3
"E08000003","Manchester","RVR",3
"E08000003","Manchester","RA4",3
"E08000003","Manchester","RXW",5
"E08000003","Manchester","RGN",3
"E08000003","Manchester","RAP",3
"E08000003","Manchester","RNA",3
"E08000003","Manchester","RCD",3
"E08000003","Manchester","RQW",3
"E08000003","Manchester","RN7",2
"E08000003","Manchester","RTP",2
"E08000003","Manchester","RXG",2
"E08000003","Manchester","RYR",2
"E08000003","Manchester","RHM",2
"E08000003","Manchester","RJC",2
"E08000003","Manchester","RXH",2
"E08000003","Manchester","RBA",2
"E08000003","Manchester","RFS",2
"E08000003","Manchester","RBD",2
"E08000003","Manchester","RVV",2
"E08000003","Manchester","RWF",2
"E08000003","Manchester","RNQ",1
"E08000003","Manchester","RW5",1
"E08000003","Manchester","RWK",1
"E08000003","Manchester","RDZ",1
"E08000003","Manchester","REN",1
"E08000003","Manchester","RGP",1
"E08000003","Manchester","RHA",1
"E08000003","Manchester","RJL",1
"E08000003","Manchester","R0B",2
"E08000003","Manchester","RT3",1
"E08000003","Manchester","RXQ",1
"E08000003","Manchester","RBZ",1
"E08000003","Manchester","RCU",1
"E08000003","Manchester","RD3",1
"E08000003","Manchester","RN3",1
"E08000003","Manchester","RTK",1
"E08000003","Manchester","RXC",1
"E08000003","Manchester","RT1",1
"E08000003","Manchester","RAJ",1
"E08000003","Manchester","RBK",1
"E08000003","Manchester","RGM",1
"E08000003","Manchester","RLY",1
"E08000003","Manchester","RMY",1
"E08000003","Manchester","RP6",1
"E08000003","Manchester","RGR",1
"E08000003","Manchester","RWD",1
"E08000004","Oldham","RW6",30932
"E08000004","Oldham","R0A",1615
"E08000004","Oldham","RM3",545
"E08000004","Oldham","RMP",366
"E08000004","Oldham","RBV",328
"E08000004","Oldham","RWJ",49
"E08000004","Oldham","RXL",29
"E08000004","Oldham","RMC",21
"E08000004","Oldham","RHQ",18
"E08000004","Oldham","RWW",17
"E08000004","Oldham","RWY",17
"E08000004","Oldham","RR8",16
"E08000004","Oldham","RBS",16
"E08000004","Oldham","RTX",16
"E08000004","Oldham","RAE",14
"E08000004","Oldham","RJE",13
"E08000004","Oldham","RXR",14
"E08000004","Oldham","RXN",12
"E08000004","Oldham","R1H",12
"E08000004","Oldham","RBN",12
"E08000004","Oldham","RRF",11
"E08000004","Oldham","RJN",9
"E08000004","Oldham","REM",16
"E08000004","Oldham","RCB",8
"E08000004","Oldham","RNL",8
"E08000004","Oldham","RA9",7
"E08000004","Oldham","RGN",6
"E08000004","Oldham","RXF",6
"E08000004","Oldham","RRK",9
"E08000004","Oldham","RXK",5
"E08000004","Oldham","RJR",5
"E08000004","Oldham","RCD",5
"E08000004","Oldham","RD8",5
"E08000004","Oldham","RVY",6
"E08000004","Oldham","RDU",4
"E08000004","Oldham","RBD",4
"E08000004","Oldham","RBT",4
"E08000004","Oldham","RBQ",3
"E08000004","Oldham","REF",3
"E08000004","Oldham","RVJ",3
"E08000004","Oldham","R1K",3
"E08000004","Oldham","RC9",3
"E08000004","Oldham","RDE",3
"E08000004","Oldham","RJC",3
"E08000004","Oldham","RTF",3
"E08000004","Oldham","RTH",3
"E08000004","Oldham","RTR",3
"E08000004","Oldham","RRV",3
"E08000004","Oldham","RTG",4
"E08000004","Oldham","RWD",3
"E08000004","Oldham","RBA",3
"E08000004","Oldham","RHU",3
"E08000004","Oldham","RJL",2
"E08000004","Oldham","RN3",2
"E08000004","Oldham","RN5",2
"E08000004","Oldham","RD3",2
"E08000004","Oldham","RM1",2
"E08000004","Oldham","RVR",2
"E08000004","Oldham","RXQ",2
"E08000004","Oldham","RA7",2
"E08000004","Oldham","RK5",2
"E08000004","Oldham","RQM",2
"E08000004","Oldham","R1F",2
"E08000004","Oldham","RCF",2
"E08000004","Oldham","RJ7",2
"E08000004","Oldham","RVV",2
"E08000004","Oldham","RQX",2
"E08000004","Oldham","RX1",2
"E08000004","Oldham","R0B",3
"E08000004","Oldham","RNZ",2
"E08000004","Oldham","RWA",2
"E08000004","Oldham","RYJ",2
"E08000004","Oldham","REP",1
"E08000004","Oldham","RFF",1
"E08000004","Oldham","RNA",1
"E08000004","Oldham","RC1",1
"E08000004","Oldham","RH8",1
"E08000004","Oldham","RJZ",1
"E08000004","Oldham","RKB",1
"E08000004","Oldham","RTD",1
"E08000004","Oldham","RTK",1
"E08000004","Oldham","RGM",1
"E08000004","Oldham","RHM",1
"E08000004","Oldham","RHW",1
"E08000004","Oldham","RJ2",2
"E08000004","Oldham","RTP",1
"E08000004","Oldham","RWH",1
"E08000004","Oldham","RWP",1
"E08000004","Oldham","RXW",2
"E08000004","Oldham","RJ1",1
"E08000004","Oldham","RK9",1
"E08000004","Oldham","RNQ",1
"E08000004","Oldham","RQ3",1
"E08000004","Oldham","RWE",1
"E08000004","Oldham","RAS",1
"E08000004","Oldham","RQW",1
"E08000004","Oldham","RVW",1
"E08000004","Oldham","RBL",1
"E08000004","Oldham","REN",1
"E08000004","Oldham","RWG",1
"E08000004","Oldham","RXP",1
"E08000004","Oldham","RXT",1
"E08000004","Oldham","RYR",1
"E08000004","Oldham","RDD",1
"E08000004","Oldham","RXA",1
"E08000005","Rochdale","RW6",27128
"E08000005","Rochdale","R0A",1324
"E08000005","Rochdale","RM3",488
"E08000005","Rochdale","RBV",227
"E08000005","Rochdale","RMP",46
"E08000005","Rochdale","RWY",40
"E08000005","Rochdale","RMC",39
"E08000005","Rochdale","RR8",36
"E08000005","Rochdale","RXL",35
"E08000005","Rochdale","RXR",36
"E08000005","Rochdale","RWJ",22
"E08000005","Rochdale","RBS",17
"E08000005","Rochdale","RRF",15
"E08000005","Rochdale","RXN",14
"E08000005","Rochdale","RTX",13
"E08000005","Rochdale","REM",12
"E08000005","Rochdale","RJE",8
"E08000005","Rochdale","RNL",8
"E08000005","Rochdale","RBT",8
"E08000005","Rochdale","RWW",8
"E08000005","Rochdale","RAE",8
"E08000005","Rochdale","RWA",7
"E08000005","Rochdale","RCB",7
"E08000005","Rochdale","RBN",6
"E08000005","Rochdale","RYJ",6
"E08000005","Rochdale","RBL",6
"E08000005","Rochdale","RXF",6
"E08000005","Rochdale","R1H",6
"E08000005","Rochdale","RA7",6
"E08000005","Rochdale","RF4",5
"E08000005","Rochdale","RJL",5
"E08000005","Rochdale","RJN",5
"E08000005","Rochdale","RBQ",5
"E08000005","Rochdale","REF",5
"E08000005","Rochdale","R1K",4
"E08000005","Rochdale","RQM",4
"E08000005","Rochdale","RX1",4
"E08000005","Rochdale","RTH",4
"E08000005","Rochdale","RRK",6
"E08000005","Rochdale","RTD",3
"E08000005","Rochdale","RC9",3
"E08000005","Rochdale","RJ1",3
"E08000005","Rochdale","RVY",4
"E08000005","Rochdale","RGT",3
"E08000005","Rochdale","RRV",3
"E08000005","Rochdale","RWD",3
"E08000005","Rochdale","RCX",3
"E08000005","Rochdale","RGP",3
"E08000005","Rochdale","RCF",3
"E08000005","Rochdale","RL4",3
"E08000005","Rochdale","RXP",3
"E08000005","Rochdale","RDU",3
"E08000005","Rochdale","RFF",3
"E08000005","Rochdale","RGN",3
"E08000005","Rochdale","RHQ",2
"E08000005","Rochdale","RJ6",2
"E08000005","Rochdale","R0B",3
"E08000005","Rochdale","RM1",2
"E08000005","Rochdale","RJC",2
"E08000005","Rochdale","RQW",2
"E08000005","Rochdale","RXC",2
"E08000005","Rochdale","RBA",2
"E08000005","Rochdale","RJR",2
"E08000005","Rochdale","RN5",2
"E08000005","Rochdale","RWG",2
"E08000005","Rochdale","RK5",2
"E08000005","Rochdale","RLT",2
"E08000005","Rochdale","RN3",2
"E08000005","Rochdale","RHU",2
"E08000005","Rochdale","RQX",2
"E08000005","Rochdale","RTG",2
"E08000005","Rochdale","RA4",2
"E08000005","Rochdale","RAX",2
"E08000005","Rochdale","RWE",2
"E08000005","Rochdale","RK9",1
"E08000005","Rochdale","RQ3",1
"E08000005","Rochdale","RT3",1
"E08000005","Rochdale","RTE",1
"E08000005","Rochdale","RVR",1
"E08000005","Rochdale","RWH",1
"E08000005","Rochdale","RXK",2
"E08000005","Rochdale","RCD",1
"E08000005","Rochdale","RDZ",1
"E08000005","Rochdale","RTR",2
"E08000005","Rochdale","RHW",1
"E08000005","Rochdale","RNZ",1
"E08000005","Rochdale","RTV",1
"E08000005","Rochdale","RXH",1
"E08000005","Rochdale","RXW",2
"E08000005","Rochdale","R1F",1
"E08000005","Rochdale","RJZ",1
"E08000005","Rochdale","RL1",1
"E08000005","Rochdale","RR7",1
"E08000005","Rochdale","RX4",1
"E08000005","Rochdale","RXA",1
"E08000005","Rochdale","RHM",1
"E08000005","Rochdale","RKB",1
"E08000005","Rochdale","RTF",1
"E08000005","Rochdale","RBD",1
"E08000005","Rochdale","RGM",1
"E08000005","Rochdale","RTP",1
"E08000005","Rochdale","RWK",1
"E08000005","Rochdale","RA9",1
"E08000005","Rochdale","RC1",1
"E08000005","Rochdale","RNS",1
"E08000005","Rochdale","RVV",1
"E08000005","Rochdale","RW5",1
"E08000005","Rochdale","RXQ",1
"E08000005","Rochdale","RET",1
"E08000005","Rochdale","RP5",1
"E08000006","Salford","RM3",25071
"E08000006","Salford","R0A",3205
"E08000006","Salford","RMC",2691
"E08000006","Salford","RW6",1545
"E08000006","Salford","RBV",390
"E08000006","Salford","RWW",119
"E08000006","Salford","RRF",97
"E08000006","Salford","RWJ",42
"E08000006","Salford","RXN",40
"E08000006","Salford","RXL",35
"E08000006","Salford","RMP",33
"E08000006","Salford","RBS",33
"E08000006","Salford","RXR",29
"E08000006","Salford","RTX",22
"E08000006","Salford","RBN",17
"E08000006","Salford","REM",25
"E08000006","Salford","RBT",13
"E08000006","Salford","RR8",12
"E08000006","Salford","RVY",15
"E08000006","Salford","RJE",9
"E08000006","Salford","RJN",9
"E08000006","Salford","RTV",9
"E08000006","Salford","R1H",8
"E08000006","Salford","RHQ",8
"E08000006","Salford","RAE",7
"E08000006","Salford","REF",7
"E08000006","Salford","RRK",9
"E08000006","Salford","RJ1",7
"E08000006","Salford","RCB",6
"E08000006","Salford","RTD",6
"E08000006","Salford","RX1",5
"E08000006","Salford","RD8",5
"E08000006","Salford","RXF",5
"E08000006","Salford","R1K",4
"E08000006","Salford","RA9",4
"E08000006","Salford","RHW",4
"E08000006","Salford","RJR",4
"E08000006","Salford","RWY",4
"E08000006","Salford","RJ7",4
"E08000006","Salford","RTG",5
"E08000006","Salford","RAL",4
"E08000006","Salford","RK5",3
"E08000006","Salford","RTH",3
"E08000006","Salford","RWE",3
"E08000006","Salford","RWF",3
"E08000006","Salford","RCD",3
"E08000006","Salford","RNL",3
"E08000006","Salford","RRV",3
"E08000006","Salford","RD3",3
"E08000006","Salford","RQX",3
"E08000006","Salford","RBQ",3
"E08000006","Salford","RFR",3
"E08000006","Salford","RHU",3
"E08000006","Salford","RFF",3
"E08000006","Salford","RDU",3
"E08000006","Salford","RVV",3
"E08000006","Salford","RWD",3
"E08000006","Salford","RPA",2
"E08000006","Salford","RXW",2
"E08000006","Salford","RXK",2
"E08000006","Salford","RXP",2
"E08000006","Salford","RYJ",2
"E08000006","Salford","RGT",2
"E08000006","Salford","RM1",2
"E08000006","Salford","RWA",2
"E08000006","Salford","RXC",2
"E08000006","Salford","RWP",2
"E08000006","Salford","RTE",2
"E08000006","Salford","RW4",2
"E08000006","Salford","RW5",2
"E08000006","Salford","RAS",2
"E08000006","Salford","RBL",2
"E08000006","Salford","RCU",2
"E08000006","Salford","RJC",2
"E08000006","Salford","RKB",2
"E08000006","Salford","RQM",2
"E08000006","Salford","RAJ",2
"E08000006","Salford","RTF",2
"E08000006","Salford","RBZ",1
"E08000006","Salford","RL1",1
"E08000006","Salford","RN7",1
"E08000006","Salford","RPY",1
"E08000006","Salford","RGP",1
"E08000006","Salford","RLY",1
"E08000006","Salford","RNS",1
"E08000006","Salford","RTK",1
"E08000006","Salford","RYR",1
"E08000006","Salford","RFS",1
"E08000006","Salford","RCF",1
"E08000006","Salford","RDD",1
"E08000006","Salford","RH8",1
"E08000006","Salford","RXA",1
"E08000006","Salford","R1F",1
"E08000006","Salford","RA2",1
"E08000006","Salford","RET",1
"E08000006","Salford","RGN",1
"E08000006","Salford","RGR",1
"E08000006","Salford","RKE",1
"E08000006","Salford","RNA",1
"E08000006","Salford","RVJ",1
"E08000006","Salford","RVW",1
"E08000006","Salford","RC9",1
"E08000006","Salford","REP",1
"E08000006","Salford","RJL",1
"E08000006","Salford","RNQ",1
"E08000006","Salford","RA7",1
"E08000006","Salford","RF4",1
"E08000006","Salford","RHM",1
"E08000006","Salford","RBA",1
"E08000006","Salford","RJZ",1
"E08000006","Salford","R0B",1
"E08000006","Salford","RT3",1
"E08000006","Salford","RWG",1
"E08000007","Stockport","RWJ",32277
"E08000007","Stockport","R0A",6943
"E08000007","Stockport","RBV",757
"E08000007","Stockport","RM3",457
"E08000007","Stockport","RMP",119
"E08000007","Stockport","RJN",99
"E08000007","Stockport","RW6",95
"E08000007","Stockport","RXL",21
"E08000007","Stockport","RR8",20
"E08000007","Stockport","RJE",19
"E08000007","Stockport","RBT",18
"E08000007","Stockport","RTX",16
"E08000007","Stockport","RMC",13
"E08000007","Stockport","RXN",13
"E08000007","Stockport","RCB",12
"E08000007","Stockport","RKB",12
"E08000007","Stockport","RBS",12
"E08000007","Stockport","RJC",11
"E08000007","Stockport","RNL",11
"E08000007","Stockport","RWW",11
"E08000007","Stockport","RBN",10
"E08000007","Stockport","RHQ",10
"E08000007","Stockport","RVY",11
"E08000007","Stockport","RXR",9
"E08000007","Stockport","RRF",9
"E08000007","Stockport","REF",8
"E08000007","Stockport","RJR",8
"E08000007","Stockport","RWY",8
"E08000007","Stockport","RWG",7
"E08000007","Stockport","RJ7",7
"E08000007","Stockport","REM",9
"E08000007","Stockport","RDU",7
"E08000007","Stockport","RJ1",6
"E08000007","Stockport","RFS",6
"E08000007","Stockport","RD8",5
"E08000007","Stockport","RWP",5
"E08000007","Stockport","RRV",5
"E08000007","Stockport","RWF",5
"E08000007","Stockport","RXP",5
"E08000007","Stockport","RA9",4
"E08000007","Stockport","RJL",4
"E08000007","Stockport","RD1",4
"E08000007","Stockport","RRK",5
"E08000007","Stockport","RX1",4
"E08000007","Stockport","RTE",4
"E08000007","Stockport","RXA",4
"E08000007","Stockport","RC9",4
"E08000007","Stockport","RH8",4
"E08000007","Stockport","RNS",4
"E08000007","Stockport","RXF",4
"E08000007","Stockport","R1K",4
"E08000007","Stockport","RWD",4
"E08000007","Stockport","RBL",4
"E08000007","Stockport","RHW",4
"E08000007","Stockport","RK9",4
"E08000007","Stockport","RTD",4
"E08000007","Stockport","RTF",4
"E08000007","Stockport","RDE",3
"E08000007","Stockport","RWH",3
"E08000007","Stockport","RTG",3
"E08000007","Stockport","RBZ",3
"E08000007","Stockport","RCD",3
"E08000007","Stockport","RGR",3
"E08000007","Stockport","RET",3
"E08000007","Stockport","RTV",3
"E08000007","Stockport","RXW",6
"E08000007","Stockport","RP5",4
"E08000007","Stockport","RWA",3
"E08000007","Stockport","RVJ",3
"E08000007","Stockport","RTH",2
"E08000007","Stockport","RBA",2
"E08000007","Stockport","RLQ",2
"E08000007","Stockport","R1F",2
"E08000007","Stockport","RBK",2
"E08000007","Stockport","RFF",2
"E08000007","Stockport","RGT",2
"E08000007","Stockport","RJZ",2
"E08000007","Stockport","RAE",2
"E08000007","Stockport","RPY",2
"E08000007","Stockport","RXC",2
"E08000007","Stockport","RXH",2
"E08000007","Stockport","RAS",2
"E08000007","Stockport","RBD",2
"E08000007","Stockport","RBQ",2
"E08000007","Stockport","R1H",1
"E08000007","Stockport","RAL",1
"E08000007","Stockport","R0B",2
"E08000007","Stockport","RVW",1
"E08000007","Stockport","RX2",1
"E08000007","Stockport","RXQ",1
"E08000007","Stockport","RYG",1
"E08000007","Stockport","RA2",1
"E08000007","Stockport","REP",1
"E08000007","Stockport","RKE",1
"E08000007","Stockport","RNZ",1
"E08000007","Stockport","RVV",1
"E08000007","Stockport","RW5",1
"E08000007","Stockport","RWE",1
"E08000007","Stockport","RYJ",1
"E08000007","Stockport","RAN",1
"E08000007","Stockport","RHM",1
"E08000007","Stockport","RL4",1
"E08000007","Stockport","RPA",1
"E08000007","Stockport","RTR",1
"E08000007","Stockport","RWK",1
"E08000007","Stockport","RCX",1
"E08000007","Stockport","RDZ",1
"E08000007","Stockport","RLY",1
"E08000007","Stockport","RF4",1
"E08000007","Stockport","RHU",1
"E08000007","Stockport","RGN",1
"E08000007","Stockport","RJ2",1
"E08000007","Stockport","RN3",1
"E08000007","Stockport","RNQ",1
"E08000007","Stockport","RP4",1
"E08000007","Stockport","RQ8",1
"E08000007","Stockport","RQX",1
"E08000007","Stockport","RXK",1
"E08000007","Stockport","RPC",1
"E08000007","Stockport","RV9",1
"E08000007","Stockport","RM1",1
"E08000007","Stockport","RNU",1
"E08000007","Stockport","RTQ",1
"E08000008","Tameside","RMP",21973
"E08000008","Tameside","R0A",3754
"E08000008","Tameside","RWJ",1486
"E08000008","Tameside","RW6",636
"E08000008","Tameside","RBV",473
"E08000008","Tameside","RM3",468
"E08000008","Tameside","RXL",27
"E08000008","Tameside","RCB",18
"E08000008","Tameside","RHQ",15
"E08000008","Tameside","RJN",14
"E08000008","Tameside","RWY",12
"E08000008","Tameside","RTX",12
"E08000008","Tameside","RMC",11
"E08000008","Tameside","RJE",11
"E08000008","Tameside","RBN",11
"E08000008","Tameside","RR8",11
"E08000008","Tameside","RWW",10
"E08000008","Tameside","RBT",9
"E08000008","Tameside","REM",12
"E08000008","Tameside","REF",7
"E08000008","Tameside","RXR",8
"E08000008","Tameside","RBS",7
"E08000008","Tameside","RRF",7
"E08000008","Tameside","RXP",7
"E08000008","Tameside","RGT",5
"E08000008","Tameside","RXN",5
"E08000008","Tameside","RBL",5
"E08000008","Tameside","RRK",6
"E08000008","Tameside","RAE",5
"E08000008","Tameside","RVV",4
"E08000008","Tameside","RJL",4
"E08000008","Tameside","RA9",4
"E08000008","Tameside","RK5",3
"E08000008","Tameside","RKB",3
"E08000008","Tameside","RTG",5
"E08000008","Tameside","RWD",3
"E08000008","Tameside","RFS",3
"E08000008","Tameside","RHM",3
"E08000008","Tameside","RNL",3
"E08000008","Tameside","RTE",3
"E08000008","Tameside","RWE",3
"E08000008","Tameside","RTR",4
"E08000008","Tameside","RXF",3
"E08000008","Tameside","RXK",4
"E08000008","Tameside","RVY",4
"E08000008","Tameside","RBQ",3
"E08000008","Tameside","RYR",3
"E08000008","Tameside","RQM",3
"E08000008","Tameside","RVR",3
"E08000008","Tameside","RQ3",2
"E08000008","Tameside","RBK",2
"E08000008","Tameside","RFR",2
"E08000008","Tameside","RJ7",2
"E08000008","Tameside","RWA",2
"E08000008","Tameside","RX1",2
"E08000008","Tameside","RD1",2
"E08000008","Tameside","RWP",2
"E08000008","Tameside","RXC",2
"E08000008","Tameside","RFF",2
"E08000008","Tameside","RJR",2
"E08000008","Tameside","RL4",2
"E08000008","Tameside","RN5",2
"E08000008","Tameside","RBD",2
"E08000008","Tameside","RWH",2
"E08000008","Tameside","RAP",2
"E08000008","Tameside","RDU",2
"E08000008","Tameside","RHW",2
"E08000008","Tameside","RJ1",2
"E08000008","Tameside","RXW",3
"E08000008","Tameside","RH8",2
"E08000008","Tameside","RBZ",1
"E08000008","Tameside","RTF",1
"E08000008","Tameside","R1F",1
"E08000008","Tameside","R1K",1
"E08000008","Tameside","RAX",1
"E08000008","Tameside","RJ2",1
"E08000008","Tameside","RK9",1
"E08000008","Tameside","RN7",1
"E08000008","Tameside","RVJ",1
"E08000008","Tameside","RYJ",1
"E08000008","Tameside","RA4",1
"E08000008","Tameside","RDD",1
"E08000008","Tameside","RJC",1
"E08000008","Tameside","RTH",1
"E08000008","Tameside","RGP",1
"E08000008","Tameside","R0B",2
"E08000008","Tameside","RQW",1
"E08000008","Tameside","RAS",1
"E08000008","Tameside","RKE",1
"E08000008","Tameside","RW5",1
"E08000008","Tameside","RCD",1
"E08000008","Tameside","RDZ",1
"E08000008","Tameside","RLQ",1
"E08000008","Tameside","RM1",1
"E08000008","Tameside","RTP",1
"E08000008","Tameside","RWG",1
"E08000009","Trafford","R0A",24427
"E08000009","Trafford","RM3",3319
"E08000009","Trafford","RBV",481
"E08000009","Trafford","RWJ",193
"E08000009","Trafford","RW6",81
"E08000009","Trafford","RWW",49
"E08000009","Trafford","RMC",33
"E08000009","Trafford","RBT",23
"E08000009","Trafford","RTX",20
"E08000009","Trafford","RBS",19
"E08000009","Trafford","RMP",19
"E08000009","Trafford","REM",26
"E08000009","Trafford","RJN",18
"E08000009","Trafford","RJE",16
"E08000009","Trafford","RR8",14
"E08000009","Trafford","RXR",13
"E08000009","Trafford","RBN",12
"E08000009","Trafford","RJR",12
"E08000009","Trafford","RCB",12
"E08000009","Trafford","RXN",11
"E08000009","Trafford","RBL",10
"E08000009","Trafford","RRF",9
"E08000009","Trafford","RTE",9
"E08000009","Trafford","RXL",9
"E08000009","Trafford","RNL",8
"E08000009","Trafford","RXW",9
"E08000009","Trafford","R1K",6
"E08000009","Trafford","RCD",6
"E08000009","Trafford","RRK",8
"E08000009","Trafford","R1H",6
"E08000009","Trafford","RVY",7
"E08000009","Trafford","REF",5
"E08000009","Trafford","RKB",5
"E08000009","Trafford","RRV",5
"E08000009","Trafford","RWY",5
"E08000009","Trafford","RJ1",5
"E08000009","Trafford","RQM",5
"E08000009","Trafford","RX1",4
"E08000009","Trafford","RXA",4
"E08000009","Trafford","RAE",4
"E08000009","Trafford","RCX",4
"E08000009","Trafford","RHQ",4
"E08000009","Trafford","RJC",4
"E08000009","Trafford","RTG",5
"E08000009","Trafford","RWD",4
"E08000009","Trafford","RM1",4
"E08000009","Trafford","RAX",4
"E08000009","Trafford","RH8",3
"E08000009","Trafford","RXH",3
"E08000009","Trafford","RTR",3
"E08000009","Trafford","RAL",3
"E08000009","Trafford","RFS",3
"E08000009","Trafford","RGT",3
"E08000009","Trafford","RK5",3
"E08000009","Trafford","RTH",3
"E08000009","Trafford","RBQ",3
"E08000009","Trafford","RJ7",3
"E08000009","Trafford","RHM",3
"E08000009","Trafford","RXP",3
"E08000009","Trafford","RXC",2
"E08000009","Trafford","RXF",2
"E08000009","Trafford","RWF",2
"E08000009","Trafford","RAS",2
"E08000009","Trafford","RYR",2
"E08000009","Trafford","RA7",2
"E08000009","Trafford","RLQ",2
"E08000009","Trafford","RVJ",2
"E08000009","Trafford","RA2",2
"E08000009","Trafford","RD8",2
"E08000009","Trafford","R0B",4
"E08000009","Trafford","RQ3",2
"E08000009","Trafford","RTV",2
"E08000009","Trafford","RVV",2
"E08000009","Trafford","RVW",2
"E08000009","Trafford","RWG",2
"E08000009","Trafford","RBD",2
"E08000009","Trafford","RWA",2
"E08000009","Trafford","RDZ",1
"E08000009","Trafford","RJ2",1
"E08000009","Trafford","RNA",1
"E08000009","Trafford","RDU",1
"E08000009","Trafford","REN",1
"E08000009","Trafford","RGR",1
"E08000009","Trafford","RJZ",1
"E08000009","Trafford","RP5",1
"E08000009","Trafford","RT3",1
"E08000009","Trafford","RTD",1
"E08000009","Trafford","RWE",1
"E08000009","Trafford","RBA",1
"E08000009","Trafford","RQ8",1
"E08000009","Trafford","RD1",1
"E08000009","Trafford","RT1",1
"E08000009","Trafford","RTF",1
"E08000009","Trafford","RTP",1
"E08000009","Trafford","RV3",1
"E08000009","Trafford","RD3",1
"E08000009","Trafford","RDE",1
"E08000009","Trafford","REP",1
"E08000009","Trafford","RHW",1
"E08000009","Trafford","RN5",1
"E08000009","Trafford","RNZ",1
"E08000009","Trafford","RQW",1
"E08000009","Trafford","RXQ",1
"E08000009","Trafford","RMY",1
"E08000009","Trafford","RNS",1
"E08000009","Trafford","RCF",1
"E08000009","Trafford","RDD",1
"E08000009","Trafford","RF4",1
"E08000010","Wigan","RRF",30553
"E08000010","Wigan","RMC",3636
"E08000010","Wigan","RM3",1945
"E08000010","Wigan","R0A",1036
"E08000010","Wigan","RTV",902
"E08000010","Wigan","RBN",728
"E08000010","Wigan","RWW",611
"E08000010","Wigan","RBV",301
"E08000010","Wigan","RXN",193
"E08000010","Wigan","RBS",178
"E08000010","Wigan","REM",149
"E08000010","Wigan","RVY",149
"E08000010","Wigan","RXR",56
"E08000010","Wigan","RXL",43
"E08000010","Wigan","RTX",40
"E08000010","Wigan","RW6",38
"E08000010","Wigan","RJE",29
"E08000010","Wigan","RET",28
"E08000010","Wigan","RBQ",24
"E08000010","Wigan","RJR",13
"E08000010","Wigan","RR8",12
"E08000010","Wigan","REN",11
"E08000010","Wigan","RCB",11
"E08000010","Wigan","RBL",10
"E08000010","Wigan","RHQ",9
"E08000010","Wigan","RWJ",8
"E08000010","Wigan","RAE",8
"E08000010","Wigan","RNL",8
"E08000010","Wigan","RTD",8
"E08000010","Wigan","RMP",7
"E08000010","Wigan","RRK",11
"E08000010","Wigan","RBT",7
"E08000010","Wigan","RH8",6
"E08000010","Wigan","RWY",6
"E08000010","Wigan","RA9",6
"E08000010","Wigan","REF",6
"E08000010","Wigan","RK9",6
"E08000010","Wigan","RKB",6
"E08000010","Wigan","RW4",4
"E08000010","Wigan","RTF",4
"E08000010","Wigan","RTR",5
"E08000010","Wigan","RW5",4
"E08000010","Wigan","RDE",3
"E08000010","Wigan","RRV",3
"E08000010","Wigan","RAS",3
"E08000010","Wigan","RGT",3
"E08000010","Wigan","RJN",3
"E08000010","Wigan","RTG",6
"E08000010","Wigan","RWD",3
"E08000010","Wigan","RXH",3
"E08000010","Wigan","RP5",4
"E08000010","Wigan","R1H",3
"E08000010","Wigan","RK5",3
"E08000010","Wigan","RXW",4
"E08000010","Wigan","RBD",3
"E08000010","Wigan","RJ1",3
"E08000010","Wigan","RJ7",3
"E08000010","Wigan","RL4",3
"E08000010","Wigan","RDD",2
"E08000010","Wigan","RDU",2
"E08000010","Wigan","RTE",2
"E08000010","Wigan","RWA",2
"E08000010","Wigan","RWE",2
"E08000010","Wigan","RWG",2
"E08000010","Wigan","RGR",2
"E08000010","Wigan","RHU",2
"E08000010","Wigan","RVJ",2
"E08000010","Wigan","RXK",2
"E08000010","Wigan","RBZ",2
"E08000010","Wigan","RTH",2
"E08000010","Wigan","RVV",2
"E08000010","Wigan","RCF",2
"E08000010","Wigan","RX1",2
"E08000010","Wigan","RHW",2
"E08000010","Wigan","RN5",2
"E08000010","Wigan","RFF",1
"E08000010","Wigan","RFS",1
"E08000010","Wigan","RJL",1
"E08000010","Wigan","RM1",1
"E08000010","Wigan","RPA",1
"E08000010","Wigan","RQM",1
"E08000010","Wigan","RTK",1
"E08000010","Wigan","RWP",1
"E08000010","Wigan","RA7",1
"E08000010","Wigan","RN3",1
"E08000010","Wigan","RVW",1
"E08000010","Wigan","RD3",1
"E08000010","Wigan","R0B",1
"E08000010","Wigan","RXF",1
"E08000010","Wigan","RDZ",1
"E08000010","Wigan","RL1",1
"E08000010","Wigan","RN7",1
"E08000010","Wigan","RXP",1
"E08000010","Wigan","RYJ",1
"E08000010","Wigan","RNS",1
"E08000010","Wigan","RTQ",1
"E08000010","Wigan","RWH",1
"E08000010","Wigan","RBA",1
"E08000010","Wigan","RD8",1
"E08000010","Wigan","RP4",1
"E08000010","Wigan","RPC",1
"E08000010","Wigan","RWF",1
"E08000010","Wigan","RAP",1
"E08000010","Wigan","RFR",1
"E08000010","Wigan","RJC",1
"E08000010","Wigan","RLY",1
"E08000010","Wigan","RBK",1
"E08000010","Wigan","RHM",1
"E08000010","Wigan","RXA",1
"E08000011","Knowsley","RBN",14800
"E08000011","Knowsley","REM",9394
"E08000011","Knowsley","RBS",1784
"E08000011","Knowsley","RVY",563
"E08000011","Knowsley","RTV",253
"E08000011","Knowsley","RBQ",205
"E08000011","Knowsley","RW4",99
"E08000011","Knowsley","RET",94
"E08000011","Knowsley","REP",90
"E08000011","Knowsley","REN",76
"E08000011","Knowsley","RWW",42
"E08000011","Knowsley","RBL",35
"E08000011","Knowsley","R0A",25
"E08000011","Knowsley","RRF",13
"E08000011","Knowsley","RJR",12
"E08000011","Knowsley","RXL",9
"E08000011","Knowsley","RM3",8
"E08000011","Knowsley","RXN",7
"E08000011","Knowsley","REF",6
"E08000011","Knowsley","RTX",6
"E08000011","Knowsley","RBV",6
"E08000011","Knowsley","RJE",6
"E08000011","Knowsley","RBT",6
"E08000011","Knowsley","RNL",5
"E08000011","Knowsley","RMC",5
"E08000011","Knowsley","RCB",4
"E08000011","Knowsley","RW6",4
"E08000011","Knowsley","RAL",3
"E08000011","Knowsley","RX1",3
"E08000011","Knowsley","RA9",3
"E08000011","Knowsley","RK9",3
"E08000011","Knowsley","RGT",3
"E08000011","Knowsley","RCF",2
"E08000011","Knowsley","RQW",2
"E08000011","Knowsley","RQX",2
"E08000011","Knowsley","R1K",2
"E08000011","Knowsley","RRV",2
"E08000011","Knowsley","RTF",2
"E08000011","Knowsley","R0B",2
"E08000011","Knowsley","RXF",2
"E08000011","Knowsley","RCD",2
"E08000011","Knowsley","RH8",2
"E08000011","Knowsley","RQM",2
"E08000011","Knowsley","RRK",3
"E08000011","Knowsley","RWD",2
"E08000011","Knowsley","RJL",2
"E08000011","Knowsley","RMP",2
"E08000011","Knowsley","RNA",2
"E08000011","Knowsley","RWA",2
"E08000011","Knowsley","RBA",2
"E08000011","Knowsley","RHM",2
"E08000011","Knowsley","RJ1",2
"E08000011","Knowsley","RVJ",2
"E08000011","Knowsley","RXR",2
"E08000011","Knowsley","R1H",1
"E08000011","Knowsley","RA7",1
"E08000011","Knowsley","RD3",1
"E08000011","Knowsley","RDZ",1
"E08000011","Knowsley","RJ7",1
"E08000011","Knowsley","RN5",1
"E08000011","Knowsley","RN7",1
"E08000011","Knowsley","RA2",1
"E08000011","Knowsley","RFS",1
"E08000011","Knowsley","RJ2",2
"E08000011","Knowsley","RTH",1
"E08000011","Knowsley","RTK",1
"E08000011","Knowsley","RJC",1
"E08000011","Knowsley","RNQ",1
"E08000011","Knowsley","RTD",1
"E08000011","Knowsley","R1F",1
"E08000011","Knowsley","RBZ",1
"E08000011","Knowsley","RD8",1
"E08000011","Knowsley","RGP",1
"E08000011","Knowsley","RJ6",1
"E08000011","Knowsley","RJZ",1
"E08000011","Knowsley","RLT",1
"E08000011","Knowsley","RWE",1
"E08000011","Knowsley","RHQ",1
"E08000011","Knowsley","RNS",1
"E08000011","Knowsley","RWG",1
"E08000011","Knowsley","RBD",1
"E08000011","Knowsley","RD1",1
"E08000011","Knowsley","RQ8",1
"E08000011","Knowsley","RR8",1
"E08000011","Knowsley","RYR",1
"E08000011","Knowsley","RAX",1
"E08000011","Knowsley","RHU",1
"E08000011","Knowsley","RKB",1
"E08000011","Knowsley","RXC",1
"E08000011","Knowsley","RXH",1
"E08000012","Liverpool","REM",55769
"E08000012","Liverpool","RBS",7759
"E08000012","Liverpool","RBN",5545
"E08000012","Liverpool","RW4",1367
"E08000012","Liverpool","REP",745
"E08000012","Liverpool","RBQ",625
"E08000012","Liverpool","RET",245
"E08000012","Liverpool","RBL",226
"E08000012","Liverpool","REN",280
"E08000012","Liverpool","RVY",175
"E08000012","Liverpool","R0A",85
"E08000012","Liverpool","RWW",85
"E08000012","Liverpool","RJR",36
"E08000012","Liverpool","RTV",33
"E08000012","Liverpool","RM3",26
"E08000012","Liverpool","RBT",23
"E08000012","Liverpool","RXL",19
"E08000012","Liverpool","RRF",17
"E08000012","Liverpool","RW6",17
"E08000012","Liverpool","RXN",16
"E08000012","Liverpool","RTX",16
"E08000012","Liverpool","RR8",15
"E08000012","Liverpool","RTD",12
"E08000012","Liverpool","R1H",11
"E08000012","Liverpool","RRK",14
"E08000012","Liverpool","RCB",10
"E08000012","Liverpool","RKB",10
"E08000012","Liverpool","RA9",9
"E08000012","Liverpool","RWA",9
"E08000012","Liverpool","R1K",9
"E08000012","Liverpool","RBV",8
"E08000012","Liverpool","RJ1",8
"E08000012","Liverpool","RWY",8
"E08000012","Liverpool","RHQ",7
"E08000012","Liverpool","RQX",7
"E08000012","Liverpool","RX1",7
"E08000012","Liverpool","RMP",7
"E08000012","Liverpool","RYJ",6
"E08000012","Liverpool","RXK",9
"E08000012","Liverpool","RJ7",6
"E08000012","Liverpool","RTF",6
"E08000012","Liverpool","RJ2",10
"E08000012","Liverpool","RJE",6
"E08000012","Liverpool","RBZ",6
"E08000012","Liverpool","RMC",6
"E08000012","Liverpool","RNL",6
"E08000012","Liverpool","RXA",6
"E08000012","Liverpool","RK9",5
"E08000012","Liverpool","REF",5
"E08000012","Liverpool","RDU",5
"E08000012","Liverpool","RLT",5
"E08000012","Liverpool","RAL",5
"E08000012","Liverpool","RQ8",5
"E08000012","Liverpool","RWH",5
"E08000012","Liverpool","RYR",5
"E08000012","Liverpool","RL4",4
"E08000012","Liverpool","RWG",4
"E08000012","Liverpool","RWJ",4
"E08000012","Liverpool","RXQ",4
"E08000012","Liverpool","RBA",4
"E08000012","Liverpool","RDZ",4
"E08000012","Liverpool","RXR",4
"E08000012","Liverpool","RCF",4
"E08000012","Liverpool","RQM",4
"E08000012","Liverpool","RGR",4
"E08000012","Liverpool","RGP",4
"E08000012","Liverpool","RNS",4
"E08000012","Liverpool","RJZ",4
"E08000012","Liverpool","RK5",4
"E08000012","Liverpool","RTH",4
"E08000012","Liverpool","RFS",4
"E08000012","Liverpool","RJC",4
"E08000012","Liverpool","RM1",4
"E08000012","Liverpool","RTP",4
"E08000012","Liverpool","RAS",3
"E08000012","Liverpool","RAX",3
"E08000012","Liverpool","RCD",3
"E08000012","Liverpool","RRV",4
"E08000012","Liverpool","RWE",3
"E08000012","Liverpool","RXF",3
"E08000012","Liverpool","RVV",3
"E08000012","Liverpool","RAE",3
"E08000012","Liverpool","RF4",3
"E08000012","Liverpool","RJN",3
"E08000012","Liverpool","RTG",5
"E08000012","Liverpool","RA7",3
"E08000012","Liverpool","RHM",3
"E08000012","Liverpool","RTE",3
"E08000012","Liverpool","RXH",3
"E08000012","Liverpool","RDD",2
"E08000012","Liverpool","RFR",2
"E08000012","Liverpool","RGT",2
"E08000012","Liverpool","RNQ",2
"E08000012","Liverpool","RVJ",2
"E08000012","Liverpool","RTR",2
"E08000012","Liverpool","RVW",2
"E08000012","Liverpool","RD1",2
"E08000012","Liverpool","RDE",2
"E08000012","Liverpool","RWF",2
"E08000012","Liverpool","RBK",2
"E08000012","Liverpool","RNZ",2
"E08000012","Liverpool","RWD",2
"E08000012","Liverpool","RGN",2
"E08000012","Liverpool","RHW",2
"E08000012","Liverpool","RN5",2
"E08000012","Liverpool","RBD",2
"E08000012","Liverpool","RH8",2
"E08000012","Liverpool","RN3",2
"E08000012","Liverpool","RA2",1
"E08000012","Liverpool","R1F",1
"E08000012","Liverpool","RC9",1
"E08000012","Liverpool","RX4",1
"E08000012","Liverpool","RXP",1
"E08000012","Liverpool","RYV",1
"E08000012","Liverpool","RA4",1
"E08000012","Liverpool","RAP",1
"E08000012","Liverpool","RD3",1
"E08000012","Liverpool","RTK",1
"E08000012","Liverpool","RWP",1
"E08000012","Liverpool","RC1",1
"E08000012","Liverpool","R0B",2
"E08000012","Liverpool","RJL",1
"E08000012","Liverpool","RP5",2
"E08000012","Liverpool","RJ6",1
"E08000012","Liverpool","RLQ",1
"E08000012","Liverpool","RW5",1
"E08000012","Liverpool","RX2",1
"E08000012","Liverpool","RXC",1
"E08000012","Liverpool","RAT",1
"E08000012","Liverpool","RT3",1
"E08000012","Liverpool","RVR",1
"E08000012","Liverpool","RCU",1
"E08000012","Liverpool","RGD",1
"E08000012","Liverpool","RKE",1
"E08000012","Liverpool","RV9",1
"E08000012","Liverpool","RXW",1
"E08000013","St. Helens","RBN",22785
"E08000013","St. Helens","RWW",1407
"E08000013","St. Helens","REM",930
"E08000013","St. Helens","RTV",433
"E08000013","St. Helens","RRF",407
"E08000013","St. Helens","RBS",401
"E08000013","St. Helens","RBQ",219
"E08000013","St. Helens","RET",116
"E08000013","St. Helens","R0A",96
"E08000013","St. Helens","REN",68
"E08000013","St. Helens","RM3",48
"E08000013","St. Helens","RVY",57
"E08000013","St. Helens","RTX",21
"E08000013","St. Helens","RJR",21
"E08000013","St. Helens","RBV",19
"E08000013","St. Helens","RXL",19
"E08000013","St. Helens","RBL",18
"E08000013","St. Helens","REP",18
"E08000013","St. Helens","RXN",18
"E08000013","St. Helens","RJE",13
"E08000013","St. Helens","RBT",13
"E08000013","St. Helens","RRK",9
"E08000013","St. Helens","RNL",7
"E08000013","St. Helens","RR8",7
"E08000013","St. Helens","RW6",7
"E08000013","St. Helens","RMC",6
"E08000013","St. Helens","RMP",5
"E08000013","St. Helens","RCB",5
"E08000013","St. Helens","RTD",5
"E08000013","St. Helens","RWD",5
"E08000013","St. Helens","RA2",4
"E08000013","St. Helens","RAE",4
"E08000013","St. Helens","RBZ",4
"E08000013","St. Helens","RHM",3
"E08000013","St. Helens","RVR",3
"E08000013","St. Helens","RH8",3
"E08000013","St. Helens","RHQ",3
"E08000013","St. Helens","REF",3
"E08000013","St. Helens","RJ1",3
"E08000013","St. Helens","RWE",3
"E08000013","St. Helens","RK9",3
"E08000013","St. Helens","RTH",3
"E08000013","St. Helens","RGN",3
"E08000013","St. Helens","RKB",3
"E08000013","St. Helens","RHW",3
"E08000013","St. Helens","RWJ",3
"E08000013","St. Helens","RD1",2
"E08000013","St. Helens","RDZ",2
"E08000013","St. Helens","RTG",2
"E08000013","St. Helens","RA3",2
"E08000013","St. Helens","RAS",2
"E08000013","St. Helens","RL4",2
"E08000013","St. Helens","RRV",2
"E08000013","St. Helens","RTF",2
"E08000013","St. Helens","RWH",2
"E08000013","St. Helens","RN3",2
"E08000013","St. Helens","RXR",2
"E08000013","St. Helens","RBA",2
"E08000013","St. Helens","RF4",2
"E08000013","St. Helens","RXQ",2
"E08000013","St. Helens","R1K",2
"E08000013","St. Helens","RBD",2
"E08000013","St. Helens","RXH",2
"E08000013","St. Helens","RW4",2
"E08000013","St. Helens","RWY",2
"E08000013","St. Helens","RJN",2
"E08000013","St. Helens","RXF",2
"E08000013","St. Helens","RJZ",1
"E08000013","St. Helens","RN5",1
"E08000013","St. Helens","RQX",1
"E08000013","St. Helens","RXK",1
"E08000013","St. Helens","RXW",1
"E08000013","St. Helens","RC9",1
"E08000013","St. Helens","RD8",1
"E08000013","St. Helens","RFS",1
"E08000013","St. Helens","RQM",1
"E08000013","St. Helens","RCF",1
"E08000013","St. Helens","RGT",1
"E08000013","St. Helens","RHU",1
"E08000013","St. Helens","RJL",1
"E08000013","St. Helens","RP5",2
"E08000013","St. Helens","RX1",1
"E08000013","St. Helens","RD3",1
"E08000013","St. Helens","RDU",1
"E08000013","St. Helens","RJ7",1
"E08000013","St. Helens","RNA",1
"E08000013","St. Helens","RVV",1
"E08000013","St. Helens","RW5",1
"E08000013","St. Helens","RXT",1
"E08000013","St. Helens","RFR",1
"E08000013","St. Helens","RN7",1
"E08000013","St. Helens","R1F",1
"E08000013","St. Helens","R1H",1
"E08000013","St. Helens","R0B",1
"E08000013","St. Helens","RWG",1
"E08000013","St. Helens","RM1",1
"E08000013","St. Helens","RQ3",1
"E08000013","St. Helens","RYJ",1
"E08000013","St. Helens","RJC",1
"E08000013","St. Helens","RKE",1
"E08000013","St. Helens","RVJ",1
"E08000013","St. Helens","RWP",1
"E08000013","St. Helens","RX2",1
"E08000014","Sefton","REM",25305
"E08000014","Sefton","RVY",17226
"E08000014","Sefton","RBS",2227
"E08000014","Sefton","RBN",604
"E08000014","Sefton","RW4",499
"E08000014","Sefton","RBQ",396
"E08000014","Sefton","RET",196
"E08000014","Sefton","REP",173
"E08000014","Sefton","REN",125
"E08000014","Sefton","RBL",78
"E08000014","Sefton","R0A",62
"E08000014","Sefton","RXN",42
"E08000014","Sefton","RXL",28
"E08000014","Sefton","RTX",22
"E08000014","Sefton","RWW",21
"E08000014","Sefton","RNL",21
"E08000014","Sefton","RM3",20
"E08000014","Sefton","RRF",18
"E08000014","Sefton","RJR",17
"E08000014","Sefton","RBT",11
"E08000014","Sefton","RJE",11
"E08000014","Sefton","RR8",9
"E08000014","Sefton","RW6",8
"E08000014","Sefton","RRK",9
"E08000014","Sefton","REF",7
"E08000014","Sefton","RJ1",7
"E08000014","Sefton","RH8",7
"E08000014","Sefton","RTH",6
"E08000014","Sefton","RDE",5
"E08000014","Sefton","RX1",5
"E08000014","Sefton","RBV",5
"E08000014","Sefton","RXA",5
"E08000014","Sefton","RHU",5
"E08000014","Sefton","RYJ",5
"E08000014","Sefton","RBZ",4
"E08000014","Sefton","RFS",4
"E08000014","Sefton","RHQ",4
"E08000014","Sefton","RJZ",4
"E08000014","Sefton","RXF",4
"E08000014","Sefton","RXR",4
"E08000014","Sefton","RCF",4
"E08000014","Sefton","RQX",4
"E08000014","Sefton","RXQ",4
"E08000014","Sefton","RCB",4
"E08000014","Sefton","RWG",4
"E08000014","Sefton","RXC",4
"E08000014","Sefton","RXP",4
"E08000014","Sefton","RMC",3
"E08000014","Sefton","RTD",3
"E08000014","Sefton","RWP",3
"E08000014","Sefton","RAS",3
"E08000014","Sefton","RCD",3
"E08000014","Sefton","RGN",3
"E08000014","Sefton","RMP",3
"E08000014","Sefton","RFF",3
"E08000014","Sefton","RHW",3
"E08000014","Sefton","RYR",3
"E08000014","Sefton","RJ6",3
"E08000014","Sefton","RWF",3
"E08000014","Sefton","RAX",3
"E08000014","Sefton","RDU",3
"E08000014","Sefton","RAL",3
"E08000014","Sefton","RDZ",3
"E08000014","Sefton","RNS",3
"E08000014","Sefton","RTG",5
"E08000014","Sefton","RXW",4
"E08000014","Sefton","RXK",5
"E08000014","Sefton","RAE",2
"E08000014","Sefton","RBD",2
"E08000014","Sefton","RKB",2
"E08000014","Sefton","R0B",3
"E08000014","Sefton","RP5",2
"E08000014","Sefton","RTE",2
"E08000014","Sefton","R1H",2
"E08000014","Sefton","RC1",2
"E08000014","Sefton","RTP",2
"E08000014","Sefton","RW5",2
"E08000014","Sefton","RWE",2
"E08000014","Sefton","RXE",2
"E08000014","Sefton","RLQ",2
"E08000014","Sefton","RWK",2
"E08000014","Sefton","RDD",3
"E08000014","Sefton","RJN",2
"E08000014","Sefton","RWH",2
"E08000014","Sefton","RTR",3
"E08000014","Sefton","RD3",2
"E08000014","Sefton","RN5",2
"E08000014","Sefton","RNA",2
"E08000014","Sefton","RWJ",2
"E08000014","Sefton","RA7",2
"E08000014","Sefton","RN3",2
"E08000014","Sefton","RTV",2
"E08000014","Sefton","RD8",1
"E08000014","Sefton","RGP",1
"E08000014","Sefton","RNZ",1
"E08000014","Sefton","RWD",1
"E08000014","Sefton","RA4",1
"E08000014","Sefton","RF4",1
"E08000014","Sefton","RJ7",1
"E08000014","Sefton","RQ3",1
"E08000014","Sefton","RGM",1
"E08000014","Sefton","RWA",1
"E08000014","Sefton","RM1",1
"E08000014","Sefton","RRV",1
"E08000014","Sefton","RAP",1
"E08000014","Sefton","RBA",1
"E08000014","Sefton","RGR",1
"E08000014","Sefton","RKE",1
"E08000014","Sefton","RVR",1
"E08000014","Sefton","RGT",1
"E08000014","Sefton","RTF",1
"E08000014","Sefton","RXH",1
"E08000014","Sefton","RCX",1
"E08000014","Sefton","RD1",1
"E08000014","Sefton","RFR",1
"E08000014","Sefton","RQM",1
"E08000014","Sefton","RT3",1
"E08000014","Sefton","RTK",1
"E08000014","Sefton","RV9",1
"E08000014","Sefton","RC9",1
"E08000015","Wirral","RBL",43576
"E08000015","Wirral","REN",535
"E08000015","Wirral","RBS",517
"E08000015","Wirral","RXA",508
"E08000015","Wirral","REM",840
"E08000015","Wirral","RBQ",346
"E08000015","Wirral","RJR",334
"E08000015","Wirral","RET",206
"E08000015","Wirral","RBN",164
"E08000015","Wirral","R0A",46
"E08000015","Wirral","REP",26
"E08000015","Wirral","RWW",21
"E08000015","Wirral","RJE",20
"E08000015","Wirral","RTX",17
"E08000015","Wirral","RBT",16
"E08000015","Wirral","RVY",19
"E08000015","Wirral","RBV",11
"E08000015","Wirral","RXN",11
"E08000015","Wirral","RM3",10
"E08000015","Wirral","RW6",10
"E08000015","Wirral","RRF",8
"E08000015","Wirral","RHQ",8
"E08000015","Wirral","RWJ",8
"E08000015","Wirral","RHM",7
"E08000015","Wirral","RXL",7
"E08000015","Wirral","RXW",12
"E08000015","Wirral","RR8",7
"E08000015","Wirral","RRK",8
"E08000015","Wirral","RA9",6
"E08000015","Wirral","RCB",6
"E08000015","Wirral","RNL",6
"E08000015","Wirral","RHU",5
"E08000015","Wirral","RRV",5
"E08000015","Wirral","RWP",5
"E08000015","Wirral","RTH",5
"E08000015","Wirral","RJN",4
"E08000015","Wirral","RXR",4
"E08000015","Wirral","RD3",4
"E08000015","Wirral","RD8",4
"E08000015","Wirral","RTP",4
"E08000015","Wirral","RTE",4
"E08000015","Wirral","RTF",4
"E08000015","Wirral","RJ1",4
"E08000015","Wirral","REF",4
"E08000015","Wirral","RWE",4
"E08000015","Wirral","RJC",4
"E08000015","Wirral","RTV",4
"E08000015","Wirral","R1K",4
"E08000015","Wirral","RMP",4
"E08000015","Wirral","R1H",3
"E08000015","Wirral","RAS",3
"E08000015","Wirral","RGN",3
"E08000015","Wirral","RLQ",3
"E08000015","Wirral","RWY",3
"E08000015","Wirral","RAE",3
"E08000015","Wirral","RK5",3
"E08000015","Wirral","RA7",3
"E08000015","Wirral","RQM",3
"E08000015","Wirral","RTR",3
"E08000015","Wirral","RGT",3
"E08000015","Wirral","RHW",3
"E08000015","Wirral","RN7",3
"E08000015","Wirral","RWA",3
"E08000015","Wirral","RM1",3
"E08000015","Wirral","RCF",3
"E08000015","Wirral","RDU",3
"E08000015","Wirral","RJL",3
"E08000015","Wirral","RKB",3
"E08000015","Wirral","RPY",3
"E08000015","Wirral","RC9",2
"E08000015","Wirral","RVJ",2
"E08000015","Wirral","RTD",2
"E08000015","Wirral","RVW",2
"E08000015","Wirral","RCD",2
"E08000015","Wirral","RXQ",2
"E08000015","Wirral","RNA",2
"E08000015","Wirral","RK9",2
"E08000015","Wirral","RQ3",2
"E08000015","Wirral","RXK",4
"E08000015","Wirral","RAX",2
"E08000015","Wirral","RD1",2
"E08000015","Wirral","RN5",2
"E08000015","Wirral","RQW",2
"E08000015","Wirral","RWG",2
"E08000015","Wirral","RXF",2
"E08000015","Wirral","RNZ",2
"E08000015","Wirral","RWD",2
"E08000015","Wirral","RWH",2
"E08000015","Wirral","RFS",1
"E08000015","Wirral","RTG",2
"E08000015","Wirral","RW4",1
"E08000015","Wirral","RAL",1
"E08000015","Wirral","RAP",1
"E08000015","Wirral","RRE",1
"E08000015","Wirral","RAJ",1
"E08000015","Wirral","RCX",1
"E08000015","Wirral","RDZ",1
"E08000015","Wirral","RP5",1
"E08000015","Wirral","RH8",1
"E08000015","Wirral","RJ7",1
"E08000015","Wirral","RL1",1
"E08000015","Wirral","RLT",1
"E08000015","Wirral","RVV",1
"E08000015","Wirral","RYR",1
"E08000015","Wirral","RA4",1
"E08000015","Wirral","RGR",1
"E08000015","Wirral","RX1",1
"E08000015","Wirral","RXC",1
"E08000015","Wirral","RDE",1
"E08000015","Wirral","RJ6",1
"E08000015","Wirral","RNQ",1
"E08000015","Wirral","RXH",1
"E08000015","Wirral","RF4",1
"E08000015","Wirral","RN3",1
"E08000016","Barnsley","RFF",30080
"E08000016","Barnsley","RHQ",2536
"E08000016","Barnsley","RP5",445
"E08000016","Barnsley","RXF",374
"E08000016","Barnsley","RCU",272
"E08000016","Barnsley","RFR",323
"E08000016","Barnsley","RXG",203
"E08000016","Barnsley","RR8",114
"E08000016","Barnsley","RCB",65
"E08000016","Barnsley","RWY",38
"E08000016","Barnsley","RWD",25
"E08000016","Barnsley","R0A",21
"E08000016","Barnsley","RWA",15
"E08000016","Barnsley","RJL",14
"E08000016","Barnsley","RX1",11
"E08000016","Barnsley","RAE",10
"E08000016","Barnsley","REF",9
"E08000016","Barnsley","RFS",9
"E08000016","Barnsley","RCD",9
"E08000016","Barnsley","RTR",9
"E08000016","Barnsley","RXL",8
"E08000016","Barnsley","RTD",8
"E08000016","Barnsley","RXE",8
"E08000016","Barnsley","RXP",8
"E08000016","Barnsley","RW6",7
"E08000016","Barnsley","REM",8
"E08000016","Barnsley","RGT",6
"E08000016","Barnsley","RK5",6
"E08000016","Barnsley","RVW",6
"E08000016","Barnsley","RBV",6
"E08000016","Barnsley","RTF",6
"E08000016","Barnsley","RX3",5
"E08000016","Barnsley","RTX",5
"E08000016","Barnsley","RJE",5
"E08000016","Barnsley","R1K",4
"E08000016","Barnsley","RMP",4
"E08000016","Barnsley","RCF",4
"E08000016","Barnsley","RTG",4
"E08000016","Barnsley","RXR",4
"E08000016","Barnsley","RM3",4
"E08000016","Barnsley","RVV",4
"E08000016","Barnsley","RWE",4
"E08000016","Barnsley","RK9",3
"E08000016","Barnsley","RRK",5
"E08000016","Barnsley","RHU",3
"E08000016","Barnsley","RJC",3
"E08000016","Barnsley","RA7",3
"E08000016","Barnsley","RF4",3
"E08000016","Barnsley","RKB",3
"E08000016","Barnsley","RNS",3
"E08000016","Barnsley","RM1",3
"E08000016","Barnsley","RRF",3
"E08000016","Barnsley","RRV",4
"E08000016","Barnsley","RD3",2
"E08000016","Barnsley","RYR",2
"E08000016","Barnsley","RA4",2
"E08000016","Barnsley","RA9",2
"E08000016","Barnsley","RBD",2
"E08000016","Barnsley","RBQ",2
"E08000016","Barnsley","RGP",2
"E08000016","Barnsley","RGR",2
"E08000016","Barnsley","RNL",2
"E08000016","Barnsley","RR7",2
"E08000016","Barnsley","RVJ",2
"E08000016","Barnsley","RXH",2
"E08000016","Barnsley","RXW",3
"E08000016","Barnsley","RGN",2
"E08000016","Barnsley","RBA",2
"E08000016","Barnsley","RBT",2
"E08000016","Barnsley","RC1",2
"E08000016","Barnsley","RJ7",2
"E08000016","Barnsley","RTH",2
"E08000016","Barnsley","RTE",2
"E08000016","Barnsley","RCX",2
"E08000016","Barnsley","RH8",2
"E08000016","Barnsley","RYJ",2
"E08000016","Barnsley","R1H",2
"E08000016","Barnsley","RBN",2
"E08000016","Barnsley","RJ1",2
"E08000016","Barnsley","RJ2",3
"E08000016","Barnsley","R1F",1
"E08000016","Barnsley","RDD",1
"E08000016","Barnsley","RP6",1
"E08000016","Barnsley","RQ8",1
"E08000016","Barnsley","RQW",1
"E08000016","Barnsley","RW1",1
"E08000016","Barnsley","RW5",1
"E08000016","Barnsley","RBL",1
"E08000016","Barnsley","RDE",1
"E08000016","Barnsley","RHW",1
"E08000016","Barnsley","RJ6",1
"E08000016","Barnsley","RPC",1
"E08000016","Barnsley","RWF",1
"E08000016","Barnsley","RXC",1
"E08000016","Barnsley","RAJ",1
"E08000016","Barnsley","RBZ",1
"E08000016","Barnsley","R0B",1
"E08000016","Barnsley","RWJ",1
"E08000016","Barnsley","RXK",1
"E08000016","Barnsley","RA3",1
"E08000016","Barnsley","RJN",1
"E08000016","Barnsley","RTP",1
"E08000016","Barnsley","RLQ",1
"E08000016","Barnsley","RNA",1
"E08000016","Barnsley","RPA",1
"E08000016","Barnsley","RQX",1
"E08000016","Barnsley","RJR",1
"E08000016","Barnsley","RNQ",1
"E08000016","Barnsley","RBK",1
"E08000016","Barnsley","RC9",1
"E08000016","Barnsley","RDU",1
"E08000016","Barnsley","RMC",1
"E08000016","Barnsley","RN3",1
"E08000017","Doncaster","RP5",34693
"E08000017","Doncaster","RHQ",1321
"E08000017","Doncaster","RFR",875
"E08000017","Doncaster","RXE",440
"E08000017","Doncaster","RCU",311
"E08000017","Doncaster","RJL",117
"E08000017","Doncaster","RFF",114
"E08000017","Doncaster","RR8",108
"E08000017","Doncaster","RXF",88
"E08000017","Doncaster","RCB",70
"E08000017","Doncaster","RWA",57
"E08000017","Doncaster","RWD",49
"E08000017","Doncaster","R0A",25
"E08000017","Doncaster","RX1",20
"E08000017","Doncaster","RXP",18
"E08000017","Doncaster","RFS",13
"E08000017","Doncaster","RJ1",13
"E08000017","Doncaster","RTG",14
"E08000017","Doncaster","REF",12
"E08000017","Doncaster","RTF",11
"E08000017","Doncaster","RCF",10
"E08000017","Doncaster","RKB",9
"E08000017","Doncaster","RAE",9
"E08000017","Doncaster","RTD",9
"E08000017","Doncaster","RXL",8
"E08000017","Doncaster","RK5",8
"E08000017","Doncaster","REM",11
"E08000017","Doncaster","RTR",8
"E08000017","Doncaster","RHU",7
"E08000017","Doncaster","RGN",7
"E08000017","Doncaster","RHM",6
"E08000017","Doncaster","RDU",6
"E08000017","Doncaster","RRV",6
"E08000017","Doncaster","RRK",8
"E08000017","Doncaster","RJE",6
"E08000017","Doncaster","RCD",6
"E08000017","Doncaster","RAL",5
"E08000017","Doncaster","RNL",5
"E08000017","Doncaster","RWY",5
"E08000017","Doncaster","RVJ",5
"E08000017","Doncaster","RD8",5
"E08000017","Doncaster","RWH",5
"E08000017","Doncaster","RQM",5
"E08000017","Doncaster","RA7",4
"E08000017","Doncaster","RVV",4
"E08000017","Doncaster","RTH",4
"E08000017","Doncaster","RJR",4
"E08000017","Doncaster","RCX",4
"E08000017","Doncaster","R1H",4
"E08000017","Doncaster","RWW",4
"E08000017","Doncaster","RF4",3
"E08000017","Doncaster","RM3",3
"E08000017","Doncaster","RC1",3
"E08000017","Doncaster","RQW",3
"E08000017","Doncaster","RA9",3
"E08000017","Doncaster","RXK",4
"E08000017","Doncaster","RGT",3
"E08000017","Doncaster","RTP",3
"E08000017","Doncaster","RBT",3
"E08000017","Doncaster","RM1",3
"E08000017","Doncaster","RXQ",3
"E08000017","Doncaster","RW6",3
"E08000017","Doncaster","RA3",2
"E08000017","Doncaster","RWF",2
"E08000017","Doncaster","RRF",2
"E08000017","Doncaster","RTE",2
"E08000017","Doncaster","RXW",2
"E08000017","Doncaster","RHW",2
"E08000017","Doncaster","RJZ",2
"E08000017","Doncaster","RN3",2
"E08000017","Doncaster","RNS",2
"E08000017","Doncaster","RVY",2
"E08000017","Doncaster","RX3",2
"E08000017","Doncaster","RAP",2
"E08000017","Doncaster","RBS",2
"E08000017","Doncaster","RK9",2
"E08000017","Doncaster","RWE",2
"E08000017","Doncaster","RXH",2
"E08000017","Doncaster","RBD",2
"E08000017","Doncaster","RC9",2
"E08000017","Doncaster","RLQ",2
"E08000017","Doncaster","RR7",2
"E08000017","Doncaster","RWP",2
"E08000017","Doncaster","RXC",2
"E08000017","Doncaster","RBN",2
"E08000017","Doncaster","RBZ",2
"E08000017","Doncaster","RLT",2
"E08000017","Doncaster","RN5",2
"E08000017","Doncaster","RMC",2
"E08000017","Doncaster","RN7",2
"E08000017","Doncaster","RTK",2
"E08000017","Doncaster","RTX",2
"E08000017","Doncaster","RV9",2
"E08000017","Doncaster","RAS",1
"E08000017","Doncaster","RAX",1
"E08000017","Doncaster","RBL",1
"E08000017","Doncaster","RQ8",1
"E08000017","Doncaster","RBQ",1
"E08000017","Doncaster","RDD",1
"E08000017","Doncaster","R0B",1
"E08000017","Doncaster","RRJ",1
"E08000017","Doncaster","R1K",1
"E08000017","Doncaster","RAJ",1
"E08000017","Doncaster","RDE",1
"E08000017","Doncaster","RH8",1
"E08000017","Doncaster","RNA",1
"E08000017","Doncaster","RQX",1
"E08000017","Doncaster","RT3",1
"E08000017","Doncaster","RVR",1
"E08000017","Doncaster","RBV",1
"E08000017","Doncaster","RGP",1
"E08000017","Doncaster","RQ3",1
"E08000017","Doncaster","RL4",1
"E08000017","Doncaster","RA4",1
"E08000017","Doncaster","RBA",1
"E08000017","Doncaster","RD1",1
"E08000017","Doncaster","RGR",1
"E08000017","Doncaster","RJC",1
"E08000017","Doncaster","RWG",1
"E08000017","Doncaster","R1F",1
"E08000017","Doncaster","RA2",1
"E08000017","Doncaster","RBK",1
"E08000017","Doncaster","RHA",1
"E08000017","Doncaster","RJ2",1
"E08000017","Doncaster","RNQ",1
"E08000017","Doncaster","RNZ",1
"E08000017","Doncaster","RXG",1
"E08000017","Doncaster","RXN",1
"E08000017","Doncaster","RYJ",1
"E08000018","Rotherham","RFR",22612
"E08000018","Rotherham","RHQ",3197
"E08000018","Rotherham","RP5",1741
"E08000018","Rotherham","RFF",703
"E08000018","Rotherham","RXE",474
"E08000018","Rotherham","RCU",408
"E08000018","Rotherham","RWD",56
"E08000018","Rotherham","RCB",45
"E08000018","Rotherham","RFS",41
"E08000018","Rotherham","RR8",40
"E08000018","Rotherham","RX1",23
"E08000018","Rotherham","RXF",23
"E08000018","Rotherham","RJL",23
"E08000018","Rotherham","R0A",18
"E08000018","Rotherham","RK5",15
"E08000018","Rotherham","RWA",13
"E08000018","Rotherham","RTG",14
"E08000018","Rotherham","RBV",10
"E08000018","Rotherham","RAE",10
"E08000018","Rotherham","RA9",8
"E08000018","Rotherham","RM1",7
"E08000018","Rotherham","RK9",7
"E08000018","Rotherham","RM3",6
"E08000018","Rotherham","REF",6
"E08000018","Rotherham","RRK",11
"E08000018","Rotherham","RTD",6
"E08000018","Rotherham","R1H",5
"E08000018","Rotherham","RMC",5
"E08000018","Rotherham","RWE",4
"E08000018","Rotherham","RNQ",4
"E08000018","Rotherham","RTH",4
"E08000018","Rotherham","RXW",6
"E08000018","Rotherham","RGP",4
"E08000018","Rotherham","RTX",4
"E08000018","Rotherham","RTF",4
"E08000018","Rotherham","RXL",4
"E08000018","Rotherham","RHM",3
"E08000018","Rotherham","RCX",3
"E08000018","Rotherham","RDE",3
"E08000018","Rotherham","RJ2",3
"E08000018","Rotherham","RX3",3
"E08000018","Rotherham","RTR",3
"E08000018","Rotherham","RXG",3
"E08000018","Rotherham","RJE",3
"E08000018","Rotherham","RNL",3
"E08000018","Rotherham","RRV",3
"E08000018","Rotherham","RWY",3
"E08000018","Rotherham","RD3",3
"E08000018","Rotherham","RGN",3
"E08000018","Rotherham","RH8",3
"E08000018","Rotherham","RRF",3
"E08000018","Rotherham","RVJ",3
"E08000018","Rotherham","RW6",3
"E08000018","Rotherham","RXN",3
"E08000018","Rotherham","RGT",3
"E08000018","Rotherham","RMP",3
"E08000018","Rotherham","RWF",3
"E08000018","Rotherham","RNA",2
"E08000018","Rotherham","RWW",2
"E08000018","Rotherham","RYJ",2
"E08000018","Rotherham","RYR",2
"E08000018","Rotherham","R1K",2
"E08000018","Rotherham","RXP",2
"E08000018","Rotherham","R1F",2
"E08000018","Rotherham","RAX",2
"E08000018","Rotherham","RBD",2
"E08000018","Rotherham","RHU",2
"E08000018","Rotherham","RN5",2
"E08000018","Rotherham","RXR",3
"E08000018","Rotherham","RA2",2
"E08000018","Rotherham","RAS",2
"E08000018","Rotherham","RDD",2
"E08000018","Rotherham","RJ1",2
"E08000018","Rotherham","RVV",2
"E08000018","Rotherham","RHA",2
"E08000018","Rotherham","NTX",2
"E08000018","Rotherham","RBT",2
"E08000018","Rotherham","RJR",2
"E08000018","Rotherham","RXK",3
"E08000018","Rotherham","RXQ",2
"E08000018","Rotherham","RA7",2
"E08000018","Rotherham","RC9",2
"E08000018","Rotherham","RCD",2
"E08000018","Rotherham","RVY",2
"E08000018","Rotherham","RBL",1
"E08000018","Rotherham","RD1",1
"E08000018","Rotherham","RHW",1
"E08000018","Rotherham","RQM",1
"E08000018","Rotherham","RVR",1
"E08000018","Rotherham","RWG",1
"E08000018","Rotherham","RH5",1
"E08000018","Rotherham","RL1",1
"E08000018","Rotherham","RYG",1
"E08000018","Rotherham","RDU",1
"E08000018","Rotherham","R0B",1
"E08000018","Rotherham","RJZ",1
"E08000018","Rotherham","RKB",1
"E08000018","Rotherham","RNS",1
"E08000018","Rotherham","REM",1
"E08000018","Rotherham","RXH",1
"E08000018","Rotherham","R1D",1
"E08000018","Rotherham","RBK",1
"E08000018","Rotherham","RC1",1
"E08000018","Rotherham","RCF",1
"E08000018","Rotherham","RL4",1
"E08000018","Rotherham","RBN",1
"E08000018","Rotherham","RBQ",1
"E08000018","Rotherham","RJ7",1
"E08000018","Rotherham","RN3",1
"E08000018","Rotherham","RNZ",1
"E08000018","Rotherham","RGD",1
"E08000018","Rotherham","RVW",1
"E08000018","Rotherham","RDZ",1
"E08000018","Rotherham","RJ6",1
"E08000018","Rotherham","RJC",1
"E08000018","Rotherham","RTE",1
"E08000018","Rotherham","RTP",1
"E08000018","Rotherham","RWJ",1
"E08000018","Rotherham","TAD",1
"E08000019","Sheffield","RHQ",54384
"E08000019","Sheffield","RCU",3523
"E08000019","Sheffield","RFR",868
"E08000019","Sheffield","RFS",697
"E08000019","Sheffield","RFF",239
"E08000019","Sheffield","RR8",87
"E08000019","Sheffield","RWD",86
"E08000019","Sheffield","RCB",70
"E08000019","Sheffield","R0A",53
"E08000019","Sheffield","RP5",83
"E08000019","Sheffield","RXE",41
"E08000019","Sheffield","RX1",37
"E08000019","Sheffield","RJL",34
"E08000019","Sheffield","RXF",29
"E08000019","Sheffield","RTG",32
"E08000019","Sheffield","RJE",24
"E08000019","Sheffield","REF",22
"E08000019","Sheffield","RK5",21
"E08000019","Sheffield","RTH",20
"E08000019","Sheffield","R1H",18
"E08000019","Sheffield","RRK",25
"E08000019","Sheffield","REM",22
"E08000019","Sheffield","RWE",17
"E08000019","Sheffield","RAE",16
"E08000019","Sheffield","RWA",15
"E08000019","Sheffield","RWY",14
"E08000019","Sheffield","RKB",13
"E08000019","Sheffield","RWJ",12
"E08000019","Sheffield","RGT",12
"E08000019","Sheffield","RJ1",11
"E08000019","Sheffield","RA9",11
"E08000019","Sheffield","RBT",11
"E08000019","Sheffield","RRV",13
"E08000019","Sheffield","RBV",10
"E08000019","Sheffield","RM3",10
"E08000019","Sheffield","RQM",10
"E08000019","Sheffield","RTX",9
"E08000019","Sheffield","RJZ",9
"E08000019","Sheffield","RXH",8
"E08000019","Sheffield","RCF",8
"E08000019","Sheffield","RAL",8
"E08000019","Sheffield","RDU",8
"E08000019","Sheffield","RM1",8
"E08000019","Sheffield","RW6",8
"E08000019","Sheffield","RJC",8
"E08000019","Sheffield","RXL",8
"E08000019","Sheffield","R1K",7
"E08000019","Sheffield","RTR",8
"E08000019","Sheffield","RYJ",7
"E08000019","Sheffield","RBA",7
"E08000019","Sheffield","RCX",7
"E08000019","Sheffield","RNL",6
"E08000019","Sheffield","RNS",6
"E08000019","Sheffield","RTD",6
"E08000019","Sheffield","RXP",6
"E08000019","Sheffield","RK9",6
"E08000019","Sheffield","RD8",6
"E08000019","Sheffield","RH8",6
"E08000019","Sheffield","RC1",5
"E08000019","Sheffield","RJ7",5
"E08000019","Sheffield","RA7",5
"E08000019","Sheffield","RAX",5
"E08000019","Sheffield","RDZ",5
"E08000019","Sheffield","RXG",5
"E08000019","Sheffield","RPA",5
"E08000019","Sheffield","RD3",4
"E08000019","Sheffield","RJ2",5
"E08000019","Sheffield","RXK",8
"E08000019","Sheffield","RBN",4
"E08000019","Sheffield","RTF",4
"E08000019","Sheffield","RXM",4
"E08000019","Sheffield","RVW",4
"E08000019","Sheffield","RWW",4
"E08000019","Sheffield","RDE",4
"E08000019","Sheffield","RGN",4
"E08000019","Sheffield","RJN",4
"E08000019","Sheffield","RWF",4
"E08000019","Sheffield","RNQ",4
"E08000019","Sheffield","RQ3",4
"E08000019","Sheffield","RBD",4
"E08000019","Sheffield","RBZ",4
"E08000019","Sheffield","RHM",4
"E08000019","Sheffield","RMP",4
"E08000019","Sheffield","RGP",3
"E08000019","Sheffield","RVV",3
"E08000019","Sheffield","RAS",3
"E08000019","Sheffield","RHW",3
"E08000019","Sheffield","RTE",3
"E08000019","Sheffield","RVJ",3
"E08000019","Sheffield","RXQ",3
"E08000019","Sheffield","RBS",3
"E08000019","Sheffield","RBL",3
"E08000019","Sheffield","RNZ",3
"E08000019","Sheffield","RWG",3
"E08000019","Sheffield","RWP",3
"E08000019","Sheffield","RCD",2
"E08000019","Sheffield","RWH",2
"E08000019","Sheffield","RYV",2
"E08000019","Sheffield","RD1",2
"E08000019","Sheffield","RHA",2
"E08000019","Sheffield","RWK",2
"E08000019","Sheffield","RAJ",2
"E08000019","Sheffield","RAP",2
"E08000019","Sheffield","RBK",2
"E08000019","Sheffield","RJ6",2
"E08000019","Sheffield","RRF",2
"E08000019","Sheffield","RVY",3
"E08000019","Sheffield","RXW",2
"E08000019","Sheffield","RQX",2
"E08000019","Sheffield","RXC",2
"E08000019","Sheffield","RRJ",2
"E08000019","Sheffield","RA3",2
"E08000019","Sheffield","RL4",2
"E08000019","Sheffield","RMC",2
"E08000019","Sheffield","RPC",2
"E08000019","Sheffield","RQ8",2
"E08000019","Sheffield","RTP",2
"E08000019","Sheffield","RJR",2
"E08000019","Sheffield","RT5",2
"E08000019","Sheffield","RA4",1
"E08000019","Sheffield","RBQ",1
"E08000019","Sheffield","R0B",2
"E08000019","Sheffield","RN7",1
"E08000019","Sheffield","RNA",1
"E08000019","Sheffield","RV9",1
"E08000019","Sheffield","RY8",1
"E08000019","Sheffield","R1A",1
"E08000019","Sheffield","RN3",1
"E08000019","Sheffield","RP7",1
"E08000019","Sheffield","RXT",1
"E08000019","Sheffield","RVR",1
"E08000019","Sheffield","RTV",1
"E08000019","Sheffield","RYR",1
"E08000019","Sheffield","RC9",1
"E08000019","Sheffield","RHU",1
"E08000019","Sheffield","RLT",1
"E08000019","Sheffield","RP4",1
"E08000019","Sheffield","RRE",1
"E08000019","Sheffield","RTK",1
"E08000019","Sheffield","RX3",1
"E08000019","Sheffield","RXR",1
"E08000019","Sheffield","RKE",1
"E08000019","Sheffield","RV5",1
"E08000019","Sheffield","TAD",1
"E08000021","Newcastle upon Tyne","RTD",31266
"E08000021","Newcastle upon Tyne","RTF",736
"E08000021","Newcastle upon Tyne","RX4",389
"E08000021","Newcastle upon Tyne","RR7",186
"E08000021","Newcastle upon Tyne","RXP",63
"E08000021","Newcastle upon Tyne","R0B",106
"E08000021","Newcastle upon Tyne","RTR",31
"E08000021","Newcastle upon Tyne","RNL",22
"E08000021","Newcastle upon Tyne","RVW",22
"E08000021","Newcastle upon Tyne","RCB",19
"E08000021","Newcastle upon Tyne","R0A",19
"E08000021","Newcastle upon Tyne","RR8",18
"E08000021","Newcastle upon Tyne","RTX",12
"E08000021","Newcastle upon Tyne","RTH",10
"E08000021","Newcastle upon Tyne","RHQ",9
"E08000021","Newcastle upon Tyne","RQM",8
"E08000021","Newcastle upon Tyne","RJZ",8
"E08000021","Newcastle upon Tyne","RWD",8
"E08000021","Newcastle upon Tyne","RGN",7
"E08000021","Newcastle upon Tyne","RWY",7
"E08000021","Newcastle upon Tyne","RKB",6
"E08000021","Newcastle upon Tyne","RXF",6
"E08000021","Newcastle upon Tyne","RWA",6
"E08000021","Newcastle upon Tyne","RXL",6
"E08000021","Newcastle upon Tyne","RAE",6
"E08000021","Newcastle upon Tyne","RRV",5
"E08000021","Newcastle upon Tyne","RA2",5
"E08000021","Newcastle upon Tyne","RJL",5
"E08000021","Newcastle upon Tyne","RF4",5
"E08000021","Newcastle upon Tyne","RRK",6
"E08000021","Newcastle upon Tyne","RK5",4
"E08000021","Newcastle upon Tyne","RVY",4
"E08000021","Newcastle upon Tyne","RCD",4
"E08000021","Newcastle upon Tyne","RHU",4
"E08000021","Newcastle upon Tyne","RTG",4
"E08000021","Newcastle upon Tyne","RN5",4
"E08000021","Newcastle upon Tyne","RAX",4
"E08000021","Newcastle upon Tyne","R1K",4
"E08000021","Newcastle upon Tyne","RBL",4
"E08000021","Newcastle upon Tyne","RHW",4
"E08000021","Newcastle upon Tyne","RTP",3
"E08000021","Newcastle upon Tyne","RX3",3
"E08000021","Newcastle upon Tyne","RXH",3
"E08000021","Newcastle upon Tyne","RBT",3
"E08000021","Newcastle upon Tyne","REF",3
"E08000021","Newcastle upon Tyne","RJ2",5
"E08000021","Newcastle upon Tyne","RW6",3
"E08000021","Newcastle upon Tyne","RWG",3
"E08000021","Newcastle upon Tyne","RXN",3
"E08000021","Newcastle upon Tyne","RXQ",3
"E08000021","Newcastle upon Tyne","RFF",3
"E08000021","Newcastle upon Tyne","RP5",6
"E08000021","Newcastle upon Tyne","REM",3
"E08000021","Newcastle upon Tyne","RAL",3
"E08000021","Newcastle upon Tyne","RHM",3
"E08000021","Newcastle upon Tyne","RWE",3
"E08000021","Newcastle upon Tyne","RBN",3
"E08000021","Newcastle upon Tyne","RQ3",3
"E08000021","Newcastle upon Tyne","RVR",3
"E08000021","Newcastle upon Tyne","RJE",3
"E08000021","Newcastle upon Tyne","RMP",3
"E08000021","Newcastle upon Tyne","RC9",3
"E08000021","Newcastle upon Tyne","RM1",3
"E08000021","Newcastle upon Tyne","RNZ",3
"E08000021","Newcastle upon Tyne","RQ8",3
"E08000021","Newcastle upon Tyne","RTE",3
"E08000021","Newcastle upon Tyne","RA4",2
"E08000021","Newcastle upon Tyne","RDE",2
"E08000021","Newcastle upon Tyne","RFR",2
"E08000021","Newcastle upon Tyne","RXK",4
"E08000021","Newcastle upon Tyne","RBA",2
"E08000021","Newcastle upon Tyne","RH8",2
"E08000021","Newcastle upon Tyne","RJ7",2
"E08000021","Newcastle upon Tyne","RQW",2
"E08000021","Newcastle upon Tyne","RVV",2
"E08000021","Newcastle upon Tyne","RYJ",2
"E08000021","Newcastle upon Tyne","RGT",2
"E08000021","Newcastle upon Tyne","RA9",2
"E08000021","Newcastle upon Tyne","RN7",2
"E08000021","Newcastle upon Tyne","RA7",2
"E08000021","Newcastle upon Tyne","RK9",2
"E08000021","Newcastle upon Tyne","RWJ",2
"E08000021","Newcastle upon Tyne","RDU",2
"E08000021","Newcastle upon Tyne","RL4",2
"E08000021","Newcastle upon Tyne","RNS",2
"E08000021","Newcastle upon Tyne","R1H",2
"E08000021","Newcastle upon Tyne","RD8",2
"E08000021","Newcastle upon Tyne","RJC",2
"E08000021","Newcastle upon Tyne","RWW",2
"E08000021","Newcastle upon Tyne","RXW",4
"E08000021","Newcastle upon Tyne","RBK",1
"E08000021","Newcastle upon Tyne","RBQ",1
"E08000021","Newcastle upon Tyne","RLT",1
"E08000021","Newcastle upon Tyne","RMC",1
"E08000021","Newcastle upon Tyne","RBZ",1
"E08000021","Newcastle upon Tyne","RD3",1
"E08000021","Newcastle upon Tyne","RGR",1
"E08000021","Newcastle upon Tyne","RYR",1
"E08000021","Newcastle upon Tyne","RD1",1
"E08000021","Newcastle upon Tyne","RDD",1
"E08000021","Newcastle upon Tyne","RM3",1
"E08000021","Newcastle upon Tyne","RBD",1
"E08000021","Newcastle upon Tyne","RBS",1
"E08000021","Newcastle upon Tyne","RLQ",1
"E08000021","Newcastle upon Tyne","RP4",1
"E08000021","Newcastle upon Tyne","RWK",1
"E08000021","Newcastle upon Tyne","RC1",1
"E08000021","Newcastle upon Tyne","RCX",1
"E08000021","Newcastle upon Tyne","RPA",1
"E08000021","Newcastle upon Tyne","RRF",1
"E08000021","Newcastle upon Tyne","RWH",1
"E08000021","Newcastle upon Tyne","RWP",1
"E08000021","Newcastle upon Tyne","RFS",1
"E08000021","Newcastle upon Tyne","RGP",1
"E08000021","Newcastle upon Tyne","RJ6",1
"E08000021","Newcastle upon Tyne","RJR",1
"E08000021","Newcastle upon Tyne","RQX",1
"E08000021","Newcastle upon Tyne","RW5",1
"E08000021","Newcastle upon Tyne","RCF",1
"E08000021","Newcastle upon Tyne","RJ1",1
"E08000021","Newcastle upon Tyne","RAP",1
"E08000021","Newcastle upon Tyne","RJN",1
"E08000021","Newcastle upon Tyne","RKE",1
"E08000021","Newcastle upon Tyne","RT3",1
"E08000021","Newcastle upon Tyne","RWF",1
"E08000021","Newcastle upon Tyne","RXC",1
"E08000022","North Tyneside","RTF",22230
"E08000022","North Tyneside","RTD",6229
"E08000022","North Tyneside","RX4",208
"E08000022","North Tyneside","RR7",57
"E08000022","North Tyneside","R0B",83
"E08000022","North Tyneside","RXP",29
"E08000022","North Tyneside","RTR",29
"E08000022","North Tyneside","RNL",19
"E08000022","North Tyneside","RCB",18
"E08000022","North Tyneside","RR8",10
"E08000022","North Tyneside","R0A",8
"E08000022","North Tyneside","RTX",8
"E08000022","North Tyneside","RXL",6
"E08000022","North Tyneside","RJ1",5
"E08000022","North Tyneside","RDU",5
"E08000022","North Tyneside","RVW",5
"E08000022","North Tyneside","RQM",5
"E08000022","North Tyneside","RRV",5
"E08000022","North Tyneside","RK5",3
"E08000022","North Tyneside","REM",3
"E08000022","North Tyneside","RXF",3
"E08000022","North Tyneside","RWA",3
"E08000022","North Tyneside","RJE",3
"E08000022","North Tyneside","RWG",3
"E08000022","North Tyneside","R1H",3
"E08000022","North Tyneside","RCD",3
"E08000022","North Tyneside","RWY",3
"E08000022","North Tyneside","RH8",3
"E08000022","North Tyneside","RJ7",3
"E08000022","North Tyneside","RYR",3
"E08000022","North Tyneside","RFF",2
"E08000022","North Tyneside","RK9",2
"E08000022","North Tyneside","RN3",2
"E08000022","North Tyneside","RAE",2
"E08000022","North Tyneside","RCF",2
"E08000022","North Tyneside","RFS",2
"E08000022","North Tyneside","RHM",2
"E08000022","North Tyneside","RTG",2
"E08000022","North Tyneside","RHQ",2
"E08000022","North Tyneside","RX1",2
"E08000022","North Tyneside","RGR",2
"E08000022","North Tyneside","RNZ",2
"E08000022","North Tyneside","RW6",2
"E08000022","North Tyneside","RWF",2
"E08000022","North Tyneside","RAS",2
"E08000022","North Tyneside","RWE",2
"E08000022","North Tyneside","R1K",2
"E08000022","North Tyneside","REF",2
"E08000022","North Tyneside","RTE",2
"E08000022","North Tyneside","RDE",1
"E08000022","North Tyneside","RHW",1
"E08000022","North Tyneside","RJL",1
"E08000022","North Tyneside","RM3",1
"E08000022","North Tyneside","RQW",1
"E08000022","North Tyneside","RVV",1
"E08000022","North Tyneside","RVY",1
"E08000022","North Tyneside","RA9",1
"E08000022","North Tyneside","RJN",1
"E08000022","North Tyneside","RP6",1
"E08000022","North Tyneside","RVR",1
"E08000022","North Tyneside","RXK",2
"E08000022","North Tyneside","RGP",1
"E08000022","North Tyneside","RGT",1
"E08000022","North Tyneside","RKB",1
"E08000022","North Tyneside","RP5",1
"E08000022","North Tyneside","RA7",1
"E08000022","North Tyneside","RJ2",1
"E08000022","North Tyneside","RJR",1
"E08000022","North Tyneside","RA2",1
"E08000022","North Tyneside","RA4",1
"E08000022","North Tyneside","RAJ",1
"E08000022","North Tyneside","RJC",1
"E08000022","North Tyneside","RMC",1
"E08000022","North Tyneside","RQ3",1
"E08000022","North Tyneside","RRK",1
"E08000022","North Tyneside","RD8",1
"E08000022","North Tyneside","RTH",1
"E08000022","North Tyneside","RVJ",1
"E08000022","North Tyneside","RX3",1
"E08000022","North Tyneside","RXE",1
"E08000022","North Tyneside","RYJ",1
"E08000022","North Tyneside","RAX",1
"E08000022","North Tyneside","RJZ",1
"E08000022","North Tyneside","RL4",1
"E08000022","North Tyneside","RN7",1
"E08000022","North Tyneside","RNQ",1
"E08000022","North Tyneside","RWJ",1
"E08000022","North Tyneside","RXH",1
"E08000022","North Tyneside","RA3",1
"E08000022","North Tyneside","RBL",1
"E08000022","North Tyneside","RLQ",1
"E08000022","North Tyneside","RWD",1
"E08000022","North Tyneside","RXR",1
"E08000023","South Tyneside","R0B",20392
"E08000023","South Tyneside","RTD",1189
"E08000023","South Tyneside","RR7",400
"E08000023","South Tyneside","RX4",225
"E08000023","South Tyneside","RXP",102
"E08000023","South Tyneside","RTF",90
"E08000023","South Tyneside","RTR",13
"E08000023","South Tyneside","RVW",10
"E08000023","South Tyneside","RNL",7
"E08000023","South Tyneside","RTX",6
"E08000023","South Tyneside","RM3",5
"E08000023","South Tyneside","RCB",5
"E08000023","South Tyneside","RRV",5
"E08000023","South Tyneside","R0A",5
"E08000023","South Tyneside","RWF",4
"E08000023","South Tyneside","RR8",4
"E08000023","South Tyneside","RDE",4
"E08000023","South Tyneside","RDU",3
"E08000023","South Tyneside","RRK",4
"E08000023","South Tyneside","RWA",3
"E08000023","South Tyneside","RVJ",3
"E08000023","South Tyneside","RHM",3
"E08000023","South Tyneside","RQM",3
"E08000023","South Tyneside","R1H",3
"E08000023","South Tyneside","RWD",3
"E08000023","South Tyneside","RVV",3
"E08000023","South Tyneside","RX3",2
"E08000023","South Tyneside","RXF",2
"E08000023","South Tyneside","REF",2
"E08000023","South Tyneside","RXN",2
"E08000023","South Tyneside","RJL",2
"E08000023","South Tyneside","RWE",2
"E08000023","South Tyneside","RM1",2
"E08000023","South Tyneside","RFS",2
"E08000023","South Tyneside","RNS",2
"E08000023","South Tyneside","REM",2
"E08000023","South Tyneside","R1K",2
"E08000023","South Tyneside","RTG",2
"E08000023","South Tyneside","RAJ",1
"E08000023","South Tyneside","RBT",1
"E08000023","South Tyneside","RC1",1
"E08000023","South Tyneside","RLQ",1
"E08000023","South Tyneside","RP5",1
"E08000023","South Tyneside","RPA",1
"E08000023","South Tyneside","RYR",1
"E08000023","South Tyneside","RCX",1
"E08000023","South Tyneside","RD1",1
"E08000023","South Tyneside","RRF",1
"E08000023","South Tyneside","RW5",1
"E08000023","South Tyneside","RJC",1
"E08000023","South Tyneside","RJN",1
"E08000023","South Tyneside","RAP",1
"E08000023","South Tyneside","RGP",1
"E08000023","South Tyneside","RJ1",1
"E08000023","South Tyneside","RN5",1
"E08000023","South Tyneside","RTP",1
"E08000023","South Tyneside","RXH",1
"E08000023","South Tyneside","RYJ",1
"E08000023","South Tyneside","RCF",1
"E08000023","South Tyneside","RJR",1
"E08000023","South Tyneside","RNA",1
"E08000023","South Tyneside","RTE",1
"E08000023","South Tyneside","RCD",1
"E08000023","South Tyneside","RH8",1
"E08000023","South Tyneside","RHW",1
"E08000023","South Tyneside","RK9",1
"E08000023","South Tyneside","RL4",1
"E08000023","South Tyneside","RW6",1
"E08000023","South Tyneside","RXL",1
"E08000023","South Tyneside","RA4",1
"E08000023","South Tyneside","RAL",1
"E08000023","South Tyneside","RBL",1
"E08000023","South Tyneside","RBN",1
"E08000023","South Tyneside","RD8",1
"E08000023","South Tyneside","RK5",1
"E08000023","South Tyneside","RTH",1
"E08000023","South Tyneside","RGN",1
"E08000023","South Tyneside","RGT",1
"E08000023","South Tyneside","RJE",1
"E08000023","South Tyneside","RLT",1
"E08000023","South Tyneside","RQ3",1
"E08000023","South Tyneside","RQX",1
"E08000023","South Tyneside","RVY",1
"E08000023","South Tyneside","RWG",1
"E08000024","Sunderland","R0B",28918
"E08000024","Sunderland","RR7",3021
"E08000024","Sunderland","RTD",1207
"E08000024","Sunderland","RXP",653
"E08000024","Sunderland","RX4",367
"E08000024","Sunderland","RTR",90
"E08000024","Sunderland","RTF",81
"E08000024","Sunderland","RVW",53
"E08000024","Sunderland","RCB",26
"E08000024","Sunderland","RX3",24
"E08000024","Sunderland","RNL",21
"E08000024","Sunderland","RR8",12
"E08000024","Sunderland","RXL",10
"E08000024","Sunderland","RCD",9
"E08000024","Sunderland","RRV",8
"E08000024","Sunderland","RTX",6
"E08000024","Sunderland","R0A",5
"E08000024","Sunderland","RVJ",5
"E08000024","Sunderland","RW6",5
"E08000024","Sunderland","RGT",5
"E08000024","Sunderland","R1H",5
"E08000024","Sunderland","REF",5
"E08000024","Sunderland","RJZ",4
"E08000024","Sunderland","RN3",4
"E08000024","Sunderland","RWD",4
"E08000024","Sunderland","RWE",4
"E08000024","Sunderland","RM1",3
"E08000024","Sunderland","RC1",3
"E08000024","Sunderland","RCF",3
"E08000024","Sunderland","RAE",3
"E08000024","Sunderland","RKB",3
"E08000024","Sunderland","REM",5
"E08000024","Sunderland","RYR",3
"E08000024","Sunderland","RP5",3
"E08000024","Sunderland","RQM",3
"E08000024","Sunderland","RRF",3
"E08000024","Sunderland","RWF",3
"E08000024","Sunderland","RCX",2
"E08000024","Sunderland","RJ1",2
"E08000024","Sunderland","RTE",2
"E08000024","Sunderland","RX1",2
"E08000024","Sunderland","RXQ",2
"E08000024","Sunderland","RBA",2
"E08000024","Sunderland","RJE",2
"E08000024","Sunderland","RL4",2
"E08000024","Sunderland","RMP",2
"E08000024","Sunderland","RNQ",2
"E08000024","Sunderland","RN5",2
"E08000024","Sunderland","R1K",2
"E08000024","Sunderland","RC9",2
"E08000024","Sunderland","RDU",2
"E08000024","Sunderland","RRK",2
"E08000024","Sunderland","RXH",2
"E08000024","Sunderland","RWJ",2
"E08000024","Sunderland","RD8",2
"E08000024","Sunderland","RFR",2
"E08000024","Sunderland","RHQ",2
"E08000024","Sunderland","RVR",2
"E08000024","Sunderland","RK9",2
"E08000024","Sunderland","RTH",2
"E08000024","Sunderland","RYJ",2
"E08000024","Sunderland","RH8",1
"E08000024","Sunderland","RJ2",1
"E08000024","Sunderland","RXW",2
"E08000024","Sunderland","RBL",1
"E08000024","Sunderland","RGN",1
"E08000024","Sunderland","RJ7",1
"E08000024","Sunderland","RAX",1
"E08000024","Sunderland","RBS",1
"E08000024","Sunderland","RKE",1
"E08000024","Sunderland","RMC",1
"E08000024","Sunderland","RNA",1
"E08000024","Sunderland","RXF",1
"E08000024","Sunderland","RQ3",1
"E08000024","Sunderland","RVY",1
"E08000024","Sunderland","RXN",1
"E08000024","Sunderland","RDE",1
"E08000024","Sunderland","RVV",1
"E08000024","Sunderland","RWG",1
"E08000024","Sunderland","RA4",1
"E08000024","Sunderland","RA9",1
"E08000024","Sunderland","RAS",1
"E08000024","Sunderland","RWH",1
"E08000024","Sunderland","RA2",1
"E08000024","Sunderland","RCU",1
"E08000024","Sunderland","RHU",1
"E08000024","Sunderland","RQX",1
"E08000024","Sunderland","RWW",1
"E08000024","Sunderland","RAP",1
"E08000024","Sunderland","RBN",1
"E08000024","Sunderland","RD1",1
"E08000024","Sunderland","RTK",1
"E08000025","Birmingham","RRK",124740
"E08000025","Birmingham","RXK",18823
"E08000025","Birmingham","RQ3",12086
"E08000025","Birmingham","RXT",1525
"E08000025","Birmingham","RYW",433
"E08000025","Birmingham","RWP",321
"E08000025","Birmingham","RBK",316
"E08000025","Birmingham","RNA",192
"E08000025","Birmingham","RKB",186
"E08000025","Birmingham","RL4",157
"E08000025","Birmingham","RRJ",95
"E08000025","Birmingham","RWE",93
"E08000025","Birmingham","RJE",84
"E08000025","Birmingham","RJC",80
"E08000025","Birmingham","RYJ",62
"E08000025","Birmingham","RTH",61
"E08000025","Birmingham","R0A",59
"E08000025","Birmingham","TAJ",53
"E08000025","Birmingham","R1H",45
"E08000025","Birmingham","R1K",42
"E08000025","Birmingham","RX1",42
"E08000025","Birmingham","RTE",40
"E08000025","Birmingham","RA9",37
"E08000025","Birmingham","RTG",69
"E08000025","Birmingham","RDU",36
"E08000025","Birmingham","RJ1",35
"E08000025","Birmingham","RQM",34
"E08000025","Birmingham","REF",30
"E08000025","Birmingham","RA7",30
"E08000025","Birmingham","RBA",29
"E08000025","Birmingham","RA3",28
"E08000025","Birmingham","RRV",27
"E08000025","Birmingham","RNS",26
"E08000025","Birmingham","RAE",26
"E08000025","Birmingham","RVJ",25
"E08000025","Birmingham","RLQ",24
"E08000025","Birmingham","RHQ",22
"E08000025","Birmingham","RLT",21
"E08000025","Birmingham","RXW",43
"E08000025","Birmingham","RJ7",19
"E08000025","Birmingham","RD1",18
"E08000025","Birmingham","RW6",18
"E08000025","Birmingham","RXL",18
"E08000025","Birmingham","RCB",17
"E08000025","Birmingham","RHW",17
"E08000025","Birmingham","RAL",17
"E08000025","Birmingham","RD8",16
"E08000025","Birmingham","RH8",16
"E08000025","Birmingham","RXR",20
"E08000025","Birmingham","REM",18
"E08000025","Birmingham","RK9",15
"E08000025","Birmingham","RM3",14
"E08000025","Birmingham","RN3",14
"E08000025","Birmingham","RXQ",14
"E08000025","Birmingham","RBT",13
"E08000025","Birmingham","RWD",13
"E08000025","Birmingham","RJZ",13
"E08000025","Birmingham","R1A",13
"E08000025","Birmingham","RGT",13
"E08000025","Birmingham","RF4",12
"E08000025","Birmingham","RC9",12
"E08000025","Birmingham","RDZ",12
"E08000025","Birmingham","RHU",12
"E08000025","Birmingham","RNQ",12
"E08000025","Birmingham","RQX",12
"E08000025","Birmingham","RTD",12
"E08000025","Birmingham","RWG",12
"E08000025","Birmingham","RBD",11
"E08000025","Birmingham","RR8",11
"E08000025","Birmingham","RXH",11
"E08000025","Birmingham","RYR",11
"E08000025","Birmingham","RBZ",11
"E08000025","Birmingham","RJ2",19
"E08000025","Birmingham","RK5",10
"E08000025","Birmingham","RC1",10
"E08000025","Birmingham","RAS",10
"E08000025","Birmingham","RGN",10
"E08000025","Birmingham","RAX",10
"E08000025","Birmingham","RDE",10
"E08000025","Birmingham","RYG",10
"E08000025","Birmingham","RBN",10
"E08000025","Birmingham","RWY",9
"E08000025","Birmingham","RWF",9
"E08000025","Birmingham","RHM",9
"E08000025","Birmingham","RAP",9
"E08000025","Birmingham","RTX",9
"E08000025","Birmingham","RVR",9
"E08000025","Birmingham","RBL",9
"E08000025","Birmingham","RWA",8
"E08000025","Birmingham","RA2",8
"E08000025","Birmingham","RXF",8
"E08000025","Birmingham","RTP",8
"E08000025","Birmingham","RWH",8
"E08000025","Birmingham","RNL",7
"E08000025","Birmingham","RD3",7
"E08000025","Birmingham","RXC",7
"E08000025","Birmingham","RAJ",7
"E08000025","Birmingham","RM1",7
"E08000025","Birmingham","RNZ",7
"E08000025","Birmingham","RWK",7
"E08000025","Birmingham","RGP",7
"E08000025","Birmingham","RVV",7
"E08000025","Birmingham","RFR",8
"E08000025","Birmingham","RWW",7
"E08000025","Birmingham","R1F",6
"E08000025","Birmingham","RFS",6
"E08000025","Birmingham","RVY",8
"E08000025","Birmingham","RXP",6
"E08000025","Birmingham","RJL",6
"E08000025","Birmingham","RJ6",6
"E08000025","Birmingham","RMC",5
"E08000025","Birmingham","RRF",5
"E08000025","Birmingham","RCX",5
"E08000025","Birmingham","RJR",5
"E08000025","Birmingham","RGR",5
"E08000025","Birmingham","RPY",5
"E08000025","Birmingham","RQ8",5
"E08000025","Birmingham","RA4",5
"E08000025","Birmingham","RRE",5
"E08000025","Birmingham","RTK",5
"E08000025","Birmingham","R0B",5
"E08000025","Birmingham","RN7",4
"E08000025","Birmingham","RWJ",4
"E08000025","Birmingham","RCU",4
"E08000025","Birmingham","RP4",3
"E08000025","Birmingham","RCF",3
"E08000025","Birmingham","RPA",3
"E08000025","Birmingham","RXN",3
"E08000025","Birmingham","RT5",3
"E08000025","Birmingham","RBS",3
"E08000025","Birmingham","RDD",3
"E08000025","Birmingham","RJN",2
"E08000025","Birmingham","RMY",2
"E08000025","Birmingham","RT3",2
"E08000025","Birmingham","RFF",2
"E08000025","Birmingham","RQW",2
"E08000025","Birmingham","RET",2
"E08000025","Birmingham","RLY",2
"E08000025","Birmingham","RVW",2
"E08000025","Birmingham","RNU",2
"E08000025","Birmingham","RN5",2
"E08000025","Birmingham","RTR",3
"E08000025","Birmingham","RCD",2
"E08000025","Birmingham","RP5",3
"E08000025","Birmingham","RTQ",2
"E08000025","Birmingham","RBQ",1
"E08000025","Birmingham","RQY",1
"E08000025","Birmingham","RWR",1
"E08000025","Birmingham","RGM",1
"E08000025","Birmingham","R1L",1
"E08000025","Birmingham","RBV",1
"E08000025","Birmingham","RL1",1
"E08000025","Birmingham","RHA",1
"E08000025","Birmingham","RMP",1
"E08000025","Birmingham","RPC",1
"E08000025","Birmingham","RX4",1
"E08000025","Birmingham","RXY",1
"E08000025","Birmingham","RP6",1
"E08000025","Birmingham","RR7",1
"E08000025","Birmingham","RTF",1
"E08000025","Birmingham","RV5",1
"E08000025","Birmingham","RXM",1
"E08000026","Coventry","RKB",39492
"E08000026","Coventry","RYG",581
"E08000026","Coventry","RJC",538
"E08000026","Coventry","RLT",289
"E08000026","Coventry","RQ3",156
"E08000026","Coventry","RRK",224
"E08000026","Coventry","RTH",47
"E08000026","Coventry","RWE",46
"E08000026","Coventry","RJE",27
"E08000026","Coventry","RXK",57
"E08000026","Coventry","RWD",22
"E08000026","Coventry","RWP",20
"E08000026","Coventry","R1H",19
"E08000026","Coventry","RYJ",19
"E08000026","Coventry","RQM",18
"E08000026","Coventry","R1K",18
"E08000026","Coventry","RDU",18
"E08000026","Coventry","RNS",17
"E08000026","Coventry","REF",16
"E08000026","Coventry","RBK",13
"E08000026","Coventry","RX1",12
"E08000026","Coventry","RL4",11
"E08000026","Coventry","RHQ",11
"E08000026","Coventry","RGP",11
"E08000026","Coventry","RTE",11
"E08000026","Coventry","R0A",10
"E08000026","Coventry","RC9",10
"E08000026","Coventry","RXL",9
"E08000026","Coventry","RRV",10
"E08000026","Coventry","RVR",9
"E08000026","Coventry","RD8",8
"E08000026","Coventry","RGN",8
"E08000026","Coventry","RXT",8
"E08000026","Coventry","RCB",8
"E08000026","Coventry","RJ1",7
"E08000026","Coventry","RBA",7
"E08000026","Coventry","RBD",7
"E08000026","Coventry","RLQ",7
"E08000026","Coventry","RWF",7
"E08000026","Coventry","RTG",14
"E08000026","Coventry","RTD",7
"E08000026","Coventry","RGT",7
"E08000026","Coventry","RJ7",7
"E08000026","Coventry","RWH",6
"E08000026","Coventry","RTP",6
"E08000026","Coventry","RTK",6
"E08000026","Coventry","RC1",6
"E08000026","Coventry","RDZ",6
"E08000026","Coventry","RN5",6
"E08000026","Coventry","RAS",5
"E08000026","Coventry","RNQ",5
"E08000026","Coventry","RH8",5
"E08000026","Coventry","RK9",5
"E08000026","Coventry","RA7",5
"E08000026","Coventry","RD3",5
"E08000026","Coventry","RF4",5
"E08000026","Coventry","RJZ",5
"E08000026","Coventry","RQX",5
"E08000026","Coventry","RFS",5
"E08000026","Coventry","REM",7
"E08000026","Coventry","TAJ",5
"E08000026","Coventry","RCF",5
"E08000026","Coventry","RT3",5
"E08000026","Coventry","RWJ",5
"E08000026","Coventry","RM1",4
"E08000026","Coventry","RNA",4
"E08000026","Coventry","RNZ",4
"E08000026","Coventry","RDD",4
"E08000026","Coventry","RJ2",6
"E08000026","Coventry","RWG",4
"E08000026","Coventry","RA3",4
"E08000026","Coventry","RAJ",4
"E08000026","Coventry","RAX",4
"E08000026","Coventry","RBZ",4
"E08000026","Coventry","RAL",4
"E08000026","Coventry","RHU",4
"E08000026","Coventry","RXQ",4
"E08000026","Coventry","RVV",3
"E08000026","Coventry","RA4",3
"E08000026","Coventry","RJN",3
"E08000026","Coventry","RVJ",3
"E08000026","Coventry","RDE",3
"E08000026","Coventry","RR8",3
"E08000026","Coventry","RK5",3
"E08000026","Coventry","RWW",3
"E08000026","Coventry","RXH",3
"E08000026","Coventry","RXN",3
"E08000026","Coventry","RA9",3
"E08000026","Coventry","RAP",3
"E08000026","Coventry","RJL",3
"E08000026","Coventry","RW6",3
"E08000026","Coventry","RBT",3
"E08000026","Coventry","RWY",3
"E08000026","Coventry","RXW",5
"E08000026","Coventry","RHM",2
"E08000026","Coventry","RNL",2
"E08000026","Coventry","RP5",3
"E08000026","Coventry","RPY",2
"E08000026","Coventry","RCX",2
"E08000026","Coventry","RHW",2
"E08000026","Coventry","RLY",2
"E08000026","Coventry","R1A",2
"E08000026","Coventry","RMP",2
"E08000026","Coventry","RT5",2
"E08000026","Coventry","RAE",2
"E08000026","Coventry","RJR",2
"E08000026","Coventry","RN3",2
"E08000026","Coventry","RN7",2
"E08000026","Coventry","RQ8",2
"E08000026","Coventry","RTF",2
"E08000026","Coventry","RTR",2
"E08000026","Coventry","R1F",2
"E08000026","Coventry","RXC",2
"E08000026","Coventry","RBQ",1
"E08000026","Coventry","RM3",1
"E08000026","Coventry","RPA",1
"E08000026","Coventry","RAT",1
"E08000026","Coventry","RFF",1
"E08000026","Coventry","RP6",1
"E08000026","Coventry","RTX",1
"E08000026","Coventry","RWX",1
"E08000026","Coventry","RXF",1
"E08000026","Coventry","RXP",1
"E08000026","Coventry","RA2",1
"E08000026","Coventry","RXR",1
"E08000026","Coventry","RFR",1
"E08000026","Coventry","RBN",1
"E08000026","Coventry","R0B",1
"E08000026","Coventry","RRJ",1
"E08000026","Coventry","RWK",1
"E08000026","Coventry","RX3",1
"E08000026","Coventry","RKE",1
"E08000026","Coventry","RVY",1
"E08000026","Coventry","RWA",1
"E08000026","Coventry","RD1",1
"E08000026","Coventry","RW5",1
"E08000027","Dudley","RNA",26934
"E08000027","Dudley","RRK",1771
"E08000027","Dudley","RL4",1549
"E08000027","Dudley","RXK",650
"E08000027","Dudley","RQ3",436
"E08000027","Dudley","RWP",103
"E08000027","Dudley","RBK",68
"E08000027","Dudley","TAJ",26
"E08000027","Dudley","RKB",26
"E08000027","Dudley","RRJ",24
"E08000027","Dudley","RXW",34
"E08000027","Dudley","RJE",22
"E08000027","Dudley","REF",22
"E08000027","Dudley","RA9",16
"E08000027","Dudley","R0A",14
"E08000027","Dudley","RH8",13
"E08000027","Dudley","RLQ",12
"E08000027","Dudley","RA3",12
"E08000027","Dudley","RJC",12
"E08000027","Dudley","RBA",11
"E08000027","Dudley","RVJ",11
"E08000027","Dudley","RK9",10
"E08000027","Dudley","RXL",10
"E08000027","Dudley","RA7",10
"E08000027","Dudley","RTG",13
"E08000027","Dudley","RTH",9
"E08000027","Dudley","RWE",8
"E08000027","Dudley","R1H",8
"E08000027","Dudley","RCB",8
"E08000027","Dudley","RBZ",8
"E08000027","Dudley","RTE",7
"E08000027","Dudley","RQM",7
"E08000027","Dudley","R1K",6
"E08000027","Dudley","RDU",6
"E08000027","Dudley","RGP",6
"E08000027","Dudley","RWG",6
"E08000027","Dudley","RAS",6
"E08000027","Dudley","RHM",5
"E08000027","Dudley","RBT",5
"E08000027","Dudley","R1F",5
"E08000027","Dudley","RX1",5
"E08000027","Dudley","RXT",5
"E08000027","Dudley","RDZ",4
"E08000027","Dudley","RNS",4
"E08000027","Dudley","RD8",4
"E08000027","Dudley","RXF",4
"E08000027","Dudley","RBD",4
"E08000027","Dudley","RRV",3
"E08000027","Dudley","RTX",3
"E08000027","Dudley","RWH",3
"E08000027","Dudley","RA4",3
"E08000027","Dudley","RJ7",3
"E08000027","Dudley","RR8",3
"E08000027","Dudley","RJ1",3
"E08000027","Dudley","REM",5
"E08000027","Dudley","RTF",3
"E08000027","Dudley","RWF",3
"E08000027","Dudley","RD1",3
"E08000027","Dudley","RVV",3
"E08000027","Dudley","RWD",3
"E08000027","Dudley","RAJ",3
"E08000027","Dudley","RK5",3
"E08000027","Dudley","RN5",3
"E08000027","Dudley","RLT",2
"E08000027","Dudley","RXQ",2
"E08000027","Dudley","RHW",2
"E08000027","Dudley","RQ8",2
"E08000027","Dudley","RVY",2
"E08000027","Dudley","RBL",2
"E08000027","Dudley","RHQ",2
"E08000027","Dudley","RJ2",4
"E08000027","Dudley","RNZ",2
"E08000027","Dudley","RT3",2
"E08000027","Dudley","R1A",2
"E08000027","Dudley","RAP",2
"E08000027","Dudley","RBS",2
"E08000027","Dudley","RC9",2
"E08000027","Dudley","RTD",2
"E08000027","Dudley","RCD",2
"E08000027","Dudley","RL1",2
"E08000027","Dudley","RN3",2
"E08000027","Dudley","RD3",2
"E08000027","Dudley","RGN",2
"E08000027","Dudley","RM3",2
"E08000027","Dudley","RAL",2
"E08000027","Dudley","RGR",2
"E08000027","Dudley","RGT",2
"E08000027","Dudley","RKE",2
"E08000027","Dudley","RWA",2
"E08000027","Dudley","RXC",2
"E08000027","Dudley","RFR",1
"E08000027","Dudley","RJ8",1
"E08000027","Dudley","RWJ",1
"E08000027","Dudley","RBN",1
"E08000027","Dudley","RP5",1
"E08000027","Dudley","RQX",1
"E08000027","Dudley","RAE",1
"E08000027","Dudley","RFS",1
"E08000027","Dudley","RQW",1
"E08000027","Dudley","RVR",1
"E08000027","Dudley","RCX",1
"E08000027","Dudley","RJL",1
"E08000027","Dudley","RNL",1
"E08000027","Dudley","RV5",1
"E08000027","Dudley","RYJ",1
"E08000027","Dudley","R0B",2
"E08000027","Dudley","RPA",1
"E08000027","Dudley","RTK",1
"E08000027","Dudley","RBV",1
"E08000027","Dudley","RJ6",1
"E08000027","Dudley","RRF",1
"E08000027","Dudley","RF4",1
"E08000027","Dudley","RJR",1
"E08000027","Dudley","RNQ",1
"E08000027","Dudley","RWW",1
"E08000028","Sandwell","RXK",27176
"E08000028","Sandwell","RNA",5345
"E08000028","Sandwell","RRK",3350
"E08000028","Sandwell","RBK",1920
"E08000028","Sandwell","RQ3",1079
"E08000028","Sandwell","TAJ",625
"E08000028","Sandwell","RL4",484
"E08000028","Sandwell","RWP",52
"E08000028","Sandwell","RXT",26
"E08000028","Sandwell","RKB",21
"E08000028","Sandwell","RJE",21
"E08000028","Sandwell","R0A",20
"E08000028","Sandwell","RXW",27
"E08000028","Sandwell","RRJ",14
"E08000028","Sandwell","R1K",14
"E08000028","Sandwell","RTH",13
"E08000028","Sandwell","RWE",12
"E08000028","Sandwell","RJC",10
"E08000028","Sandwell","REF",10
"E08000028","Sandwell","RBA",10
"E08000028","Sandwell","RLQ",10
"E08000028","Sandwell","RX1",9
"E08000028","Sandwell","RTG",12
"E08000028","Sandwell","RA7",9
"E08000028","Sandwell","RQM",9
"E08000028","Sandwell","RVJ",8
"E08000028","Sandwell","RAE",8
"E08000028","Sandwell","RTE",8
"E08000028","Sandwell","RXL",8
"E08000028","Sandwell","RDU",7
"E08000028","Sandwell","RA3",7
"E08000028","Sandwell","RJ1",7
"E08000028","Sandwell","RAS",7
"E08000028","Sandwell","RC9",7
"E08000028","Sandwell","R1H",6
"E08000028","Sandwell","RLT",6
"E08000028","Sandwell","RXR",6
"E08000028","Sandwell","RYW",6
"E08000028","Sandwell","RBT",5
"E08000028","Sandwell","RQX",5
"E08000028","Sandwell","RBD",5
"E08000028","Sandwell","RW6",5
"E08000028","Sandwell","RRV",5
"E08000028","Sandwell","RHQ",5
"E08000028","Sandwell","RJ6",5
"E08000028","Sandwell","RH8",5
"E08000028","Sandwell","RHW",4
"E08000028","Sandwell","RN3",4
"E08000028","Sandwell","RYJ",4
"E08000028","Sandwell","RK9",4
"E08000028","Sandwell","RAL",4
"E08000028","Sandwell","REM",4
"E08000028","Sandwell","RA9",4
"E08000028","Sandwell","RNS",4
"E08000028","Sandwell","RXF",4
"E08000028","Sandwell","RJL",3
"E08000028","Sandwell","RCB",3
"E08000028","Sandwell","RHM",3
"E08000028","Sandwell","RXN",3
"E08000028","Sandwell","RTR",3
"E08000028","Sandwell","RVV",3
"E08000028","Sandwell","RWW",3
"E08000028","Sandwell","RJZ",3
"E08000028","Sandwell","RNQ",3
"E08000028","Sandwell","RWD",3
"E08000028","Sandwell","RBS",3
"E08000028","Sandwell","RDZ",3
"E08000028","Sandwell","RF4",3
"E08000028","Sandwell","RRE",3
"E08000028","Sandwell","RTD",3
"E08000028","Sandwell","RTK",2
"E08000028","Sandwell","RXQ",2
"E08000028","Sandwell","RYR",2
"E08000028","Sandwell","RGN",2
"E08000028","Sandwell","RR7",2
"E08000028","Sandwell","RBN",2
"E08000028","Sandwell","R0B",2
"E08000028","Sandwell","RM3",2
"E08000028","Sandwell","RR8",2
"E08000028","Sandwell","RA2",2
"E08000028","Sandwell","RNZ",2
"E08000028","Sandwell","RXP",2
"E08000028","Sandwell","RGM",2
"E08000028","Sandwell","R1F",2
"E08000028","Sandwell","RC1",2
"E08000028","Sandwell","RDE",2
"E08000028","Sandwell","RYG",2
"E08000028","Sandwell","RAP",2
"E08000028","Sandwell","RBZ",2
"E08000028","Sandwell","RJ2",3
"E08000028","Sandwell","RWA",2
"E08000028","Sandwell","RWF",1
"E08000028","Sandwell","RWH",1
"E08000028","Sandwell","RWK",1
"E08000028","Sandwell","RXH",1
"E08000028","Sandwell","RFR",1
"E08000028","Sandwell","RMP",1
"E08000028","Sandwell","RPA",1
"E08000028","Sandwell","RTQ",1
"E08000028","Sandwell","RVR",1
"E08000028","Sandwell","RCD",1
"E08000028","Sandwell","RK5",1
"E08000028","Sandwell","RWY",1
"E08000028","Sandwell","RAJ",1
"E08000028","Sandwell","RLY",1
"E08000028","Sandwell","RWG",1
"E08000028","Sandwell","RGP",1
"E08000028","Sandwell","RP5",2
"E08000028","Sandwell","R1A",1
"E08000028","Sandwell","RFS",1
"E08000028","Sandwell","RJR",1
"E08000028","Sandwell","RXY",1
"E08000028","Sandwell","RD3",1
"E08000028","Sandwell","RD8",1
"E08000028","Sandwell","RNL",1
"E08000028","Sandwell","RWJ",1
"E08000028","Sandwell","RGT",1
"E08000028","Sandwell","RMC",1
"E08000028","Sandwell","RVW",1
"E08000029","Solihull","RRK",28534
"E08000029","Solihull","RJC",726
"E08000029","Solihull","RQ3",582
"E08000029","Solihull","RKB",334
"E08000029","Solihull","RXT",205
"E08000029","Solihull","RXK",162
"E08000029","Solihull","RWP",66
"E08000029","Solihull","RLT",24
"E08000029","Solihull","RL4",16
"E08000029","Solihull","REF",14
"E08000029","Solihull","RYW",14
"E08000029","Solihull","RBK",12
"E08000029","Solihull","RTE",12
"E08000029","Solihull","RTH",12
"E08000029","Solihull","RBA",11
"E08000029","Solihull","RH8",11
"E08000029","Solihull","RJE",11
"E08000029","Solihull","RA9",10
"E08000029","Solihull","RRJ",10
"E08000029","Solihull","RA3",10
"E08000029","Solihull","RBZ",9
"E08000029","Solihull","RWE",9
"E08000029","Solihull","RD3",8
"E08000029","Solihull","R1H",8
"E08000029","Solihull","RXW",12
"E08000029","Solihull","RYG",8
"E08000029","Solihull","RNA",8
"E08000029","Solihull","RQM",7
"E08000029","Solihull","RA7",7
"E08000029","Solihull","RDU",6
"E08000029","Solihull","RBD",6
"E08000029","Solihull","RTG",12
"E08000029","Solihull","RX1",6
"E08000029","Solihull","RLQ",6
"E08000029","Solihull","RYJ",6
"E08000029","Solihull","RK9",6
"E08000029","Solihull","RWD",6
"E08000029","Solihull","RHQ",5
"E08000029","Solihull","RHW",5
"E08000029","Solihull","RJ1",5
"E08000029","Solihull","RXP",5
"E08000029","Solihull","RDZ",5
"E08000029","Solihull","RD1",5
"E08000029","Solihull","RGN",4
"E08000029","Solihull","R0A",4
"E08000029","Solihull","RFS",4
"E08000029","Solihull","RCB",4
"E08000029","Solihull","RTX",4
"E08000029","Solihull","RGP",4
"E08000029","Solihull","RNL",3
"E08000029","Solihull","RWY",3
"E08000029","Solihull","RHM",3
"E08000029","Solihull","R1F",3
"E08000029","Solihull","R1K",3
"E08000029","Solihull","RXL",3
"E08000029","Solihull","RA4",3
"E08000029","Solihull","RNS",3
"E08000029","Solihull","RF4",3
"E08000029","Solihull","RJL",3
"E08000029","Solihull","RNQ",3
"E08000029","Solihull","RVJ",3
"E08000029","Solihull","RJZ",3
"E08000029","Solihull","RRV",5
"E08000029","Solihull","RBT",3
"E08000029","Solihull","RXE",2
"E08000029","Solihull","RJ7",2
"E08000029","Solihull","RMC",2
"E08000029","Solihull","RTR",2
"E08000029","Solihull","RYR",2
"E08000029","Solihull","RC9",2
"E08000029","Solihull","RAS",2
"E08000029","Solihull","RC1",2
"E08000029","Solihull","RD8",2
"E08000029","Solihull","RDD",2
"E08000029","Solihull","RXC",2
"E08000029","Solihull","TAJ",2
"E08000029","Solihull","RGT",2
"E08000029","Solihull","RJR",2
"E08000029","Solihull","RK5",2
"E08000029","Solihull","RAX",2
"E08000029","Solihull","RTP",2
"E08000029","Solihull","RVY",2
"E08000029","Solihull","RGM",1
"E08000029","Solihull","RHA",1
"E08000029","Solihull","RJN",1
"E08000029","Solihull","RWG",1
"E08000029","Solihull","RXH",1
"E08000029","Solihull","RDY",1
"E08000029","Solihull","RGR",1
"E08000029","Solihull","RQX",1
"E08000029","Solihull","RAJ",1
"E08000029","Solihull","REM",1
"E08000029","Solihull","RWH",1
"E08000029","Solihull","RNZ",1
"E08000029","Solihull","RWA",1
"E08000029","Solihull","R1A",1
"E08000029","Solihull","RAP",1
"E08000029","Solihull","RDE",1
"E08000029","Solihull","RFR",1
"E08000029","Solihull","RHU",1
"E08000029","Solihull","RVV",1
"E08000029","Solihull","RW6",1
"E08000029","Solihull","RXQ",1
"E08000029","Solihull","RBS",1
"E08000029","Solihull","RCU",1
"E08000029","Solihull","REP",1
"E08000029","Solihull","RP5",1
"E08000029","Solihull","RWW",1
"E08000029","Solihull","RJ2",1
"E08000029","Solihull","R0B",1
"E08000029","Solihull","RM1",1
"E08000029","Solihull","RTF",1
"E08000029","Solihull","RTK",1
"E08000029","Solihull","RBV",1
"E08000029","Solihull","RM3",1
"E08000029","Solihull","RR7",1
"E08000029","Solihull","RVW",1
"E08000030","Walsall","RBK",26632
"E08000030","Walsall","RL4",4368
"E08000030","Walsall","RRK",3370
"E08000030","Walsall","RXK",1023
"E08000030","Walsall","RQ3",461
"E08000030","Walsall","RNA",207
"E08000030","Walsall","RJE",68
"E08000030","Walsall","RTG",78
"E08000030","Walsall","TAJ",31
"E08000030","Walsall","RKB",22
"E08000030","Walsall","RXW",34
"E08000030","Walsall","RRJ",17
"E08000030","Walsall","RWP",16
"E08000030","Walsall","RTH",16
"E08000030","Walsall","REF",14
"E08000030","Walsall","RXT",12
"E08000030","Walsall","RWE",12
"E08000030","Walsall","RA9",10
"E08000030","Walsall","RTE",10
"E08000030","Walsall","RLQ",10
"E08000030","Walsall","RJC",9
"E08000030","Walsall","RHQ",8
"E08000030","Walsall","RNL",8
"E08000030","Walsall","RXL",8
"E08000030","Walsall","RA3",7
"E08000030","Walsall","R1F",7
"E08000030","Walsall","RBA",7
"E08000030","Walsall","RW6",6
"E08000030","Walsall","R1H",6
"E08000030","Walsall","RK9",6
"E08000030","Walsall","RBZ",5
"E08000030","Walsall","RRE",5
"E08000030","Walsall","RA7",5
"E08000030","Walsall","RAE",5
"E08000030","Walsall","RJ1",5
"E08000030","Walsall","RBT",5
"E08000030","Walsall","RBD",5
"E08000030","Walsall","RLT",5
"E08000030","Walsall","RWD",5
"E08000030","Walsall","R1K",4
"E08000030","Walsall","RXQ",4
"E08000030","Walsall","RC9",4
"E08000030","Walsall","RDU",4
"E08000030","Walsall","RM3",4
"E08000030","Walsall","R0A",4
"E08000030","Walsall","RDZ",4
"E08000030","Walsall","RN3",4
"E08000030","Walsall","RNS",4
"E08000030","Walsall","RVV",4
"E08000030","Walsall","RWH",3
"E08000030","Walsall","RXR",3
"E08000030","Walsall","RHW",3
"E08000030","Walsall","RQM",3
"E08000030","Walsall","RYW",3
"E08000030","Walsall","RWG",3
"E08000030","Walsall","RXN",3
"E08000030","Walsall","RBN",3
"E08000030","Walsall","RD8",3
"E08000030","Walsall","RF4",3
"E08000030","Walsall","RX1",3
"E08000030","Walsall","RYR",3
"E08000030","Walsall","RWY",2
"E08000030","Walsall","RC1",2
"E08000030","Walsall","RCB",2
"E08000030","Walsall","RD3",2
"E08000030","Walsall","RBS",2
"E08000030","Walsall","RWJ",2
"E08000030","Walsall","RN5",2
"E08000030","Walsall","RFF",2
"E08000030","Walsall","RGN",2
"E08000030","Walsall","RTP",2
"E08000030","Walsall","RH8",2
"E08000030","Walsall","RJ7",2
"E08000030","Walsall","RYJ",2
"E08000030","Walsall","RAP",2
"E08000030","Walsall","RD1",2
"E08000030","Walsall","RGR",2
"E08000030","Walsall","RJR",2
"E08000030","Walsall","RK5",2
"E08000030","Walsall","RNQ",2
"E08000030","Walsall","REM",2
"E08000030","Walsall","RR8",2
"E08000030","Walsall","RRF",2
"E08000030","Walsall","RRV",2
"E08000030","Walsall","RWW",2
"E08000030","Walsall","RAJ",1
"E08000030","Walsall","RM1",1
"E08000030","Walsall","RTF",1
"E08000030","Walsall","RVJ",1
"E08000030","Walsall","RDE",1
"E08000030","Walsall","RHM",1
"E08000030","Walsall","RMY",1
"E08000030","Walsall","RWA",1
"E08000030","Walsall","RGP",1
"E08000030","Walsall","RN7",1
"E08000030","Walsall","RTR",1
"E08000030","Walsall","RVR",1
"E08000030","Walsall","RKE",1
"E08000030","Walsall","RMP",1
"E08000030","Walsall","RTD",1
"E08000030","Walsall","RTK",1
"E08000030","Walsall","RCD",1
"E08000030","Walsall","RCX",1
"E08000030","Walsall","RGT",1
"E08000030","Walsall","RVY",1
"E08000030","Walsall","RXM",1
"E08000030","Walsall","RHU",1
"E08000030","Walsall","RJZ",1
"E08000030","Walsall","RP1",1
"E08000030","Walsall","RP5",1
"E08000030","Walsall","RXC",1
"E08000030","Walsall","RXP",1
"E08000030","Walsall","RA4",1
"E08000030","Walsall","RCF",1
"E08000030","Walsall","RH5",1
"E08000030","Walsall","RJL",1
"E08000031","Wolverhampton","RL4",27248
"E08000031","Wolverhampton","RNA",510
"E08000031","Wolverhampton","TAJ",491
"E08000031","Wolverhampton","RBK",437
"E08000031","Wolverhampton","RRK",413
"E08000031","Wolverhampton","RQ3",172
"E08000031","Wolverhampton","RXK",185
"E08000031","Wolverhampton","RJE",58
"E08000031","Wolverhampton","RXW",83
"E08000031","Wolverhampton","RKB",24
"E08000031","Wolverhampton","RWP",21
"E08000031","Wolverhampton","RWE",19
"E08000031","Wolverhampton","RTH",19
"E08000031","Wolverhampton","R0A",15
"E08000031","Wolverhampton","RTG",18
"E08000031","Wolverhampton","RDU",10
"E08000031","Wolverhampton","R1K",9
"E08000031","Wolverhampton","RBA",9
"E08000031","Wolverhampton","R1H",8
"E08000031","Wolverhampton","RJ1",8
"E08000031","Wolverhampton","RX1",7
"E08000031","Wolverhampton","RA9",7
"E08000031","Wolverhampton","RYJ",7
"E08000031","Wolverhampton","RA7",6
"E08000031","Wolverhampton","RHQ",6
"E08000031","Wolverhampton","RRV",6
"E08000031","Wolverhampton","RM1",6
"E08000031","Wolverhampton","RTE",6
"E08000031","Wolverhampton","RVJ",5
"E08000031","Wolverhampton","RBT",5
"E08000031","Wolverhampton","RK5",5
"E08000031","Wolverhampton","RLQ",5
"E08000031","Wolverhampton","RJC",5
"E08000031","Wolverhampton","RH8",5
"E08000031","Wolverhampton","RRE",5
"E08000031","Wolverhampton","RQM",5
"E08000031","Wolverhampton","RHU",4
"E08000031","Wolverhampton","RXT",4
"E08000031","Wolverhampton","RD1",4
"E08000031","Wolverhampton","REF",4
"E08000031","Wolverhampton","RGT",4
"E08000031","Wolverhampton","RA3",4
"E08000031","Wolverhampton","RAP",4
"E08000031","Wolverhampton","RJZ",4
"E08000031","Wolverhampton","RK9",4
"E08000031","Wolverhampton","RXL",4
"E08000031","Wolverhampton","RAX",4
"E08000031","Wolverhampton","RJL",4
"E08000031","Wolverhampton","RR8",4
"E08000031","Wolverhampton","R0B",5
"E08000031","Wolverhampton","RRJ",3
"E08000031","Wolverhampton","RXH",3
"E08000031","Wolverhampton","RBD",3
"E08000031","Wolverhampton","RBS",3
"E08000031","Wolverhampton","RCU",3
"E08000031","Wolverhampton","RWD",3
"E08000031","Wolverhampton","RWW",3
"E08000031","Wolverhampton","RCB",3
"E08000031","Wolverhampton","RHM",3
"E08000031","Wolverhampton","RBN",3
"E08000031","Wolverhampton","RJR",3
"E08000031","Wolverhampton","RM3",3
"E08000031","Wolverhampton","RTK",3
"E08000031","Wolverhampton","RVY",3
"E08000031","Wolverhampton","RLY",3
"E08000031","Wolverhampton","RQX",3
"E08000031","Wolverhampton","RDD",3
"E08000031","Wolverhampton","RJ2",4
"E08000031","Wolverhampton","RWG",3
"E08000031","Wolverhampton","RD8",3
"E08000031","Wolverhampton","RNL",2
"E08000031","Wolverhampton","RNS",2
"E08000031","Wolverhampton","RNZ",2
"E08000031","Wolverhampton","RAL",2
"E08000031","Wolverhampton","RXN",2
"E08000031","Wolverhampton","RXP",2
"E08000031","Wolverhampton","R1F",2
"E08000031","Wolverhampton","RL1",2
"E08000031","Wolverhampton","RN5",2
"E08000031","Wolverhampton","RC9",2
"E08000031","Wolverhampton","RNQ",2
"E08000031","Wolverhampton","RW1",2
"E08000031","Wolverhampton","RW6",2
"E08000031","Wolverhampton","RJ6",2
"E08000031","Wolverhampton","RXC",2
"E08000031","Wolverhampton","RAS",2
"E08000031","Wolverhampton","RLT",2
"E08000031","Wolverhampton","RAJ",2
"E08000031","Wolverhampton","RKE",2
"E08000031","Wolverhampton","RN7",2
"E08000031","Wolverhampton","RCX",1
"E08000031","Wolverhampton","RVR",1
"E08000031","Wolverhampton","RBV",1
"E08000031","Wolverhampton","RCF",1
"E08000031","Wolverhampton","RDE",1
"E08000031","Wolverhampton","RMC",1
"E08000031","Wolverhampton","RD3",1
"E08000031","Wolverhampton","RMY",1
"E08000031","Wolverhampton","RN3",1
"E08000031","Wolverhampton","RRF",1
"E08000031","Wolverhampton","RTD",1
"E08000031","Wolverhampton","RTR",1
"E08000031","Wolverhampton","RXF",1
"E08000031","Wolverhampton","REM",2
"E08000031","Wolverhampton","RWA",1
"E08000031","Wolverhampton","RWF",1
"E08000031","Wolverhampton","R1A",1
"E08000031","Wolverhampton","RWY",1
"E08000031","Wolverhampton","RX4",1
"E08000031","Wolverhampton","RF4",1
"E08000031","Wolverhampton","RFR",1
"E08000031","Wolverhampton","RBL",1
"E08000031","Wolverhampton","RBZ",1
"E08000031","Wolverhampton","RFS",1
"E08000031","Wolverhampton","RJ7",1
"E08000031","Wolverhampton","RMP",1
"E08000031","Wolverhampton","RTP",1
"E08000031","Wolverhampton","RVV",1
"E08000031","Wolverhampton","RFF",1
"E08000031","Wolverhampton","RGN",1
"E08000031","Wolverhampton","RNU",1
"E08000031","Wolverhampton","RTF",1
"E08000032","Bradford","RAE",60638
"E08000032","Bradford","RCF",15185
"E08000032","Bradford","RR8",2823
"E08000032","Bradford","RWY",1364
"E08000032","Bradford","TAD",453
"E08000032","Bradford","RXF",350
"E08000032","Bradford","RCD",117
"E08000032","Bradford","RCB",109
"E08000032","Bradford","R0A",106
"E08000032","Bradford","RWA",33
"E08000032","Bradford","RHQ",31
"E08000032","Bradford","RTX",29
"E08000032","Bradford","RXL",25
"E08000032","Bradford","RM3",23
"E08000032","Bradford","RWD",22
"E08000032","Bradford","RTG",21
"E08000032","Bradford","RXR",20
"E08000032","Bradford","RRK",30
"E08000032","Bradford","RW6",17
"E08000032","Bradford","RTD",16
"E08000032","Bradford","RTR",19
"E08000032","Bradford","R1H",15
"E08000032","Bradford","RGN",15
"E08000032","Bradford","RXN",15
"E08000032","Bradford","RCU",14
"E08000032","Bradford","RP5",17
"E08000032","Bradford","RBV",13
"E08000032","Bradford","RNL",11
"E08000032","Bradford","RQ3",11
"E08000032","Bradford","RXP",11
"E08000032","Bradford","RKB",10
"E08000032","Bradford","RTF",10
"E08000032","Bradford","RJE",9
"E08000032","Bradford","RXK",14
"E08000032","Bradford","RTH",9
"E08000032","Bradford","RJL",8
"E08000032","Bradford","RWW",8
"E08000032","Bradford","RX1",8
"E08000032","Bradford","RXG",8
"E08000032","Bradford","RQM",8
"E08000032","Bradford","RRV",8
"E08000032","Bradford","RGD",8
"E08000032","Bradford","REM",9
"E08000032","Bradford","RWH",6
"E08000032","Bradford","RA9",6
"E08000032","Bradford","RBD",6
"E08000032","Bradford","REF",6
"E08000032","Bradford","RVY",8
"E08000032","Bradford","RJ1",5
"E08000032","Bradford","RBT",5
"E08000032","Bradford","RFF",5
"E08000032","Bradford","RFS",5
"E08000032","Bradford","RDU",5
"E08000032","Bradford","RFR",4
"E08000032","Bradford","RBN",4
"E08000032","Bradford","RC1",4
"E08000032","Bradford","RGP",4
"E08000032","Bradford","RL4",4
"E08000032","Bradford","RP6",4
"E08000032","Bradford","R1K",4
"E08000032","Bradford","RJC",4
"E08000032","Bradford","RMP",4
"E08000032","Bradford","RC9",4
"E08000032","Bradford","RHW",4
"E08000032","Bradford","RYJ",4
"E08000032","Bradford","RJ7",4
"E08000032","Bradford","RM1",4
"E08000032","Bradford","RTP",4
"E08000032","Bradford","RWE",3
"E08000032","Bradford","RDZ",3
"E08000032","Bradford","RVW",3
"E08000032","Bradford","RX3",3
"E08000032","Bradford","R1F",3
"E08000032","Bradford","RAP",3
"E08000032","Bradford","RNS",3
"E08000032","Bradford","RT3",3
"E08000032","Bradford","RYR",3
"E08000032","Bradford","RF4",3
"E08000032","Bradford","RJR",3
"E08000032","Bradford","RLQ",3
"E08000032","Bradford","RVV",3
"E08000032","Bradford","RD1",3
"E08000032","Bradford","RGT",3
"E08000032","Bradford","RBK",2
"E08000032","Bradford","RCX",2
"E08000032","Bradford","RHM",2
"E08000032","Bradford","RLY",2
"E08000032","Bradford","RMC",2
"E08000032","Bradford","RWJ",2
"E08000032","Bradford","RJN",2
"E08000032","Bradford","RWG",2
"E08000032","Bradford","RNZ",2
"E08000032","Bradford","RA4",2
"E08000032","Bradford","RTK",2
"E08000032","Bradford","RA7",2
"E08000032","Bradford","RJ6",2
"E08000032","Bradford","RAS",2
"E08000032","Bradford","RH8",2
"E08000032","Bradford","RJZ",2
"E08000032","Bradford","RN7",2
"E08000032","Bradford","RW5",2
"E08000032","Bradford","RWF",2
"E08000032","Bradford","R0B",5
"E08000032","Bradford","RLT",2
"E08000032","Bradford","RN3",2
"E08000032","Bradford","RRF",2
"E08000032","Bradford","RXC",2
"E08000032","Bradford","RXH",2
"E08000032","Bradford","RKE",2
"E08000032","Bradford","RXQ",2
"E08000032","Bradford","RA3",1
"E08000032","Bradford","RBS",1
"E08000032","Bradford","REP",1
"E08000032","Bradford","RHU",1
"E08000032","Bradford","RK5",1
"E08000032","Bradford","RXW",1
"E08000032","Bradford","RAJ",1
"E08000032","Bradford","RBL",1
"E08000032","Bradford","RJ2",2
"E08000032","Bradford","RXE",1
"E08000032","Bradford","RBQ",1
"E08000032","Bradford","RET",1
"E08000032","Bradford","RQW",1
"E08000032","Bradford","RD3",1
"E08000032","Bradford","RGR",1
"E08000032","Bradford","RQX",1
"E08000032","Bradford","RTE",1
"E08000032","Bradford","RGM",1
"E08000032","Bradford","RP4",1
"E08000032","Bradford","RAL",1
"E08000032","Bradford","RAT",1
"E08000032","Bradford","RDE",1
"E08000032","Bradford","RN5",1
"E08000032","Bradford","RNA",1
"E08000032","Bradford","RD8",1
"E08000032","Bradford","RDD",1
"E08000032","Bradford","RAX",1
"E08000032","Bradford","RBA",1
"E08000032","Bradford","RPA",1
"E08000032","Bradford","RR7",1
"E08000032","Bradford","RVR",1
"E08000033","Calderdale","RWY",25185
"E08000033","Calderdale","RAE",845
"E08000033","Calderdale","RR8",758
"E08000033","Calderdale","RXG",278
"E08000033","Calderdale","RXF",99
"E08000033","Calderdale","RW6",90
"E08000033","Calderdale","RXR",84
"E08000033","Calderdale","R0A",56
"E08000033","Calderdale","RCF",28
"E08000033","Calderdale","RCB",27
"E08000033","Calderdale","RXN",18
"E08000033","Calderdale","RHQ",14
"E08000033","Calderdale","RM3",13
"E08000033","Calderdale","RTX",13
"E08000033","Calderdale","RXL",12
"E08000033","Calderdale","R1H",12
"E08000033","Calderdale","RCD",8
"E08000033","Calderdale","RBV",8
"E08000033","Calderdale","RXP",7
"E08000033","Calderdale","RTD",7
"E08000033","Calderdale","RJL",6
"E08000033","Calderdale","RWA",6
"E08000033","Calderdale","RTF",6
"E08000033","Calderdale","RFF",6
"E08000033","Calderdale","RWD",6
"E08000033","Calderdale","RDZ",6
"E08000033","Calderdale","RNL",5
"E08000033","Calderdale","RDE",5
"E08000033","Calderdale","RTR",8
"E08000033","Calderdale","REM",6
"E08000033","Calderdale","RTG",5
"E08000033","Calderdale","RVW",4
"E08000033","Calderdale","RDU",4
"E08000033","Calderdale","RCU",4
"E08000033","Calderdale","RQM",4
"E08000033","Calderdale","RRK",7
"E08000033","Calderdale","RBQ",4
"E08000033","Calderdale","RGN",3
"E08000033","Calderdale","RWJ",3
"E08000033","Calderdale","RX3",3
"E08000033","Calderdale","RA2",3
"E08000033","Calderdale","RBN",3
"E08000033","Calderdale","RNS",3
"E08000033","Calderdale","RTH",3
"E08000033","Calderdale","RW5",3
"E08000033","Calderdale","RBT",3
"E08000033","Calderdale","RP5",4
"E08000033","Calderdale","RTE",3
"E08000033","Calderdale","RJ1",3
"E08000033","Calderdale","RJR",3
"E08000033","Calderdale","RK5",3
"E08000033","Calderdale","RVJ",3
"E08000033","Calderdale","RX1",3
"E08000033","Calderdale","RD1",3
"E08000033","Calderdale","RFR",3
"E08000033","Calderdale","RMP",3
"E08000033","Calderdale","R1K",2
"E08000033","Calderdale","RNZ",2
"E08000033","Calderdale","RVR",2
"E08000033","Calderdale","RC9",2
"E08000033","Calderdale","REF",2
"E08000033","Calderdale","RRV",3
"E08000033","Calderdale","RA4",2
"E08000033","Calderdale","RCX",2
"E08000033","Calderdale","RH8",2
"E08000033","Calderdale","RD3",2
"E08000033","Calderdale","RKB",2
"E08000033","Calderdale","RVV",2
"E08000033","Calderdale","RWP",2
"E08000033","Calderdale","RA9",2
"E08000033","Calderdale","RAL",2
"E08000033","Calderdale","RBZ",2
"E08000033","Calderdale","RXC",2
"E08000033","Calderdale","RYJ",2
"E08000033","Calderdale","RET",2
"E08000033","Calderdale","RA7",2
"E08000033","Calderdale","RF4",2
"E08000033","Calderdale","RNQ",2
"E08000033","Calderdale","RLQ",2
"E08000033","Calderdale","RMC",2
"E08000033","Calderdale","RRF",2
"E08000033","Calderdale","RVY",2
"E08000033","Calderdale","RBD",1
"E08000033","Calderdale","RGP",1
"E08000033","Calderdale","RJE",1
"E08000033","Calderdale","RQ8",1
"E08000033","Calderdale","TAD",1
"E08000033","Calderdale","RD8",1
"E08000033","Calderdale","RGT",1
"E08000033","Calderdale","RPY",1
"E08000033","Calderdale","RRE",1
"E08000033","Calderdale","RBL",1
"E08000033","Calderdale","RGR",1
"E08000033","Calderdale","RQ3",1
"E08000033","Calderdale","RW4",1
"E08000033","Calderdale","RWG",1
"E08000033","Calderdale","RDD",1
"E08000033","Calderdale","RL4",1
"E08000033","Calderdale","RPA",1
"E08000033","Calderdale","RWE",1
"E08000033","Calderdale","RXK",2
"E08000033","Calderdale","RXQ",1
"E08000033","Calderdale","RA3",1
"E08000033","Calderdale","RJ2",1
"E08000033","Calderdale","RQX",1
"E08000033","Calderdale","RRJ",1
"E08000033","Calderdale","RJZ",1
"E08000033","Calderdale","RK9",1
"E08000033","Calderdale","RTP",1
"E08000033","Calderdale","RWH",1
"E08000033","Calderdale","RAS",1
"E08000033","Calderdale","RBS",1
"E08000033","Calderdale","RHU",1
"E08000033","Calderdale","RKE",1
"E08000033","Calderdale","RC1",1
"E08000033","Calderdale","R0B",2
"E08000033","Calderdale","RJN",1
"E08000033","Calderdale","RT5",1
"E08000033","Calderdale","RXM",1
"E08000034","Kirklees","RWY",24495
"E08000034","Kirklees","RXF",18741
"E08000034","Kirklees","RR8",2068
"E08000034","Kirklees","RAE",1382
"E08000034","Kirklees","RFF",1046
"E08000034","Kirklees","RXG",567
"E08000034","Kirklees","RHQ",146
"E08000034","Kirklees","RCB",81
"E08000034","Kirklees","R0A",71
"E08000034","Kirklees","RW6",53
"E08000034","Kirklees","RWA",34
"E08000034","Kirklees","RTD",32
"E08000034","Kirklees","RCU",30
"E08000034","Kirklees","RCD",20
"E08000034","Kirklees","RCF",20
"E08000034","Kirklees","RBV",18
"E08000034","Kirklees","RM3",16
"E08000034","Kirklees","RTX",15
"E08000034","Kirklees","RMP",15
"E08000034","Kirklees","RQM",14
"E08000034","Kirklees","RJL",14
"E08000034","Kirklees","RXL",14
"E08000034","Kirklees","RP5",14
"E08000034","Kirklees","RTR",14
"E08000034","Kirklees","RTG",17
"E08000034","Kirklees","RWJ",12
"E08000034","Kirklees","RXR",11
"E08000034","Kirklees","R1H",11
"E08000034","Kirklees","R1K",11
"E08000034","Kirklees","RTF",10
"E08000034","Kirklees","RYJ",9
"E08000034","Kirklees","RXN",9
"E08000034","Kirklees","RRF",8
"E08000034","Kirklees","RRK",12
"E08000034","Kirklees","RWH",8
"E08000034","Kirklees","REM",10
"E08000034","Kirklees","RWE",8
"E08000034","Kirklees","RVW",7
"E08000034","Kirklees","RX1",7
"E08000034","Kirklees","REF",7
"E08000034","Kirklees","RTE",6
"E08000034","Kirklees","RBT",6
"E08000034","Kirklees","RHW",6
"E08000034","Kirklees","RMC",6
"E08000034","Kirklees","RHU",6
"E08000034","Kirklees","RQX",6
"E08000034","Kirklees","RWW",6
"E08000034","Kirklees","RGP",6
"E08000034","Kirklees","RBZ",5
"E08000034","Kirklees","RDU",5
"E08000034","Kirklees","RFS",5
"E08000034","Kirklees","RKB",5
"E08000034","Kirklees","RWD",5
"E08000034","Kirklees","RLQ",5
"E08000034","Kirklees","RNL",5
"E08000034","Kirklees","RXP",5
"E08000034","Kirklees","RGT",4
"E08000034","Kirklees","TAD",4
"E08000034","Kirklees","RJZ",4
"E08000034","Kirklees","RH8",4
"E08000034","Kirklees","RVV",4
"E08000034","Kirklees","RFR",4
"E08000034","Kirklees","RJE",4
"E08000034","Kirklees","RJ1",4
"E08000034","Kirklees","RXK",7
"E08000034","Kirklees","RA9",4
"E08000034","Kirklees","RBD",3
"E08000034","Kirklees","RTH",3
"E08000034","Kirklees","RWF",3
"E08000034","Kirklees","RJR",3
"E08000034","Kirklees","RK9",3
"E08000034","Kirklees","RBK",3
"E08000034","Kirklees","RBN",3
"E08000034","Kirklees","RJ2",4
"E08000034","Kirklees","RNA",3
"E08000034","Kirklees","RN5",3
"E08000034","Kirklees","RXQ",3
"E08000034","Kirklees","RNQ",3
"E08000034","Kirklees","RD8",3
"E08000034","Kirklees","RHM",3
"E08000034","Kirklees","RK5",3
"E08000034","Kirklees","RXH",3
"E08000034","Kirklees","RCX",3
"E08000034","Kirklees","RJ7",3
"E08000034","Kirklees","RM1",3
"E08000034","Kirklees","RRV",4
"E08000034","Kirklees","RAL",2
"E08000034","Kirklees","RBQ",2
"E08000034","Kirklees","RJC",2
"E08000034","Kirklees","RF4",2
"E08000034","Kirklees","RLT",2
"E08000034","Kirklees","RXC",2
"E08000034","Kirklees","RA7",2
"E08000034","Kirklees","RDE",2
"E08000034","Kirklees","RL4",2
"E08000034","Kirklees","RYR",2
"E08000034","Kirklees","RAS",2
"E08000034","Kirklees","RD3",2
"E08000034","Kirklees","RGN",2
"E08000034","Kirklees","RQW",2
"E08000034","Kirklees","RWG",2
"E08000034","Kirklees","RA3",2
"E08000034","Kirklees","RAX",2
"E08000034","Kirklees","RBA",2
"E08000034","Kirklees","RD1",2
"E08000034","Kirklees","RGD",2
"E08000034","Kirklees","R0B",3
"E08000034","Kirklees","RTP",2
"E08000034","Kirklees","RWP",2
"E08000034","Kirklees","RXW",3
"E08000034","Kirklees","RA2",2
"E08000034","Kirklees","RBL",2
"E08000034","Kirklees","RC9",2
"E08000034","Kirklees","RR7",2
"E08000034","Kirklees","RN7",1
"E08000034","Kirklees","RT3",1
"E08000034","Kirklees","RV9",1
"E08000034","Kirklees","R1D",1
"E08000034","Kirklees","RQ8",1
"E08000034","Kirklees","RET",1
"E08000034","Kirklees","RRJ",1
"E08000034","Kirklees","RVY",2
"E08000034","Kirklees","RX3",1
"E08000034","Kirklees","R1F",1
"E08000034","Kirklees","RJ6",1
"E08000034","Kirklees","RJN",1
"E08000034","Kirklees","RP6",1
"E08000034","Kirklees","RQ3",1
"E08000034","Kirklees","RWK",1
"E08000034","Kirklees","RP4",1
"E08000034","Kirklees","RVR",1
"E08000034","Kirklees","RNZ",1
"E08000034","Kirklees","RPA",1
"E08000034","Kirklees","RC1",1
"E08000034","Kirklees","RKE",1
"E08000034","Kirklees","RXE",1
"E08000035","Leeds","RR8",65196
"E08000035","Leeds","RXF",4539
"E08000035","Leeds","RCD",2871
"E08000035","Leeds","RAE",1174
"E08000035","Leeds","RGD",850
"E08000035","Leeds","RCB",415
"E08000035","Leeds","RCF",192
"E08000035","Leeds","RWY",96
"E08000035","Leeds","R0A",72
"E08000035","Leeds","RWA",55
"E08000035","Leeds","RHQ",53
"E08000035","Leeds","RX3",38
"E08000035","Leeds","RTR",43
"E08000035","Leeds","RTD",33
"E08000035","Leeds","RTX",32
"E08000035","Leeds","RWD",26
"E08000035","Leeds","RFF",26
"E08000035","Leeds","R1H",25
"E08000035","Leeds","RJL",25
"E08000035","Leeds","RX1",24
"E08000035","Leeds","RP5",29
"E08000035","Leeds","RXL",24
"E08000035","Leeds","RM3",23
"E08000035","Leeds","RW6",22
"E08000035","Leeds","RTF",22
"E08000035","Leeds","RVW",21
"E08000035","Leeds","REM",24
"E08000035","Leeds","RXP",20
"E08000035","Leeds","RFR",17
"E08000035","Leeds","RRK",26
"E08000035","Leeds","RXG",16
"E08000035","Leeds","RKB",16
"E08000035","Leeds","RRV",17
"E08000035","Leeds","REF",15
"E08000035","Leeds","RWE",15
"E08000035","Leeds","RTG",17
"E08000035","Leeds","RWJ",14
"E08000035","Leeds","RTH",14
"E08000035","Leeds","RWF",13
"E08000035","Leeds","RWG",13
"E08000035","Leeds","RJ1",12
"E08000035","Leeds","RYJ",12
"E08000035","Leeds","RDE",12
"E08000035","Leeds","RGT",12
"E08000035","Leeds","RXR",13
"E08000035","Leeds","RGN",11
"E08000035","Leeds","RNL",11
"E08000035","Leeds","RHM",11
"E08000035","Leeds","RFS",11
"E08000035","Leeds","RK5",10
"E08000035","Leeds","RA9",10
"E08000035","Leeds","R1K",10
"E08000035","Leeds","RWW",10
"E08000035","Leeds","RD1",10
"E08000035","Leeds","RD8",9
"E08000035","Leeds","RQM",9
"E08000035","Leeds","RXN",9
"E08000035","Leeds","RTP",8
"E08000035","Leeds","RBN",8
"E08000035","Leeds","RJE",8
"E08000035","Leeds","RDU",8
"E08000035","Leeds","RM1",8
"E08000035","Leeds","RTE",8
"E08000035","Leeds","RNS",8
"E08000035","Leeds","RWH",8
"E08000035","Leeds","RA7",7
"E08000035","Leeds","RAS",7
"E08000035","Leeds","RXQ",7
"E08000035","Leeds","RXC",7
"E08000035","Leeds","RAL",7
"E08000035","Leeds","RJC",7
"E08000035","Leeds","TAD",7
"E08000035","Leeds","RCU",7
"E08000035","Leeds","RJ7",7
"E08000035","Leeds","RXH",7
"E08000035","Leeds","RBL",7
"E08000035","Leeds","RC1",6
"E08000035","Leeds","RD3",6
"E08000035","Leeds","RQX",6
"E08000035","Leeds","RBV",6
"E08000035","Leeds","RVY",6
"E08000035","Leeds","RMC",5
"E08000035","Leeds","RRF",5
"E08000035","Leeds","RJ2",9
"E08000035","Leeds","RQW",5
"E08000035","Leeds","RBA",5
"E08000035","Leeds","RC9",5
"E08000035","Leeds","RNQ",5
"E08000035","Leeds","RVJ",5
"E08000035","Leeds","R0B",7
"E08000035","Leeds","RAX",4
"E08000035","Leeds","RBZ",4
"E08000035","Leeds","RCX",4
"E08000035","Leeds","RYR",4
"E08000035","Leeds","RF4",4
"E08000035","Leeds","RXW",8
"E08000035","Leeds","RJR",4
"E08000035","Leeds","RWP",4
"E08000035","Leeds","RXK",5
"E08000035","Leeds","RA4",4
"E08000035","Leeds","RMP",4
"E08000035","Leeds","RVV",4
"E08000035","Leeds","RBK",4
"E08000035","Leeds","RDZ",4
"E08000035","Leeds","NR5",4
"E08000035","Leeds","RHU",3
"E08000035","Leeds","RJZ",3
"E08000035","Leeds","RN7",3
"E08000035","Leeds","RNA",3
"E08000035","Leeds","RGP",3
"E08000035","Leeds","RR7",3
"E08000035","Leeds","RJN",3
"E08000035","Leeds","RL4",3
"E08000035","Leeds","RNZ",3
"E08000035","Leeds","RA2",3
"E08000035","Leeds","RBT",3
"E08000035","Leeds","RV9",3
"E08000035","Leeds","RQ8",3
"E08000035","Leeds","RBD",2
"E08000035","Leeds","R1F",2
"E08000035","Leeds","RLT",2
"E08000035","Leeds","RN3",2
"E08000035","Leeds","RVR",2
"E08000035","Leeds","RXY",2
"E08000035","Leeds","RA3",2
"E08000035","Leeds","RXA",2
"E08000035","Leeds","RAJ",2
"E08000035","Leeds","RQ3",2
"E08000035","Leeds","RTQ",2
"E08000035","Leeds","RN5",2
"E08000035","Leeds","RJ6",2
"E08000035","Leeds","RKE",2
"E08000035","Leeds","RLQ",1
"E08000035","Leeds","RNU",1
"E08000035","Leeds","RRJ",1
"E08000035","Leeds","RAP",1
"E08000035","Leeds","RH8",1
"E08000035","Leeds","RK9",1
"E08000035","Leeds","RPA",1
"E08000035","Leeds","RY6",1
"E08000035","Leeds","RP6",1
"E08000035","Leeds","RW4",1
"E08000035","Leeds","RXM",1
"E08000035","Leeds","RBQ",1
"E08000035","Leeds","RT3",1
"E08000035","Leeds","RW5",1
"E08000035","Leeds","RX4",1
"E08000036","Wakefield","RXF",36932
"E08000036","Wakefield","RR8",1804
"E08000036","Wakefield","RFF",662
"E08000036","Wakefield","RXG",375
"E08000036","Wakefield","RP5",273
"E08000036","Wakefield","RHQ",140
"E08000036","Wakefield","RCB",117
"E08000036","Wakefield","RAE",57
"E08000036","Wakefield","RWA",42
"E08000036","Wakefield","RWY",40
"E08000036","Wakefield","RWD",27
"E08000036","Wakefield","RCU",25
"E08000036","Wakefield","RCD",25
"E08000036","Wakefield","R0A",21
"E08000036","Wakefield","RTD",19
"E08000036","Wakefield","RXL",17
"E08000036","Wakefield","RTX",16
"E08000036","Wakefield","RJL",15
"E08000036","Wakefield","RTR",19
"E08000036","Wakefield","RCF",13
"E08000036","Wakefield","REF",10
"E08000036","Wakefield","RFR",12
"E08000036","Wakefield","RTF",9
"E08000036","Wakefield","RVW",8
"E08000036","Wakefield","RKB",8
"E08000036","Wakefield","RBV",7
"E08000036","Wakefield","RRK",8
"E08000036","Wakefield","RWF",6
"E08000036","Wakefield","RTG",9
"E08000036","Wakefield","RQM",6
"E08000036","Wakefield","R1H",6
"E08000036","Wakefield","RNL",5
"E08000036","Wakefield","RXN",5
"E08000036","Wakefield","RFS",5
"E08000036","Wakefield","RGP",5
"E08000036","Wakefield","RM3",5
"E08000036","Wakefield","RVY",6
"E08000036","Wakefield","RWW",4
"E08000036","Wakefield","RA9",4
"E08000036","Wakefield","RH8",4
"E08000036","Wakefield","RW6",4
"E08000036","Wakefield","RAL",4
"E08000036","Wakefield","RM1",4
"E08000036","Wakefield","RXR",4
"E08000036","Wakefield","REM",6
"E08000036","Wakefield","RTK",3
"E08000036","Wakefield","RX1",3
"E08000036","Wakefield","RX3",3
"E08000036","Wakefield","RXE",3
"E08000036","Wakefield","RBK",3
"E08000036","Wakefield","RJ1",3
"E08000036","Wakefield","R1K",3
"E08000036","Wakefield","RK5",3
"E08000036","Wakefield","RXP",3
"E08000036","Wakefield","RWH",3
"E08000036","Wakefield","RGD",3
"E08000036","Wakefield","RHM",3
"E08000036","Wakefield","RK9",3
"E08000036","Wakefield","RQ3",2
"E08000036","Wakefield","RWJ",2
"E08000036","Wakefield","RJ7",2
"E08000036","Wakefield","RMP",2
"E08000036","Wakefield","RAX",2
"E08000036","Wakefield","RBN",2
"E08000036","Wakefield","RL4",2
"E08000036","Wakefield","RNA",2
"E08000036","Wakefield","RNS",2
"E08000036","Wakefield","RTH",2
"E08000036","Wakefield","RV9",2
"E08000036","Wakefield","RVR",2
"E08000036","Wakefield","RVV",2
"E08000036","Wakefield","RA4",2
"E08000036","Wakefield","RAS",2
"E08000036","Wakefield","RC1",2
"E08000036","Wakefield","R0B",2
"E08000036","Wakefield","RRF",2
"E08000036","Wakefield","RXQ",2
"E08000036","Wakefield","RWE",2
"E08000036","Wakefield","R1F",2
"E08000036","Wakefield","RD3",2
"E08000036","Wakefield","RDZ",2
"E08000036","Wakefield","RRV",2
"E08000036","Wakefield","RA3",2
"E08000036","Wakefield","RBT",2
"E08000036","Wakefield","RDD",3
"E08000036","Wakefield","RDU",2
"E08000036","Wakefield","RGT",2
"E08000036","Wakefield","RN7",2
"E08000036","Wakefield","RHW",1
"E08000036","Wakefield","RJE",1
"E08000036","Wakefield","RPY",1
"E08000036","Wakefield","RWG",1
"E08000036","Wakefield","NTX",1
"E08000036","Wakefield","RAP",1
"E08000036","Wakefield","RBL",1
"E08000036","Wakefield","RPC",1
"E08000036","Wakefield","RW4",1
"E08000036","Wakefield","RXK",2
"E08000036","Wakefield","RC9",1
"E08000036","Wakefield","RF4",1
"E08000036","Wakefield","RJ2",1
"E08000036","Wakefield","RQX",1
"E08000036","Wakefield","RX4",1
"E08000036","Wakefield","RXH",1
"E08000036","Wakefield","RCX",1
"E08000036","Wakefield","RHU",1
"E08000036","Wakefield","RTE",1
"E08000036","Wakefield","RXW",1
"E08000036","Wakefield","RJC",1
"E08000036","Wakefield","RXT",1
"E08000036","Wakefield","RBD",1
"E08000036","Wakefield","RNU",1
"E08000036","Wakefield","RD8",1
"E08000036","Wakefield","RJR",1
"E08000036","Wakefield","RJZ",1
"E08000036","Wakefield","RNQ",1
"E08000036","Wakefield","RXC",1
"E08000036","Wakefield","RYJ",1
"E08000037","Gateshead","RR7",19313
"E08000037","Gateshead","RTD",4402
"E08000037","Gateshead","R0B",277
"E08000037","Gateshead","RX4",183
"E08000037","Gateshead","RXP",182
"E08000037","Gateshead","RTF",168
"E08000037","Gateshead","RTR",18
"E08000037","Gateshead","RVW",14
"E08000037","Gateshead","R0A",12
"E08000037","Gateshead","RX3",10
"E08000037","Gateshead","RCB",10
"E08000037","Gateshead","RNL",8
"E08000037","Gateshead","RXL",7
"E08000037","Gateshead","RM3",7
"E08000037","Gateshead","RR8",6
"E08000037","Gateshead","RVJ",5
"E08000037","Gateshead","RAL",5
"E08000037","Gateshead","RTG",6
"E08000037","Gateshead","REM",6
"E08000037","Gateshead","RHQ",5
"E08000037","Gateshead","RXF",4
"E08000037","Gateshead","RA9",4
"E08000037","Gateshead","RWA",4
"E08000037","Gateshead","RW6",4
"E08000037","Gateshead","R1H",3
"E08000037","Gateshead","RHM",3
"E08000037","Gateshead","RTH",3
"E08000037","Gateshead","RWD",3
"E08000037","Gateshead","RWY",3
"E08000037","Gateshead","RX1",3
"E08000037","Gateshead","RRK",3
"E08000037","Gateshead","RK5",3
"E08000037","Gateshead","RYR",3
"E08000037","Gateshead","RVV",3
"E08000037","Gateshead","RA2",3
"E08000037","Gateshead","RCD",2
"E08000037","Gateshead","RCF",2
"E08000037","Gateshead","RD3",2
"E08000037","Gateshead","RQM",2
"E08000037","Gateshead","RTK",2
"E08000037","Gateshead","RRV",2
"E08000037","Gateshead","RVY",3
"E08000037","Gateshead","RQX",2
"E08000037","Gateshead","RWG",2
"E08000037","Gateshead","RFS",2
"E08000037","Gateshead","RWH",2
"E08000037","Gateshead","RAS",2
"E08000037","Gateshead","RBN",2
"E08000037","Gateshead","RC1",2
"E08000037","Gateshead","RD8",2
"E08000037","Gateshead","REF",2
"E08000037","Gateshead","RKB",2
"E08000037","Gateshead","RTX",2
"E08000037","Gateshead","RJ1",1
"E08000037","Gateshead","RNS",1
"E08000037","Gateshead","RP5",2
"E08000037","Gateshead","RA3",1
"E08000037","Gateshead","RC9",1
"E08000037","Gateshead","RKE",1
"E08000037","Gateshead","RTP",1
"E08000037","Gateshead","RWE",1
"E08000037","Gateshead","RWJ",1
"E08000037","Gateshead","RBQ",1
"E08000037","Gateshead","RJZ",1
"E08000037","Gateshead","RHU",1
"E08000037","Gateshead","RN7",1
"E08000037","Gateshead","RWW",1
"E08000037","Gateshead","RAP",1
"E08000037","Gateshead","RFF",1
"E08000037","Gateshead","RLQ",1
"E08000037","Gateshead","RVR",1
"E08000037","Gateshead","RDE",1
"E08000037","Gateshead","RTE",1
"E08000037","Gateshead","RXH",1
"E08000037","Gateshead","RWF",1
"E08000037","Gateshead","RJ7",1
"E08000037","Gateshead","RP6",1
"E08000037","Gateshead","RRF",1
"E08000037","Gateshead","RWP",1
"E08000037","Gateshead","RXK",1
"E08000037","Gateshead","RXQ",1
"E09000001","City of London","R1H",327
"E09000001","City of London","RRV",241
"E09000001","City of London","RJ1",54
"E09000001","City of London","RQX",12
"E09000001","City of London","RWK",10
"E09000001","City of London","RYJ",9
"E09000001","City of London","RAL",7
"E09000001","City of London","RP6",3
"E09000001","City of London","RWP",2
"E09000001","City of London","RQM",2
"E09000001","City of London","RJZ",1
"E09000001","City of London","RT3",1
"E09000001","City of London","RWH",1
"E09000001","City of London","RXH",1
"E09000001","City of London","RP4",1
"E09000001","City of London","RD8",1
"E09000001","City of London","RDU",1
"E09000001","City of London","RPY",1
"E09000001","City of London","RA4",1
"E09000001","City of London","REF",1
"E09000001","City of London","RF4",1
"E09000001","City of London","RBN",1
"E09000001","City of London","RD1",1
"E09000001","City of London","RTH",1
"E09000001","City of London","R0A",1
"E09000001","City of London","RHM",1
"E09000001","City of London","RAE",1
"E09000001","City of London","RKE",1
"E09000002","Barking and Dagenham","RF4",15124
"E09000002","Barking and Dagenham","R1H",3225
"E09000002","Barking and Dagenham","RQX",343
"E09000002","Barking and Dagenham","RQ8",225
"E09000002","Barking and Dagenham","RAT",160
"E09000002","Barking and Dagenham","RJ1",140
"E09000002","Barking and Dagenham","RDD",123
"E09000002","Barking and Dagenham","RRV",106
"E09000002","Barking and Dagenham","RYJ",60
"E09000002","Barking and Dagenham","RAL",44
"E09000002","Barking and Dagenham","RAP",39
"E09000002","Barking and Dagenham","RP6",37
"E09000002","Barking and Dagenham","RJZ",34
"E09000002","Barking and Dagenham","RQM",34
"E09000002","Barking and Dagenham","RAJ",31
"E09000002","Barking and Dagenham","RJ2",47
"E09000002","Barking and Dagenham","RDE",27
"E09000002","Barking and Dagenham","R1K",23
"E09000002","Barking and Dagenham","RQW",19
"E09000002","Barking and Dagenham","RJ7",18
"E09000002","Barking and Dagenham","RP4",17
"E09000002","Barking and Dagenham","RVV",14
"E09000002","Barking and Dagenham","RKE",12
"E09000002","Barking and Dagenham","RPA",11
"E09000002","Barking and Dagenham","RJ6",11
"E09000002","Barking and Dagenham","RWK",11
"E09000002","Barking and Dagenham","RN7",10
"E09000002","Barking and Dagenham","RC9",9
"E09000002","Barking and Dagenham","RKB",9
"E09000002","Barking and Dagenham","RYR",8
"E09000002","Barking and Dagenham","RVR",7
"E09000002","Barking and Dagenham","RWF",7
"E09000002","Barking and Dagenham","RGP",7
"E09000002","Barking and Dagenham","RTP",7
"E09000002","Barking and Dagenham","RGT",7
"E09000002","Barking and Dagenham","RWE",6
"E09000002","Barking and Dagenham","RWH",5
"E09000002","Barking and Dagenham","RDU",5
"E09000002","Barking and Dagenham","RW6",5
"E09000002","Barking and Dagenham","RA7",4
"E09000002","Barking and Dagenham","RAX",4
"E09000002","Barking and Dagenham","RWG",4
"E09000002","Barking and Dagenham","RXQ",4
"E09000002","Barking and Dagenham","RAS",4
"E09000002","Barking and Dagenham","R0A",3
"E09000002","Barking and Dagenham","RCX",3
"E09000002","Barking and Dagenham","RWD",3
"E09000002","Barking and Dagenham","RXC",3
"E09000002","Barking and Dagenham","RXH",3
"E09000002","Barking and Dagenham","RX1",3
"E09000002","Barking and Dagenham","RTH",3
"E09000002","Barking and Dagenham","R1L",3
"E09000002","Barking and Dagenham","RAN",3
"E09000002","Barking and Dagenham","RBA",3
"E09000002","Barking and Dagenham","RM1",3
"E09000002","Barking and Dagenham","RTD",3
"E09000002","Barking and Dagenham","RBD",3
"E09000002","Barking and Dagenham","RMC",2
"E09000002","Barking and Dagenham","REM",2
"E09000002","Barking and Dagenham","RHM",2
"E09000002","Barking and Dagenham","RRK",2
"E09000002","Barking and Dagenham","RTK",2
"E09000002","Barking and Dagenham","RGR",2
"E09000002","Barking and Dagenham","RH8",2
"E09000002","Barking and Dagenham","RT3",2
"E09000002","Barking and Dagenham","RJE",2
"E09000002","Barking and Dagenham","RL4",2
"E09000002","Barking and Dagenham","RR8",2
"E09000002","Barking and Dagenham","RVJ",2
"E09000002","Barking and Dagenham","RXL",2
"E09000002","Barking and Dagenham","RA9",2
"E09000002","Barking and Dagenham","REF",2
"E09000002","Barking and Dagenham","RN5",2
"E09000002","Barking and Dagenham","RHW",2
"E09000002","Barking and Dagenham","RJL",2
"E09000002","Barking and Dagenham","RGM",2
"E09000002","Barking and Dagenham","RA2",1
"E09000002","Barking and Dagenham","RFR",1
"E09000002","Barking and Dagenham","RQ3",1
"E09000002","Barking and Dagenham","RTE",1
"E09000002","Barking and Dagenham","RVY",1
"E09000002","Barking and Dagenham","RWA",1
"E09000002","Barking and Dagenham","RCF",1
"E09000002","Barking and Dagenham","RHU",1
"E09000002","Barking and Dagenham","RK9",1
"E09000002","Barking and Dagenham","RV3",1
"E09000002","Barking and Dagenham","RWP",1
"E09000002","Barking and Dagenham","RWY",1
"E09000002","Barking and Dagenham","RAE",1
"E09000002","Barking and Dagenham","RXW",1
"E09000002","Barking and Dagenham","RBZ",1
"E09000002","Barking and Dagenham","RHQ",1
"E09000002","Barking and Dagenham","RPY",1
"E09000002","Barking and Dagenham","RWW",1
"E09000002","Barking and Dagenham","RXK",1
"E09000002","Barking and Dagenham","RA4",1
"E09000002","Barking and Dagenham","RGN",1
"E09000002","Barking and Dagenham","RQY",1
"E09000002","Barking and Dagenham","RPC",1
"E09000002","Barking and Dagenham","RXP",1
"E09000002","Barking and Dagenham","RCB",1
"E09000002","Barking and Dagenham","RD8",1
"E09000002","Barking and Dagenham","RFF",1
"E09000002","Barking and Dagenham","RMY",1
"E09000002","Barking and Dagenham","RNU",1
"E09000002","Barking and Dagenham","RC1",1
"E09000002","Barking and Dagenham","RDZ",1
"E09000003","Barnet","RAL",26012
"E09000003","Barnet","R1K",2055
"E09000003","Barnet","RRV",1713
"E09000003","Barnet","RKE",1349
"E09000003","Barnet","RYJ",637
"E09000003","Barnet","RAP",387
"E09000003","Barnet","R1H",384
"E09000003","Barnet","RJ1",168
"E09000003","Barnet","RQM",100
"E09000003","Barnet","RWG",94
"E09000003","Barnet","RP6",94
"E09000003","Barnet","RWH",72
"E09000003","Barnet","RWK",49
"E09000003","Barnet","RQX",46
"E09000003","Barnet","RP4",39
"E09000003","Barnet","RPY",39
"E09000003","Barnet","RT3",36
"E09000003","Barnet","RJ7",31
"E09000003","Barnet","RC9",30
"E09000003","Barnet","RJZ",27
"E09000003","Barnet","RDU",23
"E09000003","Barnet","RQW",23
"E09000003","Barnet","RTH",21
"E09000003","Barnet","RAS",20
"E09000003","Barnet","RD8",19
"E09000003","Barnet","RXQ",15
"E09000003","Barnet","RF4",15
"E09000003","Barnet","RJ6",15
"E09000003","Barnet","RAN",14
"E09000003","Barnet","RDE",14
"E09000003","Barnet","RGT",13
"E09000003","Barnet","R0A",12
"E09000003","Barnet","RWE",12
"E09000003","Barnet","RJ2",19
"E09000003","Barnet","RDZ",11
"E09000003","Barnet","RQ8",11
"E09000003","Barnet","REF",10
"E09000003","Barnet","RWF",10
"E09000003","Barnet","RVV",9
"E09000003","Barnet","RX1",9
"E09000003","Barnet","RHU",9
"E09000003","Barnet","RV3",9
"E09000003","Barnet","RA2",8
"E09000003","Barnet","RDD",8
"E09000003","Barnet","RAX",8
"E09000003","Barnet","RD3",8
"E09000003","Barnet","RN7",8
"E09000003","Barnet","RGP",8
"E09000003","Barnet","RTP",8
"E09000003","Barnet","RN5",7
"E09000003","Barnet","RNZ",7
"E09000003","Barnet","RRK",12
"E09000003","Barnet","RXH",7
"E09000003","Barnet","RYR",6
"E09000003","Barnet","RAJ",6
"E09000003","Barnet","RW6",6
"E09000003","Barnet","RXC",6
"E09000003","Barnet","RD1",6
"E09000003","Barnet","RHW",6
"E09000003","Barnet","RN3",6
"E09000003","Barnet","RTK",5
"E09000003","Barnet","RC1",5
"E09000003","Barnet","RHM",5
"E09000003","Barnet","RWR",5
"E09000003","Barnet","RM1",5
"E09000003","Barnet","RVJ",5
"E09000003","Barnet","RBD",5
"E09000003","Barnet","RTE",5
"E09000003","Barnet","RTG",6
"E09000003","Barnet","RGR",4
"E09000003","Barnet","RXN",4
"E09000003","Barnet","RJE",4
"E09000003","Barnet","RNS",4
"E09000003","Barnet","RCX",4
"E09000003","Barnet","RVR",4
"E09000003","Barnet","RBA",4
"E09000003","Barnet","RPA",4
"E09000003","Barnet","RJR",4
"E09000003","Barnet","RKB",4
"E09000003","Barnet","RNQ",4
"E09000003","Barnet","RBT",4
"E09000003","Barnet","R1F",3
"E09000003","Barnet","REM",4
"E09000003","Barnet","RAE",3
"E09000003","Barnet","RK9",3
"E09000003","Barnet","RXK",5
"E09000003","Barnet","RWP",3
"E09000003","Barnet","RBS",3
"E09000003","Barnet","RNL",3
"E09000003","Barnet","RJL",2
"E09000003","Barnet","RVW",2
"E09000003","Barnet","RWD",2
"E09000003","Barnet","RGM",2
"E09000003","Barnet","R0B",2
"E09000003","Barnet","RM3",2
"E09000003","Barnet","RTD",2
"E09000003","Barnet","RXP",2
"E09000003","Barnet","RA9",2
"E09000003","Barnet","RJC",2
"E09000003","Barnet","RVY",2
"E09000003","Barnet","RXW",2
"E09000003","Barnet","RA7",2
"E09000003","Barnet","RPC",2
"E09000003","Barnet","RH8",1
"E09000003","Barnet","RTQ",1
"E09000003","Barnet","RV5",1
"E09000003","Barnet","RBN",1
"E09000003","Barnet","RBZ",1
"E09000003","Barnet","RCB",1
"E09000003","Barnet","RR7",1
"E09000003","Barnet","RCD",1
"E09000003","Barnet","RFF",1
"E09000003","Barnet","RJN",1
"E09000003","Barnet","RLT",1
"E09000003","Barnet","RMC",1
"E09000003","Barnet","RP5",1
"E09000003","Barnet","RR8",1
"E09000003","Barnet","RWY",1
"E09000003","Barnet","RYG",1
"E09000003","Barnet","RMP",1
"E09000003","Barnet","RWA",1
"E09000003","Barnet","RX4",1
"E09000003","Barnet","RA3",1
"E09000003","Barnet","RAT",1
"E09000003","Barnet","RGN",1
"E09000003","Barnet","RRF",1
"E09000003","Barnet","RWJ",1
"E09000003","Barnet","RXF",1
"E09000003","Barnet","RHQ",1
"E09000003","Barnet","RK5",1
"E09000003","Barnet","RLQ",1
"E09000003","Barnet","RA4",1
"E09000003","Barnet","RBK",1
"E09000003","Barnet","RTX",1
"E09000004","Bexley","RJ2",14101
"E09000004","Bexley","RN7",7118
"E09000004","Bexley","RJZ",3098
"E09000004","Bexley","RJ1",1170
"E09000004","Bexley","RPG",314
"E09000004","Bexley","R1H",157
"E09000004","Bexley","RPC",113
"E09000004","Bexley","RPA",105
"E09000004","Bexley","RQX",74
"E09000004","Bexley","RRV",71
"E09000004","Bexley","RVV",49
"E09000004","Bexley","RWF",46
"E09000004","Bexley","RJ7",44
"E09000004","Bexley","RQM",28
"E09000004","Bexley","RP6",26
"E09000004","Bexley","RYJ",25
"E09000004","Bexley","RXC",24
"E09000004","Bexley","RJ6",18
"E09000004","Bexley","RDD",17
"E09000004","Bexley","RF4",16
"E09000004","Bexley","RAL",16
"E09000004","Bexley","RT3",13
"E09000004","Bexley","RTP",13
"E09000004","Bexley","RQW",12
"E09000004","Bexley","RVR",12
"E09000004","Bexley","RHM",11
"E09000004","Bexley","R1K",11
"E09000004","Bexley","RDU",11
"E09000004","Bexley","RWK",11
"E09000004","Bexley","RYR",10
"E09000004","Bexley","RKE",9
"E09000004","Bexley","RXH",9
"E09000004","Bexley","RAP",9
"E09000004","Bexley","RAJ",8
"E09000004","Bexley","REF",8
"E09000004","Bexley","RGP",8
"E09000004","Bexley","RQ8",8
"E09000004","Bexley","RWE",8
"E09000004","Bexley","RXY",8
"E09000004","Bexley","RDZ",7
"E09000004","Bexley","RWH",7
"E09000004","Bexley","RGT",7
"E09000004","Bexley","RA9",6
"E09000004","Bexley","RL4",6
"E09000004","Bexley","RX1",6
"E09000004","Bexley","RAS",5
"E09000004","Bexley","RAX",5
"E09000004","Bexley","RDE",5
"E09000004","Bexley","RTE",5
"E09000004","Bexley","RPY",5
"E09000004","Bexley","RTH",5
"E09000004","Bexley","RGR",4
"E09000004","Bexley","RK9",4
"E09000004","Bexley","RVJ",4
"E09000004","Bexley","RWG",4
"E09000004","Bexley","RNL",4
"E09000004","Bexley","RCB",4
"E09000004","Bexley","RHW",3
"E09000004","Bexley","RN5",3
"E09000004","Bexley","RGN",3
"E09000004","Bexley","RH8",3
"E09000004","Bexley","RM1",3
"E09000004","Bexley","RXQ",3
"E09000004","Bexley","RCX",3
"E09000004","Bexley","R1F",3
"E09000004","Bexley","RLQ",3
"E09000004","Bexley","RD3",3
"E09000004","Bexley","RC1",2
"E09000004","Bexley","RKB",2
"E09000004","Bexley","RNZ",2
"E09000004","Bexley","RRK",4
"E09000004","Bexley","REM",2
"E09000004","Bexley","RTR",2
"E09000004","Bexley","RHU",2
"E09000004","Bexley","RVW",2
"E09000004","Bexley","RBK",2
"E09000004","Bexley","RJE",2
"E09000004","Bexley","RBA",2
"E09000004","Bexley","RBD",2
"E09000004","Bexley","RXK",3
"E09000004","Bexley","RXP",2
"E09000004","Bexley","RAN",2
"E09000004","Bexley","RBZ",2
"E09000004","Bexley","RNQ",2
"E09000004","Bexley","RN3",2
"E09000004","Bexley","RTF",2
"E09000004","Bexley","RV5",2
"E09000004","Bexley","NDA",1
"E09000004","Bexley","RM3",1
"E09000004","Bexley","RP4",1
"E09000004","Bexley","RR7",1
"E09000004","Bexley","R1L",1
"E09000004","Bexley","RA4",1
"E09000004","Bexley","RC9",1
"E09000004","Bexley","RD1",1
"E09000004","Bexley","RTK",1
"E09000004","Bexley","RHQ",1
"E09000004","Bexley","RWP",1
"E09000004","Bexley","RXF",1
"E09000004","Bexley","RXN",1
"E09000004","Bexley","RBN",1
"E09000004","Bexley","RD8",1
"E09000004","Bexley","RTX",1
"E09000004","Bexley","RCF",1
"E09000004","Bexley","RR8",1
"E09000004","Bexley","RWD",1
"E09000004","Bexley","R0A",1
"E09000004","Bexley","RGM",1
"E09000004","Bexley","RW1",1
"E09000004","Bexley","RYG",1
"E09000004","Bexley","RA2",1
"E09000004","Bexley","RA7",1
"E09000004","Bexley","RJC",1
"E09000004","Bexley","RQ3",1
"E09000004","Bexley","RQY",1
"E09000005","Brent","R1K",21139
"E09000005","Brent","RYJ",7351
"E09000005","Brent","RAL",3258
"E09000005","Brent","RRV",646
"E09000005","Brent","RQM",417
"E09000005","Brent","RV3",415
"E09000005","Brent","RJ1",220
"E09000005","Brent","R1H",166
"E09000005","Brent","RT3",86
"E09000005","Brent","RKE",74
"E09000005","Brent","RWG",70
"E09000005","Brent","RAS",65
"E09000005","Brent","RJ7",61
"E09000005","Brent","RWH",54
"E09000005","Brent","RJZ",39
"E09000005","Brent","RAP",37
"E09000005","Brent","RP6",36
"E09000005","Brent","RC9",35
"E09000005","Brent","RDU",30
"E09000005","Brent","RQX",28
"E09000005","Brent","RAX",20
"E09000005","Brent","RP4",19
"E09000005","Brent","RWE",17
"E09000005","Brent","RF4",16
"E09000005","Brent","RRK",21
"E09000005","Brent","RPY",15
"E09000005","Brent","RXQ",12
"E09000005","Brent","RJ2",19
"E09000005","Brent","RTP",11
"E09000005","Brent","RNS",11
"E09000005","Brent","RVR",11
"E09000005","Brent","RHW",10
"E09000005","Brent","R0A",10
"E09000005","Brent","RTH",10
"E09000005","Brent","RWK",9
"E09000005","Brent","RDE",9
"E09000005","Brent","RTK",9
"E09000005","Brent","RW6",8
"E09000005","Brent","RH8",7
"E09000005","Brent","RHM",7
"E09000005","Brent","RAE",6
"E09000005","Brent","RPA",6
"E09000005","Brent","RA7",6
"E09000005","Brent","RMC",6
"E09000005","Brent","RDZ",6
"E09000005","Brent","RKB",6
"E09000005","Brent","RAN",6
"E09000005","Brent","RXH",6
"E09000005","Brent","RQW",5
"E09000005","Brent","RXC",5
"E09000005","Brent","RD8",5
"E09000005","Brent","RJ6",5
"E09000005","Brent","RVV",5
"E09000005","Brent","RD1",5
"E09000005","Brent","RM1",5
"E09000005","Brent","RYR",5
"E09000005","Brent","RGT",4
"E09000005","Brent","RNZ",4
"E09000005","Brent","RN3",4
"E09000005","Brent","RR8",4
"E09000005","Brent","RVJ",4
"E09000005","Brent","RGN",4
"E09000005","Brent","RN5",4
"E09000005","Brent","RGP",3
"E09000005","Brent","RQ8",3
"E09000005","Brent","RWF",3
"E09000005","Brent","RGR",3
"E09000005","Brent","REM",5
"E09000005","Brent","RA2",3
"E09000005","Brent","RBK",3
"E09000005","Brent","RXK",4
"E09000005","Brent","RBD",3
"E09000005","Brent","RTE",3
"E09000005","Brent","RX1",3
"E09000005","Brent","RNQ",3
"E09000005","Brent","RQ3",3
"E09000005","Brent","RK9",3
"E09000005","Brent","RCF",2
"E09000005","Brent","RDD",2
"E09000005","Brent","RC1",2
"E09000005","Brent","RD3",2
"E09000005","Brent","RXL",2
"E09000005","Brent","RXW",2
"E09000005","Brent","RBL",2
"E09000005","Brent","REF",2
"E09000005","Brent","RWP",2
"E09000005","Brent","RAT",2
"E09000005","Brent","RJE",2
"E09000005","Brent","RTD",2
"E09000005","Brent","RTG",2
"E09000005","Brent","RWA",2
"E09000005","Brent","RXF",2
"E09000005","Brent","RA9",1
"E09000005","Brent","RBS",1
"E09000005","Brent","RCX",1
"E09000005","Brent","RLQ",1
"E09000005","Brent","RLT",1
"E09000005","Brent","RJR",1
"E09000005","Brent","R0B",1
"E09000005","Brent","RPG",1
"E09000005","Brent","RR7",1
"E09000005","Brent","RHQ",1
"E09000005","Brent","RMY",1
"E09000005","Brent","R1L",1
"E09000005","Brent","RBT",1
"E09000005","Brent","REP",1
"E09000005","Brent","RNU",1
"E09000005","Brent","RBZ",1
"E09000005","Brent","RCB",1
"E09000005","Brent","RW1",1
"E09000005","Brent","RWD",1
"E09000005","Brent","RXR",1
"E09000005","Brent","RAJ",1
"E09000005","Brent","RBN",1
"E09000005","Brent","RCD",1
"E09000005","Brent","RJC",1
"E09000005","Brent","RWJ",1
"E09000005","Brent","R1F",1
"E09000005","Brent","RP5",1
"E09000006","Bromley","RJZ",21691
"E09000006","Bromley","RJ2",2268
"E09000006","Bromley","RJ1",1118
"E09000006","Bromley","RJ6",660
"E09000006","Bromley","RPG",449
"E09000006","Bromley","RPC",223
"E09000006","Bromley","RJ7",201
"E09000006","Bromley","RN7",136
"E09000006","Bromley","RWF",135
"E09000006","Bromley","R1H",107
"E09000006","Bromley","RRV",110
"E09000006","Bromley","RVR",48
"E09000006","Bromley","RXC",41
"E09000006","Bromley","RQM",40
"E09000006","Bromley","RYJ",37
"E09000006","Bromley","RP6",35
"E09000006","Bromley","RVV",32
"E09000006","Bromley","RTP",29
"E09000006","Bromley","RPA",28
"E09000006","Bromley","RXH",23
"E09000006","Bromley","RDD",22
"E09000006","Bromley","R1K",21
"E09000006","Bromley","RAL",16
"E09000006","Bromley","RAX",16
"E09000006","Bromley","RF4",16
"E09000006","Bromley","RT3",15
"E09000006","Bromley","RV5",15
"E09000006","Bromley","RDU",14
"E09000006","Bromley","RYR",13
"E09000006","Bromley","RQX",12
"E09000006","Bromley","REF",12
"E09000006","Bromley","RPY",12
"E09000006","Bromley","RHW",11
"E09000006","Bromley","RM1",11
"E09000006","Bromley","RWE",10
"E09000006","Bromley","RN5",10
"E09000006","Bromley","RDE",9
"E09000006","Bromley","RKE",9
"E09000006","Bromley","RA9",9
"E09000006","Bromley","RA2",8
"E09000006","Bromley","R1F",7
"E09000006","Bromley","RBZ",7
"E09000006","Bromley","RK9",7
"E09000006","Bromley","RWK",7
"E09000006","Bromley","RD1",6
"E09000006","Bromley","RM3",6
"E09000006","Bromley","RQW",6
"E09000006","Bromley","RAP",6
"E09000006","Bromley","RQY",6
"E09000006","Bromley","RRK",9
"E09000006","Bromley","RKB",6
"E09000006","Bromley","RDZ",5
"E09000006","Bromley","RGT",5
"E09000006","Bromley","RBA",5
"E09000006","Bromley","RGN",5
"E09000006","Bromley","RAS",5
"E09000006","Bromley","RGR",5
"E09000006","Bromley","RHU",5
"E09000006","Bromley","RC9",5
"E09000006","Bromley","RA7",5
"E09000006","Bromley","RTH",5
"E09000006","Bromley","RXQ",5
"E09000006","Bromley","RCB",4
"E09000006","Bromley","RQ8",4
"E09000006","Bromley","RX1",4
"E09000006","Bromley","RHM",4
"E09000006","Bromley","RVJ",4
"E09000006","Bromley","RNQ",4
"E09000006","Bromley","RBD",4
"E09000006","Bromley","RR8",4
"E09000006","Bromley","RFS",3
"E09000006","Bromley","RXK",4
"E09000006","Bromley","RAJ",3
"E09000006","Bromley","RC1",3
"E09000006","Bromley","RD3",3
"E09000006","Bromley","R0A",3
"E09000006","Bromley","REM",4
"E09000006","Bromley","RH8",3
"E09000006","Bromley","RTK",3
"E09000006","Bromley","RWP",3
"E09000006","Bromley","RTE",3
"E09000006","Bromley","RP4",3
"E09000006","Bromley","RJE",3
"E09000006","Bromley","RWH",3
"E09000006","Bromley","RBK",2
"E09000006","Bromley","RGP",2
"E09000006","Bromley","RBL",2
"E09000006","Bromley","RXR",2
"E09000006","Bromley","RNS",2
"E09000006","Bromley","RCX",2
"E09000006","Bromley","RNA",2
"E09000006","Bromley","RWG",2
"E09000006","Bromley","RXL",2
"E09000006","Bromley","RWA",2
"E09000006","Bromley","RNZ",2
"E09000006","Bromley","RTX",2
"E09000006","Bromley","RHQ",2
"E09000006","Bromley","RXW",2
"E09000006","Bromley","RJC",2
"E09000006","Bromley","RJR",2
"E09000006","Bromley","RVW",2
"E09000006","Bromley","RAN",1
"E09000006","Bromley","R0B",1
"E09000006","Bromley","RH5",1
"E09000006","Bromley","RL4",1
"E09000006","Bromley","RCD",1
"E09000006","Bromley","RW6",1
"E09000006","Bromley","RQ3",1
"E09000006","Bromley","RWJ",1
"E09000006","Bromley","RLQ",1
"E09000006","Bromley","RNU",1
"E09000006","Bromley","TAJ",1
"E09000006","Bromley","RBT",1
"E09000006","Bromley","RCF",1
"E09000006","Bromley","RTF",1
"E09000006","Bromley","RVY",1
"E09000006","Bromley","RNL",1
"E09000006","Bromley","RD8",1
"E09000006","Bromley","RWY",1
"E09000006","Bromley","RAE",1
"E09000006","Bromley","RWD",1
"E09000007","Camden","RRV",7774
"E09000007","Camden","RAL",7193
"E09000007","Camden","RYJ",828
"E09000007","Camden","RKE",765
"E09000007","Camden","R1H",364
"E09000007","Camden","RJ1",195
"E09000007","Camden","RQM",89
"E09000007","Camden","R1K",81
"E09000007","Camden","RQX",54
"E09000007","Camden","RAP",41
"E09000007","Camden","RP6",36
"E09000007","Camden","RJZ",36
"E09000007","Camden","RJ7",32
"E09000007","Camden","RF4",24
"E09000007","Camden","RTH",21
"E09000007","Camden","RPY",20
"E09000007","Camden","RP4",19
"E09000007","Camden","RAS",17
"E09000007","Camden","RWG",15
"E09000007","Camden","R0A",13
"E09000007","Camden","RAX",13
"E09000007","Camden","RT3",13
"E09000007","Camden","RWH",11
"E09000007","Camden","RWE",9
"E09000007","Camden","RXQ",9
"E09000007","Camden","RGT",9
"E09000007","Camden","RDU",8
"E09000007","Camden","RWF",8
"E09000007","Camden","RJ2",13
"E09000007","Camden","RWK",8
"E09000007","Camden","RDE",7
"E09000007","Camden","RVJ",7
"E09000007","Camden","REF",7
"E09000007","Camden","RNS",7
"E09000007","Camden","RVR",7
"E09000007","Camden","RXH",7
"E09000007","Camden","RC9",6
"E09000007","Camden","RDZ",6
"E09000007","Camden","RN7",6
"E09000007","Camden","RBD",6
"E09000007","Camden","RHM",6
"E09000007","Camden","RM1",6
"E09000007","Camden","RDD",6
"E09000007","Camden","RXC",6
"E09000007","Camden","RYR",6
"E09000007","Camden","RD1",6
"E09000007","Camden","RJ6",5
"E09000007","Camden","RWD",5
"E09000007","Camden","RA2",5
"E09000007","Camden","RD8",5
"E09000007","Camden","RAN",5
"E09000007","Camden","RKB",5
"E09000007","Camden","RQ8",5
"E09000007","Camden","RRK",9
"E09000007","Camden","RV3",5
"E09000007","Camden","RVV",4
"E09000007","Camden","RC1",4
"E09000007","Camden","RD3",4
"E09000007","Camden","RTE",4
"E09000007","Camden","RR8",4
"E09000007","Camden","RXK",4
"E09000007","Camden","RGN",4
"E09000007","Camden","RTP",4
"E09000007","Camden","RTK",3
"E09000007","Camden","RN3",3
"E09000007","Camden","RJE",3
"E09000007","Camden","RK9",3
"E09000007","Camden","RPA",3
"E09000007","Camden","RTD",3
"E09000007","Camden","RGM",3
"E09000007","Camden","RN5",3
"E09000007","Camden","RQW",3
"E09000007","Camden","RTX",3
"E09000007","Camden","RWJ",3
"E09000007","Camden","RVY",3
"E09000007","Camden","RX1",3
"E09000007","Camden","RCX",2
"E09000007","Camden","RA7",2
"E09000007","Camden","RBA",2
"E09000007","Camden","RBZ",2
"E09000007","Camden","RM3",2
"E09000007","Camden","RNL",2
"E09000007","Camden","R1F",2
"E09000007","Camden","RA9",2
"E09000007","Camden","RHW",2
"E09000007","Camden","RGP",2
"E09000007","Camden","RLQ",2
"E09000007","Camden","RTR",2
"E09000007","Camden","RYV",2
"E09000007","Camden","RAE",2
"E09000007","Camden","RH8",2
"E09000007","Camden","RCB",2
"E09000007","Camden","RHQ",2
"E09000007","Camden","RXW",1
"E09000007","Camden","RET",1
"E09000007","Camden","RGR",1
"E09000007","Camden","RHU",1
"E09000007","Camden","RL4",1
"E09000007","Camden","RMC",1
"E09000007","Camden","RTG",2
"E09000007","Camden","RMP",1
"E09000007","Camden","RX2",1
"E09000007","Camden","RXF",1
"E09000007","Camden","RXL",1
"E09000007","Camden","RXP",1
"E09000007","Camden","RP5",1
"E09000007","Camden","RQ3",1
"E09000007","Camden","RWA",1
"E09000007","Camden","RNZ",1
"E09000007","Camden","RA3",1
"E09000007","Camden","RW4",1
"E09000007","Camden","RXR",1
"E09000007","Camden","RBL",1
"E09000007","Camden","RBS",1
"E09000007","Camden","REM",1
"E09000007","Camden","RPG",1
"E09000007","Camden","RRE",1
"E09000007","Camden","RW6",1
"E09000007","Camden","RBK",1
"E09000007","Camden","RCD",1
"E09000007","Camden","RFS",1
"E09000007","Camden","RJC",1
"E09000007","Camden","RWW",1
"E09000008","Croydon","RJ6",22940
"E09000008","Croydon","RJ7",4595
"E09000008","Croydon","RJZ",2754
"E09000008","Croydon","RVR",1217
"E09000008","Croydon","RTP",930
"E09000008","Croydon","RJ1",704
"E09000008","Croydon","RV5",277
"E09000008","Croydon","RPY",259
"E09000008","Croydon","RJ2",213
"E09000008","Croydon","R1H",139
"E09000008","Croydon","RQM",118
"E09000008","Croydon","RYJ",109
"E09000008","Croydon","RRV",112
"E09000008","Croydon","RP6",100
"E09000008","Croydon","RAX",85
"E09000008","Croydon","RPC",50
"E09000008","Croydon","RWK",49
"E09000008","Croydon","RAL",47
"E09000008","Croydon","RQX",41
"E09000008","Croydon","R1K",38
"E09000008","Croydon","RWF",34
"E09000008","Croydon","RXC",31
"E09000008","Croydon","RXH",31
"E09000008","Croydon","RT3",30
"E09000008","Croydon","RA2",26
"E09000008","Croydon","RYR",25
"E09000008","Croydon","RVV",23
"E09000008","Croydon","RDU",21
"E09000008","Croydon","RTK",18
"E09000008","Croydon","RN7",17
"E09000008","Croydon","RDZ",17
"E09000008","Croydon","REF",16
"E09000008","Croydon","RPA",15
"E09000008","Croydon","RPG",14
"E09000008","Croydon","RF4",13
"E09000008","Croydon","RDE",13
"E09000008","Croydon","RKE",12
"E09000008","Croydon","RQY",12
"E09000008","Croydon","RAP",11
"E09000008","Croydon","RN5",10
"E09000008","Croydon","RTH",10
"E09000008","Croydon","RAN",10
"E09000008","Croydon","RHU",10
"E09000008","Croydon","RAS",10
"E09000008","Croydon","RBA",9
"E09000008","Croydon","RC9",9
"E09000008","Croydon","RDD",11
"E09000008","Croydon","RRK",15
"E09000008","Croydon","RHM",8
"E09000008","Croydon","RD8",8
"E09000008","Croydon","RP4",7
"E09000008","Croydon","RQ8",7
"E09000008","Croydon","RGT",7
"E09000008","Croydon","RWG",7
"E09000008","Croydon","RKB",6
"E09000008","Croydon","RK9",6
"E09000008","Croydon","REM",7
"E09000008","Croydon","R1F",6
"E09000008","Croydon","RHW",6
"E09000008","Croydon","RWE",5
"E09000008","Croydon","RWH",5
"E09000008","Croydon","RD3",5
"E09000008","Croydon","RBD",5
"E09000008","Croydon","RAE",4
"E09000008","Croydon","RA9",4
"E09000008","Croydon","RQW",4
"E09000008","Croydon","RXL",4
"E09000008","Croydon","RXX",4
"E09000008","Croydon","RMC",4
"E09000008","Croydon","RL4",4
"E09000008","Croydon","RX1",4
"E09000008","Croydon","R1L",3
"E09000008","Croydon","RTG",4
"E09000008","Croydon","RBZ",3
"E09000008","Croydon","RHQ",3
"E09000008","Croydon","RR8",3
"E09000008","Croydon","RTE",3
"E09000008","Croydon","RA7",3
"E09000008","Croydon","RBK",3
"E09000008","Croydon","RBT",3
"E09000008","Croydon","RW6",3
"E09000008","Croydon","RGP",3
"E09000008","Croydon","RXK",5
"E09000008","Croydon","RXQ",3
"E09000008","Croydon","RXW",4
"E09000008","Croydon","RM3",3
"E09000008","Croydon","RNS",3
"E09000008","Croydon","RXP",3
"E09000008","Croydon","R0A",3
"E09000008","Croydon","RNZ",2
"E09000008","Croydon","RTD",2
"E09000008","Croydon","RXY",2
"E09000008","Croydon","RGN",2
"E09000008","Croydon","RAJ",2
"E09000008","Croydon","RLQ",2
"E09000008","Croydon","RNA",2
"E09000008","Croydon","RTR",2
"E09000008","Croydon","RWW",2
"E09000008","Croydon","RCD",2
"E09000008","Croydon","RCX",2
"E09000008","Croydon","RW1",2
"E09000008","Croydon","RX2",2
"E09000008","Croydon","RCB",2
"E09000008","Croydon","RFS",2
"E09000008","Croydon","RC1",2
"E09000008","Croydon","RVJ",2
"E09000008","Croydon","RJR",1
"E09000008","Croydon","RM1",1
"E09000008","Croydon","RWJ",1
"E09000008","Croydon","RWP",1
"E09000008","Croydon","RXN",1
"E09000008","Croydon","RBS",1
"E09000008","Croydon","RXG",1
"E09000008","Croydon","RGM",1
"E09000008","Croydon","RGR",1
"E09000008","Croydon","RJL",1
"E09000008","Croydon","RTX",1
"E09000008","Croydon","RWA",1
"E09000008","Croydon","RXF",1
"E09000008","Croydon","RH8",1
"E09000008","Croydon","RAT",1
"E09000008","Croydon","RNU",1
"E09000008","Croydon","RP5",1
"E09000008","Croydon","RV3",1
"E09000008","Croydon","RQ3",1
"E09000008","Croydon","RXR",1
"E09000008","Croydon","RJC",1
"E09000008","Croydon","R0B",1
"E09000008","Croydon","RTF",1
"E09000008","Croydon","RWD",1
"E09000008","Croydon","RWY",1
"E09000008","Croydon","RA3",1
"E09000008","Croydon","RA4",1
"E09000008","Croydon","RBN",1
"E09000008","Croydon","RD1",1
"E09000008","Croydon","RJE",1
"E09000008","Croydon","RN3",1
"E09000008","Croydon","RR7",1
"E09000008","Croydon","RVY",1
"E09000009","Ealing","R1K",22517
"E09000009","Ealing","RYJ",6811
"E09000009","Ealing","RQM",3976
"E09000009","Ealing","RAS",1843
"E09000009","Ealing","RRV",227
"E09000009","Ealing","RJ1",181
"E09000009","Ealing","RAL",166
"E09000009","Ealing","R1H",125
"E09000009","Ealing","RDU",124
"E09000009","Ealing","RT3",115
"E09000009","Ealing","RJ7",70
"E09000009","Ealing","RP6",54
"E09000009","Ealing","RAX",51
"E09000009","Ealing","RJZ",47
"E09000009","Ealing","RWG",40
"E09000009","Ealing","RWH",37
"E09000009","Ealing","RPY",34
"E09000009","Ealing","RTH",28
"E09000009","Ealing","RQX",21
"E09000009","Ealing","RAP",20
"E09000009","Ealing","RV3",19
"E09000009","Ealing","RTK",18
"E09000009","Ealing","RXQ",17
"E09000009","Ealing","RC9",16
"E09000009","Ealing","RXH",14
"E09000009","Ealing","RVR",14
"E09000009","Ealing","RYR",14
"E09000009","Ealing","RF4",13
"E09000009","Ealing","RP4",13
"E09000009","Ealing","RXC",12
"E09000009","Ealing","RDE",11
"E09000009","Ealing","RA2",11
"E09000009","Ealing","RKE",11
"E09000009","Ealing","RJ2",18
"E09000009","Ealing","RJ6",10
"E09000009","Ealing","RTP",10
"E09000009","Ealing","RKB",9
"E09000009","Ealing","RHW",9
"E09000009","Ealing","RDZ",9
"E09000009","Ealing","RA7",8
"E09000009","Ealing","RRK",14
"E09000009","Ealing","RGT",8
"E09000009","Ealing","RWE",8
"E09000009","Ealing","RM1",8
"E09000009","Ealing","RD8",7
"E09000009","Ealing","RW6",7
"E09000009","Ealing","RBD",7
"E09000009","Ealing","RCB",7
"E09000009","Ealing","RVV",6
"E09000009","Ealing","RHM",6
"E09000009","Ealing","REM",8
"E09000009","Ealing","RXK",8
"E09000009","Ealing","RAN",6
"E09000009","Ealing","RK9",5
"E09000009","Ealing","RAE",5
"E09000009","Ealing","RBA",5
"E09000009","Ealing","RVJ",5
"E09000009","Ealing","RX1",5
"E09000009","Ealing","RC1",5
"E09000009","Ealing","RD1",5
"E09000009","Ealing","RHU",5
"E09000009","Ealing","R0A",5
"E09000009","Ealing","RD3",5
"E09000009","Ealing","R1F",4
"E09000009","Ealing","RAJ",4
"E09000009","Ealing","RJC",4
"E09000009","Ealing","RN7",4
"E09000009","Ealing","RTG",4
"E09000009","Ealing","RBZ",4
"E09000009","Ealing","RA3",4
"E09000009","Ealing","RQW",4
"E09000009","Ealing","RWF",4
"E09000009","Ealing","RBK",4
"E09000009","Ealing","RGR",3
"E09000009","Ealing","RA4",3
"E09000009","Ealing","RA9",3
"E09000009","Ealing","RCX",3
"E09000009","Ealing","RPA",3
"E09000009","Ealing","RQY",3
"E09000009","Ealing","RXW",3
"E09000009","Ealing","RDD",3
"E09000009","Ealing","RBL",3
"E09000009","Ealing","RQ8",3
"E09000009","Ealing","RR8",3
"E09000009","Ealing","RH8",3
"E09000009","Ealing","RLQ",2
"E09000009","Ealing","RN3",2
"E09000009","Ealing","RPC",2
"E09000009","Ealing","RTE",2
"E09000009","Ealing","RQ3",4
"E09000009","Ealing","REF",2
"E09000009","Ealing","RFR",2
"E09000009","Ealing","RNL",2
"E09000009","Ealing","RGN",2
"E09000009","Ealing","RTF",2
"E09000009","Ealing","RVN",2
"E09000009","Ealing","RGP",2
"E09000009","Ealing","RTD",2
"E09000009","Ealing","RN5",2
"E09000009","Ealing","RNA",2
"E09000009","Ealing","RNQ",2
"E09000009","Ealing","RTX",2
"E09000009","Ealing","RCU",1
"E09000009","Ealing","RL4",1
"E09000009","Ealing","RTR",1
"E09000009","Ealing","RXN",1
"E09000009","Ealing","RHQ",1
"E09000009","Ealing","RLT",1
"E09000009","Ealing","RP5",2
"E09000009","Ealing","RWK",1
"E09000009","Ealing","RXR",1
"E09000009","Ealing","RJR",1
"E09000009","Ealing","RM3",1
"E09000009","Ealing","RNS",1
"E09000009","Ealing","RNU",1
"E09000009","Ealing","RWJ",1
"E09000009","Ealing","RXL",1
"E09000009","Ealing","R1L",1
"E09000009","Ealing","RFS",1
"E09000009","Ealing","RMP",1
"E09000009","Ealing","RRF",1
"E09000009","Ealing","RV5",1
"E09000009","Ealing","RWP",1
"E09000009","Ealing","RFF",1
"E09000009","Ealing","RMC",1
"E09000009","Ealing","RX2",1
"E09000009","Ealing","RWD",1
"E09000010","Enfield","RAP",19920
"E09000010","Enfield","RAL",8217
"E09000010","Enfield","RRV",1236
"E09000010","Enfield","R1H",1018
"E09000010","Enfield","RKE",389
"E09000010","Enfield","RJ1",139
"E09000010","Enfield","RYJ",124
"E09000010","Enfield","RQX",123
"E09000010","Enfield","RQW",113
"E09000010","Enfield","RP6",88
"E09000010","Enfield","R1K",75
"E09000010","Enfield","RWH",73
"E09000010","Enfield","RQM",64
"E09000010","Enfield","RF4",51
"E09000010","Enfield","RQ8",40
"E09000010","Enfield","RJZ",30
"E09000010","Enfield","RJ7",25
"E09000010","Enfield","RWK",24
"E09000010","Enfield","RPY",21
"E09000010","Enfield","RP4",20
"E09000010","Enfield","RGT",19
"E09000010","Enfield","RWG",18
"E09000010","Enfield","RDD",21
"E09000010","Enfield","RJ2",27
"E09000010","Enfield","RDU",15
"E09000010","Enfield","RAS",15
"E09000010","Enfield","RDE",15
"E09000010","Enfield","RT3",14
"E09000010","Enfield","RC9",14
"E09000010","Enfield","RAN",13
"E09000010","Enfield","RAX",12
"E09000010","Enfield","RTH",11
"E09000010","Enfield","REF",11
"E09000010","Enfield","RD8",11
"E09000010","Enfield","RM1",11
"E09000010","Enfield","RC1",10
"E09000010","Enfield","RWF",9
"E09000010","Enfield","RD3",9
"E09000010","Enfield","RVR",9
"E09000010","Enfield","RDZ",9
"E09000010","Enfield","RA7",8
"E09000010","Enfield","RA2",7
"E09000010","Enfield","RH8",7
"E09000010","Enfield","RD1",6
"E09000010","Enfield","RGR",6
"E09000010","Enfield","RRK",9
"E09000010","Enfield","RN3",6
"E09000010","Enfield","RGP",6
"E09000010","Enfield","RHM",5
"E09000010","Enfield","RXQ",5
"E09000010","Enfield","RTP",5
"E09000010","Enfield","RAJ",5
"E09000010","Enfield","RX1",5
"E09000010","Enfield","RGM",5
"E09000010","Enfield","RXH",5
"E09000010","Enfield","RNS",5
"E09000010","Enfield","RKB",4
"E09000010","Enfield","RTD",4
"E09000010","Enfield","REM",4
"E09000010","Enfield","RYR",4
"E09000010","Enfield","RXC",4
"E09000010","Enfield","RN7",4
"E09000010","Enfield","RTX",4
"E09000010","Enfield","RN5",3
"E09000010","Enfield","RTE",3
"E09000010","Enfield","RYV",3
"E09000010","Enfield","RJE",3
"E09000010","Enfield","RWE",3
"E09000010","Enfield","RCX",3
"E09000010","Enfield","RTG",3
"E09000010","Enfield","RHW",3
"E09000010","Enfield","RVV",3
"E09000010","Enfield","R0A",3
"E09000010","Enfield","RBA",3
"E09000010","Enfield","RVJ",3
"E09000010","Enfield","RBD",2
"E09000010","Enfield","RP5",3
"E09000010","Enfield","RTK",2
"E09000010","Enfield","RJ6",2
"E09000010","Enfield","RWA",2
"E09000010","Enfield","RAT",2
"E09000010","Enfield","RQ3",2
"E09000010","Enfield","RWP",2
"E09000010","Enfield","RXL",2
"E09000010","Enfield","RGN",2
"E09000010","Enfield","R1L",2
"E09000010","Enfield","RCB",2
"E09000010","Enfield","RCD",2
"E09000010","Enfield","RFR",2
"E09000010","Enfield","RK5",2
"E09000010","Enfield","RMC",2
"E09000010","Enfield","RXK",3
"E09000010","Enfield","RFS",1
"E09000010","Enfield","RK9",1
"E09000010","Enfield","RTF",1
"E09000010","Enfield","RV3",1
"E09000010","Enfield","RVW",1
"E09000010","Enfield","RA9",1
"E09000010","Enfield","R0B",2
"E09000010","Enfield","RJL",1
"E09000010","Enfield","RNA",1
"E09000010","Enfield","RPA",1
"E09000010","Enfield","RV5",1
"E09000010","Enfield","RBZ",1
"E09000010","Enfield","RHQ",1
"E09000010","Enfield","RPC",1
"E09000010","Enfield","RVY",1
"E09000010","Enfield","RWW",1
"E09000010","Enfield","RXW",1
"E09000010","Enfield","RBS",1
"E09000010","Enfield","RNZ",1
"E09000010","Enfield","RWJ",1
"E09000010","Enfield","RJN",1
"E09000010","Enfield","RJR",1
"E09000010","Enfield","RLQ",1
"E09000010","Enfield","RWR",1
"E09000010","Enfield","R1F",1
"E09000010","Enfield","RAE",1
"E09000010","Enfield","RBN",1
"E09000010","Enfield","RBQ",1
"E09000010","Enfield","RMY",1
"E09000010","Enfield","RXY",1
"E09000010","Enfield","RJC",1
"E09000010","Enfield","RNL",1
"E09000010","Enfield","RTR",1
"E09000011","Greenwich","RJ2",23324
"E09000011","Greenwich","RJ1",1686
"E09000011","Greenwich","RJZ",1626
"E09000011","Greenwich","RPG",367
"E09000011","Greenwich","R1H",330
"E09000011","Greenwich","RN7",274
"E09000011","Greenwich","RRV",118
"E09000011","Greenwich","RYJ",82
"E09000011","Greenwich","RJ7",64
"E09000011","Greenwich","RQM",57
"E09000011","Greenwich","RQX",39
"E09000011","Greenwich","RWF",37
"E09000011","Greenwich","RAL",36
"E09000011","Greenwich","RVV",33
"E09000011","Greenwich","RP6",32
"E09000011","Greenwich","RPA",26
"E09000011","Greenwich","RF4",26
"E09000011","Greenwich","R1K",25
"E09000011","Greenwich","RWK",25
"E09000011","Greenwich","RXC",18
"E09000011","Greenwich","RPY",15
"E09000011","Greenwich","RVR",15
"E09000011","Greenwich","RJ6",13
"E09000011","Greenwich","RQ8",13
"E09000011","Greenwich","RAP",13
"E09000011","Greenwich","REF",12
"E09000011","Greenwich","RKB",12
"E09000011","Greenwich","RKE",12
"E09000011","Greenwich","RGT",12
"E09000011","Greenwich","RAX",11
"E09000011","Greenwich","RWH",10
"E09000011","Greenwich","RYR",10
"E09000011","Greenwich","RWE",10
"E09000011","Greenwich","RT3",10
"E09000011","Greenwich","RDD",9
"E09000011","Greenwich","RDE",9
"E09000011","Greenwich","RXH",9
"E09000011","Greenwich","R0A",9
"E09000011","Greenwich","RV5",8
"E09000011","Greenwich","RWG",8
"E09000011","Greenwich","RPC",8
"E09000011","Greenwich","RRK",13
"E09000011","Greenwich","RA2",7
"E09000011","Greenwich","RD8",7
"E09000011","Greenwich","RXY",7
"E09000011","Greenwich","RDU",7
"E09000011","Greenwich","RDZ",6
"E09000011","Greenwich","RGN",6
"E09000011","Greenwich","RTP",6
"E09000011","Greenwich","RQW",6
"E09000011","Greenwich","RBD",5
"E09000011","Greenwich","RP4",5
"E09000011","Greenwich","RXP",5
"E09000011","Greenwich","RD3",5
"E09000011","Greenwich","RM1",5
"E09000011","Greenwich","RNQ",5
"E09000011","Greenwich","RC9",5
"E09000011","Greenwich","RJE",5
"E09000011","Greenwich","RH8",4
"E09000011","Greenwich","RNS",4
"E09000011","Greenwich","RCB",4
"E09000011","Greenwich","RX1",4
"E09000011","Greenwich","RHW",4
"E09000011","Greenwich","RTE",4
"E09000011","Greenwich","RGR",4
"E09000011","Greenwich","RHM",4
"E09000011","Greenwich","RXW",4
"E09000011","Greenwich","RWA",4
"E09000011","Greenwich","RWY",4
"E09000011","Greenwich","R1F",4
"E09000011","Greenwich","RBA",4
"E09000011","Greenwich","RC1",3
"E09000011","Greenwich","RTH",3
"E09000011","Greenwich","RA9",3
"E09000011","Greenwich","RBZ",3
"E09000011","Greenwich","RXQ",3
"E09000011","Greenwich","RNL",3
"E09000011","Greenwich","RQ3",3
"E09000011","Greenwich","RTK",3
"E09000011","Greenwich","RAE",3
"E09000011","Greenwich","RGP",3
"E09000011","Greenwich","RNZ",3
"E09000011","Greenwich","RAS",3
"E09000011","Greenwich","RAN",2
"E09000011","Greenwich","RFF",2
"E09000011","Greenwich","RVY",2
"E09000011","Greenwich","RXL",2
"E09000011","Greenwich","RN5",2
"E09000011","Greenwich","RTR",2
"E09000011","Greenwich","RXK",2
"E09000011","Greenwich","RXN",2
"E09000011","Greenwich","RCX",2
"E09000011","Greenwich","RK9",2
"E09000011","Greenwich","RNA",2
"E09000011","Greenwich","RTF",2
"E09000011","Greenwich","RHU",2
"E09000011","Greenwich","RK5",2
"E09000011","Greenwich","RYV",2
"E09000011","Greenwich","RDY",2
"E09000011","Greenwich","RJL",2
"E09000011","Greenwich","RLQ",2
"E09000011","Greenwich","RTX",2
"E09000011","Greenwich","RCD",2
"E09000011","Greenwich","RMP",2
"E09000011","Greenwich","RN3",2
"E09000011","Greenwich","RVJ",2
"E09000011","Greenwich","RFR",2
"E09000011","Greenwich","RFS",2
"E09000011","Greenwich","R1A",1
"E09000011","Greenwich","RA7",1
"E09000011","Greenwich","RTD",1
"E09000011","Greenwich","RBQ",1
"E09000011","Greenwich","RCU",1
"E09000011","Greenwich","RTG",1
"E09000011","Greenwich","RM3",1
"E09000011","Greenwich","RA4",1
"E09000011","Greenwich","RAT",1
"E09000011","Greenwich","RGM",1
"E09000011","Greenwich","RMC",1
"E09000011","Greenwich","REM",1
"E09000011","Greenwich","RBV",1
"E09000011","Greenwich","RJC",1
"E09000011","Greenwich","RAJ",1
"E09000011","Greenwich","RH5",1
"E09000011","Greenwich","RWD",1
"E09000011","Greenwich","RBL",1
"E09000011","Greenwich","RBN",1
"E09000011","Greenwich","RJN",1
"E09000011","Greenwich","RQY",1
"E09000011","Greenwich","RXR",1
"E09000011","Greenwich","RD1",1
"E09000011","Greenwich","RL4",1
"E09000011","Greenwich","RW6",1
"E09000011","Greenwich","RWP",1
"E09000012","Hackney","RQX",16190
"E09000012","Hackney","R1H",4683
"E09000012","Hackney","RRV",1019
"E09000012","Hackney","RWK",827
"E09000012","Hackney","RKE",509
"E09000012","Hackney","RJ1",247
"E09000012","Hackney","RAL",235
"E09000012","Hackney","RAP",232
"E09000012","Hackney","RYJ",80
"E09000012","Hackney","RQM",61
"E09000012","Hackney","RF4",60
"E09000012","Hackney","RJZ",57
"E09000012","Hackney","RP6",57
"E09000012","Hackney","R1K",47
"E09000012","Hackney","RJ7",42
"E09000012","Hackney","RJ2",41
"E09000012","Hackney","RDE",19
"E09000012","Hackney","RQ8",18
"E09000012","Hackney","RP4",17
"E09000012","Hackney","RJ6",17
"E09000012","Hackney","RTH",14
"E09000012","Hackney","RDD",13
"E09000012","Hackney","RVV",13
"E09000012","Hackney","RPY",13
"E09000012","Hackney","RAX",11
"E09000012","Hackney","RWG",11
"E09000012","Hackney","RWH",11
"E09000012","Hackney","RGT",10
"E09000012","Hackney","REF",10
"E09000012","Hackney","RQW",10
"E09000012","Hackney","RVR",10
"E09000012","Hackney","RAJ",10
"E09000012","Hackney","RN7",9
"E09000012","Hackney","RWF",9
"E09000012","Hackney","RM1",9
"E09000012","Hackney","R0A",9
"E09000012","Hackney","RX1",9
"E09000012","Hackney","RA7",8
"E09000012","Hackney","RC9",8
"E09000012","Hackney","RYR",8
"E09000012","Hackney","RT3",8
"E09000012","Hackney","RDU",7
"E09000012","Hackney","RD3",7
"E09000012","Hackney","RDZ",7
"E09000012","Hackney","RW6",7
"E09000012","Hackney","RC1",6
"E09000012","Hackney","RWE",6
"E09000012","Hackney","RHW",6
"E09000012","Hackney","RBA",6
"E09000012","Hackney","RTE",5
"E09000012","Hackney","RHQ",5
"E09000012","Hackney","RKB",5
"E09000012","Hackney","RAS",5
"E09000012","Hackney","RD1",5
"E09000012","Hackney","RXH",5
"E09000012","Hackney","RA9",5
"E09000012","Hackney","RAN",5
"E09000012","Hackney","RAT",5
"E09000012","Hackney","RNS",5
"E09000012","Hackney","RPA",5
"E09000012","Hackney","RTP",5
"E09000012","Hackney","RHM",4
"E09000012","Hackney","RBL",4
"E09000012","Hackney","RCX",4
"E09000012","Hackney","RR8",4
"E09000012","Hackney","RRK",4
"E09000012","Hackney","RGP",4
"E09000012","Hackney","RA2",4
"E09000012","Hackney","RD8",4
"E09000012","Hackney","RGN",4
"E09000012","Hackney","RBT",4
"E09000012","Hackney","RNQ",4
"E09000012","Hackney","RVJ",4
"E09000012","Hackney","RXC",4
"E09000012","Hackney","RXW",4
"E09000012","Hackney","RAE",3
"E09000012","Hackney","REM",3
"E09000012","Hackney","RJE",3
"E09000012","Hackney","RM3",3
"E09000012","Hackney","RTK",3
"E09000012","Hackney","RTG",3
"E09000012","Hackney","RK5",3
"E09000012","Hackney","RLQ",3
"E09000012","Hackney","RA4",3
"E09000012","Hackney","RN5",3
"E09000012","Hackney","RBD",2
"E09000012","Hackney","RN3",2
"E09000012","Hackney","RNZ",2
"E09000012","Hackney","RWA",2
"E09000012","Hackney","RXR",2
"E09000012","Hackney","RHU",2
"E09000012","Hackney","RCB",2
"E09000012","Hackney","RXK",2
"E09000012","Hackney","RXQ",2
"E09000012","Hackney","R1L",2
"E09000012","Hackney","RTX",2
"E09000012","Hackney","RWP",2
"E09000012","Hackney","RXF",2
"E09000012","Hackney","RV5",2
"E09000012","Hackney","RVW",2
"E09000012","Hackney","RGR",1
"E09000012","Hackney","RNA",1
"E09000012","Hackney","RV3",1
"E09000012","Hackney","RA3",1
"E09000012","Hackney","RH5",1
"E09000012","Hackney","RCD",1
"E09000012","Hackney","RCF",1
"E09000012","Hackney","RH8",1
"E09000012","Hackney","RLT",1
"E09000012","Hackney","RBS",1
"E09000012","Hackney","RTD",1
"E09000012","Hackney","RTF",1
"E09000012","Hackney","RBN",1
"E09000012","Hackney","RWD",1
"E09000012","Hackney","RBK",1
"E09000012","Hackney","RWW",1
"E09000012","Hackney","RWY",1
"E09000012","Hackney","RGM",1
"E09000012","Hackney","RJC",1
"E09000012","Hackney","RK9",1
"E09000013","Hammersmith and Fulham","RYJ",8965
"E09000013","Hammersmith and Fulham","RQM",4796
"E09000013","Hammersmith and Fulham","R1K",230
"E09000013","Hammersmith and Fulham","RJ1",165
"E09000013","Hammersmith and Fulham","RRV",168
"E09000013","Hammersmith and Fulham","RJ7",119
"E09000013","Hammersmith and Fulham","R1H",80
"E09000013","Hammersmith and Fulham","RPY",57
"E09000013","Hammersmith and Fulham","RAX",49
"E09000013","Hammersmith and Fulham","RJZ",43
"E09000013","Hammersmith and Fulham","RT3",36
"E09000013","Hammersmith and Fulham","RAL",29
"E09000013","Hammersmith and Fulham","RDU",23
"E09000013","Hammersmith and Fulham","RTH",22
"E09000013","Hammersmith and Fulham","RQX",21
"E09000013","Hammersmith and Fulham","RAS",18
"E09000013","Hammersmith and Fulham","RA2",15
"E09000013","Hammersmith and Fulham","RAP",14
"E09000013","Hammersmith and Fulham","RJ6",13
"E09000013","Hammersmith and Fulham","RP6",13
"E09000013","Hammersmith and Fulham","RP4",12
"E09000013","Hammersmith and Fulham","RTE",11
"E09000013","Hammersmith and Fulham","RVR",11
"E09000013","Hammersmith and Fulham","RC9",8
"E09000013","Hammersmith and Fulham","RYR",8
"E09000013","Hammersmith and Fulham","RJ2",12
"E09000013","Hammersmith and Fulham","RN3",8
"E09000013","Hammersmith and Fulham","REF",8
"E09000013","Hammersmith and Fulham","RF4",7
"E09000013","Hammersmith and Fulham","RWG",7
"E09000013","Hammersmith and Fulham","RNZ",7
"E09000013","Hammersmith and Fulham","RWF",7
"E09000013","Hammersmith and Fulham","RDZ",7
"E09000013","Hammersmith and Fulham","RN5",7
"E09000013","Hammersmith and Fulham","RD1",7
"E09000013","Hammersmith and Fulham","RGT",7
"E09000013","Hammersmith and Fulham","RTP",7
"E09000013","Hammersmith and Fulham","RA7",6
"E09000013","Hammersmith and Fulham","RXQ",6
"E09000013","Hammersmith and Fulham","RVJ",6
"E09000013","Hammersmith and Fulham","RXH",6
"E09000013","Hammersmith and Fulham","RD3",6
"E09000013","Hammersmith and Fulham","RRK",7
"E09000013","Hammersmith and Fulham","RKE",6
"E09000013","Hammersmith and Fulham","RDE",6
"E09000013","Hammersmith and Fulham","RTK",5
"E09000013","Hammersmith and Fulham","RVV",5
"E09000013","Hammersmith and Fulham","RBA",5
"E09000013","Hammersmith and Fulham","RM1",5
"E09000013","Hammersmith and Fulham","RA4",5
"E09000013","Hammersmith and Fulham","RNS",5
"E09000013","Hammersmith and Fulham","R0A",5
"E09000013","Hammersmith and Fulham","RXK",4
"E09000013","Hammersmith and Fulham","RHW",4
"E09000013","Hammersmith and Fulham","RBD",4
"E09000013","Hammersmith and Fulham","RAN",3
"E09000013","Hammersmith and Fulham","RHM",3
"E09000013","Hammersmith and Fulham","R1F",3
"E09000013","Hammersmith and Fulham","RWH",3
"E09000013","Hammersmith and Fulham","RD8",3
"E09000013","Hammersmith and Fulham","RBT",3
"E09000013","Hammersmith and Fulham","RR8",3
"E09000013","Hammersmith and Fulham","RKB",3
"E09000013","Hammersmith and Fulham","RXW",3
"E09000013","Hammersmith and Fulham","RK9",2
"E09000013","Hammersmith and Fulham","RGR",2
"E09000013","Hammersmith and Fulham","RM3",2
"E09000013","Hammersmith and Fulham","RWY",2
"E09000013","Hammersmith and Fulham","RXP",2
"E09000013","Hammersmith and Fulham","RCB",2
"E09000013","Hammersmith and Fulham","RQ8",2
"E09000013","Hammersmith and Fulham","RGP",2
"E09000013","Hammersmith and Fulham","RH8",2
"E09000013","Hammersmith and Fulham","RJC",2
"E09000013","Hammersmith and Fulham","REM",2
"E09000013","Hammersmith and Fulham","RW6",2
"E09000013","Hammersmith and Fulham","RQW",2
"E09000013","Hammersmith and Fulham","RBZ",2
"E09000013","Hammersmith and Fulham","RGN",2
"E09000013","Hammersmith and Fulham","RNA",2
"E09000013","Hammersmith and Fulham","RXC",2
"E09000013","Hammersmith and Fulham","RTG",2
"E09000013","Hammersmith and Fulham","RTR",1
"E09000013","Hammersmith and Fulham","RWA",1
"E09000013","Hammersmith and Fulham","RA9",1
"E09000013","Hammersmith and Fulham","RAE",1
"E09000013","Hammersmith and Fulham","RPG",1
"E09000013","Hammersmith and Fulham","RC1",1
"E09000013","Hammersmith and Fulham","RWE",1
"E09000013","Hammersmith and Fulham","RGM",1
"E09000013","Hammersmith and Fulham","RN7",1
"E09000013","Hammersmith and Fulham","RTD",1
"E09000013","Hammersmith and Fulham","RWJ",1
"E09000013","Hammersmith and Fulham","RBN",1
"E09000013","Hammersmith and Fulham","RHU",1
"E09000013","Hammersmith and Fulham","RJR",1
"E09000013","Hammersmith and Fulham","RV3",1
"E09000013","Hammersmith and Fulham","RVY",1
"E09000013","Hammersmith and Fulham","RX1",1
"E09000013","Hammersmith and Fulham","R1J",1
"E09000013","Hammersmith and Fulham","RCF",1
"E09000013","Hammersmith and Fulham","RCX",1
"E09000013","Hammersmith and Fulham","RHQ",1
"E09000013","Hammersmith and Fulham","RPA",1
"E09000013","Hammersmith and Fulham","RWK",1
"E09000013","Hammersmith and Fulham","RXT",1
"E09000013","Hammersmith and Fulham","RCD",1
"E09000013","Hammersmith and Fulham","RDD",1
"E09000013","Hammersmith and Fulham","RJN",1
"E09000013","Hammersmith and Fulham","R0B",1
"E09000013","Hammersmith and Fulham","RNQ",1
"E09000013","Hammersmith and Fulham","RQY",1
"E09000013","Hammersmith and Fulham","RWD",1
"E09000014","Haringey","RAP",10290
"E09000014","Haringey","RKE",5669
"E09000014","Haringey","RAL",1737
"E09000014","Haringey","RRV",1753
"E09000014","Haringey","R1H",961
"E09000014","Haringey","RQX",918
"E09000014","Haringey","RJ1",220
"E09000014","Haringey","RYJ",188
"E09000014","Haringey","R1K",84
"E09000014","Haringey","RQM",79
"E09000014","Haringey","RP6",73
"E09000014","Haringey","RWK",58
"E09000014","Haringey","RJZ",54
"E09000014","Haringey","RJ7",39
"E09000014","Haringey","RWH",28
"E09000014","Haringey","RF4",27
"E09000014","Haringey","RP4",24
"E09000014","Haringey","RQW",23
"E09000014","Haringey","RJ2",28
"E09000014","Haringey","RT3",21
"E09000014","Haringey","RTH",21
"E09000014","Haringey","RWG",20
"E09000014","Haringey","RQ8",20
"E09000014","Haringey","RAS",16
"E09000014","Haringey","RDD",14
"E09000014","Haringey","RDU",14
"E09000014","Haringey","RDE",12
"E09000014","Haringey","RVR",10
"E09000014","Haringey","RTP",10
"E09000014","Haringey","RGT",8
"E09000014","Haringey","RC9",8
"E09000014","Haringey","RJ6",7
"E09000014","Haringey","REF",7
"E09000014","Haringey","RXC",7
"E09000014","Haringey","RGN",7
"E09000014","Haringey","RTE",7
"E09000014","Haringey","RHM",7
"E09000014","Haringey","RAX",7
"E09000014","Haringey","RVV",7
"E09000014","Haringey","R0A",6
"E09000014","Haringey","RPY",6
"E09000014","Haringey","RRK",12
"E09000014","Haringey","RXH",6
"E09000014","Haringey","RYR",6
"E09000014","Haringey","RAT",6
"E09000014","Haringey","RD3",6
"E09000014","Haringey","RAJ",6
"E09000014","Haringey","RM1",6
"E09000014","Haringey","RWF",6
"E09000014","Haringey","RDZ",5
"E09000014","Haringey","RC1",5
"E09000014","Haringey","RGR",5
"E09000014","Haringey","RN7",5
"E09000014","Haringey","RCB",5
"E09000014","Haringey","RXQ",5
"E09000014","Haringey","RA9",4
"E09000014","Haringey","RD8",4
"E09000014","Haringey","RJC",4
"E09000014","Haringey","RV3",4
"E09000014","Haringey","RTG",5
"E09000014","Haringey","R1F",4
"E09000014","Haringey","RA7",4
"E09000014","Haringey","RBV",3
"E09000014","Haringey","RNL",3
"E09000014","Haringey","RQ3",4
"E09000014","Haringey","RAN",3
"E09000014","Haringey","RN5",3
"E09000014","Haringey","RJE",3
"E09000014","Haringey","RCX",3
"E09000014","Haringey","REM",4
"E09000014","Haringey","RGP",2
"E09000014","Haringey","RHW",2
"E09000014","Haringey","RJR",2
"E09000014","Haringey","RVJ",2
"E09000014","Haringey","RXW",2
"E09000014","Haringey","R0B",2
"E09000014","Haringey","RM3",2
"E09000014","Haringey","RNZ",2
"E09000014","Haringey","RAE",2
"E09000014","Haringey","RD1",2
"E09000014","Haringey","RNA",2
"E09000014","Haringey","RTD",2
"E09000014","Haringey","RJL",2
"E09000014","Haringey","RBD",2
"E09000014","Haringey","RTX",2
"E09000014","Haringey","RXK",3
"E09000014","Haringey","RA2",2
"E09000014","Haringey","RN3",2
"E09000014","Haringey","RNS",2
"E09000014","Haringey","RBA",2
"E09000014","Haringey","RK9",2
"E09000014","Haringey","RA4",2
"E09000014","Haringey","RNQ",2
"E09000014","Haringey","RA3",1
"E09000014","Haringey","RBL",1
"E09000014","Haringey","RVW",1
"E09000014","Haringey","RXN",1
"E09000014","Haringey","RBS",1
"E09000014","Haringey","RWA",1
"E09000014","Haringey","RXL",1
"E09000014","Haringey","RCD",1
"E09000014","Haringey","RL4",1
"E09000014","Haringey","RMC",1
"E09000014","Haringey","RR8",1
"E09000014","Haringey","RVN",1
"E09000014","Haringey","RX3",1
"E09000014","Haringey","RK5",1
"E09000014","Haringey","RRE",1
"E09000014","Haringey","RVY",1
"E09000014","Haringey","RBT",1
"E09000014","Haringey","RLQ",1
"E09000014","Haringey","RPG",1
"E09000014","Haringey","RTK",1
"E09000014","Haringey","RW4",1
"E09000014","Haringey","RFS",1
"E09000014","Haringey","RWP",1
"E09000014","Haringey","RXT",1
"E09000014","Haringey","RX1",1
"E09000014","Haringey","RXR",1
"E09000014","Haringey","RBK",1
"E09000014","Haringey","RKB",1
"E09000014","Haringey","RPC",1
"E09000014","Haringey","RXP",1
"E09000014","Haringey","RXY",1
"E09000015","Harrow","R1K",23430
"E09000015","Harrow","RAL",1320
"E09000015","Harrow","RYJ",884
"E09000015","Harrow","RWG",432
"E09000015","Harrow","RT3",299
"E09000015","Harrow","RAS",239
"E09000015","Harrow","RV3",204
"E09000015","Harrow","RRV",219
"E09000015","Harrow","RQM",158
"E09000015","Harrow","RWH",122
"E09000015","Harrow","R1H",102
"E09000015","Harrow","RJ1",94
"E09000015","Harrow","RP6",34
"E09000015","Harrow","RC9",34
"E09000015","Harrow","RDU",31
"E09000015","Harrow","RJ7",25
"E09000015","Harrow","RKE",21
"E09000015","Harrow","RAX",20
"E09000015","Harrow","RXQ",17
"E09000015","Harrow","RJZ",14
"E09000015","Harrow","RAP",14
"E09000015","Harrow","RQX",14
"E09000015","Harrow","RF4",10
"E09000015","Harrow","RP4",10
"E09000015","Harrow","RPY",10
"E09000015","Harrow","RAN",9
"E09000015","Harrow","RD8",9
"E09000015","Harrow","RJ6",9
"E09000015","Harrow","RVV",8
"E09000015","Harrow","RVR",7
"E09000015","Harrow","REF",7
"E09000015","Harrow","RKB",7
"E09000015","Harrow","RH8",7
"E09000015","Harrow","RD3",7
"E09000015","Harrow","RWE",7
"E09000015","Harrow","RDZ",7
"E09000015","Harrow","RHW",6
"E09000015","Harrow","RWF",6
"E09000015","Harrow","RJE",6
"E09000015","Harrow","RA7",6
"E09000015","Harrow","RHQ",5
"E09000015","Harrow","RGT",5
"E09000015","Harrow","R0A",5
"E09000015","Harrow","RRK",8
"E09000015","Harrow","RXK",7
"E09000015","Harrow","RTK",4
"E09000015","Harrow","RTH",4
"E09000015","Harrow","RA2",3
"E09000015","Harrow","RJ2",6
"E09000015","Harrow","RN3",3
"E09000015","Harrow","RBA",3
"E09000015","Harrow","RDD",3
"E09000015","Harrow","RTP",3
"E09000015","Harrow","RX1",3
"E09000015","Harrow","R1L",3
"E09000015","Harrow","RHM",3
"E09000015","Harrow","RWK",3
"E09000015","Harrow","REM",4
"E09000015","Harrow","RA9",2
"E09000015","Harrow","RJC",2
"E09000015","Harrow","RN5",2
"E09000015","Harrow","RA4",2
"E09000015","Harrow","RMP",2
"E09000015","Harrow","RAE",2
"E09000015","Harrow","RBT",2
"E09000015","Harrow","RCF",2
"E09000015","Harrow","RCX",2
"E09000015","Harrow","RQW",2
"E09000015","Harrow","RTR",3
"E09000015","Harrow","RVJ",2
"E09000015","Harrow","RW6",2
"E09000015","Harrow","RAT",2
"E09000015","Harrow","RYR",2
"E09000015","Harrow","RMC",2
"E09000015","Harrow","RWW",2
"E09000015","Harrow","RCD",2
"E09000015","Harrow","RQ8",2
"E09000015","Harrow","RM1",2
"E09000015","Harrow","R1F",2
"E09000015","Harrow","RD1",2
"E09000015","Harrow","RFS",2
"E09000015","Harrow","RR8",2
"E09000015","Harrow","RFF",1
"E09000015","Harrow","RGM",1
"E09000015","Harrow","RGN",1
"E09000015","Harrow","RWD",1
"E09000015","Harrow","RXH",1
"E09000015","Harrow","RAJ",1
"E09000015","Harrow","RLQ",1
"E09000015","Harrow","RN7",1
"E09000015","Harrow","RNS",1
"E09000015","Harrow","RRF",1
"E09000015","Harrow","RTD",1
"E09000015","Harrow","RXC",1
"E09000015","Harrow","RTE",1
"E09000015","Harrow","RTG",1
"E09000015","Harrow","RW1",1
"E09000015","Harrow","RWJ",1
"E09000015","Harrow","RX2",1
"E09000015","Harrow","RXP",1
"E09000015","Harrow","RHU",1
"E09000015","Harrow","RNZ",1
"E09000015","Harrow","RPC",1
"E09000015","Harrow","RTF",1
"E09000015","Harrow","RWA",1
"E09000015","Harrow","RWP",1
"E09000015","Harrow","RWX",1
"E09000015","Harrow","RDE",1
"E09000015","Harrow","RGP",1
"E09000015","Harrow","RK5",1
"E09000015","Harrow","RQ3",1
"E09000015","Harrow","RXL",1
"E09000015","Harrow","RBK",1
"E09000015","Harrow","RC1",1
"E09000015","Harrow","RGR",1
"E09000015","Harrow","RJL",1
"E09000015","Harrow","RL4",1
"E09000015","Harrow","RPA",1
"E09000015","Harrow","RM3",1
"E09000015","Harrow","RP5",1
"E09000016","Havering","RF4",22508
"E09000016","Havering","R1H",1321
"E09000016","Havering","RQ8",310
"E09000016","Havering","RDD",320
"E09000016","Havering","RAT",137
"E09000016","Havering","RJ1",88
"E09000016","Havering","RRV",98
"E09000016","Havering","RP6",77
"E09000016","Havering","RQX",56
"E09000016","Havering","RAJ",56
"E09000016","Havering","RDE",51
"E09000016","Havering","RYJ",44
"E09000016","Havering","RQW",41
"E09000016","Havering","RAL",37
"E09000016","Havering","RQM",27
"E09000016","Havering","RJZ",24
"E09000016","Havering","RN7",21
"E09000016","Havering","RAP",20
"E09000016","Havering","RT3",18
"E09000016","Havering","RM1",16
"E09000016","Havering","RJ7",16
"E09000016","Havering","R1K",16
"E09000016","Havering","RVV",13
"E09000016","Havering","RGP",12
"E09000016","Havering","RJ2",18
"E09000016","Havering","RGT",10
"E09000016","Havering","RDU",10
"E09000016","Havering","RP4",10
"E09000016","Havering","RKE",9
"E09000016","Havering","RWK",9
"E09000016","Havering","RTP",9
"E09000016","Havering","R1L",8
"E09000016","Havering","RGR",7
"E09000016","Havering","RYR",7
"E09000016","Havering","RAX",7
"E09000016","Havering","RWF",7
"E09000016","Havering","RWH",7
"E09000016","Havering","REF",7
"E09000016","Havering","RXH",6
"E09000016","Havering","RTH",6
"E09000016","Havering","RAS",6
"E09000016","Havering","RD8",5
"E09000016","Havering","RWE",5
"E09000016","Havering","RPY",5
"E09000016","Havering","RA2",5
"E09000016","Havering","RCX",5
"E09000016","Havering","RAN",5
"E09000016","Havering","RW6",5
"E09000016","Havering","RGM",4
"E09000016","Havering","RGN",4
"E09000016","Havering","RA9",4
"E09000016","Havering","RBA",4
"E09000016","Havering","RXK",4
"E09000016","Havering","RCD",4
"E09000016","Havering","RWG",4
"E09000016","Havering","RXC",4
"E09000016","Havering","RHM",4
"E09000016","Havering","RK9",3
"E09000016","Havering","RDZ",3
"E09000016","Havering","RNS",3
"E09000016","Havering","RJL",3
"E09000016","Havering","RN3",3
"E09000016","Havering","RN5",3
"E09000016","Havering","RC9",3
"E09000016","Havering","RTE",3
"E09000016","Havering","RBD",3
"E09000016","Havering","RRK",5
"E09000016","Havering","RTR",2
"E09000016","Havering","R0A",2
"E09000016","Havering","RCB",2
"E09000016","Havering","RTK",2
"E09000016","Havering","RR8",2
"E09000016","Havering","RAE",2
"E09000016","Havering","RPA",2
"E09000016","Havering","RD1",2
"E09000016","Havering","RHU",2
"E09000016","Havering","RJE",2
"E09000016","Havering","RTD",2
"E09000016","Havering","RA3",2
"E09000016","Havering","RH8",2
"E09000016","Havering","REM",3
"E09000016","Havering","RRF",2
"E09000016","Havering","R1F",1
"E09000016","Havering","RKB",1
"E09000016","Havering","RMC",1
"E09000016","Havering","RTX",1
"E09000016","Havering","RC1",1
"E09000016","Havering","RTG",2
"E09000016","Havering","RVJ",1
"E09000016","Havering","RBZ",1
"E09000016","Havering","RJ6",1
"E09000016","Havering","RK5",1
"E09000016","Havering","RNL",1
"E09000016","Havering","RNU",1
"E09000016","Havering","RQ3",1
"E09000016","Havering","RTF",1
"E09000016","Havering","RBK",1
"E09000016","Havering","RNA",1
"E09000016","Havering","RA4",1
"E09000016","Havering","RA7",1
"E09000016","Havering","RCU",1
"E09000016","Havering","RV3",1
"E09000016","Havering","RWD",1
"E09000016","Havering","RWJ",1
"E09000016","Havering","RBL",1
"E09000016","Havering","RBN",1
"E09000016","Havering","RBS",1
"E09000016","Havering","RM3",1
"E09000016","Havering","RP5",1
"E09000016","Havering","RVR",1
"E09000016","Havering","RMY",1
"E09000016","Havering","RX1",1
"E09000016","Havering","RXP",1
"E09000016","Havering","RXQ",1
"E09000017","Hillingdon","RAS",20218
"E09000017","Hillingdon","R1K",4317
"E09000017","Hillingdon","RYJ",1151
"E09000017","Hillingdon","RWG",680
"E09000017","Hillingdon","RT3",537
"E09000017","Hillingdon","RQM",501
"E09000017","Hillingdon","RDU",359
"E09000017","Hillingdon","RWH",301
"E09000017","Hillingdon","RV3",148
"E09000017","Hillingdon","RAL",110
"E09000017","Hillingdon","RRV",110
"E09000017","Hillingdon","RJ1",89
"E09000017","Hillingdon","R1H",61
"E09000017","Hillingdon","RJ7",44
"E09000017","Hillingdon","RXQ",33
"E09000017","Hillingdon","RTK",31
"E09000017","Hillingdon","RYR",22
"E09000017","Hillingdon","RP4",22
"E09000017","Hillingdon","RJZ",19
"E09000017","Hillingdon","RF4",18
"E09000017","Hillingdon","RTH",15
"E09000017","Hillingdon","RD8",14
"E09000017","Hillingdon","RAX",14
"E09000017","Hillingdon","RHW",14
"E09000017","Hillingdon","RHU",12
"E09000017","Hillingdon","RA2",12
"E09000017","Hillingdon","RC9",12
"E09000017","Hillingdon","RP6",12
"E09000017","Hillingdon","RBA",10
"E09000017","Hillingdon","RD3",10
"E09000017","Hillingdon","RQX",10
"E09000017","Hillingdon","RGT",10
"E09000017","Hillingdon","RXH",9
"E09000017","Hillingdon","RHM",9
"E09000017","Hillingdon","RJ6",9
"E09000017","Hillingdon","RKE",9
"E09000017","Hillingdon","RVV",8
"E09000017","Hillingdon","RAP",8
"E09000017","Hillingdon","RA9",8
"E09000017","Hillingdon","RVR",8
"E09000017","Hillingdon","RDE",8
"E09000017","Hillingdon","RBK",7
"E09000017","Hillingdon","RBZ",7
"E09000017","Hillingdon","RAN",7
"E09000017","Hillingdon","RDZ",7
"E09000017","Hillingdon","RX1",6
"E09000017","Hillingdon","RKB",6
"E09000017","Hillingdon","R1F",6
"E09000017","Hillingdon","RJ2",8
"E09000017","Hillingdon","RWE",6
"E09000017","Hillingdon","R0A",5
"E09000017","Hillingdon","RGP",5
"E09000017","Hillingdon","RJE",5
"E09000017","Hillingdon","RM1",5
"E09000017","Hillingdon","REF",5
"E09000017","Hillingdon","RVJ",5
"E09000017","Hillingdon","RTD",4
"E09000017","Hillingdon","RXK",7
"E09000017","Hillingdon","RAJ",4
"E09000017","Hillingdon","RRK",6
"E09000017","Hillingdon","RWD",4
"E09000017","Hillingdon","RXC",4
"E09000017","Hillingdon","RC1",4
"E09000017","Hillingdon","RCX",4
"E09000017","Hillingdon","RJC",4
"E09000017","Hillingdon","RTP",4
"E09000017","Hillingdon","RD1",4
"E09000017","Hillingdon","RHQ",4
"E09000017","Hillingdon","RLQ",4
"E09000017","Hillingdon","RN5",4
"E09000017","Hillingdon","RBD",4
"E09000017","Hillingdon","RPY",4
"E09000017","Hillingdon","RAE",3
"E09000017","Hillingdon","RMC",3
"E09000017","Hillingdon","RN3",3
"E09000017","Hillingdon","RQ8",3
"E09000017","Hillingdon","RDY",3
"E09000017","Hillingdon","RN7",3
"E09000017","Hillingdon","REM",4
"E09000017","Hillingdon","RNS",3
"E09000017","Hillingdon","RTX",3
"E09000017","Hillingdon","RWF",3
"E09000017","Hillingdon","RBL",2
"E09000017","Hillingdon","RL4",2
"E09000017","Hillingdon","RWK",2
"E09000017","Hillingdon","RNL",2
"E09000017","Hillingdon","RQW",2
"E09000017","Hillingdon","RA7",2
"E09000017","Hillingdon","RBN",2
"E09000017","Hillingdon","RTE",2
"E09000017","Hillingdon","RH8",2
"E09000017","Hillingdon","RXR",2
"E09000017","Hillingdon","RCB",2
"E09000017","Hillingdon","RA4",2
"E09000017","Hillingdon","RGR",2
"E09000017","Hillingdon","RJR",2
"E09000017","Hillingdon","RK9",2
"E09000017","Hillingdon","RXL",2
"E09000017","Hillingdon","RDD",2
"E09000017","Hillingdon","RPA",2
"E09000017","Hillingdon","RR8",1
"E09000017","Hillingdon","RFR",1
"E09000017","Hillingdon","RFS",1
"E09000017","Hillingdon","RGN",1
"E09000017","Hillingdon","RNU",1
"E09000017","Hillingdon","RNZ",1
"E09000017","Hillingdon","RQ3",1
"E09000017","Hillingdon","RTF",1
"E09000017","Hillingdon","RVW",1
"E09000017","Hillingdon","RW6",1
"E09000017","Hillingdon","RCF",1
"E09000017","Hillingdon","RQY",1
"E09000017","Hillingdon","RW1",1
"E09000017","Hillingdon","RA3",1
"E09000017","Hillingdon","RBS",1
"E09000017","Hillingdon","RET",1
"E09000017","Hillingdon","RFF",1
"E09000017","Hillingdon","RNA",1
"E09000017","Hillingdon","RNQ",1
"E09000017","Hillingdon","RGM",1
"E09000017","Hillingdon","RRF",1
"E09000017","Hillingdon","RWJ",1
"E09000017","Hillingdon","RCU",1
"E09000017","Hillingdon","RK5",1
"E09000017","Hillingdon","RWA",1
"E09000017","Hillingdon","RXW",1
"E09000017","Hillingdon","RBT",1
"E09000017","Hillingdon","RVN",1
"E09000017","Hillingdon","RWP",1
"E09000018","Hounslow","RQM",25546
"E09000018","Hounslow","RYJ",3443
"E09000018","Hounslow","R1K",1045
"E09000018","Hounslow","RTK",516
"E09000018","Hounslow","RAX",395
"E09000018","Hounslow","RAS",262
"E09000018","Hounslow","RJ7",136
"E09000018","Hounslow","RJ1",120
"E09000018","Hounslow","RDU",118
"E09000018","Hounslow","RRV",114
"E09000018","Hounslow","R1H",72
"E09000018","Hounslow","RPY",68
"E09000018","Hounslow","RT3",61
"E09000018","Hounslow","RA2",54
"E09000018","Hounslow","RJZ",32
"E09000018","Hounslow","RAL",31
"E09000018","Hounslow","RVR",29
"E09000018","Hounslow","RP6",25
"E09000018","Hounslow","RJ6",17
"E09000018","Hounslow","RHW",17
"E09000018","Hounslow","RP4",16
"E09000018","Hounslow","RTP",14
"E09000018","Hounslow","RXQ",13
"E09000018","Hounslow","RWG",13
"E09000018","Hounslow","RHU",13
"E09000018","Hounslow","RYR",12
"E09000018","Hounslow","RTH",12
"E09000018","Hounslow","RHM",11
"E09000018","Hounslow","RC9",11
"E09000018","Hounslow","RWH",11
"E09000018","Hounslow","RDZ",10
"E09000018","Hounslow","RAP",10
"E09000018","Hounslow","RQX",9
"E09000018","Hounslow","RWF",8
"E09000018","Hounslow","RVV",8
"E09000018","Hounslow","RXH",7
"E09000018","Hounslow","RKE",7
"E09000018","Hounslow","RF4",7
"E09000018","Hounslow","RJ2",10
"E09000018","Hounslow","RK9",6
"E09000018","Hounslow","RRK",8
"E09000018","Hounslow","RV3",6
"E09000018","Hounslow","RXC",6
"E09000018","Hounslow","RXK",8
"E09000018","Hounslow","RBA",6
"E09000018","Hounslow","RN7",6
"E09000018","Hounslow","REF",6
"E09000018","Hounslow","RGT",6
"E09000018","Hounslow","RN3",5
"E09000018","Hounslow","RD3",5
"E09000018","Hounslow","RGN",5
"E09000018","Hounslow","RH8",5
"E09000018","Hounslow","RD1",4
"E09000018","Hounslow","RDE",4
"E09000018","Hounslow","RQ8",4
"E09000018","Hounslow","RWE",4
"E09000018","Hounslow","RJC",4
"E09000018","Hounslow","RKB",4
"E09000018","Hounslow","RN5",4
"E09000018","Hounslow","RNZ",4
"E09000018","Hounslow","RQW",4
"E09000018","Hounslow","RTE",3
"E09000018","Hounslow","R1F",3
"E09000018","Hounslow","RAE",3
"E09000018","Hounslow","RDD",4
"E09000018","Hounslow","RNS",3
"E09000018","Hounslow","RXL",3
"E09000018","Hounslow","RXX",3
"E09000018","Hounslow","RWD",3
"E09000018","Hounslow","RWP",3
"E09000018","Hounslow","RQY",3
"E09000018","Hounslow","RA4",3
"E09000018","Hounslow","RBZ",3
"E09000018","Hounslow","RTR",4
"E09000018","Hounslow","RJL",2
"E09000018","Hounslow","RVJ",2
"E09000018","Hounslow","RJE",2
"E09000018","Hounslow","R0B",3
"E09000018","Hounslow","RWX",2
"E09000018","Hounslow","RXP",2
"E09000018","Hounslow","RAN",2
"E09000018","Hounslow","RC1",2
"E09000018","Hounslow","RLQ",2
"E09000018","Hounslow","RX1",2
"E09000018","Hounslow","RA9",2
"E09000018","Hounslow","RBD",2
"E09000018","Hounslow","RQ3",2
"E09000018","Hounslow","RW6",2
"E09000018","Hounslow","RCX",2
"E09000018","Hounslow","RPC",2
"E09000018","Hounslow","RTG",2
"E09000018","Hounslow","RXR",3
"E09000018","Hounslow","RMP",2
"E09000018","Hounslow","RV5",2
"E09000018","Hounslow","RCF",2
"E09000018","Hounslow","RR8",2
"E09000018","Hounslow","RH5",1
"E09000018","Hounslow","RK5",1
"E09000018","Hounslow","RVW",1
"E09000018","Hounslow","RBT",1
"E09000018","Hounslow","REM",1
"E09000018","Hounslow","RFF",1
"E09000018","Hounslow","RJR",1
"E09000018","Hounslow","RM1",1
"E09000018","Hounslow","RA7",1
"E09000018","Hounslow","RAJ",1
"E09000018","Hounslow","RNU",1
"E09000018","Hounslow","RPA",1
"E09000018","Hounslow","RTD",1
"E09000018","Hounslow","RWY",1
"E09000018","Hounslow","R0A",1
"E09000018","Hounslow","RBN",1
"E09000018","Hounslow","RD8",1
"E09000018","Hounslow","RFS",1
"E09000018","Hounslow","RTF",1
"E09000018","Hounslow","RGM",1
"E09000018","Hounslow","RXW",1
"E09000018","Hounslow","RBS",1
"E09000018","Hounslow","RGP",1
"E09000018","Hounslow","RL4",1
"E09000018","Hounslow","RNQ",1
"E09000018","Hounslow","RMY",1
"E09000018","Hounslow","RTX",1
"E09000019","Islington","RRV",7681
"E09000019","Islington","RKE",6591
"E09000019","Islington","R1H",995
"E09000019","Islington","RAL",918
"E09000019","Islington","RQX",816
"E09000019","Islington","RJ1",246
"E09000019","Islington","RYJ",150
"E09000019","Islington","RAP",110
"E09000019","Islington","RQM",67
"E09000019","Islington","RP6",54
"E09000019","Islington","RJZ",39
"E09000019","Islington","R1K",34
"E09000019","Islington","RWK",32
"E09000019","Islington","RJ7",21
"E09000019","Islington","RF4",21
"E09000019","Islington","RTH",20
"E09000019","Islington","RP4",18
"E09000019","Islington","RXH",17
"E09000019","Islington","RDE",16
"E09000019","Islington","RWH",14
"E09000019","Islington","RJ2",21
"E09000019","Islington","RWG",13
"E09000019","Islington","RGT",12
"E09000019","Islington","RAX",11
"E09000019","Islington","RDU",11
"E09000019","Islington","RC9",10
"E09000019","Islington","RQW",10
"E09000019","Islington","RDD",9
"E09000019","Islington","RT3",8
"E09000019","Islington","RA7",8
"E09000019","Islington","RPA",8
"E09000019","Islington","RVV",7
"E09000019","Islington","RN3",7
"E09000019","Islington","RWF",7
"E09000019","Islington","RN5",7
"E09000019","Islington","RTD",6
"E09000019","Islington","R0A",6
"E09000019","Islington","RAJ",6
"E09000019","Islington","RAS",6
"E09000019","Islington","RM1",6
"E09000019","Islington","RKB",6
"E09000019","Islington","RDZ",6
"E09000019","Islington","RYR",6
"E09000019","Islington","RH8",6
"E09000019","Islington","RHM",6
"E09000019","Islington","RQ8",6
"E09000019","Islington","RN7",6
"E09000019","Islington","RVJ",5
"E09000019","Islington","RVR",5
"E09000019","Islington","RXQ",5
"E09000019","Islington","RGN",5
"E09000019","Islington","REF",5
"E09000019","Islington","RTE",5
"E09000019","Islington","RXC",5
"E09000019","Islington","RC1",4
"E09000019","Islington","RK5",4
"E09000019","Islington","RHW",4
"E09000019","Islington","RPY",4
"E09000019","Islington","RAN",4
"E09000019","Islington","RAT",4
"E09000019","Islington","RCX",4
"E09000019","Islington","RA2",3
"E09000019","Islington","REM",3
"E09000019","Islington","RJ6",3
"E09000019","Islington","RK9",3
"E09000019","Islington","RWE",3
"E09000019","Islington","RD1",3
"E09000019","Islington","RJR",3
"E09000019","Islington","RWW",3
"E09000019","Islington","RXK",3
"E09000019","Islington","RCB",3
"E09000019","Islington","RNS",3
"E09000019","Islington","RHU",2
"E09000019","Islington","RR8",2
"E09000019","Islington","RTP",2
"E09000019","Islington","RD8",2
"E09000019","Islington","RTG",2
"E09000019","Islington","RXN",2
"E09000019","Islington","RNA",2
"E09000019","Islington","RRK",3
"E09000019","Islington","RTX",2
"E09000019","Islington","RBA",2
"E09000019","Islington","RGP",2
"E09000019","Islington","RNZ",2
"E09000019","Islington","RAE",1
"E09000019","Islington","RBD",1
"E09000019","Islington","RLT",1
"E09000019","Islington","RWP",1
"E09000019","Islington","RXY",1
"E09000019","Islington","RA9",1
"E09000019","Islington","RTR",1
"E09000019","Islington","RVW",1
"E09000019","Islington","RBQ",1
"E09000019","Islington","RBZ",1
"E09000019","Islington","RJC",1
"E09000019","Islington","RXF",1
"E09000019","Islington","RBN",1
"E09000019","Islington","RGM",1
"E09000019","Islington","RA4",1
"E09000019","Islington","RCF",1
"E09000019","Islington","RFS",1
"E09000019","Islington","RXL",1
"E09000019","Islington","RCD",1
"E09000019","Islington","RFR",1
"E09000019","Islington","RHQ",1
"E09000019","Islington","RQY",1
"E09000019","Islington","RTF",1
"E09000019","Islington","RX1",1
"E09000019","Islington","RGR",1
"E09000019","Islington","RJ8",1
"E09000019","Islington","RLQ",1
"E09000019","Islington","RNQ",1
"E09000019","Islington","RP5",1
"E09000019","Islington","RTK",1
"E09000019","Islington","R1F",1
"E09000019","Islington","RBS",1
"E09000019","Islington","RV3",1
"E09000019","Islington","RVY",1
"E09000019","Islington","RW6",1
"E09000020","Kensington and Chelsea","RQM",5562
"E09000020","Kensington and Chelsea","RYJ",4599
"E09000020","Kensington and Chelsea","RV3",195
"E09000020","Kensington and Chelsea","RJ1",161
"E09000020","Kensington and Chelsea","RRV",169
"E09000020","Kensington and Chelsea","RPY",115
"E09000020","Kensington and Chelsea","R1H",75
"E09000020","Kensington and Chelsea","R1K",67
"E09000020","Kensington and Chelsea","RT3",60
"E09000020","Kensington and Chelsea","RJ7",56
"E09000020","Kensington and Chelsea","RAL",54
"E09000020","Kensington and Chelsea","RJZ",32
"E09000020","Kensington and Chelsea","RTP",18
"E09000020","Kensington and Chelsea","RAS",16
"E09000020","Kensington and Chelsea","RTH",16
"E09000020","Kensington and Chelsea","RDU",15
"E09000020","Kensington and Chelsea","RAX",14
"E09000020","Kensington and Chelsea","RVR",12
"E09000020","Kensington and Chelsea","RP6",11
"E09000020","Kensington and Chelsea","RWG",11
"E09000020","Kensington and Chelsea","RYR",10
"E09000020","Kensington and Chelsea","RQX",10
"E09000020","Kensington and Chelsea","RA4",9
"E09000020","Kensington and Chelsea","RWH",9
"E09000020","Kensington and Chelsea","RKE",9
"E09000020","Kensington and Chelsea","RXH",9
"E09000020","Kensington and Chelsea","RGT",8
"E09000020","Kensington and Chelsea","RAP",7
"E09000020","Kensington and Chelsea","RXC",7
"E09000020","Kensington and Chelsea","RC1",6
"E09000020","Kensington and Chelsea","RWK",6
"E09000020","Kensington and Chelsea","RN3",6
"E09000020","Kensington and Chelsea","RWF",6
"E09000020","Kensington and Chelsea","RJ6",6
"E09000020","Kensington and Chelsea","RHW",5
"E09000020","Kensington and Chelsea","RF4",5
"E09000020","Kensington and Chelsea","RVJ",5
"E09000020","Kensington and Chelsea","RVV",5
"E09000020","Kensington and Chelsea","RDE",5
"E09000020","Kensington and Chelsea","RN5",5
"E09000020","Kensington and Chelsea","RXQ",5
"E09000020","Kensington and Chelsea","RNZ",4
"E09000020","Kensington and Chelsea","RA2",4
"E09000020","Kensington and Chelsea","RP4",4
"E09000020","Kensington and Chelsea","RAT",4
"E09000020","Kensington and Chelsea","REF",4
"E09000020","Kensington and Chelsea","RDZ",4
"E09000020","Kensington and Chelsea","RJC",4
"E09000020","Kensington and Chelsea","RRK",5
"E09000020","Kensington and Chelsea","RTE",4
"E09000020","Kensington and Chelsea","RWE",3
"E09000020","Kensington and Chelsea","RM3",3
"E09000020","Kensington and Chelsea","RLQ",3
"E09000020","Kensington and Chelsea","RD1",3
"E09000020","Kensington and Chelsea","RBD",2
"E09000020","Kensington and Chelsea","RCX",2
"E09000020","Kensington and Chelsea","RH8",2
"E09000020","Kensington and Chelsea","RJ2",4
"E09000020","Kensington and Chelsea","RPC",2
"E09000020","Kensington and Chelsea","RTX",2
"E09000020","Kensington and Chelsea","RD8",2
"E09000020","Kensington and Chelsea","RQW",2
"E09000020","Kensington and Chelsea","RA7",2
"E09000020","Kensington and Chelsea","RBN",2
"E09000020","Kensington and Chelsea","R0A",2
"E09000020","Kensington and Chelsea","RHM",2
"E09000020","Kensington and Chelsea","RL4",2
"E09000020","Kensington and Chelsea","RPA",2
"E09000020","Kensington and Chelsea","RTK",2
"E09000020","Kensington and Chelsea","RAN",2
"E09000020","Kensington and Chelsea","RDR",2
"E09000020","Kensington and Chelsea","RA9",2
"E09000020","Kensington and Chelsea","RDY",1
"E09000020","Kensington and Chelsea","RTG",1
"E09000020","Kensington and Chelsea","RW6",1
"E09000020","Kensington and Chelsea","RWD",1
"E09000020","Kensington and Chelsea","RYG",1
"E09000020","Kensington and Chelsea","RBT",1
"E09000020","Kensington and Chelsea","RHQ",1
"E09000020","Kensington and Chelsea","RN7",1
"E09000020","Kensington and Chelsea","RTV",1
"E09000020","Kensington and Chelsea","RGP",1
"E09000020","Kensington and Chelsea","RQ3",1
"E09000020","Kensington and Chelsea","RWJ",1
"E09000020","Kensington and Chelsea","RAJ",1
"E09000020","Kensington and Chelsea","RBA",1
"E09000020","Kensington and Chelsea","RC9",1
"E09000020","Kensington and Chelsea","RM1",1
"E09000020","Kensington and Chelsea","RQ8",1
"E09000020","Kensington and Chelsea","RXK",1
"E09000020","Kensington and Chelsea","RX2",1
"E09000020","Kensington and Chelsea","RD3",1
"E09000020","Kensington and Chelsea","RK5",1
"E09000020","Kensington and Chelsea","RA3",1
"E09000020","Kensington and Chelsea","RBZ",1
"E09000020","Kensington and Chelsea","RGR",1
"E09000020","Kensington and Chelsea","RJE",1
"E09000020","Kensington and Chelsea","RTD",1
"E09000020","Kensington and Chelsea","RTF",1
"E09000020","Kensington and Chelsea","RWP",1
"E09000020","Kensington and Chelsea","RXL",1
"E09000021","Kingston upon Thames","RAX",13792
"E09000021","Kingston upon Thames","RJ7",1904
"E09000021","Kingston upon Thames","RVR",432
"E09000021","Kingston upon Thames","RQM",128
"E09000021","Kingston upon Thames","RYJ",109
"E09000021","Kingston upon Thames","RPY",97
"E09000021","Kingston upon Thames","RJ1",88
"E09000021","Kingston upon Thames","RQY",85
"E09000021","Kingston upon Thames","RJZ",42
"E09000021","Kingston upon Thames","RA2",36
"E09000021","Kingston upon Thames","RRV",39
"E09000021","Kingston upon Thames","R1H",32
"E09000021","Kingston upon Thames","RXH",28
"E09000021","Kingston upon Thames","RTK",28
"E09000021","Kingston upon Thames","RP6",28
"E09000021","Kingston upon Thames","RDU",23
"E09000021","Kingston upon Thames","RTP",22
"E09000021","Kingston upon Thames","RAL",14
"E09000021","Kingston upon Thames","R1K",12
"E09000021","Kingston upon Thames","RJ6",11
"E09000021","Kingston upon Thames","RYR",9
"E09000021","Kingston upon Thames","RTH",9
"E09000021","Kingston upon Thames","RWH",9
"E09000021","Kingston upon Thames","RHU",9
"E09000021","Kingston upon Thames","RDZ",8
"E09000021","Kingston upon Thames","RT3",8
"E09000021","Kingston upon Thames","RN5",7
"E09000021","Kingston upon Thames","RHM",7
"E09000021","Kingston upon Thames","REM",6
"E09000021","Kingston upon Thames","RVV",5
"E09000021","Kingston upon Thames","RD8",5
"E09000021","Kingston upon Thames","RKE",5
"E09000021","Kingston upon Thames","RBA",5
"E09000021","Kingston upon Thames","RK9",5
"E09000021","Kingston upon Thames","RQX",5
"E09000021","Kingston upon Thames","RXC",5
"E09000021","Kingston upon Thames","R0A",5
"E09000021","Kingston upon Thames","RCB",5
"E09000021","Kingston upon Thames","RA9",4
"E09000021","Kingston upon Thames","RNZ",4
"E09000021","Kingston upon Thames","REF",4
"E09000021","Kingston upon Thames","RHW",4
"E09000021","Kingston upon Thames","RWF",4
"E09000021","Kingston upon Thames","RLQ",4
"E09000021","Kingston upon Thames","RM1",4
"E09000021","Kingston upon Thames","RTE",4
"E09000021","Kingston upon Thames","RAS",4
"E09000021","Kingston upon Thames","RR8",3
"E09000021","Kingston upon Thames","RTX",3
"E09000021","Kingston upon Thames","RWG",3
"E09000021","Kingston upon Thames","RPC",3
"E09000021","Kingston upon Thames","RWK",3
"E09000021","Kingston upon Thames","RWP",3
"E09000021","Kingston upon Thames","RN3",3
"E09000021","Kingston upon Thames","RRK",4
"E09000021","Kingston upon Thames","RC9",3
"E09000021","Kingston upon Thames","RH8",2
"E09000021","Kingston upon Thames","RD3",2
"E09000021","Kingston upon Thames","RJE",2
"E09000021","Kingston upon Thames","RNS",2
"E09000021","Kingston upon Thames","RHQ",2
"E09000021","Kingston upon Thames","RN7",2
"E09000021","Kingston upon Thames","RBD",2
"E09000021","Kingston upon Thames","RGT",2
"E09000021","Kingston upon Thames","RXK",2
"E09000021","Kingston upon Thames","RA7",2
"E09000021","Kingston upon Thames","RCX",2
"E09000021","Kingston upon Thames","RGR",2
"E09000021","Kingston upon Thames","RXQ",2
"E09000021","Kingston upon Thames","RD1",2
"E09000021","Kingston upon Thames","RDE",2
"E09000021","Kingston upon Thames","RBT",1
"E09000021","Kingston upon Thames","RMC",1
"E09000021","Kingston upon Thames","RXF",1
"E09000021","Kingston upon Thames","RJ2",2
"E09000021","Kingston upon Thames","RNL",1
"E09000021","Kingston upon Thames","RWJ",1
"E09000021","Kingston upon Thames","RDD",1
"E09000021","Kingston upon Thames","RWE",1
"E09000021","Kingston upon Thames","RX1",1
"E09000021","Kingston upon Thames","RVW",1
"E09000021","Kingston upon Thames","RAJ",1
"E09000021","Kingston upon Thames","RCD",1
"E09000021","Kingston upon Thames","RJC",1
"E09000021","Kingston upon Thames","RKB",1
"E09000021","Kingston upon Thames","RP5",1
"E09000021","Kingston upon Thames","RQ8",1
"E09000021","Kingston upon Thames","RBZ",1
"E09000021","Kingston upon Thames","RCF",1
"E09000021","Kingston upon Thames","RP4",1
"E09000021","Kingston upon Thames","RAN",1
"E09000021","Kingston upon Thames","RAP",1
"E09000021","Kingston upon Thames","RTD",1
"E09000021","Kingston upon Thames","RXX",1
"E09000021","Kingston upon Thames","RV5",1
"E09000021","Kingston upon Thames","RVJ",1
"E09000021","Kingston upon Thames","RX2",1
"E09000022","Lambeth","RJ1",10877
"E09000022","Lambeth","RJZ",9164
"E09000022","Lambeth","RJ7",5130
"E09000022","Lambeth","RJ6",466
"E09000022","Lambeth","RQM",308
"E09000022","Lambeth","RV5",300
"E09000022","Lambeth","RRV",215
"E09000022","Lambeth","R1H",177
"E09000022","Lambeth","RYJ",156
"E09000022","Lambeth","RVR",95
"E09000022","Lambeth","RJ2",130
"E09000022","Lambeth","RQX",61
"E09000022","Lambeth","RAX",42
"E09000022","Lambeth","R1K",42
"E09000022","Lambeth","RAL",40
"E09000022","Lambeth","RPY",38
"E09000022","Lambeth","RP6",33
"E09000022","Lambeth","RKE",31
"E09000022","Lambeth","RA2",29
"E09000022","Lambeth","RAP",19
"E09000022","Lambeth","RVV",19
"E09000022","Lambeth","RDU",16
"E09000022","Lambeth","RF4",15
"E09000022","Lambeth","RTP",14
"E09000022","Lambeth","RAS",13
"E09000022","Lambeth","RXC",13
"E09000022","Lambeth","RWF",13
"E09000022","Lambeth","R0A",13
"E09000022","Lambeth","RWE",12
"E09000022","Lambeth","RTH",11
"E09000022","Lambeth","RN7",11
"E09000022","Lambeth","RTE",11
"E09000022","Lambeth","RPA",11
"E09000022","Lambeth","RD3",11
"E09000022","Lambeth","RD8",10
"E09000022","Lambeth","RN5",10
"E09000022","Lambeth","RD1",10
"E09000022","Lambeth","RDE",9
"E09000022","Lambeth","RTK",9
"E09000022","Lambeth","RRK",13
"E09000022","Lambeth","RXH",8
"E09000022","Lambeth","RYR",8
"E09000022","Lambeth","RAJ",8
"E09000022","Lambeth","RX1",7
"E09000022","Lambeth","RT3",7
"E09000022","Lambeth","RWG",7
"E09000022","Lambeth","RWH",7
"E09000022","Lambeth","RHQ",7
"E09000022","Lambeth","RA7",7
"E09000022","Lambeth","RGT",7
"E09000022","Lambeth","RCB",7
"E09000022","Lambeth","RVJ",7
"E09000022","Lambeth","RDD",6
"E09000022","Lambeth","RQ8",6
"E09000022","Lambeth","RHM",5
"E09000022","Lambeth","REF",5
"E09000022","Lambeth","RBA",5
"E09000022","Lambeth","RAN",5
"E09000022","Lambeth","RH8",5
"E09000022","Lambeth","RHU",5
"E09000022","Lambeth","RXQ",5
"E09000022","Lambeth","R1F",5
"E09000022","Lambeth","RWK",5
"E09000022","Lambeth","RHW",5
"E09000022","Lambeth","RR8",4
"E09000022","Lambeth","RTG",4
"E09000022","Lambeth","RXK",6
"E09000022","Lambeth","RGN",4
"E09000022","Lambeth","RN3",4
"E09000022","Lambeth","RQY",4
"E09000022","Lambeth","RDZ",4
"E09000022","Lambeth","RM1",4
"E09000022","Lambeth","RC1",4
"E09000022","Lambeth","RQW",4
"E09000022","Lambeth","RP4",4
"E09000022","Lambeth","RV3",4
"E09000022","Lambeth","RA9",4
"E09000022","Lambeth","RC9",4
"E09000022","Lambeth","RJE",4
"E09000022","Lambeth","REM",5
"E09000022","Lambeth","RBT",3
"E09000022","Lambeth","RPC",3
"E09000022","Lambeth","RA3",3
"E09000022","Lambeth","RBZ",3
"E09000022","Lambeth","RNA",3
"E09000022","Lambeth","RGR",3
"E09000022","Lambeth","RK9",2
"E09000022","Lambeth","RTX",2
"E09000022","Lambeth","RW6",2
"E09000022","Lambeth","RK5",2
"E09000022","Lambeth","RA4",2
"E09000022","Lambeth","RCX",2
"E09000022","Lambeth","RBD",2
"E09000022","Lambeth","RNS",2
"E09000022","Lambeth","RTD",2
"E09000022","Lambeth","RAE",2
"E09000022","Lambeth","RXP",2
"E09000022","Lambeth","RCD",2
"E09000022","Lambeth","RXL",2
"E09000022","Lambeth","RBL",1
"E09000022","Lambeth","RNQ",1
"E09000022","Lambeth","RVW",1
"E09000022","Lambeth","RFS",1
"E09000022","Lambeth","RGM",1
"E09000022","Lambeth","RM3",1
"E09000022","Lambeth","RQ3",1
"E09000022","Lambeth","RJC",1
"E09000022","Lambeth","RNN",1
"E09000022","Lambeth","RPG",1
"E09000022","Lambeth","R0B",1
"E09000022","Lambeth","RJL",1
"E09000022","Lambeth","RP5",1
"E09000022","Lambeth","RXA",1
"E09000022","Lambeth","RXT",1
"E09000022","Lambeth","RNL",1
"E09000022","Lambeth","RTF",1
"E09000022","Lambeth","RTR",1
"E09000022","Lambeth","R1L",1
"E09000022","Lambeth","RNZ",1
"E09000022","Lambeth","RXF",1
"E09000022","Lambeth","TAJ",1
"E09000022","Lambeth","RBK",1
"E09000022","Lambeth","RFF",1
"E09000022","Lambeth","RRF",1
"E09000022","Lambeth","RWW",1
"E09000022","Lambeth","RXR",1
"E09000022","Lambeth","RXW",1
"E09000023","Lewisham","RJ2",16957
"E09000023","Lewisham","RJZ",4042
"E09000023","Lewisham","RJ1",3035
"E09000023","Lewisham","RV5",343
"E09000023","Lewisham","R1H",224
"E09000023","Lewisham","RJ7",143
"E09000023","Lewisham","RRV",141
"E09000023","Lewisham","RJ6",110
"E09000023","Lewisham","RYJ",87
"E09000023","Lewisham","RQM",73
"E09000023","Lewisham","RN7",51
"E09000023","Lewisham","R1K",43
"E09000023","Lewisham","RQX",41
"E09000023","Lewisham","RAL",35
"E09000023","Lewisham","RP6",33
"E09000023","Lewisham","RVR",32
"E09000023","Lewisham","RWF",30
"E09000023","Lewisham","RPG",23
"E09000023","Lewisham","RPA",22
"E09000023","Lewisham","RF4",22
"E09000023","Lewisham","RTP",22
"E09000023","Lewisham","RPY",21
"E09000023","Lewisham","RXC",20
"E09000023","Lewisham","RKE",18
"E09000023","Lewisham","RVV",16
"E09000023","Lewisham","RAX",15
"E09000023","Lewisham","REF",15
"E09000023","Lewisham","RXH",15
"E09000023","Lewisham","RA2",15
"E09000023","Lewisham","RDU",15
"E09000023","Lewisham","RAP",14
"E09000023","Lewisham","RDE",13
"E09000023","Lewisham","RAS",12
"E09000023","Lewisham","RPC",12
"E09000023","Lewisham","RWK",9
"E09000023","Lewisham","RHM",9
"E09000023","Lewisham","RRK",13
"E09000023","Lewisham","RDZ",8
"E09000023","Lewisham","R0A",8
"E09000023","Lewisham","RX1",7
"E09000023","Lewisham","RDD",8
"E09000023","Lewisham","RD1",7
"E09000023","Lewisham","RT3",6
"E09000023","Lewisham","RHW",6
"E09000023","Lewisham","RTE",6
"E09000023","Lewisham","RA7",6
"E09000023","Lewisham","RWG",6
"E09000023","Lewisham","RGP",6
"E09000023","Lewisham","RH8",5
"E09000023","Lewisham","RAJ",5
"E09000023","Lewisham","RN3",5
"E09000023","Lewisham","RN5",5
"E09000023","Lewisham","RWH",5
"E09000023","Lewisham","RWY",5
"E09000023","Lewisham","RYR",5
"E09000023","Lewisham","RQ8",4
"E09000023","Lewisham","RGT",4
"E09000023","Lewisham","RC9",4
"E09000023","Lewisham","RTK",4
"E09000023","Lewisham","RJC",4
"E09000023","Lewisham","RD3",4
"E09000023","Lewisham","RKB",4
"E09000023","Lewisham","RWD",4
"E09000023","Lewisham","RWP",4
"E09000023","Lewisham","RCD",3
"E09000023","Lewisham","RGN",3
"E09000023","Lewisham","RTH",3
"E09000023","Lewisham","RVJ",3
"E09000023","Lewisham","RD8",3
"E09000023","Lewisham","RHU",3
"E09000023","Lewisham","RK9",3
"E09000023","Lewisham","RBD",3
"E09000023","Lewisham","RNS",3
"E09000023","Lewisham","RWW",3
"E09000023","Lewisham","RXP",3
"E09000023","Lewisham","RCB",3
"E09000023","Lewisham","RHQ",3
"E09000023","Lewisham","RLQ",3
"E09000023","Lewisham","RV3",3
"E09000023","Lewisham","REM",3
"E09000023","Lewisham","RXK",3
"E09000023","Lewisham","RQW",3
"E09000023","Lewisham","RTG",4
"E09000023","Lewisham","RWE",3
"E09000023","Lewisham","RGR",3
"E09000023","Lewisham","RP5",2
"E09000023","Lewisham","RWA",2
"E09000023","Lewisham","RXW",2
"E09000023","Lewisham","RXL",2
"E09000023","Lewisham","RBZ",2
"E09000023","Lewisham","RXQ",2
"E09000023","Lewisham","RBL",2
"E09000023","Lewisham","RBN",2
"E09000023","Lewisham","RM1",2
"E09000023","Lewisham","RNA",2
"E09000023","Lewisham","RVW",2
"E09000023","Lewisham","RTF",2
"E09000023","Lewisham","RR8",2
"E09000023","Lewisham","RTR",2
"E09000023","Lewisham","R1L",1
"E09000023","Lewisham","RA3",1
"E09000023","Lewisham","RFS",1
"E09000023","Lewisham","RL4",1
"E09000023","Lewisham","RA4",1
"E09000023","Lewisham","RBK",1
"E09000023","Lewisham","RBT",1
"E09000023","Lewisham","RCX",1
"E09000023","Lewisham","RM3",1
"E09000023","Lewisham","RP4",1
"E09000023","Lewisham","RR7",1
"E09000023","Lewisham","RXE",1
"E09000023","Lewisham","RET",1
"E09000023","Lewisham","RJL",1
"E09000023","Lewisham","RJN",1
"E09000023","Lewisham","RQ3",1
"E09000023","Lewisham","RCF",1
"E09000023","Lewisham","RXR",1
"E09000023","Lewisham","RAE",1
"E09000023","Lewisham","RFR",1
"E09000023","Lewisham","RNU",1
"E09000023","Lewisham","RAT",1
"E09000023","Lewisham","RQY",1
"E09000023","Lewisham","RTD",1
"E09000023","Lewisham","RWJ",1
"E09000023","Lewisham","RBS",1
"E09000023","Lewisham","RTX",1
"E09000024","Merton","RJ7",14547
"E09000024","Merton","RVR",4709
"E09000024","Merton","RAX",1933
"E09000024","Merton","RJ6",400
"E09000024","Merton","RJ1",255
"E09000024","Merton","RQM",127
"E09000024","Merton","RQY",120
"E09000024","Merton","RPY",107
"E09000024","Merton","RJZ",106
"E09000024","Merton","R1H",75
"E09000024","Merton","RYJ",68
"E09000024","Merton","RRV",70
"E09000024","Merton","RP6",42
"E09000024","Merton","RYR",26
"E09000024","Merton","R1K",25
"E09000024","Merton","RTP",23
"E09000024","Merton","RA2",19
"E09000024","Merton","RT3",19
"E09000024","Merton","RDU",18
"E09000024","Merton","RAL",17
"E09000024","Merton","RTK",13
"E09000024","Merton","RXH",13
"E09000024","Merton","RTH",10
"E09000024","Merton","RXC",10
"E09000024","Merton","RHU",10
"E09000024","Merton","RAP",10
"E09000024","Merton","RQX",8
"E09000024","Merton","RWH",8
"E09000024","Merton","RWF",8
"E09000024","Merton","RGT",7
"E09000024","Merton","RN3",7
"E09000024","Merton","RVV",6
"E09000024","Merton","RXQ",6
"E09000024","Merton","RA9",6
"E09000024","Merton","RAS",6
"E09000024","Merton","RHM",6
"E09000024","Merton","RJ2",9
"E09000024","Merton","RWG",5
"E09000024","Merton","RD1",5
"E09000024","Merton","RKE",5
"E09000024","Merton","RM1",5
"E09000024","Merton","RWE",5
"E09000024","Merton","RA7",5
"E09000024","Merton","RC9",5
"E09000024","Merton","RPA",5
"E09000024","Merton","RQ8",5
"E09000024","Merton","REF",4
"E09000024","Merton","RF4",4
"E09000024","Merton","RXK",5
"E09000024","Merton","RBK",4
"E09000024","Merton","RAN",4
"E09000024","Merton","RPC",4
"E09000024","Merton","R1F",4
"E09000024","Merton","RN5",4
"E09000024","Merton","R0A",3
"E09000024","Merton","RTE",3
"E09000024","Merton","RHW",3
"E09000024","Merton","RD3",3
"E09000024","Merton","RDE",3
"E09000024","Merton","RK9",3
"E09000024","Merton","RNL",3
"E09000024","Merton","RTG",3
"E09000024","Merton","RV3",2
"E09000024","Merton","RKB",2
"E09000024","Merton","RNA",2
"E09000024","Merton","RW6",2
"E09000024","Merton","RCX",2
"E09000024","Merton","REM",2
"E09000024","Merton","RRK",4
"E09000024","Merton","RAE",2
"E09000024","Merton","RD8",2
"E09000024","Merton","RK5",2
"E09000024","Merton","RR8",2
"E09000024","Merton","RCB",2
"E09000024","Merton","RH8",2
"E09000024","Merton","RJE",2
"E09000024","Merton","RAJ",2
"E09000024","Merton","RVJ",2
"E09000024","Merton","RA4",2
"E09000024","Merton","RDZ",2
"E09000024","Merton","RNZ",2
"E09000024","Merton","RP4",2
"E09000024","Merton","RNQ",1
"E09000024","Merton","RWP",1
"E09000024","Merton","RWW",1
"E09000024","Merton","RXX",1
"E09000024","Merton","RCD",1
"E09000024","Merton","RN7",1
"E09000024","Merton","RVW",1
"E09000024","Merton","RBZ",1
"E09000024","Merton","RWY",1
"E09000024","Merton","RL4",1
"E09000024","Merton","RPG",1
"E09000024","Merton","RBA",1
"E09000024","Merton","RBD",1
"E09000024","Merton","RBN",1
"E09000024","Merton","RDD",1
"E09000024","Merton","RXF",1
"E09000024","Merton","RTF",1
"E09000024","Merton","RXW",1
"E09000024","Merton","RDR",1
"E09000024","Merton","RFS",1
"E09000024","Merton","RV5",1
"E09000024","Merton","RWK",1
"E09000024","Merton","RGM",1
"E09000024","Merton","RM3",1
"E09000024","Merton","RQW",1
"E09000024","Merton","RTD",1
"E09000025","Newham","R1H",27829
"E09000025","Newham","RWK",1031
"E09000025","Newham","RQX",793
"E09000025","Newham","RF4",431
"E09000025","Newham","RJ1",398
"E09000025","Newham","RRV",276
"E09000025","Newham","RYJ",100
"E09000025","Newham","RAL",89
"E09000025","Newham","RQM",78
"E09000025","Newham","RJ2",106
"E09000025","Newham","RJZ",71
"E09000025","Newham","RDD",71
"E09000025","Newham","RP6",67
"E09000025","Newham","RJ7",64
"E09000025","Newham","R1K",63
"E09000025","Newham","RQ8",56
"E09000025","Newham","RAP",55
"E09000025","Newham","RKE",29
"E09000025","Newham","RQW",28
"E09000025","Newham","RAJ",19
"E09000025","Newham","RN7",17
"E09000025","Newham","RAS",16
"E09000025","Newham","RC9",14
"E09000025","Newham","RAX",13
"E09000025","Newham","RGT",12
"E09000025","Newham","RP4",12
"E09000025","Newham","RRK",18
"E09000025","Newham","RJ6",12
"E09000025","Newham","RAT",11
"E09000025","Newham","RWE",11
"E09000025","Newham","R0A",11
"E09000025","Newham","RDU",11
"E09000025","Newham","RVR",11
"E09000025","Newham","RT3",10
"E09000025","Newham","RDE",10
"E09000025","Newham","RWG",10
"E09000025","Newham","RWF",9
"E09000025","Newham","RVV",9
"E09000025","Newham","RHW",8
"E09000025","Newham","RW6",8
"E09000025","Newham","RTP",8
"E09000025","Newham","RBK",7
"E09000025","Newham","RTH",7
"E09000025","Newham","RTG",7
"E09000025","Newham","RXH",7
"E09000025","Newham","RXQ",7
"E09000025","Newham","RXR",8
"E09000025","Newham","RXK",8
"E09000025","Newham","RVJ",6
"E09000025","Newham","RPA",6
"E09000025","Newham","RD8",6
"E09000025","Newham","RN3",5
"E09000025","Newham","RHU",5
"E09000025","Newham","RAE",5
"E09000025","Newham","RR8",5
"E09000025","Newham","RHQ",4
"E09000025","Newham","RHM",4
"E09000025","Newham","RJR",4
"E09000025","Newham","RD3",4
"E09000025","Newham","RAN",4
"E09000025","Newham","RDZ",4
"E09000025","Newham","RNS",4
"E09000025","Newham","REM",5
"E09000025","Newham","RGN",3
"E09000025","Newham","RWP",3
"E09000025","Newham","RPY",3
"E09000025","Newham","RCB",3
"E09000025","Newham","RTD",3
"E09000025","Newham","RD1",3
"E09000025","Newham","RWH",3
"E09000025","Newham","RWJ",3
"E09000025","Newham","RPC",3
"E09000025","Newham","RXX",3
"E09000025","Newham","RA7",2
"E09000025","Newham","RGR",2
"E09000025","Newham","RJC",2
"E09000025","Newham","RK9",2
"E09000025","Newham","RMY",2
"E09000025","Newham","RTR",3
"E09000025","Newham","RXN",2
"E09000025","Newham","RA2",2
"E09000025","Newham","RBA",2
"E09000025","Newham","RC1",2
"E09000025","Newham","RKB",2
"E09000025","Newham","RVW",2
"E09000025","Newham","RXF",2
"E09000025","Newham","RN5",2
"E09000025","Newham","RWY",2
"E09000025","Newham","RM1",2
"E09000025","Newham","RM3",2
"E09000025","Newham","RGM",2
"E09000025","Newham","R1F",2
"E09000025","Newham","RL4",2
"E09000025","Newham","RMC",2
"E09000025","Newham","RTE",2
"E09000025","Newham","RX1",2
"E09000025","Newham","RYR",2
"E09000025","Newham","RFF",1
"E09000025","Newham","RJE",1
"E09000025","Newham","RNU",1
"E09000025","Newham","RR7",1
"E09000025","Newham","RP5",1
"E09000025","Newham","RWA",1
"E09000025","Newham","RWD",1
"E09000025","Newham","RA3",1
"E09000025","Newham","RBT",1
"E09000025","Newham","RTK",1
"E09000025","Newham","RV3",1
"E09000025","Newham","RCX",1
"E09000025","Newham","RGP",1
"E09000025","Newham","RBS",1
"E09000025","Newham","RTX",1
"E09000025","Newham","RBL",1
"E09000025","Newham","R0B",1
"E09000025","Newham","RNQ",1
"E09000025","Newham","RW1",1
"E09000025","Newham","RH8",1
"E09000025","Newham","RXL",1
"E09000025","Newham","RCF",1
"E09000025","Newham","RFS",1
"E09000025","Newham","RLQ",1
"E09000026","Redbridge","RF4",13515
"E09000026","Redbridge","R1H",10998
"E09000026","Redbridge","RAT",238
"E09000026","Redbridge","RRV",249
"E09000026","Redbridge","RQ8",208
"E09000026","Redbridge","RQX",204
"E09000026","Redbridge","RJ1",147
"E09000026","Redbridge","RQW",106
"E09000026","Redbridge","RAL",100
"E09000026","Redbridge","RYJ",100
"E09000026","Redbridge","RAP",90
"E09000026","Redbridge","RP6",67
"E09000026","Redbridge","RDD",51
"E09000026","Redbridge","R1K",47
"E09000026","Redbridge","RJZ",42
"E09000026","Redbridge","RQM",38
"E09000026","Redbridge","RWK",35
"E09000026","Redbridge","RDE",22
"E09000026","Redbridge","RGT",22
"E09000026","Redbridge","RJ7",18
"E09000026","Redbridge","RP4",18
"E09000026","Redbridge","RPY",16
"E09000026","Redbridge","RKE",15
"E09000026","Redbridge","RJ2",23
"E09000026","Redbridge","RT3",12
"E09000026","Redbridge","RWH",12
"E09000026","Redbridge","RXH",11
"E09000026","Redbridge","RAJ",11
"E09000026","Redbridge","RDU",11
"E09000026","Redbridge","RRK",14
"E09000026","Redbridge","R1L",10
"E09000026","Redbridge","RTH",10
"E09000026","Redbridge","RCX",9
"E09000026","Redbridge","RN7",8
"E09000026","Redbridge","RWF",8
"E09000026","Redbridge","RGR",8
"E09000026","Redbridge","RTP",8
"E09000026","Redbridge","RAS",7
"E09000026","Redbridge","RHM",7
"E09000026","Redbridge","RD8",7
"E09000026","Redbridge","RC9",7
"E09000026","Redbridge","RXQ",7
"E09000026","Redbridge","RAE",6
"E09000026","Redbridge","RD3",6
"E09000026","Redbridge","RWE",6
"E09000026","Redbridge","RVR",6
"E09000026","Redbridge","RJ6",6
"E09000026","Redbridge","RXK",8
"E09000026","Redbridge","RKB",5
"E09000026","Redbridge","RAX",5
"E09000026","Redbridge","RK9",5
"E09000026","Redbridge","R0A",5
"E09000026","Redbridge","RPA",5
"E09000026","Redbridge","RVV",5
"E09000026","Redbridge","RWG",5
"E09000026","Redbridge","REF",5
"E09000026","Redbridge","RGP",4
"E09000026","Redbridge","RM1",4
"E09000026","Redbridge","RHW",4
"E09000026","Redbridge","RMC",4
"E09000026","Redbridge","RN5",4
"E09000026","Redbridge","RAN",4
"E09000026","Redbridge","RWD",4
"E09000026","Redbridge","RX1",4
"E09000026","Redbridge","RXC",4
"E09000026","Redbridge","RNQ",4
"E09000026","Redbridge","RVJ",4
"E09000026","Redbridge","RTD",4
"E09000026","Redbridge","RC1",3
"E09000026","Redbridge","RGN",3
"E09000026","Redbridge","RWJ",3
"E09000026","Redbridge","RHQ",3
"E09000026","Redbridge","REM",4
"E09000026","Redbridge","RTG",4
"E09000026","Redbridge","RFR",3
"E09000026","Redbridge","RMP",3
"E09000026","Redbridge","RXN",3
"E09000026","Redbridge","RTX",3
"E09000026","Redbridge","RN3",3
"E09000026","Redbridge","R1F",3
"E09000026","Redbridge","RNS",3
"E09000026","Redbridge","RJR",2
"E09000026","Redbridge","RTE",2
"E09000026","Redbridge","RXW",2
"E09000026","Redbridge","RYR",2
"E09000026","Redbridge","RDZ",2
"E09000026","Redbridge","RGM",2
"E09000026","Redbridge","RTK",2
"E09000026","Redbridge","RBK",2
"E09000026","Redbridge","RHU",2
"E09000026","Redbridge","RLY",2
"E09000026","Redbridge","RVW",2
"E09000026","Redbridge","RW6",2
"E09000026","Redbridge","RA2",2
"E09000026","Redbridge","RR7",2
"E09000026","Redbridge","RRE",2
"E09000026","Redbridge","RXF",2
"E09000026","Redbridge","RA7",2
"E09000026","Redbridge","RD1",2
"E09000026","Redbridge","RNZ",2
"E09000026","Redbridge","RV3",2
"E09000026","Redbridge","RA9",1
"E09000026","Redbridge","RBN",1
"E09000026","Redbridge","RBL",1
"E09000026","Redbridge","RFF",1
"E09000026","Redbridge","RFS",1
"E09000026","Redbridge","RH8",1
"E09000026","Redbridge","RJE",1
"E09000026","Redbridge","RLT",1
"E09000026","Redbridge","RTR",1
"E09000026","Redbridge","RXP",1
"E09000026","Redbridge","RCB",1
"E09000026","Redbridge","RK5",1
"E09000026","Redbridge","RL4",1
"E09000026","Redbridge","RQ3",1
"E09000026","Redbridge","RBT",1
"E09000026","Redbridge","RM3",1
"E09000026","Redbridge","RNA",1
"E09000026","Redbridge","RXR",1
"E09000026","Redbridge","RRF",1
"E09000026","Redbridge","RXY",1
"E09000026","Redbridge","RCF",1
"E09000026","Redbridge","RP5",1
"E09000026","Redbridge","RNU",1
"E09000026","Redbridge","RWP",1
"E09000027","Richmond upon Thames","RAX",7724
"E09000027","Richmond upon Thames","RQM",7443
"E09000027","Richmond upon Thames","RYJ",1406
"E09000027","Richmond upon Thames","RJ7",1002
"E09000027","Richmond upon Thames","RJ1",109
"E09000027","Richmond upon Thames","RQY",108
"E09000027","Richmond upon Thames","RPY",104
"E09000027","Richmond upon Thames","RRV",88
"E09000027","Richmond upon Thames","R1K",77
"E09000027","Richmond upon Thames","RTK",52
"E09000027","Richmond upon Thames","R1H",49
"E09000027","Richmond upon Thames","RJZ",35
"E09000027","Richmond upon Thames","RDU",30
"E09000027","Richmond upon Thames","RT3",30
"E09000027","Richmond upon Thames","RP6",29
"E09000027","Richmond upon Thames","RAL",27
"E09000027","Richmond upon Thames","RA2",22
"E09000027","Richmond upon Thames","RVR",21
"E09000027","Richmond upon Thames","RAS",20
"E09000027","Richmond upon Thames","RYR",17
"E09000027","Richmond upon Thames","REF",17
"E09000027","Richmond upon Thames","RTP",15
"E09000027","Richmond upon Thames","RBD",13
"E09000027","Richmond upon Thames","RTH",12
"E09000027","Richmond upon Thames","RN5",10
"E09000027","Richmond upon Thames","RXQ",10
"E09000027","Richmond upon Thames","RXC",10
"E09000027","Richmond upon Thames","RJ6",9
"E09000027","Richmond upon Thames","RD3",8
"E09000027","Richmond upon Thames","RWH",8
"E09000027","Richmond upon Thames","RJ2",9
"E09000027","Richmond upon Thames","R0A",7
"E09000027","Richmond upon Thames","RTE",7
"E09000027","Richmond upon Thames","RWG",7
"E09000027","Richmond upon Thames","RA9",7
"E09000027","Richmond upon Thames","RH8",6
"E09000027","Richmond upon Thames","RHW",6
"E09000027","Richmond upon Thames","RQX",6
"E09000027","Richmond upon Thames","RWF",5
"E09000027","Richmond upon Thames","RM1",5
"E09000027","Richmond upon Thames","RP4",5
"E09000027","Richmond upon Thames","RD8",5
"E09000027","Richmond upon Thames","RDZ",5
"E09000027","Richmond upon Thames","RC9",5
"E09000027","Richmond upon Thames","RKE",5
"E09000027","Richmond upon Thames","RC1",4
"E09000027","Richmond upon Thames","RD1",4
"E09000027","Richmond upon Thames","RKB",4
"E09000027","Richmond upon Thames","RQW",4
"E09000027","Richmond upon Thames","RVV",4
"E09000027","Richmond upon Thames","RHM",4
"E09000027","Richmond upon Thames","RHU",4
"E09000027","Richmond upon Thames","RJC",4
"E09000027","Richmond upon Thames","RTD",4
"E09000027","Richmond upon Thames","RXK",3
"E09000027","Richmond upon Thames","RA4",3
"E09000027","Richmond upon Thames","RGT",3
"E09000027","Richmond upon Thames","RMP",3
"E09000027","Richmond upon Thames","RNZ",3
"E09000027","Richmond upon Thames","RA7",3
"E09000027","Richmond upon Thames","RBA",3
"E09000027","Richmond upon Thames","RTX",3
"E09000027","Richmond upon Thames","RGN",3
"E09000027","Richmond upon Thames","RVJ",3
"E09000027","Richmond upon Thames","RX1",3
"E09000027","Richmond upon Thames","RXH",3
"E09000027","Richmond upon Thames","RDE",3
"E09000027","Richmond upon Thames","RRK",4
"E09000027","Richmond upon Thames","RXP",3
"E09000027","Richmond upon Thames","RBZ",2
"E09000027","Richmond upon Thames","RW6",2
"E09000027","Richmond upon Thames","RK9",2
"E09000027","Richmond upon Thames","RGR",2
"E09000027","Richmond upon Thames","RCX",2
"E09000027","Richmond upon Thames","RWJ",2
"E09000027","Richmond upon Thames","RWP",2
"E09000027","Richmond upon Thames","RP5",3
"E09000027","Richmond upon Thames","R1F",2
"E09000027","Richmond upon Thames","RVY",2
"E09000027","Richmond upon Thames","RAP",1
"E09000027","Richmond upon Thames","RQ8",1
"E09000027","Richmond upon Thames","RAE",1
"E09000027","Richmond upon Thames","RLQ",1
"E09000027","Richmond upon Thames","RN3",1
"E09000027","Richmond upon Thames","RNA",1
"E09000027","Richmond upon Thames","RWK",1
"E09000027","Richmond upon Thames","RWW",1
"E09000027","Richmond upon Thames","RDD",1
"E09000027","Richmond upon Thames","RJE",1
"E09000027","Richmond upon Thames","RNS",1
"E09000027","Richmond upon Thames","RR8",1
"E09000027","Richmond upon Thames","RAN",1
"E09000027","Richmond upon Thames","RCF",1
"E09000027","Richmond upon Thames","RGM",1
"E09000027","Richmond upon Thames","RGP",1
"E09000027","Richmond upon Thames","RWY",1
"E09000027","Richmond upon Thames","RXL",1
"E09000027","Richmond upon Thames","RBT",1
"E09000027","Richmond upon Thames","RPA",1
"E09000027","Richmond upon Thames","RRF",1
"E09000027","Richmond upon Thames","RWD",1
"E09000027","Richmond upon Thames","RXX",1
"E09000027","Richmond upon Thames","R0B",1
"E09000027","Richmond upon Thames","RXW",1
"E09000027","Richmond upon Thames","REM",1
"E09000027","Richmond upon Thames","RQ3",1
"E09000027","Richmond upon Thames","RAJ",1
"E09000027","Richmond upon Thames","RF4",1
"E09000027","Richmond upon Thames","RLT",1
"E09000027","Richmond upon Thames","RTF",1
"E09000027","Richmond upon Thames","RVN",1
"E09000027","Richmond upon Thames","RXR",1
"E09000028","Southwark","RJ1",13779
"E09000028","Southwark","RJZ",10797
"E09000028","Southwark","RJ2",527
"E09000028","Southwark","R1H",311
"E09000028","Southwark","RV5",282
"E09000028","Southwark","RRV",201
"E09000028","Southwark","RJ7",162
"E09000028","Southwark","RYJ",125
"E09000028","Southwark","RQM",100
"E09000028","Southwark","RJ6",73
"E09000028","Southwark","RN7",40
"E09000028","Southwark","RQX",39
"E09000028","Southwark","RP6",36
"E09000028","Southwark","R1K",35
"E09000028","Southwark","RAL",30
"E09000028","Southwark","RAX",27
"E09000028","Southwark","RF4",27
"E09000028","Southwark","RVV",25
"E09000028","Southwark","RVR",22
"E09000028","Southwark","RKE",21
"E09000028","Southwark","RWF",20
"E09000028","Southwark","RA2",17
"E09000028","Southwark","RM1",16
"E09000028","Southwark","RDU",16
"E09000028","Southwark","RPA",16
"E09000028","Southwark","RPY",15
"E09000028","Southwark","R0A",14
"E09000028","Southwark","RAP",14
"E09000028","Southwark","RTP",14
"E09000028","Southwark","RYR",12
"E09000028","Southwark","RT3",11
"E09000028","Southwark","RWH",11
"E09000028","Southwark","RXH",10
"E09000028","Southwark","RKB",10
"E09000028","Southwark","RDE",10
"E09000028","Southwark","RDD",9
"E09000028","Southwark","RXC",9
"E09000028","Southwark","RXQ",9
"E09000028","Southwark","RRK",16
"E09000028","Southwark","RTH",8
"E09000028","Southwark","RAS",7
"E09000028","Southwark","RTE",7
"E09000028","Southwark","RX1",7
"E09000028","Southwark","RWG",7
"E09000028","Southwark","RHU",7
"E09000028","Southwark","REF",7
"E09000028","Southwark","RV3",7
"E09000028","Southwark","RQ8",6
"E09000028","Southwark","RD8",6
"E09000028","Southwark","RC9",6
"E09000028","Southwark","RHM",6
"E09000028","Southwark","RK9",6
"E09000028","Southwark","RGT",6
"E09000028","Southwark","RWK",5
"E09000028","Southwark","REM",7
"E09000028","Southwark","RD3",5
"E09000028","Southwark","RDZ",5
"E09000028","Southwark","RHW",5
"E09000028","Southwark","RN3",5
"E09000028","Southwark","RA7",4
"E09000028","Southwark","RN5",4
"E09000028","Southwark","RTX",4
"E09000028","Southwark","RHQ",4
"E09000028","Southwark","RNS",4
"E09000028","Southwark","RQW",4
"E09000028","Southwark","RTK",4
"E09000028","Southwark","RBD",4
"E09000028","Southwark","RWD",4
"E09000028","Southwark","RC1",4
"E09000028","Southwark","RD1",4
"E09000028","Southwark","RPG",4
"E09000028","Southwark","RAJ",3
"E09000028","Southwark","RTG",5
"E09000028","Southwark","RA9",3
"E09000028","Southwark","RGP",3
"E09000028","Southwark","RJL",3
"E09000028","Southwark","RR8",3
"E09000028","Southwark","RWJ",3
"E09000028","Southwark","RTD",3
"E09000028","Southwark","RW6",3
"E09000028","Southwark","RBT",3
"E09000028","Southwark","RGR",3
"E09000028","Southwark","RNZ",3
"E09000028","Southwark","RP5",3
"E09000028","Southwark","RBN",2
"E09000028","Southwark","RCX",2
"E09000028","Southwark","RQ3",2
"E09000028","Southwark","RBL",2
"E09000028","Southwark","RK5",2
"E09000028","Southwark","RVJ",2
"E09000028","Southwark","RWE",2
"E09000028","Southwark","RCB",2
"E09000028","Southwark","RBS",2
"E09000028","Southwark","RBK",2
"E09000028","Southwark","RPC",2
"E09000028","Southwark","RVW",2
"E09000028","Southwark","RXK",3
"E09000028","Southwark","RXR",2
"E09000028","Southwark","R1F",2
"E09000028","Southwark","RBZ",2
"E09000028","Southwark","RP4",2
"E09000028","Southwark","RLQ",2
"E09000028","Southwark","RQY",2
"E09000028","Southwark","RJE",2
"E09000028","Southwark","RJR",1
"E09000028","Southwark","RMC",1
"E09000028","Southwark","RWP",1
"E09000028","Southwark","RWW",1
"E09000028","Southwark","RXW",1
"E09000028","Southwark","R0B",1
"E09000028","Southwark","RXL",1
"E09000028","Southwark","RJC",1
"E09000028","Southwark","RMY",1
"E09000028","Southwark","RX4",1
"E09000028","Southwark","R1L",1
"E09000028","Southwark","RA4",1
"E09000028","Southwark","RGN",1
"E09000028","Southwark","RH5",1
"E09000028","Southwark","RNQ",1
"E09000028","Southwark","RWR",1
"E09000028","Southwark","RXA",1
"E09000028","Southwark","RXP",1
"E09000028","Southwark","RFS",1
"E09000028","Southwark","RL4",1
"E09000028","Southwark","RLT",1
"E09000028","Southwark","RTV",1
"E09000028","Southwark","RVY",1
"E09000028","Southwark","RYV",1
"E09000028","Southwark","RAN",1
"E09000028","Southwark","RH8",1
"E09000029","Sutton","RVR",18591
"E09000029","Sutton","RJ7",3009
"E09000029","Sutton","RAX",618
"E09000029","Sutton","RJ6",383
"E09000029","Sutton","RPY",225
"E09000029","Sutton","RJ1",103
"E09000029","Sutton","RQY",83
"E09000029","Sutton","RTP",75
"E09000029","Sutton","RJZ",56
"E09000029","Sutton","RQM",54
"E09000029","Sutton","R1H",48
"E09000029","Sutton","RYJ",42
"E09000029","Sutton","RA2",32
"E09000029","Sutton","RRV",31
"E09000029","Sutton","RT3",25
"E09000029","Sutton","R1K",22
"E09000029","Sutton","RP6",18
"E09000029","Sutton","RXH",16
"E09000029","Sutton","RXC",15
"E09000029","Sutton","RDU",14
"E09000029","Sutton","RYR",12
"E09000029","Sutton","RVV",11
"E09000029","Sutton","RTK",11
"E09000029","Sutton","RHM",10
"E09000029","Sutton","RHU",9
"E09000029","Sutton","RD3",9
"E09000029","Sutton","RAL",9
"E09000029","Sutton","RBD",8
"E09000029","Sutton","RAN",7
"E09000029","Sutton","RPC",7
"E09000029","Sutton","RDZ",7
"E09000029","Sutton","RJ2",12
"E09000029","Sutton","RGP",6
"E09000029","Sutton","RBA",6
"E09000029","Sutton","RDD",5
"E09000029","Sutton","R0A",5
"E09000029","Sutton","RHW",5
"E09000029","Sutton","RTH",5
"E09000029","Sutton","RK9",5
"E09000029","Sutton","RA7",4
"E09000029","Sutton","RDE",4
"E09000029","Sutton","RWF",4
"E09000029","Sutton","RXQ",4
"E09000029","Sutton","RJE",4
"E09000029","Sutton","RVJ",4
"E09000029","Sutton","RAP",3
"E09000029","Sutton","RN5",3
"E09000029","Sutton","RWG",3
"E09000029","Sutton","RKE",3
"E09000029","Sutton","RPA",3
"E09000029","Sutton","RD8",3
"E09000029","Sutton","RQW",3
"E09000029","Sutton","RQX",3
"E09000029","Sutton","RA9",2
"E09000029","Sutton","RAS",2
"E09000029","Sutton","RCB",2
"E09000029","Sutton","RH8",2
"E09000029","Sutton","RWK",2
"E09000029","Sutton","RN7",2
"E09000029","Sutton","RWP",2
"E09000029","Sutton","RGN",2
"E09000029","Sutton","RNQ",2
"E09000029","Sutton","RBL",2
"E09000029","Sutton","RC9",2
"E09000029","Sutton","RRK",3
"E09000029","Sutton","RWY",2
"E09000029","Sutton","RXW",2
"E09000029","Sutton","RC1",2
"E09000029","Sutton","RM1",2
"E09000029","Sutton","REF",1
"E09000029","Sutton","RHQ",1
"E09000029","Sutton","RNS",1
"E09000029","Sutton","RTE",1
"E09000029","Sutton","RXF",1
"E09000029","Sutton","RXK",2
"E09000029","Sutton","RXN",1
"E09000029","Sutton","RCF",1
"E09000029","Sutton","RKB",1
"E09000029","Sutton","RWW",1
"E09000029","Sutton","TAD",1
"E09000029","Sutton","RCD",1
"E09000029","Sutton","RR8",1
"E09000029","Sutton","RW6",1
"E09000029","Sutton","RWH",1
"E09000029","Sutton","RWX",1
"E09000029","Sutton","RCX",1
"E09000029","Sutton","RP4",1
"E09000029","Sutton","RTX",1
"E09000029","Sutton","RW1",1
"E09000029","Sutton","RWE",1
"E09000029","Sutton","RXL",1
"E09000029","Sutton","RXX",1
"E09000029","Sutton","RWA",1
"E09000029","Sutton","RA4",1
"E09000029","Sutton","RAE",1
"E09000029","Sutton","RBZ",1
"E09000029","Sutton","RF4",1
"E09000029","Sutton","RJC",1
"E09000029","Sutton","RNA",1
"E09000029","Sutton","RTD",1
"E09000029","Sutton","RTG",1
"E09000029","Sutton","RV5",1
"E09000029","Sutton","RJR",1
"E09000029","Sutton","RLQ",1
"E09000029","Sutton","RNL",1
"E09000029","Sutton","RTF",1
"E09000029","Sutton","RXP",1
"E09000029","Sutton","RL4",1
"E09000029","Sutton","RQ8",1
"E09000030","Tower Hamlets","R1H",23822
"E09000030","Tower Hamlets","RWK",694
"E09000030","Tower Hamlets","RQX",501
"E09000030","Tower Hamlets","RJ1",418
"E09000030","Tower Hamlets","RRV",279
"E09000030","Tower Hamlets","RF4",91
"E09000030","Tower Hamlets","RYJ",87
"E09000030","Tower Hamlets","RQM",71
"E09000030","Tower Hamlets","RAL",61
"E09000030","Tower Hamlets","RP6",52
"E09000030","Tower Hamlets","RJZ",51
"E09000030","Tower Hamlets","RJ2",66
"E09000030","Tower Hamlets","RJ7",39
"E09000030","Tower Hamlets","R1K",31
"E09000030","Tower Hamlets","RKE",31
"E09000030","Tower Hamlets","RQ8",27
"E09000030","Tower Hamlets","RQW",26
"E09000030","Tower Hamlets","RAP",23
"E09000030","Tower Hamlets","RWF",22
"E09000030","Tower Hamlets","RDE",19
"E09000030","Tower Hamlets","RDD",17
"E09000030","Tower Hamlets","RJ6",17
"E09000030","Tower Hamlets","RPA",14
"E09000030","Tower Hamlets","RVV",14
"E09000030","Tower Hamlets","RN7",14
"E09000030","Tower Hamlets","R0A",13
"E09000030","Tower Hamlets","RTH",13
"E09000030","Tower Hamlets","RP4",10
"E09000030","Tower Hamlets","RTP",10
"E09000030","Tower Hamlets","RAJ",10
"E09000030","Tower Hamlets","RYR",9
"E09000030","Tower Hamlets","RWG",9
"E09000030","Tower Hamlets","RAS",9
"E09000030","Tower Hamlets","RD1",9
"E09000030","Tower Hamlets","RVR",8
"E09000030","Tower Hamlets","RT3",8
"E09000030","Tower Hamlets","RC9",8
"E09000030","Tower Hamlets","RDZ",8
"E09000030","Tower Hamlets","RA2",8
"E09000030","Tower Hamlets","RW6",7
"E09000030","Tower Hamlets","RGT",7
"E09000030","Tower Hamlets","RXC",7
"E09000030","Tower Hamlets","RRK",8
"E09000030","Tower Hamlets","RDU",7
"E09000030","Tower Hamlets","RAX",7
"E09000030","Tower Hamlets","RNZ",6
"E09000030","Tower Hamlets","RXK",8
"E09000030","Tower Hamlets","RHU",6
"E09000030","Tower Hamlets","RXH",6
"E09000030","Tower Hamlets","REF",6
"E09000030","Tower Hamlets","RWE",6
"E09000030","Tower Hamlets","RD8",5
"E09000030","Tower Hamlets","RVJ",5
"E09000030","Tower Hamlets","REM",7
"E09000030","Tower Hamlets","RKB",5
"E09000030","Tower Hamlets","RQ3",5
"E09000030","Tower Hamlets","RWH",5
"E09000030","Tower Hamlets","RWD",4
"E09000030","Tower Hamlets","RR8",4
"E09000030","Tower Hamlets","RWP",4
"E09000030","Tower Hamlets","RAN",4
"E09000030","Tower Hamlets","RWA",3
"E09000030","Tower Hamlets","RCF",3
"E09000030","Tower Hamlets","RTD",3
"E09000030","Tower Hamlets","RXQ",3
"E09000030","Tower Hamlets","RHQ",3
"E09000030","Tower Hamlets","RJE",3
"E09000030","Tower Hamlets","RNL",3
"E09000030","Tower Hamlets","RTE",3
"E09000030","Tower Hamlets","RTK",3
"E09000030","Tower Hamlets","RHW",3
"E09000030","Tower Hamlets","RM1",3
"E09000030","Tower Hamlets","RWY",3
"E09000030","Tower Hamlets","RJC",3
"E09000030","Tower Hamlets","R0B",4
"E09000030","Tower Hamlets","RCX",3
"E09000030","Tower Hamlets","RGP",3
"E09000030","Tower Hamlets","RPY",3
"E09000030","Tower Hamlets","RBA",2
"E09000030","Tower Hamlets","RGN",2
"E09000030","Tower Hamlets","RNQ",2
"E09000030","Tower Hamlets","RPC",2
"E09000030","Tower Hamlets","RTX",2
"E09000030","Tower Hamlets","RA7",2
"E09000030","Tower Hamlets","RNU",2
"E09000030","Tower Hamlets","RV3",2
"E09000030","Tower Hamlets","R1L",2
"E09000030","Tower Hamlets","RAT",2
"E09000030","Tower Hamlets","RDY",2
"E09000030","Tower Hamlets","RHM",2
"E09000030","Tower Hamlets","RV5",2
"E09000030","Tower Hamlets","RCU",2
"E09000030","Tower Hamlets","RFS",2
"E09000030","Tower Hamlets","RK9",2
"E09000030","Tower Hamlets","RRE",2
"E09000030","Tower Hamlets","R1F",2
"E09000030","Tower Hamlets","RA3",2
"E09000030","Tower Hamlets","RCB",2
"E09000030","Tower Hamlets","RX1",2
"E09000030","Tower Hamlets","RBT",1
"E09000030","Tower Hamlets","RGR",1
"E09000030","Tower Hamlets","RH8",1
"E09000030","Tower Hamlets","RRF",1
"E09000030","Tower Hamlets","RTG",1
"E09000030","Tower Hamlets","RXL",1
"E09000030","Tower Hamlets","RXY",1
"E09000030","Tower Hamlets","RVY",1
"E09000030","Tower Hamlets","RW4",1
"E09000030","Tower Hamlets","RBQ",1
"E09000030","Tower Hamlets","RXR",1
"E09000030","Tower Hamlets","RXW",1
"E09000030","Tower Hamlets","RL4",1
"E09000030","Tower Hamlets","RN3",1
"E09000030","Tower Hamlets","RX3",1
"E09000030","Tower Hamlets","RBK",1
"E09000030","Tower Hamlets","RNS",1
"E09000030","Tower Hamlets","RP5",1
"E09000030","Tower Hamlets","RXX",1
"E09000030","Tower Hamlets","RBL",1
"E09000030","Tower Hamlets","RGM",1
"E09000030","Tower Hamlets","RM3",1
"E09000030","Tower Hamlets","RTR",1
"E09000030","Tower Hamlets","RW1",1
"E09000030","Tower Hamlets","RXF",1
"E09000030","Tower Hamlets","RAE",1
"E09000030","Tower Hamlets","RD3",1
"E09000030","Tower Hamlets","RWJ",1
"E09000030","Tower Hamlets","TAJ",1
"E09000030","Tower Hamlets","RBD",1
"E09000030","Tower Hamlets","RMC",1
"E09000030","Tower Hamlets","RN5",1
"E09000030","Tower Hamlets","RTF",1
"E09000031","Waltham Forest","R1H",26009
"E09000031","Waltham Forest","RQX",1000
"E09000031","Waltham Forest","RAP",748
"E09000031","Waltham Forest","RRV",330
"E09000031","Waltham Forest","RAT",286
"E09000031","Waltham Forest","RF4",199
"E09000031","Waltham Forest","RJ1",185
"E09000031","Waltham Forest","RAL",137
"E09000031","Waltham Forest","RYJ",83
"E09000031","Waltham Forest","RQW",81
"E09000031","Waltham Forest","RKE",76
"E09000031","Waltham Forest","RWK",68
"E09000031","Waltham Forest","RP6",67
"E09000031","Waltham Forest","RQ8",51
"E09000031","Waltham Forest","RJZ",46
"E09000031","Waltham Forest","R1K",42
"E09000031","Waltham Forest","RJ7",42
"E09000031","Waltham Forest","RQM",32
"E09000031","Waltham Forest","RGT",24
"E09000031","Waltham Forest","RDD",29
"E09000031","Waltham Forest","RDE",17
"E09000031","Waltham Forest","RP4",14
"E09000031","Waltham Forest","RJ2",26
"E09000031","Waltham Forest","RAX",11
"E09000031","Waltham Forest","RWH",10
"E09000031","Waltham Forest","RAS",10
"E09000031","Waltham Forest","RHW",9
"E09000031","Waltham Forest","RWF",9
"E09000031","Waltham Forest","RT3",9
"E09000031","Waltham Forest","RJ6",8
"E09000031","Waltham Forest","RDU",8
"E09000031","Waltham Forest","RM1",8
"E09000031","Waltham Forest","RRK",15
"E09000031","Waltham Forest","RWG",8
"E09000031","Waltham Forest","RYR",7
"E09000031","Waltham Forest","RPY",7
"E09000031","Waltham Forest","RTP",7
"E09000031","Waltham Forest","RVR",7
"E09000031","Waltham Forest","RXK",8
"E09000031","Waltham Forest","RC9",6
"E09000031","Waltham Forest","RD8",6
"E09000031","Waltham Forest","RPA",6
"E09000031","Waltham Forest","RTH",6
"E09000031","Waltham Forest","RVV",5
"E09000031","Waltham Forest","RGN",5
"E09000031","Waltham Forest","RN7",5
"E09000031","Waltham Forest","RA2",5
"E09000031","Waltham Forest","REM",7
"E09000031","Waltham Forest","RR8",5
"E09000031","Waltham Forest","RXH",5
"E09000031","Waltham Forest","RTD",5
"E09000031","Waltham Forest","RAN",5
"E09000031","Waltham Forest","RXQ",4
"E09000031","Waltham Forest","REF",4
"E09000031","Waltham Forest","RK9",4
"E09000031","Waltham Forest","RNL",4
"E09000031","Waltham Forest","RWD",4
"E09000031","Waltham Forest","R1F",4
"E09000031","Waltham Forest","RWY",4
"E09000031","Waltham Forest","RXC",4
"E09000031","Waltham Forest","R0A",4
"E09000031","Waltham Forest","RA7",3
"E09000031","Waltham Forest","RGP",3
"E09000031","Waltham Forest","RGR",3
"E09000031","Waltham Forest","RTE",3
"E09000031","Waltham Forest","RXL",3
"E09000031","Waltham Forest","RAJ",3
"E09000031","Waltham Forest","RBK",3
"E09000031","Waltham Forest","RCB",3
"E09000031","Waltham Forest","RN3",3
"E09000031","Waltham Forest","RTG",5
"E09000031","Waltham Forest","RKB",3
"E09000031","Waltham Forest","RN5",3
"E09000031","Waltham Forest","RNQ",3
"E09000031","Waltham Forest","RX1",3
"E09000031","Waltham Forest","RTX",3
"E09000031","Waltham Forest","RC1",3
"E09000031","Waltham Forest","RD3",3
"E09000031","Waltham Forest","RNA",3
"E09000031","Waltham Forest","RWE",3
"E09000031","Waltham Forest","RP5",2
"E09000031","Waltham Forest","RAE",2
"E09000031","Waltham Forest","RBT",2
"E09000031","Waltham Forest","RWA",2
"E09000031","Waltham Forest","RFS",2
"E09000031","Waltham Forest","RM3",2
"E09000031","Waltham Forest","RXF",2
"E09000031","Waltham Forest","RBZ",2
"E09000031","Waltham Forest","RH8",2
"E09000031","Waltham Forest","RXP",2
"E09000031","Waltham Forest","RA9",2
"E09000031","Waltham Forest","RDZ",2
"E09000031","Waltham Forest","RHM",2
"E09000031","Waltham Forest","RJE",2
"E09000031","Waltham Forest","RTK",2
"E09000031","Waltham Forest","RLQ",1
"E09000031","Waltham Forest","RVW",1
"E09000031","Waltham Forest","RW6",1
"E09000031","Waltham Forest","RD1",1
"E09000031","Waltham Forest","RHQ",1
"E09000031","Waltham Forest","RNU",1
"E09000031","Waltham Forest","RTF",1
"E09000031","Waltham Forest","RXW",1
"E09000031","Waltham Forest","RBD",1
"E09000031","Waltham Forest","RA4",1
"E09000031","Waltham Forest","RCF",1
"E09000031","Waltham Forest","R0B",1
"E09000031","Waltham Forest","RV5",1
"E09000031","Waltham Forest","RBA",1
"E09000031","Waltham Forest","RJL",1
"E09000031","Waltham Forest","RFR",1
"E09000031","Waltham Forest","RHU",1
"E09000031","Waltham Forest","RK5",1
"E09000031","Waltham Forest","RX4",1
"E09000031","Waltham Forest","R1L",1
"E09000031","Waltham Forest","RNS",1
"E09000031","Waltham Forest","RP1",1
"E09000031","Waltham Forest","RPC",1
"E09000031","Waltham Forest","RQ3",1
"E09000031","Waltham Forest","RWJ",1
"E09000031","Waltham Forest","RL4",1
"E09000031","Waltham Forest","RVJ",1
"E09000032","Wandsworth","RJ7",18184
"E09000032","Wandsworth","RQM",3667
"E09000032","Wandsworth","RAX",2316
"E09000032","Wandsworth","RJ1",1582
"E09000032","Wandsworth","RYJ",727
"E09000032","Wandsworth","RJZ",254
"E09000032","Wandsworth","RQY",200
"E09000032","Wandsworth","RRV",189
"E09000032","Wandsworth","R1H",140
"E09000032","Wandsworth","RVR",137
"E09000032","Wandsworth","RPY",125
"E09000032","Wandsworth","RJ6",87
"E09000032","Wandsworth","RP6",71
"E09000032","Wandsworth","R1K",59
"E09000032","Wandsworth","RT3",48
"E09000032","Wandsworth","RA2",36
"E09000032","Wandsworth","RDU",32
"E09000032","Wandsworth","RYR",27
"E09000032","Wandsworth","RAL",24
"E09000032","Wandsworth","RTP",24
"E09000032","Wandsworth","RQX",23
"E09000032","Wandsworth","RTH",19
"E09000032","Wandsworth","RWF",19
"E09000032","Wandsworth","RF4",17
"E09000032","Wandsworth","RKE",17
"E09000032","Wandsworth","REF",16
"E09000032","Wandsworth","RTK",16
"E09000032","Wandsworth","RAS",14
"E09000032","Wandsworth","RXH",14
"E09000032","Wandsworth","RJ2",23
"E09000032","Wandsworth","RHU",12
"E09000032","Wandsworth","RD3",11
"E09000032","Wandsworth","RDE",11
"E09000032","Wandsworth","RN5",11
"E09000032","Wandsworth","RXC",11
"E09000032","Wandsworth","RA7",11
"E09000032","Wandsworth","RWH",10
"E09000032","Wandsworth","RCB",10
"E09000032","Wandsworth","RWG",10
"E09000032","Wandsworth","RA9",10
"E09000032","Wandsworth","RAP",10
"E09000032","Wandsworth","RN3",10
"E09000032","Wandsworth","RM1",9
"E09000032","Wandsworth","RDZ",9
"E09000032","Wandsworth","RVV",8
"E09000032","Wandsworth","RHW",8
"E09000032","Wandsworth","RTE",8
"E09000032","Wandsworth","RGT",8
"E09000032","Wandsworth","RNZ",8
"E09000032","Wandsworth","RLQ",8
"E09000032","Wandsworth","R0A",8
"E09000032","Wandsworth","RH8",8
"E09000032","Wandsworth","RAJ",6
"E09000032","Wandsworth","RBZ",6
"E09000032","Wandsworth","RK9",6
"E09000032","Wandsworth","RJC",6
"E09000032","Wandsworth","RBD",6
"E09000032","Wandsworth","RVJ",6
"E09000032","Wandsworth","RRK",8
"E09000032","Wandsworth","RDD",5
"E09000032","Wandsworth","RHM",5
"E09000032","Wandsworth","RGP",5
"E09000032","Wandsworth","REM",6
"E09000032","Wandsworth","RWK",5
"E09000032","Wandsworth","RXQ",5
"E09000032","Wandsworth","RV3",5
"E09000032","Wandsworth","RX1",5
"E09000032","Wandsworth","RD1",5
"E09000032","Wandsworth","RN7",5
"E09000032","Wandsworth","RC9",4
"E09000032","Wandsworth","RQ8",4
"E09000032","Wandsworth","R1F",4
"E09000032","Wandsworth","RGN",4
"E09000032","Wandsworth","RTG",7
"E09000032","Wandsworth","RD8",4
"E09000032","Wandsworth","RCX",4
"E09000032","Wandsworth","RBN",4
"E09000032","Wandsworth","RKB",4
"E09000032","Wandsworth","RWE",4
"E09000032","Wandsworth","RQW",4
"E09000032","Wandsworth","RWJ",4
"E09000032","Wandsworth","RJE",3
"E09000032","Wandsworth","RXL",3
"E09000032","Wandsworth","RBL",3
"E09000032","Wandsworth","RPC",3
"E09000032","Wandsworth","RAN",3
"E09000032","Wandsworth","RPA",3
"E09000032","Wandsworth","RWD",3
"E09000032","Wandsworth","RBT",3
"E09000032","Wandsworth","RK5",3
"E09000032","Wandsworth","RP4",3
"E09000032","Wandsworth","RTD",3
"E09000032","Wandsworth","RBA",3
"E09000032","Wandsworth","RV5",3
"E09000032","Wandsworth","RVY",3
"E09000032","Wandsworth","RBK",2
"E09000032","Wandsworth","RRF",2
"E09000032","Wandsworth","RWY",2
"E09000032","Wandsworth","RGR",2
"E09000032","Wandsworth","RGM",2
"E09000032","Wandsworth","RM3",2
"E09000032","Wandsworth","RCD",2
"E09000032","Wandsworth","RXK",2
"E09000032","Wandsworth","RXP",2
"E09000032","Wandsworth","RFS",1
"E09000032","Wandsworth","RH5",1
"E09000032","Wandsworth","RMP",1
"E09000032","Wandsworth","RMY",1
"E09000032","Wandsworth","RPG",1
"E09000032","Wandsworth","RXN",1
"E09000032","Wandsworth","RNQ",1
"E09000032","Wandsworth","RNS",1
"E09000032","Wandsworth","RR8",1
"E09000032","Wandsworth","RWW",1
"E09000032","Wandsworth","RC1",1
"E09000032","Wandsworth","RET",1
"E09000032","Wandsworth","RTX",1
"E09000032","Wandsworth","RA4",1
"E09000032","Wandsworth","RJR",1
"E09000032","Wandsworth","RTF",1
"E09000032","Wandsworth","RW1",1
"E09000032","Wandsworth","RXR",1
"E09000032","Wandsworth","RXX",1
"E09000032","Wandsworth","RYV",1
"E09000032","Wandsworth","RXF",1
"E09000032","Wandsworth","RTR",1
"E09000032","Wandsworth","RVW",1
"E09000033","Westminster","RYJ",8580
"E09000033","Westminster","RJ1",3010
"E09000033","Westminster","RRV",2136
"E09000033","Westminster","RQM",1836
"E09000033","Westminster","RAL",450
"E09000033","Westminster","RV3",215
"E09000033","Westminster","R1H",181
"E09000033","Westminster","R1K",169
"E09000033","Westminster","RJZ",110
"E09000033","Westminster","RPY",92
"E09000033","Westminster","RJ7",62
"E09000033","Westminster","RKE",39
"E09000033","Westminster","RT3",36
"E09000033","Westminster","RAS",36
"E09000033","Westminster","RTH",27
"E09000033","Westminster","RQX",23
"E09000033","Westminster","RWG",19
"E09000033","Westminster","RDU",15
"E09000033","Westminster","RHW",15
"E09000033","Westminster","RVR",13
"E09000033","Westminster","RJ2",18
"E09000033","Westminster","RYR",13
"E09000033","Westminster","RTP",13
"E09000033","Westminster","RAX",12
"E09000033","Westminster","RTE",11
"E09000033","Westminster","RA2",11
"E09000033","Westminster","RJ6",11
"E09000033","Westminster","RP6",11
"E09000033","Westminster","RXH",10
"E09000033","Westminster","RAP",9
"E09000033","Westminster","RF4",9
"E09000033","Westminster","RNZ",8
"E09000033","Westminster","RWH",8
"E09000033","Westminster","RWF",8
"E09000033","Westminster","RHM",8
"E09000033","Westminster","RVV",7
"E09000033","Westminster","RHU",7
"E09000033","Westminster","REF",7
"E09000033","Westminster","RDZ",7
"E09000033","Westminster","RXC",7
"E09000033","Westminster","RVJ",6
"E09000033","Westminster","RQW",6
"E09000033","Westminster","RM1",6
"E09000033","Westminster","RN7",6
"E09000033","Westminster","RN3",6
"E09000033","Westminster","RNS",6
"E09000033","Westminster","RWK",5
"E09000033","Westminster","RD1",5
"E09000033","Westminster","RBA",5
"E09000033","Westminster","RDE",5
"E09000033","Westminster","RGT",5
"E09000033","Westminster","RP4",5
"E09000033","Westminster","RHQ",4
"E09000033","Westminster","RN5",4
"E09000033","Westminster","RA9",4
"E09000033","Westminster","RD3",4
"E09000033","Westminster","RBV",4
"E09000033","Westminster","RV5",4
"E09000033","Westminster","R0A",4
"E09000033","Westminster","RJE",4
"E09000033","Westminster","RKB",4
"E09000033","Westminster","RAN",4
"E09000033","Westminster","RTF",4
"E09000033","Westminster","RQ8",3
"E09000033","Westminster","RRK",5
"E09000033","Westminster","RDD",3
"E09000033","Westminster","RTD",3
"E09000033","Westminster","RTG",3
"E09000033","Westminster","RGN",3
"E09000033","Westminster","RGP",3
"E09000033","Westminster","RH8",3
"E09000033","Westminster","RPA",3
"E09000033","Westminster","RXQ",3
"E09000033","Westminster","RBD",2
"E09000033","Westminster","RBL",2
"E09000033","Westminster","RGR",2
"E09000033","Westminster","RNU",2
"E09000033","Westminster","REM",2
"E09000033","Westminster","RXW",2
"E09000033","Westminster","RXL",2
"E09000033","Westminster","RAE",2
"E09000033","Westminster","RC1",2
"E09000033","Westminster","RJL",2
"E09000033","Westminster","R1F",2
"E09000033","Westminster","RA7",2
"E09000033","Westminster","RAJ",2
"E09000033","Westminster","RCX",2
"E09000033","Westminster","RNL",2
"E09000033","Westminster","RRF",2
"E09000033","Westminster","RX1",2
"E09000033","Westminster","RBK",2
"E09000033","Westminster","RCD",2
"E09000033","Westminster","RD8",2
"E09000033","Westminster","RK9",2
"E09000033","Westminster","RR8",2
"E09000033","Westminster","RWE",2
"E09000033","Westminster","RBT",1
"E09000033","Westminster","RCF",1
"E09000033","Westminster","RJC",1
"E09000033","Westminster","RNA",1
"E09000033","Westminster","RA4",1
"E09000033","Westminster","RTR",1
"E09000033","Westminster","RWD",1
"E09000033","Westminster","RXF",1
"E09000033","Westminster","R1L",1
"E09000033","Westminster","RW6",1
"E09000033","Westminster","RWX",1
"E09000033","Westminster","RCB",1
"E09000033","Westminster","RWP",1
"E09000033","Westminster","RXY",1
"E09000033","Westminster","RBN",1
"E09000033","Westminster","RX3",1
"E09000033","Westminster","RA3",1
"E09000033","Westminster","RC9",1
"E09000033","Westminster","RFS",1
"E09000033","Westminster","RTX",1
"E09000033","Westminster","RWR",1
"E09000033","Westminster","RBZ",1
"E09000033","Westminster","RFF",1
"E09000033","Westminster","RPG",1
"E09000033","Westminster","RXE",1
"E09000033","Westminster","RJN",1
"E09000033","Westminster","RPC",1
"E09000033","Westminster","RWY",1
"W06000001","Isle of Anglesey",NA,0
"W06000002","Gwynedd",NA,0
"W06000003","Conwy",NA,0
"W06000004","Denbighshire",NA,0
"W06000005","Flintshire",NA,0
"W06000006","Wrexham",NA,0
"W06000008","Ceredigion",NA,0
"W06000009","Pembrokeshire",NA,0
"W06000010","Carmarthenshire",NA,0
"W06000011","Swansea",NA,0
"W06000012","Neath Port Talbot",NA,0
"W06000013","Bridgend",NA,0
"W06000014","Vale of Glamorgan",NA,0
"W06000015","Cardiff",NA,0
"W06000016","Rhondda Cynon Taf",NA,0
"W06000018","Caerphilly",NA,0
"W06000019","Blaenau Gwent",NA,0
"W06000020","Torfaen",NA,0
"W06000021","Monmouthshire",NA,0
"W06000022","Newport",NA,0
"W06000023","Powys",NA,0
"W06000024","Merthyr Tydfil",NA,0
================================================
FILE: Heatmaps/readme.md
================================================
## Visualising the spread of the pandemic
*Cases*
[English LA Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/English%20LA%20Heatmaps.R) generates heatmaps and animated maps showing English Upper Tier Local Authority trajectories in both confirmed COVID-19 cases and estimated COVID-19 deaths (in hospitals only) inspired by similar plots for US states from [@Marco_Piani](https://twitter.com/Marco_Piani). The approach to modelling deaths, which are only published at NHS trust level, was developed by [@Benj_Barr](https://twitter.com/Benj_Barr). The code also generates a map of Local Authority-level changes in case numbers in the past week and animated maps of both case and death counts.
[COVIDCaseCartograms.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCaseCartograms.R) creates a series of cartograms based on [the excellent templates](https://t.co/rIej2uTt5D) created by [@carlbaker](https://twitter.com/carlbaker) showing COVID case rates across the UK. [COVIDCasesLTLAPhasePlot.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCasesLTLAPhasePlot.R) uses [an approach](https://twitter.com/jburnmurdoch/status/1339646913436676098) borrowed from [John Burn-Murdoch](https://twitter.com/jburnmurdoch) to look at the current picture of Local Authority-level cases and whether they are accelerating or decelerating. [COVIDLineages.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDLineages.R) Plots data from the Wellcome Sanger Institute to look at the spread of different COVID variants over time in UK regions.
[COVIDLACaseData.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDLACaseData.R) generates similar outputs, including for hospital admissions, at Lower Tier Local Authority level. I've written about these plots in [an article](https://t.co/zNCrpC0wMw?amp=1) for the journal [People, Place and Policy](https://extra.shu.ac.uk/ppp-online/). [COVIDTestingData.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDTestingData.R) analyses testing rates and positivity, although this analysis is now less relevant since the wider rollout of LFD tests, as it mostly focuses on PCR test data.
[COVIDCFRs](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCFRs.R) uses Case Fatality Rates estimated by [Daniel Howdon](https://medicinehealth.leeds.ac.uk/medicine/staff/447/dr-dan-howdon) to look at how these have changed over time, particularly in relation to the vaccine rollout. [COVIDCasesvsCFR.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCasesvsCFR.R) extends this to estimate the mortality burden associated with the current caseload in English Local Authorities and how this has changed over time as case numbers and the age profile of cases has shifted.
[Scottish HB Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Scottish%20HB%20Heatmaps.R), [Welsh LA Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Welsh%20LA%20Heatmaps.R), [Irish County Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Irish%20County%20Heatmaps.R), [German State Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/German%20State%20Heatmaps.R) and [COVIDCanadaHeatmap.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCanadaHeatmap.R) produce equivalent case trajectory plots for Scottish Health Boards, Welsh Local Authorities, Irish Counties, German Bundesländer and Canadian Provinces respectively.
[COVIDMSOACaseRatexIMD.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDMSOACaseRatexIMD.R) looks at socioeconomic differences in case rates and how they have changed in recent weeks, while [COVIDBivariateCasesxIMD](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDBivariateCasesxIMD.R) looks at associations between COVID case rates and deprivation in London and Glasgow.
[COVIDPHESurveillance.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHESurveillance.R) and [COVIDPHESurveillance2.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHESurveillance2.R) provide analysis of the PHE Surveillance reports, including case data and positivity rates by age, although these have largely been replaced by [COVIDPHECasesxAgev2](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHECasesxAgev2.R) which generates similar plots now that age-specific case data at Local Authority level is published as part of [the PHE dashboard](http://coronavirus.data.gov.uk). [ONSInfectionSurvey](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/ONSInfectionSurvey.R) produces similar graphs for the ONS' random sampling infection survey. [ScotlandCOVIDCasesxAge.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/ScotlandCOVIDCasesxAge.R) performs some similar analysis of case data by age for Scotland, alongside analysis of cases and deaths by deprivation quintile. [COVIDAgeTrends.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDAgeTrends.R) takes data on COVID cases, admissions and deaths and separates the trends out by age, to help identify potential impacts of the vaccination programme.
[ScotlandCOVIDHouseParties.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/ScotlandCOVIDHouseParties.R) is a small piece of analysis looking at data from Scotland on regulation-breaching house parties. Finally, [COVIDPillars.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPillars.R) is another, obsolete, approach using older, pre-dashboard API, data to separate out case trajectories by testing pillar, while [Misc Case Analysis.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Misc%20Case%20Analysis.R) is a collection of various quick plots related to various aspects of case data.
*Hospital admissions*
[COVIDNHSAdmissions.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDNHSAdmissions.R) analyses hospital admissions, occupancy and ventilator bed use across England. [UK Hex Animation.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/UK%20Hex%20Animations.R) uses this data to generate an animated hex map of COVID-19 cases across the UK & Ireland, built on various excellent hex map resources from [@ODILeeds](https://twitter.com/ODILeeds) and [@olihawkins](https://twitter.com/olihawkins). [COVIDNHSBolton.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDNHSBolton.R) uses the same analysis, but focusing on Bolton specifically.
[COVIDCycle.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCycle.R) visualises data on COVID-19 hospital admissions and deaths (using deaths within 24 days of a positive test, rathern than death certificate data) using [an approach](https://twitter.com/maartenzam/status/1319622943526293505) taken from [Maarten Lambrechts](https://twitter.com/maartenzam). [COVIDCycleUS](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCycle_US.R) produces similar plots for the US as a whole and for individual states.
[COVIDAdmissionsLTLTPhasePlot.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDAdmissionsLTLAPhasePlot.R) uses [an approach](https://twitter.com/jburnmurdoch/status/1339646913436676098) borrowed from [John Burn-Murdoch](https://twitter.com/jburnmurdoch) to look at the current picture of trust- and Local Authority-level hospital admissions. [COVIDHFRs.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDHFRs.R) looks (fairly simplistically) at the association between hospital admissions and deaths in hospitals in England.
*Vaccinations*
[COVIDVaccinations.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinations.R) creates graphs of the UK rollout of COVID vaccines, while [COVIDVaccinationMSOACartogram](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationMSOACartogram.R) plots maps of the geographic distribution of vaccinations in England and analyses the socioeconomic inequalities in this. [COVIDBivariateCasesxVax]https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDBivariateCasesxVax.R) looks at associations between COVID vaccination rates and deprivationacross England. [COVIDVaccinationStaffCartogram.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationStaffCartogram.R) looks at vaccine coverage among health and social care staff. [COVIDVaccinationInequalityGB.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationInequalityGB.R) uses rather patchy data on vaccine delivery by deprivation and age to look at how inequality in delivery varies between GB nations, by age and how this has changed over time. [COVIDVaxUptakexAge.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaxUptakexAge.R) plots cumulative uptake of vaccinations by age in England
[COVIDCasesxVaxTadpoles](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCasesxVaxTadpoles.R) generates a tadpole plot showing how current COVID cases at Local Authority and MSOA level relate to current vaccination rates. [COVIDPHEVaxxAgexSex.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHEVaxxAgexSex.R) uses weekly data on vaccination coverage from the PHE Surveillance report to plot an age pyramid of vaccination coverage. [COVIDVaxPyramidxRegion.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaxPyramidxRegion.R) attempts to replicate theis at a regional level, while [COVIDVaccinationAnimations.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationAnimations.R) creates an animated version to show the progress of vaccination coverage over time. Finally, [YorkshireVaxCartogram.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/YorkshireVaxCartogram.R) produces Yorkshire-specific analyses of vaccination coverage.
*Apps*
I've also made a few apps to allow you to explore local and national COVID-19 data. [One](https://victimofmaths.shinyapps.io/COVID_LA_Plots/) for mortality, cases and admissions data, [one](https://victimofmaths.shinyapps.io/COVID_Cases_By_Age/) for case data stratified by age and [another](https://victimofmaths.shinyapps.io/COVID_Case_Trends_By_Age/) which compares trends in recent age-specific case data.






Suggested citation for any of this analysis:
Angus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226
================================================
FILE: Initial Inequality Estimates/Estimated Cases by IMD.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(paletteer)
library(sf)
library(gganimate)
library(cowplot)
library(lubridate)
library(data.table)
library(forcats)
library(RcppRoll)
options(scipen = 999)
#Read in COVID dase data
temp <- tempfile()
source <- "https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- fread(temp)[,c(1,2,3,4,5,8)]
colnames(data) <- c("name", "code", "type", "date", "cases", "cumul_cases")
data$date <- as.Date(data$date)
#split out regional data
reg_data <- subset(data, type=="Region")
data <- subset(data, type=="Upper tier local authority")
#Read in IMD data
temp <- tempfile()
source <- "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/834001/File_11_-_IoD2019_Local_Authority_District_Summaries__upper-tier__.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
IMDdata <- read_excel(temp, sheet="IMD", range="A1:D152", col_names=TRUE)[,-c(2)]
colnames(IMDdata) <- c("code", "IMDrank", "IMDorder")
IMDdata$quintile <- ntile(IMDdata$IMDrank, 5)
data <- merge(data, IMDdata, by="code")
#Bring in region data (probably a better source for this)
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/healthandlifeexpectancies/datasets/healthylifeexpectancyatbirthforuppertierlocalauthoritiesenglandreferencetables/20102012/hleatbirthforuppertierlocalauthorities201012final.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
RegionLookup <- read_excel(temp, sheet="UTLA males", range="A10:E160", col_names=TRUE)[,c(1,5)]
colnames(RegionLookup) <- c("code", "region")
#Combine
data <- merge(data, RegionLookup, all.x=TRUE)
#Sort out regions with boundary changes since the region list was compiled
data$region <- case_when(
data$name=="Dorset" ~ "South West",
data$name=="Bournemouth, Christchurch and Poole" ~ "South West",
data$name=="Gateshead" ~ "North East",
data$name=="City of London" ~ "London",
TRUE ~ data$region
)
#Bring in LA-level population data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
LApop <- read_excel(temp, sheet="MYE2-All", range="A5:D367", col_names=TRUE)
colnames(LApop) <- c("code2", "name", "geography", "pop")
LApop_long <- gather(LApop, age, pop, pop)
#deal with Cornwall & Scilly + Hackney & City of London which are merged in the PHE data
LApop_long$code <- case_when(
LApop_long$code2=="E06000052" ~ "E06000052",
TRUE ~ LApop_long$code2
)
LApop_long <- LApop_long %>%
group_by(code) %>%
summarise(pop=sum(pop))
#Combine
data <- merge(data, LApop_long, all.x=TRUE)
#Set up skepeton dataframe with dates
LAcodes <- unique(data$code)
min <- min(data$date)
max <- max(data$date)
skeleton <- data.frame(code=rep(LAcodes, each=(max-min+1), times=1), date=rep(seq.Date(from=min, to=max, by="day"), each=1, times=length(LAcodes)))
#Map data onto skeleton
fulldata <- merge(skeleton, data[,c(1,4:6)], by=c("code", "date"), all.x=TRUE, all.y=TRUE)
#Fill in blank days
fulldata$cases <- ifelse(is.na(fulldata$cases), 0, fulldata$cases)
#Calculate cumulative sums so far
fulldata <- fulldata %>%
group_by(code) %>%
mutate(cumul_cases=cumsum(cases))
#Bring in LA factors
LAdata <- unique(data[,c(1,2,7:11)])
fulldata <- merge(fulldata, LAdata)
#Calculate rates by LA
fulldata$caserate <- fulldata$cases*100000/fulldata$pop
#Collapse to quintiles
quintiles <- fulldata %>%
group_by(quintile, date) %>%
summarise(cases=sum(cases), cumul_cases=sum(cumul_cases), pop=sum(pop))
#Calculate rates
quintiles$caserate <- quintiles$cumul_cases*100000/quintiles$pop
#Set up lines for log breaks
logbreaks <- data.frame(breaks=c(1,2,5,10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000))
ratebreaks <- data.frame(breaks=c(1,2,5,10,20,50))
tiff("Outputs/COVIDQuintiles.tiff", units="in", res=300, width=8, height=6)
ggplot(quintiles, aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+
geom_line()+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases")+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDQuintilesLog.tiff", units="in", res=300, width=8, height=6)
ggplot(subset(quintiles, cumul_cases>0), aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+
geom_segment(data=logbreaks, aes(x=as.Date(-Inf, origin="2018-01-01"), xend=as.Date(Inf, origin="2018-01-01"),
y=breaks, yend=breaks), colour="gray80")+
geom_line()+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases (log scale)", trans="log10", breaks=logbreaks$breaks)+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDQuintilesRate.tiff", units="in", res=300, width=8, height=6)
ggplot(quintiles, aes(x=date, y=caserate, colour=as.factor(quintile)))+
geom_line()+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases per 100,000 population")+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDQuintilesRateLog.tiff", units="in", res=300, width=8, height=6)
ggplot(subset(quintiles, cumul_cases>0), aes(x=date, y=caserate, colour=as.factor(quintile)))+
geom_segment(data=ratebreaks, aes(x=as.Date(-Inf, origin="2018-01-01"), xend=as.Date(Inf, origin="2018-01-01"),
y=breaks, yend=breaks), colour="gray80")+ geom_line()+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases per 100,000 population (log scale)", trans="log10",
breaks=ratebreaks$breaks)+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
#Split into London/not London
fulldata$London <- case_when(
fulldata$region=="London" ~ "London",
TRUE ~ "Rest of England"
)
#Collapse to quintiles
Lonquintiles<- fulldata %>%
group_by(quintile, London, date) %>%
summarise(cases=sum(cases), cumul_cases=sum(cumul_cases), pop=sum(pop))
#Calculate rates
Lonquintiles$caserate <- Lonquintiles$cumul_cases*100000/Lonquintiles$pop
tiff("Outputs/COVIDQuintilesLon.tiff", units="in", res=300, width=12, height=6)
ggplot(Lonquintiles, aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+
geom_line()+
facet_wrap(~London)+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases")+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDQuintilesLonLog.tiff", units="in", res=300, width=12, height=6)
ggplot(subset(Lonquintiles, cumul_cases>0), aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+
geom_segment(data=logbreaks, aes(x=as.Date(-Inf, origin="2018-01-01"), xend=as.Date(Inf, origin="2018-01-01"),
y=breaks, yend=breaks), colour="gray80")+ geom_line()+ geom_line()+
facet_wrap(~London)+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases", trans="log10",
breaks=logbreaks$breaks)+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDQuintilesLonRate.tiff", units="in", res=300, width=12, height=6)
ggplot(Lonquintiles, aes(x=date, y=caserate, colour=as.factor(quintile)))+
geom_line()+
facet_wrap(~London)+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases per 100,000 population")+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDQuintilesLonRateLog.tiff", units="in", res=300, width=12, height=6)
ggplot(subset(Lonquintiles, cumul_cases>0), aes(x=date, y=caserate, colour=as.factor(quintile)))+
geom_segment(data=ratebreaks, aes(x=as.Date(-Inf, origin="2018-01-01"), xend=as.Date(Inf, origin="2018-01-01"),
y=breaks, yend=breaks), colour="gray80")+ geom_line()+ geom_line()+
facet_wrap(~London)+
theme_classic()+
scale_colour_manual(values=c("#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"), name="IMD quintile",
labels=c("Q1 (least deprived)", "Q2", "Q3", "Q4", "Q5 (most deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Cumulative known cases per 100,000 population", trans="log10",
breaks=ratebreaks$breaks)+
labs(title="Cumulative COVID-19 cases by deprivation quintile", subtitle="Deprivation estimated using mean IMD level across each UTLA",
caption="Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths")
dev.off()
#Map of most cumulative case rates
#Read in shapefile of LA boundaries, which can be downloaded from:
#http://geoportal.statistics.gov.uk/datasets/counties-and-unitary-authorities-december-2017-full-clipped-boundaries-in-uk/data
shapefile <- st_read("Shapefiles/Counties_and_Unitary_Authorities_December_2017_Full_Clipped_Boundaries_in_UK.shp")
names(shapefile)[names(shapefile) == "ctyua17cd"] <- "code"
fulldata$caserate <- fulldata$cumul_cases*100000/fulldata$pop
#Duplicate data to account for shapefile using pre-2019 codes
int1 <- filter(fulldata, name=="Bournemouth, Christchurch and Poole")
int1$code <- "E06000028"
int2 <- filter(fulldata, name=="Bournemouth, Christchurch and Poole")
int2$code <- "E06000029"
int3 <- filter(fulldata, name=="Bournemouth, Christchurch and Poole")
int3$code <- "E10000009"
int4 <- filter(fulldata, name=="Cornwall and Isles of Scilly")
int4$code <- "E06000053"
temp <- rbind(fulldata, int1, int2, int3, int4)
#Bring in data
map.data <- full_join(shapefile, temp, by="code", all.y=TRUE)
#remove areas with no HLE data (i.e. Scotland, Wales & NI)
map.data <- subset(map.data, substr(code, 1, 1)=="E")
#Whole country
England <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+
geom_sf(colour="White")+
xlim(10000,655644)+
ylim(5337,700000)+
theme_classic()+
scale_fill_paletteer_c("pals::ocean.tempo", name="Total confirmed\ncases per 100,000")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank(), plot.title=element_text(face="bold"))+
labs(title="Confirmed COVID-19 case rates for Local Authorities in England",
caption="Data from Public Health England | Plot by @VictimOfMaths")+
geom_rect(aes(xmin=500000, xmax=560000, ymin=156000, ymax=200000), fill="transparent",
colour="gray50")+
geom_rect(aes(xmin=310000, xmax=405000, ymin=370000, ymax=430000), fill="transparent",
colour="gray50")+
geom_rect(aes(xmin=405000, xmax=490000, ymin=505000, ymax=580000), fill="transparent",
colour="gray50")
#Add zoomed in areas
#London
London <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+
geom_sf(colour="White", show.legend=FALSE)+
scale_x_continuous(limits=c(500000,560000), expand=c(0,0))+
scale_y_continuous(limits=c(156000,200000), expand=c(0,0))+
theme_classic()+
scale_fill_paletteer_c("pals::ocean.tempo", name="Total confirmed\ncases per 100,000",
)+
labs(title="Greater London")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank())
#North-West England
NWEng <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+
geom_sf(colour="White", show.legend=FALSE)+
scale_x_continuous(limits=c(310000,405000), expand=c(0,0))+
scale_y_continuous(limits=c(370000,430000), expand=c(0,0))+
theme_classic()+
scale_fill_paletteer_c("pals::ocean.tempo", name="Total confirmed\ncases per 100,000")+
labs(title="The North West")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank())
#Tyne/Tees
NEEng <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+
geom_sf(colour="White", show.legend=FALSE)+
scale_x_continuous(limits=c(405000,490000), expand=c(0,0))+
scale_y_continuous(limits=c(505000,580000), expand=c(0,0))+
theme_classic()+
scale_fill_paletteer_c("pals::ocean.tempo", name="Total confirmed\ncases per 100,000")+
labs(title="The North East")+
theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),
axis.title=element_blank())
tiff("Outputs/COVIDMap.tiff", units="in", width=10, height=12, res=300)
ggdraw()+
draw_plot(England)+
draw_plot(London, 0.01,0.32,0.35,0.24)+
draw_plot(NWEng, 0.01,0.62, 0.32, 0.24)+
draw_plot(NEEng, 0.57, 0.67, 0.22, 0.22)
dev.off()
================================================
FILE: Initial Inequality Estimates/readme.md
================================================
An initial attempt to understand the potential inequality impacts of the pandemic, before official data became available.
[Estimated Cases By IMD.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Initial%20Inequality%20Estimates/Estimated%20Cases%20by%20IMD.R) takes published figures on confirmed COVID-19 cases by Local Authority in England and maps that onto quintiles of the Index of Multiple Deprivation, then plots a variety of case trajectories by deprivation quintile as well as a map of confirmed case rates.

Suggested citation for any of this analysis:
Angus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226
================================================
FILE: Observed Inequality/COVID-19 vs. Brexit.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(sf)
library(paletteer)
library(readxl)
#Read in Brexit voting data by LA
temp <- tempfile()
source <- "http://researchbriefings.files.parliament.uk/documents/CBP-7639/EU-referendum-results-and-characteristics-data.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
Brexitdata <- read_excel(temp, sheet="Results", range="A1:U383")[,c(4,5,19,20)]
Brexitdata$Result <- if_else(Brexitdata$Pct_Leave>Brexitdata$Pct_Remain, "Leave", "Remain")
#Read in COVID19 data
#Deaths
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1march2020to31may2020/referencetablesworkbook1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
Deathsdata <- read_excel(temp, sheet="Table 2", range="A6:Z3488", col_names=FALSE)[,c(1,2,4,5,16,17)]
colnames(Deathsdata) <- c("cause", "sex", "Area_Code", "Area", "Deaths", "Mortrate")
Deathsdata <- Deathsdata %>%
filter(cause=="COVID-19" & sex=="Persons")
#Merge
data <- merge(Brexitdata, Deathsdata, by="Area_Code")
tiff("Outputs/COVIDvsBrexit.tiff", units="in", width=8, height=6, res=500)
ggplot(data, aes(x=Pct_Leave, y=as.numeric(Mortrate)))+
geom_point(colour="tomato4", alpha=0.6)+
geom_smooth(method="lm", formula=y~x)+
scale_x_continuous(name="% leave vote", breaks=c(0.2,0.4,0.6), labels=c("20%", "40%", "60%"))+
scale_y_continuous(name="Age-standardised COVID-19 deaths per 100,000")+
theme_classic()+
labs(title="Correlation between Brexit vote and COVID-19 mortality",
subtitle="Based on Local Authorities in England & Wales",
caption="Data from House of Commons Library & ONS | Plot by @VictimOfMaths")
dev.off()
#Bring in unadjusted case trajectories
temp <- tempfile()
source <- "https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
Casesdata <- read.csv(temp)[,c(2,1,4,5)]
colnames(Casesdata) <- c("Area_Code", "Area", "Date", "NewCases")
Casesdata$Date <- as.Date(Casesdata$Date)
#Merge in Brexit vote
Casesdata <- merge(Casesdata, Brexitdata, by="Area_Code")
#Calculate trajectories
casetraj <- Casesdata %>%
group_by(Date, Result) %>%
summarise(cases=sum(NewCases))
tiff("Outputs/COVIDvsBrexitTrajectories.tiff", units="in", width=8, height=6, res=500)
ggplot(casetraj, aes(x=Date, y=cases, colour=Result))+
geom_line()+
theme_classic()+
scale_colour_manual(values=c("#003399", "#FFCC00"))+
scale_y_continuous(name="Daily confirmed COVID-19 cases")+
labs(title="New COVID-19 cases by Local Authority Brexit vote",
caption="Data from House of Commons Library & ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Observed Inequality/COVIDIneqDataSetup.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(lubridate)
library(paletteer)
library(ggtext)
library(broom)
#2005-2018 deaths registed from https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10929weeklydeathsregistrationsbyimdsexandagegroupenglandandwales2005to2018
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10929weeklydeathsregistrationsbyimdsexandagegroupenglandandwales2005to2018/wklydthsimdsexage2005to2018final.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#Read in data
deaths2005 <- read_excel(temp, sheet="Table 1", range="A4:BC144")
deaths2006 <- read_excel(temp, sheet="Table 3", range="A4:BC144")
deaths2007 <- read_excel(temp, sheet="Table 5", range="A4:BC144")
deaths2008 <- read_excel(temp, sheet="Table 7", range="A4:BC144")
deaths2009 <- read_excel(temp, sheet="Table 9", range="A4:BD144")
colnames(deaths2009)[56] <- "Week 53"
deaths2010 <- read_excel(temp, sheet="Table 11", range="A4:BC144")
deaths2011 <- read_excel(temp, sheet="Table 13", range="A4:BC144")
deaths2012 <- read_excel(temp, sheet="Table 15", range="A4:BC144")
deaths2013 <- read_excel(temp, sheet="Table 17", range="A4:BC144")
deaths2014 <- read_excel(temp, sheet="Table 19", range="A4:BC144")
deaths2015 <- read_excel(temp, sheet="Table 21", range="A4:BD144")
deaths2016 <- read_excel(temp, sheet="Table 23", range="A4:BC144")
deaths2017 <- read_excel(temp, sheet="Table 25", range="A4:BC144")
deaths2018 <- read_excel(temp, sheet="Table 27", range="A4:BC144")
#Tidy up and merge
deaths2005$year <- 2005
deaths2006$year <- 2006
deaths2007$year <- 2007
deaths2008$year <- 2008
deaths2009$year <- 2009
deaths2010$year <- 2010
deaths2011$year <- 2011
deaths2012$year <- 2012
deaths2013$year <- 2013
deaths2014$year <- 2014
deaths2015$year <- 2015
deaths2016$year <- 2016
deaths2017$year <- 2017
deaths2018$year <- 2018
popwt <- data.frame(Age=c("Under 1 year", "01-14", "15-44", "45-64", "65-74", "75-84", "85+"),
wt=c(0.01, 0.04+0.055+0.055, 0.055+0.06+0.06+0.065+0.07+0.07,
0.07+0.07+0.065+0.06, 0.055+0.05, 0.04+0.025,
0.015+0.008+0.002))
#Bring in populations
#2005-17 data from https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/adhocs/009316populationsbysexsingleyearofageandindexofmultipledeprivationimdengland2001to2017
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/populationandmigration/populationestimates/adhocs/009316populationsbysexsingleyearofageandindexofmultipledeprivationimdengland2001to2017/populationbyageimdengland20012017.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
engpop0117 <- read_excel(temp, sheet="Table 1", range="A14:E30953", col_names=FALSE)
colnames(engpop0117) <- c("year", "Sex", "Age", "IMD", "exposure")
engpop0117$Age <- case_when(
engpop0117$Age=="0" ~ "Under 1 year",
as.numeric(engpop0117$Age)<15 ~ "01-14",
as.numeric(engpop0117$Age)<45 ~ "15-44",
as.numeric(engpop0117$Age)<65 ~ "45-64",
as.numeric(engpop0117$Age)<75 ~ "65-74",
as.numeric(engpop0117$Age)<85 ~ "75-84",
TRUE~ "85+")
#collapse ages
engpop0117 <- engpop0117 %>%
group_by(year, Sex, IMD, Age) %>%
summarise(exposure=sum(exposure)) %>%
ungroup()
engpop0117$Sex <- if_else(engpop0117$Sex==1, "Male", "Female")
#2018 data from https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10832deathsandpopulationsbyindexofmultipledeprivationimdenglandandwales2018registrations
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10832deathsandpopulationsbyindexofmultipledeprivationimdenglandandwales2018registrations/deathspopsimdengwal2018.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
engpop18.m <- read_excel(temp, sheet=4, range="B4:CO13", col_names=FALSE)
engpop18.f <- read_excel(temp, sheet=4, range="B15:CO24", col_names=FALSE)
engpop18.m$Sex <- "Male"
engpop18.f$Sex <- "Female"
engpop18 <- bind_rows(engpop18.m, engpop18.f)
engpop18 <- gather(engpop18, Age, exposure, c(2:92))
colnames(engpop18) <- c("IMD", "Sex", "Age", "exposure")
engpop18$Age <- as.numeric(substr(engpop18$Age,4,5))-2
engpop18$Age <- case_when(
engpop18$Age==0 ~ "Under 1 year",
engpop18$Age<15 ~ "01-14",
engpop18$Age<45 ~ "15-44",
engpop18$Age<65 ~ "45-64",
engpop18$Age<75 ~ "65-74",
engpop18$Age<85 ~ "75-84",
TRUE~ "85+")
#Collapse ages and merge into 01-17 data
engpop <- engpop18 %>%
group_by(Sex, IMD, Age) %>%
summarise(exposure=sum(exposure)) %>%
ungroup() %>%
mutate(year=2018) %>%
bind_rows(engpop0117)
#Merge and collapse age groups
deaths0518 <- bind_rows(deaths2005, deaths2006, deaths2007, deaths2008, deaths2009, deaths2010,
deaths2011, deaths2012, deaths2013, deaths2014, deaths2015, deaths2016,
deaths2017, deaths2018) %>%
select(year, everything()) %>%
gather(week, deaths, `Week 1`:`Week 53`) %>%
merge(popwt) %>%
merge(engpop) %>%
mutate(mortrate=deaths*100000/exposure, wtrate=mortrate*wt) %>%
group_by(IMD, Sex, year, week) %>%
summarise(deaths=sum(deaths, na.rm=TRUE), ASMR=sum(wtrate, na.rm=TRUE)) %>%
ungroup() %>%
filter(!(week=="Week 53" & !year %in% c(2009, 2015)))
deaths0518$week <- as.numeric(substr(deaths0518$week,6,7))
#Collapse populations over age groups
engpop <- engpop %>%
group_by(Sex, IMD, year) %>%
summarise(exposure=sum(exposure)) %>%
ungroup()
engpop$time <- case_when(
engpop$year==2001 ~ -26-2*52-53,
engpop$year==2002 ~ -26-52-53,
engpop$year==2003 ~ -26-53,
engpop$year==2004 ~ -26,
engpop$year==2005 ~ 26,
engpop$year==2006 ~ 26+52,
engpop$year==2007 ~ 26+52*2,
engpop$year==2008 ~ 26+52*3,
engpop$year==2009 ~ 26+52*3+53,
engpop$year==2010 ~ 26+52*4+53,
engpop$year==2011 ~ 26+52*5+53,
engpop$year==2012 ~ 26+52*6+53,
engpop$year==2013 ~ 26+52*7+53,
engpop$year==2014 ~ 26+52*8+53,
engpop$year==2015 ~ 26+52*8+2*53,
engpop$year==2016 ~ 26+52*9+2*53,
engpop$year==2017 ~ 26+52*10+2*53,
engpop$year==2018 ~ 26+52*11+2*53
)
#Interpolate missing weeks between mid-year figures (take to be week 26)
#At the same time extrapolate out to mid-year 2020
exposures.splines <- function(data){
interpolation <- spline(data$time, data$exposure, xout=seq(from=1, to=26+52*13+2*53+5, 1), method="natural")
#Set up week structure
weeks <- c(unlist(lapply(c(52,52,52,52,53,52,52,52,52,52,53,52,52,52,52,31), function(x){1:x})))
years <- c(rep(2005:2020, c(52,52,52,52,53,52,52,52,52,52,53,52,52,52,52,31)))
results <- data.frame(cbind(year=years, week=weeks, exposures=interpolation$y))
return(results)
}
engpop.interpolated <- engpop %>%
arrange(year) %>%
group_by(IMD, Sex) %>%
group_modify(~ exposures.splines(.x)) %>%
mutate(index=seq(1:n()), date=as.Date("2005-01-03")+weeks(index-1)) %>%
ungroup()
#Check interpolation visually
ggplot()+
geom_line(data=engpop.interpolated, aes(x=date, y=exposures))+
geom_point(data=engpop, aes(x=as.Date(paste0(year, "-06-01")), y=exposure))+
facet_grid(Sex~IMD)+
theme_classic()
#Merge interpolated populations into 2005-2018 deaths data
data <- merge(engpop.interpolated, deaths0518, all.x=TRUE)[,-c(6)]
#Bring in 2020 deaths
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1marchand31july2020/referencetables1.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
newdata <- read_excel(temp, sheet="Table 3", range="A6:AD95", col_names=FALSE)[,c(1,2,3,5,6,11,12,17,18,23,24,29,30)]
colnames(newdata) <- c("cause", "Sex", "IMD", "March" , "March_AS", "April", "April_AS",
"May", "May_AS", "June", "June_AS", "July", "July_AS")
newdata$IMD <- rep(c(1:10),9)
newdata <- subset(newdata, Sex!="Persons")
temp1 <- newdata %>%
gather(month, deaths, c(4,6,8,10,12)) %>%
select(cause, Sex, IMD, month, deaths) %>%
spread(cause, deaths)
temp2 <- newdata %>%
gather(month, ASMR, c(5,7,9,11,13)) %>%
select(cause, Sex, IMD, month, ASMR) %>%
spread(cause, ASMR)
temp2$month <- case_when(
temp2$month=="March_AS" ~ "March",
temp2$month=="April_AS" ~ "April",
temp2$month=="May_AS" ~ "May",
temp2$month=="June_AS" ~ "June",
temp2$month=="July_AS" ~ "July"
)
colnames(temp1) <- c("Sex", "IMD", "month", "deaths", "COVID_deaths", "Other_deaths")
colnames(temp2) <- c("Sex", "IMD", "month", "ASMR", "COVID_ASMR", "Other_ASMR")
newdata <- merge(temp1, temp2)
newdata$Sex <- if_else(newdata$Sex=="Males", "Male", "Female")
newdata$year <- 2020
#Set up for merging
data$month <- case_when(
data$year==2020 & data$week %in% c(10:13) ~ "March",
data$year==2020 & data$week %in% c(14:18) ~ "April",
data$year==2020 & data$week %in% c(19:22) ~ "May",
data$year==2020 & data$week %in% c(23:27) ~ "June",
data$year==2020 & data$week %in% c(28:31) ~ "July"
)
data <- merge(data, newdata, by=c("Sex", "IMD", "year", "month"), all.x=TRUE)
#Converte ASMRs to Age-Standardised deaths
data$ASdeaths.x <- data$ASMR.x*data$exposures/100000
data$ASdeaths.y <- data$ASMR.y*data$exposures/100000
data$ASCOVID_deaths <- data$COVID_ASMR*data$exposures/100000
data$ASOther_deaths <- data$Other_ASMR*data$exposures/100000
#Adjust 2020 deaths to weekly estimates - assume within-month distribution of deaths follows
#the same patterns as the distribution of deaths in the overall population in England
#Bring in overall deaths
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek332020.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
alldeaths <- as.data.frame(t(read_excel(temp, sheet="Weekly figures 2020", range="L87:AI95", col_names=FALSE)))
alldeaths <- alldeaths %>%
mutate(totdeaths=V1+V2+V3+V4+V5+V6+V7+V8+V9, week=c(10:33), year=2020)
#calculate within-month proportions
alldeaths$month <- case_when(
alldeaths$week %in% c(10:13) ~ "March",
alldeaths$week %in% c(14:18) ~ "April",
alldeaths$week %in% c(19:22) ~ "May",
alldeaths$week %in% c(23:27) ~ "June",
alldeaths$week %in% c(28:31) ~ "July"
)
alldeaths <- alldeaths %>%
group_by(month) %>%
mutate(total=sum(totdeaths), prop=totdeaths/total) %>%
ungroup()
data <- merge(data, alldeaths[,c(11,12,15)], all.x=TRUE)
#Apportion 2020 deaths within month
data$deaths.y <- data$deaths.y*data$prop
data$ASdeaths.y <- data$ASdeaths.y*data$prop
data$COVID_deaths <- data$COVID_deaths*data$prop
data$Other_deaths <- data$Other_deaths*data$prop
data$ASCOVID_deaths <- data$ASCOVID_deaths*data$prop
data$ASOther_deaths <- data$ASOther_deaths*data$prop
data$deaths <- coalesce(data$deaths.x, data$deaths.y)
data$ASdeaths <- coalesce(data$ASdeaths.x, data$ASdeaths.y)
data <- data[,-c(5,8,9,10,13,14,15,16,17,20)]
write.csv(data, "IMDDataForJM.csv")
#Plot mortality rates over time before GAM modelling
tiff("Outputs/AllCauseDeathsxIMD.tiff", units="in", width=12, height=8, res=500)
data %>%
mutate(mortrate=deaths*100000/exposures) %>%
ggplot(aes(x=date, y=mortrate, colour=as.factor(IMD)))+
geom_line(size=0.3)+
scale_colour_paletteer_d("dichromat::BluetoOrange_10", name="IMD decile",
labels=c("1 (most deprived)","2","3","4","5","6","7","8","9","10 (least deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Weekly deaths per 100,000")+
facet_grid(Sex~.)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))
dev.off()
tiff("Outputs/AllCauseDeathsxIMDASMR.tiff", units="in", width=12, height=8, res=500)
data %>%
mutate(ASMR=ASdeaths*100000/exposures) %>%
ggplot(aes(x=date, y=ASMR, colour=as.factor(IMD)))+
geom_line(size=0.3)+
scale_colour_paletteer_d("dichromat::BluetoOrange_10", name="IMD decile",
labels=c("1 (most deprived)","2","3","4","5","6","7","8","9","10 (least deprived)"))+
scale_x_date(name="Date")+
scale_y_continuous(name="Weekly age-standardised deaths per 100,000")+
facet_grid(Sex~.)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)))
dev.off()
#Replicate graphs
plotdata <- data %>%
filter(week %in% c(10:31) & year>=2014 & year!=2019) %>%
group_by(year, Sex, IMD) %>%
summarise(COVID_deaths=sum(COVID_deaths, na.rm=TRUE), Other_deaths=sum(Other_deaths, na.rm=TRUE),
ASCOVID_deaths=sum(ASCOVID_deaths, na.rm=TRUE), ASOther_deaths=sum(ASOther_deaths, na.rm=TRUE),
deaths=sum(deaths), ASdeaths=sum(ASdeaths)) %>%
gather(cause, deaths, c(4:9))
plotdata$Sex <- factor(plotdata$Sex, levels=c("Male", "Female"))
plotdata$cause <- factor(plotdata$cause, levels=c("Other_deaths", "COVID_deaths", "deaths", "ASOther_deaths",
"ASCOVID_deaths", "ASdeaths" ))
tiff("Outputs/COVIDIneqDeathHist.tiff", units="in", width=12, height=8, res=500)
ggplot()+
geom_col(data=subset(plotdata, year==2020 & cause %in% c("COVID_deaths", "Other_deaths")),
aes(x=as.factor(IMD), y=deaths, fill=cause))+
geom_jitter(data=subset(plotdata, year!=2020 & cause=="deaths"),
aes(x=IMD, y=deaths), colour="midnightblue")+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete(name="Deprivation decile", labels=c("1 (most deprived)", "2", "3", "4", "5",
"6", "7", "8", "9", "10 (least deprived)"))+
scale_y_continuous(name="Deaths between 1st March & 31st July")+
facet_wrap(~Sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
labs(title="Inequality in crude mortality rates in England in 2020 is similar to previous years",
subtitle="Deaths in England between March 1st and 31st July by deprivation decile from all causes in 2014-18 and from COVID-19 and other causes in 2020",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
COVIDIneqRateHist <- ggplot()+
geom_col(data=subset(plotdata, year==2020 & cause %in% c("ASCOVID_deaths", "ASOther_deaths")),
aes(x=as.factor(IMD), y=deaths, fill=cause))+
geom_jitter(data=subset(plotdata, year!=2020 & cause=="ASdeaths"),
aes(x=IMD, y=deaths), colour="midnightblue")+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete(name="Deprivation decile", labels=c("1 (most deprived)", "2", "3", "4", "5",
"6", "7", "8", "9", "10 (least deprived)"))+
scale_y_continuous(name="Age-standardised deaths between 1st March & 31st July")+
facet_wrap(~Sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
labs(title="After age-standardising, deaths in 2020 are slightly more unequal than usual",
subtitle="Age-standardised deaths in England between March 1st and 31st July by deprivation decile from all causes in 2014-18 and from COVID-19 and other causes in 2020",
caption="Data from ONS | Plot by @VictimOfMaths")
tiff("Outputs/COVIDIneqRateHist.tiff", units="in", width=12, height=8, res=500)
COVIDIneqRateHist
dev.off()
###########################
#Generate labels
tempA <- (plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="Other_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="Other_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="Other_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labA <- paste0(round(tempA*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempB <- (plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="COVID_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="COVID_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="COVID_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labB <- paste0(round(tempB*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempC <- (plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="Other_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="Other_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="Other_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labC <- paste0(round(tempC*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempD <- (plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="COVID_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="COVID_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="COVID_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labD <- paste0(round(tempD*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
#Set up annotations
ann_text1 <- data.frame(IMD=rep(5, times=4), deaths=c(14000, -3000, 14000, -3000), Sex=c("Male", "Male", "Female", "Female"),
cause=rep("Other_deaths", times=4))
ann_arrows1a <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4),
y=c(14000, -3000, 14000,-3000), yend=c(12000, 1500, 11000, 800),
Sex=rep(c("Male", "Female"), each=2), cause=rep("Other_deaths", times=4))
ann_arrows1b <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4),
y=c(-3000, 14000, -3000, 14000), yend=c(1100, 9900, 900, 9500),
Sex=rep(c("Male", "Female"), each=2), cause=rep("Other_deaths", times=4))
COVIDIneqDeath <- plotdata %>%
filter(cause %in% c("COVID_deaths", "Other_deaths") & year==2020) %>%
ggplot(aes(x=as.factor(IMD), y=deaths, fill=cause))+
geom_col()+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete(name="Deprivation decile", labels=c("1 (most deprived)",
"2", "3", "4", "5",
"6", "7", "8", "9",
"10 (least deprived)"))+
scale_y_continuous(name="Deaths between 1st March & 31st July 2020")+
coord_cartesian(ylim=c(0,15000), clip="off")+
facet_wrap(~Sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
geom_text(data=ann_text1, aes(x=IMD, y=deaths),
label=c(labA, labB, labC, labD), colour="Grey40")+
geom_curve(data=ann_arrows1a, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
geom_curve(data=ann_arrows1b, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=-0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
labs(title="Inequalities in all-cause deaths in England in 2020 are fairly small",
subtitle="Total deaths in England in 2020 by deprivation decile from COVID-19 and all other causes.",
caption="Data from ONS | Plot by @VictimOfMaths")
tiff("Outputs/COVIDIneqDeath.tiff", units="in", width=12, height=8, res=500)
COVIDIneqDeath
dev.off()
#######
#Rates#
#######
#Generate labels
tempE <- (plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="ASOther_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="ASOther_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="ASOther_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labE <- paste0(round(tempE*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempF <- (plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="ASCOVID_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="ASCOVID_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Male" & plotdata$cause=="ASCOVID_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labF <- paste0(round(tempF*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempG <- (plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="ASOther_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="ASOther_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="ASOther_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labG <- paste0(round(tempG*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempH <- (plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="ASCOVID_deaths" & plotdata$IMD==1 & plotdata$year==2020]-
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="ASCOVID_deaths" & plotdata$IMD==10 & plotdata$year==2020])/
plotdata$deaths[plotdata$Sex=="Female" & plotdata$cause=="ASCOVID_deaths" & plotdata$IMD==10 & plotdata$year==2020]
labH <- paste0(round(tempH*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
#Set up annotations
ann_text2 <- data.frame(IMD=rep(5, times=4), deaths=c(23000, -4500, 19000, -4500), Sex=c("Male", "Male", "Female", "Female"),
cause=rep("ASOther_deaths", times=4))
ann_arrows2a <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4),
y=c(23000, -4500, 19000,-4500), yend=c(20000, 1000, 13000, 700),
Sex=rep(c("Male", "Female"), each=2), cause=rep("ASOther_deaths", times=4))
ann_arrows2b <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4),
y=c(-4500, 23000, -4500, 19000), yend=c(1500, 9000, 1100, 7500),
Sex=rep(c("Male", "Female"), each=2), cause=rep("ASOther_deaths", times=4))
COVIDIneqRate <- plotdata %>%
filter(cause %in% c("ASCOVID_deaths", "ASOther_deaths") & year==2020) %>%
ggplot(aes(x=as.factor(IMD), y=deaths, fill=cause))+
geom_col()+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete(name="Deprivation decile", labels=c("1 (most deprived)",
"2", "3", "4", "5",
"6", "7", "8", "9",
"10 (least deprived)"))+
scale_y_continuous(name="Deaths between 1st March & 31st July 2020")+
coord_cartesian(ylim=c(0,25000), clip="off")+
facet_wrap(~Sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
geom_text(data=ann_text2, aes(x=IMD, y=deaths),
label=c(labE, labF, labG, labH), colour="Grey40")+
geom_curve(data=ann_arrows2a, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
geom_curve(data=ann_arrows2b, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=-0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
labs(title="After age-standardising there are significant inequalities in deaths in 2020",
subtitle="Age-standardised deaths in England in 2020 by deprivation decile from COVID-19 and all other causes.",
caption="Data from ONS | Plot by @VictimOfMaths")
tiff("Outputs/COVIDIneqRate.tiff", units="in", width=12, height=8, res=500)
COVIDIneqRate
dev.off()
#Calculate SII & RII
plotdata$cumproppop <- -(0.05+0.1*(plotdata$IMD-1))
SII <- plotdata %>%
group_by(year, Sex, cause) %>%
do(tidy(lm(deaths ~ cumproppop, data=.))) %>%
pivot_wider(id_cols=c("year", "Sex", "cause"), names_from=term,
values_from=c("estimate", "std.error"))
colnames(SII) <- c("year", "Sex", "cause", "intercept", "SII", "int.SE", "SII.SE")
SII$RII <- (SII$intercept+SII$SII)/SII$intercept
ggplot()+
geom_line(data=subset(SII, cause=="deaths"), aes(x=year, y=SII), colour="midnightblue")+
geom_point(data=subset(SII, cause %in% c("COVID_deaths", "Other_deaths") & year==2020),
aes(x=year, y=SII, colour=cause), show.legend=FALSE)+
scale_x_continuous(name="Year")+
scale_y_continuous(name="Slope Index of Inequality (SII)")+
scale_colour_paletteer_d("palettetown::porygon")+
coord_cartesian(ylim=c(0,NA))+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Absolute inequality in deaths has risen slightly in 2020",
subtitle="Slope Index of Inequality for deaths in England from all causes, COVID-19 and all other causes",
caption="Data from ONS | Plot by @VictimOfMaths")
tiff("Outputs/COVIDSIIEng.tiff", units="in", width=10, height=8, res=500)
ggplot()+
geom_line(data=subset(SII, cause=="ASdeaths"), aes(x=year, y=SII), colour="midnightblue")+
geom_point(data=subset(SII, cause %in% c("ASCOVID_deaths", "ASOther_deaths") & year==2020),
aes(x=year, y=SII, colour=cause), show.legend=FALSE)+
scale_x_continuous(name="Year")+
scale_y_continuous(name="Slope Index of Inequality (SII)")+
scale_colour_paletteer_d("palettetown::porygon")+
coord_cartesian(ylim=c(0,NA))+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Absolute inequality in deaths has risen sharply in 2020",
subtitle="Slope Index of Inequality in age-standardised deaths in England from all causes, COVID-19 and all other causes",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
COVIDRIIEng <- ggplot()+
geom_line(data=subset(SII, cause=="ASdeaths"), aes(x=year, y=RII), colour="midnightblue")+
geom_point(data=subset(SII, cause %in% c("ASCOVID_deaths", "ASOther_deaths") & year==2020),
aes(x=year, y=RII, colour=cause), show.legend=FALSE)+
scale_x_continuous(name="Year")+
scale_y_continuous(name="Relative Index of Inequality (RII)")+
scale_colour_paletteer_d("palettetown::porygon")+
coord_cartesian(ylim=c(0,NA))+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Relative inequality in deaths is in line with recent years",
subtitle="Relative Index of Inequality in age-standardised deaths in England from all causes, COVID-19 and all other causes",
caption="Data from ONS | Plot by @VictimOfMaths")
tiff("Outputs/COVIDRIIEng.tiff", units="in", width=10, height=8, res=500)
COVIDRIIEng
dev.off()
#jpeg versions for blog
ggsave("Outputs/JPEGs/MortIneqBlog1.jpeg", plot=COVIDIneqDeath, units="in", width=12, height=8)
ggsave("Outputs/JPEGs/MortIneqBlog3.jpeg", plot=COVIDIneqRate, units="in", width=12, height=8)
ggsave("Outputs/JPEGs/MortIneqBlog4.jpeg", plot=COVIDIneqRateHist, units="in", width=12, height=8)
ggsave("Outputs/JPEGs/MortIneqBlog5.jpeg", plot=COVIDRIIEng, units="in", width=10, height=8)
================================================
FILE: Observed Inequality/COVIDScotlandDeathsIneq.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(readxl)
library(ggtext)
library(paletteer)
###################################################################################
#Weekly data
#Read in 2020 data for Scotland
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-37.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read_excel(temp, sheet="Table 6", range="B6:N15", col_names=FALSE)
colnames(data) <- c("SIMD", "Total_Deaths", "Total_Rate", "Total_LowerCI", "Total_UpperCI",
"Male_Deaths", "Male_Rate", "Male_LowerCI", "Male_UpperCI",
"Female_Deaths", "Female_Rate", "Female_LowerCI", "Female_UpperCI")
data$cause <- rep(c("All Cause", "COVID-19"), each=5)
data_long <- data %>%
pivot_longer(cols=c(2:13), names_to=c("sex", "metric"), names_sep="_", values_to="deaths") %>%
spread(cause, deaths) %>%
mutate(`Other`=`All Cause`-`COVID-19`) %>%
gather(cause, deaths, c(4:6))
data_long$sex <- factor(data_long$sex, levels=c("Male", "Female", "Total"))
data_long$cause <- factor(data_long$cause, levels=c("Other", "COVID-19", "All Cause"))
########
#Deaths#
########
#Generate labels
tempA <- (data_long$deaths[data_long$sex=="Male" & data_long$cause=="Other" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Deaths"]-
data_long$deaths[data_long$sex=="Male" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"])/
data_long$deaths[data_long$sex=="Male" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"]
labA <- paste0(round(tempA*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempB <- (data_long$deaths[data_long$sex=="Male" & data_long$cause=="COVID-19" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Deaths"]-
data_long$deaths[data_long$sex=="Male" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"])/
data_long$deaths[data_long$sex=="Male" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"]
labB <- paste0(round(tempB*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempC <- (data_long$deaths[data_long$sex=="Female" & data_long$cause=="Other" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Deaths"]-
data_long$deaths[data_long$sex=="Female" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"])/
data_long$deaths[data_long$sex=="Female" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"]
labC <- paste0(round(tempC*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempD <- (data_long$deaths[data_long$sex=="Female" & data_long$cause=="COVID-19" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Deaths"]-
data_long$deaths[data_long$sex=="Female" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"])/
data_long$deaths[data_long$sex=="Female" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Deaths"]
labD <- paste0(round(tempD*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
#Set up annotations
ann_text1 <- data.frame(SIMD=rep(3, times=4), deaths=c(4200, -700, 4000, -700), sex=c("Male", "Male", "Female", "Female"),
cause=rep("Other", times=4))
ann_arrows1a <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4),
y=c(4200, -700,4000,-700), yend=c(3600, 200, 3400, 200),
sex=rep(c("Male", "Female"), each=2), cause=rep("Other", times=4))
ann_arrows1b <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4),
y=c(-700, 4200, -700, 4000), yend=c(300, 2000, 200, 2100),
sex=rep(c("Male", "Female"), each=2), cause=rep("Other", times=4))
COVIDScotIneqDeath <- data_long %>%
filter(sex!="Total" & cause!="All Cause" & metric=="Deaths") %>%
ggplot(aes(x=SIMD, y=deaths, fill=cause))+
geom_col()+
scale_fill_paletteer_d("palettetown::porygon", name="Cause")+
scale_x_discrete(name="Deprivation quintile")+
scale_y_continuous(name="Deaths between 1st March & 31st August 2020")+
coord_cartesian(ylim=c(0,4500), clip="off")+
facet_wrap(~sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
geom_text(data=ann_text1, aes(x=SIMD, y=deaths),
label=c(labA, labB, labC, labD), colour="Grey40")+
geom_curve(data=ann_arrows1a, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
geom_curve(data=ann_arrows1b, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=-0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
labs(title="Deprived areas in Scotland have borne the brunt of the impact of COVID-19",
subtitle="Higher deprivation is associated with substantially more deaths in 2020 from both COVID-19 and all other causes",
caption="Data from National Records of Scotland | Plot by @VictimOfMaths")
tiff("Outputs/COVIDScotIneqDeath.tiff", units="in", width=12, height=8, res=500)
COVIDScotIneqDeath
dev.off()
#######
#Rates#
#######
#Generate labels
tempE <- (data_long$deaths[data_long$sex=="Male" & data_long$cause=="Other" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Rate"]-
data_long$deaths[data_long$sex=="Male" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"])/
data_long$deaths[data_long$sex=="Male" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"]
labE <- paste0(round(tempE*100,0), "% higher non-COVID-19 death\nrate in the most vs.\nleast deprived areas")
tempF <- (data_long$deaths[data_long$sex=="Male" & data_long$cause=="COVID-19" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Rate"]-
data_long$deaths[data_long$sex=="Male" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"])/
data_long$deaths[data_long$sex=="Male" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"]
labF <- paste0(round(tempF*100,0), "% higher non-COVID-19 death\nrate in the most vs.\nleast deprived areas")
tempG <- (data_long$deaths[data_long$sex=="Female" & data_long$cause=="Other" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Rate"]-
data_long$deaths[data_long$sex=="Female" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"])/
data_long$deaths[data_long$sex=="Female" & data_long$cause=="Other" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"]
labG <- paste0(round(tempG*100,0), "% higher non-COVID-19 death\nrate in the most vs.\nleast deprived areas")
tempH <- (data_long$deaths[data_long$sex=="Female" & data_long$cause=="COVID-19" & data_long$SIMD=="1 (most deprived)" & data_long$metric=="Rate"]-
data_long$deaths[data_long$sex=="Female" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"])/
data_long$deaths[data_long$sex=="Female" & data_long$cause=="COVID-19" & data_long$SIMD=="5 (least deprived)" & data_long$metric=="Rate"]
labH <- paste0(round(tempH*100,0), "% higher non-COVID-19 death\nrate in the most vs.\nleast deprived areas")
#Set up annotations
ann_text2 <- data.frame(SIMD=rep(3, times=4), deaths=c(1100, -190, 900, -190), sex=c("Male", "Male", "Female", "Female"),
cause=rep("Other", times=4))
ann_arrows2a <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4),
y=c(1100, -190,900,-190), yend=c(900, 30, 650, 25),
sex=rep(c("Male", "Female"), each=2), cause=rep("Other", times=4))
ann_arrows2b <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4),
y=c(-190, 1100, -190, 900), yend=c(50, 450, 50, 300),
sex=rep(c("Male", "Female"), each=2), cause=rep("Other", times=4))
tiff("Outputs/COVIDScotIneqRate.tiff", units="in", width=12, height=8, res=500)
data_long %>%
filter(sex!="Total" & cause!="All Cause" & metric=="Rate") %>%
ggplot(aes(x=SIMD, y=deaths, fill=cause))+
geom_col()+
scale_fill_paletteer_d("palettetown::porygon", name="Cause")+
scale_x_discrete(name="Deprivation quintile")+
scale_y_continuous(name="Age-standardised deaths per 100,000\nbetween 1st March & 31st August 2020")+
coord_cartesian(ylim=c(0,1200), clip="off")+
facet_wrap(~sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
geom_text(data=ann_text2, aes(x=SIMD, y=deaths),
label=c(labE, labF, labG, labH), colour="Grey40")+
geom_curve(data=ann_arrows2a, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
geom_curve(data=ann_arrows2b, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=-0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
labs(title="Inequalities increase once you adjust for age differences",
subtitle="Higher deprivation is associated with substantially higher age-standardised death rates in 2020 from both COVID-19 and all other causes",
caption="Data from National Records of Scotland | Plot by @VictimOfMaths")
dev.off()
#Bring in historic inequalities
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/age-standardised-death-rates-esp/2018/age-standard-death-rates-18-tab7.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
hist.all <- read_excel(temp, sheet="Table 7", range="A24:Q28", col_names=FALSE)[,c(1,5,8,11,14,17)]
colnames(hist.all) <- c("Year", "1 (most deprived)", "2", "3", "4", "5 (least deprived)")
hist.all$sex <- "Total"
hist.m <- read_excel(temp, sheet="Table 7", range="A56:Q60", col_names=FALSE)[,c(1,5,8,11,14,17)]
colnames(hist.m) <- c("Year", "1 (most deprived)", "2", "3", "4", "5 (least deprived)")
hist.m$sex <- "Male"
hist.f <- read_excel(temp, sheet="Table 7", range="A88:Q92", col_names=FALSE)[,c(1,5,8,11,14,17)]
colnames(hist.f) <- c("Year", "1 (most deprived)", "2", "3", "4", "5 (least deprived)")
hist.f$sex <- "Female"
hist <- bind_rows(hist.all, hist.m, hist.f)
hist$cause <- "All Cause"
hist$metric <- "Rate"
hist_long <- gather(hist, SIMD, deaths, c(2:6))
#Adjust deaths to estimate historic deaths between 1st March & 30th August using within-year % of deaths
#In these months (not available split by IMD)
temp <- tempfile()
source <- "https://www.nrscotland.gov.uk/files//statistics/weekly-monthly-births-deaths-data/2020/aug/monthly-august-20-tab3.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
month.adj <- read_excel(temp, sheet="Scotland", range="A5:N35")
month.adj$adjprop <- (month.adj$Mar+month.adj$Apr+month.adj$May+month.adj$Jun+
month.adj$Jul+month.adj$Aug)/month.adj$...2
month.adj <- month.adj[c(1,15)]
colnames(month.adj) <- c("Year", "adjprop")
hist_long <- merge(hist_long, month.adj, by="Year")
hist_long$deaths <- hist_long$deaths*hist_long$adjprop
data_long$Year <- 2020
data_full <- bind_rows(data_long, hist_long)
data_full$sex <- factor(data_full$sex, levels=c("Male", "Female", "Total"))
data_full$cause <- factor(data_full$cause, levels=c("Other", "COVID-19", "All Cause"))
COVIDScotIneqRateHist <- ggplot()+
geom_col(data=subset(data_full, Year==2020 & metric=="Rate" & sex!="Total" & cause!="All Cause"),
aes(x=SIMD, y=deaths, fill=cause))+
geom_jitter(data=subset(data_full, Year!=2020 & sex!="Total"),
aes(x=SIMD, y=deaths), colour="midnightblue")+
scale_fill_paletteer_d("palettetown::porygon", name="Cause")+
scale_x_discrete(name="Deprivation quintile")+
scale_y_continuous(name="Age-standardised deaths per 100,000\nbetween 1st March & 31st August")+
facet_wrap(~sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
labs(title="All-cause deaths in Scotland have been slightly more unequal than usual in 2020",
subtitle="Age-standardised mortality rates in Scotland between March 1st and August 31st by deprivation quintile from all causes in 2014-18 and from COVID-19 and other causes in 2020",
caption="Data from National Records of Scotland | Plot by @VictimOfMaths")
tiff("Outputs/COVIDScotIneqRateHist.tiff", units="in", width=12, height=8, res=500)
COVIDScotIneqRateHist
dev.off()
#Calculate SII & RII
data_full$cumproppop <- case_when(
data_full$SIMD=="5 (least deprived)" ~ 0.1,
data_full$SIMD=="4" ~ 0.3,
data_full$SIMD=="3" ~ 0.5,
data_full$SIMD=="2" ~ 0.7,
data_full$SIMD=="1 (most deprived)" ~ 0.9
)
SII <- data_full %>%
filter(metric=="Rate") %>%
group_by(Year, sex, cause) %>%
do(tidy(lm(deaths ~ cumproppop, data=.))) %>%
pivot_wider(id_cols=c("Year", "sex", "cause"), names_from=term,
values_from=c("estimate", "std.error"))
colnames(SII) <- c("year", "Sex", "cause", "intercept", "SII", "int.SE", "SII.SE")
SII$RII <- (SII$intercept+SII$SII)/SII$intercept
tiff("Outputs/COVIDSIIScot.tiff", units="in", width=10, height=8, res=500)
ggplot()+
geom_line(data=subset(SII, cause=="All Cause" & Sex!="Total"), aes(x=year, y=SII), colour="midnightblue")+
geom_point(data=subset(SII, cause %in% c("COVID-19", "Other") & year==2020 & Sex!="Total"),
aes(x=year, y=SII, colour=cause), show.legend=FALSE)+
scale_x_continuous(name="Year")+
scale_y_continuous(name="Slope Index of Inequality (SII)")+
scale_colour_paletteer_d("palettetown::porygon")+
coord_cartesian(ylim=c(0,NA))+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Absolute inequality in deaths has risen, particularly for men, in 2020",
subtitle="Slope Index of Inequality in age-standardised deaths in Scotland from all causes, COVID-19 and all other causes",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDRIIScot.tiff", units="in", width=10, height=8, res=500)
ggplot()+
geom_line(data=subset(SII, cause=="All Cause" & Sex!="Total"), aes(x=year, y=RII), colour="midnightblue")+
geom_point(data=subset(SII, cause %in% c("COVID-19", "Other") & year==2020 & Sex!="Total"),
aes(x=year, y=RII, colour=cause), show.legend=FALSE)+
scale_x_continuous(name="Year")+
scale_y_continuous(name="Relative Index of Inequality (RII)")+
scale_colour_paletteer_d("palettetown::porygon")+
coord_cartesian(ylim=c(0,NA))+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Relative inequality in deaths is in line with recent years",
subtitle="Relative Index of Inequality in age-standardised deaths in Scotland from all causes, COVID-19 and all other causes",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Save jpegs for SIPHER blog
ggsave("Outputs/JPEGs/MortIneqBlog7.jpeg", plot=COVIDScotIneqDeath, units="in", width=12, height=8)
ggsave("Outputs/JPEGs/MortIneqBlog8.jpeg", plot=COVIDScotIneqRateHist, units="in", width=13, height=8)
================================================
FILE: Observed Inequality/ONS Deaths Ineq 2.R
================================================
rm(list=ls())
library(tidyverse)
library(curl)
library(paletteer)
library(readxl)
library(broom)
library(wesanderson)
library(ggtext)
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10929weeklydeathsregistrationsbyimdsexandagegroupenglandandwales2005to2018/wklydthsimdsexage2005to2018final.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
#Read in data
data2005.E <- read_excel(temp, sheet="Table 1", range="A4:BC144")
data2005.W <- read_excel(temp, sheet="Table 2", range="A4:BC144")
data2006.E <- read_excel(temp, sheet="Table 3", range="A4:BC144")
data2006.W <- read_excel(temp, sheet="Table 4", range="A4:BC144")
data2007.E <- read_excel(temp, sheet="Table 5", range="A4:BC144")
data2007.W <- read_excel(temp, sheet="Table 6", range="A4:BC144")
data2008.E <- read_excel(temp, sheet="Table 7", range="A4:BC144")
data2008.W <- read_excel(temp, sheet="Table 8", range="A4:BC144")
data2009.E <- read_excel(temp, sheet="Table 9", range="A4:BD144")
colnames(data2009.E)[56] <- "Week 53"
data2009.W <- read_excel(temp, sheet="Table 10", range="A4:BD144")
colnames(data2009.W)[56] <- "Week 53"
data2010.E <- read_excel(temp, sheet="Table 11", range="A4:BC144")
data2010.W <- read_excel(temp, sheet="Table 12", range="A4:BC144")
data2011.E <- read_excel(temp, sheet="Table 13", range="A4:BC144")
data2011.W <- read_excel(temp, sheet="Table 14", range="A4:BC144")
data2012.E <- read_excel(temp, sheet="Table 15", range="A4:BC144")
data2012.W <- read_excel(temp, sheet="Table 16", range="A4:BC144")
data2013.E <- read_excel(temp, sheet="Table 17", range="A4:BC144")
data2013.W <- read_excel(temp, sheet="Table 18", range="A4:BC144")
data2014.E <- read_excel(temp, sheet="Table 19", range="A4:BC144")
data2014.W <- read_excel(temp, sheet="Table 20", range="A4:BC144")
data2015.E <- read_excel(temp, sheet="Table 21", range="A4:BD144")
data2015.W <- read_excel(temp, sheet="Table 22", range="A4:BD144")
data2016.E <- read_excel(temp, sheet="Table 23", range="A4:BC144")
data2016.W <- read_excel(temp, sheet="Table 24", range="A4:BC144")
data2017.E <- read_excel(temp, sheet="Table 25", range="A4:BC144")
data2017.W <- read_excel(temp, sheet="Table 26", range="A4:BC144")
data2018.E <- read_excel(temp, sheet="Table 27", range="A4:BC144")
data2018.W <- read_excel(temp, sheet="Table 28", range="A4:BC144")
#Tidy up and stick together
data2005.E$country <- "England"
data2005.W$country <- "Wales"
data2006.E$country <- "England"
data2006.W$country <- "Wales"
data2007.E$country <- "England"
data2007.W$country <- "Wales"
data2008.E$country <- "England"
data2008.W$country <- "Wales"
data2009.E$country <- "England"
data2009.W$country <- "Wales"
data2010.E$country <- "England"
data2010.W$country <- "Wales"
data2011.E$country <- "England"
data2011.W$country <- "Wales"
data2012.E$country <- "England"
data2012.W$country <- "Wales"
data2013.E$country <- "England"
data2013.W$country <- "Wales"
data2014.E$country <- "England"
data2014.W$country <- "Wales"
data2015.E$country <- "England"
data2015.W$country <- "Wales"
data2016.E$country <- "England"
data2016.W$country <- "Wales"
data2017.E$country <- "England"
data2017.W$country <- "Wales"
data2018.E$country <- "England"
data2018.W$country <- "Wales"
data2005 <- bind_rows(data2005.E, data2005.W)
data2005$year <- 2005
data2006 <- bind_rows(data2006.E, data2006.W)
data2006$year <- 2006
data2007 <- bind_rows(data2007.E, data2007.W)
data2007$year <- 2007
data2008 <- bind_rows(data2008.E, data2008.W)
data2008$year <- 2008
data2009 <- bind_rows(data2009.E, data2009.W)
data2009$year <- 2009
data2010 <- bind_rows(data2010.E, data2010.W)
data2010$year <- 2010
data2011 <- bind_rows(data2011.E, data2011.W)
data2011$year <- 2011
data2012 <- bind_rows(data2012.E, data2012.W)
data2012$year <- 2012
data2013 <- bind_rows(data2013.E, data2013.W)
data2013$year <- 2013
data2014 <- bind_rows(data2014.E, data2014.W)
data2014$year <- 2014
data2015 <- bind_rows(data2015.E, data2015.W)
data2015$year <- 2015
data2016 <- bind_rows(data2016.E, data2016.W)
data2016$year <- 2016
data2017 <- bind_rows(data2017.E, data2017.W)
data2017$year <- 2017
data2018 <- bind_rows(data2018.E, data2018.W)
data2018$year <- 2018
data <- bind_rows(data2005, data2006, data2007, data2008, data2009, data2010, data2011, data2012,
data2013, data2014, data2015, data2016, data2017, data2018)
#Merge E&W data
data <- data %>%
group_by(year, IMD, Sex, Age) %>%
summarise_at(vars(`Week 1`:`Week 52`, `Week 53`), sum)
#Convert to long
data_long <- gather(data, week, deaths, c(5:57))
data_long$week <- as.numeric(substr(data_long$week, 6,7))
#Read in populations for rates using mid-year values for each year
#A more refined approach estimating week-on-week populations is no doubt possible,
#But seems unlikely to make much difference.
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/009299numberofdeathsandpopulationsindeprivationdecileareasbysexandsingleyearofageenglandandwalesregisteredyears2001to2017/final.xls"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
engpop <- read_excel(temp, sheet=5, range="B6:GB175", col_names=FALSE)
walpop <- read_excel(temp, sheet=6, range="B6:GB175", col_names=FALSE)
engpop$country <- "England"
walpop$country <- "Wales"
pop <- bind_rows(engpop, walpop)
#Label years
pop$year <- rep(c(2001:2017), each=10, times=2)
colnames(pop) <- c("IMD", paste0("Male_", as.character(0:90)),
paste0("Female_", as.character(0:90)), "country", "year")
#Collapse by country
pop <- pop %>%
group_by(IMD, year) %>%
summarise_at(vars("Male_0":"Female_90"), sum)
#Assume 2018 population=2017 population
temp <- subset(pop, year==2017)
temp$year <- 2018
pop <- bind_rows(pop, temp)
#Move sex to long
pop_long <- pivot_longer(pop, cols=c(3:184), names_to=c("Sex", "age"), names_sep="_", values_to="pop")
pop_long$age <- as.integer(pop_long$age)
pop_long$Age <- case_when(
pop_long$age==0 ~ "Under 1 year",
pop_long$age<15 ~ "01-14",
pop_long$age<45 ~ "15-44",
pop_long$age<65 ~ "45-64",
pop_long$age<75 ~ "65-74",
pop_long$age<85 ~ "75-84",
TRUE ~ "85+")
pop_long <- pop_long %>%
group_by(Age, Sex, year, IMD) %>%
summarise(pop=sum(pop))
#Merge into deaths data
data_long <- merge(data_long, pop_long, all.x=TRUE)
data_long$mortrate <- data_long$deaths*100000/data_long$pop
#Age standardise
data_long$weight <- case_when(
data_long$Age=="Under 1 year" ~ 0.01,
data_long$Age=="01-14" ~ 0.15,
data_long$Age=="15-44" ~ 0.38,
data_long$Age=="45-64" ~ 0.265,
data_long$Age=="65-74" ~ 0.105,
data_long$Age=="75-84" ~ 0.065,
data_long$Age=="85+" ~ 0.025,
TRUE~0)
data_long <- data_long %>%
group_by(year, IMD, Sex, week) %>%
summarise(mortrate=weighted.mean(mortrate, weight), pop=sum(pop))
#Set up for SII calculations
data_long <- data_long %>%
arrange(year, Sex, week, -IMD) %>%
group_by(year, Sex, week) %>%
mutate(cumpop=cumsum(pop), totpop=sum(pop))
data_long$cumpopprop <- data_long$cumpop/data_long$totpop
#Calculate SII & RII
SII <- data_long %>%
group_by(year, Sex, week) %>%
filter(week!=53) %>%
do(tidy(lm(mortrate ~ cumpopprop, data=.))) %>%
pivot_wider(id_cols=c("year", "Sex", "week"), names_from=term, values_from=c("estimate", "std.error"))
colnames(SII) <- c("year", "Sex", "week", "intercept", "SII", "int.SE", "SII.SE")
SII$RII <- (SII$intercept+SII$SII)/SII$intercept
#calculate mean across all years and last 5 years
SII <- SII %>%
group_by(Sex, week) %>%
mutate(SII.mean.all=mean(SII), RII.mean.all=mean(RII))
pal <- wes_palette("Zissou1", 14, type = "continuous")
#Plot SII trends
tiff("Outputs/SIIbyweek.tiff", units="in", width=12, height=8, res=300)
ggplot(SII, aes(x=week, y=SII, colour=as.factor(year)))+
geom_line(show.legend=FALSE)+
facet_wrap(~Sex)+
theme_classic()+
scale_y_continuous(name="Slope Index of Inequality", limits=c(0,25))+
scale_colour_manual(values=pal, name="Year")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title.position="plot", plot.subtitle=element_markdown())+
labs(title="Absolute inequalities in mortality are highest in winter",
subtitle="Patterns in weekly Slope Index of Inequality (SII) values in age-standardised deaths in England & Wales between 2005 and 2018",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/RIIbyweek.tiff", units="in", width=12, height=8, res=300)
ggplot(SII, aes(x=week, y=RII, colour=as.factor(year)))+
geom_line(show.legend=FALSE)+
facet_wrap(~Sex)+
theme_classic()+
scale_y_continuous(name="Relative Index of Inequality", limits=c(0,2.5))+
scale_colour_manual(values=pal, name="Year")+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.title.position="plot", plot.subtitle=element_markdown())+
labs(title="Relative inequalities in mortality are similar throughout the year",
subtitle="Patterns in weekly Relative Index of Inequality (RII) values in age-standardised deaths in England & Wales between 2005 and 2018",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
##################################################################################
#Restrict analysis to England only from 1st March - 17th April 2020 (weeks 10-16)#
##################################################################################
data2 <- bind_rows(data2005, data2006, data2007, data2008, data2009, data2010, data2011, data2012,
data2013, data2014, data2015, data2016, data2017, data2018)
data2 <- subset(data2, country=="England")
data2_long <- gather(data2, week, deaths, c(4:55, 58))
data2_long$week <- as.numeric(substr(data2_long$week, 6,7))
#Remove data outside of weeks of interest
data2_long <- subset(data2_long, week>=10 & week<=16)
#Wollapse weeks
data2_long <- data2_long %>%
group_by(IMD, Sex, Age, year) %>%
summarise(deaths=sum(deaths))
engpop$year <- rep(c(2001:2017), each=10)
colnames(engpop) <- c("IMD", paste0("Male_", as.character(0:90)),
paste0("Female_", as.character(0:90)), "country", "year")
#Assume 2018 population=2017 population
temp <- subset(engpop, year==2017)
temp$year <- 2018
engpop <- bind_rows(engpop, temp)
#Move sex to long
engpop_long <- pivot_longer(engpop, cols=c(2:183), names_to=c("Sex", "age"), names_sep="_", values_to="pop")
engpop_long$age <- as.integer(engpop_long$age)
engpop_long$Age <- case_when(
engpop_long$age==0 ~ "Under 1 year",
engpop_long$age<15 ~ "01-14",
engpop_long$age<45 ~ "15-44",
engpop_long$age<65 ~ "45-64",
engpop_long$age<75 ~ "65-74",
engpop_long$age<85 ~ "75-84",
TRUE ~ "85+")
engpop_long <- engpop_long %>%
group_by(Age, Sex, year, IMD) %>%
summarise(pop=sum(pop))
#Merge into deaths data
data2_long <- merge(data2_long, engpop_long, all.x=TRUE)
data2_long$mortrate <- data2_long$deaths*100000/data2_long$pop
#Age standardise
data2_long$weight <- case_when(
data2_long$Age=="Under 1 year" ~ 0.01,
data2_long$Age=="01-14" ~ 0.15,
data2_long$Age=="15-44" ~ 0.38,
data2_long$Age=="45-64" ~ 0.265,
data2_long$Age=="65-74" ~ 0.105,
data2_long$Age=="75-84" ~ 0.065,
data2_long$Age=="85+" ~ 0.025,
TRUE~0)
data2_long <- data2_long %>%
group_by(year, IMD, Sex) %>%
summarise(mortrate=weighted.mean(mortrate, weight), pop=sum(pop))
#Bring in 2020 data
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1march2020to17april2020/referencetablesdraft.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data2020 <- read_excel(temp, sheet="Table 3", range="B6:P25", col_names=FALSE)[,-c(2:7,9:12, 14,15)]
colnames(data2020) <- c("IMD", "rate.m", "rate.f")
data2020$cause <- rep(c("All cause", "COVID-19"), each=10, times=1)
#Calculate 'other cause' outcomes
data_wide2020 <- pivot_wider(data2020, names_from=cause, values_from=c(2:3))
data_wide2020$rate.m_other <- data_wide2020$`rate.m_All cause`-data_wide2020$`rate.m_COVID-19`
data_wide2020$rate.f_other <- data_wide2020$`rate.f_All cause`-data_wide2020$`rate.f_COVID-19`
data2020 <- pivot_longer(data_wide2020, cols=c(2:7), names_to=c("measure", "cause"),
values_to="mortrate", names_sep="_")
data2020$Sex <- case_when(
endsWith(data2020$measure, "m")==TRUE ~ "Male",
endsWith(data2020$measure, "f")==TRUE ~ "Female",
TRUE~"all"
)
data2020$year <- 2020
data2020 <- data2020[-c(2)]
data2_long$IMD <- case_when(
data2_long$IMD==10 ~ "10 (least deprived)",
data2_long$IMD==9 ~ "9",
data2_long$IMD==8 ~ "8",
data2_long$IMD==7 ~ "7",
data2_long$IMD==6 ~ "6",
data2_long$IMD==5 ~ "5",
data2_long$IMD==4 ~ "4",
data2_long$IMD==3 ~ "3",
data2_long$IMD==2 ~ "2",
data2_long$IMD==1 ~ "1 (most deprived)"
)
#Calculate average deaths 2014-18
temp <- data2_long %>%
group_by(IMD, Sex) %>%
summarise(mortrate=mean(mortrate))
temp$year <- 2019
data2_long <- bind_rows(data2_long, temp)
data2_long$cause <- "All cause"
#Merge with older data
fulldata <- bind_rows(subset(data2_long, year>2013)[-c(5)], data2020)
fulldata$Sex <- factor(fulldata$Sex, levels=c("Male", "Female", "all"))
fulldata$cause <- factor(fulldata$cause, levels=c("other", "COVID-19", "All cause"))
fulldata$IMD <- factor(fulldata$IMD, levels=c("1 (most deprived)", "2", "3", "4", "5", "6", "7", "8", "9", "10 (least deprived)"))
tiff("Outputs/COVIDIneqCompare.tiff", units="in", width=12, heigh=8, res=300)
ggplot(fulldata)+
geom_col(data=subset(fulldata, year==2020 & cause!="All cause"), aes(x=IMD, y=mortrate, fill=cause), show.legend=FALSE)+
geom_jitter(data=subset(fulldata, year<2019 & cause=="All cause"), aes(x=IMD, y=mortrate), colour="midnightblue")+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete("Deprivation decile")+
scale_y_continuous("Age-standardised mortality rate per 100,000")+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
facet_wrap(~Sex)+
labs(title="All cause deaths are higher and more unequal than usual",
subtitle="Deaths in England between March 1st and April 17th by deprivation decile from all causes in 2014-18 and from COVID-19 and other causes in 2020",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/COVIDIneqCompare2.tiff", units="in", width=12, heigh=8, res=300)
ggplot(fulldata)+
geom_col(data=subset(fulldata, year==2020 & cause=="other"), aes(x=IMD, y=mortrate, fill=cause), show.legend=FALSE)+
geom_line(data=subset(fulldata, year==2019), aes(x=IMD, y=mortrate, group=Sex), colour="midnightblue")+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete("Deprivation decile")+
scale_y_continuous("Age-standardised mortality rate per 100,000")+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"), plot.subtitle=element_markdown())+
facet_wrap(~Sex)+
labs(title="Fewer people are dying of 'usual' causes during the pandemic",
subtitle="Non-COVID-19 deaths in England between March 1st and April 17th by deprivation decile in 2020 compared to the average for 2014-18",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
#Set up for SII calculations
fulldata <- arrange(fulldata, year, Sex, cause, fct_rev(IMD))
fulldata$popprop <- rep(seq(0.05,0.95, 0.1), times=18)
#Calculate SII & RII
SII <- fulldata %>%
group_by(year, Sex, cause) %>%
do(tidy(lm(mortrate ~ popprop, data=.))) %>%
pivot_wider(id_cols=c("year", "Sex", "cause"), names_from=term, values_from=c("estimate", "std.error"))
colnames(SII) <- c("year", "Sex", "cause", "intercept", "SII", "int.SE", "SII.SE")
SII$RII <- (SII$intercept+SII$SII)/SII$intercept
#calculate mean from 2014-18
temp <- SII %>%
filter(year<2019) %>%
group_by(Sex, cause) %>%
summarise(SII=mean(SII), RII=mean(RII))
temp$year <- 2018
SII <- bind_rows(temp, subset(SII, year>2019))
tiff("Outputs/SIICompare.tiff", units="in", height=8, width=12, res=300)
ggplot()+
geom_col(data=subset(SII, year==2020), aes(x=fct_rev(cause), y=SII, fill=fct_rev(cause)), show.legend=FALSE)+
geom_point(data=subset(SII, year==2018), aes(x=cause, y=SII), colour="red", shape=18, size=5)+
scale_x_discrete(name="", labels=c("All cause", "COVID-19", "Other cause"))+
scale_y_continuous(name="Slope Index of Inequality (SII)")+
scale_fill_manual(values=c("midnightblue", "#f89088", "#40a0d8"))+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Absolute inequality in mortality rates is higher than usual",
subtitle = "Slope Indices of Inequality (SII) for deaths in England between 1st March and 17th April by cause
in 2020 (All cause, COVID-19 and Other causes) and the All-cause average for 2014-18",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
tiff("Outputs/RIICompare.tiff", units="in", height=8, width=12, res=300)
ggplot()+
geom_col(data=subset(SII, year==2020), aes(x=fct_rev(cause), y=RII, fill=fct_rev(cause)), show.legend=FALSE)+
geom_point(data=subset(SII, year==2018), aes(x=cause, y=RII), colour="red", shape=18, size=5)+
scale_x_discrete(name="", labels=c("All cause", "COVID-19", "Other cause"))+
scale_y_continuous(name="Relative Index of Inequality (RII)")+
scale_fill_manual(values=c("midnightblue", "#f89088", "#40a0d8"))+
facet_wrap(~Sex)+
theme_classic()+
theme(strip.background=element_blank(), strip.text=element_text(face="bold", size=rel(1)),
plot.subtitle=element_markdown())+
labs(title="Relative inequality in non-COVID-19 deaths is on a par with historic levels",
subtitle = "Relative Indices of Inequality (RII) for deaths in England between 1st March and 17th April by cause
in 2020 (All cause, COVID-19 and Other causes) and the All-cause average for 2014-18",
caption="Data from ONS | Plot by @VictimOfMaths")
dev.off()
================================================
FILE: Observed Inequality/ONS Deaths Ineq.R
================================================
rm(list=ls())
library(tidyverse)
library(paletteer)
library(curl)
library(readxl)
temp <- tempfile()
source <- "https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1march2020to17april2020/referencetablesdraft.xlsx"
temp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode="wb")
data <- read_excel(temp, sheet="Table 3", range="B6:P25", col_names=FALSE)[,-c(4:6,9:11, 14,15)]
colnames(data) <- c("IMD", "deaths.pers", "rate.pers", "deaths.m", "rate.m", "deaths.f", "rate.f")
data$cause <- rep(c("All cause", "COVID-19"), each=10, times=1)
#Calculate 'other cause' outcomes
data_wide <- pivot_wider(data, names_from=cause, values_from=c(2:7))
data_wide$deaths.pers_other <- data_wide$`deaths.pers_All cause`-data_wide$`deaths.pers_COVID-19`
data_wide$rate.pers_other <- data_wide$`rate.pers_All cause`-data_wide$`rate.pers_COVID-19`
data_wide$deaths.m_other <- data_wide$`deaths.m_All cause`-data_wide$`deaths.m_COVID-19`
data_wide$rate.m_other <- data_wide$`rate.m_All cause`-data_wide$`rate.m_COVID-19`
data_wide$deaths.f_other <- data_wide$`deaths.f_All cause`-data_wide$`deaths.f_COVID-19`
data_wide$rate.f_other <- data_wide$`rate.f_All cause`-data_wide$`rate.f_COVID-19`
data <- pivot_longer(data_wide, cols=c(2:19), names_to=c("measure", "cause"),
values_to="values", names_sep="_")
data$metric <- case_when(
substr(data$measure, 1, 6)=="deaths" ~ "deaths",
substr(data$measure, 1, 4)=="rate" ~ "rate",
TRUE ~ "ERROR"
)
data$sex <- case_when(
endsWith(data$measure, "m")==TRUE ~ "Male",
endsWith(data$measure, "f")==TRUE ~ "Female",
TRUE~"all"
)
data$sex <- factor(data$sex, levels=c("Male", "Female", "all"))
data$cause <- factor(data$cause, levels=c("other", "COVID-19", "All cause"))
data$IMD <- factor(data$IMD, levels=c("1 (most deprived)", "2", "3", "4", "5", "6", "7", "8", "9", "10 (least deprived)"))
########
#Deaths#
########
#Generate labels
tempA <- (data$values[data$sex=="Male" & data$cause=="other" & data$IMD=="1 (most deprived)" & data$metric=="deaths"]-
data$values[data$sex=="Male" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="deaths"])/
data$values[data$sex=="Male" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="deaths"]
labA <- paste0(round(tempA*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempB <- (data$values[data$sex=="Male" & data$cause=="COVID-19" & data$IMD=="1 (most deprived)" & data$metric=="deaths"]-
data$values[data$sex=="Male" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="deaths"])/
data$values[data$sex=="Male" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="deaths"]
labB <- paste0(round(tempB*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempC <- (data$values[data$sex=="Female" & data$cause=="other" & data$IMD=="1 (most deprived)" & data$metric=="deaths"]-
data$values[data$sex=="Female" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="deaths"])/
data$values[data$sex=="Female" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="deaths"]
labC <- paste0(round(tempC*100,0), "% more non-COVID-19 deaths\nin the most vs. least\ndeprived areas")
tempD <- (data$values[data$sex=="Female" & data$cause=="COVID-19" & data$IMD=="1 (most deprived)" & data$metric=="deaths"]-
data$values[data$sex=="Female" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="deaths"])/
data$values[data$sex=="Female" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="deaths"]
labD <- paste0(round(tempD*100,0), "% more COVID-19 deaths\nin the most vs. least\ndeprived areas")
#Set up annotations
ann_text1 <- data.frame(IMD=rep(5, times=4), values=c(4800, -900, 4700, -900), sex=c("Male", "Male", "Female", "Female"),
cause=rep("other", times=4))
ann_arrows1a <- data.frame(x=rep(c(3.4,6.7), times=4), xend=rep(c(1,10), times=4),
y=rep(c(4700, -1000), times=2), yend=c(4000, 200, 3800, 200),
sex=rep(c("Male", "Female"), each=2), cause=rep("other", times=4))
ann_arrows1b <- data.frame(x=rep(c(3.4,6.7), times=4), xend=rep(c(1,10), times=4),
y=rep(c(-1000, 4700), times=2), yend=c(300, 3500, 200, 3300),
sex=rep(c("Male", "Female"), each=2), cause=rep("other", times=4))
tiff("Outputs/COVIDIneqDeath.tiff", units="in", width=12, height=8, res=300)
ggplot(subset(data, cause!="All cause" & sex!="all" & metric=="deaths"), aes(x=IMD, y=values, fill=cause))+
geom_col()+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete(name="Deprivation decile")+
scale_y_continuous(name="Total deaths 1st Mar-17th Apr")+
coord_cartesian(ylim=c(0,5000), clip="off")+
facet_wrap(~sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"))+
labs(title="COVID-19 has hit the most deprived areas hardest",
subtitle="Higher deprivation is associated with more deaths from both COVID-19 and non-COVID-19 causes during the pandemic",
caption="Data from ONS | Plot by @VictimOfMaths")+
geom_text(data=ann_text1, aes(x=IMD, y=values),
label=c(labA, labB, labC, labD), colour="Grey40")+
geom_curve(data=ann_arrows1a, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
geom_curve(data=ann_arrows1b, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=-0.21,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))
dev.off()
########
#Rates#
#######
#Generate labels
tempE <- (data$values[data$sex=="Male" & data$cause=="other" & data$IMD=="1 (most deprived)" & data$metric=="rate"]-
data$values[data$sex=="Male" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="rate"])/
data$values[data$sex=="Male" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="rate"]
labE <- paste0(round(tempE*100,0), "% higher non-COVID-19 death\nrate in the most vs.\nleast deprived areas")
tempF <- (data$values[data$sex=="Male" & data$cause=="COVID-19" & data$IMD=="1 (most deprived)" & data$metric=="rate"]-
data$values[data$sex=="Male" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="rate"])/
data$values[data$sex=="Male" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="rate"]
labF <- paste0(round(tempF*100,0), "% higher COVID-19 death\nrate in the most vs.\nleast deprived areas")
tempG <- (data$values[data$sex=="Female" & data$cause=="other" & data$IMD=="1 (most deprived)" & data$metric=="rate"]-
data$values[data$sex=="Female" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="rate"])/
data$values[data$sex=="Female" & data$cause=="other" & data$IMD=="10 (least deprived)" & data$metric=="rate"]
labG <- paste0(round(tempG*100,0), "% higher non-COVID-19 death\nrate in the most vs.\nleast deprived areas")
tempH <- (data$values[data$sex=="Female" & data$cause=="COVID-19" & data$IMD=="1 (most deprived)" & data$metric=="rate"]-
data$values[data$sex=="Female" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="rate"])/
data$values[data$sex=="Female" & data$cause=="COVID-19" & data$IMD=="10 (least deprived)" & data$metric=="rate"]
labH <- paste0(round(tempH*100,0), "% higher COVID-19 death\nrate in the most vs.\nleast deprived areas")
#Set up annotations
ann_text2 <- data.frame(IMD=rep(5, times=4), values=c(270, -50, 220, -50), sex=c("Male", "Male", "Female", "Female"),
cause=rep("other", times=4))
ann_arrows2a <- data.frame(x=rep(c(3.2,6.8), times=4), xend=rep(c(1,10), times=4),
y=c(260,-50, 210,-50), yend=c(220, 20, 160, 10),
sex=rep(c("Male", "Female"), each=2), cause=rep("other", times=4))
ann_arrows2b <- data.frame(x=rep(c(3.2,6.8), times=4), xend=rep(c(1,10), times=4),
y=c(-50,260,-50,210), yend=c(30, 130, 25, 90),
sex=rep(c("Male", "Female"), each=2), cause=rep("other", times=4))
tiff("Outputs/COVIDIneqRate.tiff", units="in", width=12, height=8, res=300)
ggplot(subset(data, cause!="All cause" & sex!="all" & metric=="rate"), aes(x=IMD, y=values, fill=cause))+
geom_col()+
scale_fill_paletteer_d("palettetown::porygon", name="Cause", labels=c("Other", "COVID-19"))+
scale_x_discrete(name="Deprivation decile")+
scale_y_continuous(name="Age-standardised death rate\nper 100,000 1st Mar-17th Apr")+
coord_cartesian(ylim=c(0,300), clip="off")+
facet_wrap(~sex)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),
strip.text=element_text(face="bold", size=rel(1)), plot.title.position="plot",
axis.text=element_text(colour="black"))+
labs(title="Inequalities in COVID-19 impact are even steeper after adjusting for age",
subtitle="Age-standardised rates of both confirmed COVID-19 deaths and all other causes are roughly twice as high in the most vs. least deprived areas",
caption="Data from ONS | Plot by @VictimOfMaths")+
geom_text(data=ann_text2, aes(x=IMD, y=values),
label=c(labE, labF, labG, labH), colour="Grey40")+
geom_curve(data=ann_arrows2a, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=0.16,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))+
geom_curve(data=ann_arrows2b, aes(x=x, xend=xend, y=y, yend=yend), colour="Grey40", curvature=-0.29,
arrow=arrow(length=unit(0.2, "cm"), type="closed"))
dev.off()
================================================
FILE: Observed Inequality/readme.md
================================================
An analysis of published data on the inequality impacts of the pandemic, and how this compares to historic inequality.
[ONS Deaths Ineq.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Observed%20Inequality/ONS%20Deaths%20Ineq.R) takes data that ONS have published for England on deaths from COVID-19 and other causes between 1st March-17th April and illustrates socioeconomic inequalities in the impact of the pandemic.
[ONS DeathsIneq 2.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Observed%20Inequality/ONS%20Deaths%20Ineq%202.R) brings in historical data on socioeconomic inequalities in all-cause deaths to compare the inequality impacts of the pandemic on mortality to historical levels of inequality.

Suggested citation for any of this analysis:
Angus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226
================================================
FILE: README.md
================================================
# COVID-19
Plots and analysis relating to the pandemic
1) *Cases*
[English LA Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/English%20LA%20Heatmaps.R) generates heatmaps and animated maps showing English Upper Tier Local Authority trajectories in both confirmed COVID-19 cases and estimated COVID-19 deaths (in hospitals only) inspired by similar plots for US states from [@Marco_Piani](https://twitter.com/Marco_Piani). The approach to modelling deaths, which are only published at NHS trust level, was developed by [@Benj_Barr](https://twitter.com/Benj_Barr). The code also generates a map of Local Authority-level changes in case numbers in the past week and animated maps of both case and death counts.
[COVIDCaseCartograms.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCaseCartograms.R) creates a series of cartograms based on [the excellent templates](https://t.co/rIej2uTt5D) created by [@carlbaker](https://twitter.com/carlbaker) showing COVID case rates across the UK. [COVIDCasesLTLAPhasePlot.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCasesLTLAPhasePlot.R) uses [an approach](https://twitter.com/jburnmurdoch/status/1339646913436676098) borrowed from [John Burn-Murdoch](https://twitter.com/jburnmurdoch) to look at the current picture of Local Authority-level cases and whether they are accelerating or decelerating. [COVIDLineages.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDLineages.R) Plots data from the Wellcome Sanger Institute to look at the spread of different COVID variants over time in UK regions.
[COVIDLACaseData.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDLACaseData.R) generates similar outputs, including for hospital admissions, at Lower Tier Local Authority level. I've written about these plots in [an article](https://t.co/zNCrpC0wMw?amp=1) for the journal [People, Place and Policy](https://extra.shu.ac.uk/ppp-online/). [COVIDTestingData.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDTestingData.R) analyses testing rates and positivity, although this analysis is now less relevant since the wider rollout of LFD tests, as it mostly focuses on PCR test data.
[COVIDCFRs](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCFRs.R) uses Case Fatality Rates estimated by [Daniel Howdon](https://medicinehealth.leeds.ac.uk/medicine/staff/447/dr-dan-howdon) to look at how these have changed over time, particularly in relation to the vaccine rollout. [COVIDCasesvsCFR.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCasesvsCFR.R) extends this to estimate the mortality burden associated with the current caseload in English Local Authorities and how this has changed over time as case numbers and the age profile of cases has shifted.
[Scottish HB Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Scottish%20HB%20Heatmaps.R), [Welsh LA Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Welsh%20LA%20Heatmaps.R), [Irish County Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Irish%20County%20Heatmaps.R), [German State Heatmaps.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/German%20State%20Heatmaps.R) and [COVIDCanadaHeatmap.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCanadaHeatmap.R) produce equivalent case trajectory plots for Scottish Health Boards, Welsh Local Authorities, Irish Counties, German Bundesländer and Canadian Provinces respectively.
[COVIDMSOACaseRatexIMD.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDMSOACaseRatexIMD.R) looks at socioeconomic differences in case rates and how they have changed in recent weeks, while [COVIDBivariateCasesxIMD](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDBivariateCasesxIMD.R) looks at associations between COVID case rates and deprivation in London and Glasgow.
[COVIDPHESurveillance.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHESurveillance.R) and [COVIDPHESurveillance2.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHESurveillance2.R) provide analysis of the PHE Surveillance reports, including case data and positivity rates by age, although these have largely been replaced by [COVIDPHECasesxAgev2](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHECasesxAgev2.R) which generates similar plots now that age-specific case data at Local Authority level is published as part of [the PHE dashboard](http://coronavirus.data.gov.uk). [ONSInfectionSurvey](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/ONSInfectionSurvey.R) produces similar graphs for the ONS' random sampling infection survey. [ScotlandCOVIDCasesxAge.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/ScotlandCOVIDCasesxAge.R) performs some similar analysis of case data by age for Scotland, alongside analysis of cases and deaths by deprivation quintile. [COVIDAgeTrends.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDAgeTrends.R) takes data on COVID cases, admissions and deaths and separates the trends out by age, to help identify potential impacts of the vaccination programme.
[ScotlandCOVIDHouseParties.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/ScotlandCOVIDHouseParties.R) is a small piece of analysis looking at data from Scotland on regulation-breaching house parties. Finally, [COVIDPillars.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPillars.R) is another, obsolete, approach using older, pre-dashboard API, data to separate out case trajectories by testing pillar, while [Misc Case Analysis.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/Misc%20Case%20Analysis.R) is a collection of various quick plots related to various aspects of case data.
*Hospital admissions*
[COVIDNHSAdmissions.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDNHSAdmissions.R) analyses hospital admissions, occupancy and ventilator bed use across England. [UK Hex Animation.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/UK%20Hex%20Animations.R) uses this data to generate an animated hex map of COVID-19 cases across the UK & Ireland, built on various excellent hex map resources from [@ODILeeds](https://twitter.com/ODILeeds) and [@olihawkins](https://twitter.com/olihawkins). [COVIDNHSBolton.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDNHSBolton.R) uses the same analysis, but focusing on Bolton specifically.
[COVIDCycle.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCycle.R) visualises data on COVID-19 hospital admissions and deaths (using deaths within 24 days of a positive test, rathern than death certificate data) using [an approach](https://twitter.com/maartenzam/status/1319622943526293505) taken from [Maarten Lambrechts](https://twitter.com/maartenzam). [COVIDCycleUS](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCycle_US.R) produces similar plots for the US as a whole and for individual states.
[COVIDAdmissionsLTLTPhasePlot.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDAdmissionsLTLAPhasePlot.R) uses [an approach](https://twitter.com/jburnmurdoch/status/1339646913436676098) borrowed from [John Burn-Murdoch](https://twitter.com/jburnmurdoch) to look at the current picture of trust- and Local Authority-level hospital admissions. [COVIDHFRs.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDHFRs.R) looks (fairly simplistically) at the association between hospital admissions and deaths in hospitals in England.
*Vaccinations*
[COVIDVaccinations.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinations.R) creates graphs of the UK rollout of COVID vaccines, while [COVIDVaccinationMSOACartogram](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationMSOACartogram.R) plots maps of the geographic distribution of vaccinations in England and analyses the socioeconomic inequalities in this. [COVIDBivariateCasesxVax]https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDBivariateCasesxVax.R) looks at associations between COVID vaccination rates and deprivationacross England. [COVIDVaccinationStaffCartogram.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationStaffCartogram.R) looks at vaccine coverage among health and social care staff. [COVIDVaccinationInequalityGB.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationInequalityGB.R) uses rather patchy data on vaccine delivery by deprivation and age to look at how inequality in delivery varies between GB nations, by age and how this has changed over time. [COVIDVaxUptakexAge.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaxUptakexAge.R) plots cumulative uptake of vaccinations by age in England
[COVIDCasesxVaxTadpoles](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCasesxVaxTadpoles.R) generates a tadpole plot showing how current COVID cases at Local Authority and MSOA level relate to current vaccination rates. [COVIDPHEVaxxAgexSex.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDPHEVaxxAgexSex.R) uses weekly data on vaccination coverage from the PHE Surveillance report to plot an age pyramid of vaccination coverage. [COVIDVaxPyramidxRegion.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaxPyramidxRegion.R) attempts to replicate theis at a regional level, while [COVIDVaccinationAnimations.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaccinationAnimations.R) creates an animated version to show the progress of vaccination coverage over time. Finally, [YorkshireVaxCartogram.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/YorkshireVaxCartogram.R) produces Yorkshire-specific analyses of vaccination coverage.
*Apps*
I've also made a few apps to allow you to explore local and national COVID-19 data. [One](https://victimofmaths.shinyapps.io/COVID_LA_Plots/) for mortality, cases and admissions data, [one](https://victimofmaths.shinyapps.io/COVID_Cases_By_Age/) for case data stratified by age and [another](https://victimofmaths.shinyapps.io/COVID_Case_Trends_By_Age/) which compares trends in recent age-specific case data.

2) [AllCauseDeaths2021.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/AllCauseDeaths2021.R) harmonises weekly all-cause mortality data from England & Wales (from ONS), Scotland (from NRS) and Northern Ireland (from NISRA) and draws plots comparing deaths in 2020 so far to the previous decade, split by age, sex and region inspired by a plot from [@EdConwaySky](https://twitter.com/EdConwaySky). This replaces a previous (2020) version of [the same file](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/AllCauseDeaths.R) and now includes Scotland and Northern Ireland which were previous in separate code files: [ScottishAllCauseDeathsDetail.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/ScottishAllCauseDeathsDetail.R) uses richer data published by NRS to look at patterns in excess mortality in Scotland by place of death, Health Board area and age. [NRS Excess Deaths by Cause.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/NRS%20Excess%20Deaths%20by%20Cause.R) produces graphs of excess deaths in Scotland by cause and location of death.
[All Cause Deaths France.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/All%20Cause%20Deaths%20France.R) uses detailed French all-cause mortality records published by [Insee](https://www.insee.fr/fr/statistiques), the French statistical authority, to examine age-specific excess deaths in France and [All Cause Deaths Italy.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/All%20Cause%20Deaths%20Italy.R) does the same for Italy using data from [ISTAT](https://www.istat.it/en/).
[AllCauseDeathsxAge.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/AllCauseDeathsxAge.R) brings these together and extends this analysis using data from the UK and international data from the [Human Mortality Database](https://www.mortality.org/).
I've made [an app](https://victimofmaths.shinyapps.io/COVID_LA_Plots/) which you can use to generate excess deaths plots by Lower Tier Local Authority for every area in Great Britain. All code and data for this lives [here](https://github.com/VictimOfMaths/COVID_LA_Plots).
I've also created [a separate app](https://victimofmaths.shinyapps.io/COVID_Reg_Delays) to allow you to explore registration delays in English and Welsh mortality data from ONS. All code and data for this lives [here](https://github.com/VictimOfMaths/COVID_Reg_Delays).
[COVIDCareHomeDeaths.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVIDCareHomeDeaths.R) analyses additional data published by the ONS for England based on notifications from the Care Quality Commission of deaths of care home residents.
[COVIDDeathsxRegion.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVIDDeathsxRegion.R) produces plots of regional trends in COVID mortality in England based on the 28-day measure of mortality.
[MSOA Deaths.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/MSOA%20Deaths.R) takes mortality data from England & Wales at Middle Super Output Area level and from Scotland at Intermediate Zone level and maps it, ready for 3D visualisation using [Aerialod](https://ephtracy.github.io/index.html?page=aerialod).
[COVIDAgeMortPred.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVIDAgeMortPred.R) uses age-specific Case Fatality Ratios estimated by [Daniel Howden](https://twitter.com/danielhowdon) to estimate the future burden of mortality from COVID-19 infections that have already been identified (i.e. the total number of deaths we'd expect in England over the next few months *assuming there were no further infections*).
[LA All Cause Deaths.R](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/LA%20All%20Cause%20Deaths.R) calculates excess mortality at Local Authority level from ONS figures.

3) [Exposure Mapping](https://github.com/VictimOfMaths/COVID-19/tree/master/Exposure%20mapping):
[COVIDExposures.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Exposure%20mapping/COVIDExposures.R) brings together data on health deprivation and estimates of the potential COVID-19 mortality risk based on the age-sex structure of the population (following the approach developed by [@ikashnitsky](https://twitter.com/ikashnitsky) and [@jm_aburto](https://twitter.com/jm_aburto)) at Lower Super Output Area level and plots bivariate maps highlighting areas with the greatest potential COVID-19 risk. I also made a Shiny app which creates slightly lower resolution versions of the same plots online, which you can find [here](https://victimofmaths.shinyapps.io/covidmapper/), and wrote about these maps for the UK Data Service's [Impact and Innovation blog](http://lab.ukdataservice.ac.uk/2020/05/21/visualising-high-risk-areas-for-covid-19-mortality/).

4) [Initial Inequality Estimates](https://github.com/VictimOfMaths/COVID-19/tree/master/Initial%20Inequality%20Estimates):
[Estimated Cases By IMD.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Initial%20Inequality%20Estimates/Estimated%20Cases%20by%20IMD.R) takes published figures on confirmed COVID-19 cases by Local Authority in England and maps that onto quintiles of the Index of Multiple Deprivation, then plots a variety of case trajectories by deprivation quintile as well as a map of confirmed case rates.

5) [Observed Inequality](https://github.com/VictimOfMaths/COVID-19/tree/master/Observed%20Inequality):
[ONS Deaths Ineq.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Observed%20Inequality/ONS%20Deaths%20Ineq.R) takes data that ONS have published for England on deaths from COVID-19 and other causes between 1st March-17th April and illustrates socioeconomic inequalities in the impact of the pandemic.
[ONS DeathsIneq 2.R](https://github.com/VictimOfMaths/COVID-19/blob/master/Observed%20Inequality/ONS%20Deaths%20Ineq%202.R) brings in historical data on socioeconomic inequalities in all-cause deaths to compare the inequality impacts of the pandemic on mortality to historical levels of inequality.

Anyone is free to use any of this code for any purpose (except for evil).
Suggested citation for any of this analysis or associated visualisations:
Angus, Colin (2021): COVID Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226