[
  {
    "path": "All Cause Mortality/All Cause Deaths France.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(readxl)\nlibrary(lubridate)\nlibrary(forcats)\nlibrary(ggtext)\nlibrary(HMDHFDplus)\nlibrary(paletteer)\nlibrary(ggthemes)\n\n#Read in historic French mortality data for 2010-18\n#Source: https://www.insee.fr/fr/information/4190491\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://www.insee.fr/fr/statistiques/fichier/4769950/deces-2010-2018-csv.zip\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\ndata10 <- read.csv(file.path(temp2, \"deces-2010.csv\"), sep=\";\")\ndata11 <- read.csv(file.path(temp2, \"deces-2011.csv\"), sep=\";\")\ndata12 <- read.csv(file.path(temp2, \"deces-2012.csv\"), sep=\";\")\ndata13 <- read.csv(file.path(temp2, \"deces-2013.csv\"), sep=\";\")\ndata14 <- read.csv(file.path(temp2, \"deces-2014.csv\"), sep=\";\")\ndata15 <- read.csv(file.path(temp2, \"deces-2015.csv\"), sep=\";\")\ndata16 <- read.csv(file.path(temp2, \"deces-2016.csv\"), sep=\";\")\ndata17 <- read.csv(file.path(temp2, \"deces-2017.csv\"), sep=\";\")\ndata <- bind_rows(data10, data11, data12, data13, data14, data15, data16, data17)[,c(2,3,7)]\ncolnames(data) <- c(\"sex\", \"dob\", \"dod\")\n\n#Some dates of Birth, particularly older ones are missing days and months. Allocate these randomly.\ndata$dob <- as.character(data$dob)\ndata$yob <- as.numeric(substr(data$dob, 1, 4))\ndata$dob <- as.Date(data$dob, format=c(\"%Y%m%d\"))\ndata$temp <- as.Date(paste0(data$yob, \"-01-01\"))\ndata$temp2 <- data$temp+round(runif(nrow(data), min=-0.49, max=365.49))\ndata$dob <- if_else(is.na(data$dob) & data$yob!=0, data$temp2, data$dob)\n\ndata$dod <- as.character(data$dod)\n\n#remove very small number of dates of death which are too short\ndata <- subset(data, nchar(data$dod, type=\"chars\")==8)[,c(1:3)]\n\ndata$dod <- as.Date(data$dod, format=c(\"%Y%m%d\"))\ndata$age <- floor(time_length(difftime(data$dod, data$dob), \"years\"))\n\n#remove a few other weird cases\ndata <- subset(data, age>=-1 & age<=120)\n\n#categorise age\ndata$ageband <- case_when(\n  data$age<15 ~ \"0-14\",\n  data$age<65 ~ \"15-64\",\n  data$age<75 ~ \"65-74\",\n  data$age<85 ~ \"75-84\",\n  TRUE ~ \"85+\")\n\n#Tidy up sex variable\ndata$sex <- if_else(data$sex==1, \"Male\", \"Female\")\n\n#Bring in deaths data for 2020 from https://www.insee.fr/en/statistiques/4493808?sommaire=4493845 (updated on Fridays)\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://www.insee.fr/en/statistiques/fichier/4493808/2020-12-18_detail.zip\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\ndata18 <- read.csv(file.path(temp2, \"DC_2018_det.csv\"), sep=\";\")\ndata19 <- read.csv(file.path(temp2, \"DC_2019_det.csv\"), sep=\";\")\ndata20 <- read.csv(file.path(temp2, \"DC_2020_det.csv\"), sep=\";\")\n\ndata1820 <- bind_rows(data18, data19, data20)\n\n#Set up dates\ndata1820$MNAIS <- as.character(formatC(data1820$MNAIS, width=2, format=\"d\", flag=\"0\"))\ndata1820$JNAIS <- as.character(formatC(data1820$JNAIS, width=2, format=\"d\", flag=\"0\"))\ndata1820$dob <- as.Date(paste0(data1820$ANAIS, data1820$MNAIS, data1820$JNAIS), format=c(\"%Y%m%d\"))\n\ndata1820$MDEC <- as.character(formatC(data1820$MDEC, width=2, format=\"d\", flag=\"0\"))\ndata1820$JDEC <- as.character(formatC(data1820$JDEC, width=2, format=\"d\", flag=\"0\"))\ndata1820$dod <- as.Date(paste0(data1820$ADEC, data1820$MDEC, data1820$JDEC), format=c(\"%Y%m%d\"))\n\ndata1820$age <- floor(time_length(difftime(data1820$dod, data1820$dob), \"years\"))\ndata1820$sex <- if_else(data1820$SEXE==\"M\", \"Male\", \"Female\")\n\ndata1820 <- data1820[,c(12:15)]\n\n#categorise age\ndata1820$ageband <- case_when(\n  data1820$age<15 ~ \"0-14\",\n  data1820$age<65 ~ \"15-64\",\n  data1820$age<75 ~ \"65-74\",\n  data1820$age<85 ~ \"75-84\",\n  TRUE ~ \"85+\")\n\n#Check latest date in deaths data aligns with the end of a week\nmaxdate <- max(data1820$dod)\nmaxweek <- week(maxdate)\n\n#Merge all years\nfulldata <- bind_rows(data, data1820)\n\nfulldata$year <- year(fulldata$dod)\nfulldata$week <- week(fulldata$dod+days(1))\n\n#Aggregate to weekly data\naggdata <- fulldata %>%\n  group_by(ageband, year, week, sex) %>%\n  filter(year>=2010) %>%\n  summarise(deaths=n())\n\n#Combines sexes for saving later\ndata.FR <- aggdata %>%\n  group_by(ageband, year, week) %>%\n  summarise(deaths=sum(deaths))\n\n#Save data\nwrite.csv(data.FR, \"Data/deaths_age_France.csv\")\n\n#Draw overall plot\ndata.full <- aggdata %>%\n  group_by(year, week) %>%\n  summarise(deaths=sum(deaths))\n\nhist.full <- data.full %>%\n  filter(year!=2020) %>%\n  group_by(week) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))\n\ndata.full <- merge(hist.full, subset(data.full, year==2020 & week<=maxweek), all.x=TRUE, all.y=TRUE)\n\n#Calculate excess deaths in 2020 vs. historic mean\nexcess.full <- data.full %>%\n  filter(!is.na(deaths)) %>%\n  summarise(deaths=sum(deaths), mean=sum(mean_d))\n\nexcess.full$excess <- excess.full$deaths-excess.full$mean\nexcess.full$prop <- excess.full$excess/excess.full$mean\n\ntiff(\"Outputs/ExcessDeathsFrance.tiff\", units=\"in\", width=8, height=6, res=300)\nggplot(subset(data.full, week<53))+\n  geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_d), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=deaths), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths recorded\")+\n  annotate(geom=\"text\", x=19, y=17000, label=paste0(\"+\", round(excess.full$excess, 0), \n                                                             \" more deaths in 2020 than average (+\", \n                                                             round(excess.full$prop*100, 0),\"%)\"), colour=\"Red\", hjust=0)+\n  annotate(geom=\"text\", x=30, y=12000, label=\"Historic maximum\", colour=\"Skyblue4\")+\n  annotate(geom=\"text\", x=30, y=9200, label=\"Historic minimum\", colour=\"Skyblue4\")+\n  annotate(geom=\"text\", x=46, y=9200, label=\"Historic mean\", colour=\"grey30\")+\n  geom_curve(aes(x=48, y=9400, xend=47, yend=11200), colour=\"grey30\", curvature=0.15,\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\n  theme_classic()+\n  theme(plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"France's 'second wave' has been as deadly as the first\",\n       subtitle=\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.\",\n       caption=\"Date from Insee | Plot by @VictimOfMaths\")\ndev.off()\n\n#Calculate 2010-19 average, min and max\nhist.data <- aggdata %>%\n  filter(year!=2020) %>%\n  group_by(ageband, sex, week) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))\n\naggdata <- merge(hist.data, subset(aggdata, year==2020 & week<=maxweek), all.x=TRUE, all.y=TRUE)\n\n#Calculate excess deaths in 2020 vs. historic mean\nexcess <- aggdata %>%\n  group_by(ageband, sex) %>%\n  filter(!is.na(deaths)) %>%\n  summarise(deaths=sum(deaths), mean=sum(mean_d))\n\nexcess$excess <- excess$deaths-excess$mean\nexcess$prop <- excess$excess/excess$mean\n\nann_text <- data.frame(week=rep(18, times=10), \n                       position=c(600,300,1000,1700,1100,1600,1800,2000,5000,3300), \n                       sex=rep(c(\"Female\", \"Male\"), times=5),\n                       ageband=rep(c(\"0-14\", \"15-64\", \"65-74\", \"75-84\", \"85+\"), each=2))\n\ntiff(\"Outputs/ExcessDeathsFrancexAge.tiff\", units=\"in\", width=14, height=8, res=300)\nggplot(aggdata)+\n  geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_d), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=deaths), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths recorded\")+\n  facet_grid(sex~ageband, scales=\"free_y\")+\n  geom_text(data=ann_text, aes(x=week, y=position), label=c(\n    paste0(round(excess[1,5],0),\" excess deaths in 2020\\nvs. 2010-19 mean (\", round(excess[1,6]*100,0),\"%)\"),\n    paste0(round(excess[2,5],0),\" deaths (\", round(excess[2,6]*100,0),\"%)\"),\n    paste0(round(excess[3,5],0),\" deaths (\", round(excess[3,6]*100,0),\"%)\"),\n    paste0(round(excess[4,5],0),\" deaths (\", round(excess[4,6]*100,0),\"%)\"),\n    paste0(\"+\",round(excess[5,5],0),\" deaths (+\", round(excess[5,6]*100,0),\"%)\"),\n    paste0(\"+\",round(excess[6,5],0),\" deaths (+\", round(excess[6,6]*100,0),\"%)\"),\n    paste0(round(excess[7,5],0),\" deaths (\", round(excess[7,6]*100,0),\"%)\"),\n    paste0(\"+\",round(excess[8,5],0),\" deaths (+\", round(excess[8,6]*100,0),\"%)\"),\n    paste0(\"+\",round(excess[9,5],0),\" deaths (+\", round(excess[9,6]*100,0),\"%)\"),\n    paste0(\"+\",round(excess[10,5],0),\" deaths (+\", round(excess[10,6]*100,0),\"%)\")),\n    size=3.5, colour=\"Red\", hjust=0)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face=\"bold\"), \n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"Both 'waves' in France high the oldest age groups hardest\",\n       subtitle=\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.\",\n       caption=\"Date from Insee | Plot by @VictimOfMaths\")\ndev.off()\n\n#Find latest year in 2020 data\ntemp <- fulldata %>%\n  filter(year==2020) %>%\n  summarise (maxweek2020=max(week))\n\nmaxweek20 <- temp[1,1]\n\n#Collapse data for the pandemic period only\nagedata <- fulldata %>%\n  filter(year>=2010 & week>9 & week<=maxweek20 & age>=0 & age<100) %>%\n  group_by(age, year, sex) %>%\n  summarise(deaths=n())\n\n#Import population size\n#Bring in French population from HMD (need to register and put your details in here)\nusername <- \"\" \npassword <- \"\"\n\nFraPop <- readHMDweb(CNTRY=\"FRATNP\", \"Exposures_1x1\", username, password)\n\nFraPop <- subset(FraPop, Year>=2010)\n\n#Replicate 2017 populations for 2018+\ntemp <- subset(FraPop, Year==2017)\ntemp2 <- temp\ntemp3 <- temp\ntemp$Year <- 2018\ntemp2$Year <- 2019\ntemp3$Year <- 2020\n\nFraPop <- bind_rows(FraPop, temp, temp2, temp3)\n\nFraPop_long <- gather(FraPop, sex, pop, c(3,4))\n\nagedata <- merge(agedata, FraPop_long[,-c(3,4)], by.x=c(\"sex\", \"age\", \"year\"), by.y=c(\"sex\", \"Age\", \"Year\"))\n\nagedata$mortrate <- agedata$deaths*100000/agedata$pop\n\n#Look at 2010-19 data\nolddata <- agedata %>%\n  filter(year<2020) %>%\n  group_by(age, sex) %>%\n  summarise(mean_d=mean(deaths), min_d=min(deaths), max_d=max(deaths), mean_r=mean(mortrate),\n            min_r=min(mortrate), max_r=max(mortrate))\n\nnewdata <- merge(olddata, subset(agedata, year==2020))\n\nnewdata$excess <- newdata$mortrate-newdata$mean_r\nnewdata$propexcess <- newdata$excess/newdata$mean_r\n\nwrite.csv(newdata, \"Data/FrenchDeathsByAge.csv\")\n\nnewdata <- read.csv(\"Data/FrenchDeathsByAge.csv\")\n\ntiff(\"Outputs/AgeSpecificDeathsFr.tiff\", units=\"in\", width=12, height=7, res=300)\nggplot(newdata)+\n  geom_ribbon(aes(x=age, ymin=log10(min_r), ymax=log10(max_r)), fill=\"Skyblue2\")+\n  geom_line(aes(x=age, y=log10(mean_r)), colour=\"Grey50\", linetype=2)+\n  geom_point(aes(x=age, y=log10(mortrate)), colour=\"red\")+\n  scale_x_continuous(name=\"Age\", breaks=seq(0,100, by=10))+\n  scale_y_continuous(name=\"Log mortality rate\\n(deaths/100,000 | base 10)\")+\n  facet_wrap(~sex)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle=element_markdown())+\n  labs(title=\"Age-specific mortality rates in France during the pandemic\",\n       subtitle=paste0(\"Deaths in weeks 9-\", maxweek, \" in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.\"),\n       caption=\"Data from Insee and Human Mortality Database | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/AgeSpecificDeathsPropFr.tiff\", units=\"in\", width=12, height=7, res=300)\nggplot(newdata)+\n  geom_bar(stat=\"identity\", aes(x=age, y=propexcess, fill=propexcess), show.legend=FALSE)+\n  scale_fill_paletteer_c(\"ggthemes::Classic Red-White-Green\", direction=-1, limit=c(-1,1)*max(abs(newdata$propexcess)))+\n  scale_x_continuous(name=\"Age\", breaks=seq(0,100, by=10))+\n  scale_y_continuous(name=\"Proportional change in mortality rate in 2020 vs. 2010-19 average\",\n                     breaks=seq(-0.5, 1, by=0.5), labels=c(\"-50%\", \"0%\", \"+50%\", \"+100%\"))+\n  facet_wrap(~sex)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle=element_markdown())+\n  labs(title=\"Age-specific variation in mortality rates in France during the pandemic\",\n       subtitle=paste0(\"Relative change in all-cause mortality rates in weeks 9-\", maxweek, \" of 2020 versus the average between 2010-19\"),\n       caption=\"Data from Insee and Human Mortality Database | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/All Cause Deaths Italy.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(paletteer)\nlibrary(lubridate)\nlibrary(ggtext)\n\n#Download Italian deaths data from Istat (link helpfully provided by @MazzucoStefano)\n#From this web page: https://www.istat.it/it/archivio/240401\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://www.istat.it/it/files//2020/03/Dataset-decessi-comunali-giornalieri_dati_mortalita_fino_31Ottobre2020.zip\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\nrawdata <- read.csv(file.path(temp2, \"Dataset decessi comunali giornalieri e tracciato record/comuni_giornaliero_31ottobre.csv\"))\n\n#Tidy up data\nrawdata$age <- case_when(\n  rawdata$CL_ETA==0 ~ \"0\",\n  rawdata$CL_ETA==1 ~ \"1-4\",\n  rawdata$CL_ETA==2 ~ \"5-9\",\n  rawdata$CL_ETA==3 ~ \"10-14\",\n  rawdata$CL_ETA==4 ~ \"15-19\",\n  rawdata$CL_ETA==5 ~ \"20-24\",\n  rawdata$CL_ETA==6 ~ \"25-29\",\n  rawdata$CL_ETA==7 ~ \"30-34\",\n  rawdata$CL_ETA==8 ~ \"35-39\",\n  rawdata$CL_ETA==9 ~ \"40-44\",\n  rawdata$CL_ETA==10 ~ \"45-49\",\n  rawdata$CL_ETA==11 ~ \"50-54\",\n  rawdata$CL_ETA==12 ~ \"55-59\",\n  rawdata$CL_ETA==13 ~ \"60-64\",\n  rawdata$CL_ETA==14 ~ \"65-69\",\n  rawdata$CL_ETA==15 ~ \"70-74\",\n  rawdata$CL_ETA==16 ~ \"75-79\",\n  rawdata$CL_ETA==17 ~ \"80-84\",\n  rawdata$CL_ETA==18 ~ \"85-89\",\n  rawdata$CL_ETA==19 ~ \"90-94\",\n  rawdata$CL_ETA==20 ~ \"95-99\",\n  rawdata$CL_ETA==21 ~ \"100+\")\n\nrawdata$day <- if_else(nchar(rawdata$GE)==3, as.integer(substr(rawdata$GE, 2,3)), as.integer(substr(rawdata$GE, 3,4)))\nrawdata$month <- if_else(nchar(rawdata$GE)==3, as.integer(substr(rawdata$GE, 1,1)), as.integer(substr(rawdata$GE, 1,2)))\n\n#Set missing values to NA\nrawdata$M_20 <- as.numeric(as.character(rawdata$M_20))\nrawdata$F_20 <- as.numeric(as.character(rawdata$F_20))\nrawdata$T_20 <- as.numeric(as.character(rawdata$T_20))\n\ndata <- pivot_longer(rawdata, c(10:27), names_to=c(\"sex\", \"year\"), names_sep=\"_\", values_to=\"deaths\")  \ndata$year <- as.numeric(paste0(\"20\", data$year))\ndata$date <- as.Date(paste0(data$year,\"-\", data$month, \"-\", data$day), format=\"%Y-%m-%d\")\n#Remove missing dates (weirdly the data has a load of 29th of Februarys in non-leap years)\ndata <- subset(data, !is.na(data$date))\ndata$week <- week(data$date)\n\ndata$sex <- case_when(\n  data$sex==\"M\" ~ \"Male\",\n  data$sex==\"F\" ~ \"Female\",\n  TRUE ~ \"Total\"\n)\n\ndata$sex <- factor(data$sex, levels=c(\"Male\", \"Female\", \"Total\"))\ndata$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\", \n                                      \"45-49\", \"50-54\", \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \"80-84\", \"85-89\",\n                                      \"90-94\", \"95-99\", \"100+\"))\n\n#Explore missingness in the deaths data\ntest <- as.data.frame(data)\ntest$test <- if_else(is.na(data$deaths),0,1)\n\ntest <- test %>%\n  select(date, test) %>% \n  group_by(date) %>%\n  summarise(measure=mean(test))\n\n#Looking at this, a clear jump in missingness after 31st October 2020, so censor the data here\ncut <- week(as.Date(\"2020-11-01\"))-1\n\ndata_prov <- data %>%\n  filter(sex!=\"Total\" & !(year==2020 & week>cut)) %>%\n  group_by(age, sex, year, week, NOME_REGIONE, NOME_PROVINCIA) %>%\n  summarise(deaths=sum(deaths, na.rm=TRUE))\n\ndata_reg <- data_prov %>%\n  group_by(age, sex, year, week, NOME_REGIONE) %>%\n  summarise(deaths=sum(deaths, na.rm=TRUE))\n\ndata_nat <- data_prov %>%\n  group_by(age, sex, year, week) %>%\n  summarise(deaths=sum(deaths, na.rm=TRUE))\n\n#Save national level data\nwrite.csv(data_nat, \"Data/deaths_age_Italy.csv\")\n\n#National plots\ntempdata <- data_nat %>%\n  group_by(year, week) %>%\n  summarise(deaths=sum(deaths))\n\n#Calculate 2010-19 average, min and max\nhist.data <- tempdata %>%\n  filter(year!=2020) %>%\n  group_by(week) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))\n\ntempdata <- merge(hist.data, subset(tempdata, year==2020), all.x=TRUE, all.y=TRUE)\n\n#Calculate excess deaths in 2020 vs. historic mean\nexcess <- tempdata %>%\n  filter(!is.na(deaths)) %>%\n  summarise(deaths=sum(deaths), mean=sum(mean_d))\n\nexcess$excess <- excess$deaths-excess$mean\nexcess$prop <- excess$excess/excess$mean\n\n#Overall plot\ntiff(\"Outputs/ExcessDeathsItaly.tiff\", units=\"in\", width=10, height=8, res=300)\nggplot(subset(tempdata, week<53))+\n  geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_d), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=deaths), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths recorded\")+\n  theme_classic()+\n  theme(plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  expand_limits(y=0)+\n  labs(title=\"All-cause mortality in Italy during the pandemic\",\n       subtitle=\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.<br>Data up to 31st August 2020.\",\n       caption=\"Date from ISTAT | Plot by @VictimOfMaths\")+\n  annotate(geom=\"text\", x=20, y=18000, label=paste0(\"+\", round(excess$excess, 0), \n                                                       \" more deaths in 2020 than average (+\", \n                                                       round(excess$prop*100, 0),\"%)\"), colour=\"Red\", hjust=0)+\n  annotate(geom=\"text\", x=32, y=15000, label=\"Historic maximum\", colour=\"Skyblue4\")+\n  annotate(geom=\"text\", x=32, y=10000, label=\"Historic minimum\", colour=\"Skyblue4\")+\n  annotate(geom=\"text\", x=48, y=11000, label=\"Historic mean\", colour=\"grey30\")+\n  geom_curve(aes(x=50, y=11300, xend=49, yend=12500), colour=\"grey30\", curvature=0.15,\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")\ndev.off()\n\n#Plot by sex\ntempdata.sex <- data_nat %>%\n  group_by(year, week, sex) %>%\n  summarise(deaths=sum(deaths))\n\n#Calculate 2010-19 average, min and max\nhist.data.sex <- tempdata.sex %>%\n  filter(year!=2020) %>%\n  group_by(week, sex) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))\n\ntempdata.sex <- merge(hist.data.sex, subset(tempdata.sex, year==2020), all.x=TRUE, all.y=TRUE)\n\n#Calculate excess deaths in 2020 vs. historic mean\nexcess.sex <- tempdata.sex %>%\n  filter(!is.na(deaths)) %>%\n  group_by(sex) %>%\n  summarise(deaths=sum(deaths), mean=sum(mean_d))\n\nexcess.sex$excess <- excess.sex$deaths-excess.sex$mean\nexcess.sex$prop <- excess.sex$excess/excess.sex$mean\n\nann_text <- data.frame(week=rep(cut-20.5, times=2), sex=as.factor(c(\"Male\", \"Female\")), position=c(9000,9000))\n\ntiff(\"Outputs/ExcessDeathsItalyxSex.tiff\", units=\"in\", width=10, height=8, res=300)\nggplot(subset(tempdata.sex, week<53))+\n  geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_d), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=deaths), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths recorded\")+\n  facet_wrap(~sex)+\n  theme_classic()+\n  theme(plot.subtitle =element_markdown(), strip.background=element_blank(),\n        strip.text=element_text(face=\"bold\", size=rel(1)))+\n  expand_limits(y=0)+\n  labs(title=\"Excess deaths are almost twice as high in Italian men compared to women\",\n       subtitle=\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.<br>Data up to 24th June 2020.\",\n       caption=\"Date from ISTAT | Plot by @VictimOfMaths\")+\n  geom_text(data=ann_text, aes(x=week, y=position), \n            label=c(paste0(round(excess.sex[1,4],0),\" excess deaths in 2020\\nvs. 2010-19 mean (+\", round(excess.sex[1,5]*100,0),\"%)\"),\n                    paste0(round(excess.sex[2,4],0),\" deaths (+\", round(excess.sex[2,5]*100,0),\"%)\")), colour=\"Red\", size=3.5, hjust=0)\n\ndev.off()\n\n#Plot by region\ntempdata.reg <- data_reg %>%\n  group_by(year, week, NOME_REGIONE) %>%\n  summarise(deaths=sum(deaths))\n\n#Calculate 2010-19 average, min and max\nhist.data.reg <- tempdata.reg %>%\n  filter(year!=2020) %>%\n  group_by(week, NOME_REGIONE) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths))\n\ntempdata.reg <- merge(hist.data.reg, subset(tempdata.reg, year==2020), all.x=TRUE, all.y=TRUE)\n\n#Calculate excess deaths in 2020 vs. historic mean\nexcess.reg <- tempdata.reg %>%\n  filter(!is.na(deaths)) %>%\n  group_by(NOME_REGIONE) %>%\n  summarise(deaths=sum(deaths), mean=sum(mean_d))\n\nexcess.reg$excess <- excess.reg$deaths-excess.reg$mean\nexcess.reg$prop <- excess.reg$excess/excess.reg$mean\nexcess.reg$NOME_REGIONE <- fct_reorder(excess.reg$NOME_REGIONE, -excess.reg$prop)\nexcess.reg <- arrange(excess.reg, NOME_REGIONE)\n\ntempdata.reg$NOME_REGIONE <- factor(tempdata.reg$NOME_REGIONE, levels=levels(excess.reg$NOME_REGIONE))\ntempdata.reg <- arrange(tempdata.reg, NOME_REGIONE)\n\n#labpos <- tempdata.reg$mean_d[tempdata.reg$week==cut]*1.5\nlabpos <- tempdata.reg$mean_d[tempdata.reg$week==cut]*1.5+400\n\nann_text2 <- data.frame(week=rep(22, times=20), NOME_REGIONE=as.factor(levels(tempdata.reg$NOME_REGIONE)), position=labpos)\n\ntiff(\"Outputs/ExcessDeathsItalyxReg.tiff\", units=\"in\", width=16, height=9, res=300)\nggplot(subset(tempdata.reg, week<53))+\n  geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_d), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=deaths), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths recorded\")+\n  #facet_wrap(~NOME_REGIONE, scales=\"free_y\")+\n  facet_wrap(~NOME_REGIONE)+\n  theme_classic()+\n  theme(plot.subtitle =element_markdown(), strip.background=element_blank(),\n        strip.text=element_text(face=\"bold\", size=rel(1)))+\n  expand_limits(y=0)+\n  labs(title=\"Excess deaths in Italy are very heavily concentrated in the Northern regions\",\n       subtitle=\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.<br>Data up to 24th June 2020.\",\n       caption=\"Date from ISTAT | Plot by @VictimOfMaths\")+\n  geom_text(data=ann_text2, aes(x=week, y=position), \n            label=c(paste0(round(excess.reg[1,4],0),\" excess deaths in 2020\\nvs. 2010-19 mean (+\", round(excess.reg[1,5]*100,0),\"%)\"),\n                    paste0(round(excess.reg[2,4],0),\" deaths (+\", round(excess.reg[2,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[3,4],0),\" deaths (+\", round(excess.reg[3,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[4,4],0),\" deaths (+\", round(excess.reg[4,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[5,4],0),\" deaths (+\", round(excess.reg[5,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[6,4],0),\" deaths (+\", round(excess.reg[6,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[7,4],0),\" deaths (+\", round(excess.reg[7,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[8,4],0),\" deaths (+\", round(excess.reg[8,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[9,4],0),\" deaths (\", round(excess.reg[9,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[10,4],0),\" deaths (\", round(excess.reg[10,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[11,4],0),\" deaths (\", round(excess.reg[11,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[12,4],0),\" deaths (\", round(excess.reg[12,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[13,4],0),\" deaths (\", round(excess.reg[13,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[14,4],0),\" deaths (\", round(excess.reg[14,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[15,4],0),\" deaths (\", round(excess.reg[15,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[16,4],0),\" deaths (\", round(excess.reg[16,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[17,4],0),\" deaths (\", round(excess.reg[17,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[18,4],0),\" deaths (\", round(excess.reg[18,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[19,4],0),\" deaths (\", round(excess.reg[19,5]*100,0),\"%)\"), \n                    paste0(round(excess.reg[20,4],0),\" deaths (\", round(excess.reg[20,5]*100,0),\"%)\")), \n            colour=\"Red\", size=3, hjust=0)\n\ndev.off()\n\n#Extract Lazio only\ntiff(\"Outputs/ExcessDeathsLazio.tiff\", units=\"in\", width=10, height=8, res=300)\nggplot(subset(tempdata.reg, week<53 & NOME_REGIONE==\"Lazio\"))+\n  geom_ribbon(aes(x=week, ymin=min_d, ymax=max_d), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_d, ymax=deaths), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_d), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=deaths), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths recorded\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown(), plot.title=element_markdown())+\n  expand_limits(y=0)+\n  labs(title=\"All-cause deaths in the Italian capital are <i style='color:black'>lower</i> than in previous years\",\n       subtitle=\"Weekly deaths in the Lazio region in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.<br>Data up to 31st May 2020.\",\n       caption=\"Date from ISTAT | Plot by @VictimOfMaths\")+\n  annotate(geom=\"text\", x=cut-10, y=850, label=paste0(abs(round(excess.reg[7,4], 0)), \n                                                       \" fewer deaths in 2020 than average (\", \n                                                       round(excess.reg[7,5]*100, 0),\"%)\"), colour=\"Red\", hjust=0)\n\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/AllCauseDeaths.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(paletteer)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(forcats)\r\nlibrary(ggtext)\r\n\r\n#A gold star to anyone who can make the range updates for the 3 different Excel files for E&W, Scotland & NI automatic.\r\n\r\n#Latest date in the country-specific data\r\nEWDate <- \"1st January\"\r\nScotDate <- \"3rd January\"\r\nNIDate <- \"1st January\"\r\n\r\n#Locations for latest data. Links for historical data don't move, so keep them further down\r\nEng2020 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx\"\r\nScot2020 <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-53.xlsx\"\r\n#https://data.gov.scot/coronavirus-covid-19/data.html\r\nScot2020v2 <- \"https://data.gov.scot/coronavirus-covid-19/download/Scottish%20Government%20COVID-19%20data%20(28%20October%202020).xlsx\"\r\nNI2020 <- \"https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly_Deaths.xlsx\"\r\n\r\n#Stupid Excel range controls\r\nEngRange <- \"BC\" #increment by one letter each week\r\nScotRange <- \"BC\" #\r\n#These next two bookend the range for the weeks inbetween NRS's now monthly reports\r\nScotRangev2.1 <- \"46\" #update after each new monthly report\r\nScotRangev2.2 <- \"47\" #increment by one number each week\r\nNIRange <- \"57\" #increment by one number each week\r\n\r\n#Flag weeks with an NRS report\r\nNRSweek <- TRUE\r\n\r\n#Also need to manually add the next row of data for the deaths by location at the end.\r\n\r\n####################################\r\n#Read in English & Welsh data first#\r\n####################################\r\n\r\n#The ONS published weekly all-cause deaths data into a new Excel file each week on a Tuesday here:\r\n#https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales\r\n\r\n#Start with 2020 - data up to 8th May, updated on 19th May\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2020.age.EW <- read_excel(temp, sheet=\"Weekly figures 2020\", range=paste0(\"B22:\", EngRange, \"41\"), col_names=FALSE)\r\ncolnames(data2020.age.EW) <- c(\"Age\", format(seq.Date(from=as.Date(\"2020-01-03\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2020.age.EW)-1), \"%d/%m/%y\"))\r\n\r\n#Compress age bands to match earlier years\r\ndata2020.age.EW$age <- case_when(\r\n  data2020.age.EW$Age==\"<1\" ~ \"Under 1 year\",\r\n  data2020.age.EW$Age %in% c(\"1-4\", \"5-9\", \"10-14\") ~ \"01-14\",\r\n  data2020.age.EW$Age %in% c(\"15-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\") ~ \"15-44\",\r\n  data2020.age.EW$Age %in% c(\"45-49\", \"50-54\", \"55-59\", \"60-64\") ~ \"45-64\",\r\n  data2020.age.EW$Age %in% c(\"65-69\", \"70-74\") ~ \"65-74\",\r\n  data2020.age.EW$Age %in% c(\"75-79\", \"80-84\") ~ \"75-84\",\r\n  TRUE ~ \"85+\"\r\n)\r\n\r\ndata2020.age.EW <- data2020.age.EW %>%\r\n  group_by(age) %>%\r\n  summarise_at(c(2:(ncol(data2020.age.EW)-1)), sum)\r\n\r\ndata2020.age.EW$age <- factor(data2020.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2020.age.EW <- arrange(data2020.age.EW, age)\r\n\r\n#By sex\r\ndata2020.male.EW <- read_excel(temp, sheet=\"Weekly figures 2020\", range=paste0(\"B44:\", EngRange,\"63\"), col_names=FALSE)\r\ncolnames(data2020.male.EW) <- c(\"Age\", format(seq.Date(from=as.Date(\"2020-01-03\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2020.male.EW)-1), \"%d/%m/%y\"))\r\ndata2020.male.EW$sex <- \"Male\"\r\n\r\ndata2020.female.EW <- read_excel(temp, sheet=\"Weekly figures 2020\", range=paste0(\"B66:\", EngRange, \"85\"), col_names=FALSE)\r\ncolnames(data2020.female.EW) <- c(\"Age\", format(seq.Date(from=as.Date(\"2020-01-03\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2020.female.EW)-1), \"%d/%m/%y\"))\r\ndata2020.female.EW$sex <- \"Female\"\r\n\r\ndata2020.sex.EW <- bind_rows(data2020.male.EW, data2020.female.EW)\r\n\r\n#Compress age bands to match earlier years\r\ndata2020.sex.EW$age <- case_when(\r\n  data2020.sex.EW$Age==\"<1\" ~ \"Under 1 year\",\r\n  data2020.sex.EW$Age %in% c(\"1-4\", \"5-9\", \"10-14\") ~ \"01-14\",\r\n  data2020.sex.EW$Age %in% c(\"15-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\") ~ \"15-44\",\r\n  data2020.sex.EW$Age %in% c(\"45-49\", \"50-54\", \"55-59\", \"60-64\") ~ \"45-64\",\r\n  data2020.sex.EW$Age %in% c(\"65-69\", \"70-74\") ~ \"65-74\",\r\n  data2020.sex.EW$Age %in% c(\"75-79\", \"80-84\") ~ \"75-84\",\r\n  TRUE ~ \"85+\"\r\n)\r\n\r\ndata2020.sex.EW <- data2020.sex.EW %>%\r\n  group_by(age, sex) %>%\r\n  summarise_at(c(2:(ncol(data2020.sex.EW)-2)), sum)\r\n\r\ndata2020.sex.EW$age <- factor(data2020.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2020.sex.EW$sex <- factor(data2020.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2020.sex.EW <- arrange(data2020.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2020.sex.EW <- data2020.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2020.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2020.sex.EW)\r\n\r\n#By region\r\ndata2020.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2020\", range=paste0(\"B87:\", EngRange, \"96\"), col_names=FALSE)\r\ncolnames(data2020.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2020-01-03\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2020.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2019 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2019/publishedweek522019.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2019.age.EW <- read_excel(temp, sheet=\"Weekly figures 2019\", range=\"B16:BB22\", col_names=FALSE)\r\ncolnames(data2019.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2019-01-04\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2019.age.EW)-1), \"%d/%m/%y\"))\r\ndata2019.age.EW$age <- factor(data2019.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2019.age.EW <- arrange(data2019.age.EW, age)\r\n\r\n#By sex\r\ndata2019.male.EW <- read_excel(temp, sheet=\"Weekly figures 2019\", range=\"B25:BB31\", col_names=FALSE)\r\ncolnames(data2019.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2019-01-04\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2019.male.EW)-1), \"%d/%m/%y\"))\r\ndata2019.male.EW$sex <- \"Male\"\r\n\r\ndata2019.female.EW <- read_excel(temp, sheet=\"Weekly figures 2019\", range=\"B34:BB40\", col_names=FALSE)\r\ncolnames(data2019.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2019-01-04\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2019.female.EW)-1), \"%d/%m/%y\"))\r\ndata2019.female.EW$sex <- \"Female\"\r\n\r\ndata2019.sex.EW <- bind_rows(data2019.male.EW, data2019.female.EW)\r\ndata2019.sex.EW$age <- factor(data2019.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2019.sex.EW$sex <- factor(data2019.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2019.sex.EW <- arrange(data2019.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2019.sex.EW <- data2019.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2019.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2019.sex.EW)\r\n\r\n#By region\r\ndata2019.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2019\", range=\"B43:BB52\", col_names=FALSE)\r\ncolnames(data2019.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2019-01-04\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2019.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2018 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2018/publishedweek522018withupdatedrespiratoryrow.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2018.age.EW <- read_excel(temp, sheet=\"Weekly figures 2018\", range=\"B16:BB22\", col_names=FALSE)\r\ncolnames(data2018.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2018-01-05\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2018.age.EW)-1), \"%d/%m/%y\"))\r\ndata2018.age.EW$age <- factor(data2018.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2018.age.EW <- arrange(data2018.age.EW, age)\r\n\r\n#By sex\r\ndata2018.male.EW <- read_excel(temp, sheet=\"Weekly figures 2018\", range=\"B25:BB31\", col_names=FALSE)\r\ncolnames(data2018.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2018-01-05\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2018.male.EW)-1), \"%d/%m/%y\"))\r\ndata2018.male.EW$sex <- \"Male\"\r\n\r\ndata2018.female.EW <- read_excel(temp, sheet=\"Weekly figures 2018\", range=\"B34:BB40\", col_names=FALSE)\r\ncolnames(data2018.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2018-01-05\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2018.female.EW)-1), \"%d/%m/%y\"))\r\ndata2018.female.EW$sex <- \"Female\"\r\n\r\ndata2018.sex.EW <- bind_rows(data2018.male.EW, data2018.female.EW)\r\ndata2018.sex.EW$age <- factor(data2018.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2018.sex.EW$sex <- factor(data2018.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2018.sex.EW <- arrange(data2018.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2018.sex.EW <- data2018.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2018.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2018.sex.EW)\r\n\r\n#By region\r\ndata2018.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2018\", range=\"B43:BB52\", col_names=FALSE)\r\ncolnames(data2018.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2018-01-05\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2018.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2017 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2017/publishedweek522017.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2017.age.EW <- read_excel(temp, sheet=\"Weekly figures 2017\", range=\"B16:BB22\", col_names=FALSE)\r\ncolnames(data2017.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2017-01-06\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2017.age.EW)-1), \"%d/%m/%y\"))\r\ndata2017.age.EW$age <- factor(data2017.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2017.age.EW <- arrange(data2017.age.EW, age)\r\n\r\n#By sex\r\ndata2017.male.EW <- read_excel(temp, sheet=\"Weekly figures 2017\", range=\"B25:BB31\", col_names=FALSE)\r\ncolnames(data2017.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2017-01-06\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2017.male.EW)-1), \"%d/%m/%y\"))\r\ndata2017.male.EW$sex <- \"Male\"\r\n\r\ndata2017.female.EW <- read_excel(temp, sheet=\"Weekly figures 2017\", range=\"B34:BB40\", col_names=FALSE)\r\ncolnames(data2017.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2017-01-06\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2017.female.EW)-1), \"%d/%m/%y\"))\r\ndata2017.female.EW$sex <- \"Female\"\r\n\r\ndata2017.sex.EW <- bind_rows(data2017.male.EW, data2017.female.EW)\r\ndata2017.sex.EW$age <- factor(data2017.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2017.sex.EW$sex <- factor(data2017.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2017.sex.EW <- arrange(data2017.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2017.sex.EW <- data2017.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2017.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2017.sex.EW)\r\n\r\n#By region\r\ndata2017.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2017\", range=\"B43:BB52\", col_names=FALSE)\r\ncolnames(data2017.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2017-01-06\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2017.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2016 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2016/publishedweek522016.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2016.age.EW <- read_excel(temp, sheet=\"Weekly figures 2016\", range=\"B16:BB22\", col_names=FALSE)\r\ncolnames(data2016.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2016-01-08\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2016.age.EW)-1), \"%d/%m/%y\"))\r\ndata2016.age.EW$age <- factor(data2016.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2016.age.EW <- arrange(data2016.age.EW, age)\r\n\r\n#By sex\r\ndata2016.male.EW <- read_excel(temp, sheet=\"Weekly figures 2016\", range=\"B25:BB31\", col_names=FALSE)\r\ncolnames(data2016.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2016-01-08\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2016.male.EW)-1), \"%d/%m/%y\"))\r\ndata2016.male.EW$sex <- \"Male\"\r\n\r\ndata2016.female.EW <- read_excel(temp, sheet=\"Weekly figures 2016\", range=\"B34:BB40\", col_names=FALSE)\r\ncolnames(data2016.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2016-01-08\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2016.female.EW)-1), \"%d/%m/%y\"))\r\ndata2016.female.EW$sex <- \"Female\"\r\n\r\ndata2016.sex.EW <- bind_rows(data2016.male.EW, data2016.female.EW)\r\ndata2016.sex.EW$age <- factor(data2016.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2016.sex.EW$sex <- factor(data2016.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2016.sex.EW <- arrange(data2016.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2016.sex.EW <- data2016.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2016.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2016.sex.EW)\r\n\r\n#By region\r\ndata2016.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2016\", range=\"B43:BB52\", col_names=FALSE)\r\ncolnames(data2016.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2016-01-08\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2016.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2015 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2015/publishedweek2015.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2015.age.EW <- read_excel(temp, sheet=\"Weekly Figures 2015\", range=\"A16:BB22\", col_names=FALSE)\r\ncolnames(data2015.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2015-01-02\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2015.age.EW)-1), \"%d/%m/%y\"))\r\ndata2015.age.EW$age <- factor(data2015.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2015.age.EW <- arrange(data2015.age.EW, age)\r\n\r\n#By sex\r\ndata2015.male.EW <- read_excel(temp, sheet=\"Weekly Figures 2015\", range=\"A25:BB31\", col_names=FALSE)\r\ncolnames(data2015.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2015-01-02\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2015.male.EW)-1), \"%d/%m/%y\"))\r\ndata2015.male.EW$sex <- \"Male\"\r\n\r\ndata2015.female.EW <- read_excel(temp, sheet=\"Weekly Figures 2015\", range=\"A34:BB40\", col_names=FALSE)\r\ncolnames(data2015.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2015-01-02\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2015.female.EW)-1), \"%d/%m/%y\"))\r\ndata2015.female.EW$sex <- \"Female\"\r\n\r\ndata2015.sex.EW <- bind_rows(data2015.male.EW, data2015.female.EW)\r\ndata2015.sex.EW$age <- factor(data2015.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2015.sex.EW$sex <- factor(data2015.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2015.sex.EW <- arrange(data2015.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2015.sex.EW <- data2015.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2015.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2015.sex.EW)\r\n\r\n#By region\r\ndata2015.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2015\", range=\"A43:BB52\", col_names=FALSE)\r\ncolnames(data2015.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2015-01-02\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2015.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2014 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2014/publishedweek2014.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2014.age.EW <- read_excel(temp, sheet=\"Weekly Figures 2014\", range=\"A16:BA22\", col_names=FALSE)\r\ncolnames(data2014.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2014-01-03\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2014.age.EW)-1), \"%d/%m/%y\"))\r\ndata2014.age.EW$age <- factor(data2014.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2014.age.EW <- arrange(data2014.age.EW, age)\r\n\r\n#By sex\r\ndata2014.male.EW <- read_excel(temp, sheet=\"Weekly Figures 2014\", range=\"A25:BA31\", col_names=FALSE)\r\ncolnames(data2014.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2014-01-03\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2014.male.EW)-1), \"%d/%m/%y\"))\r\ndata2014.male.EW$sex <- \"Male\"\r\n\r\ndata2014.female.EW <- read_excel(temp, sheet=\"Weekly Figures 2014\", range=\"A34:BA40\", col_names=FALSE)\r\ncolnames(data2014.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2014-01-03\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2014.female.EW)-1), \"%d/%m/%y\"))\r\ndata2014.female.EW$sex <- \"Female\"\r\n\r\ndata2014.sex.EW <- bind_rows(data2014.male.EW, data2014.female.EW)\r\ndata2014.sex.EW$age <- factor(data2014.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2014.sex.EW$sex <- factor(data2014.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2014.sex.EW <- arrange(data2014.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2014.sex.EW <- data2014.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2014.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2014.sex.EW)\r\n\r\n#By region\r\ndata2014.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2014\", range=\"A43:BA52\", col_names=FALSE)\r\ncolnames(data2014.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2014-01-03\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2014.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2013 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2013/publishedweek2013.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2013.age.EW <- read_excel(temp, sheet=\"Weekly Figures 2013\", range=\"A16:BA22\", col_names=FALSE)\r\ncolnames(data2013.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2013-01-04\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2013.age.EW)-1), \"%d/%m/%y\"))\r\ndata2013.age.EW$age <- factor(data2013.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2013.age.EW <- arrange(data2013.age.EW, age)\r\n\r\n#By sex\r\ndata2013.male.EW <- read_excel(temp, sheet=\"Weekly Figures 2013\", range=\"A25:BA31\", col_names=FALSE)\r\ncolnames(data2013.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2013-01-04\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2013.male.EW)-1), \"%d/%m/%y\"))\r\ndata2013.male.EW$sex <- \"Male\"\r\n\r\ndata2013.female.EW <- read_excel(temp, sheet=\"Weekly Figures 2013\", range=\"A34:BA40\", col_names=FALSE)\r\ncolnames(data2013.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2013-01-04\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2013.female.EW)-1), \"%d/%m/%y\"))\r\ndata2013.female.EW$sex <- \"Female\"\r\n\r\ndata2013.sex.EW <- bind_rows(data2013.male.EW, data2013.female.EW)\r\ndata2013.sex.EW$age <- factor(data2013.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2013.sex.EW$sex <- factor(data2013.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2013.sex.EW <- arrange(data2013.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2013.sex.EW <- data2013.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2013.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2013.sex.EW)\r\n\r\n#By region\r\ndata2013.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2013\", range=\"A43:BA52\", col_names=FALSE)\r\ncolnames(data2013.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2013-01-04\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2013.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2012 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2012/publishedweek2012.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2012.age.EW <- read_excel(temp, sheet=\"Weekly Figures 2012\", range=\"A16:BA22\", col_names=FALSE)\r\ncolnames(data2012.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2012-01-06\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2012.age.EW)-1), \"%d/%m/%y\"))\r\ndata2012.age.EW$age <- factor(data2012.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2012.age.EW <- arrange(data2012.age.EW, age)\r\n\r\n#By sex\r\ndata2012.male.EW <- read_excel(temp, sheet=\"Weekly Figures 2012\", range=\"A25:BA31\", col_names=FALSE)\r\ncolnames(data2012.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2012-01-06\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2012.male.EW)-1), \"%d/%m/%y\"))\r\ndata2012.male.EW$sex <- \"Male\"\r\n\r\ndata2012.female.EW <- read_excel(temp, sheet=\"Weekly Figures 2012\", range=\"A34:BA40\", col_names=FALSE)\r\ncolnames(data2012.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2012-01-06\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2012.female.EW)-1), \"%d/%m/%y\"))\r\ndata2012.female.EW$sex <- \"Female\"\r\n\r\ndata2012.sex.EW <- bind_rows(data2012.male.EW, data2012.female.EW)\r\ndata2012.sex.EW$age <- factor(data2012.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2012.sex.EW$sex <- factor(data2012.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2012.sex.EW <- arrange(data2012.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2012.sex.EW <- data2012.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2012.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2012.sex.EW)\r\n\r\n#By region\r\ndata2012.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2012\", range=\"A43:BA52\", col_names=FALSE)\r\ncolnames(data2012.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2012-01-06\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2012.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2011 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2011/publishedweek2011.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2011.age.EW <- read_excel(temp, sheet=\"Weekly Figures 2011\", range=\"A17:BA23\", col_names=FALSE)\r\ncolnames(data2011.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2011-01-07\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2011.age.EW)-1), \"%d/%m/%y\"))\r\ndata2011.age.EW$age <- factor(data2011.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2011.age.EW <- arrange(data2011.age.EW, age)\r\n\r\n#By sex\r\ndata2011.male.EW <- read_excel(temp, sheet=\"Weekly Figures 2011\", range=\"A26:BA32\", col_names=FALSE)\r\ncolnames(data2011.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2011-01-07\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2011.male.EW)-1), \"%d/%m/%y\"))\r\ndata2011.male.EW$sex <- \"Male\"\r\n\r\ndata2011.female.EW <- read_excel(temp, sheet=\"Weekly Figures 2011\", range=\"A35:BA41\", col_names=FALSE)\r\ncolnames(data2011.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2011-01-07\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2011.female.EW)-1), \"%d/%m/%y\"))\r\ndata2011.female.EW$sex <- \"Female\"\r\n\r\ndata2011.sex.EW <- bind_rows(data2011.male.EW, data2011.female.EW)\r\ndata2011.sex.EW$age <- factor(data2011.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2011.sex.EW$sex <- factor(data2011.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2011.sex.EW <- arrange(data2011.sex.EW, age, sex)\r\n\r\n#Add total rows\r\ndata2011.sex.EW <- data2011.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2011.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2011.sex.EW)\r\n\r\n#By region\r\ndata2011.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2011\", range=\"A44:BA53\", col_names=FALSE)\r\ncolnames(data2011.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2011-01-07\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2011.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#2010 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2010/publishedweek2010.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age\r\ndata2010.age.EW <- read_excel(temp, sheet=\"Weekly Figures 2010\", range=\"A16:BA22\", col_names=FALSE)\r\ncolnames(data2010.age.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2010-01-08\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2010.age.EW)-1), \"%d/%m/%y\"))\r\ndata2010.age.EW$age <- factor(data2010.age.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \r\n                                                            \"75-84\", \"85+\"))\r\ndata2010.age.EW <- arrange(data2010.age.EW, age)\r\n\r\n#By sex\r\ndata2010.male.EW <- read_excel(temp, sheet=\"Weekly Figures 2010\", range=\"A25:BA31\", col_names=FALSE)\r\ncolnames(data2010.male.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2010-01-08\"), by=\"7 days\", \r\n                                                       length.out=ncol(data2010.male.EW)-1), \"%d/%m/%y\"))\r\ndata2010.male.EW$sex <- \"Male\"\r\n\r\ndata2010.female.EW <- read_excel(temp, sheet=\"Weekly Figures 2010\", range=\"A34:BA40\", col_names=FALSE)\r\ncolnames(data2010.female.EW) <- c(\"age\", format(seq.Date(from=as.Date(\"2010-01-08\"), by=\"7 days\", \r\n                                                         length.out=ncol(data2010.female.EW)-1), \"%d/%m/%y\"))\r\ndata2010.female.EW$sex <- \"Female\"\r\n\r\ndata2010.sex.EW <- bind_rows(data2010.male.EW, data2010.female.EW)\r\ndata2010.sex.EW$age <- factor(data2010.sex.EW$age, levels=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \r\n                                                            \"65-74\", \"75-84\", \"85+\"))\r\ndata2010.sex.EW$sex <- factor(data2010.sex.EW$sex, levels=c(\"Male\", \"Female\"))\r\ndata2010.sex.EW <- arrange(data2010.sex.EW, age, age)\r\n\r\n#Add total rows\r\ndata2010.sex.EW <- data2010.sex.EW %>%\r\n  group_by(sex) %>%\r\n  summarise_at(c(2:(ncol(data2010.sex.EW)-1)), sum) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data2010.sex.EW)\r\n\r\n#By region\r\ndata2010.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2010\", range=\"A43:BA52\", col_names=FALSE)\r\ncolnames(data2010.reg.EW) <- c(\"reg\", format(seq.Date(from=as.Date(\"2010-01-08\"), by=\"7 days\", \r\n                                                      length.out=ncol(data2010.reg.EW)-1), \"%d/%m/%y\"))\r\n\r\n#Combine into overall 2010-20 datasets\r\n#For age\r\ndata_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)], \r\n                              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)], \r\n                              data2020.age.EW[,-c(1)])\r\n\r\ndata.age.EW <- gather(data_wide.age.EW, week, deaths, c(2:ncol(data_wide.age.EW)))\r\ndata.age.EW <- subset(data.age.EW, substr(data.age.EW$week,1,3)!=\"age\")\r\ndata.age.EW$deaths <- as.numeric(data.age.EW$deaths)\r\n\r\n#Add total row\r\ndata.age.EW <- data.age.EW %>%\r\n  group_by(week) %>%\r\n  summarise(deaths=sum(deaths)) %>%\r\n  mutate(age=\"Total\") %>%\r\n  bind_rows(data.age.EW)\r\n\r\ndata.age.EW$week <- as.Date(data.age.EW$week, \"%d/%m/%y\")\r\ndata.age.EW$year <- as.numeric(format(data.age.EW$week, \"%Y\"))\r\ndata.age.EW$weekno <- week(data.age.EW$week)\r\ndata.age.EW$reg <- \"England & Wales\"\r\n\r\n#For sex\r\ndata2010.sex.EW <- data2010.sex.EW %>%\r\n  select(age, everything())\r\ndata_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)], \r\n                              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)], \r\n                              data2020.sex.EW[,-c(1,ncol(data2020.sex.EW))])\r\ndata.sex.EW <- gather(data_wide.sex.EW, week, deaths, c(3:ncol(data_wide.sex.EW)))\r\ndata.sex.EW <- subset(data.sex.EW, !substr(data.sex.EW$week,1,3) %in% c(\"age\", \"sex\"))\r\ndata.sex.EW$deaths <- as.numeric(data.sex.EW$deaths)\r\ndata.sex.EW$week <- as.Date(data.sex.EW$week, \"%d/%m/%y\")\r\ndata.sex.EW$year <- as.numeric(format(data.sex.EW$week, \"%Y\"))\r\ndata.sex.EW$weekno <- week(data.sex.EW$week)\r\ndata.sex.EW$reg <- \"England & Wales\"\r\ndata.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\"))\r\n\r\n#For region\r\ndata_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)], \r\n                              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)], \r\n                              data2020.reg.EW[,-c(1)])\r\n\r\ndata.reg.EW <- gather(data_wide.reg.EW, week, deaths, c(2:ncol(data_wide.reg.EW)))\r\ndata.reg.EW <- subset(data.reg.EW, substr(data.reg.EW$week,1,3)!=\"reg\")\r\ndata.reg.EW$deaths <- as.numeric(data.reg.EW$deaths)\r\ndata.reg.EW$date <- as.Date(data.reg.EW$week, \"%d/%m/%y\")\r\ndata.reg.EW$year <- as.numeric(format(data.reg.EW$date, \"%Y\"))\r\ndata.reg.EW$weekno <- week(data.reg.EW$date)\r\ndata.reg.EW <- data.reg.EW[,-c(2)]\r\n\r\n#Tidy up\r\nrm(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,\r\n   data2011.age.EW, data2011.female.EW, data2011.male.EW, data2011.reg.EW, data2011.sex.EW,\r\n   data2012.age.EW, data2012.female.EW, data2012.male.EW, data2012.reg.EW, data2012.sex.EW,\r\n   data2013.age.EW, data2013.female.EW, data2013.male.EW, data2013.reg.EW, data2013.sex.EW,\r\n   data2014.age.EW, data2014.female.EW, data2014.male.EW, data2014.reg.EW, data2014.sex.EW,\r\n   data2015.age.EW, data2015.female.EW, data2015.male.EW, data2015.reg.EW, data2015.sex.EW,\r\n   data2016.age.EW, data2016.female.EW, data2016.male.EW, data2016.reg.EW, data2016.sex.EW,\r\n   data2017.age.EW, data2017.female.EW, data2017.male.EW, data2017.reg.EW, data2017.sex.EW,\r\n   data2018.age.EW, data2018.female.EW, data2018.male.EW, data2018.reg.EW, data2018.sex.EW,\r\n   data2019.age.EW, data2019.female.EW, data2019.male.EW, data2019.reg.EW, data2019.sex.EW,\r\n   data2020.age.EW, data2020.female.EW, data2020.male.EW, data2020.reg.EW, data2020.sex.EW)\r\n\r\n#######################\r\n#Read in Scottish data#\r\n#######################\r\n\r\n#Historic weekly deaths data for Scotland is published by National Records of Scotland\r\n\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/weekly-monthly-births-deaths-data/2020/mar/weekly-march-20.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata2004.S <- read_excel(temp, sheet=\"2004\", range=\"A6:D57\", col_names=FALSE)\r\ndata2005.S <- read_excel(temp, sheet=\"2005\", range=\"A6:D58\", col_names=FALSE)\r\ndata2006.S <- read_excel(temp, sheet=\"2006\", range=\"A6:D57\", col_names=FALSE)\r\ndata2007.S <- read_excel(temp, sheet=\"2007\", range=\"A6:D57\", col_names=FALSE)\r\ndata2008.S <- read_excel(temp, sheet=\"2008\", range=\"A6:D57\", col_names=FALSE)\r\ndata2009.S <- read_excel(temp, sheet=\"2009\", range=\"A6:D57\", col_names=FALSE)\r\ndata2010.S <- read_excel(temp, sheet=\"2010\", range=\"A6:D57\", col_names=FALSE)\r\ndata2011.S <- read_excel(temp, sheet=\"2011\", range=\"A6:D58\", col_names=FALSE)\r\ndata2012.S <- read_excel(temp, sheet=\"2012\", range=\"A6:D57\", col_names=FALSE)\r\ndata2013.S <- read_excel(temp, sheet=\"2013\", range=\"A6:D57\", col_names=FALSE)\r\ndata2014.S <- read_excel(temp, sheet=\"2014\", range=\"A6:D57\", col_names=FALSE)\r\ndata2015.S <- read_excel(temp, sheet=\"2015 \", range=\"A6:D58\", col_names=FALSE)\r\ndata2016.S <- read_excel(temp, sheet=\"2016\", range=\"E6:G57\", col_names=FALSE)\r\ndata2017.S <- read_excel(temp, sheet=\"2017\", range=\"E6:G57\", col_names=FALSE)\r\ndata2018.S <- read_excel(temp, sheet=\"2018\", range=\"E6:G57\", col_names=FALSE)\r\ndata2019.S <- read_excel(temp, sheet=\"2019\", range=\"E6:G57\", col_names=FALSE)\r\n\r\n#Weekly data for 2020 is published in a different Excel file each week on a Wednesday,\r\n#so need to update the link each time from this page https://www.nrscotland.gov.uk/covid19stats\r\n#Need to manually update the cell range when reading data in.\r\n\r\n#Take 2020 data from dedicated COVID-19 page, which is updated more regularly\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Scot2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ndata2020.S <- data.frame(t(read_excel(temp, sheet=\"Table 2 \", range=paste0(\"C6:\", ScotRange, \"7\"), col_names=FALSE))[,c(2)])\r\ndate <- data.frame(date=format(seq.Date(from=as.Date(\"2019-12-30\"), by=\"7 days\", length.out=nrow(data2020.S)), \"%d/%m/%y\"))\r\ndata2020.S <- cbind(date, data2020.S)\r\ncolnames(data2020.S) <- c(\"date\", \"deaths\")\r\ndata2020.S$date <- as.Date(data2020.S$date, \"%d/%m/%y\")\r\ndata2020.S$weekno <- week(data2020.S$date)\r\n\r\n#Stick together 2004-15 which share the same structure\r\ndata0415.S <- bind_rows(data2004.S, data2005.S, data2006.S, data2007.S, data2008.S, data2009.S, data2010.S, \r\n                        data2011.S, data2012.S, data2013.S, data2014.S, data2015.S)\r\ncolnames(data0415.S) <- c(\"weekno\", \"date\", \"births\", \"deaths\")\r\ndata0415.S$date <- as.Date(data0415.S$date)\r\n\r\n#Then 2016-19 data\r\ndata1619.S <- bind_rows(data2016.S, data2017.S, data2018.S, data2019.S)\r\ncolnames(data1619.S) <- c(\"weekno\", \"date\", \"deaths\")\r\ndata1619.S$date <- as.Date(data1619.S$date)\r\n\r\ndata.S <- bind_rows(data0415.S, data1619.S, data2020.S)\r\n\r\n#Recalculate dates to align with ONS data (which uses week to, not w/c)\r\ndata.S$date <- data.S$date+days(6)\r\n\r\ndata.S$weekno <- week(data.S$date)\r\ndata.S$year <- year(data.S$date)\r\ndata.S$reg <- \"Scotland\"\r\ndata.S <- data.S[,-c(3)]\r\n\r\nif(NRSweek==FALSE){\r\n  #NRS stopped publishing detailed weekly deaths data after week 32, \r\n  #so get data after that from elsewhere:\r\n  #https://data.gov.scot/coronavirus-covid-19/data.html\r\n  temp <- tempfile()\r\n  temp <- curl_download(url=Scot2020v2, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n  data.Sv2 <- read_excel(temp, sheet=\"2.2_excess\", range=paste0(\"A\", ScotRangev2.1,\":C\", ScotRangev2.2), col_names=FALSE)\r\n  colnames(data.Sv2) <- c(\"weekno\", \"date\", \"deaths\")\r\n  data.Sv2$date <- data.Sv2$date+days(6)\r\n  data.Sv2$year <- rep(2020, times=length(data.Sv2$weekno))\r\n  data.Sv2$reg <- rep(\"Scotland\", times=length(data.Sv2$weekno))\r\n  \r\n  data.S <- bind_rows(data.S, data.Sv2)\r\n  rm(data.Sv2)\r\n}\r\n\r\n#Tidy up\r\nrm(date, data2004.S, data2005.S, data2006.S, data2007.S, data2008.S, data2009.S, data2010.S, data2011.S, \r\n   data2012.S, data2013.S, data2014.S, data2015.S, data2016.S, data2017.S, data2018.S, data2019.S, \r\n   data2020.S, data0415.S, data1619.S)\r\n\r\n#############################\r\n#Read in Northern Irish data#\r\n#############################\r\n\r\n#NI data from NISRA is published to the same Excel file (so no need to update link) each Friday\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=NI2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ndata2020.NI <- read_excel(temp, sheet=\"Table 1\", range=paste0(\"B6:C\", NIRange), col_names=FALSE)\r\ncolnames(data2020.NI) <- c(\"date\", \"deaths\")\r\n\r\ntemp <- tempfile()\r\nsource <- \"https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly%20Deaths%20by%20Age%20and%20Respiratory%20Deaths%2C%202011-2019.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ndata2019.NI <- read_excel(temp, sheet=\"Weekly Deaths_2019\", range=\"C5:D56\", col_names=FALSE)\r\ncolnames(data2019.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2018.NI <- read_excel(temp, sheet=\"Weekly Deaths_2018\", range=\"C5:D56\", col_names=FALSE)\r\ncolnames(data2018.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2017.NI <- read_excel(temp, sheet=\"Weekly Deaths_2017\", range=\"C5:D57\", col_names=FALSE)\r\ncolnames(data2017.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2016.NI <- read_excel(temp, sheet=\"Weekly Deaths_2016\", range=\"C5:D56\", col_names=FALSE)\r\ncolnames(data2016.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2015.NI <- read_excel(temp, sheet=\"Weekly Deaths_2015\", range=\"C5:D57\", col_names=FALSE)\r\ncolnames(data2015.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2014.NI <- read_excel(temp, sheet=\"Weekly Deaths_2014\", range=\"C5:D56\", col_names=FALSE)\r\ncolnames(data2014.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2013.NI <- read_excel(temp, sheet=\"Weekly Deaths_2013\", range=\"C5:D56\", col_names=FALSE)\r\ncolnames(data2013.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2012.NI <- read_excel(temp, sheet=\"Weekly Deaths_2012\", range=\"C5:D56\", col_names=FALSE)\r\ncolnames(data2012.NI) <- c(\"date\", \"deaths\")\r\n\r\ndata2011.NI <- read_excel(temp, sheet=\"Weekly Deaths_2011\", range=\"C5:D56\", col_names=FALSE)\r\ncolnames(data2011.NI) <- c(\"date\", \"deaths\")\r\n\r\n\r\ndata.NI <- bind_rows(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI, data2016.NI, \r\n                     data2017.NI, data2018.NI, data2019.NI, data2020.NI)\r\ndata.NI$date <- as.Date(data.NI$date)\r\n\r\ndata.NI$weekno <- week(data.NI$date)\r\ndata.NI$year <- year(data.NI$date)\r\ndata.NI$reg <- \"Northern Ireland\"\r\n\r\n#Tidy up\r\nrm(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI, data2016.NI, data2017.NI,\r\n   data2018.NI, data2019.NI, data2020.NI)\r\n\r\n#Stick regional data together for whole of UK\r\ndata.reg.UK <- bind_rows(data.reg.EW, data.S, data.NI)\r\n\r\n#Temporary hack until I work out a propoer solution for the 2020-201 bridge\r\ndata.reg.UK <- data.reg.UK %>% \r\n  mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),\r\n         year=if_else(year==2021, 2020, year))\r\n\r\ndata.age.EW <- data.age.EW %>% \r\n  mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),\r\n         year=if_else(year==2021, 2020, year))\r\n\r\ndata.sex.EW <- data.sex.EW %>% \r\n  mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),\r\n         year=if_else(year==2021, 2020, year))\r\n\r\ndata.reg.EW <- data.reg.EW %>% \r\n  mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),\r\n         year=if_else(year==2021, 2020, year))\r\n\r\ndata.S <- data.S %>% \r\n  mutate(weekno=if_else(year==2021 & weekno==1, 53, weekno),\r\n         year=if_else(year==2021, 2020, year))\r\n\r\ndata.NI <- data.NI %>% \r\n  mutate(weekno=if_else(year==2021 & weekno==1, 53, as.double(weekno)),\r\n         year=if_else(year==2021, 2020, as.double(year)))\r\n\r\n#Pull out latest week numbers for label placement\r\nEWmaxweek <- max(subset(data.reg.UK, reg==\"London\" & year==2020)$weekno)\r\nScotmaxweek <- max(subset(data.reg.UK, reg==\"Scotland\" & year==2020)$weekno)\r\nNImaxweek <- max(subset(data.reg.UK, reg==\"Northern Ireland\" & year==2020)$weekno)\r\n\r\n\r\n###########\r\n#Save data#\r\n###########\r\n\r\n#E&W data by age\r\nwrite.csv(data.age.EW, \"Data/deaths_age_EW.csv\")\r\n#E&W data by sex\r\nwrite.csv(data.sex.EW, \"Data/deaths_sex_EW.csv\")\r\n#UK data by region\r\nwrite.csv(data.reg.UK, \"Data/deaths_reg_UK.csv\")\r\n\r\n################\r\n#E&W only plots#\r\n################\r\n\r\n#Overall plot\r\n\r\n#Extract max/min values\r\n#split off 2020 data\r\ndata.age.EW.new <- subset(data.age.EW, year==2020 & age==\"Total\")\r\ndata.age.EW.old <- subset(data.age.EW, year<2020 & age==\"Total\")\r\n\r\ndata.age.EW.old <- data.age.EW.old %>%\r\n  group_by(weekno, reg) %>%\r\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\r\n\r\ndata.age.EW.new <- merge(data.age.EW.new, data.age.EW.old, by=c(\"weekno\"))\r\n\r\n#Calculate excess deaths vs. mean so far this year\r\ndata.age.EW.new$excess <- data.age.EW.new$deaths-data.age.EW.new$mean\r\nEW.excess <- data.age.EW.new %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract y=axis placement for excess deaths figure\r\nlabpos <- 14000\r\n\r\ntiff(\"Outputs/ONSWeeklyDeaths.tiff\", units=\"in\", width=10, height=8, res=300)\r\nggplot()+\r\n  geom_ribbon(data=data.age.EW.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.age.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.age.EW.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.age.EW.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"All-cause deaths in England & Wales are still higher than 'normal'\",\r\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \".\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=22, y=labpos, label=paste0(\"+\", round(EW.excess$excess, 0), \r\n                                                     \" more deaths in 2020 than average (+\", \r\n                                                     round(EW.excess$percexcess*100, 0),\"%)\"), colour=\"Red\", hjust=0)+\r\n  annotate(geom=\"text\", x=9, y=13600, label=\"Historic maximum\", colour=\"Skyblue4\")+\r\n  annotate(geom=\"text\", x=9, y=9100, label=\"Historic minimum\", colour=\"Skyblue4\")+\r\n  annotate(geom=\"text\", x=48, y=8800, label=\"Historic mean\", colour=\"grey30\")+\r\n  geom_curve(aes(x=48, y=9000, xend=47, yend=9800), colour=\"grey30\", curvature=0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  theme(plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))\r\n\r\ndev.off()  \r\n\r\n#Plot by sex\r\n\r\n#Extract max/min values\r\n#split off 2020 data\r\ndata.sex.EW.new <- subset(data.sex.EW, year==2020 & age==\"Total\")\r\ndata.sex.EW.old <- subset(data.sex.EW, year<2020 & age==\"Total\")\r\n\r\ndata.sex.EW.old <- data.sex.EW.old %>%\r\n  group_by(weekno, sex) %>%\r\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\r\n\r\ndata.sex.EW.new <- merge(data.sex.EW.new, data.sex.EW.old, by=c(\"weekno\", \"sex\"))\r\n\r\n#Calculate excess deaths vs. mean so far this year\r\ndata.sex.EW.new$excess <- data.sex.EW.new$deaths-data.sex.EW.new$mean\r\nsex.EW.excess <- data.sex.EW.new %>%\r\n  group_by(sex) %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract label positions for excess deaths\r\nlabpos <-  data.sex.EW.new %>%\r\n  filter(weekno==EWmaxweek) %>%\r\n  group_by(sex) %>%\r\n  summarise(pos=max(deaths, max+1000))\r\n\r\n\r\nann_text1 <- data.frame(weekno=rep(26, times=2), deaths=labpos$pos, sex=c(\"Male\", \"Female\"))\r\n\r\ntiff(\"Outputs/ONSWeeklyDeathsxSex.tiff\", units=\"in\", width=12, height=8, res=300)\r\nggplot()+\r\n  geom_ribbon(data=data.sex.EW.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.sex.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.sex.EW.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.sex.EW.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  facet_wrap(~sex)+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"Excess deaths are currently higher among men\",\r\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \".\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  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 (+\",\r\n                                                                    round(sex.EW.excess[1,4]*100, 0),\"%)\"), \r\n                                                             paste0(\"+\", round(sex.EW.excess[2,2],0),\" deaths (+\",\r\n                                                                    round(sex.EW.excess[2,4]*100, 0),\"%)\")), \r\n            size=3, colour=c(\"Red\", \"Red\"), hjust=0)\r\ndev.off()  \r\n\r\n#By sex and age\r\n\r\n#Extract max/min values\r\n#split off 2020 data\r\ndata.sex.age.EW.new <- subset(data.sex.EW, year==2020 & !age %in% c(\"Total\", \"Under 1 year\", \"01-14\", \"15-44\"))\r\ndata.sex.age.EW.old <- subset(data.sex.EW, year<2020 & !age %in% c(\"Total\", \"Under 1 year\", \"01-14\", \"15-44\"))\r\n\r\ndata.sex.age.EW.old <- data.sex.age.EW.old %>%\r\n  group_by(weekno, sex, age) %>%\r\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\r\n\r\ndata.sex.age.EW.new <- merge(data.sex.age.EW.new, data.sex.age.EW.old, by=c(\"weekno\", \"sex\", \"age\"))\r\n\r\n#Calculate excess deaths vs. mean so far this year\r\ndata.sex.age.EW.new$excess <- data.sex.age.EW.new$deaths-data.sex.age.EW.new$mean\r\nsex.age.EW.excess <- data.sex.age.EW.new %>%\r\n  group_by(sex, age) %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract label positions for excess deaths\r\nlabpos <-  data.sex.age.EW.new %>%\r\n  filter(weekno==EWmaxweek) %>%\r\n  group_by(sex, age) %>%\r\n  summarise(pos=max(deaths, max+500))\r\n\r\nann_text2 <- data.frame(weekno=rep(25, times=8), deaths=labpos$pos, \r\n                        sex=rep(c(\"Male\", \"Female\"), each=4), \r\n                        age=rep(c(\"45-64\", \"65-74\", \"75-84\", \"85+\"), times=2))\r\n\r\ntiff(\"Outputs/ONSWeeklyDeathsxSexxAge.tiff\", units=\"in\", width=12, height=8, res=300)\r\nggplot()+\r\n  geom_ribbon(data=data.sex.age.EW.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.sex.age.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.sex.age.EW.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.sex.age.EW.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  facet_grid(age~sex)+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"Excess deaths are clearest among men over 75\",\r\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \".\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  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 (+\",\r\n                                                                    round(sex.age.EW.excess[1,5]*100, 0),\"%)\"), \r\n                                                             paste0(\"+\", round(sex.age.EW.excess[2,3],0),\" deaths (+\",\r\n                                                                    round(sex.age.EW.excess[2,5]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(sex.age.EW.excess[3,3],0),\" deaths (+\",\r\n                                                                    round(sex.age.EW.excess[3,5]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(sex.age.EW.excess[4,3],0),\" deaths (+\",\r\n                                                                    round(sex.age.EW.excess[4,5]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(sex.age.EW.excess[5,3],0),\" deaths (+\",\r\n                                                                    round(sex.age.EW.excess[5,5]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(sex.age.EW.excess[6,3],0),\" deaths (+\",\r\n                                                                    round(sex.age.EW.excess[6,5]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(sex.age.EW.excess[7,3],0),\" deaths (+\",\r\n                                                                    round(sex.age.EW.excess[7,5]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(sex.age.EW.excess[8,3],0),\" deaths (+\",\r\n                                                                    round(sex.age.EW.excess[8,5]*100, 0),\"%)\")),\r\n            size=3, colour=rep(\"red\", times=8), hjust=0)\r\n\r\ndev.off()  \r\n\r\n#Plot by age\r\n\r\n#Compress age groups under 45\r\ndata.age.EW$age2 <- case_when(\r\n  data.age.EW$age %in% c(\"Under 1 year\", \"01-14\", \"15-44\") ~ \"Under 45\",\r\n  data.age.EW$age!=\"Total\" ~ data.age.EW$age\r\n)\r\n\r\ndata.age.EW$age2 <- factor(data.age.EW$age2, levels=c(\"Under 45\", \"45-64\", \"65-74\", \"75-84\", \"85+\"))\r\n\r\ndata.age.EW <- data.age.EW %>%\r\n  group_by(weekno, age2, year) %>%\r\n  mutate(deaths=sum(deaths))\r\n\r\n#Extract max/min values\r\n#split off 2020 data\r\ndata.age.EW.new <- subset(data.age.EW, year==2020 & !is.na(age2))\r\ndata.age.EW.old <- subset(data.age.EW, year<2020 & !is.na(age2))\r\n\r\ndata.age.EW.old <- data.age.EW.old %>%\r\n  group_by(weekno, age2) %>%\r\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\r\n\r\ndata.age.EW.new <- merge(data.age.EW.new, data.age.EW.old, by=c(\"weekno\", \"age2\"))\r\n\r\n#Calculate excess deaths vs. mean so far this year\r\ndata.age.EW.new$excess <- data.age.EW.new$deaths-data.age.EW.new$mean\r\nage.EW.excess <- data.age.EW.new %>%\r\n  group_by(age2) %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract label positions for excess deaths\r\nlabpos <-  data.age.EW.new %>%\r\n  filter(weekno==EWmaxweek) %>%\r\n  group_by(age2) %>%\r\n  summarise(pos=max(mean+(deaths-mean)/1.4, max+600))\r\n\r\n#Manually adjust up Under45s label to handle text wrapping\r\nlabpos[1,2] <- labpos[1,2]+500\r\n\r\nann_text3 <- data.frame(weekno=rep(26, times=5), deaths=labpos$pos, \r\n                        age2=c(\"Under 45\", \"45-64\", \"65-74\", \"75-84\", \"85+\")) %>% \r\n  mutate(age2=factor(age2, levels=c(\"Under 45\", \"45-64\", \"65-74\", \"75-84\", \"85+\")))\r\n\r\ntiff(\"Outputs/ONSWeeklyDeathsxAge.tiff\", units=\"in\", width=12, height=8, res=300)\r\nggplot()+\r\n  geom_ribbon(data=data.age.EW.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.age.EW.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.age.EW.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.age.EW.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  facet_wrap(~age2)+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"All-cause mortality remains further above 'normal' in the oldest age groups\",\r\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \".\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  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 (\",\r\n                                                                    round(age.EW.excess[1,4]*100, 1),\"%)\"), \r\n                                                             paste0(\"+\", round(age.EW.excess[2,2],0),\" deaths (+\",\r\n                                                                    round(age.EW.excess[2,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(age.EW.excess[3,2],0),\" deaths (+\",\r\n                                                                    round(age.EW.excess[3,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(age.EW.excess[4,2],0),\" deaths (+\",\r\n                                                                    round(age.EW.excess[4,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(age.EW.excess[5,2],0),\" deaths (+\",\r\n                                                                    round(age.EW.excess[5,4]*100, 0),\"%)\")), \r\n            size=3, colour=rep(\"red\", times=5), hjust=0)\r\n\r\ndev.off()  \r\n\r\n###################\r\n#Plot for Scotland#\r\n###################\r\n#Overall plot\r\n\r\n#Extract max/min values\r\n#split off 2020 data\r\ndata.S.new <- subset(data.S, year>=2020)\r\ndata.S.old <- subset(data.S, year<2020 & year>=2010)\r\n\r\ndata.S.old <- data.S.old %>%\r\n  group_by(weekno) %>%\r\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\r\n\r\ndata.S.new <- merge(data.S.new, data.S.old, by=c(\"weekno\"))\r\n\r\n#Calculate excess deaths vs. mean so far this year\r\ndata.S.new$excess <- data.S.new$deaths-data.S.new$mean\r\nS.excess <- data.S.new %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract y=axis placement for excess deaths figure\r\nlabpos <- 1700\r\n\r\ntiff(\"Outputs/NRSWeeklyDeaths.tiff\", units=\"in\", width=10, height=8, res=300)\r\nggplot()+\r\n  geom_ribbon(data=data.S.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.S.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.S.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.S.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"All-cause deaths in Scotland have stayed within 'normal' levels\",\r\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", ScotDate, \".\"),\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=22, y=labpos, label=paste0(round(S.excess$excess, 0), \r\n                                                     \" more deaths in 2020 than average (+\", round(S.excess$percexcess*100, 0),\"%)\"), colour=\"Red\", hjust=0)+\r\n  annotate(geom=\"text\", x=30, y=1150, label=\"Historic maximum\", colour=\"Skyblue4\")+\r\n  annotate(geom=\"text\", x=30, y=800, label=\"Historic minimum\", colour=\"Skyblue4\")+\r\n  annotate(geom=\"text\", x=48, y=850, label=\"Historic mean\", colour=\"grey30\")+\r\n  geom_curve(aes(x=48, y=900, xend=47, yend=1050), colour=\"grey30\", curvature=0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  theme(plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))\r\n\r\ndev.off()  \r\n\r\n###########################\r\n#Plot for Northern Ireland#\r\n###########################\r\n#Overall plot\r\n\r\n#Extract max/min values\r\n#split off 2020 data\r\ndata.NI.new <- subset(data.NI, year==2020)\r\ndata.NI.old <- subset(data.NI, year<2020)\r\n\r\ndata.NI.old <- data.NI.old %>%\r\n  group_by(weekno) %>%\r\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\r\n\r\ndata.NI.new <- merge(data.NI.new, data.NI.old, by=c(\"weekno\"))\r\n\r\n\r\n#Calculate excess deaths vs. mean so far this year\r\ndata.NI.new$excess <- data.NI.new$deaths-data.NI.new$mean\r\nNI.excess <- data.NI.new %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract y=axis placement for excess deaths figure\r\nlabpos <- max(data.NI.new$mean[data.NI.new$weekno==NImaxweek]+(data.NI.new$deaths[data.NI.new$weekno==NImaxweek]-\r\n                                                                 data.NI.new$mean[data.NI.new$weekno==NImaxweek])/1.4, 400)\r\n\r\n\r\ntiff(\"Outputs/NISRAWeeklyDeaths.tiff\", units=\"in\", width=10, height=8, res=300)\r\nggplot()+\r\n  geom_ribbon(data=data.NI.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.NI.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.NI.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.NI.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"Deaths in Northern Ireland are still above average\",\r\n       subtitle=paste0(\"Weekly all-cause deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2011-19</span>. Data up to \", NIDate, \".\"),\r\n       caption=\"Data from NISRA | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=23, y=labpos, label=paste0(round(NI.excess$excess, 0), \r\n                                                     \" more deaths in 2020 than average (+\", \r\n                                                     round(NI.excess$percexcess*100, 0),\"%)\"), \r\n           colour=\"Red\", hjust=0)+\r\n  annotate(geom=\"text\", x=30, y=320, label=\"Historic maximum\", colour=\"Skyblue4\")+\r\n  annotate(geom=\"text\", x=30, y=160, label=\"Historic minimum\", colour=\"Skyblue4\")+\r\n  annotate(geom=\"text\", x=47, y=220, label=\"Historic mean\", colour=\"grey30\")+\r\n  geom_curve(aes(x=48, y=230, xend=47, yend=285), colour=\"grey30\", curvature=0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  theme(plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.5)))\r\n\r\ndev.off()  \r\n\r\n###############################\r\n#Plots for the whole of the UK#\r\n###############################\r\n\r\n#Extract max/min values\r\n#split off 2020 data\r\ndata.reg.UK.new <- subset(data.reg.UK, year==2020)\r\ndata.reg.UK.old <- subset(data.reg.UK, year<2020 & year>=2010)\r\n\r\ndata.reg.UK.old <- data.reg.UK.old %>%\r\n  group_by(weekno, reg) %>%\r\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\r\n\r\ndata.reg.UK.new <- merge(data.reg.UK.new, data.reg.UK.old, by=c(\"weekno\", \"reg\"))\r\n\r\n#Calculate excess deaths vs. mean so far this year\r\ndata.reg.UK.new$excess <- data.reg.UK.new$deaths-data.reg.UK.new$mean\r\nreg.UK.excess <- data.reg.UK.new %>%\r\n  group_by(reg) %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\ndata.reg.UK.new <- data.reg.UK.new %>%\r\n  group_by(reg) %>%\r\n  mutate(maxexcess=max(excess))\r\n\r\ndata.reg.UK.new$reg <- fct_reorder(data.reg.UK.new$reg, -data.reg.UK.new$maxexcess)\r\ndata.reg.UK.old$reg <- factor(data.reg.UK.old$reg, levels=levels(data.reg.UK.new$reg))\r\n\r\nreg.UK.excess$reg <-factor(reg.UK.excess$reg, levels=levels(data.reg.UK.new$reg))\r\nreg.UK.excess <- arrange(reg.UK.excess, reg.UK.excess$reg)\r\n\r\n#Extract label positions for excess deaths\r\nlabpos <-  data.reg.UK.new %>%\r\n  filter(weekno==case_when(\r\n    reg==\"Scotland\" ~ if_else(Scotmaxweek<EWmaxweek, Scotmaxweek, EWmaxweek),\r\n    reg==\"Northern Ireland\" ~ if_else(NImaxweek<EWmaxweek, NImaxweek, EWmaxweek),\r\n    TRUE ~EWmaxweek)) %>%\r\n  group_by(reg) %>%\r\n  summarise(pos=max(mean+(deaths-mean)/1.6, max+800))\r\n\r\n#Sort out subtitle\r\nsubtitle <- ifelse(EWDate==NIDate, paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.<br>England, Wales and Northern Ireland data to \", EWDate, \".<br>Scotland data to \", ScotDate, \".\"),\r\n                   paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span><br>England and Wales data to \",  EWDate, \".<br>Northern Ireland data to \", NIDate, \".<br>Scotland data to \", ScotDate, \".\"))\r\n\r\n#Add labels to each facet w/ excess deaths\r\nann_text4 <- data.frame(weekno=rep(24, times=12), deaths=labpos$pos, reg=unique(labpos$reg))\r\n\r\nRegPlot <- ggplot()+\r\n  geom_ribbon(data=data.reg.UK.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.reg.UK.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.reg.UK.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.reg.UK.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  facet_wrap(~reg)+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"Regional variation in all-cause mortality in the UK\",\r\n       subtitle=subtitle,\r\n       caption=\"Data from ONS, NRS & NISRA | Plot by @VictimOfMaths\")+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  geom_text(data=ann_text4, aes(x=weekno, y=deaths), label=c(paste0(round(reg.UK.excess[1,2], 0), \r\n                                                                    \" excess deaths in 2020\\nvs. 2010-19 average (+\", \r\n                                                                    round(reg.UK.excess[1,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[2,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[2,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[3,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[3,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[4,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[4,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[5,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[5,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[6,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[6,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[7,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[7,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[8,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[8,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[9,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[9,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[10,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[10,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[11,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[11,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[12,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[12,4]*100, 0),\"%)\")),\r\n            size=3, colour=\"Red\", hjust=0)\r\n\r\ntiff(\"Outputs/ONSNRSNISRAWeeklyDeathsxReg.tiff\", units=\"in\", width=12, height=9, res=300)\r\nRegPlot\r\ndev.off() \r\n\r\npng(\"Outputs/ONSNRSNISRAWeeklyDeathsxReg.png\", units=\"in\", width=12, height=9, res=300)\r\nRegPlot\r\ndev.off() \r\n\r\nRegPlot2 <- ggplot()+\r\n  geom_ribbon(data=data.reg.UK.old, aes(x=weekno, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(data=data.reg.UK.new, aes(x=weekno, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(data=data.reg.UK.old, aes(x=weekno, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(data=data.reg.UK.new, aes(x=weekno, y=deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  facet_wrap(~reg, scales=\"free_y\")+\r\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  expand_limits(y=0)+\r\n  labs(title=\"Regional variation in all-cause mortality in the UK\",\r\n       subtitle=subtitle,\r\n       caption=\"Data from ONS, NRS & NISRA | Plot by @VictimOfMaths\")+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  geom_text(data=ann_text4, aes(x=weekno, y=deaths), label=c(paste0(round(reg.UK.excess[1,2], 0), \r\n                                                                    \" excess deaths in 2020\\nvs. 2010-19 average (+\", \r\n                                                                    round(reg.UK.excess[1,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[2,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[2,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[3,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[3,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[4,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[4,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[5,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[5,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[6,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[6,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[7,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[7,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[8,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[8,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[9,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[9,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[10,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[10,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[11,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[11,4]*100, 0),\"%)\"),\r\n                                                             paste0(\"+\", round(reg.UK.excess[12,2], 0), \r\n                                                                    \" deaths (+\", \r\n                                                                    round(reg.UK.excess[12,4]*100, 0),\"%)\")),\r\n            size=3, colour=\"Red\", hjust=0)\r\n\r\ntiff(\"Outputs/ONSNRSNISRAWeeklyDeathsxReg2.tiff\", units=\"in\", width=13, height=9, res=300)\r\nRegPlot2\r\ndev.off() \r\n\r\n#Generate cumulative death counts by year\r\ndata.reg.UK <- data.reg.UK %>%\r\n  group_by(reg, year) %>%\r\n  arrange(reg, year, weekno) %>% \r\n  mutate(cumul_deaths=cumsum(deaths))\r\n\r\nann_text5 <- data.frame(weekno=EWmaxweek, \r\n                        cumul_deaths=data.reg.UK$cumul_deaths[data.reg.UK$reg==\"London\" & data.reg.UK$weekno==EWmaxweek & data.reg.UK$year==2020]+5000, \r\n                        reg=\"London\")\r\n\r\ntiff(\"Outputs/ONSNRSNISRAWeeklyCumulDeaths_reg.tiff\", units=\"in\", width=12, height=8, res=300)\r\nggplot()+\r\n  geom_line(data=subset(data.reg.UK, year!=2020 & year>=2010), aes(x=weekno, y=cumul_deaths, group=as.factor(year)), colour=\"Grey80\")+\r\n  geom_line(data=subset(data.reg.UK, year==2020), aes(x=weekno, y=cumul_deaths), colour=\"Red\")+\r\n  theme_classic()+\r\n  facet_wrap(~reg)+\r\n  facet_wrap(~reg)+\r\n  scale_x_continuous(name=\"Week number\")+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\"),\r\n        plot.title =element_markdown())+\r\n  labs(title=\"Cumulative deaths from all causes in <span style='color:red;'>2020</span> compared to <span style='color:Grey60;'>the range in 2010-19</span>\",\r\n       caption=\"Data from ONS, NRS & NISRA | Plot by @VictimOfMaths\")+\r\n  geom_text(data=ann_text5, aes(x=weekno, y=cumul_deaths), label=c(\"2020\"), size=3, colour=\"Red\")\r\ndev.off()\r\n\r\n###############################################################\r\n#Plot similar charts for death by location for England & Wales#\r\n###############################################################\r\n\r\n#Read in historic average deaths by place\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/11622fiveyearaverageweeklydeathsbyplaceofdeathenglandandwalesdeathsoccurringbetween2015and2019/fiveyearavgweeklydeaths2015to2019podfinal.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ndata1519 <- read_excel(temp, sheet=\"Table\", range=\"A4:G56\")\r\ndata1519$week <- as.numeric(substr(data1519$...1, 6,7))\r\ndata1519_long <- gather(data1519, location, deaths, c(2:7))[,-c(1)]\r\ndata1519_long$year <- \"hist\"\r\n\r\n#Read in 2020 figures, which are formatted in a *hideous* way, thanks ONS\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ntemp1 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"A9:B14\", col_names=FALSE)))\r\ntemp2 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"H9:H14\", col_names=FALSE)))\r\ntemp3 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"N9:N14\", col_names=FALSE)))\r\ntemp4 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"T9:T14\", col_names=FALSE)))\r\ntemp5 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"Z9:Z14\", col_names=FALSE)))\r\ntemp6 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AF9:AF14\", col_names=FALSE)))\r\ntemp7 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AL9:AL14\", col_names=FALSE)))\r\ntemp8 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AR9:AR14\", col_names=FALSE)))\r\ntemp9 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AX9:AX14\", col_names=FALSE)))\r\ntemp10 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BD9:BD14\", col_names=FALSE)))\r\ntemp11 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BJ9:BJ14\", col_names=FALSE)))\r\ntemp12 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BP9:BP14\", col_names=FALSE)))\r\ntemp13 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BV9:BV14\", col_names=FALSE)))\r\ntemp14 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CB9:CB14\", col_names=FALSE)))\r\ntemp15 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CH9:CH14\", col_names=FALSE)))\r\ntemp16 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CN9:CN14\", col_names=FALSE)))\r\ntemp17 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CT9:CT14\", col_names=FALSE)))\r\ntemp18 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CZ9:CZ14\", col_names=FALSE)))\r\ntemp19 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DF9:DF14\", col_names=FALSE)))\r\ntemp20 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DL9:DL14\", col_names=FALSE)))\r\ntemp21 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DR9:DR14\", col_names=FALSE)))\r\ntemp22 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DX9:DX14\", col_names=FALSE)))\r\ntemp23 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"ED9:ED14\", col_names=FALSE)))\r\ntemp24 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"EJ9:EJ14\", col_names=FALSE)))\r\ntemp25 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"EP9:EP14\", col_names=FALSE)))\r\ntemp26 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"EV9:EV14\", col_names=FALSE)))\r\ntemp27 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FB9:FB14\", col_names=FALSE)))\r\ntemp28 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FH9:FH14\", col_names=FALSE)))\r\ntemp29 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FN9:FN14\", col_names=FALSE)))\r\ntemp30 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FT9:FT14\", col_names=FALSE)))\r\ntemp31 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FZ9:FZ14\", col_names=FALSE)))\r\ntemp32 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GF9:GF14\", col_names=FALSE)))\r\ntemp33 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GL9:GL14\", col_names=FALSE)))\r\ntemp34 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GR9:GR14\", col_names=FALSE)))\r\ntemp35 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GX9:GX14\", col_names=FALSE)))\r\ntemp36 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HD9:HD14\", col_names=FALSE)))\r\ntemp37 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HJ9:HJ14\", col_names=FALSE)))\r\ntemp38 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HP9:HP14\", col_names=FALSE)))\r\ntemp39 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HV9:HV14\", col_names=FALSE)))\r\ntemp40 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IB9:IB14\", col_names=FALSE)))\r\ntemp41 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IH9:IH14\", col_names=FALSE)))\r\ntemp42 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IN9:IN14\", col_names=FALSE)))\r\ntemp43 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IT9:IT14\", col_names=FALSE)))\r\n\r\ncolnames(temp1) <- temp1 %>% slice(1) %>% unlist()\r\ntemp1 <- temp1 %>% slice(-1)\r\ntemp1$week <- 11\r\ntemp1 <- temp1 %>% mutate_if(is.factor, as.character) %>% mutate_if(is.character, as.numeric)\r\n\r\ndata20 <- bind_rows(temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10, temp11, \r\n                    temp12, temp13, temp14, temp15, temp16, temp17, temp18, temp19, temp20,\r\n                    temp21, temp22, temp23, temp24, temp25, temp26, temp27, temp28, temp29,\r\n                    temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37, temp38,\r\n                    temp39, temp40, temp41, temp42, temp43)\r\n\r\ndata20$week <- c(12:EWmaxweek)\r\n\r\ncolnames(data20) <- colnames(temp1)\r\n\r\ndata20 <- bind_rows(temp1, data20)\r\ndata20_long <- gather(data20, location, deaths, c(1:6))\r\ndata20_long$year <- \"curr\"\r\n\r\n#Align location names\r\ndata20_long$location <- case_when(\r\n  data20_long$location==\"Hospital (acute or community, not psychiatric)\" ~ \"Hospital\",\r\n  data20_long$location==\"Care Home\" ~ \"Care home\",\r\n  TRUE ~ data20_long$location\r\n)\r\n\r\n#Merge old and 2020 data\r\ndata <- bind_rows(data1519_long, data20_long)\r\n\r\n#extract peak deaths to order facets\r\ndata <- data %>%\r\n  group_by(location) %>%\r\n  mutate(max=max(deaths))\r\n\r\ndata$location <- fct_reorder(data$location, -data$max)\r\n\r\ntiff(\"Outputs/ONSWeeklyDeathsxLocation.tiff\", units=\"in\", width=12, height=8, res=300)\r\nggplot()+\r\n  geom_line(data=subset(data, year==\"hist\"), aes(x=week, y=deaths), colour=\"skyblue4\")+\r\n  geom_line(data=subset(data, year==\"curr\"), aes(x=week, y=deaths), colour=\"red\")+\r\n  scale_x_continuous(name=\"Week\")+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  facet_wrap(~location)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"All cause deaths have fallen across all settings\",\r\n       subtitle=paste0(\"Registered weekly deaths in England & Wales in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the average for 2015-19</span>. Data up to \", EWDate, \".\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n##############################\r\n#COVID vs. non-COVID excess deaths\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nEngCause <- as.data.frame(t(read_excel(temp, sheet=5, range=paste0(\"C9:\", EngRange, \"19\"), \r\n                                       col_names=FALSE)))[,c(1,3,11)]\r\ncolnames(EngCause) <- c(\"Total2020\", \"Mean1519\", \"COVID\")\r\nEngCause$week <- seq(1:nrow(EngCause))\r\nEngCause$other <- EngCause$Total2020-EngCause$COVID\r\nEngCause$excess <- EngCause$other-EngCause$Mean1519\r\nEngCause$allexcess <- EngCause$Total2020-EngCause$Mean1519\r\nEngCause_long <- gather(EngCause, cause, deaths, c(6,3,7))\r\n\r\ntiff(\"Outputs/ONSExcessxCause.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_col(data=subset(EngCause_long, cause!=\"allexcess\"), \r\n           aes(x=week, y=deaths, fill=cause), position=\"stack\")+\r\n  geom_segment(aes(x=0.5, xend=max(EngCause$week)+0.5, y=0, yend=0), colour=\"Grey30\")+\r\n  geom_line(data=subset(EngCause_long, cause==\"allexcess\"),\r\n            aes(x=week, y=deaths, colour=cause))+\r\n  scale_x_continuous(name=\"Week\")+\r\n  scale_y_continuous(name=\"Excess deaths vs. 2015-19 mean\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::PinaFraise\", name=\"Cause\", labels=c(\"COVID-19\", \"Other causes\"))+\r\n  scale_colour_manual(values=\"NavyBlue\", name=\"\", labels=\"Net excess deaths\")+\r\n  theme_classic()+\r\n  labs(title=\"The number of confirmed COVID-19 deaths rose while excess deaths fell overall\",\r\n       subtitle=\"Excess deaths vs. 2015-19 average by cause for England & Wales\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "All Cause Mortality/AllCauseDeaths2021.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(paletteer)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(forcats)\r\nlibrary(ggtext)\r\nlibrary(ragg)\r\nlibrary(extrafont)\r\n\r\n#Latest date in the country-specific data\r\nEWDate <- \"29th October\"\r\nScotDate <- \"7th November\"\r\nNIDate <- \"5th November\"\r\n\r\n#Locations for 2020/21 data\r\n#England, released at 9:30 on Tuesday mornings \r\n#https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales\r\nEng2021 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek432021.xlsx\"\r\n#Scotland, released at noon on Wednesdays\r\n#https://www.nrscotland.gov.uk/covid19stats\r\nScot2021 <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-21-data-week-44.xlsx\"\r\n#Northern Ireland, released on Fridays\r\n#https://www.nisra.gov.uk/publications/weekly-deaths\r\nNI2021 <- \"https://www.nisra.gov.uk/system/files/statistics/Weekly_Deaths%20-%20w%20e%205th%20November%202021.XLSX\"\r\n\r\n#Stupid Excel range controls\r\n#These need to be incremented by one letter each week\r\nEngRange <- \"AS\" \r\nScotRange <- \"AT\" \r\nNIRange <- \"44\" \r\n\r\n##############################\r\n#Read in English & Welsh data#\r\n##############################\r\n\r\n#Archive version with 2020 data in it\r\nEng2020 <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2020/publishedweek532020.xlsx\"\r\n\r\n#Start with 2021\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata2021.as.EW <- read_excel(temp, sheet=\"Weekly figures 2021\", \r\n                              range=paste0(\"B40:\", EngRange, \"81\"), col_names=FALSE) %>% \r\n  slice(-c(21,22)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=20)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-01-08\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(1))) %>% \r\n  select(-index) %>% \r\n  mutate(age=case_when(\r\n    age==\"<1\" ~ \"Under 1 year\",\r\n    age %in% c(\"1-4\", \"5-9\", \"10-14\") ~ \"01-14\",\r\n    age %in% c(\"15-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\") ~ \"15-44\",\r\n    age %in% c(\"45-49\", \"50-54\", \"55-59\", \"60-64\") ~ \"45-64\",\r\n    age %in% c(\"65-69\", \"70-74\") ~ \"65-74\",\r\n    age %in% c(\"75-79\", \"80-84\") ~ \"75-84\",\r\n    TRUE ~ \"85+\"\r\n  )) %>% \r\n  group_by(date, week, year, sex, age) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup()\r\n\r\n#By region\r\ndata2021.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2021\",\r\n                              range=paste0(\"B83:\", EngRange, \"92\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-01-08\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(1))) %>% \r\n  select(-index)\r\n\r\n#2020\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata2020.as.EW <- read_excel(temp, sheet=\"Weekly figures 2020\", \r\n                             range=\"B44:BC85\", col_names=FALSE) %>% \r\n  slice(-c(21,22)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=20)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2020-01-03\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(1))) %>% \r\n  select(-index) %>% \r\n  mutate(age=case_when(\r\n    age==\"<1\" ~ \"Under 1 year\",\r\n    age %in% c(\"1-4\", \"5-9\", \"10-14\") ~ \"01-14\",\r\n    age %in% c(\"15-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\") ~ \"15-44\",\r\n    age %in% c(\"45-49\", \"50-54\", \"55-59\", \"60-64\") ~ \"45-64\",\r\n    age %in% c(\"65-69\", \"70-74\") ~ \"65-74\",\r\n    age %in% c(\"75-79\", \"80-84\") ~ \"75-84\",\r\n    TRUE ~ \"85+\"\r\n  )) %>% \r\n  group_by(date, week, year, sex, age) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup()\r\n\r\n#By region\r\ndata2020.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2020\",\r\n                              range=\"B87:BC96\", col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2020-01-03\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(1))) %>% \r\n  select(-index)\r\n\r\n#2019\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2019/publishedweek522019.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata19.as.EW <- read_excel(temp, sheet=\"Weekly figures 2019\", \r\n                           range=\"B25:BB40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2019-01-04\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata19.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2019\",\r\n                              range=paste0(\"B43:\", EngRange, \"52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2019-01-04\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)\r\n\r\n#2019\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2019/publishedweek522019.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata19.as.EW <- read_excel(temp, sheet=\"Weekly figures 2019\", \r\n                           range=\"B25:BB40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2019-01-04\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata19.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2019\",\r\n                            range=paste0(\"B43:BB52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2019-01-04\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)\r\n  \r\n#2018 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2018/publishedweek522018withupdatedrespiratoryrow.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata18.as.EW <- read_excel(temp, sheet=\"Weekly figures 2018\", \r\n                           range=\"B25:BB40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2018-01-05\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata18.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2018\",\r\n                            range=paste0(\"B43:BB52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2018-01-05\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)  \r\n  \r\n#2017 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2017/publishedweek522017.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata17.as.EW <- read_excel(temp, sheet=\"Weekly figures 2017\", \r\n                           range=\"B25:BB40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2017-01-06\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata17.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2017\",\r\n                            range=paste0(\"B43:BB52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2017-01-06\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)    \r\n  \r\n#2016 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2016/publishedweek522016.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata16.as.EW <- read_excel(temp, sheet=\"Weekly figures 2016\", \r\n                           range=\"B25:BB40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2016-01-08\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata16.reg.EW <- read_excel(temp, sheet=\"Weekly figures 2016\",\r\n                            range=paste0(\"B43:BB52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2016-01-08\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)    \r\n\r\n#2015 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2015/publishedweek2015.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata15.as.EW <- read_excel(temp, sheet=\"Weekly Figures 2015\", \r\n                           range=\"A25:BB40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2015-01-02\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(1))) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata15.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2015\",\r\n                            range=paste0(\"A43:BB52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2015-01-02\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(1))) %>% \r\n  select(-index)    \r\n\r\n#2014 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2014/publishedweek2014.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata14.as.EW <- read_excel(temp, sheet=\"Weekly Figures 2014\", \r\n                           range=\"A25:BA40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2014-01-03\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata14.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2014\",\r\n                            range=paste0(\"A43:BA52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2014-01-03\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)   \r\n\r\n#2013 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2013/publishedweek2013.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata13.as.EW <- read_excel(temp, sheet=\"Weekly Figures 2013\", \r\n                           range=\"A25:BA40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2013-01-04\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata13.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2013\",\r\n                            range=paste0(\"A43:BA52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2013-01-04\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)  \r\n\r\n#2012 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2012/publishedweek2012.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata12.as.EW <- read_excel(temp, sheet=\"Weekly Figures 2012\", \r\n                           range=\"A25:BA40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2012-01-06\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata12.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2012\",\r\n                            range=paste0(\"A43:BA52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2012-01-06\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)    \r\n\r\n#2011 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2011/publishedweek2011.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata11.as.EW <- read_excel(temp, sheet=\"Weekly Figures 2011\", \r\n                           range=\"A26:BA41\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2011-01-07\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata11.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2011\",\r\n                            range=paste0(\"A44:BA53\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2011-01-07\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#2010 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2010/publishedweek2010.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#By age & sex\r\ndata10.as.EW <- read_excel(temp, sheet=\"Weekly Figures 2010\", \r\n                           range=\"A25:BA40\", col_names=FALSE) %>% \r\n  slice(-c(8,9)) %>% \r\n  mutate(sex=rep(c(\"Male\", \"Female\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2010-01-08\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index) \r\n\r\n#By region\r\ndata10.reg.EW <- read_excel(temp, sheet=\"Weekly Figures 2010\",\r\n                            range=paste0(\"A43:BA52\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>%\r\n  rename(region=`...1`) %>% \r\n  mutate(date=as.Date(\"2010-01-08\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date)) %>% \r\n  select(-index)      \r\n  \r\n#Merge together\r\ndata.as.EW <- bind_rows(data10.as.EW, data11.as.EW, data12.as.EW, data13.as.EW,\r\n                        data14.as.EW, data15.as.EW, data16.as.EW, data17.as.EW,\r\n                        data18.as.EW, data19.as.EW, data2020.as.EW, data2021.as.EW) %>% \r\n  #Join <1 and 1-14 age bands\r\n  mutate(age=case_when(\r\n    age %in% c(\"Under 1 year\", \"01-14\") ~ \"Under 15\",\r\n    TRUE ~ age)) %>% \r\n  group_by(age, sex, date, week, year) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add total rows, by age, sex and overall\r\nagetot <- data.as.EW %>% \r\n  group_by(age, date, week, year) %>%\r\n  summarise(deaths=sum(deaths)) %>% \r\n  mutate(sex=\"Total\") %>% \r\n  ungroup()\r\n\r\nsextot <- data.as.EW %>% \r\n  group_by(sex, date, week, year) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  mutate(age=\"Total\") %>% \r\n  ungroup()\r\n\r\nalltot <- data.as.EW %>% \r\n  group_by(date, week, year) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  mutate(age=\"Total\", sex=\"Total\") %>% \r\n  ungroup()\r\n\r\ndata.as.EW <- bind_rows(data.as.EW, agetot, sextot, alltot)\r\n  \r\ndata.reg.EW <- bind_rows(data10.reg.EW, data11.reg.EW, data12.reg.EW, data13.reg.EW,\r\n                         data14.reg.EW, data15.reg.EW, data16.reg.EW, data17.reg.EW,\r\n                         data18.reg.EW, data19.reg.EW, data2020.reg.EW, data2021.reg.EW)\r\n\r\nrm(data10.as.EW, data11.as.EW, data12.as.EW, data13.as.EW, data14.as.EW, data15.as.EW, \r\n   data16.as.EW, data17.as.EW, data18.as.EW, data19.as.EW, data2021.as.EW, data10.reg.EW, \r\n   data11.reg.EW, data12.reg.EW, data13.reg.EW, data14.reg.EW, data15.reg.EW, \r\n   data16.reg.EW, data17.reg.EW, data18.reg.EW, data19.reg.EW, data2021.reg.EW,\r\n   agetot, sextot, alltot, data2020.as.EW, data2020.reg.EW)\r\n\r\n#Bring in data by location for 20/21 which is *horribly* formatted\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n#2020\r\ntemp1 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"B9:B14\", col_names=FALSE)))\r\ntemp2 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"H9:H14\", col_names=FALSE)))\r\ntemp3 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"N9:N14\", col_names=FALSE)))\r\ntemp4 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"T9:T14\", col_names=FALSE)))\r\ntemp5 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"Z9:Z14\", col_names=FALSE)))\r\ntemp6 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AF9:AF14\", col_names=FALSE)))\r\ntemp7 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AL9:AL14\", col_names=FALSE)))\r\ntemp8 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AR9:AR14\", col_names=FALSE)))\r\ntemp9 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"AX9:AX14\", col_names=FALSE)))\r\ntemp10 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BD9:BD14\", col_names=FALSE)))\r\ntemp11 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BJ9:BJ14\", col_names=FALSE)))\r\ntemp12 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BP9:BP14\", col_names=FALSE)))\r\ntemp13 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"BV9:BV14\", col_names=FALSE)))\r\ntemp14 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CB9:CB14\", col_names=FALSE)))\r\ntemp15 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CH9:CH14\", col_names=FALSE)))\r\ntemp16 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CN9:CN14\", col_names=FALSE)))\r\ntemp17 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CT9:CT14\", col_names=FALSE)))\r\ntemp18 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"CZ9:CZ14\", col_names=FALSE)))\r\ntemp19 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DF9:DF14\", col_names=FALSE)))\r\ntemp20 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DL9:DL14\", col_names=FALSE)))\r\ntemp21 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DR9:DR14\", col_names=FALSE)))\r\ntemp22 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"DX9:DX14\", col_names=FALSE)))\r\ntemp23 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"ED9:ED14\", col_names=FALSE)))\r\ntemp24 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"EJ9:EJ14\", col_names=FALSE)))\r\ntemp25 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"EP9:EP14\", col_names=FALSE)))\r\ntemp26 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"EV9:EV14\", col_names=FALSE)))\r\ntemp27 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FB9:FB14\", col_names=FALSE)))\r\ntemp28 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FH9:FH14\", col_names=FALSE)))\r\ntemp29 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FN9:FN14\", col_names=FALSE)))\r\ntemp30 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FT9:FT14\", col_names=FALSE)))\r\ntemp31 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"FZ9:FZ14\", col_names=FALSE)))\r\ntemp32 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GF9:GF14\", col_names=FALSE)))\r\ntemp33 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GL9:GL14\", col_names=FALSE)))\r\ntemp34 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GR9:GR14\", col_names=FALSE)))\r\ntemp35 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"GX9:GX14\", col_names=FALSE)))\r\ntemp36 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HD9:HD14\", col_names=FALSE)))\r\ntemp37 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HJ9:HJ14\", col_names=FALSE)))\r\ntemp38 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HP9:HP14\", col_names=FALSE)))\r\ntemp39 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"HV9:HV14\", col_names=FALSE)))\r\ntemp40 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IB9:IB14\", col_names=FALSE)))\r\ntemp41 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IH9:IH14\", col_names=FALSE)))\r\ntemp42 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IN9:IN14\", col_names=FALSE)))\r\ntemp43 <- as.data.frame(t(read_excel(temp, sheet=11, range=\"IT9:IT14\", col_names=FALSE)))\r\n#2021\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ntemp44 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"B10:B15\", col_names=FALSE)))\r\ntemp45 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"H10:H15\", col_names=FALSE)))\r\ntemp46 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"N10:N15\", col_names=FALSE)))\r\ntemp47 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"T10:T15\", col_names=FALSE)))\r\ntemp48 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"Z10:Z15\", col_names=FALSE)))\r\ntemp49 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"AF10:AF15\", col_names=FALSE)))\r\ntemp50 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"AL10:AL15\", col_names=FALSE)))\r\ntemp51 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"AR10:AR15\", col_names=FALSE)))\r\ntemp52 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"AX10:AX15\", col_names=FALSE)))\r\ntemp53 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"BD10:BD15\", col_names=FALSE)))\r\ntemp54 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"BJ10:BJ15\", col_names=FALSE)))\r\ntemp55 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"BP10:BP15\", col_names=FALSE)))\r\ntemp56 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"BV10:BV15\", col_names=FALSE)))\r\ntemp57 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"CB10:CB15\", col_names=FALSE)))\r\ntemp58 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"CH10:CH15\", col_names=FALSE)))\r\ntemp59 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"CN10:CN15\", col_names=FALSE)))\r\ntemp60 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"CT10:CT15\", col_names=FALSE)))\r\ntemp61 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"CZ10:CZ15\", col_names=FALSE)))\r\ntemp62 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"DF10:DF15\", col_names=FALSE)))\r\ntemp63 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"DL10:DL15\", col_names=FALSE)))\r\ntemp64 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"DR10:DR15\", col_names=FALSE)))\r\ntemp65 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"DX10:DX15\", col_names=FALSE)))\r\ntemp66 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"ED10:ED15\", col_names=FALSE)))\r\ntemp67 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"EJ10:EJ15\", col_names=FALSE)))\r\ntemp68 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"EP10:EP15\", col_names=FALSE)))\r\ntemp69 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"EV10:EV15\", col_names=FALSE)))\r\ntemp70 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"FB10:FB15\", col_names=FALSE)))\r\ntemp71 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"FH10:FH15\", col_names=FALSE)))\r\ntemp72 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"FN10:FN15\", col_names=FALSE)))\r\ntemp73 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"FT10:FT15\", col_names=FALSE)))\r\ntemp74 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"FZ10:FZ15\", col_names=FALSE)))\r\ntemp75 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"GF10:GF15\", col_names=FALSE)))\r\ntemp76 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"GL10:GL15\", col_names=FALSE)))\r\ntemp77 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"GR10:GR15\", col_names=FALSE)))\r\ntemp78 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"GX10:GX15\", col_names=FALSE)))\r\ntemp79 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"HD10:HD15\", col_names=FALSE)))\r\ntemp80 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"HJ10:HJ15\", col_names=FALSE)))\r\ntemp81 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"HP10:HP15\", col_names=FALSE)))\r\ntemp82 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"HV10:HV15\", col_names=FALSE)))\r\ntemp83 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"IB10:IB15\", col_names=FALSE)))\r\ntemp84 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"IH10:IH15\", col_names=FALSE)))\r\ntemp85 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"IN10:IN15\", col_names=FALSE)))\r\ntemp86 <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Place of occurrence \", range=\"IT10:IT15\", col_names=FALSE)))\r\n\r\ndata2021.loc <- bind_rows(temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10, \r\n                    temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18, temp19, \r\n                    temp20, temp21, temp22, temp23, temp24, temp25, temp26, temp27, temp28, \r\n                    temp29, temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37, \r\n                    temp38, temp39, temp40, temp41, temp42, temp43, temp44, temp45, temp46,\r\n                    temp47, temp48, temp49, temp50, temp51, temp52, temp53, temp54, temp55,\r\n                    temp56, temp57, temp58, temp59, temp60, temp60, temp61, temp62, temp63,\r\n                    temp64, temp65, temp66, temp67, temp68, temp69, temp70, temp71, temp72,\r\n                    temp73, temp74, temp75, temp76, temp77, temp78, temp79, temp80, temp81,\r\n                    temp82, temp83, temp84, temp85, temp86) %>% \r\n  mutate(week=c(11:(nrow(.)+10)),\r\n         year=if_else(week<=53, 2020, 2021),\r\n         week=if_else(week>53, week-53, as.double(week)),\r\n         \"Home/Other\"=(V1+V3+V5+V6)) %>% \r\n  rename(\"Care Home\"=V4, \"Hospital\"=V2) %>% \r\n  select(-c(V1, V3, V5, V6)) %>% \r\n  gather(location, deaths, c(1,2,5))\r\n\r\n#Data by location for 2015-19\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/11622fiveyearaverageweeklydeathsbyplaceofdeathenglandandwalesdeathsoccurringbetween2015and2019/fiveyearavgweeklydeaths2015to2019podfinal.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata1519.loc <- read_excel(temp, sheet=\"Table\", range=\"A4:G56\") %>% \r\n  mutate(week=as.numeric(substr(...1, 6,7)),\r\n         year=1519,\r\n         `Home/Other`=Elsewhere+Home+Hospice+`Other communal establishment`) %>% \r\n  select(-c(1, 3:5, 7)) %>% \r\n  rename(`Care Home`=`Care home`) %>% \r\n  gather(location, deaths, c(`Home/Other`, Hospital, `Care Home`))\r\n\r\n#Join together\r\ndata.loc.EW <- bind_rows(data2021.loc, data1519.loc)\r\n\r\nrm(data2021.loc, data1519.loc, temp1, temp2, temp3, temp4, temp5, temp6, temp7,\r\n   temp8, temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17, \r\n   temp18, temp19, temp20, temp21, temp22, temp23, temp24, temp25, temp26, temp27,\r\n   temp28, temp29, temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37,\r\n   temp38, temp39, temp40, temp41, temp42, temp43, temp44)\r\n\r\n#By cause\r\n#2020\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata2020.cause.EW <- read_excel(temp, sheet=5, range=\"C9:BC19\", \r\n                            col_names=FALSE) %>% \r\n  slice(c(1,3,11)) %>% \r\n  gather(week, deaths) %>% \r\n  mutate(cause=rep(c(\"Total2020\", \"Mean1519\", \"COVID2020\"), times=(nrow(.)/3)),\r\n         week=as.numeric(substr(week, 4, 6))) %>% \r\n  spread(cause, deaths) %>% \r\n  mutate(other=Total2020-COVID2020, otherexcess=other-Mean1519,\r\n         netexcess=Total2020-Mean1519)\r\n\r\n#2021 (this data is now very unhelpfully spread over multiple sheets)\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Eng2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#Grab total deaths\r\nallcause2021.EW <- as.data.frame(t(read_excel(temp, sheet=\"Weekly figures 2021\", \r\n                              range=paste0(\"C9:\", EngRange, \"9\"), col_names=FALSE))) %>% \r\n  mutate(week=seq(1:nrow(.))) %>% \r\n  rename(Total2021=V1)\r\n\r\n#Grab COVID-19 deaths\r\nCOVID2021.EW <- as.data.frame(t(read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", \r\n                                              range=paste0(\"C9:\", EngRange, \"9\"), col_names=FALSE))) %>% \r\n  mutate(week=seq(1:nrow(.))) %>% \r\n  rename(COVID2021=V1)\r\n\r\ndata2021.cause.EW <- data2020.cause.EW %>% \r\n  merge(allcause2021.EW, all.x=TRUE) %>% \r\n  merge(COVID2021.EW, all.x=TRUE) %>% \r\n  filter(!is.na(Total2021)) %>% \r\n  select(week, Mean1519, COVID2021, Total2021) %>% \r\n  mutate(other=Total2021-COVID2021, otherexcess=other-Mean1519,\r\n         netexcess=Total2021-Mean1519, year=2021) %>% \r\n  select(week, year, COVID2021, otherexcess, netexcess)\r\n\r\ndata.cause.EW <- data2020.cause.EW %>% \r\n  mutate(year=2020) %>% \r\n  select(week, year, COVID2020, otherexcess, netexcess) %>% \r\n  rename(COVID=COVID2020) %>% \r\n  bind_rows(data2021.cause.EW %>% rename(COVID=COVID2021))%>% \r\n  gather(cause, deaths, c(3:5))\r\n\r\nrm(data2020.cause.EW, data2021.cause.EW, allcause2021.EW, COVID2021.EW)\r\n\r\n#######################\r\n#Read in Scottish data#\r\n#######################\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Scot2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#Dowload 2020/21 data from the latest spreadsheet\r\n\r\n#By age and sex\r\ndata20.as.S <- read_excel(temp, sheet=\"Table 2  (2020)\", \r\n                         range=\"B24:BC38\", col_names=FALSE) %>% \r\n  slice(-c(8)) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2020-01-05\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(4)),\r\n         deaths=as.numeric(deaths)) %>% \r\n  select(-index) \r\n\r\ndata21.as.S <- read_excel(temp, sheet=\"Table 2 (2021)\", \r\n                            range=paste0(\"B24:\", ScotRange, \"38\"), col_names=FALSE) %>% \r\n  slice(-c(8)) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=7)) %>% \r\n  gather(index, deaths, c(2:(ncol(.)-1))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-01-09\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date),\r\n         deaths=as.numeric(deaths)) %>% \r\n  select(-index) \r\n\r\n#By Health Board\r\ndata20.HB.S <- read_excel(temp, sheet=\"Table 2  (2020)\", \r\n                            range=\"B40:BC53\", col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>% \r\n  rename(HB=`...1`) %>% \r\n  mutate(date=as.Date(\"2020-01-05\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(4)),\r\n         deaths=as.numeric(deaths)) %>% \r\n  select(-index) \r\n\r\ndata21.HB.S <- read_excel(temp, sheet=\"Table 2 (2021)\", \r\n                            range=paste0(\"B40:\", ScotRange, \"53\"), col_names=FALSE) %>% \r\n \r\n  gather(index, deaths, c(2:ncol(.))) %>% \r\n  rename(HB=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-01-09\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date),\r\n         deaths=as.numeric(deaths)) %>% \r\n  select(-index) \r\n\r\n#By place of death\r\ndata20.loc.S <- read_excel(temp, sheet=\"Table 2  (2020)\", \r\n                            range=\"B90:BC93\", col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>% \r\n  rename(loc=`...1`) %>% \r\n  mutate(date=as.Date(\"2020-01-05\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date-days(4)),\r\n         deaths=as.numeric(deaths)) %>% \r\n  select(-index) \r\n\r\ndata21.loc.S <- read_excel(temp, sheet=\"Table 2 (2021)\", \r\n                            range=paste0(\"B90:\", ScotRange, \"93\"), col_names=FALSE) %>% \r\n  gather(index, deaths, c(2:ncol(.))) %>% \r\n  rename(loc=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-01-09\")+weeks(as.numeric(substr(index, 4,6))-2),\r\n         week=as.numeric(substr(index, 4,6))-1,\r\n         year=year(date),\r\n         deaths=as.numeric(deaths)) %>% \r\n  select(-index) \r\n\r\n#Download historical data\r\n#By sex and age\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-sex-age-2000-2019.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata10.as.S <- read_excel(temp, sheet=\"2010\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2010) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata11.as.S <- read_excel(temp, sheet=\"2011\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2011) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata12.as.S <- read_excel(temp, sheet=\"2012\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2012) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata13.as.S <- read_excel(temp, sheet=\"2013\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2013) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata14.as.S <- read_excel(temp, sheet=\"2014\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2014) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata15.as.S <- read_excel(temp, sheet=\"2015\", range=\"B5:BD44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2015) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata16.as.S <- read_excel(temp, sheet=\"2016\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2016) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata17.as.S <- read_excel(temp, sheet=\"2017\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2017) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata18.as.S <- read_excel(temp, sheet=\"2018\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2018) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\ndata19.as.S <- read_excel(temp, sheet=\"2019\", range=\"B5:BC44\", col_names=FALSE) %>% \r\n  mutate(sex=rep(c(\"Female\", \"Male\"), each=20), year=2019) %>% \r\n  select(-`...2`) %>% \r\n  rename(age=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-2))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2)\r\n\r\n#By health board\r\n#Read in 2015-19 health board data (pre-2015 data seemingly not available)\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-HB-and-CA-2015-2019.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata1519.HB.S <- read_excel(temp, sheet=1, range=\"A5:BC74\", col_names=FALSE) %>% \r\n  rename(HB=`...1`, year=`...2`) %>% \r\n  fill(HB) %>% \r\n  gather(week, deaths, c(3:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-2) %>% \r\n  filter(!(week==53 & year!=2015))\r\n\r\n#By location\r\n#Read in 2015-19 location data (pre-2015 data seemingly not available)\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-location-2015-2019.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata1519.loc.S <- read_excel(temp, range=\"A4:BB31\", col_names=FALSE) %>% \r\n  slice(-c(1,7,8,14,15,21,22,28)) %>% \r\n  mutate(loc=rep(c(\"Care Home\", \"Home / Non-institution\", \"Hospital\", \"Other institution\"), \r\n                 each=5)) %>% \r\n  rename(year=`...1`) %>% \r\n  gather(week, deaths, c(2:(ncol(.)-1))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=as.numeric(year)) %>% \r\n  filter(!(week==53 & year!=2015))\r\n\r\n#By cause (and location)\r\ntemp <- curl_download(url=Scot2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#2015-19 data for all locations\r\ndata1519.all.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B7:BC12\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=1519, loc=\"All\")\r\n\r\n#2015-19 data for care homes\r\ndata1519.ch.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B31:BC36\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=1519, loc=\"Care Home\")\r\n\r\n#2015-19 data for home\r\ndata1519.home.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B55:BC60\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=1519, loc=\"Home\")\r\n\r\n#2015-19 data for hospital\r\ndata1519.hosp.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B79:BC84\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=1519, loc=\"Hospital\")\r\n\r\n#2015-19 data for other (to be combined with home)\r\ndata1519.oth.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B103:BC108\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=1519, loc=\"Other\")\r\n\r\n#Stick 15-19 data together\r\ndata1519.cause.S <- bind_rows(data1519.ch.cause.S, data1519.home.cause.S, data1519.hosp.cause.S,\r\n                              data1519.oth.cause.S, data1519.all.cause.S)\r\n\r\n#Read in 2020 data\r\n#all locations\r\ndata2020.all.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B15:BC20\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2020, loc=\"All\")\r\n\r\n#care homes\r\ndata2020.ch.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B39:BC44\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2020, loc=\"Care Home\")\r\n\r\n#home\r\ndata2020.home.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B63:BC68\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2020, loc=\"Home\")\r\n\r\n#hospital\r\ndata2020.hosp.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B87:BC92\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2020, loc=\"Hospital\")\r\n\r\n#other (to be combined with home)\r\ndata2020.oth.cause.S <- read_excel(temp, sheet=\"Table 3 (2020)\", range=\"B111:BC116\", col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2020, loc=\"Other\")\r\n\r\n#Stick 2020 data together\r\ndata2020.cause.S <- bind_rows(data2020.ch.cause.S, data2020.home.cause.S, data2020.hosp.cause.S,\r\n                              data2020.oth.cause.S, data2020.all.cause.S)\r\n\r\n#Read in 2021 data\r\n#all locations\r\ndata2021.all.cause.S <- read_excel(temp, sheet=\"Table 3  (2021)\", \r\n                                   range=paste0(\"B15:\", ScotRange, \"20\"), col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2021, loc=\"All\")\r\n\r\n#care homes\r\ndata2021.ch.cause.S <- read_excel(temp, sheet=\"Table 3  (2021)\", \r\n                                  range=paste0(\"B39:\", ScotRange, \"44\"), col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2021, loc=\"Care Home\")\r\n\r\n#home\r\ndata2021.home.cause.S <- read_excel(temp, sheet=\"Table 3  (2021)\", \r\n                                    range=paste0(\"B63:\", ScotRange, \"68\"), col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2021, loc=\"Home\")\r\n\r\n#hospital\r\ndata2021.hosp.cause.S <- read_excel(temp, sheet=\"Table 3  (2021)\", \r\n                                    range=paste0(\"B87:\",ScotRange,  \"92\"), col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2021, loc=\"Hospital\")\r\n\r\n#other (to be combined with home)\r\ndata2021.oth.cause.S <- read_excel(temp, sheet=\"Table 3  (2021)\", \r\n                                   range=paste0(\"B111:\", ScotRange, \"116\"), col_names=FALSE) %>% \r\n  rename(cause=`...1`) %>% \r\n  gather(week, deaths, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 6))-1,\r\n         year=2021, loc=\"Other\")\r\n\r\n#Stick 2020 data together\r\ndata2021.cause.S <- bind_rows(data2021.ch.cause.S, data2021.home.cause.S, data2021.hosp.cause.S,\r\n                              data2021.oth.cause.S, data2021.all.cause.S)\r\n\r\n#Combine years\r\ndata.cause.S <- bind_rows(data1519.cause.S, data2020.cause.S, data2021.cause.S) %>% \r\n  mutate(loc=case_when(\r\n    loc %in% c(\"Home\", \"Other\") ~ \"Home/Other\",\r\n    TRUE ~ loc),\r\n    cause=if_else(cause==\"Circulatory (heart disease and stroke)\", \"Circulatory\", cause)) %>% \r\n  group_by(cause, week, year, loc) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup() %>% \r\n  spread(year, deaths)\r\n\r\ndata2021.cause.excess.S <- data.cause.S %>% \r\n  filter(!is.na(`2021`)) %>% \r\n  mutate(excess=`2021`-`1519`, year=2021) %>% \r\n  select(cause, loc, week, year, excess)\r\n\r\ndata.cause.S <- data.cause.S %>% \r\n  mutate(excess=`2020`-`1519`, year=2020) %>% \r\n  select(cause, loc, week, year, excess) %>% \r\n  bind_rows(data2021.cause.excess.S)\r\n\r\n#Merge together\r\ndata.as.S <- bind_rows(data10.as.S, data11.as.S, data12.as.S, data13.as.S,\r\n                       data14.as.S, data15.as.S, data16.as.S, data17.as.S,\r\n                       data18.as.S, data19.as.S) %>% \r\n  #Compress age bands to match 2020 data\r\n  mutate(age=case_when(\r\n    age %in% c(\"0\", \"1-4\", \"5-9\", \"10-14\") ~ \"Under 15\",\r\n    age %in% c(\"15-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\") ~ \"15-44\",\r\n    age %in% c(\"45-49\", \"50-54\", \"55-59\", \"60-64\") ~ \"45-64\",\r\n    age %in% c(\"65-69\", \"70-74\") ~ \"65-74\",\r\n    age %in% c(\"75-79\", \"80-84\") ~ \"75-84\",\r\n    TRUE ~ \"85+\")) %>% \r\n  group_by(age, sex, year, week) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup() \r\n\r\ndata.as.S <- bind_rows(data20.as.S, data21.as.S) %>% \r\n  mutate(age=case_when(\r\n    age %in% c(\"Under 1 year\", \"01-14\") ~ \"Under 15\",\r\n    TRUE ~ age)) %>% \r\n  group_by(age, sex, year, week, date) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup() %>% \r\n  bind_rows(data.as.S)\r\n\r\n#Add total rows, by age, sex and overall\r\nagetot.S <- data.as.S %>% \r\n  group_by(age, date, week, year) %>%\r\n  summarise(deaths=sum(deaths)) %>% \r\n  mutate(sex=\"Total\") %>% \r\n  ungroup()\r\n\r\nsextot.S <- data.as.S %>% \r\n  group_by(sex, date, week, year) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  mutate(age=\"Total\") %>% \r\n  ungroup()\r\n\r\nalltot.S <- data.as.S %>% \r\n  group_by(date, week, year) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  mutate(age=\"Total\", sex=\"Total\") %>% \r\n  ungroup()\r\n\r\ndata.as.S <- bind_rows(data.as.S, agetot.S, sextot.S, alltot.S)\r\n\r\ndata.HB.S <- bind_rows(data1519.HB.S, data20.HB.S, data21.HB.S)\r\n\r\ndata.loc.S <- bind_rows(data1519.loc.S, data20.loc.S, data21.loc.S)\r\n\r\nrm(data10.as.S, data11.as.S, data12.as.S, data13.as.S, data14.as.S, data15.as.S,\r\n   data16.as.S, data17.as.S, data18.as.S, data19.as.S, data20.as.S, data21.as.S,\r\n   data1519.HB.S, data20.HB.S, data21.HB.S, data1519.loc.S,\r\n   data20.loc.S, data21.loc.S, agetot.S, sextot.S, alltot.S, data1519.all.cause.S,\r\n   data1519.cause.S, data1519.ch.cause.S, data1519.home.cause.S, data1519.hosp.cause.S,\r\n   data1519.oth.cause.S, data2020.cause.S, data2020.all.cause.S, data2020.ch.cause.S,\r\n   data2020.home.cause.S, data2020.hosp.cause.S, data2020.oth.cause.S, data2021.cause.excess.S,\r\n   data2021.cause.S, data2021.all.cause.S, data2021.ch.cause.S, data2021.home.cause.S, \r\n   data2021.hosp.cause.S, data2021.oth.cause.S)\r\n\r\n#############################\r\n#Read in Northern Irish data#\r\n#############################\r\n\r\n#No data is (easily) available for Northern Ireland on historic deaths by age or place of death\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=NI2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#Download 2021 data from the latest spreadsheet\r\ndata2021.NI <- read_excel(temp, sheet=\"Table 1\", range=paste0(\"B5:C\", NIRange), col_names=FALSE) %>% \r\n  mutate(week=c(54:(nrow(.)+53)), year=2021)\r\ncolnames(data2021.NI) <- c(\"date\", \"deaths\", \"week\", \"year\")\r\n\r\ndata2021.cause.NI <- read_excel(temp, sheet=\"Table 10\", range=paste0(\"A57:C\", as.numeric(NIRange)+52), \r\n                                col_names=FALSE) %>% \r\n  rename(week=`...1`, date=`...2`, COVID=`...3`) %>% \r\n  mutate(COVID=as.numeric(gsub(\"-\", \"0\", COVID)),\r\n         week=week+53, year=2021) \r\n\r\n#Read in 2020 data\r\ntemp <- tempfile()\r\nsource <- \"https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly_Deaths%20-%20w%20e%201st%20January%202021.XLSX\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata2020.NI <- read_excel(temp, sheet=\"Table 1\", range=\"B6:C57\", col_names=FALSE) %>% \r\n  mutate(week=2:53, year=2020)\r\ncolnames(data2020.NI) <- c(\"date\", \"deaths\", \"week\", \"year\")\r\n\r\ndata2020.cause.NI <- read_excel(temp, sheet=\"Table 10\", range=\"A5:C56\", \r\n                                col_names=FALSE) %>% \r\n  rename(week=`...1`, date=`...2`, COVID=`...3`) %>% \r\n  mutate(COVID=as.numeric(gsub(\"-\", \"0\", COVID)),\r\n         year=2020, week=week+1) %>% \r\n  bind_rows(data2021.cause.NI) %>% \r\n  bind_rows(data.frame(week=1, date=as.Date(\"2020-01-03\"), COVID=0, year=2020))\r\n\r\n#Read in historical data\r\ntemp <- tempfile()\r\nsource <- \"https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly%20Deaths%20by%20Age%20and%20Respiratory%20Deaths%2C%202011-2019.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ndata2019.NI <- read_excel(temp, sheet=\"Weekly Deaths_2019\", range=\"C5:D56\", col_names=FALSE)\r\ndata2018.NI <- read_excel(temp, sheet=\"Weekly Deaths_2018\", range=\"C5:D56\", col_names=FALSE)\r\ndata2017.NI <- read_excel(temp, sheet=\"Weekly Deaths_2017\", range=\"C5:D57\", col_names=FALSE)\r\ndata2016.NI <- read_excel(temp, sheet=\"Weekly Deaths_2016\", range=\"C5:D56\", col_names=FALSE)\r\ndata2015.NI <- read_excel(temp, sheet=\"Weekly Deaths_2015\", range=\"C5:D57\", col_names=FALSE)\r\ndata2014.NI <- read_excel(temp, sheet=\"Weekly Deaths_2014\", range=\"C5:D56\", col_names=FALSE)\r\ndata2013.NI <- read_excel(temp, sheet=\"Weekly Deaths_2013\", range=\"C5:D56\", col_names=FALSE)\r\ndata2012.NI <- read_excel(temp, sheet=\"Weekly Deaths_2012\", range=\"C5:D56\", col_names=FALSE)\r\ndata2011.NI <- read_excel(temp, sheet=\"Weekly Deaths_2011\", range=\"C5:D56\", col_names=FALSE)\r\n\r\ndata.NI <- bind_rows(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI,\r\n                     data2016.NI, data2017.NI, data2018.NI, data2019.NI) %>% \r\n  rename(date=`...1`, deaths=`...2`) %>% \r\n  mutate(week=week(date-days(1)), year=year(date-days(1))) %>% \r\n  bind_rows(data2020.NI, data2021.NI) %>% \r\n  arrange(date)\r\n\r\n#Create cause dataset\r\ndata.cause.NI <- data.NI %>% \r\n  filter(year<2020) %>% \r\n  group_by(week) %>% \r\n  summarise(mean1119=mean(deaths)) \r\n\r\ndata.cause.NI <- data.cause.NI %>% \r\n  filter(week<=max(data.NI$week)-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(data.cause.NI) %>% \r\n  merge(data.NI %>% filter(year>=2020), all.y=TRUE) %>% \r\n  merge(data2020.cause.NI, all.x=TRUE) %>% \r\n  mutate(other=deaths-COVID, otherexcess=other-mean1119,\r\n         netexcess=deaths-mean1119) %>% \r\n  select(week, year, COVID, otherexcess, netexcess)\r\n \r\n\r\nrm(data2011.NI, data2012.NI, data2013.NI, data2014.NI, data2015.NI, data2016.NI,\r\n   data2017.NI, data2018.NI, data2019.NI, data2021.NI, data2021.cause.NI)\r\n\r\n#Generate overall regional data for UK\r\ndata.reg.UK <- data.as.S %>% \r\n  filter(age==\"Total\" & sex==\"Total\") %>% \r\n  select(-c(age, sex)) %>% \r\n  mutate(region=\"Scotland\") %>% \r\n  bind_rows(data.reg.EW, data.NI %>% mutate(region=\"Northern Ireland\"))\r\n\r\n#Save data\r\n#data by age and sex\r\nwrite.csv(data.as.EW, \"Data/deaths_age_sex_EW.csv\")\r\nwrite.csv(data.as.S, \"Data/deaths_age_sex_S.csv\")\r\n#data by region/Health Board\r\nwrite.csv(data.reg.UK, \"Data/deaths_reg_UK.csv\")\r\nwrite.csv(data.HB.S, \"Data/deaths_HB_S.csv\")\r\n#data by location\r\nwrite.csv(data.loc.EW, \"Data/deaths_loc_EW.csv\")\r\nwrite.csv(data.loc.S, \"Data/deaths_loc_S.csv\")\r\n#data by cause\r\nwrite.csv(data.cause.EW, \"Data/deaths_cause_EW.csv\")\r\nwrite.csv(data.cause.S, \"Data/deaths_cause_S.csv\")\r\nwrite.csv(data.cause.NI, \"Data/deaths_cause_NI.csv\")\r\n#Overall NI data\r\nwrite.csv(data.NI, \"Data/deaths_NI.csv\")\r\n\r\n###############################################################################################\r\n\r\n###################\r\n#Plots for England#\r\n###################\r\n\r\n#Overall plot\r\nplot1 <- data.as.EW %>% \r\n  filter(age==\"Total\" & sex==\"Total\") %>% \r\n  select(-c(age, sex)) %>% \r\n  mutate(week=if_else(year==2021,week+53, week))\r\n\r\nplot1.old <- plot1 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\nEng2021MaxWeek <- max((plot1 %>% filter(year==2021))$week)\r\n\r\n#Add extra weeks to old data\r\nplot1.old <- plot1.old %>% \r\n  filter(week<=Eng2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot1.old)\r\n\r\nplot1 <- plot1 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot1.old, by=\"week\") %>% \r\n  mutate(excess=deaths-mean)\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nEW.excess <- plot1 %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract y=axis placement for excess deaths figure\r\nlabpos <- 16000\r\n\r\nagg_tiff(\"Outputs/ONSWeeklyDeaths.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(plot1)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", breaks=c(as.Date(\"2020-01-01\"), as.Date(\"2020-04-01\"), as.Date(\"2020-07-01\"), \r\n                                 as.Date(\"2020-10-01\"), as.Date(\"2021-01-01\"), as.Date(\"2021-04-01\"),\r\n                                 as.Date(\"2021-07-01\")),\r\n               labels=c(\"Jan 2020\", \"Apr 2020\", \"Jul 2020\", \"Oct 2020\", \"Jan 2021\", \"Apr 2021\",\r\n                        \"Jul 2021\"))+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"England and Wales has seen excess mortality for the last 17 weeks\",\r\n       subtitle=paste0(\"Weekly deaths registered in England & Wales in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \" 2021.\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-06-01\"), y=labpos, \r\n           label=paste0(round(EW.excess$excess, 0),\" more deaths in 2020/21\\nthan average (+\", \r\n                        round(EW.excess$percexcess*100, 0),\"%)\"), colour=\"Red\", hjust=0,\r\n           family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-12\"), y=16000, label=\"Historic maximum\", \r\n           colour=\"Skyblue4\", family=\"Lato\", size=rel(3))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-10\"), y=9100, label=\"Historic minimum\", \r\n           colour=\"Skyblue4\", family=\"Lato\", size=rel(3))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-04-15\"), y=7500, label=\"Historic mean\", colour=\"grey30\",\r\n           family=\"Lato\", size=rel(3))+\r\n  geom_curve(aes(x=as.Date(\"2020-04-20\"), y=7700, xend=as.Date(\"2020-04-30\"), yend=9700), \r\n             colour=\"grey30\", curvature=0.15, arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), \r\n             lineend=\"round\")\r\ndev.off()\r\n\r\n#Plot by sex\r\nplot2 <- data.as.EW %>% \r\n  filter(age==\"Total\" & sex!=\"Total\") %>% \r\n  select(-age) %>% \r\n  mutate(week=if_else(year==2021,week+53, week))\r\n\r\nplot2.old <- plot2 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week, sex) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add extra weeks to old data\r\nplot2.old <- plot2.old %>% \r\n  filter(week<=Eng2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot2.old)\r\n\r\nplot2 <- plot2 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot2.old, by=c(\"sex\", \"week\")) %>% \r\n  mutate(excess=deaths-mean,\r\n         sex=factor(sex, levels=c(\"Male\", \"Female\")))\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nEW.excess.sex <- plot2 %>%\r\n  group_by(sex) %>% \r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>% \r\n  ungroup()\r\n\r\nann_text2 <- data.frame(date=rep(as.Date(\"2020-05-20\"), times=2), deaths=c(7500,7000), \r\n                        sex=factor(c(\"Male\", \"Female\"), levels=c(\"Male\", \"Female\")))\r\n\r\nagg_tiff(\"Outputs/ONSWeeklyDeathsxSex.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot2)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", breaks=c(as.Date(\"2020-01-01\"), as.Date(\"2020-04-01\"), as.Date(\"2020-07-01\"), \r\n                                 as.Date(\"2020-10-01\"), as.Date(\"2021-01-01\"), as.Date(\"2021-04-01\"),\r\n                                 as.Date(\"2021-07-01\")),\r\n               labels=c(\"Jan 2020\", \"Apr 2020\", \"Jul 2020\", \"Oct 2020\", \"Jan 2021\", \"Apr 2021\",\r\n                        \"Jul 2021\"))+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Both male and female deaths are above average\",\r\n       subtitle=paste0(\"Weekly deaths registered in England & Wales in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \" 2021.\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  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 (+\",\r\n                                                                    round(EW.excess.sex[1,4]*100, 0),\"%)\"), \r\n                                                             paste0(\"+\", round(EW.excess.sex[2,2],0),\" deaths (+\",\r\n                                                                    round(EW.excess.sex[2,4]*100, 0),\"%)\")), \r\n            size=rel(3), colour=c(\"Red\", \"Red\"), hjust=0, family=\"Lato\")\r\ndev.off()  \r\n\r\n#Plot by age\r\nplot3 <- data.as.EW %>% \r\n  filter(age!=\"Total\" & sex==\"Total\") %>% \r\n  select(-sex) %>% \r\n  mutate(week=if_else(year==2021,week+53, week))\r\n\r\nplot3.old <- plot3 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week, age) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add extra weeks to old data\r\nplot3.old <- plot3.old %>% \r\n  filter(week<=Eng2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot3.old)\r\n\r\nplot3 <- plot3 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot3.old, by=c(\"age\", \"week\")) %>% \r\n  mutate(excess=deaths-mean,\r\n         age=factor(age, levels=c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")))\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nEW.excess.age <- plot3 %>%\r\n  group_by(age) %>% \r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>% \r\n  ungroup()\r\n\r\nann_text3 <- data.frame(date=rep(as.Date(\"2020-06-01\"), times=6), \r\n                        deaths=c(1300, 1400, 2300, 3500, 5700, 7800), \r\n                        age=factor(c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"),\r\n                                   levels=c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")))\r\n\r\nagg_tiff(\"Outputs/ONSWeeklyDeathsxAge.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot3)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~age)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Age groups over 75 have seen the highest numbers of excess deaths\",\r\n       subtitle=paste0(\"Weekly deaths registered in England & Wales in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \" 2021.\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  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 (\",\r\n                                                                    round(EW.excess.age[1,4]*100, 1),\"%)\"), \r\n                                                           paste0(\"+\", round(EW.excess.age[2,2],0),\" deaths (+\",\r\n                                                                    round(EW.excess.age[2,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[3,2],0),\" deaths (+\",\r\n                                                                    round(EW.excess.age[3,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[4,2],0),\" deaths (+\",\r\n                                                                    round(EW.excess.age[4,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[5,2],0),\" deaths (+\",\r\n                                                                    round(EW.excess.age[5,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[6,2],0),\" deaths (+\",\r\n                                                                  round(EW.excess.age[6,4]*100, 0),\"%)\")), \r\n            size=3, colour=rep(\"red\", times=6), hjust=0, family=\"Lato\")\r\ndev.off()  \r\n\r\nann_text3 <- data.frame(date=rep(as.Date(\"2020-06-01\"), times=6), \r\n                        deaths=c(120, 400, 2000, 3000, 5000, 7000), \r\n                        age=factor(c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"),\r\n                                    levels=c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")))\r\n\r\nagg_tiff(\"Outputs/ONSWeeklyDeathsxAgev2.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot3)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"45-64 year olds have seen the biggest relative increase in mortality\",\r\n       subtitle=paste0(\"Weekly deaths registered in England & Wales in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \" 2021.\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  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 (\",\r\n                                                                  round(EW.excess.age[1,4]*100, 1),\"%)\"), \r\n                                                           paste0(\"+\", round(EW.excess.age[2,2],0),\" deaths (+\",\r\n                                                                  round(EW.excess.age[2,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[3,2],0),\" deaths (+\",\r\n                                                                  round(EW.excess.age[3,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[4,2],0),\" deaths (+\",\r\n                                                                  round(EW.excess.age[4,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[5,2],0),\" deaths (+\",\r\n                                                                  round(EW.excess.age[5,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(EW.excess.age[6,2],0),\" deaths (+\",\r\n                                                                  round(EW.excess.age[6,4]*100, 0),\"%)\")), \r\n            size=3, colour=rep(\"red\", times=6), hjust=0, family=\"Lato\")\r\ndev.off()  \r\n\r\n#Youngest age band only\r\nagg_tiff(\"Outputs/ONSWeeklyDeathsxAgeu15.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot3 %>% filter(age==\"Under 15\"))+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"All cause deaths in under 15s have been consistently below average\",\r\n       subtitle=paste0(\"Weekly deaths registered in England & Wales in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \" 2021.\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-06-01\"), y=30, \r\n           label=paste0(-1*round(EW.excess.age[1,2],0),\" fewer deaths in 2020/21\\nvs. 2010-19 average (\",\r\n                        round(EW.excess.age[1,4]*100, 1),\"%)\"), colour=\"Red\", hjust=0,\r\n           family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-12\"), y=110, label=\"Historic maximum\", \r\n           colour=\"Skyblue4\", family=\"Lato\", size=rel(3))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-10\"), y=35, label=\"Historic minimum\", \r\n           colour=\"Skyblue4\", family=\"Lato\", size=rel(3))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-04-15\"), y=85, label=\"Historic mean\", colour=\"grey30\",\r\n           family=\"Lato\", size=rel(3))+\r\n  geom_curve(aes(x=as.Date(\"2020-04-20\"), y=83, xend=as.Date(\"2020-04-30\"), yend=75), \r\n             colour=\"grey30\", curvature=0.15, arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), \r\n             lineend=\"round\")\r\ndev.off()  \r\n\r\n\r\n#Excess deaths by age stacked\r\nagg_tiff(\"Outputs/ONSWeeklyDeathsxAgeBars.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(plot3)+\r\n  geom_col(aes(x=date, y=excess, fill=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Excess deaths vs. 2010-19 average\")+\r\n  scale_fill_paletteer_d(name=\"Age\", \"awtools::a_palette\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Excess mortality in England & Wales by age\",\r\n       subtitle=paste0(\"Weekly deaths registered in England & Wales by age compared to the 2010-19 average.\\nData up to \", EWDate, \" 2021.\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot by location\r\nplot4 <- data.loc.EW %>% \r\n  mutate(week=if_else(year==2021,week+53, week),\r\n         location=factor(location, levels=c(\"Hospital\", \"Care Home\", \"Home/Other\")))\r\n\r\n#Add extra weeks to old data\r\nplot4 <- plot4 %>% \r\n  filter(week<=Eng2021MaxWeek-53 & year==1519) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot4) %>% \r\n  mutate(date=as.Date(\"2020-01-03\")+weeks(week-1)) \r\n\r\n#agg_png(\"Outputs/ConversationPlot3.png\", units=\"in\", width=9, height=6, res=800)\r\n#ggplot()+\r\n#  geom_line(data=subset(plot4, year==1519 & week<53), aes(x=date, y=deaths), colour=\"Skyblue2\")+\r\n#  geom_line(data=subset(plot4, year==1519 & week>53), aes(x=date, y=deaths), colour=\"Skyblue2\")+\r\n#  geom_line(data=subset(plot4, year>1519), aes(x=date, y=deaths), colour=\"Red\")+\r\n#  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n#  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n#  facet_wrap(~location)+\r\n#  theme_classic()+\r\n#  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n#        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n#        text=element_text(family=\"Lato\"))+\r\n#  labs(title=\"Deaths have shifted from hospitals to private homes\",\r\n#       subtitle=paste0(\"Weekly deaths in England & Wales in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2015-19</span>. Data up to \", EWDate, \" 2021.<br>Historic data for week 53 is not available\"),\r\n#       caption=\"Data from ONS | Plot and analysis by Colin Angus\")\r\n#  \r\n#dev.off()  \r\n\r\nagg_tiff(\"Outputs/ONSWeeklyDeathsxLocation.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot()+\r\n  geom_line(data=subset(plot4, year==1519 & week<53), aes(x=date, y=deaths), colour=\"Skyblue2\")+\r\n  geom_line(data=subset(plot4, year==1519 & week>53), aes(x=date, y=deaths), colour=\"Skyblue2\")+\r\n  geom_line(data=subset(plot4, year>1519), aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~location)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Deaths in all settings are above 'normal' levels\",\r\n       subtitle=paste0(\"Weekly deaths in England & Wales in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", EWDate, \" 2021.<br>Historic data for week 53 is not available\"),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()  \r\n\r\n#Plot by cause\r\nplot5 <- data.cause.EW %>% \r\n  mutate(week=if_else(year==2021,week+53, week),\r\n         date=as.Date(\"2020-01-03\")+weeks(week-1))\r\n\r\nagg_tiff(\"Outputs/ONSExcessxCause.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_col(data=subset(plot5, cause!=\"netexcess\"), aes(x=date, y=deaths, fill=cause))+\r\n  geom_hline(yintercept=0, colour=\"Grey30\")+\r\n  geom_line(data=subset(plot5, cause==\"netexcess\"), aes(x=date, y=deaths, colour=cause))+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Excess deaths vs. 2015-19 mean\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::PinaFraise\", name=\"Cause\", labels=c(\"COVID-19\", \"Other causes\"))+\r\n  scale_colour_manual(values=\"NavyBlue\", name=\"\", labels=\"Net excess deaths\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Around half of recent excess deaths involved COVID\",\r\n       subtitle=\"Excess deaths vs. 2015-19 average by cause for England & Wales\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n  \r\n####################\r\n#Plots for Scotland#\r\n####################\r\n\r\n#Overall plot\r\nplot6 <- data.as.S %>% \r\n  filter(age==\"Total\" & sex==\"Total\") %>% \r\n  select(-c(age, sex)) %>% \r\n  mutate(week=if_else(year==2021,week+53, week))\r\n\r\nplot6.old <- plot6 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\nScot2021MaxWeek <- max((plot6 %>% filter(year==2021))$week)\r\n\r\n#Add extra weeks to old data\r\nplot6.old <- plot6.old %>% \r\n  filter(week<=Scot2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot6.old)\r\n\r\nplot6 <- plot6 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot6.old, by=\"week\") %>% \r\n  mutate(excess=deaths-mean)\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nS.excess <- plot6 %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract y=axis placement for excess deaths figure\r\nlabpos <- 1600\r\n\r\nagg_tiff(\"Outputs/NRSWeeklyDeaths.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(plot6)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Scotland continues to see excess mortality\",\r\n       subtitle=paste0(\"Weekly deaths in Scotland in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", ScotDate, \" 2021.\"),\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-06-01\"), y=labpos, \r\n           label=paste0(round(S.excess$excess, 0),\" more deaths in 2020/21\\nthan average (+\", \r\n                        round(S.excess$percexcess*100, 0),\"%)\"), colour=\"Red\", hjust=0,\r\n           family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-25\"), y=1800, label=\"Historic maximum\", \r\n           colour=\"Skyblue4\", family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-11\"), y=980, label=\"Historic minimum\", \r\n           colour=\"Skyblue4\", family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-04-15\"), y=750, label=\"Historic mean\", colour=\"grey30\",\r\n           family=\"Lato\")+\r\n  geom_curve(aes(x=as.Date(\"2020-04-20\"), y=770, xend=as.Date(\"2020-04-30\"), yend=1060), \r\n             colour=\"grey30\", curvature=0.15, arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), \r\n             lineend=\"round\")\r\ndev.off()\r\n\r\n#Plot by sex\r\nplot7 <- data.as.S %>% \r\n  filter(age==\"Total\" & sex!=\"Total\") %>% \r\n  select(-age) %>% \r\n  mutate(week=if_else(year==2021,week+53, week))\r\n\r\nplot7.old <- plot7 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week, sex) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add extra weeks to old data\r\nplot7.old <- plot7.old %>% \r\n  filter(week<=Scot2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot7.old)\r\n\r\nplot7 <- plot7 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot7.old, by=c(\"sex\", \"week\")) %>% \r\n  mutate(excess=deaths-mean,\r\n         sex=factor(sex, levels=c(\"Male\", \"Female\")))\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nS.excess.sex <- plot7 %>%\r\n  group_by(sex) %>% \r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>% \r\n  ungroup()\r\n\r\nann_text7 <- data.frame(date=rep(as.Date(\"2020-05-20\"), times=2), deaths=c(850,700), \r\n                        sex=factor(c(\"Male\", \"Female\"), levels=c(\"Male\", \"Female\")))\r\n\r\nagg_tiff(\"Outputs/NRSWeeklyDeathsxSex.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(plot7)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(plot.title=element_markdown(face=\"bold\", size=rel(1.4)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Excess deaths are markedly higher in men\",\r\n       subtitle=paste0(\"Weekly deaths in Scotland in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", ScotDate, \" 2021.\"),\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\r\n  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 (+\",\r\n                                                                  round(S.excess.sex[1,4]*100, 0),\"%)\"), \r\n                                                           paste0(\"+\", round(S.excess.sex[2,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.sex[2,4]*100, 0),\"%)\")), \r\n            size=3, colour=c(\"Red\", \"Red\"), hjust=0, family=\"Lato\")\r\ndev.off()  \r\n\r\n#Plot by age\r\nplot8 <- data.as.S %>% \r\n  filter(age!=\"Total\" & sex==\"Total\") %>% \r\n  select(-sex) %>% \r\n  mutate(week=if_else(year==2021,week+53, week))\r\n\r\nplot8.old <- plot8 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week, age) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add extra weeks to old data\r\nplot8.old <- plot8.old %>% \r\n  filter(week<=Scot2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot8.old)\r\n\r\nplot8 <- plot8 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot8.old, by=c(\"age\", \"week\")) %>% \r\n  mutate(excess=deaths-mean,\r\n         age=factor(age, levels=c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")))\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nS.excess.age <- plot8 %>%\r\n  group_by(age) %>% \r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>% \r\n  ungroup()\r\n\r\nann_text8 <- data.frame(date=rep(as.Date(\"2020-06-01\"), times=6), \r\n                        deaths=c(100, 150, 270, 350, 500, 600), \r\n                        age=factor(c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"),\r\n                                   levels=c(\"Under 15\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")))\r\n\r\nagg_tiff(\"Outputs/NRSWeeklyDeathsxAge.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot8)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~age)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"All age groups over 45 have seen excess mortality in recent weeks\",\r\n       subtitle=paste0(\"Weekly deaths in Scotland in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", ScotDate, \" 2021.\"),\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\r\n  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 (\",\r\n                                                                  round(S.excess.age[1,4]*100, 1),\"%)\"), \r\n                                                           paste0(\"+\", round(S.excess.age[2,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.age[2,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.age[3,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.age[3,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.age[4,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.age[4,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.age[5,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.age[5,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.age[6,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.age[6,4]*100, 0),\"%)\")), \r\n            size=3, colour=rep(\"red\", times=6), hjust=0, family=\"Lato\")\r\ndev.off()  \r\n\r\n#Plot by location\r\nplot9 <- data.loc.S %>% \r\n  mutate(week=if_else(year==2021,week+53, week),\r\n         loc=case_when(\r\n           loc==\"Hospital\" ~ \"Hospital\",\r\n           loc==\"Care Home\" ~ \"Care Home\",\r\n           TRUE ~ \"Home/Other\"\r\n         )) %>% \r\n  group_by(year, loc, week, date) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup()\r\n\r\nplot9.old <- plot9 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week, loc) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add extra weeks to old data\r\nplot9.old <- plot9.old %>% \r\n  filter(week<=Scot2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot9.old)\r\n\r\nplot9 <- plot9 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot9.old, by=c(\"loc\", \"week\")) %>% \r\n  mutate(excess=deaths-mean,\r\n         loc=factor(loc, levels=c(\"Hospital\", \"Care Home\", \"Home/Other\")))\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nS.excess.loc <- plot9 %>%\r\n  group_by(loc) %>% \r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>% \r\n  ungroup()\r\n\r\nann_text9 <- data.frame(date=rep(as.Date(\"2020-05-10\"), times=3), deaths=c(750,600, 500), \r\n                        loc=factor(c(\"Hospital\", \"Care Home\", \"Home/Other\"),\r\n                                   levels=c(\"Hospital\", \"Care Home\", \"Home/Other\")))\r\n\r\nagg_tiff(\"Outputs/NRSWeeklyDeathsxLocation.tiff\", units=\"in\", width=14, height=7, res=500)\r\nggplot(plot9)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~loc)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"All-cause deaths in hospitals and private homes are above 'normal' levels\",\r\n       subtitle=paste0(\"Weekly deaths in Scotland in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2015-19</span>. Data up to \", ScotDate, \" 2021.\"),\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\r\n  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 (\",\r\n                                                                  round(S.excess.loc[1,4]*100, 0),\"%)\"), \r\n                                                           paste0(\"+\", round(S.excess.loc[2,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.loc[2,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.loc[3,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.loc[3,4]*100, 0),\"%)\")), \r\n            size=3, colour=rep(\"Red\", 3), hjust=0, family=\"Lato\")\r\ndev.off()  \r\n\r\n#Plot excess by location\r\nagg_tiff(\"Outputs/NRSWeeklyDeathsExcessxLocation.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot9)+\r\n  geom_line(aes(x=date, y=excess, colour=loc))+\r\n  geom_hline(yintercept=0, colour=\"Grey30\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Excess deaths compared to 2015-19 average\")+\r\n  scale_colour_paletteer_d(name=\"Place of death\", \"ggsci::planetexpress_futurama\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Excess mortality remains highest in Scottish homes\",\r\n       subtitle=\"Excess deaths by place of death in Scotland in 2020/21 compared to the 2015-19 average\",\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot by cause\r\nplot10 <- data.cause.S %>% \r\n  filter(loc==\"All\") %>% \r\n  mutate(week=if_else(year==2021,week+53, week),\r\n         date=as.Date(\"2020-01-05\")+weeks(week-1),\r\n         cause=factor(cause, levels=c(\"COVID-19\", \"Cancer\", \"Circulatory\", \"Dementia / Alzheimers\",\r\n                                      \"Respiratory\", \"Other\")))\r\n\r\nagg_tiff(\"Outputs/NRSExcessxcause.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(plot10)+\r\n  geom_col(aes(x=date, y=excess, fill=cause))+\r\n  geom_hline(yintercept=0, colour=\"Grey30\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Excess deaths compared to 2015-19 average\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"Cause of death\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"The number of COVID deaths in Scotland has been fairly stable in recent weeks\",\r\n       subtitle=\"Registered deaths by cause in Scotland in 2020/21 compared to the 2015-19 average\",\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot by cause *and* location\r\nplot11 <- data.cause.S %>% \r\n  filter(loc!=\"All\") %>% \r\n  mutate(week=if_else(year==2021,week+53, week),\r\n         date=as.Date(\"2020-01-05\")+weeks(week-1),\r\n         cause=factor(cause, levels=c(\"COVID-19\", \"Cancer\", \"Circulatory\", \"Dementia / Alzheimers\",\r\n                                      \"Respiratory\", \"Other\")),\r\n         loc=factor(loc, levels=c(\"Hospital\", \"Care Home\", \"Home/Other\")))\r\n\r\nagg_tiff(\"Outputs/NRSExcessxcausexloc.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot11)+\r\n  geom_col(aes(x=date, y=excess, fill=cause))+\r\n  geom_hline(yintercept=0, colour=\"Grey30\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Excess deaths compared to 2015-19 average\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"Cause of death\")+\r\n  facet_wrap(~loc)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Almost all COVID deaths in Scotland are taking place in hospital\",\r\n       subtitle=\"Registered deaths by cause in Scotland in 2020/21 compared to the 2015-19 average\",\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/NRSExcessxlocxcause.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot11)+\r\n  geom_line(aes(x=date, y=excess, colour=loc))+\r\n  geom_hline(yintercept=0, colour=\"Grey30\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Excess deaths compared to 2015-19 average\")+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_tricolor\", name=\"Place of death\")+\r\n  facet_wrap(~cause)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 deaths in Scotland are taking place mostly in hospitals\",\r\n       subtitle=\"Registered deaths by cause and place of death in Scotland in 2020/21 compared to the 2015-19 average\",\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\n#Plot by Health Board\r\nplot12 <- data.HB.S %>% \r\n  mutate(week=if_else(year==2021,week+53, week)) \r\n\r\nplot12.old <- plot12 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week, HB) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add extra weeks to old data\r\nplot12.old <- plot12.old %>% \r\n  filter(week<=Scot2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot12.old)\r\n\r\nplot12 <- plot12 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot12.old, by=c(\"HB\", \"week\")) %>% \r\n  mutate(excess=deaths-mean)\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nS.excess.HB <- plot12 %>%\r\n  group_by(HB) %>% \r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>% \r\n  ungroup() %>% \r\n  mutate(HB=fct_reorder(HB, -percexcess)) %>% \r\n  arrange(-percexcess)\r\n\r\n#Order HBs by total excess deaths\r\nplot12 <- plot12 %>% \r\n  mutate(HB=factor(HB, levels=levels(S.excess.HB$HB))) %>% \r\n  arrange(HB)\r\n\r\nann_text12 <- data.frame(date=rep(as.Date(\"2020-05-15\"), times=14),\r\n                         deaths=c(350, 200, 250, 450, 300, 210, 150, 210, 80, 180, 250, 100, \r\n                                  80, 80), \r\n                         HB=factor(S.excess.HB$HB, levels(S.excess.HB$HB)))\r\n\r\nagg_tiff(\"Outputs/NRSWeeklyDeathsxHB.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot(plot12)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~HB)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Excess mortality across Scotland\",\r\n       subtitle=paste0(\"Weekly deaths in Scotland in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2015-19</span>. Data up to \", ScotDate, \" 2021.\"),\r\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\r\n  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 (+\",\r\n                                                                  round(S.excess.HB[1,4]*100, 0),\"%)\"), \r\n                                                           paste0(\"+\", round(S.excess.HB[2,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[2,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[3,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[3,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[4,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[4,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[5,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[5,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[6,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[6,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[7,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[7,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[8,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[8,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[9,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[9,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[10,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[10,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[11,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[11,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[12,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[12,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[13,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[13,4]*100, 0),\"%)\"),\r\n                                                           paste0(\"+\", round(S.excess.HB[14,2],0),\" deaths (+\",\r\n                                                                  round(S.excess.HB[14,4]*100, 0),\"%)\")), \r\n            size=3, colour=rep(\"Red\", 14), hjust=0, family=\"Lato\")\r\ndev.off()  \r\n\r\n############################\r\n#Plots for Northern Ireland#\r\n############################\r\n\r\n#Overall plot\r\nplot13 <- data.NI %>% \r\n  mutate(date=as.Date(date))\r\n\r\nplot13.old <- plot13 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\nNI2021MaxWeek <- max((plot13 %>% filter(year==2021))$week)\r\n\r\n#Add extra weeks to old data\r\nplot13.old <- plot13.old %>% \r\n  filter(week<=NI2021MaxWeek-53) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot13.old)\r\n\r\nplot13 <- plot13 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot13.old, by=\"week\") %>% \r\n  mutate(excess=deaths-mean)\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nNI.excess <- plot13 %>%\r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total)\r\n\r\n#Extract y=axis placement for excess deaths figure\r\nlabpos <- 440\r\n\r\nagg_tiff(\"Outputs/NISRAWeeklyDeaths.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(plot13)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Northern Ireland has seen almost 2 months of above 'usual' deaths\",\r\n       subtitle=paste0(\"Weekly deaths in Northern Ireland in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", NIDate, \" 2021.\"),\r\n       caption=\"Data from NISRA | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-06-01\"), y=labpos, \r\n           label=paste0(\"+\", round(NI.excess$excess, 0),\" more deaths in 2020/21\\nthan average (+\", \r\n                        round(NI.excess$percexcess*100, 0),\"%)\"), colour=\"Red\", hjust=0,\r\n           family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-28\"), y=450, label=\"Historic maximum\", \r\n           colour=\"Skyblue4\", family=\"Lato\", size=rel(3))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-02-16\"), y=200, label=\"Historic minimum\", \r\n           colour=\"Skyblue4\", family=\"Lato\", size=rel(3))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-05-15\"), y=170, label=\"Historic mean\", colour=\"grey30\",\r\n           family=\"Lato\", size=rel(3))+\r\n  geom_curve(aes(x=as.Date(\"2020-05-20\"), y=180, xend=as.Date(\"2020-05-08\"), yend=273), \r\n             colour=\"grey30\", curvature=-0.15, arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), \r\n             lineend=\"round\")\r\ndev.off()\r\n\r\n#Plot by cause\r\nplot14 <- data.cause.NI %>% \r\n  mutate(date=as.Date(\"2020-01-03\")+weeks(week-1)) %>% \r\n  gather(cause, deaths, c(3:5))\r\n\r\nagg_tiff(\"Outputs/NISRAExcessxCause.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_col(data=subset(plot14, cause!=\"netexcess\"), aes(x=date, y=deaths, fill=cause))+\r\n  geom_hline(yintercept=0, colour=\"Grey30\")+\r\n  geom_line(data=subset(plot14, cause==\"netexcess\"), aes(x=date, y=deaths, colour=cause))+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Excess deaths vs. 2015-19 mean\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::PinaFraise\", name=\"Cause\", labels=c(\"COVID-19\", \"Other causes\"))+\r\n  scale_colour_manual(values=\"NavyBlue\", name=\"\", labels=\"Net excess deaths\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"The number of COVID-19 deaths in Northern Ireland has remained stable\",\r\n       subtitle=\"Excess deaths vs. 2015-19 average by cause for Northern Ireland\",\r\n       caption=\"Data from NISRA | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Regional plot for the whole of the UK\r\nplot15 <- data.reg.UK %>% \r\n  mutate(week=case_when(\r\n    region!= \"Northern Ireland\" & year==2021 ~ week+53, \r\n    TRUE~week),\r\n         date=as.Date(date)) \r\n\r\nplot15.old <- plot15 %>% \r\n  filter(year<2020) %>% \r\n  group_by(week, region) %>% \r\n  summarise(min=min(deaths), max=max(deaths), mean=mean(deaths)) %>% \r\n  ungroup()\r\n\r\n#Add extra weeks to old data\r\nplot15.old <- plot15.old %>% \r\n  filter(week<=max(Eng2021MaxWeek-53, Scot2021MaxWeek-53, NI2021MaxWeek)) %>% \r\n  mutate(week=week+53) %>% \r\n  bind_rows(plot15.old)\r\n\r\nplot15 <- plot15 %>% \r\n  filter(year>=2020) %>% \r\n  merge(plot15.old, by=c(\"region\", \"week\")) %>% \r\n  mutate(excess=deaths-mean)\r\n\r\n#Calculate excess deaths vs. mean in 2020/21\r\nUK.excess.region <- plot15 %>%\r\n  group_by(region) %>% \r\n  summarise(excess=sum(excess), total=sum(mean), percexcess=excess/total) %>% \r\n  ungroup() %>% \r\n  mutate(region=fct_reorder(region, -percexcess)) %>% \r\n  arrange(-percexcess)\r\n\r\n#Order HBs by total excess deaths\r\nplot15 <- plot15 %>% \r\n  mutate(region=factor(region, levels=levels(UK.excess.region$region))) %>% \r\n  arrange(region)\r\n\r\nann_text15 <- data.frame(date=rep(as.Date(\"2020-05-15\"), times=12),\r\n                         deaths=c(2700, 2100, 1700, 2500, 2500, 3000, 1100, 2000, 650, \r\n                                  1300, 2000, 1900), \r\n                         region=factor(UK.excess.region$region, levels(UK.excess.region$region)))\r\n\r\nsubtitle <- ifelse(EWDate==NIDate, paste0(\"Weekly deaths in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.<br>England, Wales and Northern Ireland data to \", EWDate, \".<br>Scotland data to \", ScotDate, \".\"),\r\n                   paste0(\"Weekly deaths in <span style='color:red;'>2020/21</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span><br>England and Wales data to \",  EWDate, \".<br>Northern Ireland data to \", NIDate, \".<br>Scotland data to \", ScotDate, \".\"))\r\n\r\n\r\nRegPlot <- ggplot(plot15)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~region)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Regional variation in all-cause mortality across the UK\",\r\n       subtitle=subtitle,\r\n       caption=\"Data from ONS, NRS & NISRA | Plot by @VictimOfMaths\")+\r\n  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 (+\",\r\n                                                                   round(UK.excess.region[1,4]*100, 0),\"%)\"), \r\n                                                            paste0(\"+\", round(UK.excess.region[2,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[2,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[3,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[3,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[4,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[4,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[5,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[5,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[6,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[6,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[7,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[7,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[8,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[8,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[9,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[9,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[10,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[10,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[11,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[11,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[12,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[12,4]*100, 0),\"%)\")), \r\n            size=3, colour=rep(\"Red\", 12), hjust=0, family=\"Lato\")\r\n\r\n\r\n\r\nagg_tiff(\"Outputs/ONSNRSNISRAWeeklyDeathsxReg.tiff\", units=\"in\", width=12, height=8, res=500)\r\nRegPlot\r\ndev.off()  \r\n\r\nagg_png(\"Outputs/ONSNRSNISRAWeeklyDeathsxReg.png\", units=\"in\", width=12, height=8, res=500)\r\nRegPlot\r\ndev.off() \r\n\r\nRegPlot2 <- ggplot(plot15)+\r\n  geom_ribbon(aes(x=date, ymin=min, ymax=max), fill=\"Skyblue2\")+\r\n  geom_ribbon(aes(x=date, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\r\n  geom_line(aes(x=date, y=mean), colour=\"Grey50\", linetype=2)+\r\n  geom_line(aes(x=date, y=deaths), colour=\"Red\")+\r\n  scale_x_date(name=\"\", date_labels=\"%b-%y\")+\r\n  scale_y_continuous(name=\"Weekly deaths registered\", limits=c(0,NA))+\r\n  facet_wrap(~region, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)), plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Regional variation in all-cause mortality across the UK\",\r\n       subtitle=subtitle,\r\n       caption=\"Data from ONS, NRS & NISRA | Plot by @VictimOfMaths\")+\r\n  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 (+\",\r\n                                                                   round(UK.excess.region[1,4]*100, 0),\"%)\"), \r\n                                                            paste0(\"+\", round(UK.excess.region[2,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[2,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[3,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[3,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[4,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[4,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[5,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[5,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[6,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[6,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[7,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[7,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[8,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[8,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[9,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[9,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[10,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[10,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[11,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[11,4]*100, 0),\"%)\"),\r\n                                                            paste0(\"+\", round(UK.excess.region[12,2],0),\" deaths (+\",\r\n                                                                   round(UK.excess.region[12,4]*100, 0),\"%)\")), \r\n            size=2.6, colour=rep(\"Red\", 12), hjust=0, family=\"Lato\")\r\n\r\n\r\n\r\nagg_tiff(\"Outputs/ONSNRSNISRAWeeklyDeathsxReg2.tiff\", units=\"in\", width=12, height=8, res=500)\r\nRegPlot2\r\ndev.off()  \r\n\r\nplot16 <- data.reg.UK %>%\r\n  group_by(region, year) %>%\r\n  arrange(region, year, date) %>% \r\n  mutate(cumul_deaths=cumsum(deaths),\r\n         week=if_else(region==\"Northern Ireland\" & year==2021, week-53, week))\r\n\r\nagg_tiff(\"Outputs/ONSNRSNISRAWeeklyCumulDeaths_reg.tiff\", units=\"in\", width=12, height=8, res=350)\r\nggplot()+\r\n  geom_line(data=subset(plot16, year!=2020), aes(x=week, y=cumul_deaths, group=as.factor(year)), colour=\"Grey80\")+\r\n  geom_line(data=subset(plot16, year==2020), aes(x=week, y=cumul_deaths), colour=\"Tomato\")+\r\n  geom_line(data=subset(plot16, year==2021), aes(x=week, y=cumul_deaths), colour=\"darkorchid\")+\r\n  theme_classic()+\r\n  facet_wrap(~region)+\r\n  scale_x_continuous(name=\"Week number\")+\r\n  scale_y_continuous(name=\"Deaths registered\")+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\"),\r\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Some parts of the UK have seen almost as many excess deaths in 2021 as in 2020\",\r\n       subtitle=\"Cumulative deaths from all causes in <span style='color:Tomato;'>2020</span> and <span style='color:darkorchid;'>2021</span> compared to <span style='color:Grey60;'>the range in 2010-19</span>\",\r\n       caption=\"Data from ONS, NRS & NISRA | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "All Cause Mortality/AllCauseDeathsxAge.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(paletteer)\nlibrary(curl)\nlibrary(readxl)\nlibrary(lubridate)\nlibrary(forcats)\nlibrary(ggtext)\nlibrary(HMDHFDplus)\n\noptions(scipen=9999)\n\n#Read in data for England & Wales (created by AllCauseMortality.R)\ndata.EW <- read.csv(\"Data/deaths_age_EW.csv\")\n\n#Tidy to match Scottish data\ndata.EW <- data.EW[,c(5,6,4,3,7)]\ncolnames(data.EW) <- c(\"year\", \"week\", \"age\", \"deaths\", \"country\")\ndata.EW <- subset(data.EW, age!=\"Total\")\ndata.EW$age <- if_else(data.EW$age==\"Under 1 year\", \"0-14\", as.character(data.EW$age))\ndata.EW$age <- if_else(data.EW$age==\"01-14\", \"0-14\", as.character(data.EW$age))\n\ndata.EW <- data.EW %>%\n  group_by(age, year, week, country) %>%\n  summarise(deaths=sum(deaths))\n\n#Read in Scottish data\n#Weekly age-specific data is published by NRS\ntemp <- tempfile()\ntemp <- curl_download(url=\"https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-51.xlsx\", destfile=temp, quiet=FALSE, mode=\"wb\")\ndata2020.S <- data.frame(t(read_excel(temp, sheet=\"Table 2 \", range=\"C15:BA21\", col_names=FALSE)))\ndate <- data.frame(date=format(seq.Date(from=as.Date(\"2019-12-30\"), by=\"7 days\", length.out=nrow(data2020.S)), \"%d/%m/%y\"))\ndata2020.S <- cbind(date, data2020.S)\ncolnames(data2020.S) <- c(\"date\", \"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")\ndata2020.S$date <- as.Date(data2020.S$date, \"%d/%m/%y\")\ndata2020.S$weekno <- week(data2020.S$date)\n\ndata2020.S_long <- gather(data2020.S, age, deaths, c(2:8))\ndata2020.S_long$year <- 2020\ndata2020.S_long$deaths <- as.numeric(ifelse(data2020.S_long$deaths==\".\", 0, data2020.S_long$deaths))\n\n#Recalculate dates to align with ONS data (which uses week to, not w/c)\ndata2020.S_long$date <- data2020.S_long$date+days(6)\ndata2020.S_long$week <- week(data2020.S_long$date)\n\ndata2020.S_long$age <- if_else(data2020.S_long$age==\"Under 1 year\", \"0-14\", data2020.S_long$age)\ndata2020.S_long$age <- if_else(data2020.S_long$age==\"01-14\", \"0-14\", data2020.S_long$age)\ndata2020.S_long$age <- as.factor(data2020.S_long$age)\n\ndata2020.S_long <- data2020.S_long %>%\n  group_by(week, year, age) %>%\n  summarise(deaths=sum(deaths))\n\n#Bring in 2010-2019 data\ntemp <- tempfile()\ntemp <- 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\")\ndata2010.S <- read_excel(temp, sheet=\"2010\", range=\"B4:BD44\", col_names=TRUE)\ndata2010.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2010.S_long <- gather(data2010.S, week, deaths, c(3:55))[,-c(2)]\ndata2010.S_long$year <- 2010\n\ndata2011.S <- read_excel(temp, sheet=\"2011\", range=\"B4:BD44\", col_names=TRUE)\ndata2011.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2011.S_long <- gather(data2011.S, week, deaths, c(3:55))[,-c(2)]\ndata2011.S_long$year <- 2011\n\ndata2012.S <- read_excel(temp, sheet=\"2012\", range=\"B4:BD44\", col_names=TRUE)\ndata2012.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2012.S_long <- gather(data2012.S, week, deaths, c(3:55))[,-c(2)]\ndata2012.S_long$year <- 2012\n\ndata2013.S <- read_excel(temp, sheet=\"2013\", range=\"B4:BD44\", col_names=TRUE)\ndata2013.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2013.S_long <- gather(data2013.S, week, deaths, c(3:55))[,-c(2)]\ndata2013.S_long$year <- 2013\n\ndata2014.S <- read_excel(temp, sheet=\"2014\", range=\"B4:BD44\", col_names=TRUE)\ndata2014.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2014.S_long <- gather(data2014.S, week, deaths, c(3:55))[,-c(2)]\ndata2014.S_long$year <- 2014\n\ndata2015.S <- read_excel(temp, sheet=\"2015\", range=\"B4:BD44\", col_names=TRUE)\ndata2015.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2015.S_long <- gather(data2015.S, week, deaths, c(3:55))[,-c(2)]\ndata2015.S_long$year <- 2015\n\ndata2016.S <- read_excel(temp, sheet=\"2016\", range=\"B4:BD44\", col_names=TRUE)\ndata2016.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2016.S_long <- gather(data2016.S, week, deaths, c(3:55))[,-c(2)]\ndata2016.S_long$year <- 2016\n\ndata2017.S <- read_excel(temp, sheet=\"2017\", range=\"B4:BD44\", col_names=TRUE)\ndata2017.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2017.S_long <- gather(data2017.S, week, deaths, c(3:55))[,-c(2)]\ndata2017.S_long$year <- 2017\n\ndata2018.S <- read_excel(temp, sheet=\"2018\", range=\"B4:BD44\", col_names=TRUE)\ndata2018.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2018.S_long <- gather(data2018.S, week, deaths, c(3:55))[,-c(2)]\ndata2018.S_long$year <- 2018\n\ndata2019.S <- read_excel(temp, sheet=\"2019\", range=\"B4:BD44\", col_names=TRUE)\ndata2019.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2019.S_long <- gather(data2019.S, week, deaths, c(3:55))[,-c(2)]\ndata2019.S_long$year <- 2019\n\ndata1019.S_long <- bind_rows(data2010.S_long, data2011.S_long, data2012.S_long, data2013.S_long,\n                             data2014.S_long, data2015.S_long, data2016.S_long, data2017.S_long,\n                             data2018.S_long, data2019.S_long)\n\n#Match age bands\ndata1019.S_long$age <- case_when(\n  data1019.S_long$Age==\"0\" ~ \"0-14\",\n  data1019.S_long$Age==\"1-4\" ~ \"0-14\",\n  data1019.S_long$Age==\"5-9\" ~ \"0-14\",\n  data1019.S_long$Age==\"10-14\" ~ \"0-14\",\n  data1019.S_long$Age==\"15-19\" ~ \"15-44\",\n  data1019.S_long$Age==\"20-24\" ~ \"15-44\",\n  data1019.S_long$Age==\"25-29\" ~ \"15-44\",\n  data1019.S_long$Age==\"30-34\" ~ \"15-44\",\n  data1019.S_long$Age==\"35-39\" ~ \"15-44\",\n  data1019.S_long$Age==\"40-44\" ~ \"15-44\",\n  data1019.S_long$Age==\"45-49\" ~ \"45-64\",\n  data1019.S_long$Age==\"50-54\" ~ \"45-64\",\n  data1019.S_long$Age==\"55-59\" ~ \"45-64\",\n  data1019.S_long$Age==\"60-64\" ~ \"45-64\",\n  data1019.S_long$Age==\"65-69\" ~ \"65-74\",\n  data1019.S_long$Age==\"70-74\" ~ \"65-74\",\n  data1019.S_long$Age==\"75-79\" ~ \"75-84\",\n  data1019.S_long$Age==\"80-84\" ~ \"75-84\",\n  data1019.S_long$Age==\"85-89\" ~ \"85+\",\n  data1019.S_long$Age==\"90+\" ~ \"85+\"\n)\n\ndata1019.S <- data1019.S_long %>%\n  group_by(year, week, age) %>%\n  summarise(deaths=sum(deaths))\n\ndata1019.S$week <- as.integer(data1019.S$week)\n\ndata.S <- bind_rows(data1019.S, data2020.S_long)\ndata.S$country <- \"Scotland\"\n\ndata <- bind_rows(data.S, data.EW)\n\n#Read in NI data (for 2020 only)\ntemp <- tempfile()\ntemp <- curl_download(url=\"https://www.nisra.gov.uk/sites/nisra.gov.uk/files/publications/Weekly_Deaths.xls\", \n                      destfile=temp, quiet=FALSE, mode=\"wb\")\ndata2020.NI <- read_excel(temp, sheet=\"Table 2\", range=\"D7:BA14\", col_names=FALSE)\ncolnames(data2020.NI) <- c(1:ncol(data2020.NI))\n\ndata2020.NI$year <- 2020\ndata2020.NI$age <- c(\"0-14\", \"0-14\", \"0-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")\n\ndata2020.NI_long <- gather(data2020.NI, week, deaths, c(1:(ncol(data2020.NI)-2)))\n\ndata2020.NI_long <- data2020.NI_long %>%\n  group_by(age, week, year) %>%\n  summarise(deaths=sum(deaths))\n\ndata2020.NI_long$country <- \"Northern Ireland\"\ndata2020.NI_long$week <- as.integer(data2020.NI_long$week)\n\ndata <- bind_rows(data, data2020.NI_long)\n\n#Bring in populations\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2001tomid2019detailedtimeseries/myeb1.zip\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\npopdata <- read.csv(file.path(temp2,\"MYEB1_detailed_population_estimates_series_UK_(2019_geog20).csv\"))\n\npopdata$age <- case_when(\n  popdata$age<15 ~ \"0-14\",\n  popdata$age<45 ~ \"15-44\",\n  popdata$age<65 ~ \"45-64\",\n  popdata$age<75 ~ \"65-74\",\n  popdata$age<85 ~ \"75-84\",\n  TRUE ~ \"85+\")\n\npopdata$country <- case_when(\n  popdata$country==\"S\" ~ \"Scotland\",\n  popdata$country==\"N\" ~ \"Northern Ireland\",\n  TRUE ~ \"England & Wales\")\n\npopdata <- popdata %>%\n  group_by(age, country) %>%\n  summarise(pop_2010=sum(population_2010), pop_2011=sum(population_2011), pop_2012=sum(population_2012),\n            pop_2013=sum(population_2013), pop_2014=sum(population_2014), pop_2015=sum(population_2015),\n            pop_2016=sum(population_2016), pop_2017=sum(population_2017), pop_2018=sum(population_2018),\n            pop_2019=sum(population_2019), pop_2020=sum(population_2019))\n\npopdata_long <- gather(popdata, year, pop, c(3:13))\npopdata_long$year <- as.integer(substr(popdata_long$year, 5, 8))\n\n#Merge into main data\ndata <- merge(data, popdata_long)\n\ndata$mortrate <- data$deaths*100000/data$pop\n\n#take a copy for later\ndata.UK <- data\n\n#Calculate 2010-19 average, min and max\nhist.data <- data %>%\n  filter(year!=2020) %>%\n  group_by(age, country, week) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),\n            mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))\n\ndata <- merge(hist.data, subset(data, year==2020)[,c(2:5,7)], all.x=TRUE, all.y=TRUE)\n\n#Tidy up before plotting\ndata$country <- factor(data$country, levels=c(\"England & Wales\", \"Scotland\", \"Northern Ireland\"))\ndata$age <- ifelse(data$age==\"01-14\", \"0-14\", data$age)\n\n#Calculate excess deaths in 2020 vs. historic mean\nexcess <- data %>%\n  group_by(age, country) %>%\n  filter(!is.na(deaths) & week<20) %>%\n  summarise(deaths=sum(deaths), mean=sum(mean_d), place=mean(mean_r))\n\nexcess$excess <- excess$deaths-excess$mean\nexcess$prop <- excess$excess/excess$mean\n\nann_text <- data.frame(week=rep(21, times=18), mean_r=excess$place*1.3+0.4, \n                       country=rep(c(\"England & Wales\", \"Scotland\", \"Northern Ireland\"), times=6),\n                       age=rep(c(\"0-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"), each=3))\n\ntiff(\"Outputs/ExcessDeathsxAgexCountry.tiff\", units=\"in\", width=10, height=10, res=300)\nggplot(data)+\n  geom_ribbon(aes(x=week, ymin=min_r, ymax=max_r), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_r, ymax=mortrate), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_r), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=mortrate), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths per 100,000\")+\n  facet_grid(age~country, scales=\"free_y\")+\n  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\"),\n                                                          paste0(\"\", round(excess[2,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[3,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[4,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[5,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[6,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[7,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[8,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[9,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[10,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[11,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[12,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[13,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[14,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[15,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[16,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[17,7]*100,0), \"%\"),\n                                                          paste0(\"+\", round(excess[18,7]*100,0), \"%\")),\n            size=3, colour=\"Red\", hjust=0)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face=\"bold\"), \n        plot.subtitle =element_markdown())+\n  labs(title=\"Excess deaths in England are higher in 45-84 year-olds than elsewhere in the UK\",\n       subtitle=\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>.\",\n       caption=\"Date from ONS, NRS & NISRA | Plot by @VictimOfMaths\")\n\ndev.off()\n\n#Bring in data from HMD\ntemp <- tempfile()\ntemp <- curl_download(url=\"https://www.mortality.org/Public/STMF/Outputs/stmf.csv\", destfile=temp, quiet=FALSE, mode=\"wb\")\nHMDdata <- read_delim(temp, delim=\",\", comment=\"#\")\n\n#Keep only combined sex data and from years 2010 onwards\nHMDdata <- subset(HMDdata, Year>=2010 & Sex==\"b\")\n\n#Lengthen (there's probably (definitely) a more elegant pivot_longer() solution)\nHMD_long <- gather(HMDdata, age, deaths,c(5:9))[,c(1:3, 15, 16)]\nHMD_long$age <- substr(HMD_long$age, 2, 7)\ntemp <- gather(HMDdata, age, mortrate, c(11:15))[,c(1:3, 15, 16)]\ntemp$age <- substr(temp$age, 2, 7)\n\nHMD_long <- merge(HMD_long, temp)\n\ncolnames(HMD_long) <- c(\"country\", \"year\", \"week\", \"age\", \"deaths\", \"mortrate\")\n\n#Tidy up years\nHMD_long$age <- case_when(\n  HMD_long$age==\"0_14\" ~ \"0-14\",\n  HMD_long$age==\"15_64\" ~ \"15-64\",\n  HMD_long$age==\"65_74\" ~ \"65-74\",\n  HMD_long$age==\"75_84\" ~ \"75-84\",\n  HMD_long$age==\"85p\" ~ \"85+\")\n\n#Adjust HMD mortality rates from annualised per capita to weekly rates per 100,000\nHMD_long$mortrate <- HMD_long$mortrate*100000/52\n\n#Update UK data age groups to match HMD groups\ndata.UK$age <- case_when(\n  data.UK$age %in% c(\"15-44\", \"45-64\") ~ \"15-64\",\n  TRUE ~ data.UK$age)\n\ndata.UK <- data.UK %>%\n  group_by(age, year, week, country) %>%\n  summarise(deaths=sum(deaths), pop=sum(pop))\n\ndata.UK$mortrate <- data.UK$deaths*100000/data.UK$pop\n\n#Merge data excluding countries which are in HMD data, but which we've collected separately (with longer coverage)\nmergeddata <- bind_rows(subset(HMD_long, !(country %in% c(\"GBRTENW\", \"GBR_SCO\", \"FRATNP\", \"ITA\"))), data.UK[,-c(6)])\n\n#Calculate 2010-19 average, min and max\nhist.mergeddata <- mergeddata %>%\n  filter(year!=2020) %>%\n  group_by(age, country, week) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),\n            mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))\n\nfulldata <- merge(hist.mergeddata, subset(mergeddata, year==2020), all.x=TRUE, all.y=TRUE)\n\n#Bring in French data from Insee\n#File created by All Cause Deaths France.R\ndata.FR <- read.csv(\"Data/deaths_age_France.csv\")[,-c(1)]\n\n#Bring in French population from HMD (need to register and put your details in here)\nusername <- \"\" \npassword <- \"\"\n\nFraPop <- readHMDweb(CNTRY=\"FRATNP\", \"Exposures_1x1\", username, password)\n\nFraPop <- subset(FraPop, Year>=2010)\n\nFraPop$age <- case_when(\n  FraPop$Age<15 ~ \"0-14\",\n  FraPop$Age<65 ~ \"15-64\",\n  FraPop$Age<75 ~ \"65-74\",\n  FraPop$Age<85 ~ \"75-84\",\n  TRUE ~ \"85+\"\n)\n\nFraPop <- FraPop %>%\n  group_by(Year, age) %>%\n  summarise(pop=sum(Total))\n\n#Replicate 2017 populations for 2018+\ntemp <- subset(FraPop, Year==2017)\ntemp2 <- temp\ntemp3 <- temp\ntemp$Year <- 2018\ntemp2$Year <- 2019\ntemp3$Year <- 2020\n\nFraPop <- bind_rows(FraPop, temp, temp2, temp3)\n\ndata.FR <- merge(data.FR, FraPop, by.x=c(\"year\", \"ageband\"), by.y=c(\"Year\", \"age\"))\ncolnames(data.FR) <- c(\"year\", \"age\", \"week\", \"deaths\", \"pop\")\ndata.FR$mortrate=data.FR$deaths*100000/data.FR$pop\n\n#Calculate 2010-19 average, min and max\nhist.FR <- data.FR %>%\n  filter(year!=2020) %>%\n  group_by(age,week) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),\n            mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))\n\nfulldata.FR <- merge(hist.FR, subset(data.FR, year==2020), all.x=TRUE, all.y=TRUE)\n\nfulldata.FR <- fulldata.FR[,-c(11)]\nfulldata.FR$country <- \"France\"\n\nfulldata <- bind_rows(fulldata, fulldata.FR)\n\n#Bring in Italian data from ISTAT\n#File created by All Cause Deaths Italy.R\ndata.IT <- read.csv(\"Data/deaths_age_Italy.csv\")[,-c(1)]\n\n#Compress to match\ndata.IT$age <- case_when(\n  data.IT$age==\"0\" ~ \"0-14\",\n  data.IT$age==\"1-4\" ~ \"0-14\",\n  data.IT$age==\"5-9\" ~ \"0-14\",\n  data.IT$age==\"10-14\" ~ \"0-14\",\n  data.IT$age==\"15-19\" ~ \"15-64\",\n  data.IT$age==\"20-24\" ~ \"15-64\",\n  data.IT$age==\"25-29\" ~ \"15-64\",\n  data.IT$age==\"30-34\" ~ \"15-64\",\n  data.IT$age==\"35-39\" ~ \"15-64\",\n  data.IT$age==\"40-44\" ~ \"15-64\",\n  data.IT$age==\"45-49\" ~ \"15-64\",\n  data.IT$age==\"50-54\" ~ \"15-64\",\n  data.IT$age==\"55-59\" ~ \"15-64\",\n  data.IT$age==\"60-64\" ~ \"15-64\",\n  data.IT$age==\"65-69\" ~ \"65-74\",\n  data.IT$age==\"70-74\" ~ \"65-74\",\n  data.IT$age==\"75-79\" ~ \"75-84\",\n  data.IT$age==\"80-84\" ~ \"75-84\",\n  data.IT$age==\"85-89\" ~ \"85+\",\n  data.IT$age==\"90-94\" ~ \"85+\",\n  data.IT$age==\"95-99\" ~ \"85+\",\n  TRUE ~ \"85+\")\n\ndata.IT <- data.IT %>%\n  group_by(age, year, week) %>%\n  summarise(deaths=sum(deaths))\n\n#Bring in Italian population data from HMD\nItaPop <- readHMDweb(CNTRY=\"ITA\", \"Exposures_1x1\", username, password)\n\nItaPop <- subset(ItaPop, Year>=2010)\n\nItaPop$age <- case_when(\n  ItaPop$Age<15 ~ \"0-14\",\n  ItaPop$Age<65 ~ \"15-64\",\n  ItaPop$Age<75 ~ \"65-74\",\n  ItaPop$Age<85 ~ \"75-84\",\n  TRUE ~ \"85+\"\n)\n\nItaPop <- ItaPop %>%\n  group_by(Year, age) %>%\n  summarise(pop=sum(Total))\n\n#Replicate 2017 populations for 2018+\ntemp <- subset(ItaPop, Year==2017)\ntemp2 <- temp\ntemp3 <- temp\ntemp$Year <- 2018\ntemp2$Year <- 2019\ntemp3$Year <- 2020\n\nItaPop <- bind_rows(ItaPop, temp, temp2, temp3)\n\ndata.IT <- merge(data.IT, ItaPop, by.x=c(\"year\", \"age\"), by.y=c(\"Year\", \"age\"))\ndata.IT$mortrate=data.IT$deaths*100000/data.IT$pop\n\n#Calculate 2010-19 average, min and max\nhist.IT <- data.IT %>%\n  filter(year!=2020) %>%\n  group_by(age,week) %>%\n  summarise(mean_d=mean(deaths), max_d=max(deaths), min_d=min(deaths),\n            mean_r=mean(mortrate), max_r=max(mortrate), min_r=min(mortrate))\n\nfulldata.IT <- merge(hist.IT, subset(data.IT, year==2020), all.x=TRUE, all.y=TRUE)\n\nfulldata.IT <- fulldata.IT[,-c(11)]\nfulldata.IT$country <- \"Italy\"\n\nfulldata <- bind_rows(fulldata, fulldata.IT)\n\n#Use HMD data from Northern Ireland, rather than direct from NISRA - the 2020 data is slightly\n#less complete, but it does include 2010-19 data\n\nfulldata <- fulldata %>% filter(country!=\"Northern Ireland\")\n\n#Tidy up names\nfulldata$country <- case_when(\n  fulldata$country==\"AUT\" ~ \"Austria\",\n  fulldata$country==\"AUS2\" ~ \"Australia\",\n  fulldata$country==\"BEL\" ~ \"Belgium\",\n  fulldata$country==\"BGR\" ~ \"Bulgaria\",\n  fulldata$country==\"CAN\" ~ \"Canada\",\n  fulldata$country==\"CHE\" ~ \"Switzerland\",\n  fulldata$country==\"CHL\" ~ \"Chile\",\n  fulldata$country==\"CZE\" ~ \"Czechia\",\n  fulldata$country==\"DNK\" ~ \"Denmark\",\n  fulldata$country==\"DEUTNP\" ~ \"Germany\",\n  fulldata$country==\"ESP\" ~ \"Spain\",\n  fulldata$country==\"EST\" ~ \"Estonia\",\n  fulldata$country==\"FIN\" ~ \"Finland\",\n  fulldata$country==\"GBR_NIR\" ~ \"Northern Ireland\",\n  fulldata$country==\"GRC\" ~ \"Greece\",\n  fulldata$country==\"HRV\" ~ \"Croatia\",\n  fulldata$country==\"HUN\" ~ \"Hungary\",\n  fulldata$country==\"ISL\" ~ \"Iceland\",\n  fulldata$country==\"ISR\" ~ \"Israel\",\n  fulldata$country==\"KOR\" ~ \"South Korea\",\n  fulldata$country==\"LTU\" ~ \"Lithuania\",\n  fulldata$country==\"LUX\" ~ \"Luxembourg\",\n  fulldata$country==\"LVA\" ~ \"Latvia\",\n  fulldata$country==\"NLD\" ~ \"Netherlands\",\n  fulldata$country==\"NOR\" ~ \"Norway\",\n  fulldata$country==\"NZL_NP\" ~ \"New Zealand\",\n  fulldata$country==\"POL\" ~ \"Poland\",\n  fulldata$country==\"PRT\" ~ \"Portugal\",\n  fulldata$country==\"RUS\" ~ \"Russia\",\n  fulldata$country==\"SWE\" ~ \"Sweden\",\n  fulldata$country==\"SVK\" ~ \"Slovakia\",\n  fulldata$country==\"SVN\" ~ \"Slovenia\",\n  fulldata$country==\"TWN\" ~ \"Taiwan\",\n  TRUE ~ fulldata$country)\n\n#Remove most recent week of data for FIN, FRA, KOR, NOR, SVK, SWE and USA which is wonky/underreported\nfulldata <- fulldata %>%\n  group_by(age, country, year) %>%\n  mutate(last_week=max(week)) %>%\n  ungroup() %>%\n  filter(!(country %in% c(\"Finland\", \"USA\", \"Slovakia\", \"Norway\", \"Lithuania\", \"France\",\n                          \"South Korea\") & year==2020 & week==last_week))\n\n#Remove Russia which has no 2020 (or 2019) data\nfulldata <- fulldata %>% \n  filter(!country %in% c(\"Russia\"))\n\nExcessplot <- ggplot(fulldata)+\n  geom_ribbon(aes(x=week, ymin=min_r, ymax=max_r), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_r, ymax=mortrate), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_r), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=mortrate), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths per 100,000\")+\n  facet_grid(age~country, scales=\"free_y\")+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face=\"bold\"),\n        plot.subtitle =element_markdown())+\n  labs(title=\"Excess mortality rates by age group across Europe & the US\",\n       subtitle=\"Registered weekly death rates in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range for 2010-19\",\n       caption=\"Data from mortality.org, Insee, ISTAT, ONS, NRS and NISRA | Plot by @VictimOfMaths\")\n\ntiff(\"Outputs/ExcessEURUSxAge.tiff\", units=\"in\", width=35, height=10, res=300)\nExcessplot\ndev.off()\n\npng(\"Outputs/ExcessEURUSxAge.png\", units=\"in\", width=35, height=10, res=300)\nExcessplot\ndev.off()\n\n#15-64 year olds only\ntiff(\"Outputs/ExcessEURUSxAge1564.tiff\", units=\"in\", width=12, height=10, res=300)\nggplot(subset(fulldata, age==\"15-64\"))+\n  geom_ribbon(aes(x=week, ymin=min_r, ymax=max_r), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean_r, ymax=mortrate), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean_r), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=mortrate), colour=\"Red\")+\n  scale_x_continuous(name=\"Week number\")+\n  scale_y_continuous(\"Weekly deaths per 100,000\")+\n  facet_wrap(~country)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(size=rel(1), face=\"bold\"),\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"Bulgaria has seen far more excess deaths among people of working age than other countries\",\n       subtitle=\"Registered weekly death rates among 15-64 year-olds in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range for 2010-19\",\n       caption=\"Data from mortality.org, Insee, ISTAT, ONS and NRS | Plot by @VictimOfMaths\")\n\ndev.off()\n\n#Calculate excess mortality rate\nfulldata$excess_r <- fulldata$mortrate-fulldata$mean_r\n\ntiff(\"Outputs/ExcessRatexAgeEUR.tiff\", units=\"in\", width=10, height=6, res=500)\nggplot(subset(fulldata, age==\"15-64\"))+\n  geom_segment(aes(x=0, xend=29, y=0, yend=0))+\n  geom_line(aes(x=week, y=excess_r, colour=country))+\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20), limits=c(0,29))+\n  scale_y_continuous(\"Excess weekly deaths per 100,000 vs. 2010-19 average\")+\n  theme_classic()+\n  scale_colour_manual(values=c(rep(\"Grey90\", times=5), \"#D43F3A\", rep(\"Grey90\", times=3), \"#46B8DA\", \n                               rep(\"Grey90\", times=14), \"#357EBD\", rep(\"Grey90\", times=3),\n                               \"#9632B8\", rep(\"Grey90\", times=3), \"#EEA236\", rep(\"Grey90\", times=3), \n                               \"#5CB85C\"), name=\"Country\")+\n  labs(title=\"Some of these countries are not like the others\",\n       subtitle=\"Excess mortality rates in 15-64 year-olds in 2020\",\n       caption=\"Data from mortality.org, ONS, NRS, Insee and ISTAT\\nPlot by @VictimOfMaths\")\n\ndev.off()\n\n#Heatmaps of country and age-specific excess deaths\n#Calculate excess mortality counts and proportion\nfulldata$excess_d <- fulldata$deaths-fulldata$mean_d\n\nexcess <- fulldata %>%\n  filter(!is.na(excess_d)) %>%\n  group_by(age, country) %>%\n  summarise(excess=sum(excess_d), total=sum(deaths), excessprop=excess/total, maxweek=max(week))\n\nexcess$excessprop <- ifelse(excess$excessprop<=0, paste0(round(excess$excessprop*100, 0), \"%\"),\n                            paste0(\"+\", round(excess$excessprop*100, 0), \"%\"))\n\n#Get order for plots (sort by overall % increase in excess deaths)\nexcessrank <- excess %>%\n  group_by(country) %>%\n  summarise(excess=sum(excess), total=sum(total), excessprop=excess/total)\n\nexcessrank$country <- fct_reorder(as.factor(excessrank$country), -excessrank$excessprop)\n\n#plot of excess mortality in 2020\ntiff(\"Outputs/ExcessDeathsBars.tiff\", units=\"in\", width=10, height=8, res=500)\nggplot(excessrank, aes(y=country, x=excessprop, fill=excessprop))+\n  geom_col(show.legend=FALSE)+\n  scale_fill_paletteer_c(\"ggthemes::Classic Red-White-Green\", direction=-1, \n                         limit=c(-1,1)*max(abs(excessrank$excessprop)))+\n  scale_x_continuous(name=\"Change in all-cause deaths in 2020 vs. average in 2010-19\",\n                     breaks=c(-0.1,0,0.1,0.2), labels=c(\"-10%\", \"0\", \"+10%\", \"+20%\"))+\n  scale_y_discrete(name=\"\")+\n  theme_classic()+\n  theme(plot.title.position=\"plot\", plot.title=element_text(face=\"bold\"))+\n  labs(title=\"Spain's 'second wave' of COVID deaths means it's now seen the biggest rise in mortality in 2020\",\n       subtitle=\"All-cause deaths in 2020 vs. the average for 2010-19 for countries with data on mortality.org\",\n       caption=\"Data from mortality.org, Insee, ISTAT, ONS & NRS | Plot by @VictimOfMaths\")\n\ndev.off()\n\ntiff(\"Outputs/ExcessDeathsBarsAbs.tiff\", units=\"in\", width=10, height=8, res=500)\nggplot(excessrank, aes(y=fct_reorder(country, -excess), x=excess, fill=excess))+\n  geom_col(show.legend=FALSE)+\n  scale_fill_paletteer_c(\"ggthemes::Classic Red-White-Green\", direction=-1, \n                         limit=c(-1,1)*max(abs(excessrank$excess)))+\n  scale_x_continuous(name=\"Change in all-cause deaths in 2020 vs. average in 2010-19\")+\n  scale_y_discrete(name=\"\")+\n  theme_classic()+\n  theme(plot.title.position=\"plot\", plot.title=element_text(face=\"bold\"))+\n  labs(title=\"The US has seen far more deaths than anywhere in Europe during the pandemic\",\n       subtitle=\"All-cause deaths in 2020 vs. the average for 2010-19\",\n       caption=\"Data from mortality.org, Insee, ISTAT, ONS & NRS | Plot by @VictimOfMaths\")\n\ndev.off()\n\n#Calculate aggregate national data\nfulldata$pop <- fulldata$deaths*100000/fulldata$mortrate\n\n#Fix issue in Slovenia as some weeks have 0 deaths, so pop is undefined using this method\n#I bet there's an elegant dplyr solution to this\nfulldata$pop <- if_else(fulldata$country %in% c(\"Slovenia\", \"Northern Ireland\") & fulldata$year==\"2020\" & is.na(fulldata$pop) & fulldata$age==\"0-14\",\n                        max(fulldata$pop[fulldata$country==\"Slovenia\" & fulldata$year==\"2020\" & !is.na(fulldata$pop) & fulldata$age==\"0-14\"]), \n                        fulldata$pop)\nfulldata$pop <- if_else(fulldata$country %in% c(\"Slovenia\", \"Northern Ireland\") & fulldata$year==\"2020\" & is.na(fulldata$pop) & fulldata$age==\"15-64\",\n                        max(fulldata$pop[fulldata$country==\"Slovenia\" & fulldata$year==\"2020\" & !is.na(fulldata$pop) & fulldata$age==\"15-64\"]), \n                        fulldata$pop)\nfulldata$pop <- if_else(fulldata$country %in% c(\"Slovenia\", \"Northern Ireland\") & fulldata$year==\"2020\" & is.na(fulldata$pop) & fulldata$age==\"65-74\",\n                        max(fulldata$pop[fulldata$country==\"Slovenia\" & fulldata$year==\"2020\" & !is.na(fulldata$pop) & fulldata$age==\"65-74\"]), \n                        fulldata$pop)\nfulldata$pop <- if_else(fulldata$country %in% c(\"Slovenia\", \"Northern Ireland\") & fulldata$year==\"2020\" & is.na(fulldata$pop) & fulldata$age==\"75-84\",\n                        max(fulldata$pop[fulldata$country==\"Slovenia\" & fulldata$year==\"2020\" & !is.na(fulldata$pop) & fulldata$age==\"75-84\"]), \n                        fulldata$pop)\nfulldata$pop <- if_else(fulldata$country %in% c(\"Slovenia\", \"Northern Ireland\") & fulldata$year==\"2020\" & is.na(fulldata$pop) & fulldata$age==\"85+\",\n                        max(fulldata$pop[fulldata$country==\"Slovenia\" & fulldata$year==\"2020\" & !is.na(fulldata$pop) & fulldata$age==\"85+\"]), \n                        fulldata$pop)\n\nnatdata <- fulldata %>% \n  group_by(country, week) %>% \n  summarise(mean_d=sum(mean_d), min_d=sum(min_d), max_d=sum(max_d), deaths=sum(deaths), \n            pop=sum(pop), excess_d=sum(excess_d))\n\npop <- natdata %>% \n  filter(week==1) %>% \n  select(country, pop)\n\nnatdata <- merge(natdata, pop, by=\"country\")\n\nnatdata <- natdata %>% \n  mutate(mean_r=mean_d*100000/pop.y, min_r=min_d*100000/pop.y, max_r=max_d*100000/pop.y,\n         mortrate=deaths*100000/pop.y, excess_r=mortrate-mean_r)\n\ntiff(\"Outputs/ExcessEUROverall.tiff\", units=\"in\", width=10, height=8, res=500)\nggplot(subset(natdata, !country %in% c(\"Iceland\") & week<53))+\n  geom_ribbon(aes(x=week, ymax=max_r, ymin=min_r), fill=\"Skyblue2\")+\n  geom_line(aes(x=week, y=mortrate), colour=\"red\")+\n  geom_line(aes(x=week, y=mean_r), colour=\"Grey50\", linetype=2)+\n  geom_ribbon(aes(x=week, ymax=mortrate, ymin=mean_r), fill=\"red\", alpha=0.2)+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Deaths per 100,000\")+\n  facet_wrap(~country)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\"))+\n  labs(title=\"Excess mortality rates around the world\",\n       subtitle=\"Registered weekly death rates in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range for 2010-19</span>.<br>Note that due to differences in reporting delays, some countries are missing or undercounted in recent weeks\",\n       caption=\"Data from mortality.org, Insee, ISTAT, ONS, NRS and NISRA | Plot by @VictimOfMaths\")\n\ndev.off()  \n\ntiff(\"Outputs/ExcessUSA.tiff\", units=\"in\", width=10, height=8, res=500)\nggplot(subset(natdata, country==\"USA\" & week<53))+\n  geom_ribbon(aes(x=week, ymax=max_r, ymin=min_r), fill=\"Skyblue2\")+\n  geom_line(aes(x=week, y=mortrate), colour=\"red\")+\n  geom_line(aes(x=week, y=mean_r), colour=\"Grey50\", linetype=2)+\n  geom_ribbon(aes(x=week, ymax=mortrate, ymin=mean_r), fill=\"red\", alpha=0.2)+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Deaths per 100,000\", limits=c(0,NA))+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle=element_markdown())+\n  labs(title=\"Excess mortality in the United States of America\",\n       subtitle=\"Registered weekly death rates in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range for 2010-19</span><br> Data for most recent weeks is likely to be undercounted.\",\n       caption=\"Data from mortality.org | Plot by @VictimOfMaths\")\n\ndev.off()  \n\n#Plots\nplotage <- \"85+\"\nplotdata <- subset(fulldata, age==plotage & !is.na(excess_r))\nplotexcess <- subset(excess, age==plotage)\n\nplotdata$country <- factor(plotdata$country, levels=levels(excessrank$country))\n\nplotdata <- plotdata%>%\n  group_by(country) %>%\n  mutate(maxweek=max(week))\n\ntileplot <- ggplot()+\n  geom_tile(data=plotdata, aes(x=week, y=country, fill=excess_r))+\n  scale_x_continuous(limits=c(0,50), breaks=c(0,5,10,15,20,25,30,35,40,45,50), name=\"Week\")+\n  scale_y_discrete(name=\"\")+\n  scale_fill_paletteer_c(\"pals::kovesi.diverging_gwr_55_95_c38\", limit=c(-1,1)*max(abs(plotdata$excess_r)), \n                         name=\"Weekly excess deaths\\nper 100,000\")+\n  geom_text(data=subset(excess, age==plotage), aes(x=maxweek+1, y=country, label=excessprop), hjust=0, size=rel(3), colour=\"White\")+\n  labs(title=paste0(\"International variation in mortality rates in ages \", plotage),\n       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.\"),\n       caption=\"Data from mortality.org, Insee, ISTAT, ONS & NRS | Plot by @VictimOfMaths\")+\n  theme_classic()+\n  theme(panel.background=element_rect(fill=\"Black\"), plot.background=element_rect(fill=\"Black\"),\n        axis.line=element_line(colour=\"White\"), text=element_text(colour=\"White\"),\n        axis.text=element_text(colour=\"White\"), axis.ticks=element_line(colour=\"White\"),\n        legend.background=element_rect(fill=\"Black\"),legend.text=element_text(colour=\"White\"),\n        plot.title.position=\"plot\")\n\ntiff(paste0(\"Outputs/ExcessEURUSHeatmap\", plotage, \".tiff\"), units=\"in\", width=10, height=8, res=300)\ntileplot\ndev.off()\n\npng(paste0(\"Outputs/ExcessEURUSHeatmap\", plotage, \".png\"), units=\"in\", width=10, height=8, res=300)\ntileplot\ndev.off()\n\n#############################################\ntiff(\"Outputs/ExcessEURTiming.tiff\", units=\"in\", width=10, height=8, res=500)\nfulldata %>% \n  select(age, country, week, excess_r) %>% \n  group_by(country, age) %>% \n  filter(!is.na(excess_r) & excess_r>0 & !age %in% c(\"0-14\", \"15-64\") & \n           country %in% c(\"England & Wales\", \"France\", \"Italy\", \"Scotland\", \"Spain\", \n                          \"Sweden\", \"USA\")) %>% \n  mutate(max_excess=max(excess_r), maxprop=excess_r/max_excess) %>% \n  ggplot()+\n  geom_line(aes(x=week, y=maxprop, colour=age))+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Proportion of peak number of deaths by age group\",\n                     labels = scales::percent_format(accuracy = 1))+\n  scale_colour_paletteer_d(\"fishualize::Acanthurus_olivaceus\", name=\"Age\")+\n  facet_wrap(~country)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\n  labs(title=\"Was the mortality peak later in older age groups?\",\n       subtitle=\"Weekly all-cause deaths by age in 2020 as a proportion of the maximum weekly count for selected countries\",\n       caption=\"Data from ONS, Insee, ISTAT, NRS and mortality.org | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/COVIDAgeMortPred.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(arrow)\nlibrary(readxl)\nlibrary(RcppRoll)\nlibrary(paletteer)\nlibrary(lubridate)\nlibrary(geofacet)\nlibrary(scales)\nlibrary(extrafont)\nlibrary(ragg)\n\n#Select start data for analysis\nstartdate <- as.Date(\"2021-05-01\")\n\n#Pull in deaths data\ntemp <- tempfile()\nsource1 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newDeaths28DaysByDeathDate&format=csv\"\ntemp <- curl_download(url=source1, destfile=temp, quiet=FALSE, mode=\"wb\")\ndeaths1 <- read.csv(temp)\n\nsource2 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newDeaths28DaysByDeathDate&format=csv\"\ntemp <- curl_download(url=source2, destfile=temp, quiet=FALSE, mode=\"wb\")\ndeaths2 <- read.csv(temp)\n\nsource3 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newDeaths28DaysByDeathDate&format=csv\"\ntemp <- curl_download(url=source3, destfile=temp, quiet=FALSE, mode=\"wb\")\ndeaths3 <- read.csv(temp)\n\ndeaths <- bind_rows(deaths1, deaths2, deaths3) %>% \n  mutate(date=as.Date(date)) %>% \n  filter(date>startdate) %>%\n  group_by(areaCode, areaName) %>% \n  rename(deaths=newDeaths28DaysByDeathDate) %>% \n  #calculate rolling average\n  mutate(deathsroll=roll_mean(deaths, 7, align=\"center\", fill=NA_real_)) %>% \n  ungroup()\n\n#Get age-specific data\ntemp1 <- tempfile()\nsource1 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\ntemp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode=\"wb\")\n\ntemp2 <- tempfile()\nsource2 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\n\ntemp3 <- tempfile()\nsource3 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\ntemp3 <- curl_download(url=source3, destfile=temp3, quiet=FALSE, mode=\"wb\")\n\ndata <- read_csv_arrow(temp1) %>% \n  bind_rows(read_csv_arrow(temp2), read_csv_arrow(temp3)) %>% \n  select(c(1:6)) %>% \n  filter(age!=\"unassigned\") %>% \n  mutate(age=case_when(\n    age==\"00_04\" ~ \"0_4\",\n    age==\"05_09\" ~ \"5-9\",\n    TRUE ~ age),\n    age = age %>% str_replace(\"_\", \"-\") %>%\n      factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\n                      \"20-24\", \"25-29\", \"30-34\", \"35-39\", \n                      \"40-44\", \"45-49\", \"50-54\", \"55-59\", \n                      \"60-64\", \"65-69\", \"70-74\", \"75-79\", \n                      \"80-84\", \"85-89\", \"90+\"))) %>% \n  #Remove two bonus age categories that we don't need (0-59 and 60+)\n  filter(!is.na(age)) \n\nn.areas=length(unique(data$areaCode))\nn.ages=length(unique(data$age))\nmax.date.1=max(deaths$date[!is.na(deaths$deathsroll)], na.rm=TRUE)\nmax.date.2=max(data$date)\nmax.date=min(max.date.1, max.date.2)\n\n#Create future dataframe\nfuture <- data.frame(date=rep(seq.Date(from=as.Date(max.date.2+days(1)), \n                                   to=as.Date(max.date.2+days(71)), by=\"days\"), \n                              times=n.areas*n.ages),\n                     areaCode=rep(unique(data$areaCode), each=n.ages*71),\n                     age=rep(unique(data$age), times=n.areas*71),\n                     cases=0)\n\n#merge in areaName and areaType\nfuture <- data %>% \n  select(areaCode, areaName, areaType) %>%\n  unique() %>% \n  merge(future, by=\"areaCode\")\n\n#Read in CFR data provided by Dan Howdon\n#These estimates are not mine to share, sorry, contact Dan for more info.\n#https://medicinehealth.leeds.ac.uk/medicine/staff/447/dr-dan-howdon\nCFRdata <- read.csv(\"Data/cfrs_2021_07_07.csv\") %>% \n  mutate(age=case_when(\n    agegroup==0 ~ \"0-4\", agegroup==5 ~ \"5-9\", agegroup==10 ~ \"10-14\", agegroup==15 ~ \"15-19\",\n    agegroup==20 ~ \"20-24\", agegroup==25 ~ \"25-29\", agegroup==30 ~ \"30-34\", \n    agegroup==35 ~ \"35-39\", agegroup==40 ~ \"40-44\", agegroup==45 ~ \"45-49\", \n    agegroup==50 ~ \"50-54\", agegroup==55 ~ \"55-59\", agegroup==60 ~ \"60-64\", \n    agegroup==65 ~ \"65-69\", agegroup==70 ~ \"70-74\", agegroup==75 ~ \"75-79\",\n    agegroup==80 ~ \"80-84\", agegroup==85 ~ \"85-89\", TRUE ~ \"90+\"),\n    date=as.Date(date, format=\"%d/%m/%Y\"),\n    age = age %>% str_replace(\"_\", \"-\") %>%\n      factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\n                      \"20-24\", \"25-29\", \"30-34\", \"35-39\", \n                      \"40-44\", \"45-49\", \"50-54\", \"55-59\", \n                      \"60-64\", \"65-69\", \"70-74\", \"75-79\", \n                      \"80-84\", \"85-89\", \"90+\")))\n\nmaxCFRdate <- max(CFRdata$date[!is.na(CFRdata$cfr_month)])\n\n#Just extract the most recent monthly CFRs\nCFRs <- CFRdata %>% \n  filter(date==maxCFRdate) %>% \n  mutate(CFR=cfr_month*100) %>% \n  select(age, CFR)\n\n#Calculate expected deaths by age group based on case numbers and CFRs,\n#assuming an infection to death distribution that is lognormal with location 2.71 and\n#shape 0.56 from Wood 2020 https://arxiv.org/pdf/2005.02090.pdf\n#As used by https://www.cebm.net/covid-19/the-declining-case-fatality-ratio-in-england/\nlognorm <- dlnorm(1:70, meanlog=2.71, sdlog=0.56)\n\n#Start calculations from 1st September, so need to lag back at least 70 days \n#(Over 99.2% of deaths are within this time frame)\npred.data <- data %>% \n  filter(date>startdate-days(75)) %>% \n  bind_rows(future) %>% \n  merge(CFRs) %>% \n  mutate(tot.deaths=cases*CFR/100) %>% \n  #Calculate 7-day rolling average of cases\n  group_by(areaCode, areaName, areaType, age) %>% \n  arrange(date) %>% \n  #Distribute the deaths for each days cases based using the assumed distribution\n  #(I bet there is a sexy vectorised approach to this that can be \n  #written in a line or two)\n  mutate(exp.deaths=lag(tot.deaths,1)*lognorm[1]+\n           lag(tot.deaths,2)*lognorm[2]+\n           lag(tot.deaths,3)*lognorm[3]+\n           lag(tot.deaths,4)*lognorm[4]+\n           lag(tot.deaths,5)*lognorm[5]+\n           lag(tot.deaths,6)*lognorm[6]+\n           lag(tot.deaths,7)*lognorm[7]+\n           lag(tot.deaths,8)*lognorm[8]+\n           lag(tot.deaths,9)*lognorm[9]+\n           lag(tot.deaths,10)*lognorm[10]+\n           lag(tot.deaths,11)*lognorm[11]+\n           lag(tot.deaths,12)*lognorm[12]+\n           lag(tot.deaths,13)*lognorm[13]+\n           lag(tot.deaths,14)*lognorm[14]+\n           lag(tot.deaths,15)*lognorm[15]+\n           lag(tot.deaths,16)*lognorm[16]+\n           lag(tot.deaths,17)*lognorm[17]+\n           lag(tot.deaths,18)*lognorm[18]+\n           lag(tot.deaths,19)*lognorm[19]+\n           lag(tot.deaths,20)*lognorm[20]+\n           lag(tot.deaths,21)*lognorm[21]+\n           lag(tot.deaths,22)*lognorm[22]+\n           lag(tot.deaths,23)*lognorm[23]+\n           lag(tot.deaths,24)*lognorm[24]+\n           lag(tot.deaths,25)*lognorm[25]+\n           lag(tot.deaths,26)*lognorm[26]+\n           lag(tot.deaths,27)*lognorm[27]+\n           lag(tot.deaths,28)*lognorm[28]+\n           lag(tot.deaths,29)*lognorm[29]+\n           lag(tot.deaths,30)*lognorm[30]+\n           lag(tot.deaths,31)*lognorm[31]+\n           lag(tot.deaths,32)*lognorm[32]+\n           lag(tot.deaths,33)*lognorm[33]+\n           lag(tot.deaths,34)*lognorm[34]+\n           lag(tot.deaths,35)*lognorm[35]+\n           lag(tot.deaths,36)*lognorm[36]+\n           lag(tot.deaths,37)*lognorm[37]+\n           lag(tot.deaths,38)*lognorm[38]+\n           lag(tot.deaths,39)*lognorm[39]+\n           lag(tot.deaths,40)*lognorm[40]+\n           lag(tot.deaths,41)*lognorm[41]+\n           lag(tot.deaths,42)*lognorm[42]+\n           lag(tot.deaths,43)*lognorm[43]+\n           lag(tot.deaths,44)*lognorm[44]+\n           lag(tot.deaths,45)*lognorm[45]+\n           lag(tot.deaths,46)*lognorm[46]+\n           lag(tot.deaths,47)*lognorm[47]+\n           lag(tot.deaths,48)*lognorm[48]+\n           lag(tot.deaths,49)*lognorm[49]+\n           lag(tot.deaths,50)*lognorm[50]+\n           lag(tot.deaths,51)*lognorm[51]+\n           lag(tot.deaths,52)*lognorm[52]+\n           lag(tot.deaths,53)*lognorm[53]+\n           lag(tot.deaths,54)*lognorm[54]+\n           lag(tot.deaths,55)*lognorm[55]+\n           lag(tot.deaths,56)*lognorm[56]+\n           lag(tot.deaths,57)*lognorm[57]+\n           lag(tot.deaths,58)*lognorm[58]+\n           lag(tot.deaths,59)*lognorm[59]+\n           lag(tot.deaths,60)*lognorm[60]+\n           lag(tot.deaths,61)*lognorm[61]+\n           lag(tot.deaths,62)*lognorm[62]+\n           lag(tot.deaths,63)*lognorm[63]+\n           lag(tot.deaths,64)*lognorm[64]+\n           lag(tot.deaths,65)*lognorm[65]+\n           lag(tot.deaths,66)*lognorm[66]+\n           lag(tot.deaths,67)*lognorm[67]+\n           lag(tot.deaths,68)*lognorm[68]+\n           lag(tot.deaths,69)*lognorm[69]+\n           lag(tot.deaths,70)*lognorm[70]+\n           lag(tot.deaths,71)*(1-plnorm(70, meanlog=2.71, sdlog=0.56)))\n\n#Compare cases to deaths to sense check  \npred.data %>% filter(areaName==\"England\" & age==\"90+\") %>% \n  ggplot()+\n  geom_line(aes(x=date, y=cases, group=areaName), colour=\"Blue\")+\n  geom_line(aes(x=date, y=exp.deaths, group=areaName), colour=\"tomato\")\n\n#Calculate total deaths by age group that haven't yet happened\narea.pred.deathsxage <- pred.data %>% \n  filter(date>max.date.2) %>% \n  group_by(areaName, areaType, areaCode, age) %>% \n  summarise(exp.deaths=sum(exp.deaths))\n\narea.pred.deaths.total <- pred.data %>% \n  filter(date>max.date.2) %>% \n  group_by(areaName, areaType, areaCode) %>% \n  summarise(exp.deaths=sum(exp.deaths))\n\n#################\n#Compare CFR estimation period with subsequent observed data\nggplot()+\n  #geom_rect(aes(xmin=as.Date(\"2021-05-04\")-days(28), xmax=as.Date(\"2021-05-04\"), ymin=0, ymax=500), \n  #          fill=\"Grey80\")+\n  geom_col(data=subset(pred.data, areaName==\"England\" & date>=as.Date(\"2021-05-04\")-days(28)),\n         aes(x=as.Date(date), y=exp.deaths), fill=\"Skyblue\")+\n  geom_line(data=subset(deaths, date>as.Date(\"2021-05-04\")-days(28) & \n                          date<=as.Date(max.date.1)-days(3) & areaName==\"England\"), \n            aes(x=as.Date(date), y=deathsroll), colour=\"Red\")+\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\n  scale_x_date(name=\"\")+\n  scale_y_continuous(name=\"Expected daily deaths from COVID-19\")+\n  theme_classic()+\n  #annotate(\"text\", x=as.Date(\"2020-09-25\"), y=450, label=\"CFRs estimated\\nusing this data\")+\n  #annotate(\"text\", x=as.Date(\"2020-11-25\"), y=450, label=\"Deaths modelled\\nfrom estimated CFRs\")+\n  #annotate(\"text\", x=as.Date(\"2020-10-25\"), y=320, label=\"Actual deaths\")+\n  #geom_curve(aes(x=as.Date(\"2020-11-26\"), y=430, \n  #               xend=as.Date(\"2020-11-30\"), yend=300), curvature=-0.30, \n  #           arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  #geom_curve(aes(x=as.Date(\"2020-10-25\"), y=300, \n  #               xend=as.Date(\"2020-10-28\"), yend=250), curvature=0.25, \n  #           arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  labs(title=\"Case Fatality Rates estimated in October have stood up pretty well\",\n       subtitle=\"Actual vs modelled deaths based on age-specific CFRs fitted to data from 05/09 - 16/10\",\n       caption=\"Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths\")\n\n#Plot age-specific forecasts for England\nEnglabel <- round(area.pred.deaths.total$exp.deaths[area.pred.deaths.total$areaName==\"England\"],0)\n\nEngPlot <- ggplot()+\n  geom_col(data=subset(pred.data, areaName==\"England\" & date>max.date-days(28)),\n           aes(x=as.Date(date), y=exp.deaths, fill=age))+\n  geom_line(data=subset(deaths, date>max.date-days(28) &\n                          areaName==\"England\"), \n            aes(x=as.Date(date), y=deathsroll))+\n  geom_vline(xintercept=as.Date(max.date.1), linetype=2)+\n  scale_x_date(name=\"\",\n               breaks=pretty_breaks(n=interval(as.Date(\"2020-09-01\"), as.Date(max.date.1+days(71)))%/% months(1)))+\n  scale_y_continuous(name=\"Expected daily deaths from COVID-19\")+\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\n  annotate(\"text\", x=as.Date(\"2021-06-26\"), y=23, label=\"Actual deaths\")+\n  annotate(\"text\", x=as.Date(\"2021-08-03\"), y=20, label=\"Modelled deaths\")+\n  geom_curve(aes(x=as.Date(\"2021-06-28\"), y=22, \n                 xend=as.Date(\"2021-07-01\"), yend=19.5), curvature=0.15, \n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  geom_curve(aes(x=as.Date(\"2021-08-01\"), y=19, \n                 xend=as.Date(\"2021-07-20\"), yend=12), curvature=-0.25, \n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  theme_classic()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\n        plot.title.position=\"plot\", text=element_text(family=\"Lato\"),\n        plot.caption.position = \"plot\")+\n  labs(title=paste0(\"Even if COVID-19 disappeared today, we'd still expect \", Englabel, \n                    \" more COVID-19 deaths over the coming months\"),\n       subtitle=\"Modelled COVID-19 deaths in England based on confirmed cases and the latest age-specific Case Fatality Rates\",\n       caption=\"Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths\")\n\ntiff(\"Outputs/COVIDDeathForecastEng.tiff\", units=\"in\", width=12, height=7, res=500)\nEngPlot\ndev.off()\n\npng(\"Outputs/COVIDDeathForecastEng.png\", units=\"in\", width=12, height=7, res=500)\nEngPlot\ndev.off()\n\n#Plot age distribution of forecasted deaths for England\n\ntiff(\"Outputs/COVIDDeathForecastEngxAge.tiff\", units=\"in\", width=10, height=6, res=500)\narea.pred.deathsxage %>% \n  filter(areaName==\"England\") %>% \n  ggplot()+\n  geom_col(aes(x=exp.deaths, y=fct_rev(age), fill=age), show.legend=FALSE)+\n  geom_text(aes(x=exp.deaths, y=fct_rev(age), label=round(exp.deaths,0)),\n            hjust=-0.2)+\n  scale_x_continuous(name=\"Expected future COVID-19 deaths\")+\n  scale_y_discrete(name=\"Age\")+\n  scale_fill_paletteer_d(\"pals::stepped\")+\n  theme_classic()+\n  labs(title=\"The highest number of COVID-19 deaths is expected to be in 80-84 year-olds\",\n       subtitle=\"Modelled future COVID-19 deaths in England\",\n       caption=\"Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths\")\ndev.off()\n\n#Plot age-specific forecasts for anywhere you like\narea <- \"Bolton\"\nPlotlabel <- unique(round(area.pred.deaths.total$exp.deaths[area.pred.deaths.total$areaName==area],0))\n\nagg_tiff(paste0(\"Outputs/COVIDDeathForecast\",area,\".tiff\"), units=\"in\", width=10, height=8, res=500)\nggplot()+\n  geom_col(data=subset(pred.data, areaName==area),\n           aes(x=as.Date(date), y=exp.deaths, fill=age))+\n  geom_line(data=subset(deaths, areaName==area & date<=as.Date(max.date.2)),\n            aes(x=as.Date(date), y=deathsroll))+\n  geom_vline(xintercept=as.Date(max.date.1), linetype=2)+\n  scale_x_date(name=\"\",\n               breaks=pretty_breaks(n=interval(as.Date(\"2020-09-01\"), \n                                               as.Date(max.date.1+days(71)))%/% months(1)),\n               limits=c(as.Date(\"2021-05-01\"), NA))+\n  scale_y_continuous(name=\"Expected daily deaths from COVID-19\", limits=c(0,0.75))+\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\n  theme_classic()+\n  theme(plot.title.position=\"plot\", text=element_text(family=\"Lato\"),\n        plot.title=element_text(face=\"bold\", size=rel(1.4)))+\n  labs(title=paste0(\"Based on cases to date, we'd expect \", Plotlabel, \n                    \" more COVID-19 deaths in \", area),\n       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\",\n       caption=\"Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths\")\n\ndev.off()\n\n#Regional faceted plots\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\n                            \"South West\", \"London\", \"South East\"),\n                     row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),\n                     code=c(1:9))\npred.data <- arrange(pred.data, areaName)\n\nreglabs <- data.frame(areaName=unique(pred.data$areaName[pred.data$areaType==\"region\"]),\n                      total=round(area.pred.deaths.total$exp.deaths[area.pred.deaths.total$areaType==\"region\"],0))\nreglabs$label <- if_else(reglabs$areaName==\"North East\", paste0(reglabs$total, \" Expected\\nfuture deaths\"), \n                         as.character(reglabs$total))\n\n\ntiff(\"Outputs/COVIDDeathForecastReg.tiff\", units=\"in\", width=12, height=7, res=500)\npred.data %>% \n  filter(areaType==\"region\") %>% \n  ggplot()+\n  geom_col(aes(x=as.Date(date), y=exp.deaths, fill=age))+\n  geom_line(data=subset(deaths, areaName %in% c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\n                                            \"West Midlands\", \"East Midlands\", \"East of England\",\n                                            \"South West\", \"London\", \"South East\") & date<=as.Date(max.date.2)),\n            aes(x=as.Date(date), y=deathsroll, group=areaName))+\n  geom_vline(xintercept=as.Date(max.date.1), linetype=2)+\n  geom_text(data=reglabs, aes(x=as.Date(\"2021-05-22\"), y=7, label=label))+\n  scale_x_date(name=\"\",\n               breaks=pretty_breaks(n=interval(as.Date(\"2020-09-01\"), as.Date(max.date.1+days(71)))%/% months(1)))+\n  scale_y_continuous(name=\"Expected daily deaths from COVID-19\")+\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\n  facet_geo(~areaName, grid=mygrid)+\n  theme_classic()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)), strip.background=element_blank(),\n        strip.text=element_text(face=\"bold\", size=rel(1)),\n        text=element_text(family=\"Lato\"),\n        axis.text=element_text(size=rel(0.7)))+\n  labs(title=\"All regions in England can expect to see a rise in COVID deaths\",\n       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\",\n       caption=\"Data from PHE | CFRs from Daniel Howden | Time to death distribution from Wood 2020 | Analysis and plot by @VictimOfMaths\")\n\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/COVIDCareHomeDeaths.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(forcats)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(lubridate)\r\nlibrary(ragg)\r\nlibrary(RcppRoll)\r\nlibrary(extrafont)\r\n\r\n#Increment by 7 each week\r\nMaxRange <- \"CH\"\r\n#Increment by 1 each week\r\nMaxRange2 <- \"M\"\r\n\r\n#Read in data on deaths in care home residents notified to CQC \r\n#https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/numberofdeathsincarehomesnotifiedtothecarequalitycommissionengland\r\ntemp21 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/numberofdeathsincarehomesnotifiedtothecarequalitycommissionengland/2021/20210329officialsensitivecoviddeathsnotifs20211.xlsx\"\r\ntemp21 <- curl_download(url=source, destfile=temp21, quiet=FALSE, mode=\"wb\")\r\n\r\n#2020 data\r\ntemp20 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/numberofdeathsincarehomesnotifiedtothecarequalitycommissionengland/2020/20210211coviddeathnotifs2020only.xlsx\"\r\ntemp20 <- curl_download(url=source, destfile=temp20, quiet=FALSE, mode=\"wb\")\r\n\r\n#Deaths from COVID \r\ndata.COVID.21 <- read_excel(temp21, sheet=\"Table 2\", range=paste0(\"A4:\", MaxRange, \"153\"),\r\n                         col_names=FALSE) %>% \r\n  gather(date, COVID, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-01-01\")+days(as.numeric(substr(date, 4,6))-2)) %>% \r\n  rename(name=`...1`)\r\n\r\ndata.COVID.20 <- read_excel(temp20, sheet=\"Table 2\", range=paste0(\"A4:JG153\"),\r\n                            col_names=FALSE) %>% \r\n  gather(date, COVID, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-04-10\")+days(as.numeric(substr(date, 4,6))-2)) %>% \r\n  rename(name=`...1`)\r\n\r\ndata.COVID <- bind_rows(data.COVID.21, data.COVID.20)\r\n\r\n#Deaths from all causes\r\ndata.all.21 <- read_excel(temp21, sheet=\"Table 3\", range=paste0(\"A4:\", MaxRange, \"153\"),\r\n                       col_names=FALSE) %>% \r\n  gather(date, AllCause, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-01-01\")+days(as.numeric(substr(date, 4,6))-2))%>% \r\n  rename(name=`...1`)\r\n\r\ndata.all.20 <- read_excel(temp20, sheet=\"Table 3\", range=paste0(\"A4:JG153\"),\r\n                          col_names=FALSE) %>% \r\n  gather(date, AllCause, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-04-10\")+days(as.numeric(substr(date, 4,6))-2))%>% \r\n  rename(name=`...1`)\r\n\r\ndata.all <- bind_rows(data.all.21, data.all.20)\r\n\r\n#Combine\r\ndata <- merge(data.COVID, data.all) %>% \r\n  #Calculate other causes\r\n  mutate(Other=AllCause-COVID, COVIDprop=if_else(is.na(COVID/AllCause), 0, COVID/AllCause)) %>% \r\n  gather(cause, deaths, c(3:5)) %>% \r\n  group_by(name, cause) %>% \r\n  mutate(deathsroll=roll_mean(deaths, 7, align=\"center\", fill=NA),\r\n         COVIDproproll=roll_mean(COVIDprop, 7, align=\"center\", fill=NA),\r\n         maxprop=max(COVIDproproll, na.rm=TRUE),\r\n         maxpropday=date[which(COVIDproproll==maxprop)][1],\r\n         cause=factor(cause, levels=c(\"Other\", \"COVID\", \"AllCause\"))) \r\n\r\ndata %>% \r\n  filter(name==\"England\" & cause!=\"AllCause\" & !is.na(deathsroll)) %>% \r\n  ggplot()+\r\n  geom_area(data=subset(data, name==\"England\" ),\r\n            aes(x=date, y=deathsroll, fill=cause), position=\"stack\")+\r\n  scale_x_date(name=\"\", breaks=pretty_breaks())+\r\n  scale_y_continuous(name=\"Daily deaths in care homes\")+\r\n  scale_fill_paletteer_d(\"NineteenEightyR::malibu\")+\r\n  theme_classic()\r\n\r\nplotfrom=min(data$date[!is.na(data$deathsroll)])\r\nplotto=max(data$date[!is.na(data$deathsroll)])\r\n\r\nagg_tiff(\"Outputs/ONSCQCDeathsxCause.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_area(data=subset(data, name==\"England\" & cause==\"COVID\" & !is.na(deathsroll)),\r\n            aes(x=date, y=deathsroll), fill=\"#F44B4B\")+\r\n  geom_area(data=subset(data, name==\"England\" & cause==\"Other\" & !is.na(deathsroll)),\r\n            aes(x=date, y=-deathsroll), fill=\"#F19743\")+\r\n  geom_hline(yintercept=0)+\r\n  scale_x_date(name=\"\", breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  scale_y_continuous(name=\"Daily deaths in care homes\", labels=abs)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        plot.subtitle=element_markdown(), text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"There are now very few COVID-19 deaths in care homes\",\r\n       subtitle=\"Deaths from <span style='color:#F44B4B;'>COVID-19</span> and <span style='color:#F19743;'>all other causes</span> notified to the Care Quality Commission, by date of notification\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Read in place of death data for care home residents\r\n#Deaths from All Causes\r\ndata.COVID.21.2 <- read_excel(temp21, sheet=\"Table 4\", range=paste0(\"A6:\", MaxRange2, \"9\"),\r\n                         col_names=FALSE) %>% \r\n  gather(week, AllCause, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4,6))+52,\r\n         location=case_when(\r\n           `...1` %in% c(\"Elsewhere\", \"Not Stated\") ~ \"Other/Unknown\",\r\n           TRUE ~ `...1`)) %>% \r\n  group_by(week, location) %>% \r\n  mutate(AllCause=as.numeric(AllCause)) %>% \r\n  summarise(AllCause=sum(AllCause)) %>% \r\n  ungroup()\r\n\r\ndata.COVID.20.2 <- read_excel(temp20, sheet=\"Table 4\", range=paste0(\"A6:AM9\"),\r\n                              col_names=FALSE) %>% \r\n  gather(week, AllCause, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4,6))+14,\r\n         location=case_when(\r\n           `...1` %in% c(\"Elsewhere\", \"Not Stated\") ~ \"Other/Unknown\",\r\n           TRUE ~ `...1`)) %>% \r\n  group_by(week, location) %>% \r\n  mutate(AllCause=as.numeric(AllCause)) %>% \r\n  summarise(AllCause=sum(AllCause)) %>% \r\n  ungroup()\r\n\r\ndata.COVID.2 <- bind_rows(data.COVID.21.2, data.COVID.20.2)\r\n\r\n#Deaths from COVID  \r\ndata.all.21.2 <- read_excel(temp21, sheet=\"Table 4\", range=paste0(\"A12:\", MaxRange2, \"15\"),\r\n                         col_names=FALSE) %>% \r\n  gather(week, COVID, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4,6))+52,\r\n         location=case_when(\r\n           `...1` %in% c(\"Elsewhere\", \"Not Stated\") ~ \"Other/Unknown\",\r\n           TRUE ~ `...1`)) %>% \r\n  group_by(week, location) %>% \r\n  mutate(COVID=as.numeric(COVID)) %>% \r\n  summarise(COVID=sum(COVID)) %>% \r\n  ungroup()\r\n  \r\ndata.all.20.2 <- read_excel(temp20, sheet=\"Table 4\", range=paste0(\"A12:AM159\"),\r\n                         col_names=FALSE) %>% \r\n  gather(week, COVID, c(2:ncol(.))) %>% \r\n  mutate(week=as.numeric(substr(week, 4,6))+14,\r\n         location=case_when(\r\n           `...1` %in% c(\"Elsewhere\", \"Not Stated\") ~ \"Other/Unknown\",\r\n           TRUE ~ `...1`)) %>% \r\n  group_by(week, location) %>% \r\n  mutate(COVID=as.numeric(COVID)) %>% \r\n  summarise(COVID=sum(COVID)) %>% \r\n  ungroup()\r\n\r\ndata.all.2 <- bind_rows(data.all.21.2, data.all.20.2) %>%   \r\n  #Merge\r\n  merge(data.COVID.2) %>% \r\n  mutate(Other=AllCause-COVID) %>% \r\n  gather(cause, deaths, c(3:5)) %>% \r\n  mutate(causeloc=case_when(\r\n    cause==\"COVID\" ~ paste0(\"COVID-19 deaths in \", location),\r\n    cause==\"Other\" ~ paste0(\"Other cause deaths in \", location)),\r\n    date=as.Date(\"2020-04-13\")+days(7*(week-16)))\r\n\r\nagg_tiff(\"Outputs/ONSCQCDeathsxCausexLoc.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(subset(data.all.2, cause!=\"AllCause\"))+\r\n  geom_col(aes(x=date, y=deaths, fill=causeloc))+\r\n  scale_x_date(name=\"\", breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  scale_y_continuous(name=\"Deaths of care home residents\")+\r\n  scale_fill_manual(values=c(\"#C70E7B\", \"#007BC3\", \"#EF7C12\", \"#FC6882\", \"#54BCD1\", \"#F4B95A\"),\r\n                    name=\"Cause and place of death\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)), text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Fewer care home residents are dying of COVID-19 in all settings\",\r\n       subtitle=\"Weekly deaths notified to the Care Quality Commission of care home residents\\nby cause and location.\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#heatmap\r\nagg_tiff(\"Outputs/ONSCQCDeathsHeatmap.tiff\", units=\"in\", width=13, height=14, res=500)\r\ndata %>% \r\n  filter(name!=\"England\" & cause==\"AllCause\" & !is.na(COVIDproproll)) %>% \r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=fct_reorder(name, maxpropday), fill=COVIDproproll))+\r\n  theme_classic()+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", name=\"Proportion of deaths\\ninvolving COVID\",\r\n                         labels=scales::percent)+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_x_date(name=\"\")+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)), text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"There are very few COVID-19 deaths in care homes anywhere in England\",\r\n       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.\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "All Cause Mortality/COVIDDeathsMSOA.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(gtools)\r\nlibrary(ggtext)\r\n\r\n#Download MSOA-level COVID deaths\r\ntemp <- tempfile()\r\nurl <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/deathsduetocovid19bylocalareaanddeprivation/december2020/covidlocalareadeprivationupdate.xlsx\"\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndeaths <- read_excel(temp, sheet=\"Table 5\", range=\"A13:AM7214\") %>% \r\n  select(-c(4,16,28))\r\n\r\ncolnames(deaths) <- c(\"MSOA11CD\", \"msoanm\", \"Name\", \"All.Mar\", \"All.Apr\", \"All.May\",\r\n                      \"All.Jun\", \"All.Jul\", \"All.Aug\", \"All.Sep\", \"All.Oct\", \"All.Nov\",\r\n                      \"All.Dec\", \"All.Total\", \"COVID.Mar\", \"COVID.Apr\", \"COVID.May\",\r\n                      \"COVID.Jun\", \"COVID.Jul\", \"COVID.Aug\", \"COVID.Sep\", \"COVID.Oct\",\r\n                      \"COVID.Nov\", \"COVID.Dec\", \"COVID.Total\", \"Other.Mar\", \"Other.Apr\",\r\n                      \"Other.May\", \"Other.Jun\", \"Other.Jul\", \"Other.Aug\", \"Other.Sep\",\r\n                      \"Other.Oct\", \"Other.Nov\", \"Other.Dec\", \"Other.Total\")\r\n\r\ndeaths <- pivot_longer(deaths, c(4:36), names_to=c(\"cause\", \"month\"), names_sep=\"\\\\.\", \r\n                       values_to=c(\"deaths\"))\r\n\r\ndeaths.total <- deaths %>% \r\n  filter(month==\"Total\") %>% \r\n  spread(cause, deaths) %>% \r\n  mutate(covprop=COVID/All)\r\n\r\n#Bring in deprivation estimates\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE)[,c(1,2,5,6)]\r\ncolnames(IMD) <- c(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\ntemp <- tempfile()\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, RGN11NM) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\npop <- read_excel(file.path(temp2, \"SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx\"),\r\n                  sheet=\"Mid-2019 Persons\", range=\"A6:G34758\", col_names=FALSE)[,c(1,7)]\r\ncolnames(pop) <- c(\"LSOA11CD\", \"pop\")\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  #Then merge into COVID case data\r\n  merge(deaths.total, by=\"MSOA11CD\", all=TRUE) %>% \r\n  rename(msoa11cd=MSOA11CD)\r\n\r\n#Download Carl Baker's lovely map\r\ntemp <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nBackground <- st_read(temp, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(temp, layer=\"4 MSOA hex\") %>% \r\n  left_join(IMD_MSOA, by=\"msoa11cd\")\r\n\r\nGroups <- st_read(temp, layer=\"2 Groups\")\r\n\r\nGroup_labels <- st_read(temp, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAs <- st_read(temp, layer=\"3 Local authority outlines (2019)\")\r\n\r\ntiff(\"Outputs/COVIDDeathsMSOA.tiff\", units=\"in\", width=10, height=8, res=800)\r\nggplot()+\r\n  geom_sf(data=Background, aes(geometry=geom))+\r\n  geom_sf(data=MSOA, aes(geometry=geom, fill=covprop), colour=NA)+\r\n  geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour=\"White\")+\r\n  geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of deaths\\nfrom COVID-19\", \r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"COVID-19 is responsible for a greater proportion of deaths in urban areas\",\r\n       subtitle=\"Proportion of all deaths in Mar-Dec 2020 which are due to COVID in Middle Super Output Areas\",\r\n       caption=\"Data from ONS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDDeathsMSOACumul.tiff\", units=\"in\", width=10, height=8, res=800)\r\nggplot()+\r\n  geom_sf(data=Background, aes(geometry=geom))+\r\n  geom_sf(data=MSOA, aes(geometry=geom, fill=COVID*100000/pop), colour=NA)+\r\n  geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour=\"White\")+\r\n  geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", direction=-1,\r\n                         name=\"Total COVID deaths\\nper 100,000\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"COVID-19 death rates are highest in the North of England\",\r\n       subtitle=\"Total COVID-19 deaths between March and December 2020 in English Middle Super Output Areas\",\r\n       caption=\"Data from ONS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bivariate cartogram\r\n#Bivariate map\r\nBVmapdata <- MSOA %>% \r\n  mutate(IMDtert=quantcut(-IMDrank, q=4, labels=FALSE),\r\n         covtert=quantcut(covprop, q=4, labels=FALSE))\r\n\r\n#Generate key\r\nkeydata <- data.frame(IMDtert=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4), \r\n                      covtert=c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4),\r\n                      RGB=c(\"#e8e8e8\",\"#b9dddd\",\"#89d3d3\",\"#5ac8c8\",\r\n                            \"#dabcd4\",\"#acb2ca\",\"#7ea8c1\",\"#509eb7\",\r\n                            \"#cc90c0\",\"#9f86b7\",\"#727dae\",\"#4573a5\",\r\n                            \"#be64ac\",\"#925ba4\",\"#67529c\",\"#3b4994\"))\r\n\r\n#Bring colours into main data for plotting\r\nBVmapdata <- left_join(BVmapdata, keydata, by=c(\"IMDtert\", \"covtert\")) %>% \r\n  mutate(RGB=if_else(substr(cuacode,1,1)==\"W\", \"White\", as.character(RGB)))\r\n\r\n#Bivariate map\r\nBVmap <- BVmapdata %>% \r\n  ggplot()+\r\n  geom_sf(data=Background, aes(geometry=geom))+\r\n  geom_sf(data=BVmapdata, aes(geometry=geom, fill=RGB), colour=NA)+\r\n  geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour=\"White\", size=0.5)+\r\n  geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_identity()+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"COVID-19 deaths are highest in deprived urban areas\",\r\n       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\",\r\n       caption=\"Data from PHE, ONS & MHCLG | Cartogram by @carlbaker | Plot by @VictimOfMaths\")\r\n\r\n#Bivariate key\r\nkey <- ggplot(keydata)+\r\n  geom_tile(aes(x=covtert, y=IMDtert, fill=RGB))+\r\n  scale_fill_identity()+\r\n  labs(x = expression(\"Greater % of deaths from COVID\" %->%  \"\"),\r\n       y = expression(\"Greater deprivation\" %->%  \"\")) +\r\n  theme_classic() +\r\n  # make font small enough\r\n  theme(\r\n    axis.title = element_text(size = 9),axis.line=element_blank(), \r\n    axis.ticks=element_blank(), axis.text=element_blank())+\r\n  # quadratic tiles\r\n  coord_fixed()\r\n\r\n#Final plot\r\ntiff(\"Outputs/COVIDDeathPropMSOA.tiff\", units=\"in\", width=8, height=10, res=500)\r\nggdraw()+\r\n  draw_plot(BVmap, 0,0,1,1)+\r\n  draw_plot(key, 0.68,0.66,0.28,0.28) \r\ndev.off()\r\n\r\n#Scatterplot\r\ntiff(\"Outputs/COVIDDeathPropMSOAScatter.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(IMD_MSOA, aes(x=covprop, y=-IMDrank, colour=COVID))+\r\n  geom_point()+\r\n  geom_smooth(method=\"lm\", colour=\"Darkred\")+\r\n  scale_x_continuous(name=\"Proportion of all deaths which were from COVID\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_y_continuous(name=\"Index of Multiple Deprivation\",\r\n                     breaks=c(-max(IMD_MSOA$IMDrank, na.rm=TRUE), \r\n                              -min(IMD_MSOA$IMDrank, na.rm=TRUE)),\r\n                     labels=c(\"Least Deprived\", \"Most Deprived\"))+\r\n  scale_colour_paletteer_c(\"pals::ocean.haline\", name=\"Total COVID deaths\",\r\n                           direction=-1)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"On average more deprived areas have seen more COVID-19 deaths\",\r\n       subtitle=\"Proportion of all deaths in March-December 2020 which were due to COVID-19 by deprivation\\nin English Middle Super Output Areas\",\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#########################################################################\r\n#Look at wave 1 vs. wave 2 deaths\r\nwaves <- deaths %>% \r\n  filter(month!=\"Total\") %>% \r\n  mutate(wave=if_else(month %in% c(\"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\"), \"Wave 1\", \"Wave 2\")) %>% \r\n  group_by(MSOA11CD, cause, wave) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  spread(wave, deaths) %>% \r\n  ungroup() %>% \r\n  mutate(ratio=`Wave 1`/(`Wave 1`+ `Wave 2`)) %>% \r\n  rename(msoa11cd=MSOA11CD)\r\n\r\n#Merge into map\r\ntemp <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nBackground <- st_read(temp, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(temp, layer=\"4 MSOA hex\") %>% \r\n  left_join(waves, by=\"msoa11cd\")\r\n\r\nGroups <- st_read(temp, layer=\"2 Groups\")\r\n\r\nGroup_labels <- st_read(temp, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAs <- st_read(temp, layer=\"3 Local authority outlines (2019)\")\r\n\r\ntiff(\"Outputs/COVIDDeathsMSOAWaves.tiff\", units=\"in\", width=10, height=8, res=800)\r\nggplot()+\r\n  geom_sf(data=Background, aes(geometry=geom), fill=\"Grey60\")+\r\n  geom_sf(data=MSOA, aes(geometry=geom, fill=ratio), colour=NA)+\r\n  geom_sf(data=LAs, aes(geometry=geom), fill=NA, colour=\"Grey40\", size=0.1)+\r\n  geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.balance\",\r\n                         name=\"\", breaks=c(0, 0.5, 1),\r\n                         labels=c(\"More deaths\\nin Aug-Dec\", \"Equal deaths\", \"More deaths\\nin Mar-Jul\"))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"There seems to be little evidence for 'herd immunity' for mortality even at small geographies\",\r\n       subtitle=\"Proportion of total COVID-19 deaths which occurred in <span style='color:#982629;'>March-July</span> compared to <span style='color:#1d4e9f;'>August-December</span>.<br>Data at Middle Super Output Area level\",\r\n       caption=\"Data from ONS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "All Cause Mortality/COVIDDeathsxAgeEW.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(extrafont)\r\nlibrary(ggtext)\r\nlibrary(ggstream)\r\nlibrary(paletteer)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Get 2021 COVID deaths data\r\nurl21 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek3820211.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url21, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nCOVIDdeaths21 <- read_excel(temp, sheet=7, range=\"B12:AN31\", col_names=FALSE) %>% \r\n  gather(week, COVID, c(2:ncol(.))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 5))-1,\r\n         date=as.Date(\"2021-01-02\")+weeks(week-1))\r\n\r\n#Get 2020 COVID deaths data\r\nurl20 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url20, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nCOVIDdeaths20 <- read_excel(temp, sheet=6, range=\"B12:BC31\", col_names=FALSE) %>% \r\n  gather(week, COVID, c(2:ncol(.))) %>% \r\n  rename(age=`...1`) %>% \r\n  mutate(week=as.numeric(substr(week, 4, 5))-1,\r\n         date=as.Date(\"2019-12-28\")+weeks(week-1))\r\n\r\ndata <- bind_rows(COVIDdeaths20, COVIDdeaths21) %>% \r\n  mutate(age=factor(age, levels=c(\"<1\", \"1-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\", \"30-34\",\r\n                                  \"35-39\", \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\", \"65-69\",\r\n                                  \"70-74\", \"75-79\", \"80-84\", \"85-89\", \"90+\")))\r\n\r\nmeanage <- data %>% \r\n  group_by(date) %>% \r\n  mutate(agemid=case_when(\r\n    age==\"<1\" ~ 0.5, age==\"1-4\" ~ 2.5,  age==\"5-9\" ~ 7.5, age==\"10-14\" ~ 12.5,\r\n    age==\"15-19\" ~ 17.5, age==\"20-24\" ~ 22.5, age==\"25-29\" ~ 27.5, age==\"30-34\" ~ 32.5,\r\n    age==\"35-39\" ~ 37.5, age==\"40-44\" ~ 42.5, age==\"45-49\" ~ 47.5, age==\"50-54\" ~ 52.5,\r\n    age==\"55-59\" ~ 57.5, age==\"60-64\" ~ 62.5, age==\"65-69\" ~ 67.5,  age==\"70-74\" ~ 72.5,\r\n    age==\"75-79\" ~ 77.5, age==\"80-84\" ~ 82.5, age==\"85-89\" ~ 87.5, age==\"90+\" ~ 92.5)) %>% \r\n  summarise(meanage=weighted.mean(agemid, COVID)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDeathsMeanAge.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(meanage, aes(x=date, y=meanage))+\r\n  geom_line(colour=\"Red\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Average age of COVID death\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID vaccines have substantially reduced the average age of COVID deaths\",\r\n       subtitle=\"Mean age of deaths involving COVID by week of registration in England & Wales\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDeathsEWxAgeProp.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(data %>% filter(date>=as.Date(\"2020-03-07\")), aes(x=date, y=COVID, fill=age))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of COVID deaths\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The proportion of COVID deaths among older age groups fell as vaccines were rolled out\",\r\n       subtitle=\"Deaths involving COVID by age and week of registration in England & Wales\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDeathsEWxAge.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data %>% filter(date>=as.Date(\"2020-03-07\")), aes(x=date, y=COVID, fill=age))+\r\n  geom_col()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Deaths involving COVID\")+\r\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID deaths in the delta wave are much lower than previous waves for all ages\",\r\n       subtitle=\"Deaths involving COVID by age and week of registration in England & Wales\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDeathsEWxAgeStream.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data %>% filter(date>=as.Date(\"2020-03-07\")), aes(x=date, y=COVID, fill=age))+\r\n  geom_stream()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Deaths involving COVID\")+\r\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID deaths in the delta wave are much lower than previous waves for all ages\",\r\n       subtitle=\"Mean age of deaths involving COVID by week of registration in England & Wales\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "All Cause Mortality/COVIDDeathsxRegion.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(ukcovid19) #remotes::install_github(\"publichealthengland/coronavirus-dashboard-api-R-sdk\")\nlibrary(paletteer)\nlibrary(RcppRoll)\nlibrary(lubridate)\nlibrary(scales)\nlibrary(ragg)\n\n#Get daily regional death data\ndeaths.reg <- get_data(filters=\"areaType=region\", structure=list(date=\"date\",\n                                                                 name=\"areaName\",\n                                                                 deaths=\"newDeaths28DaysByDeathDate\"))\n\n#Bring in regional population\ndeaths.reg <- deaths.reg %>% \n  mutate(pop=case_when(\n    name==\"East of England\" ~ 6236072,\n    name==\"London\" ~ 8961989,\n    name==\"West Midlands\" ~ 5934037,\n    name==\"East Midlands\" ~ 4835928,\n    name==\"North East\" ~ 2669941,\n    name==\"Yorkshire and The Humber\" ~ 5502967,\n    name==\"North West\" ~ 7341196,\n    name==\"South East\" ~ 9180135,\n    name==\"South West\" ~ 5624696),\n    mortrate=deaths*100000/pop,\n    date=as.Date(date),\n    mortrateroll=roll_mean(mortrate, 7, align=\"center\", fill=NA)) %>% \n  arrange(date)\n\nmaxdate <- max(deaths.reg$date)\n\nagg_tiff(\"Outputs/COVIDDeathsxRegionLine.tiff\", units=\"in\", width=10, height=7, res=500)\ndeaths.reg %>% \n  filter(date<maxdate-days(3)) %>% \nggplot()+\n  geom_line(aes(x=date, y=mortrateroll, colour=name))+\n  theme_classic()+\n  scale_x_date(name=\"\", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+\n  scale_y_continuous(name=\"Daily COVID-19 deaths per 100,000\")+\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"Region\")+\n  labs(title=\"COVID-19 deaths are falling consistently across all regions of England\",\n       subtitle=\"Daily deaths per 100,000 within 28 days of a positive COVID-19 test\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))\ndev.off()\n\nagg_tiff(\"Outputs/COVIDDeathsxRegionLineRecent.tiff\", units=\"in\", width=10, height=7, res=500)\ndeaths.reg %>% \n  filter(date<maxdate-days(3) & date>as.Date(\"2020-09-01\")) %>% \n  ggplot()+\n  geom_line(aes(x=date, y=mortrateroll, colour=name))+\n  theme_classic()+\n  scale_x_date(name=\"\", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+\n  scale_y_continuous(name=\"Daily COVID-19 deaths per 100,000\")+\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"Region\")+\n  labs(title=\"Deaths associated with COVID-19 are still falling rapidly across England\",\n       subtitle=\"Daily deaths per 100,000 within 28 days of a positive COVID-19 test\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))\ndev.off()\n\n\n#Pull out peak Spring and Autumn deaths for each region\npeaks <- deaths.reg %>% \n  mutate(period=if_else(date<as.Date(\"2020-08-01\"), \"Wave 1\", \"Wave 2\")) %>% \n  group_by(name, period) %>% \n  summarise(peak=max(mortrateroll, na.rm=TRUE)) %>% \n  spread(period, peak)\n\nagg_tiff(\"Outputs/COVIDDeathsxRegionScatter.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(peaks)+\n  geom_point(aes(x=`Wave 1`, y=`Wave 2`, colour=name))+\n  geom_abline(intercept=0)+\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"Region\")+\n  theme_classic()+\n  scale_x_continuous(limits=c(0,3), name=\"Peak mortality rate Mar-Jul\\n7-day rolling average\")+\n  scale_y_continuous(limits=c(0,3), name=\"Peak mortality rate Aug-Jan\\n7-day rolling average\")+\n  labs(title=\"Correlation between the Spring and Autumn/Winter peaks is limited\",\n       subtitle=\"Deaths per 100,000 within 28 days of a positive COVID-19 test\",\n       caption=\"Date from PHE | Plot by @VictimOfMaths\")+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))\ndev.off()\n\n#National version\n#Get daily regional death data\ndeaths.nat <- get_data(filters=\"areaType=nation\", structure=list(date=\"date\",\n                                                                 name=\"areaName\",\n                                                                 deaths=\"newDeaths28DaysByDeathDate\"))\n\n#Bring in regional population\ndeaths.nat <- deaths.nat %>% \n  mutate(pop=case_when(\n    name==\"England\" ~ 56286961,\n    name==\"Scotland\" ~ 5463300,\n    name==\"Wales\" ~ 3152879,\n    name==\"Northern Ireland\" ~ 1893667),\n    mortrate=deaths*100000/pop,\n    date=as.Date(date)) %>% \n  arrange(date) %>% \n  group_by(name) %>% \n  mutate(mortrateroll=roll_mean(mortrate, 7, align=\"center\", fill=NA)) %>% \n  ungroup()\n  \n\nagg_tiff(\"Outputs/COVIDDeathsxCountryLine.tiff\", units=\"in\", width=10, height=7, res=500)\ndeaths.nat %>% \n  filter(date<maxdate-days(3)) %>% \n  ggplot()+\n  geom_line(aes(x=date, y=mortrateroll, colour=name))+\n  theme_classic()+\n  scale_x_date(name=\"\", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+\n  scale_y_continuous(name=\"Daily COVID-19 deaths per 100,000\")+\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\n  labs(title=\"Deaths linked to COVID-19 are falling in all four UK nations\",\n       subtitle=\"Daily deaths per 100,000 within 28 days of a positive COVID-19 test\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))\ndev.off()\n\nagg_tiff(\"Outputs/COVIDDeathsxCountryLineRecent.tiff\", units=\"in\", width=10, height=7, res=500)\ndeaths.nat %>% \n  filter(date<maxdate-days(3) & date>as.Date(\"2020-09-01\")) %>% \n  ggplot()+\n  geom_line(aes(x=date, y=mortrateroll, colour=name))+\n  theme_classic()+\n  scale_x_date(name=\"\", breaks=breaks_pretty(n=interval(min(deaths.reg$date, na.rm=TRUE), maxdate-days(3))%/% months(1)))+\n  scale_y_continuous(name=\"Daily COVID-19 deaths per 100,000\")+\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\n  labs(title=\"Mortality rates across the UK have been falling consistently since mid-January\",\n       subtitle=\"Daily deaths per 100,000 within 28 days of a positive COVID-19 test\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/COVIDExcessxLAxCause.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(forcats)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ggtext)\r\n\r\n#Read in data generated from https://github.com/VictimOfMaths/COVID_LA_Plots/blob/master/UnderlyingCode.R\r\nload(\"COVID_LA_Plots/Alldata.RData\")\r\n\r\n#Filter out occurence data (as we don't have historic occurence data for English & Welsh LAs)\r\nlocdata <- data %>% \r\n  filter(measure==\"Registrations\" & week>9)\r\n\r\n#Replace missing week 53 historic data with week 52 for England & Wales\r\ntemp <- locdata %>% \r\n  filter(week==52 & country!=\"Scotland\") %>% \r\n  select(week, location, code, deaths.1519) %>% \r\n  mutate(week=53) %>% \r\n  rename(deaths.1519alt=deaths.1519)\r\n\r\n#Calculate location-specific excess death rates for each LTLA\r\nlocdata <- locdata %>% \r\n  merge(temp, all.x=TRUE) %>% \r\n  mutate(deaths.1519=coalesce(deaths.1519, deaths.1519alt),\r\n         allexcess=AllCause.20-deaths.1519) %>% \r\n  group_by(name, Region, country, code, location, pop) %>% \r\n  summarise(deaths.1519=sum(deaths.1519), allexcess=sum(allexcess),\r\n            AllCause.20=sum(AllCause.20)) %>% \r\n  ungroup() %>% \r\n  group_by(name, Region, country, code, pop) %>% \r\n  mutate(alldeaths.1519=sum(deaths.1519), alldeaths.20=sum(AllCause.20)) %>% \r\n  ungroup() %>% \r\n  mutate(excessrate=allexcess*100000/pop, totexcessrate=(alldeaths.20-alldeaths.1519)*100000/pop,\r\n         name=fct_reorder(name, totexcessrate), excessprop=allexcess/deaths.1519,\r\n         totexcessprop=(alldeaths.20-alldeaths.1519)/alldeaths.1519)\r\n\r\nagg_tiff(\"Outputs/COVIDExcessPropxLAxLoc.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(locdata %>% filter(!Region %in% c(\"Region\", \"Nation\") & location==\"Hospital\" & totexcessprop>0.325),\r\n       aes(x=totexcessprop, y=fct_reorder(name, totexcessprop), fill=totexcessprop))+\r\n  geom_col(show.legend=FALSE)+\r\n  geom_vline(xintercept=0)+\r\n  scale_x_continuous(name=\"Proportional increase in deaths\",\r\n                     labels=scales::label_percent(accuracy=2))+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.amp\", limits=c(0,0.6))+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\"))+\r\n  labs(title=\"The Local Authorities with the biggest relative increases in deaths are mostly in London\",\r\n       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\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDExcessxLAxLoc.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(locdata %>% filter(!Region %in% c(\"Region\", \"Nation\") & totexcessrate>250),\r\n       aes(x=excessrate, y=name, fill=location))+\r\n  geom_col(position=\"stack\")+\r\n  geom_vline(xintercept=0)+\r\n  scale_x_continuous(name=\"Excess deaths per 100,000 population\")+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_paletteer_d(\"ggsci::planetexpress_futurama\", name=\"Place of death\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\"),\r\n        plot.title.position=\"plot\")+\r\n  labs(title=\"The Local Authorities in Great Britain with the highest excess mortality rates\",\r\n       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\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDExcessBaselineRatexLA.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(locdata %>% filter(!Region %in% c(\"Region\", \"Nation\") & location==\"Hospital\"),\r\n       aes(x=alldeaths.1519*100000/pop, y=fct_reorder(name, alldeaths.1519*100000/pop),\r\n       fill=Region))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Annual deaths per 100,000\")+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_manual(values=c(\"Grey60\", \"Grey60\", \"#FF007F\", rep(\"Grey60\", times=8)))+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), axis.text.y=element_blank(),\r\n        axis.line.y=element_blank(), axis.ticks.y=element_blank(),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Local Authorities in London have lower mortality rates\",\r\n       subtitle=\"Annual deaths per 100,000 in Local Authorities in <span style='color:#FF007F;'>London</span> compared to <span style='color:Grey60;'>the rest of Great Britain\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=1100, y=30, \r\n           label=\"Local Authorities in London have younger populations,\\non average, so see fewer deaths\", \r\n           family=\"Lato\", fontface=\"bold\", size=rel(3), colour=\"#FF007F\")+\r\n  geom_curve(aes(x=940, y=27, xend=600, yend=18), \r\n             colour=\"#FF007F\", curvature=-0.15, arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), \r\n             lineend=\"round\")\r\ndev.off()\r\n\r\n#Map of the excess mortality rates\r\nmapdata <- locdata %>% \r\n  filter(name==\"Buckinghamshire\") %>% \r\n  mutate(code=\"E07000004\") %>% \r\n  bind_rows(locdata)\r\n\r\nmapdata <- mapdata %>% \r\n  filter(code==\"E07000004\") %>% \r\n  mutate(code=\"E07000005\") %>% \r\n  bind_rows(mapdata)\r\n\r\nmapdata <- mapdata %>% \r\n  filter(code==\"E07000004\") %>% \r\n  mutate(code=\"E07000006\") %>% \r\n  bind_rows(mapdata)\r\n\r\nmapdata <- mapdata %>% \r\n  filter(code==\"E07000004\") %>% \r\n  mutate(code=\"E07000007\") %>% \r\n  bind_rows(mapdata)\r\n\r\n#Download Carl Baker's lovely map\r\nltla <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg\")\r\nltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode=\"wb\")\r\n\r\nBackground <- st_read(ltla, layer=\"7 Background\")\r\n\r\nltlacases <- st_read(ltla, layer=\"6 LTLA-2021\") %>% \r\n  left_join(mapdata, by=c(\"Lacode\"=\"code\"))\r\n\r\nGroups <- st_read(ltla, layer=\"2 Groups\")\r\n\r\nGroup_labels <- st_read(ltla, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nplot1 <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Hospital\"), \r\n          aes(geometry=geom, fill=totexcessrate), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Excess deaths\\nper 100,000\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Hospital\"))$totexcessrate)))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  annotate(\"text\", x=16, y=40, label=\"Excess deaths are highest\\nin the North-West\\nand West Midlands...\",\r\n           family=\"Lato\", fontface=\"bold\", size=rel(2.5), colour=\"#6e0a1e\")+\r\n  annotate(\"text\", x=50, y=1, label=\"...and isolated areas\\nin the South East\",\r\n           family=\"Lato\", fontface=\"bold\", size=rel(2.5), colour=\"#6e0a1e\")+\r\n  labs(title=\"Excess mortality rates for Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot1\r\ndev.off()\r\n\r\nplot1b <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Hospital\"), \r\n          aes(geometry=geom, fill=totexcessprop), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                                                                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Change in\\nall-cause deaths\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Hospital\"))$totexcessprop)),\r\n                         label=scales::label_percent(accuracy=2))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Relative changes in all-cause deaths in Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessPropLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot1b\r\ndev.off()\r\n\r\nplot2 <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Hospital\"), \r\n          aes(geometry=geom, fill=excessrate), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                                                                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Excess deaths\\nper 100,000\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Hospital\"))$excessrate)))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  annotate(\"text\", x=45, y=60, label=\"There have been fewer deaths\\nthan usual in hospitals\\nin many more remote areas...\",\r\n           family=\"Lato\", fontface=\"bold\", size=rel(2.5), colour=\"#006D5B\")+\r\n  annotate(\"text\", x=16, y=40, label=\"...but more in urban areas\",\r\n           family=\"Lato\", fontface=\"bold\", size=rel(2.5), colour=\"#6e0a1e\")+labs(title=\"Hospital excess mortality rates for Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessHospLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot2\r\ndev.off()\r\n\r\nplot2b <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Hospital\"), \r\n          aes(geometry=geom, fill=excessprop), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                                                                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Change in\\nall-cause deaths\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Hospital\"))$excessprop)),\r\n                         label=scales::label_percent(accuracy=2))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Relative changes in all-cause deaths in hospitals in Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessHospPropLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot2b\r\ndev.off()\r\n\r\nplot3 <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Care home\"), \r\n          aes(geometry=geom, fill=excessrate), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                                                                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Excess deaths\\nper 100,000\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Care home\"))$excessrate)))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  annotate(\"text\", x=47, y=52, label=\"Excess care home deaths are\\nhighest in the North East..\",\r\n           family=\"Lato\", fontface=\"bold\", size=rel(2.5), colour=\"#6e0a1e\")+\r\n  annotate(\"text\", x=48, y=1, label=\"...and isolated areas\\nin the South East\",\r\n           family=\"Lato\", fontface=\"bold\", size=rel(2.5), colour=\"#6e0a1e\")+\r\n  labs(title=\"Care home excess mortality rates for Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessCareHomeLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot3\r\ndev.off()\r\n\r\nplot3b <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Care home\"), \r\n          aes(geometry=geom, fill=excessprop), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                                                                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Change in\\nall-cause deaths\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Care home\"))$excessprop)),\r\n                         label=scales::label_percent(accuracy=2))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Relative changes in all-cause deaths in care homes in Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessCareHomePropLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot3b\r\ndev.off()\r\n\r\nplot4 <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Home/Other\"), \r\n          aes(geometry=geom, fill=excessrate), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                                                                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Excess deaths\\nper 100,000\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Home/Other\"))$excessrate)))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  annotate(\"text\", x=45, y=60, label=\"Excess deaths at home are\\nhighest in the West of Scotland\",\r\n           family=\"Lato\", fontface=\"bold\", size=rel(2.5), colour=\"#6e0a1e\")+\r\n  labs(title=\"Home excess mortality rates for Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessHomeLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot4\r\ndev.off()\r\n\r\nplot4b <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlacases %>% filter(RegionNation!=\"Northern Ireland\" & location==\"Home/Other\"), \r\n          aes(geometry=geom, fill=excessprop), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Northern Ireland\"), aes(geometry=geom, label=Group.labe,\r\n                                                                                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.curl\",\r\n                         name=\"Change in\\nall-cause deaths\", \r\n                         limit=c(-1,1)*max(abs((ltlacases %>% filter(location==\"Home/Other\"))$excessprop)),\r\n                         label=scales::label_percent(accuracy=2))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Relative changes in all-cause deaths at home in Local Authorities in Great Britain\",\r\n       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.\",\r\n       caption=\"Data from ONS and NRS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDExcessHomePropLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot4b\r\ndev.off()\r\n"
  },
  {
    "path": "All Cause Mortality/COVIDTotalDeathsPyramid.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\n\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Download 2020 COVID deaths data by age\r\ntemp <- tempfile()\r\nurl2020 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx\"\r\ntemp <- curl_download(url=url2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata20m <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B34:BC53\", \r\n                     col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2020, Sex=\"Male\")\r\n\r\ndata20f <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B56:BC75\", \r\n                      col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2020, Sex=\"Female\")\r\n\r\n#All cause deaths\r\ndata20m_ac <- read_excel(temp, sheet=\"Weekly figures 2020\", range=\"B44:BC63\", col_names=FALSE)%>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"ACDeaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2020, Sex=\"Male\")\r\n\r\ndata20f_ac <- read_excel(temp, sheet=\"Weekly figures 2020\", range=\"B66:BC85\", col_names=FALSE)%>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"ACDeaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2020, Sex=\"Female\")\r\n\r\n#2021\r\nurl2021 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx\"\r\ntemp <- curl_download(url=url2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata21m <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B34:BB53\", \r\n                      col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2021, Sex=\"Male\")\r\n\r\ndata21f <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B56:BB75\", \r\n                       col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2021, Sex=\"Female\")\r\n\r\n#All cause deaths\r\ndata21m_ac <- read_excel(temp, sheet=\"Weekly figures 2021\", range=\"B40:BC59\", col_names=FALSE)%>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"ACDeaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2021, Sex=\"Male\")\r\n\r\ndata21f_ac <- read_excel(temp, sheet=\"Weekly figures 2021\", range=\"B62:BC81\", col_names=FALSE)%>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"ACDeaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2021, Sex=\"Female\")\r\n\r\n#2022 (in a different format, thanks for that ONS)\r\nurl2022 <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2022/publicationfileweek212022.xlsx\"\r\ntemp <- curl_download(url=url2022, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata22m <- read_excel(temp, sheet=\"4\", range=\"A31:W52\") %>% \r\n  select(-c(2,3)) %>% \r\n  gather(Age, Deaths, c(2:ncol(.))) %>% \r\n  set_names(c(\"Week\", \"Age\", \"Deaths\")) %>% \r\n  mutate(Year=2022, Sex=\"Male\")\r\n\r\ndata22f <- read_excel(temp, sheet=\"4\", range=\"A55:W76\") %>% \r\n  select(-c(2,3)) %>% \r\n  gather(Age, Deaths, c(2:ncol(.))) %>% \r\n  set_names(c(\"Week\", \"Age\", \"Deaths\")) %>% \r\n  mutate(Year=2022, Sex=\"Female\")\r\n\r\n#All cause deaths\r\ndata22m_ac <- read_excel(temp, sheet=\"2\", range=\"A31:W52\") %>% \r\n  select(-c(2,3)) %>% \r\n  gather(Age, Deaths, c(2:ncol(.))) %>% \r\n  set_names(c(\"Week\", \"Age\", \"ACDeaths\")) %>% \r\n  mutate(Year=2022, Sex=\"Male\")\r\n\r\ndata22f_ac <- read_excel(temp, sheet=\"2\", range=\"A55:W76\") %>% \r\n  select(-c(2,3)) %>% \r\n  gather(Age, Deaths, c(2:ncol(.))) %>% \r\n  set_names(c(\"Week\", \"Age\", \"ACDeaths\")) %>% \r\n  mutate(Year=2022, Sex=\"Female\")\r\n\r\nalldata <- bind_rows(data20f, data20m, data21f, data21m, data22f, data22m) %>% \r\n  merge(bind_rows(data20f_ac, data20m_ac, data21f_ac, data21m_ac, data22f_ac, data22m_ac)) %>% \r\n  mutate(Age=case_when(\r\n    Age==\"01-04\" ~ \"1-4\",\r\n    Age==\"05-09\" ~ \"5-9\",\r\n    TRUE ~Age),\r\n    COVIDprop=Deaths/ACDeaths) \r\n\r\ndata1 <- alldata %>%\r\n  filter(!(Year==2020 & Week<11)) %>% \r\n  group_by(Age, Sex) %>% \r\n  summarise(Deaths=sum(Deaths), ACDeaths=sum(ACDeaths)) %>% \r\n  ungroup() %>% \r\n  mutate(plotdeaths=if_else(Sex==\"Male\", -Deaths, Deaths),\r\n         Age=factor(Age, levels=c(\"<1\", \"1-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\",\r\n                                  \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\",\r\n                                  \"65-69\", \"70-74\", \"75-79\", \"80-84\", \"85-89\", \"90+\")),\r\n         COVIDprop=Deaths/ACDeaths,\r\n         plotCOVIDprop=if_else(Sex==\"Male\", -COVIDprop, COVIDprop))\r\n\r\nagg_png(\"Outputs/COVIDTotalDeathsxAgexSex.png\", units=\"in\", width=8, height=8, res=800)\r\nggplot(data1, aes(x=plotdeaths, y=Age, fill=Sex))+\r\n  geom_col()+\r\n  geom_vline(xintercept=0, colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Total COVID deaths\", limits=c(-25000, 25000),\r\n                     breaks=c(-20000, -10000, 0, 10000, 20000),\r\n                     labels=c(\"20,000\", \"10,000\", \"0\", \"10,000\", \"20,000\"))+\r\n  scale_fill_manual(values=c(\"#00cc99\", \"#6600cc\"), name=\"\", guide = guide_legend(reverse = TRUE))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"Total COVID-19 deaths by age and sex\",\r\n       subtitle=\"Deaths in England & Wales registered up to 27th May 2022 where COVID-19 was mentioned on the death certificate\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDTotalDeathPropxAgexSex.png\", units=\"in\", width=8, height=8, res=800)\r\nggplot(data1, aes(x=plotCOVIDprop, y=Age, fill=Sex))+\r\n  geom_col()+\r\n  geom_vline(xintercept=0, colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Proportion of deaths involving COVID\", limits=c(-0.17, 0.17),\r\n                     breaks=c(-0.15, -0.1, -0.05, 0, 0.05, 0.1, 0.15),\r\n                     labels=c(\"15%\", \"10%\", \"5%\", \"0%\", \"5%\", \"10%\", \"15%\"))+\r\n  scale_fill_manual(values=c(\"#00cc99\", \"#6600cc\"), name=\"\", guide = guide_legend(reverse = TRUE))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"The proportional impact of COVID on mortality\",\r\n       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\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\ndata2 <- alldata %>% \r\n  group_by(Age, Sex, Year) %>% \r\n  summarise(Deaths=sum(Deaths), ACDeaths=sum(ACDeaths)) %>% \r\n  ungroup() %>% \r\n  mutate(plotdeaths=if_else(Sex==\"Male\", -Deaths, Deaths),\r\n         Age=factor(Age, levels=c(\"<1\", \"1-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\",\r\n                                  \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\",\r\n                                  \"65-69\", \"70-74\", \"75-79\", \"80-84\", \"85-89\", \"90+\")),\r\n         COVIDprop=Deaths/ACDeaths,\r\n         plotCOVIDprop=if_else(Sex==\"Male\", -COVIDprop, COVIDprop))\r\n\r\nagg_png(\"Outputs/COVIDTotalDeathsxAgexSexxYear.png\", units=\"in\", width=8, height=8, res=800)\r\nggplot(data2, aes(x=plotdeaths, y=Age, fill=as.factor(Year)))+\r\n  geom_col(position=\"dodge\")+\r\n  geom_vline(xintercept=0, colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Total COVID deaths\", limits=c(-11000, 11000),\r\n                     breaks=c(-10000, -5000, 0, 5000, 10000),\r\n                     labels=c(\"10,000\", \"5,000\", \"0\", \"5,000\", \"10,000\"))+\r\n  scale_fill_paletteer_d(\"calecopal::superbloom3\", name=\"\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"COVID-19 deaths by age, sex and year\",\r\n       subtitle=\"Deaths in England & Wales registered up to 27th May 2022 where COVID-19 was mentioned on the death certificate\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDTotalDeathPropxAgexSexxYear.png\", units=\"in\", width=8, height=8, res=800)\r\nggplot(data2, aes(x=plotCOVIDprop, y=Age, fill=as.factor(Year)))+\r\n  geom_col(position=\"dodge\")+\r\n  geom_vline(xintercept=0, colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Proportion of deaths involving COVID\", limits=c(-0.17, 0.17),\r\n                     breaks=c(-0.15, -0.1, -0.05, 0, 0.05, 0.1, 0.15),\r\n                     labels=c(\"15%\", \"10%\", \"5%\", \"0%\", \"5%\", \"10%\", \"15%\"))+\r\n  scale_fill_paletteer_d(\"calecopal::superbloom3\", name=\"\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"The proportional impact of COVID on mortality\",\r\n       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\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\ndata3 <- alldata %>% \r\n  group_by(Age, Sex, Year, Week) %>% \r\n  summarise(Deaths=sum(Deaths), ACDeaths=sum(ACDeaths)) %>% \r\n  ungroup() %>% \r\n  mutate(plotdeaths=if_else(Sex==\"Male\", -Deaths, Deaths),\r\n         Age=factor(Age, levels=c(\"<1\", \"1-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\",\r\n                                  \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\",\r\n                                  \"65-69\", \"70-74\", \"75-79\", \"80-84\", \"85-89\", \"90+\")),\r\n         COVIDprop=Deaths/ACDeaths,\r\n         plotCOVIDprop=if_else(Sex==\"Male\", -COVIDprop, COVIDprop),\r\n         Date=case_when(\r\n           Year==2020 ~ as.Date(\"2020-01-03\")+Week-1,\r\n           Year==2021 ~ as.Date(\"2020-01-03\")+Week+53,\r\n           Year==2022 ~ as.Date(\"2020-01-03\")+Week+53+52))\r\n\r\nggplot(data3, aes(x=Date, y=COVIDprop, colour=Sex, group=Sex))+\r\n  geom_line()+\r\n  scale_colour_manual(values=c(\"#00cc99\", \"#6600cc\"), name=\"\", guide = guide_legend(reverse = TRUE))+\r\n  facet_wrap(~Age)+\r\n  theme_custom()\r\n\r\n"
  },
  {
    "path": "All Cause Mortality/EWUSACOVIDDeathsxAgeComparison.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(tidyverse)\r\nlibrary(paletteer)\r\nlibrary(ragg)\r\nlibrary(extrafont)\r\nlibrary(patchwork)\r\nlibrary(scales)\r\nlibrary(ggtext)\r\nlibrary(RcppRoll)\r\nlibrary(keyring)\r\nlibrary(HMDHFDplus)\r\nlibrary(signal)\r\n\r\n#Define window as number of weeks across which to take rolling average\r\nWindow <- 10\r\n\r\n#Define value to replace suppressed death counts with in the US data \r\n#(all weeks <9 are suppressed)\r\nSuppressed <- 5\r\n\r\n#Set common font for all plots\r\nfont <- \"Lato\"\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          strip.clip=\"off\",\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\noptions(scipen=10000)\r\n\r\n#Read in COVID deaths by age from ONS\r\n#2022 & 2023\r\ntemp <- tempfile()\r\nurl <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2023/publicationfileweek412023.xlsx\"\r\nrawfile <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nEWraw2223 <- read_excel(rawfile, sheet=\"5\", range=\"A7:W100\") %>% \r\n  select(-c(`All ages`, `Week number`)) %>% \r\n  gather(Age, Deaths, c(2:ncol(.)))\r\n\r\n#2020 & 2021 \r\ntemp <- tempfile()\r\nurl <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales/2021/publishedweek522021.xlsx\"\r\nrawfile <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nEWraw2021 <- read_excel(rawfile, sheet=\"Covid-19 - Weekly occurrences\", range=\"B12:DC31\", col_names = FALSE) %>% \r\n  set_names(\"Age\", as.character(seq.Date(from=as.Date(\"2020-01-03\"), to=as.Date(\"2021-12-31\"),\r\n                                         length.out=ncol(.)-1))) %>% \r\n  gather(`Week ending`, Deaths, c(2:ncol(.))) %>% \r\n  mutate(`Week ending`=as.Date(`Week ending`))\r\n\r\n#Merge\r\nEWraw <- bind_rows(EWraw2223, EWraw2021) %>% \r\n  #align dates with US data, selecting date in the middle of each reporting week\r\n  #for convenience\r\n  mutate(Date=`Week ending`+days(3)) %>% \r\n  select(-`Week ending`) %>% \r\n  group_by(Age) %>% \r\n  arrange(Date) %>% \r\n  mutate(DeathsRoll=roll_mean(Deaths, n=Window, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\n#Plot to sense check\r\nggplot(EWraw, aes(x=Date))+\r\n  geom_point(aes(y=Deaths), shape=21)+\r\n  geom_line(aes(y=DeathsRoll))+\r\n  facet_wrap(~Age, scales=\"free_y\")+\r\n  theme_custom()\r\n\r\n#Deaths in under 15s are very small, also need to align age groups with US data\r\n#(also, I didn't quite align the age group names in the two ONS datasets, oops)\r\nEWdata <- EWraw %>% dplyr::filter(!Age %in% c(\"<1\", \"01-04\", \"05-09\", \"1-4\", \"5-9\", \"10-14\")) %>%\r\n  mutate(Age=case_when(\r\n    Age %in% c(\"15-19\", \"20-24\") ~ \"15-24\",\r\n    Age %in% c(\"25-29\", \"30-34\") ~ \"25-34\",\r\n    Age %in% c(\"35-39\", \"40-44\") ~ \"35-44\",\r\n    Age %in% c(\"45-49\", \"50-54\") ~ \"45-54\",\r\n    Age %in% c(\"55-59\", \"60-64\") ~ \"55-64\",\r\n    Age %in% c(\"65-69\", \"70-74\") ~ \"65-74\",\r\n    Age %in% c(\"75-79\", \"80-84\") ~ \"75-84\",\r\n    TRUE ~ \"85+\")) %>% \r\n  group_by(Date, Age) %>% \r\n  summarise(Deaths=sum(Deaths), .groups=\"drop\") %>% \r\n  group_by(Age) %>% \r\n  arrange(Date) %>% \r\n  mutate(DeathsRoll=roll_mean(Deaths, n=Window, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\n#Read in data extracted from CDC WONDER database\r\nUSraw <- read.csv(\"CDC Data/CDCCOVIDWeeklyDataxAge.txt\", sep=\"\\t\") %>% \r\n  select(Ten.Year.Age.Groups.Code, MMWR.Week.Code, Deaths) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  dplyr::filter(Age!=\"\") %>% \r\n  mutate(Year=as.numeric(substr(Week, 1, 4)),\r\n         WeekNo=as.numeric(substr(Week, 6, 7))) %>% \r\n  #Almost no deaths allocated to week 99 (presumably an unknown value), so remove\r\n  dplyr::filter(WeekNo!=99) %>% \r\n  #Convert to actual date format (using a date in the middle of the week for convenience\r\n  #and to align with the E&W data)\r\n  mutate(AddWeek=case_when(Year==2018 ~ 0, Year==2019 ~ 52, Year==2020 ~ 52+52,\r\n                           Year==2021 ~ 52+52+53, Year==2022 ~ 52+52+53+52,\r\n                           Year==2023 ~ 52+52+53+52+52),\r\n    Date=as.Date(\"2018-01-01\")+weeks(WeekNo+AddWeek),\r\n    Deaths=if_else(Deaths==\"Suppressed\", Suppressed, as.numeric(Deaths))) %>% \r\n  group_by(Age) %>% \r\n  arrange(Date) %>% \r\n  mutate(DeathsRoll=roll_mean(Deaths, n=Window, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\n#Plot to sense check\r\nggplot(USraw %>% dplyr::filter(Date>as.Date(\"2020-01-01\")), aes(x=Date))+\r\n  geom_point(aes(y=Deaths), shape=21)+\r\n  geom_line(aes(y=DeathsRoll))+\r\n  facet_wrap(~Age, scales=\"free_y\")+\r\n  theme_custom()\r\n\r\n#Visual inspection suggests all ages under 15 are mostly suppressed values, so remove\r\n#these ages.\r\nUSdata <- USraw %>% dplyr::filter(!Age %in% c(\"1\", \"1-4\", \"5-14\")) %>% \r\n  select(Date, Age, Deaths, DeathsRoll) %>% \r\n  dplyr::filter(Date>as.Date(\"2020-01-01\"))\r\n\r\n######################\r\n#Bring in population data from HMD\r\n#Note that you will need to register with mortality.org and set this \r\n#username and password up with {keyring} for this to work\r\n\r\n#Start with England & Wales\r\newpop <- readHMDweb(CNTRY=\"GBRTENW\", \"Population\", key_list(\"mortality.org\")[1,2], \r\n                    key_get(\"mortality.org\", key_list(\"mortality.org\")[1,2]), fixup=TRUE) %>% \r\n  mutate(Age=as.numeric(Age), Age=if_else(is.na(Age), 110, Age)) %>% \r\n  dplyr::filter(Year>=2020) \r\n\r\newpop <- bind_rows(ewpop %>% dplyr::filter(Year==2020) %>% \r\n                     select(\"Year\", \"Age\", \"Total2\") %>% \r\n                     mutate(Year=2021) %>% \r\n                     set_names(c(\"Year\", \"Age\", \"Pop\")),\r\n                   ewpop %>% select(c(\"Year\", \"Age\", \"Total1\")) %>% \r\n                     set_names(c(\"Year\", \"Age\", \"Pop\"))) \r\n\r\n#This gives us the mid-year population estimates for 2020 and 2021 only.\r\n#There's definitely a clever approach here, but for now, let's linearly interpolate/extrapolate\r\n#to get estimated weekly populations across the time period\r\n#(which will be close enough to make no difference, I imagine)\r\n\r\n#Set up framework for inter/extrapolation\r\npopframe <- ewpop %>% #dplyr::filter(Age==15) %>% \r\n  mutate(weeksince=if_else(Year==2020, 26, 78)) %>% \r\n  arrange(weeksince) \r\n\r\n#Define inter/extrapolation function based on {signal}'s interp1 function\r\ninterpolate <- function(x){\r\n  interp1(x=popframe$weeksince[popframe$Age==x], \r\n          y=popframe$Pop[popframe$Age==x], \r\n          xi=c(1:length(unique(EWdata$Date))), method=\"linear\", extrap=TRUE)\r\n}\r\n\r\n#Do inter/extrapolation\r\nInterpolatedPop <- data.frame(Date=as.Date(unique(EWdata$Date))) \r\n\r\nfor(i in c(0:110)){\r\n  InterpolatedPop <- bind_cols(InterpolatedPop, interpolate(i))\r\n}\r\n\r\nInterpolatedPop <- InterpolatedPop %>% \r\n  set_names(\"Date\", c(0:110)) %>% \r\n  gather(Age, Pop, c(2:ncol(.))) %>% \r\n  mutate(Age=as.numeric(Age))\r\n\r\n#Visualise to sense check\r\nggplot(InterpolatedPop, aes(x=Date, y=Age, fill=Pop))+\r\n  geom_tile()+\r\n  theme_custom()\r\n\r\n#Looks ok, so group up and merge into deaths data\r\nEWfull <- EWdata %>% \r\n  merge(InterpolatedPop %>% \r\n          dplyr::filter(Age>=15) %>% \r\n          mutate(Age=case_when(\r\n            Age<25 ~ \"15-24\", Age<35 ~ \"25-34\", Age<45 ~ \"35-44\", Age<55 ~ \"45-54\",\r\n            Age<65 ~ \"55-64\", Age<75 ~ \"65-74\", Age<85 ~ \"75-84\", Age>=85 ~ \"85+\")) %>% \r\n          group_by(Date, Age) %>% \r\n          summarise(Pop=sum(Pop), .groups=\"drop\")) %>% \r\n  group_by(Age) %>% \r\n  mutate(mx=Deaths*100000/Pop,\r\n         mxroll=roll_mean(mx, n=Window, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\n#Move on to USA\r\nUSpop <- readHMDweb(CNTRY=\"USA\", \"Population\", key_list(\"mortality.org\")[1,2], \r\n                    key_get(\"mortality.org\", key_list(\"mortality.org\")[1,2]), fixup=TRUE) %>% \r\n  mutate(Age=as.numeric(Age), Age=if_else(is.na(Age), 110, Age)) %>% \r\n  dplyr::filter(Year>=2020) \r\n\r\nUSpop <- bind_rows(USpop %>% dplyr::filter(Year==2021) %>% \r\n                     select(\"Year\", \"Age\", \"Total2\") %>% \r\n                     mutate(Year=2022) %>% \r\n                     set_names(c(\"Year\", \"Age\", \"Pop\")),\r\n                   USpop %>% select(c(\"Year\", \"Age\", \"Total1\")) %>% \r\n                     set_names(c(\"Year\", \"Age\", \"Pop\"))) \r\n\r\n#Set up framework for inter/extrapolation\r\npopframe2 <- USpop %>% \r\n  mutate(weeksince=case_when(Year==2020 ~ 26, \r\n                             Year==2021 ~ 78,\r\n                             Year==2022 ~ 130)) %>% \r\n  arrange(weeksince) \r\n\r\n#Define inter/extrapolation function based on {signal}'s interp1 function\r\ninterpolate2 <- function(x){\r\n  interp1(x=popframe2$weeksince[popframe2$Age==x], \r\n          y=popframe2$Pop[popframe2$Age==x], \r\n          xi=c(1:length(unique(EWdata$Date))), method=\"linear\", extrap=TRUE)\r\n}\r\n\r\n#Do inter/extrapolation\r\nInterpolatedPop2 <- data.frame(Date=as.Date(unique(USdata$Date))) \r\n\r\nfor(i in c(0:110)){\r\n  InterpolatedPop2 <- bind_cols(InterpolatedPop2, interpolate2(i))\r\n}\r\n\r\nInterpolatedPop2 <- InterpolatedPop2 %>% \r\n  set_names(\"Date\", c(0:110)) %>% \r\n  gather(Age, Pop, c(2:ncol(.))) %>% \r\n  mutate(Age=as.numeric(Age))\r\n\r\n#Visualise to sense check\r\nggplot(InterpolatedPop2, aes(x=Date, y=Age, fill=Pop))+\r\n  geom_tile()+\r\n  theme_custom()\r\n\r\n#Looks ok, so group up and merge into deaths data\r\nUSfull <- USdata %>% \r\n  merge(InterpolatedPop2 %>% \r\n          dplyr::filter(Age>=15) %>% \r\n          mutate(Age=case_when(\r\n            Age<25 ~ \"15-24\", Age<35 ~ \"25-34\", Age<45 ~ \"35-44\", Age<55 ~ \"45-54\",\r\n            Age<65 ~ \"55-64\", Age<75 ~ \"65-74\", Age<85 ~ \"75-84\", Age>=85 ~ \"85+\")) %>% \r\n          group_by(Date, Age) %>% \r\n          summarise(Pop=sum(Pop), .groups=\"drop\")) %>% \r\n  group_by(Age) %>% \r\n  mutate(mx=Deaths*100000/Pop,\r\n         mxroll=roll_mean(mx, n=Window, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\nFulldata <- EWfull %>% mutate(Country=\"England & Wales\") %>% \r\n  bind_rows(USfull %>% mutate(Country=\"USA\"))\r\n\r\nagg_png(\"Outputs/EWUSACOVIDDeathsxAgeRates.png\", units=\"in\", width=9, height=7, res=500)\r\nggplot(Fulldata, aes(x=Date, y=mxroll, colour=Country))+\r\n  geom_hline(yintercept=0, colour=\"grey30\")+\r\n  geom_line()+\r\n  scale_y_continuous(limits=c(0,NA), name=\"Weekly deaths per 100,000\")+\r\n  scale_colour_manual(values=c(\"#C11432\", \"#009ADA\"))+\r\n  facet_wrap(~Age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(axis.line.x=element_blank(), \r\n        panel.grid.major.y=element_line(colour=\"grey95\"))+\r\n  labs(title=\"Younger adults in the US had much higher COVID deaths rates than England & Wales\",\r\n       subtitle=\"Rolling 10-week average rates of death occurrences where COVID was listed as a contributory cause\",\r\n       caption=\"Data from CDC Wonder and ONS | Populations estimated from mortality.org data\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nRatios <- Fulldata %>% \r\n  group_by(Date, Age) %>% \r\n  mutate(Ratio=mxroll[Country==\"USA\"]/mxroll[Country==\"England & Wales\"]) %>% \r\n  ungroup() %>% \r\n  dplyr::filter(!is.na(Ratio)) %>% \r\n  mutate(Date=as.Date(Date))\r\n\r\nagg_png(\"Outputs/EWUSACOVIDDeathsxAgeRatio.png\", units=\"in\", width=8, height=6, res=500)\r\nggplot(Ratios %>% dplyr::filter(Age!=\"15-24\"), aes(x=Date, y=Ratio, colour=Age))+\r\n  geom_hline(yintercept=1, colour=\"grey30\")+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log10\", name=\"Ratio of COVID-19 death occurrences\\nin the USA to England & Wales\",\r\n                     breaks=c(1/4, 1/2, 1, 2, 4, 8), \r\n                     labels=c(\"x 1/4\", \"x 1/2\", \"Equal\", \"x2\", \"x4\", \"x8\"))+\r\n  scale_colour_manual(values=c(\"#B83326FF\", \"#C8570DFF\", \"#EDB144FF\", \"#8CC8BCFF\", \"#7DA7EAFF\", \"#5773C0FF\", \"#1D4497FF\"))+\r\n  theme_custom()+\r\n  theme(panel.grid.major.y=element_line(colour=\"grey95\"))+\r\n  labs(title=\"The pandemic hit young people much harder in the US than England& Wales\",\r\n       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.\",\r\n       caption=\"Data from CDC Wonder and ONS | Populations estimated from mortality.org data\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=as.Date(\"2023-01-01\"), y=0.3, colour=\"Grey30\",\r\n           family=\"Lato\", label=\"More deaths in England & Wales\")+\r\n  annotate(\"text\", x=as.Date(\"2023-01-01\"), y=7, colour=\"Grey30\",\r\n           family=\"Lato\", label=\"More deaths in the USA\")\r\n\r\ndev.off()\r\n\r\nDeathProps <- Fulldata %>% \r\n  group_by(Country, Date) %>% \r\n  mutate(Total=sum(DeathsRoll),\r\n         Prop=DeathsRoll/Total) %>% \r\n  ungroup() %>% \r\n  mutate(Date=as.Date(Date))\r\n\r\nagg_png(\"Outputs/EWUSACOVIDDeathsxAgeProp.png\", units=\"in\", width=8, height=6, res=500)\r\nggplot(DeathProps, aes(x=Date, y=Prop, fill=Age))+\r\n  geom_col()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of deaths involving COVID-19\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"darkred\", \"#B83326FF\", \"#C8570DFF\", \"#EDB144FF\", \"#8CC8BCFF\", \"#7DA7EAFF\", \"#5773C0FF\", \"#1D4497FF\"))+\r\n  facet_wrap(~Country)+\r\n  theme_custom()\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "All Cause Mortality/LA All Cause Deaths.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(readxl)\nlibrary(ggtext)\nlibrary(paletteer)\nlibrary(lubridate)\nlibrary(forcats)\nlibrary(RcppRoll)\n\n###################################################################################\n#Weekly data\n\n#Read in 2020 data for England\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fcausesofdeath%2fdatasets%2fdeathregistrationsandoccurrencesbylocalauthorityandhealthboard%2f2020/lahbtablesweek27.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata20 <- read_excel(temp, sheet=6, col_names=FALSE)[-c(1:4),]\ncolnames(data20) <- c(\"code\", \"type\", \"name\", \"cause\", \"week\", \"location\", \"deaths.20\")\ndata20 <- subset(data20, type==\"Local Authority\")[,-c(2)]\n\ndata20$deaths.20 <- as.numeric(data20$deaths.20)\ndata20$week <- as.numeric(data20$week)\n\nmaxweek.ew <- max(data20$week)\nenddate.ew <- as.Date(\"2020-01-03\")+weeks(maxweek.ew-1)\n\n#Spread causes\ndata20 <- pivot_wider(data20, names_from=\"cause\", values_from=\"deaths.20\")\n\n#Read in 2015-19 historic data for England & Wales\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/11826fiveyearaverageweeklydeathsbylocalauthorityandplaceofoccurrenceenglandandwalesdeathsregistered2015to2019/weeklyfiveyearaveragesbylaandplaceofoccurrence20152019.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata1519 <- read_excel(temp, sheet=2, col_names=FALSE)[-c(1:3),]\ncolnames(data1519) <- c(\"code\", \"name\", \"week\", \"location\", \"deaths.1519\")\n\ndata1519$deaths.1519 <- as.numeric(data1519$deaths.1519)\ndata1519$week <- as.numeric(data1519$week)\ndata1519 <- data1519 %>% drop_na(name)\n\n#Address merging of Aylesbury Vale, Chiltern and South Bucks into Bucks\ndata1519$name <- if_else(data1519$name %in% c(\"Aylesbury Vale\", \"Chiltern\", \"South Bucks\", \"Wycombe\"), \n                         \"Buckinghamshire\", data1519$name)\ndata1519$code <- if_else(data1519$code %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\"), \n                         \"E06000060\", data1519$code)\n\ndata1519 <- data1519 %>% \n  group_by(week, location, name, code) %>% \n  summarise(deaths.1519=sum(deaths.1519)) %>% \n  ungroup()\n\ndata.ew <- merge(data1519, data20, all.x=TRUE)\n\n#Combine Cornwall & Isles of Scilly\ndata.ew$code <- if_else(data.ew$code==\"E06000053\", \"E06000052\", data.ew$code)\ndata.ew$name <- if_else(data.ew$name==\"Isles of Scilly\", \"Cornwall\", data.ew$name)\n\n#Combine Hackney & City of London\ndata.ew$code <- if_else(data.ew$code==\"E09000001\", \"E09000012\", data.ew$code)\ndata.ew$name <- if_else(data.ew$name==\"City of London\", \"Hackney and City of London\", data.ew$name)\ndata.ew$name <- if_else(data.ew$name==\"Hackney\", \"Hackney and City of London\", data.ew$name)\n\n#Compress locations\ndata.ew$location <- case_when(\n  data.ew$location %in% c(\"Elsewhere\", \"Home\", \"Hospice\", \"Other communal establishment\") ~ \"Home/Other\",\n  TRUE ~ data.ew$location)\n\ndata.ew <- data.ew %>% \n  group_by(code, name, location, week) %>% \n  summarise(deaths.1519=sum(deaths.1519), AllCause.20=sum(`All causes`), COVID.20=sum(`COVID 19`)) %>% \n  mutate(Other.20=AllCause.20-COVID.20) %>% \n  ungroup()\n\n#Bring in Scottish deaths data (released by NRS on a Wednesday)\n#2020 data\n\n#Need to update link and range each week\ntemp <- tempfile()\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-date-council-area-location.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata20.s <- read_excel(temp, sheet=2, range=\"A5:E3389\", col_names=FALSE)\ncolnames(data20.s) <- c(\"week\", \"name\", \"location\", \"cause\", \"deaths\")\ndata20.s$week <- as.numeric(data20.s$week)\n\nmaxweek.s <- max(data20.s$week)\nenddate.s <- as.Date(\"2020-01-04\")+weeks(maxweek.s-1)\n\ndata20.s$cause <- if_else(data20.s$cause==\"Non-COVID-19\", \"Other.20\", \"COVID.20\")\n\ndata20.s <- spread(data20.s, cause, deaths)\ndata20.s$COVID.20 <- replace_na(data20.s$COVID.20, 0)\ndata20.s$Other.20 <- replace_na(data20.s$Other.20, 0)\n\n#2015-19 data\ntemp <- tempfile()\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-date-council-area-location-15-19.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata1519.s <- read_excel(temp, sheet=2, range=\"A5:E25207\", col_names=FALSE)\ncolnames(data1519.s) <- c(\"week\", \"name\", \"location\", \"year\", \"deaths\")\ndata1519.s$week <- as.numeric(data1519.s$week)\n\n#Take 5 year averages\ndata1519.s <- data1519.s %>% \n  group_by(week, name, location) %>% \n  summarise(deaths.1519=mean(deaths)) %>% \n  ungroup()\n\n#Merge years\ndata.s <- merge(data1519.s, data20.s, all=TRUE)\n\ndata.s$deaths.1519 <- replace_na(data.s$deaths.1519)\ndata.s$COVID.20 <- if_else(is.na(data.s$COVID.20) & data.s$week<=maxweek.s, 0, data.s$COVID.20)\ndata.s$Other.20 <- if_else(is.na(data.s$Other.20) & data.s$week<=maxweek.s, 0, data.s$Other.20)\n\n#Compress locations to match EW\ndata.s$location <- case_when(\n  data.s$location==\"Care Home\" ~ \"Care home\",\n  data.s$location %in% c(\"Home / Non-institution\", \"Other institution\") ~ \"Home/Other\",\n  TRUE ~ \"Hospital\"\n)\n\ndata.s <- data.s %>% \n  group_by(week, name, location) %>% \n  summarise(deaths.1519=sum(deaths.1519, na.rm=TRUE), \n            across(c(\"COVID.20\", \"Other.20\"), sum)) %>% \n  mutate(AllCause.20=COVID.20+Other.20) %>% \n  ungroup()\n\n#Bring in Scottish LA codes\ntemp <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/35de30c6778b463a8305939216656132_0.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ncodelookup <- read.csv(temp)[,c(2,3)]\ncolnames(codelookup) <- c(\"code\", \"name\")\n\ndata.s <- merge(data.s, codelookup, all.x=TRUE)\n\n#Merge countries\ndata <- bind_rows(data.ew, data.s)\n\ndata$country <- case_when(\n  substr(data$code,1,1)==\"E\" ~ \"England\",\n  substr(data$code,1,1)==\"W\" ~ \"Wales\",\n  substr(data$code,1,1)==\"S\" ~ \"Scotland\")\n\n#Bring in LA populations\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D423\", col_names=TRUE)\ncolnames(LApop) <- c(\"code\", \"name\", \"geography\", \"pop\")\n\n#Merge isles of Scilly in with Cornwall\nLApop$code <- if_else(LApop$code==\"E06000053\", \"E06000052\", LApop$code)\nLApop$name <- if_else(LApop$name==\"Isles of Scilly\", \"Cornwall\", LApop$name)\n\n#Address merging of Aylesbury Vale, Chiltern and South Bucks into Bucks\nLApop$name <- if_else(LApop$name %in% c(\"Aylesbury Vale\", \"Chiltern\", \"South Bucks\", \"Wycombe\"), \n                         \"Buckinghamshire\", LApop$name)\nLApop$code <- if_else(LApop$code %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\"), \n                         \"E06000060\", LApop$code)\n\nLApop <- LApop %>% \n  group_by(name, code) %>% \n  summarise(pop=sum(pop)) %>% \n  ungroup()\n\ndata <- merge(data, LApop, all.x=TRUE)\n\n#Bring in Regions\ntemp <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nLADtoRegion <- read.csv(temp)[,c(1,4)]\ncolnames(LADtoRegion) <- c(\"code\", \"Region\")\n\ndata <- merge(data, LADtoRegion,all.x=TRUE)\n\ndata$Region <- case_when(\n  is.na(data$Region) & data$country==\"Scotland\" ~ \"Scotland\",\n  is.na(data$Region) & data$country==\"Wales\" ~ \"Wales\",\n  is.na(data$Region) & data$code %in% c(\"E06000058\", \"E06000059\", \"E07000246\") ~ \"South West\",\n  is.na(data$Region) & data$code %in% c(\"E07000244\", \"E07000245\") ~ \"East of England\",\n  is.na(data$Region) & data$code==\"E06000060\" ~ \"South East\",\n  TRUE ~ as.character(data$Region))\n\n#Generate national summaries\ndata.nat <- data %>% \n  group_by(week, country, location) %>% \n  summarise(across(c(\"deaths.1519\", \"AllCause.20\", \"COVID.20\", \"Other.20\"), sum)) %>% \n  mutate(name=country, Region=\"Nation\") %>% \n  ungroup()\n\ndata <- bind_rows(data, data.nat)\n\n#Calculate excesses\ndata$allexcess <- case_when(\n  data$country==\"Scotland\" & data$week<=maxweek.s ~ data$AllCause.20-data$deaths.1519,\n  data$country!=\"Scotland\" & data$week<=maxweek.ew ~ data$AllCause.20-data$deaths.1519)\ndata$excessrate <- data$allexcess*100000/data$pop\ndata$othexcess <- case_when(\n  data$country==\"Scotland\" & data$week<=maxweek.s ~ data$Other.20-data$deaths.1519,\n  data$country!=\"Scotland\" & data$week<=maxweek.ew ~ data$Other.20-data$deaths.1519)\ndata$COVIDrate <- data$COVID.20*100000/data$pop\n\n#############################################################\n#Daily data\n\n#Set up daily dataframe\n#Bring in case data\n#Read in cases data for England\ntemp <- tempfile()\nsource <- \"https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\ncasedata.E <- read.csv(temp)[,c(1:5)]\ncolnames(casedata.E) <- c(\"name\", \"code\", \"geography\", \"date\", \"cases\")\ncasedata.E <- casedata.E %>% filter(geography==\"Lower tier local authority\")\n\nmindate <- min(as.Date(casedata.E$date))\nmaxdate <- max(as.Date(casedata.E$date))\n\n#Address merging of Aylesbury Vale, Chiltern and South Bucks into Bucks\ncasedata.E$name <- if_else(casedata.E$name %in% c(\"Aylesbury Vale\", \"Chiltern\", \"South Bucks\", \"Wycombe\"), \n                      \"Buckinghamshire\", as.character(casedata.E$name))\ncasedata.E$code <- if_else(casedata.E$code %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\"), \n                      \"E06000060\", as.character(casedata.E$code))\n\ncasedata.E <- casedata.E %>% \n  group_by(name, code, date) %>% \n  summarise(cases=sum(cases)) %>% \n  ungroup()\n\n\n#Set up skeleton dataframe, merging City of London and Hackney\ndaydata <- data.frame(code=rep(unique(subset(data, !name %in% c(\"England\", \"Scotland\", \"Wales\"))$code),\n                               each=maxdate-mindate+1),\n                      name=rep(unique(subset(data, !name %in% c(\"England\", \"Scotland\", \"Wales\"))$name),\n                               each=maxdate-mindate+1),\n                      date=rep(seq.Date(from=mindate, to=maxdate, by=\"day\"), \n                               times=length(unique(subset(data, !name %in% c(\"England\", \"Scotland\", \"Wales\"))$code))))\n\n#merge in English cases\ndaydata <- merge(daydata, casedata.E, by=c(\"name\", \"code\", \"date\"), all.x=TRUE)\n\n#Bring in Welsh case data\ntemp <- tempfile()\nsource <- \"http://www2.nphs.wales.nhs.uk:8080/CommunitySurveillanceDocs.nsf/3dc04669c9e1eaa880257062003b246b/77fdb9a33544aee88025855100300cab/$FILE/Rapid%20COVID-19%20surveillance%20data.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ncasedata.W <- read_excel(temp, sheet=3)[,c(1:3)]\n\ncolnames(casedata.W) <- c(\"name\", \"date\", \"cases\")\n\ndaydata <- merge(daydata, casedata.W, by=c(\"name\", \"date\"), all.x=TRUE)\n\ndaydata$country <- case_when(\n  substr(daydata$code,1,1)==\"E\" ~ \"England\",\n  substr(daydata$code,1,1)==\"W\" ~ \"Wales\",\n  substr(daydata$code,1,1)==\"S\" ~ \"Scotland\")\n\n#Fill in blanks\ndaydata$cases <- coalesce(daydata$cases.x, daydata$cases.y)\ndaydata <- daydata[,-c(4:5)]\ndaydata$cases <- if_else(\n  is.na(daydata$cases) & daydata$country!=\"Scotland\", 0, daydata$cases)\n\n#Experimental pillar 1 & 2 separation - England only and only up to end of June\n#Archive files from 1st & 2nd July - either side of pillar 2 addition to data\n#Available from https://coronavirus.data.gov.uk/archive\n#Pillar 1 data\ntemp <- tempfile()\nsource <- \"https://coronavirus.data.gov.uk/downloads/csv/dated/coronavirus-cases_202007011400.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\np1data <- read.csv(temp)[,c(1:5)]\ncolnames(p1data) <- c(\"name\", \"code\", \"geography\", \"date\", \"p1cases\")\np1data$date <- as.Date(p1data$date)\np1data <- subset(p1data, geography==\"Lower tier local authority\" & date<\"2020-07-01\")\np1data$code <- if_else(p1data$code %in% c(\"E09000001\", \"E09000012\"), \n                       \"E09000012\", as.character(p1data$code))\np1data$code <- case_when(\n  p1data$code %in% c(\"E09000001\", \"E09000012\") ~ \"E09000012\",\n  p1data$code %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\") ~ \"E06000060\",\n  TRUE ~ p1data$code\n)\n\np1data <- p1data %>% \n  group_by(code, date) %>% \n  summarise(p1cases=sum(p1cases)) %>% \n  ungroup()\n\n#Pillar 1 & 2 combined\ntemp <- tempfile()\nsource <- \"https://coronavirus.data.gov.uk/downloads/csv/dated/coronavirus-cases_202007021618.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\np12data <- read.csv(temp)[,c(1:5)]\ncolnames(p12data) <- c(\"name\", \"code\", \"geography\", \"date\", \"p12cases\")\np12data$date <- as.Date(p12data$date)\np12data <- subset(p12data, geography==\"Lower tier local authority\" & date<\"2020-07-01\")\np12data$code <- case_when(\n  p1data$code %in% c(\"E09000001\", \"E09000012\") ~ \"E09000012\",\n  p1data$code %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\") ~ \"E06000060\",\n  TRUE ~ p12data$code\n)\np12data <- p12data %>% \n  group_by(code, date) %>% \n  summarise(p12cases=sum(p12cases)) %>% \n  ungroup()\n\ndaydata <- merge(daydata, p1data, by=c(\"date\", \"code\"), all.x=TRUE)\ndaydata <- merge(daydata, p12data, by=c(\"date\", \"code\"), all.x=TRUE)\n\ndaydata$p1cases <- if_else(is.na(daydata$p1cases) & daydata$country==\"England\" & daydata$date<as.Date(\"2020-07-01\"),\n                           0, daydata$p1cases)\ndaydata$p12cases <- if_else(is.na(daydata$p12cases) & daydata$country==\"England\" & daydata$date<as.Date(\"2020-07-01\"), \n                            0, daydata$p12cases)\n\n#Estimate Pillar 2 cases\ndaydata$p2cases <- daydata$p12cases-daydata$p1cases\ndaydata$p2cases <- if_else(daydata$p2cases<0, 0, daydata$p2cases)\n\ndaydata$date <- as.Date(daydata$date)\n\n#National summary (E&W only)\ndaydata.nat <- daydata %>% \n  group_by(date, country) %>% \n  summarise(across(c(\"cases\", \"p1cases\", \"p12cases\", \"p2cases\"), sum)) %>% \n  mutate(name=country) %>% \n  ungroup()\n\ndaydata <- bind_rows(daydata, daydata.nat)\n\ndaydata <- daydata %>% \n  group_by(name) %>% \n  arrange(date) %>% \n  mutate(casesroll_avg=roll_mean(cases, 7, align=\"right\", fill=0)) %>% \n  ungroup()\n\ndaydata$date <- as.Date(daydata$date)\n\n#Calculate weekly cases\ndaydata$week <- week(as.Date(daydata$date)-days(4))\n\ndaydata.week <- daydata %>% \n  group_by(name, week) %>% \n  summarise(cases=sum(cases), p1cases=sum(p1cases), p2cases=sum(p2cases)) %>% \n  ungroup()\n\ndata <- merge(data, daydata.week, all.x=TRUE)\n\n#Calculate total excess deaths\nexcess.ew <- data %>% \n  filter(country!=\"Scotland\" & week<=maxweek.ew) %>% \n  group_by(name) %>% \n  summarise(excess=sum(allexcess, na.rm=TRUE), hist=sum(deaths.1519), excessprop=excess/hist) %>% \n  ungroup()\n\nexcess.s <-  data %>% \n  filter(country==\"Scotland\" & week<=maxweek.s) %>% \n  group_by(name) %>% \n  summarise(excess=sum(allexcess, na.rm=TRUE), hist=sum(deaths.1519), excessprop=excess/hist) %>% \n  ungroup()\n\nexcess <- bind_rows(excess.ew, excess.s)\n\n#Save master data\nwrite.csv(data, \"COVID_LA_Plots/LAExcess.csv\")\nwrite.csv(excess, \"COVID_LA_Plots/LAExcessSummary.csv\")\nwrite.csv(daydata, \"COVID_LA_Plots/LACases.csv\")\n\n####################################################################\n\ndata <- read.csv(\"COVID_LA_Plots/LAExcess.csv\")\nexcess <- read.csv(\"COVID_LA_Plots/LAExcessSummary.csv\")\ndaydata <- read.csv(\"COVID_LA_Plots/LACases.csv\")\n\n###################\n#LA-specific plots#\n###################\n\nLA <- \"Sheffield\"\n\nLAdata <- data %>% filter(name==LA) \nLAexcess <- excess %>% filter(name==LA) \n\nenddate <- if_else(LAdata$country[1]==\"Scotland\", enddate.s, enddate.ew)\nsource <- if_else(LAdata$country[1]==\"Scotland\", \"NRS\", \"ONS\")\n\nmaxweek <- week(enddate)\n\nlabpos <- max(sum(LAdata$AllCause.20[LAdata$week==maxweek]),\n              sum(LAdata$deaths.1519[LAdata$week==maxweek]))\n\nlab <- if_else(LAexcess[2]<0, \n               paste0(round(LAexcess[2],0), \" (\",round(LAexcess[4]*100,0), \"%) deaths in 2020\\ncompared to the average in 2015-19\"),\n               paste0(\"+\", round(LAexcess[2],0), \" (+\",round(LAexcess[4]*100,0), \"%) deaths in 2020\\ncompared to the average in 2015-19\"))\n\n#Excess deaths graph\npng(\"Outputs/COVID_LA_Plots_1.png\", units=\"in\", width=8, height=6, res=500)\nLAdata %>% \n  group_by(week) %>% \n  summarise(deaths.1519=sum(deaths.1519), AllCause.20=sum(AllCause.20)) %>% \nggplot()+\n  geom_line(aes(x=week, y=deaths.1519), colour=\"skyblue4\")+\n  geom_line(aes(x=week, y=AllCause.20), colour=\"red\")+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Deaths\", limits=c(0,NA))+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  annotate(\"text\", x=week(enddate)-2, y=max(labpos*1.5, labpos+20), \n           label=lab,\n           hjust=0, colour=\"red\", size=3)+\n  labs(title=paste0(\"Excess deaths in \", LA, \" during the pandemic\"),\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the average in 2015-19</span> by date of occurence<br>Data up to \", enddate, \". Data for recent weeks is likely to be an undercount due to deaths<br>not yet having been fully processed.\"),\n       caption=paste0(\"Data from \", source,\" | Plot by @VictimOfMaths\"))\ndev.off()\n\n#Excess deaths by cause\npng(\"Outputs/COVID_LA_Plots_2.png\", units=\"in\", width=8, height=6, res=500)\nLAdata %>% \n  gather(cause, excess, c(7,14)) %>% \n  group_by(week, cause) %>% \n  summarise(excess=sum(excess)) %>% \n  mutate(cause=fct_relevel(cause, \"COVID.20\")) %>% \nggplot(aes(x=week, y=excess, fill=cause))+\n  geom_bar(stat=\"identity\")+\n  geom_segment(aes(x=0.5, xend=maxweek+0.5, y=0, yend=0), colour=\"Grey30\")+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Excess deaths vs. 2015-19 average\")+\n  scale_fill_paletteer_d(\"LaCroixColoR::PinaFraise\", name=\"Cause\", labels=c(\"COVID-19\", \"Other causes\"))+\n  theme_classic()+\n  labs(title=paste0(\"Excess deaths in \", LA, \" during the pandemic\"),\n       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.\"),\n       caption=paste0(\"Data from \", source,\" | Plot by @VictimOfMaths\"))\ndev.off()\n\n#Excess deaths by location\npng(\"Outputs/COVID_LA_Plots_3.png\", units=\"in\", width=8, height=6, res=500)\nggplot(LAdata, aes(x=week, y=allexcess, fill=location))+\n  geom_col()+\n  geom_segment(aes(x=0.5, xend=maxweek+0.5, y=0, yend=0), colour=\"Grey30\")+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Excess deaths vs. 2015-19 average\")+\n  scale_fill_paletteer_d(\"ggsci::planetexpress_futurama\", name=\"Place of death\")+\n  theme_classic()+\n  labs(title=paste0(\"Excess deaths in \", LA, \" during the pandemic\"),\n       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.\"),\n       caption=paste0(\"Data from \", source,\" | Plot by @VictimOfMaths\"))\ndev.off()\n\n#Cases vs. deaths\npng(\"Outputs/COVID_LA_Plots_4.png\", units=\"in\", width=8, height=6, res=500)\nLAdata %>% \n  group_by(week) %>% \n  summarise(excess=sum(COVID.20), cases=unique(cases)) %>% \nggplot()+\n  geom_segment(aes(x=0.5, xend=maxweek+0.5, y=0, yend=0), colour=\"Grey30\")+\n  geom_line(aes(x=week, y=cases), colour=\"#B25D91\")+\n  geom_line(aes(x=week, y=excess), colour=\"#1BB6AF\")+\n  scale_x_continuous(name=\"Week\", limits=c(0,maxweek+1))+\n  scale_y_continuous(name=\"\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=paste0(\"Timeline of COVID-19 in \", LA),\n       subtitle=paste0(\"Confirmed new COVID-19 <span style='color:#B25D91;'>cases</span> compared to confirmed COVID-19 <span style='color:#1BB6AF;'>deaths</span> by week of occurence.<br>Data up to \", enddate),\n       caption=paste0(\"Data from \", source,\" | Plot by @VictimOfMaths\"))\ndev.off()\n\n#cases plot\n#England & Wales only\ntiff(paste0(\"Outputs/COVIDNewCases\", LA, \".tiff\"), units=\"in\", width=8, height=6, res=500)\n#png(\"Outputs/COVID_LA_Plots_5.png\", units=\"in\", width=8, height=6, res=500)\ndaydata %>% \n  filter(name==LA) %>% \nggplot()+\n  geom_col(aes(x=date, y=cases), fill=\"skyblue2\")+\n  geom_line(aes(x=date, y=casesroll_avg), colour=\"red\")+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Daily confirmed new cases\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=paste0(\"Confirmed new COVID cases in \",LA),\n       subtitle=\"Confirmed new COVID-19 cases identified through combined pillar 1 & 2 testing<br>and the <span style='color:Red;'>7-day rolling average\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\n#Experimental pillar 1 vs. 2 tests numbers\n#ENGLAND ONLY\n#tiff(paste0(\"Outputs/COVIDNewCasesPillars\", LA, \".tiff\"), units=\"in\", width=8, height=6, res=500)\npng(\"Outputs/COVID_LA_Plots_6.png\", units=\"in\", width=8, height=6, res=500)\ndaydata %>% \n  filter(name==LA) %>% \nggplot()+\n  geom_line(aes(x=date, y=p1cases), colour=\"#FF4E86\")+\n  geom_line(aes(x=date, y=p2cases), colour=\"#FF9E44\")+\n  geom_line(aes(x=date, y=casesroll_avg), colour=\"navyblue\")+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Daily confirmed new cases\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=paste0(\"Confirmed new COVID cases in \",LA),\n       subtitle=\"Confirmed new COVID-19 cases identified through <span style='color:#FF4E86;'>Pillar 1</span> and <span style='color:#FF9E44;'>Pillar 2</span> testing and the <span style='color:navyblue;'>7-day rolling average</span>.<br>PHE changed their methodology on 1st July and so pillar-specific data is not available since then.<br>Rolling average based on new approach.<br>Pillar-specific figures are estimated from the old approach and may be subject to some double-counting\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\n#################################################\n#Analysis of cumulative excess deaths\n"
  },
  {
    "path": "All Cause Mortality/MSOA Deaths.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(readxl)\nlibrary(paletteer)\nlibrary(hrbrthemes)\nlibrary(sf)\n\n#Read in data\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1marchand31july2020/referencetables1.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata <- read_excel(temp, sheet=\"Table 5\", range=\"A14:X7214\", col_names=FALSE)[,c(1,2,3,10,17,24)]\ncolnames(data) <- c(\"code\", \"ONSName\", \"Name\", \"CV19Deaths\", \"OtherDeaths\", \"AllDeaths\")\n\n#Read in MSOA populations\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fmiddlesuperoutputareamidyearpopulationestimates%2fmid2018sape21dt3a/sape21dt3amid2018msoaon2019lasyoaestimatesformatted.zip\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\nMSOApop <- read_excel(file.path(temp2,\"SAPE21DT3a-mid-2018-msoa-on-2019-LA-syoa-estimates-formatted.xlsx\"), \n                      sheet=\"Mid-2018 Persons\", range=c(\"A6:D7545\"), col_names=FALSE)[,c(1,4)]\ncolnames(MSOApop) <- c(\"code\", \"pop\")\n\n#Merge into data and calculate rates\ndata <- merge(data, MSOApop)\ndata$CV19rate <- data$CV19Deaths*100000/data$pop\n\n#Download shapefile of LA boundaries\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile <- st_read(file.path(temp2, name))\n\nnames(shapefile)[names(shapefile) == \"msoa11cd\"] <- \"code\"\n\nmap <- full_join(shapefile, data, by=\"code\", all.y=TRUE)\n\npng(\"Outputs/COVIDDeathsMapBW.png\", units=\"in\", width=20, height=23.3, res=500)\nggplot(map)+\n  geom_sf(aes(geometry=geometry, fill=CV19rate), colour=NA, show.legend=FALSE)+\n  scale_fill_paletteer_c(\"oompaBase::greyscale\", name=\"\")+\n  theme_ipsum_rc()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour=\"Black\"),\n        axis.title=element_blank(), plot.background=element_rect(fill=\"black\"),\n        panel.background=element_rect(fill=\"Black\"), legend.background=element_rect(fill=\"Black\"),\n        text=element_text(colour=\"White\", size=rel(5)), legend.text=element_text(colour=\"White\", size=rel(3)),\n        panel.grid.major=element_line(colour=\"transparent\"))+\n  guides(fill=guide_colourbar(ticks=FALSE))\ndev.off()\n\n#Then crop out the little bit of whitespace around the image, import into Aerialod and make it look pretty!\n\n#Bring in Local Authority to allow LA-specific plots\n#Read in MSOA to LA lookup\ntemp <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nMSOAtoLAD <- read.csv(temp)[,c(8,10,11,15,17)]\ncolnames(MSOAtoLAD) <- c(\"code\", \"LAcode\", \"LAname\", \"Region\", \"Country\")\n\n#Remove duplicate rows, as original data was LSOA-level\nMSOAtoLAD <- MSOAtoLAD %>% \n  distinct(.keep_all = TRUE)\n\nmap <- full_join(map, MSOAtoLAD, by=\"code\", all.y=TRUE)\n\n#Set up outputs for any LA by name\nLA <- c(\"Barking and Dagenham\", \"Barnet\", \"Bexley\", \"Brent\", \"Bromley\", \"Camden\", \"City of London\",\n        \"Croydon\", \"Ealing\", \"Enfield\", \"Greenwich\", \"Hackney\", \"Hammersmith and Fulham\",\n        \"Haringey\", \"Harrow\", \"Havering\", \"Hillingdon\", \"Hounslow\", \"Islington\", \"Kensington and Chelsea\",\n        \"Kingston upon Thames\", \"Lambeth\", \"Lewisham\", \"Merton\", \"Newham\", \"Redbridge\", \n        \"Richmond upon Thames\", \"Southwark\", \"Sutton\", \"Tower Hamlets\", \"Waltham Forest\",\n        \"Wandsworth\", \"Westminster\")\n\n#png(paste0(\"Outputs/COVIDDeathsMapBW\", LA, \".png\"), units=\"in\", width=20, height=20, res=500)\npng(\"Outputs/COVIDDeathsMapBWLondon.png\", units=\"in\", width=20, height=20, res=500)\nggplot(subset(map, LAname %in% LA))+\n  geom_sf(aes(geometry=geometry, fill=CV19Deaths), colour=NA, show.legend=FALSE)+\n  scale_fill_paletteer_c(\"oompaBase::greyscale\", name=\"\")+\n  theme_ipsum_rc()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour=\"Black\"),\n        axis.title=element_blank(), plot.background=element_rect(fill=\"black\"),\n        panel.background=element_rect(fill=\"Black\"), legend.background=element_rect(fill=\"Black\"),\n        text=element_text(colour=\"White\", size=rel(5)), legend.text=element_text(colour=\"White\", size=rel(3)),\n        panel.grid.major=element_line(colour=\"transparent\"))+\n  guides(fill=guide_colourbar(ticks=FALSE))\ndev.off()\n\n##################\n#Scottish version#\n##################\n#Read in data\ntemp <- tempfile()\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-extra-tables-week-32.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata.S <- read_excel(temp, sheet=\"Table S8\", range=\"A5:F1283\", col_names=FALSE)\ncolnames(data.S) <- c(\"code\", \"IZname\", \"LAname\", \"CV19Deaths\", \"pop\", \"CV19rate\")\n\n#Read in shapefile\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"http://sedsh127.sedsh.gov.uk/Atom_data/ScotGov/ZippedShapefiles/SG_IntermediateZoneBdry_2011.zip\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\nshapefile.S <- st_read(file.path(temp2, \"SG_IntermediateZone_Bdry_2011.shp\"))\n\nnames(shapefile.S)[names(shapefile.S) == \"InterZone\"] <- \"code\"\n\nmap.S <- full_join(shapefile.S, data.S, by=\"code\", all.y=TRUE)\n\npng(\"Outputs/COVIDDeathsMapScotBW.png\", units=\"in\", width=20, height=25, res=500)\nggplot(map.S)+\n  geom_sf(aes(geometry=geometry, fill=CV19rate), colour=NA, show.legend=FALSE)+\n  scale_fill_paletteer_c(\"oompaBase::greyscale\", name=\"\")+\n  theme_ipsum_rc()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour=\"Black\"),\n        axis.title=element_blank(), plot.background=element_rect(fill=\"black\"),\n        panel.background=element_rect(fill=\"Black\"), legend.background=element_rect(fill=\"Black\"),\n        text=element_text(colour=\"White\", size=rel(5)), legend.text=element_text(colour=\"White\", size=rel(3)),\n        panel.grid.major=element_line(colour=\"transparent\"))+\n  guides(fill=guide_colourbar(ticks=FALSE))\ndev.off()\n\n#Merge the UK data\ntemp1 <- map[,c(2,8,9,12,13,18)]\ntemp2 <- map.S[,c(1,2,12,13,14,15)]\nmap.UK <- rbind(temp1, temp2)\n\npng(\"Outputs/COVIDDeathsMapUKBW.png\", units=\"in\", width=20, height=25, res=500)\nggplot(map.UK)+\n  geom_sf(aes(geometry=geometry, fill=CV19rate), colour=NA, show.legend=FALSE)+\n  scale_fill_paletteer_c(\"oompaBase::greyscale\", name=\"\")+\n  theme_ipsum_rc()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_text(colour=\"Black\"),\n        axis.title=element_blank(), plot.background=element_rect(fill=\"black\"),\n        panel.background=element_rect(fill=\"Black\"), legend.background=element_rect(fill=\"Black\"),\n        text=element_text(colour=\"White\", size=rel(5)), legend.text=element_text(colour=\"White\", size=rel(3)),\n        panel.grid.major=element_line(colour=\"transparent\"))+\n  guides(fill=guide_colourbar(ticks=FALSE))\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/NRS Excess Deaths by Cause.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(readxl)\nlibrary(paletteer)\n\ntemp <- tempfile()\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-53.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nendcol <- \"BC\"\n\n#Historic data for all locations\nall.hist <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B8:\",endcol,\"13\"), col_names=FALSE)\ncolnames(all.hist) <- c(\"cause\", seq(1:(ncol(all.hist)-1)))\nall.hist$time <- \"hist\"\nall.hist$loc <- \"All\"\n\n#2020 data for all locations\nall.2020 <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B16:\",endcol,\"21\"), col_names=FALSE)\ncolnames(all.2020) <- c(\"cause\", seq(1:(ncol(all.2020)-1)))\nall.2020$time <- \"now\"\nall.2020$loc <- \"All\"\n\n#Historic data for care homes\nch.hist <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B32:\",endcol,\"37\"), col_names=FALSE)\ncolnames(ch.hist) <- c(\"cause\", seq(1:(ncol(ch.hist)-1)))\nch.hist$time <- \"hist\"\nch.hist$loc <- \"Care Home\"\n\n#2020 data for care homes\nch.2020 <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B40:\",endcol,\"45\"), col_names=FALSE)\ncolnames(ch.2020) <- c(\"cause\", seq(1:(ncol(ch.2020)-1)))\nch.2020$time <- \"now\"\nch.2020$loc <- \"Care Home\"\n\n#Historic data for homes\nhosp.hist <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B56:\",endcol,\"61\"), col_names=FALSE)\ncolnames(hosp.hist) <- c(\"cause\", seq(1:(ncol(hosp.hist)-1)))\nhosp.hist$time <- \"hist\"\nhosp.hist$loc <- \"Home\"\n\n#2020 data for homes\nhosp.2020 <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B64:\",endcol,\"69\"), col_names=FALSE)\ncolnames(hosp.2020) <- c(\"cause\", seq(1:(ncol(hosp.2020)-1)))\nhosp.2020$time <- \"now\"\nhosp.2020$loc <- \"Home\"\n\n#Historic data for hospitals\nhome.hist <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B80:\",endcol,\"85\"), col_names=FALSE)\ncolnames(home.hist) <- c(\"cause\", seq(1:(ncol(home.hist)-1)))\nhome.hist$time <- \"hist\"\nhome.hist$loc <- \"Hospital\"\n\n#2020 data for hospitals\nhome.2020 <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B88:\",endcol,\"93\"), col_names=FALSE)\ncolnames(home.2020) <- c(\"cause\", seq(1:(ncol(home.2020)-1)))\nhome.2020$time <- \"now\"\nhome.2020$loc <- \"Hospital\"\n\n#Historic data for other locations\nother.hist <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B104:\",endcol,\"109\"), col_names=FALSE)\ncolnames(other.hist) <- c(\"cause\", seq(1:(ncol(other.hist)-1)))\nother.hist$time <- \"hist\"\nother.hist$loc <- \"Other\"\n\n#2020 data for other locations\nother.2020 <- read_excel(temp, sheet=\"Table 3 \", range=paste0(\"B112:\",endcol,\"117\"), col_names=FALSE)\ncolnames(other.2020) <- c(\"cause\", seq(1:(ncol(other.2020)-1)))\nother.2020$time <- \"now\"\nother.2020$loc <- \"Other\"\n\ndata <- bind_rows(all.hist, all.2020, ch.hist, ch.2020, hosp.hist, hosp.2020, home.hist, home.2020,\n                  other.hist, other.2020)\n\ndata <- gather(data, week, deaths, c(2:(ncol(data)-2)))\n\ndata <- spread(data, time, deaths)\n\ndata$week <- as.numeric(data$week)\n\ndata <- data %>% \n  mutate(abs=now-hist, rel=abs/hist)\n\ndata$cause <- if_else(data$cause==\"Circulatory (heart disease and stroke)\", \"Circulatory\",\n                      data$cause)\n\ndata$cause <- factor(data$cause, levels=c(\"COVID-19\", \"Cancer\", \"Circulatory\",\n                                          \"Dementia / Alzheimers\", \"Respiratory\", \"Other\"))\n\ndata$loc <- factor(data$loc, levels=c(\"Hospital\", \"Care Home\", \"Home\", \"All\"))\n\n#get net deaths difference by location\nnet.deaths.loc <- data %>% \n  group_by(loc, week) %>% \n  summarise(deaths=sum(abs))\n\nnet.deaths.cause <- data %>% \n  group_by(cause, week) %>% \n  summarise(deaths=sum(abs))\n\n#Plot of all locations\ntiff(\"Outputs/NRSExcessxcause.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(data=subset(data, loc==\"All\"))+\n  geom_segment(aes(x=0, xend=ncol(all.hist)-3, y=0, yend=0))+\n  geom_bar(aes(x=week, y=abs, fill=cause), stat=\"identity\", position=\"stack\")+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Deaths in 2020 vs. 2015-19 average\")+\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"Cause of death\")+\n  theme_classic()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"COVID-19 deaths in Scotland have continued to fall gradually\",\n       subtitle=\"Registered deaths in 2020 compared to the previous 5-year average\",\n       caption=\"Data from National Records of Scotland | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/NRSExcessxcausexloc.tiff\", units=\"in\", width=12, height=8, res=500)\nggplot(data=subset(data, loc!=\"All\" & loc!=\"Other\"))+\n  geom_segment(aes(x=0, xend=ncol(all.hist)-3, y=0, yend=0))+\n  geom_bar(aes(x=week, y=abs, fill=cause), stat=\"identity\", position=\"stack\")+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Deaths in 2020 vs. 2015-19 average\")+\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"Cause of death\")+\n  facet_wrap(~loc)+\n  theme_classic()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\n  labs(title=\"Excess mortality in Scotland by cause and location\",\n       subtitle=\"Registered deaths in 2020 compared to the previous 5-year average\",\n       caption=\"Data from National Records of Scotland | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/NRSExcessxlocxcause.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(subset(data, loc!=\"All\" & loc!=\"Other\"))+\n  geom_segment(aes(x=0, xend=ncol(all.hist)-3, y=0, yend=0))+\n  geom_line(aes(x=week, y=abs, colour=loc))+\n  scale_colour_paletteer_d(\"fishualize::Scarus_tricolor\", name=\"Place of death\")+\n  scale_x_continuous(name=\"Week\")+\n  scale_y_continuous(name=\"Deaths in 2020 vs. 2015-19 average\")+\n  facet_wrap(~cause)+\n  theme_classic()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\n  labs(title=\"COVID-19 deaths have mainly fallen in hospitals\",\n       subtitle=\"Excess mortality in Scotland in 2020 by cause and location\",\n       caption=\"Data from National Records of Scotland | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/ONSDeathsxVaxStatus.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\nvaxpal <- c(\"#FFBC42\", \"#D81159\") \r\n\r\ntemp <- tempfile()\r\nurl1 <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/deathsbyvaccinationstatusengland/deathsoccurringbetween1april2021and31december2022/referencetable.xlsx\"\r\ntemp <- curl_download(url=url1, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxstatus <- read_excel(temp, sheet=\"Table 1\", range=\"A4:J571\") %>%  \r\n  mutate(Date=as.Date(paste(Year, Month, \"01\", sep=\"-\"), \"%Y-%B-%d\")) %>% \r\n  select(c(1,4:7, 9:11)) %>% \r\n  set_names(\"Cause\", \"Vaccination Status\", \"Deaths\", \"PersonYears\", \"Rate\", \r\n            \"LowerCI\", \"UpperCI\", \"Date\") %>% \r\n  mutate(across(c(Rate, LowerCI, UpperCI), ~as.numeric(.x)))\r\n\r\nvaxxage <- read_excel(temp, sheet=\"Table 2\", range=\"A4:K3091\") %>%  \r\n  mutate(Date=as.Date(paste(Year, Month, \"01\", sep=\"-\"), \"%Y-%B-%d\")) %>% \r\n  select(c(1, 4:8, 10:12)) %>% \r\n  set_names(\"Cause\", \"Age\", \"Vaccination Status\", \"Deaths\", \"PersonYears\", \"Rate\", \r\n            \"LowerCI\", \"UpperCI\", \"Date\") %>% \r\n  mutate(across(c(Rate, LowerCI, UpperCI), ~as.numeric(.x)))\r\n\r\nvaxxsex <- read_excel(temp, sheet=\"Table 3\", range=\"A4:K1138\") %>%  \r\n  mutate(Date=as.Date(paste(Year, Month, \"01\", sep=\"-\"), \"%Y-%B-%d\")) %>% \r\n  select(c(1,2, 5:8, 10:12)) %>% \r\n  set_names(\"Sex\", \"Cause\", \"Vaccination Status\", \"Deaths\", \"PersonYears\", \"Rate\", \r\n            \"LowerCI\", \"UpperCI\", \"Date\") %>% \r\n  mutate(across(c(Rate, LowerCI, UpperCI), ~as.numeric(.x)))\r\n                      \r\nvaxxagexsex <- read_excel(temp, sheet=\"Table 4\", range=\"A4:L4120\") %>% \r\n  mutate(Date=as.Date(paste(Year, Month, \"01\", sep=\"-\"), \"%Y-%B-%d\"))                     \r\n\r\nagg_tiff(\"Outputs/DeathsxVaxxCause.tiff\", units=\"in\", width=10, height=6, res=600)\r\nvaxstatus %>% filter(`Vaccination Status` %in% c(\"Ever vaccinated\", \"Unvaccinated\")) %>% \r\nggplot(aes(x=Date))+\r\n  geom_ribbon(aes(ymin=LowerCI, ymax=UpperCI, fill=`Vaccination Status`), \r\n              alpha=0.3, show.legend=FALSE)+\r\n  geom_line(aes(y=Rate, colour=`Vaccination Status`))+\r\n  scale_x_date(labels=date_format(\"%b %y\"))+ \r\n  scale_y_continuous(name=\"Age-standardised deaths per 100,000 person years\")+\r\n  scale_fill_manual(values=vaxpal)+\r\n  scale_colour_manual(values=vaxpal, name=\"\")+\r\n  facet_wrap(~Cause)+\r\n  theme_custom()+\r\n  theme(legend.position = \"bottom\", plot.title=element_markdown())+\r\n  labs(title=\"Death rates are consistently lower among <span style='color:#FFBC42;'> vaccinated </span> vs. <span style='color:#D81159;'> unvaccinated </span> people\",\r\n       subtitle=\"Age-standardised mortality rates by cause and vaccination status in England. Shaded areas represent 95% Confidence Intervals\\n \",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nvaxxageredux <- vaxxage %>% \r\n  mutate(VaxStatus=if_else(`Vaccination Status`==\"Unvaccinated\", \"Unvaccinated\",\r\n                           \"Ever Vaccinated\")) %>% \r\n  group_by(Cause, Age, Date, VaxStatus) %>% \r\n  summarise(Rate=weighted.mean(Rate, PersonYears, na.rm=TRUE),\r\n            LowerCI=weighted.mean(LowerCI, PersonYears, na.rm=TRUE),\r\n            UpperCI=weighted.mean(UpperCI, PersonYears, na.rm=TRUE), .groups=\"drop\")\r\n\r\nagg_tiff(\"Outputs/DeathsxVaxxCausexAge.tiff\", units=\"in\", width=10, height=6, res=600)\r\nvaxxageredux %>% filter(Cause==\"All causes\" & Age!=\"90+\") %>% \r\n  ggplot(aes(x=Date))+\r\n  geom_ribbon(aes(ymin=LowerCI, ymax=UpperCI, fill=VaxStatus), \r\n              alpha=0.3, show.legend=FALSE)+\r\n  geom_line(aes(y=Rate, colour=VaxStatus))+\r\n  scale_x_date(labels=date_format(\"%b %y\"))+ \r\n  scale_y_continuous(name=\"Age-standardised deaths per 100,000 person years\",\r\n                     limits=c(0,NA))+\r\n  scale_fill_manual(values=vaxpal)+\r\n  scale_colour_manual(values=vaxpal, name=\"\")+\r\n  facet_wrap(~Age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(legend.position = \"bottom\", plot.title=element_markdown())+\r\n  labs(title=\"Death rates are consistently lower among <span style='color:#FFBC42;'> vaccinated </span> vs. <span style='color:#D81159;'> unvaccinated </span> people\",\r\n       subtitle=\"Age-standardised all cause mortality rates by age, cause and vaccination status in England. Shaded areas represent 95% Confidence Intervals\\n \",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Currently appears to be a labelling error in the ONS data here with the male\r\n#and female dates not aligning\r\nagg_tiff(\"Outputs/DeathsxVaxxCausexSex.tiff\", units=\"in\", width=12, height=6, res=600)\r\nvaxxsex %>% filter(`Vaccination Status` %in% c(\"Ever vaccinated\", \"Unvaccinated\")) %>% \r\n  ggplot(aes(x=Date))+\r\n  geom_ribbon(aes(ymin=LowerCI, ymax=UpperCI, fill=`Vaccination Status`), \r\n              alpha=0.3, show.legend=FALSE)+\r\n  geom_line(aes(y=Rate, colour=`Vaccination Status`))+\r\n  scale_x_date(labels=date_format(\"%b %y\"))+ \r\n  scale_y_continuous(name=\"Age-standardised deaths per 100,000 person years\",\r\n                     limits=c(0,NA))+\r\n  scale_fill_manual(values=vaxpal)+\r\n  scale_colour_manual(values=vaxpal, name=\"\")+\r\n  facet_grid(Sex~Cause)+\r\n  theme_custom()+\r\n  theme(legend.position = \"bottom\", plot.title=element_markdown())+\r\n  labs(title=\"Death rates are consistently lower among <span style='color:#FFBC42;'> vaccinated </span> vs. <span style='color:#D81159;'> unvaccinated </span> people\",\r\n       subtitle=\"Age-standardised all cause mortality rates by age, cause and vaccination status in England. Shaded areas represent 95% Confidence Intervals\\n \",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "All Cause Mortality/ScottishAllCauseDeathsDetail.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(paletteer)\nlibrary(curl)\nlibrary(lubridate)\nlibrary(readxl)\nlibrary(ggtext)\n\n#Controls\nScotDate <- \"3rd January\"\nScot2020 <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-53.xlsx\"\nScotRange <- \"BC\" #incrememnt by one letter each week\nWeekno <- 53\n\n#Read in 2015-2019 location data\ntemp <- tempfile()\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-deaths-by-location-2015-2019.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata.loc <- na.omit(read.csv(temp))\n\ndata.loc <- data.loc[-c(1, 26:31),]\ncolnames(data.loc) <- c(\"year\", c(1:53))\n\ndata.loc$location <- rep(c(\"Care Home\", \"Home / Non-institution\", \"Hospital\", \"Other instutition\"),\n                         each=6)\n\ndata.loc_long <- gather(data.loc, week, deaths, c(2:54))\ndata.loc_long$week <- as.integer(data.loc_long$week)\n\n#Read in 2015-19 health board data\ntemp <- tempfile()\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/weekly-HB-and-CA-2015-2019.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata.HB <- read_excel(temp, sheet=1, range=\"A5:BC74\", col_names=FALSE)\n\ncolnames(data.HB) <- c(\"HB\", \"year\", c(1:53))\ndata.HB$year <- as.character(data.HB$year)\n\nHBlist <- unique(na.omit(data.HB$HB))\n\ndata.HB$HB <- rep(HBlist, each=5)\n\ndata.HB_long <- gather(data.HB, week, deaths, c(3:55))\ndata.HB_long$week <- as.integer(data.HB_long$week)\n\n#calculate averages\ntemp <- data.HB_long %>%\n  group_by(week, HB) %>%\n  summarise(deaths=mean(deaths))\n\ntemp$year=\"average\"\n\ndata.HB_long <- bind_rows(data.HB_long, temp)\n\n#Bring in 2020 data\ntemp <- tempfile()\ntemp <- curl_download(url=Scot2020, destfile=temp, quiet=FALSE, mode=\"wb\")\n\n#Tidy location data\ndata.loc.2020 <- data.frame(t(read_excel(temp, sheet=\"Table 2 \", range=c(paste0(\"C90:\", ScotRange, \"93\")), col_names=FALSE)))\ndate <- data.frame(date=format(seq.Date(from=as.Date(\"2019-12-30\"), by=\"7 days\", length.out=nrow(data.loc.2020)), \"%d/%m/%y\"))\ndata.loc.2020 <- cbind(date, data.loc.2020)\ncolnames(data.loc.2020) <- c(\"date\", \"Care Home\", \"Home / Non-institution\", \"Hospital\", \"Other instutition\")\ndata.loc.2020$date <- as.Date(data.loc.2020$date, \"%d/%m/%y\")\ndata.loc.2020$week <- week(data.loc.2020$date+days(6))\ndata.loc.2020$week <- if_else(data.loc.2020$date==as.Date(\"2020-12-28\"), 53, data.loc.2020$week)\ndata.loc.2020$year <- \"2020\"\n\n#Merge with older years\ndata.loc.2020_long <- gather(data.loc.2020, location, deaths, c(2:5))\ndata.loc.2020_long$deaths <- as.numeric(data.loc.2020_long$deaths)\ndata.loc.2020_long$deaths <- replace_na(data.loc.2020_long$deaths, 0)\ndata.loc <- bind_rows(data.loc_long, data.loc.2020_long)\n\n#merge 'Other institution' deaths into 'home/other'\ndata.loc$loc <- case_when(\n  data.loc$location==\"Care Home\" ~ \"Care Home\",\n  data.loc$location==\"Hospital\" ~ \"Hospital\",\n  TRUE ~ \"Home/Other\"\n)\n\ndata.loc$loc <- factor(data.loc$loc, levels=c(\"Hospital\", \"Care Home\", \"Home/Other\"))\n\ndata.loc <- data.loc %>%\n  group_by(year, loc, week) %>%\n  summarise(deaths=sum(deaths))\n\n#Tidy HB data\ndata.HB.2020 <- data.frame(t(read_excel(temp, sheet=\"Table 2 \", range=c(paste0(\"C40:\", ScotRange,\"53\")), col_names=FALSE)))\ndata.HB.2020 <- cbind(date, data.HB.2020)\ncolnames(data.HB.2020) <- c(\"date\", HBlist)\ndata.HB.2020$date <- as.Date(data.HB.2020$date, \"%d/%m/%y\")\ndata.HB.2020$week <- week(data.HB.2020$date+days(6))\ndata.HB.2020$week <- if_else(data.HB.2020$date==as.Date(\"2020-12-28\"), 53, data.HB.2020$week)\ndata.HB.2020$year <- \"2020\"\n\n#Merge with older years\ndata.HB.2020_long <- gather(data.HB.2020, HB, deaths, c(2:15))\ndata.HB <- bind_rows(data.HB_long, data.HB.2020_long)\n\n#Plot death location data\ndata.loc.old <- data.loc %>%\n  filter(!year %in% c(\"2020\", \"average\")) %>%\n  group_by(week, loc) %>%\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\n\ntiff(\"Outputs/NRSWeeklyDeathsxLocation.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot()+\n  geom_ribbon(data=data.loc.old, aes(x=week, ymin=min, ymax=max), fill=\"Skyblue2\")+\n  geom_line(data=subset(data.loc, year==\"average\"), aes(x=week, y=deaths), colour=\"Grey50\", linetype=2)+\n  geom_line(data=subset(data.loc, year==\"2020\"), aes(x=week, y=deaths), colour=\"Red\")+\n  facet_wrap(~loc)+\n  theme_classic()+\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\n  scale_y_continuous(name=\"Deaths registered\")+\n  expand_limits(y=0)+\n  labs(title=\"All-cause deaths in Scotland by place of death\",\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2015-19</span>. Data up to \", ScotDate, \".\"),\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle =element_markdown(), plot.title =element_text(face=\"bold\", size=rel(1.2)))\n\ndev.off()\n\n#Calculate excess deaths vs. average\ndata.loc.new <- merge(subset(data.loc, year==\"2020\"), data.loc.old)\ndata.loc.new$excess <- data.loc.new$deaths-data.loc.new$mean\n\n#plot excess deaths over time\ntiff(\"Outputs/NRSWeeklyDeathsExcessxLocation.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot(data.loc.new, aes(x=week, y=excess))+\n  geom_segment(aes(x=0, xend=Weekno, y=0, yend=0), colour=\"Grey40\")+\n  geom_line(aes(colour=loc))+\n  theme_classic()+\n  scale_x_continuous(name=\"Week commencing\", breaks=c(1:Weekno), \n                     labels=c(format(seq.Date(from=as.Date(\"2019-12-30\"), by=\"7 days\", \n                                              length.out=Weekno), \"%d/%m/%y\")))+\n  scale_y_continuous(name=\"Excess deaths compared to 2015-19 average\")+\n  scale_colour_paletteer_d(\"ggsci::planetexpress_futurama\", name=\"Place of death\")+\n  labs(title=\"Excess deaths have risen in all settings\",\n       subtitle=\"Weekly deaths in 2020 compared to the average in 2015-19\",\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\ndev.off()\n\n#Plot HB data\ndata.HB.old <- data.HB %>%\n  filter(!year %in% c(\"2020\", \"average\")) %>%\n  group_by(week, HB) %>%\n  summarise(max=max(deaths), min=min(deaths), mean=mean(deaths))\n\n#Bring in 2020 data & average for easier plotting\ndata.HB.old <- merge(data.HB.old, subset(data.HB, year==\"2020\")[,c(1,3,4)], by=c(\"week\", \"HB\"), all.x=TRUE)\ncolnames(data.HB.old) <- c(\"week\", \"HB\", \"max\", \"min\", \"mean\", \"2020\")\n\nmaxweek <- max(data.HB.2020$week)\n\n#Calculate excess deaths by Health Board\ndata.HB.old$excess <- data.HB.old$`2020`-data.HB.old$mean\nexcess <- data.HB.old %>%\n  filter(week<=maxweek) %>%\n  group_by(HB) %>%\n  summarise(totalexcess=sum(excess), totalmean=sum(mean), propexcess=totalexcess/totalmean)\n\n#Order HBs by total excess deaths\nexcess$HB <- fct_reorder(as.factor(excess$HB), -excess$totalexcess)\nexcess <- arrange(excess, HB)\ndata.HB.old$HB <- factor(data.HB.old$HB, levels=levels(excess$HB))\n\ndata.HB.old <- arrange(data.HB.old, data.HB.old$HB)\n\n#Extract label positions for excess deaths\nlabpos <-  data.HB.old %>%\n  filter(!is.na(`2020`) & week==maxweek) %>%\n  group_by(HB) %>%\n  mutate(pos=max(`2020`*1.4, max+60))\n\nann_text <- data.frame(weekno=rep(24, times=14), deaths=labpos$pos, \n                       HB=as.factor(levels(data.HB.old$HB)))\n\n\ntiff(\"Outputs/NRSWeeklyDeathsxHB.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot(data.HB.old)+\n  geom_ribbon(aes(x=week, ymin=min, ymax=max), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean, ymax=`2020`), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=`2020`), colour=\"Red\")+\n  facet_wrap(~HB)+\n  theme_classic()+\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\n  scale_y_continuous(name=\"Deaths registered\")+\n  expand_limits(y=0)+\n  labs(title=\"All-cause mortality in Scottish Health Boards\",\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2015-19</span>. Data up to \", ScotDate, \".\"),\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\n  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 (+\",\n                                                                   round(excess[1,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[2,2],0),\"  deaths (+\",\n                                                                   round(excess[2,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[3,2],0),\"  deaths (+\",\n                                                                   round(excess[3,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[4,2],0),\"  deaths (+\",\n                                                                   round(excess[4,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[5,2],0),\"  deaths (+\",\n                                                                   round(excess[5,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[6,2],0),\"  deaths (+\",\n                                                                   round(excess[6,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[7,2],0),\"  deaths (+\",\n                                                                   round(excess[7,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[8,2],0),\"  deaths (+\",\n                                                                   round(excess[8,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[9,2],0),\"  deaths (+\",\n                                                                   round(excess[9,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[10,2],0),\"  deaths (+\",\n                                                                   round(excess[10,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[11,2],0),\"  deaths (+\",\n                                                                   round(excess[11,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[12,2],0),\"  deaths (+\",\n                                                                   round(excess[12,4]*100, 0),\"%)\"),\n                                                            paste0(\"+\",round(excess[13,2],0),\"  deaths (+\",\n                                                                   round(excess[13,4]*100, 0),\"%)\"),\n                                                            paste0(round(excess[14,2],0),\"  deaths (\",\n                                                                   round(excess[14,4]*100, 0),\"%)\")),\n            size=3, colour=rep(\"red\", times=14), hjust=0)+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle =element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\ndev.off()\n\n#Read in age data\ntemp <- tempfile()\ntemp <- curl_download(url=Scot2020, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata.age.2020 <- data.frame(t(read_excel(temp, sheet=\"Table 2 \", range=paste0(\"C15:\",ScotRange, \"21\"), col_names=FALSE)))\ndate <- data.frame(date=format(seq.Date(from=as.Date(\"2019-12-30\"), by=\"7 days\", length.out=nrow(data.age.2020)), \"%d/%m/%y\"))\ndata.age.2020 <- cbind(date, data.age.2020)\ncolnames(data.age.2020) <- c(\"date\", \"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")\ndata.age.2020$date <- as.Date(data.age.2020$date, \"%d/%m/%y\")\ndata.age.2020$weekno <- week(data.age.2020$date)\n\ndata.age.2020_long <- gather(data.age.2020, age, deaths, c(2:8))\ndata.age.2020_long$year <- 2020\ndata.age.2020_long$deaths <- as.numeric(ifelse(data.age.2020_long$deaths==\".\", 0, data.age.2020_long$deaths))\n\n#Recalculate dates to align with ONS data (which uses week to, not w/c)\ndata.age.2020_long$date <- data.age.2020_long$date+days(6)\ndata.age.2020_long$week <- week(data.age.2020_long$date)\n\ndata.age.2020_long$age <- as.factor(data.age.2020_long$age)\nlevels(data.age.2020_long$age)[which(levels(data.age.2020_long$age)==\"Under 1 year\")] <- \"0-14\"\nlevels(data.age.2020_long$age)[which(levels(data.age.2020_long$age)==\"01-14\")] <- \"0-14\"\n\ndata.age.2020_long <- data.age.2020_long %>%\n  group_by(week, year, age) %>%\n  summarise(deaths=sum(deaths))\n\n#Bring in 2010-2019 data\ntemp <- tempfile()\ntemp <- 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\")\ndata2010.S <- read_excel(temp, sheet=\"2010\", range=\"B4:BD44\", col_names=TRUE)\ndata2010.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2010.S_long <- gather(data2010.S, week, deaths, c(3:55))[,-c(2)]\ndata2010.S_long$year <- 2010\n\ndata2011.S <- read_excel(temp, sheet=\"2011\", range=\"B4:BD44\", col_names=TRUE)\ndata2011.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2011.S_long <- gather(data2011.S, week, deaths, c(3:55))[,-c(2)]\ndata2011.S_long$year <- 2011\n\ndata2012.S <- read_excel(temp, sheet=\"2012\", range=\"B4:BD44\", col_names=TRUE)\ndata2012.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2012.S_long <- gather(data2012.S, week, deaths, c(3:55))[,-c(2)]\ndata2012.S_long$year <- 2012\n\ndata2013.S <- read_excel(temp, sheet=\"2013\", range=\"B4:BD44\", col_names=TRUE)\ndata2013.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2013.S_long <- gather(data2013.S, week, deaths, c(3:55))[,-c(2)]\ndata2013.S_long$year <- 2013\n\ndata2014.S <- read_excel(temp, sheet=\"2014\", range=\"B4:BD44\", col_names=TRUE)\ndata2014.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2014.S_long <- gather(data2014.S, week, deaths, c(3:55))[,-c(2)]\ndata2014.S_long$year <- 2014\n\ndata2015.S <- read_excel(temp, sheet=\"2015\", range=\"B4:BD44\", col_names=TRUE)\ndata2015.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2015.S_long <- gather(data2015.S, week, deaths, c(3:55))[,-c(2)]\ndata2015.S_long$year <- 2015\n\ndata2016.S <- read_excel(temp, sheet=\"2016\", range=\"B4:BD44\", col_names=TRUE)\ndata2016.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2016.S_long <- gather(data2016.S, week, deaths, c(3:55))[,-c(2)]\ndata2016.S_long$year <- 2016\n\ndata2017.S <- read_excel(temp, sheet=\"2017\", range=\"B4:BD44\", col_names=TRUE)\ndata2017.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2017.S_long <- gather(data2017.S, week, deaths, c(3:55))[,-c(2)]\ndata2017.S_long$year <- 2017\n\ndata2018.S <- read_excel(temp, sheet=\"2018\", range=\"B4:BD44\", col_names=TRUE)\ndata2018.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2018.S_long <- gather(data2018.S, week, deaths, c(3:55))[,-c(2)]\ndata2018.S_long$year <- 2018\n\ndata2019.S <- read_excel(temp, sheet=\"2019\", range=\"B4:BD44\", col_names=TRUE)\ndata2019.S$sex <- rep(c(\"Female\", \"Male\"), each=20)\ndata2019.S_long <- gather(data2019.S, week, deaths, c(3:55))[,-c(2)]\ndata2019.S_long$year <- 2019\n\ndata1019.S_long <- bind_rows(data2010.S_long, data2011.S_long, data2012.S_long, data2013.S_long,\n                             data2014.S_long, data2015.S_long, data2016.S_long, data2017.S_long,\n                             data2018.S_long, data2019.S_long)\n\n#Match age bands\ndata1019.S_long$age <- case_when(\n  data1019.S_long$Age==\"0\" ~ \"0-14\",\n  data1019.S_long$Age==\"1-4\" ~ \"0-14\",\n  data1019.S_long$Age==\"5-9\" ~ \"0-14\",\n  data1019.S_long$Age==\"10-14\" ~ \"0-14\",\n  data1019.S_long$Age==\"15-19\" ~ \"15-44\",\n  data1019.S_long$Age==\"20-24\" ~ \"15-44\",\n  data1019.S_long$Age==\"25-29\" ~ \"15-44\",\n  data1019.S_long$Age==\"30-34\" ~ \"15-44\",\n  data1019.S_long$Age==\"35-39\" ~ \"15-44\",\n  data1019.S_long$Age==\"40-44\" ~ \"15-44\",\n  data1019.S_long$Age==\"45-49\" ~ \"45-64\",\n  data1019.S_long$Age==\"50-54\" ~ \"45-64\",\n  data1019.S_long$Age==\"55-59\" ~ \"45-64\",\n  data1019.S_long$Age==\"60-64\" ~ \"45-64\",\n  data1019.S_long$Age==\"65-69\" ~ \"65-74\",\n  data1019.S_long$Age==\"70-74\" ~ \"65-74\",\n  data1019.S_long$Age==\"75-79\" ~ \"75-84\",\n  data1019.S_long$Age==\"80-84\" ~ \"75-84\",\n  data1019.S_long$Age==\"85-89\" ~ \"85+\",\n  data1019.S_long$Age==\"90+\" ~ \"85+\"\n)\n\ndata1019.S <- data1019.S_long %>%\n  group_by(year, week, age) %>%\n  summarise(deaths=sum(deaths))\n\ndata1019.S$week <- as.integer(data1019.S$week)\n\ndata.age <- bind_rows(data1019.S, data.age.2020_long)\n\n#Calculate 2010-19 average, min and max\nhist.data.age <- data.age %>%\n  filter(year!=2020) %>%\n  group_by(age, week) %>%\n  summarise(mean=mean(deaths), max=max(deaths), min=min(deaths))\n\ndata.age <- merge(hist.data.age, subset(data.age, year==2020), all.x=TRUE, all.y=TRUE)\n\n#Calculate excess deaths by Health Board\ndata.age$excess <- data.age$deaths-data.age$mean\nexcess.age <- data.age %>%\n  filter(!is.na(data.age$excess)) %>%\n  group_by(age) %>%\n  summarise(totalexcess=sum(excess), totalmean=sum(mean), propexcess=totalexcess/totalmean)\n\n#Scotland only age plot\nann_text2 <- data.frame(week=rep(24, times=6), pos=c(75, 100, 240, 260, 400, 450),\n                        age=c(\"0-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"))\n\ntiff(\"Outputs/NRSWeeklyDeathsxAge.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot(data.age)+\n  geom_ribbon(aes(x=week, ymin=min, ymax=max), fill=\"Skyblue2\")+\n  geom_ribbon(aes(x=week, ymin=mean, ymax=deaths), fill=\"Red\", alpha=0.2)+\n  geom_line(aes(x=week, y=mean), colour=\"Grey50\", linetype=2)+\n  geom_line(aes(x=week, y=deaths), colour=\"Red\")+\n  theme_classic()+\n  facet_wrap(~age)+\n  scale_x_continuous(name=\"Week number\", breaks=c(0,10,20,30,40,50))+\n  scale_y_continuous(name=\"Deaths registered\")+\n  expand_limits(y=0)+\n  labs(title=\"Excess mortality has fallen for all age groups\",\n       subtitle=paste0(\"Weekly deaths in <span style='color:red;'>2020</span> compared to <span style='color:Skyblue4;'>the range in 2010-19</span>. Data up to \", ScotDate, \".\"),\n       caption=\"Data from NRS | Plot by @VictimOfMaths\")+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle =element_markdown())+\n  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 (\",\n                                                               round(excess.age[1,4]*100, 0),\"%)\"), \n                                                        paste0(\"+\",round(excess.age[2,2],0),\" deaths (+\",\n                                                               round(excess.age[2,4]*100, 0),\"%)\"),\n                                                        paste0(\"+\",round(excess.age[3,2],0),\" deaths (+\",\n                                                               round(excess.age[3,4]*100, 0),\"%)\"),\n                                                        paste0(\"+\",round(excess.age[4,2],0),\" deaths (+\",\n                                                               round(excess.age[4,4]*100, 0),\"%)\"),\n                                                        paste0(\"+\",round(excess.age[5,2],0),\" deaths (+\",\n                                                               round(excess.age[5,4]*100, 0),\"%)\"),\n                                                        paste0(\"+\",round(excess.age[6,2],0),\" deaths (+\",\n                                                               round(excess.age[6,4]*100, 0),\"%)\")), \n            size=3, colour=rep(\"red\", times=6), hjust=0)\n\ndev.off()\n"
  },
  {
    "path": "All Cause Mortality/readme.md",
    "content": "**Analysis of data on weekly all-cause mortality during the pandemic**<br><br>\n[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.<br><br>\n[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/).<br>\n[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/).<br><br>\nI'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).<br><br>\nI'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).<br><br>\n[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.<br><br>\n[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.\n[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).<br><br>\n[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*).<br><br>\n[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.\n\n![Excess deaths](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/ONSNRSNISRAWeeklyDeathsxReg.png)\n![MSOA COVID-19 deaths](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVID19MSOAUKv2.png)\n![Excess deaths in 15-64 year olds across Europe and the USA](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/ExcessEURUSHeatmap15-64.png)\n![Expected COVID deaths in England](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/COVIDDeathForecastEng.png)\n\nSuggested citation for any of this analysis:<br>\nAngus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226\n"
  },
  {
    "path": "Exposure mapping/COVIDExposures.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(paletteer)\nlibrary(curl)\nlibrary(readxl)\nlibrary(sf)\nlibrary(gtools)\nlibrary(cowplot)\n\n#Read in 2018 mid-year population estimates at LSOA level by sex and single year of age\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2018sape21dt1a/sape21dt1amid2018on2019lalsoasyoaestimatesformatted.zip\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\ndata_m <- read_excel(file.path(temp2, \"SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx\"), \n                     sheet=\"Mid-2018 Males\", range=\"A5:CQ35097\", col_names=TRUE)\ndata_f <- read_excel(file.path(temp2, \"SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx\"), \n                     sheet=\"Mid-2018 Females\", range=\"A5:CQ35097\", col_names=TRUE)\n\n#Merge sex-specific data\ndata_m$sex <- \"Male\"\ndata_f$sex <- \"Female\"\ndata <- rbind(data_m, data_f)\n\n#Collapse into age bands matching CFR data\ndata$`0-9` <- rowSums(data[,c(5:14)])\ndata$`10-19` <- rowSums(data[,c(15:24)])\ndata$`20-29` <- rowSums(data[,c(25:34)])\ndata$`30-39` <- rowSums(data[,c(35:44)])\ndata$`40-49` <- rowSums(data[,c(45:54)])\ndata$`50-59` <- rowSums(data[,c(55:64)])\ndata$`60-69` <- rowSums(data[,c(65:74)])\ndata$`70-79` <- rowSums(data[,c(75:84)])\ndata$`80+` <- rowSums(data[,c(85:95)])\n\ndata <- data[,c(1:3, 96:105)]\n\ndata_long <- gather(data, age, pop, c(5:13))\n\n# Italian data updated 23rd April\n# https://www.epicentro.iss.it/coronavirus/bollettino/Bollettino-sorveglianza-integrata-COVID-19_23-aprile-2020.pdf\n# 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\n\ncfr <-  tibble::tribble(\n  ~age, ~b, ~m, ~f, ~ifr,\n  \"0-9\",      0.2,      0.1,      0.2,      0.002,\n  \"10-19\",    0.000001, 0.000001, 0.000001, 0.006,\n  \"20-29\",    0.1,      0.1,      0.000001, 0.03,\n  \"30-39\",    0.4,      0.5,      0.3,      0.08,\n  \"40-49\",    0.9,      1.6,      0.4,      0.15,\n  \"50-59\",    2.6,      4.3,      1.1,      0.6,\n  \"60-69\",   10.0,     12.6,      5.9,      2.2,\n  \"70-79\",   24.9,     30.2,     17.2,      5.1,\n  \"80+\",     30.8,     42.0,     22.0,      9.3\n) \n\n#Calculate age-specific sex:population cfr ratios in Italian data\ncfr$mtobratio <- cfr$m/cfr$b\ncfr$ftobratio <- cfr$f/cfr$b\n\n#Apply these to population estimates of ifr from Imperial figures\ncfr$mifr <- cfr$ifr*cfr$mtobratio\ncfr$fifr <- cfr$ifr*cfr$ftobratio\n\n#Merge into population data\ndata_long <- merge(data_long,cfr, all.x=TRUE)\n\n#Calculate expected deaths with 100% inflection by age group\ndata_long$ex_deaths <- case_when(\n  data_long$sex==\"Male\" ~ data_long$pop*data_long$mifr/100,\n  data_long$sex==\"Female\" ~ data_long$pop*data_long$fifr/100\n)\n\n#Summarise by LSOA\ndata_LSOA <- data_long %>% \n  group_by(`Area Codes`) %>% \n  summarise(name=unique(LSOA), pop=sum(pop), ex_deaths=sum(ex_deaths))\n\ndata_LSOA$mortrate <- data_LSOA$ex_deaths*100000/data_LSOA$pop\n\n#Separate out LA-level data\ndata_LA <- subset(data_LSOA, is.na(name))\n\n#Remove from LSOA-level data\ndata_LSOA <- subset(data_LSOA, !is.na(name))\n\n#Bring in 2019 IMD data (England only)\ntemp <- tempfile()\nsource <- \"https://opendatacommunities.org/downloads/cube-table?uri=http%3A%2F%2Fopendatacommunities.org%2Fdata%2Fsocietal-wellbeing%2Fimd2019%2Findices\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nIMD <- read.csv(temp)\nIMD <- subset(IMD, (Measurement==\"Decile \" | Measurement==\"Rank\") & Indices.of.Deprivation==\"e. Health Deprivation and Disability Domain\")\nIMD_wide <- spread(IMD, Measurement, Value)\ndata_LSOA <- merge(data_LSOA, IMD_wide[,c(1,5,6)], by.x=\"Area Codes\", by.y=\"FeatureCode\", all.x=TRUE )\ncolnames(data_LSOA) <- c(\"code\", \"name\", \"pop\", \"ex_deaths\", \"mortrate\", \"decile\", \"rank\")\n\n#Rank LSOAs within each decile\ndata_LSOA <- data_LSOA %>%\n  group_by(decile) %>%\n  mutate(decile_rank = order(order(mortrate, decreasing=FALSE)))\n\ntiff(\"Outputs/COVIDMortDepGrid.tiff\", units=\"in\", width=15, height=5, res=300)\nggplot(subset(data_LSOA, !is.na(decile)), aes(y=as.factor(decile), x=decile_rank, fill=mortrate))+\n  geom_tile()+\n  theme_classic()+\n  scale_fill_paletteer_c(\"viridis::magma\", direction=-1,name=\"Potential deaths\\nper 100,000\")+\n  scale_y_discrete(name=\"Health deprivation & disability\", labels=c(\"1 - most deprived\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \n                                               \"8\", \"9\", \"10 - least deprived\"))+\n  scale_x_continuous(name=\"\")+\n  theme(axis.text.x=element_blank(), axis.line.x=element_blank(), axis.ticks.x=element_blank())+\n  labs(title=\"Maximum potential exposure to COVID-19 mortality by health deprivation\",\n       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\",\n       caption=\"Population data from ONS, CFRs from Imperial College, sex-specific data from ISS\\nPlot by @VictimOfMaths\")\ndev.off()\n\n#calculate mean mortality rates by decile and overall (population weighted)\ndata_LSOA <- data_LSOA %>%\n  group_by(decile) %>%\n  mutate(decilemean = weighted.mean(mortrate, pop))\n\ndata_LSOA <- ungroup(data_LSOA)\n\ndata_LSOA <- data_LSOA %>%\n  mutate(popmean = weighted.mean(mortrate, pop))\n\n  tiff(\"Outputs/COVIDMortDepScatter.tiff\", units=\"in\", width=12, height=8, res=300)\n  ggplot(subset(data_LSOA, !is.na(decile)), aes(x=mortrate, y=as.factor(decile), colour=mortrate))+\n    geom_jitter(shape=21, alpha=0.6, show.legend=FALSE)+\n    geom_segment(aes(x=popmean, xend=popmean, y=Inf, yend=-Inf), colour=\"Grey20\")+\n    geom_point(aes(x=decilemean, y=as.factor(decile)), colour=\"Grey20\", fill=\"Cyan\", shape=23, size=2)+\n    scale_colour_paletteer_c(\"viridis::magma\", direction=-1)+\n    scale_x_continuous(name=\"Potential deaths per 100,000\")+\n    scale_y_discrete(name=\"Health deprivation & disability\", labels=c(\"1 - most deprived\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \n                                                                      \"8\", \"9\", \"10 - least deprived\"))+  \n    theme_classic()+\n    labs(title=\"Maximum potential exposure to COVID-19 mortality by health deprivation\",\n         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\",\n         caption=\"Population data from ONS, CFRs from Imperial College, sex-specific data from ISS\\nPlot by @VictimOfMaths\")+\n  annotate(\"text\", x=3200, y=8.51, label=\"Each circle = 1 LSOA\", size=3)+\n    annotate(\"text\", x=1800, y=6.5, label=\"Population average\", size=3)+\n    annotate(\"text\", x=800, y=3.5, label=\"Decile average\", size=3)+\n    geom_segment(aes(x=1170, y=6.5,  xend=1580, yend=6.5), colour=\"Grey20\")+\n    geom_segment(aes(x=800, y=3.55,  xend=1060, yend=3.91), colour=\"Grey20\")\n  dev.off()\n\n\n#Download shapefile of LSOA boundaries\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/e886f1cd40654e6b94d970ecf437b7b5_0.zip?outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile <- st_read(file.path(temp2, name))\nnames(shapefile)[names(shapefile) == \"LSOA11CD\"] <- \"code\"\n\n#Convert to EPSG4326 projection to match lat/long and make siting annotations easier\nshapefile <- st_transform(map.data, crs=4326)\n\nmap.data <- full_join(shapefile, data_LSOA, by=\"code\")\n\n#Map fo age-based risk\nggplot(subset(map.data, substr(name, 1,5)==\"Sheff\"), aes(fill=mortrate, geometry=geometry))+\n  geom_sf(colour=NA)+\n  theme_classic()+\n  scale_fill_paletteer_c(\"pals::ocean.tempo\", name=\"Potential deaths\\nper 100,000\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  labs(title=\"Maximum potential exposure to COVID-19 mortality by deprivation\",\n       subtitle=\"Calculated using LSOA-level population age/sex distribution and observed Case Fatality Rates from Italy, assuming 100% COVID-19 prevalence\",\n       caption=\"Population data from ONS, CFRs adapted from ISS & Imperial data\\nPlot by @VictimOfMaths\")\n\n#Bring in Local Authorities (LADs)\ntemp <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nLSOAtoLAD <- read.csv(temp)[,c(4,10,11)]\ncolnames(LSOAtoLAD) <- c(\"code\", \"LAcode\", \"LAname\")\n  \nmap.data <- full_join(map.data, LSOAtoLAD, by=\"code\")\n\n#Bring in Regions\ntemp <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nLADtoRegion <- read.csv(temp)[,c(1,4)]\ncolnames(LADtoRegion) <- c(\"LAcode\", \"Region\")\n\nmap.data <- full_join(map.data, LADtoRegion, by=\"LAcode\")\n\n#Remove Scottish Data Zones which have snuck into the data\nmap.data <- subset(map.data, substr(code, 1,1)==\"E\")\n\n#Bivariate map\n#tertile the IMD and mortrate variables\n#generate tertiles\nmap.data$IMDtert <- quantcut(-map.data$rank, q=3, labels=FALSE)\nmap.data$morttert <- quantcut(map.data$mortrate, q=3, labels=FALSE)\n\n#Generate key\nkeydata <- data.frame(IMDtert=c(1,1,1,2,2,2,3,3,3), morttert=c(1,2,3,1,2,3,1,2,3),\n                      RGB=c(\"#e8e8e8\",\"#ace4e4\",\"#5ac8c8\",\"#dfb0d6\",\"#a5add3\",\n                               \"#5698b9\",\"#be64ac\",\"#8c62aa\",\"#3b4994\"))\n\n#Bring colours into main data for plotting\nmap.data <- left_join(map.data, keydata, by=c(\"IMDtert\", \"morttert\"))\n\n#strip out a few unnecessary columns for tidiness\nmap.data <- map.data[,-c(1,3:6)]\n\n#Calculate mean mortrates and ranks by LA, region and nationally\nmap.data <- map.data %>%\n  group_by(LAcode) %>%\n  mutate(LAmeanrate = weighted.mean(mortrate, pop), LAmeanrank= weighted.mean(rank, pop)) %>%\n  ungroup()\n\nmap.data <- map.data %>%\n  group_by(Region) %>%\n  mutate(regmeanrate = weighted.mean(mortrate, pop), regmeanrank= weighted.mean(rank, pop)) %>%\n  ungroup()\n\nmap.data <- map.data %>%\n  mutate(popmeanrate = weighted.mean(mortrate, pop), popmeanrank= weighted.mean(rank, pop)) \n\n#Save sf object\nst_write(map.data, \"Data/COVID19LSOA.shp\")\n\n##################################\n#Only need to run code above once#\n##################################\n\nmap.data <- st_read(\"Data/COVID19LSOA.shp\")\n\n#Generate key\nkeydata <- data.frame(IMDtert=c(1,1,1,2,2,2,3,3,3), morttert=c(1,2,3,1,2,3,1,2,3),\n                      RGB=c(\"#e8e8e8\",\"#ace4e4\",\"#5ac8c8\",\"#dfb0d6\",\"#a5add3\",\n                            \"#5698b9\",\"#be64ac\",\"#8c62aa\",\"#3b4994\"))\n\n#Plot for Sheffield with annotations\nplot <- ggplot(subset(map.data, LAname==\"Sheffield\"), aes(fill=RGB, geometry=geometry))+\n  geom_sf(colour=\"White\")+\n  theme_classic()+\n  scale_fill_identity()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  labs(title=\"Mapping potential COVID-19 risk across Sheffield\",\n       subtitle=\"LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population\",\n       caption=\"Population data from ONS, CFRs adapted from ISS & Imperial data\\nPlot by @VictimOfMaths\")+\n  annotate(\"text\", x=-1.38, y=53.45, label=\"High deprivation,\\nyoung population\", size=3)+\n  annotate(\"text\", x=-1.34, y=53.38, label=\"High deprivation,\\nold population\", size=3)+\n  annotate(\"text\", x=-1.75, y=53.4, label=\"Low deprivation,\\nold population\", size=3)+\n  geom_curve(aes(x=-1.38, y=53.44, xend=-1.4, yend=53.42), curvature=-0.15, \n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  geom_curve(aes(x=-1.345, y=53.37, xend=-1.36, yend=53.355), curvature=-0.15, \n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  geom_curve(aes(x=-1.725, y=53.4, xend=-1.62, yend=53.36), curvature=0.15, \n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))\n\nkey <- ggplot(keydata)+\n  geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+\n  scale_fill_identity()+\n  labs(x = expression(\"Greater age-based COVID-19 risk\" %->%  \"\"),\n       y = expression(\"Greter health deprivation\" %->%  \"\")) +\n  theme_classic() +\n  # make font small enough\n  theme(\n    axis.title = element_text(size = 8),axis.line=element_blank(), \n    axis.ticks=element_blank(), axis.text=element_blank())+\n  # quadratic tiles\n  coord_fixed()\n\ntiff(\"Outputs/COVIDBivariateSheff.tiff\", units=\"in\", width=12, height=8, res=300)\nggdraw()+\n  draw_plot(plot, 0,0,1,1)+\n  draw_plot(key, 0.03,0.03,0.3,0.3)\ndev.off()\n\n#Plot for all of greater London, with annotations\nLondon <- ggplot(subset(map.data, Region==\"London\"), aes(fill=RGB, geometry=geometry))+\n  geom_sf(color = NA)+\n  theme_classic()+\n  scale_fill_identity()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\", size=rel(3)),\n        plot.subtitle=element_text(size=rel(2)), plot.caption=element_text(size=rel(2)))+\n  labs(title=\"Mapping potential COVID-19 risk across London\",\n       subtitle=\"LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population\",\n       caption=\"Population data from ONS, CFRs adapted from ISS & Imperial data\\nPlot by @VictimOfMaths\")+\n  annotate(\"text\", x=0.29, y=51.48, label=\"High deprivation,\\nyoung population\", size=6)+\n  annotate(\"text\", x=0.24, y=51.4, label=\"High deprivation,\\nold population\", size=6)+\n  annotate(\"text\", x=-0.23, y=51.7, label=\"Low deprivation,\\nold population\", size=6)+\n  geom_curve(aes(x=0.25, y=51.48, xend=0.2, yend=51.466), curvature=0.15,\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  geom_curve(aes(x=0.2, y=51.4, xend=0.1, yend=51.419), curvature=-0.15,\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\n  geom_curve(aes(x=-0.22, y=51.69, xend=-0.16, yend=51.67), curvature=0.15,\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))\n\nLonkey <- ggplot(keydata)+\n  geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+\n  scale_fill_identity()+\n  labs(x = expression(\"Greater age-based COVID-19 risk\" %->%  \"\"),\n       y = expression(\"Greter health deprivation\" %->%  \"\")) +\n  theme_classic() +\n  # make font small enough\n  theme(\n    axis.title = element_text(size = rel(1.5)),axis.line=element_blank(), \n    axis.ticks=element_blank(), axis.text=element_blank())+\n  # quadratic tiles\n  coord_fixed()\n\ntiff(\"Outputs/COVIDBivariateLondon.tiff\", units=\"in\", width=24, height=18, res=300)\nggdraw()+\n  draw_plot(London, 0,0,1,1)+\n  draw_plot(Lonkey, 0.03,0.03,0.23,0.23)\ndev.off()\n\n#Generic version - essentially a less user friendly version of https://t.co/zcHcYMFUjg?amp=1\n#But with more detailed resolution on the shapefile (i.e. wigglier LSOA boundaries)\n\n#Select LAs to map\nuserLA <- c(\"Salford\", \"Stockport\", \"Manchester\", \"Trafford\", \"Tameside\", \"Oldham\", \"Rochdale\", \"Wigan\", \"Bolton\", \"Bury\")\n#Select name for title\nuserLAname <- \"Greater Manchester\"\n#Select whether to display LSOA boundaries or not (looks nicer without, but may be more useful with)\nLSOABoundaries <- FALSE\n\nuserplot <- ggplot(subset(map.data, LAname %in% userLA), aes(fill=RGB, geometry=geometry))+\n  geom_sf(colour=ifelse(LSOABoundaries==FALSE ,NA, \"White\"))+\n  theme_classic()+\n  scale_fill_identity()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  labs(title=paste(\"Mapping potential COVID-19 risk across\", userLAname),\n       subtitle=\"LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population\",\n       caption=\"Population data from ONS, CFRs adapted from ISS & Imperial data\\nPlot by @VictimOfMaths\")\n\nkey <- ggplot(keydata)+\n  geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+\n  scale_fill_identity()+\n  labs(x = expression(\"Greater age-based COVID-19 risk\" %->%  \"\"),\n       y = expression(\"Greater health deprivation\" %->%  \"\")) +\n  theme_classic() +\n  # make font small enough\n  theme(\n    axis.title = element_text(size = 8),axis.line=element_blank(), \n    axis.ticks=element_blank(), axis.text=element_blank())+\n  # quadratic tiles\n  coord_fixed()\n\ntiff(paste0(\"Outputs/COVIDBivariate\",userLAname,\".tiff\"), units=\"in\", width=12, height=8, res=300)\nggdraw()+\n  draw_plot(userplot, 0,0,1,1)+\n  #Comment out all but the desired legend position below\n  #draw_plot(key, 0.03,0.03,0.3,0.3) #Bottom left\n  draw_plot(key, 0.03,0.6,0.3,0.3) #Top left\n  #draw_plot(key, 0.68,0.6,0.3,0.3) #Top right\n  #draw_plot(key, 0.68,0.05,0.3,0.3) #Bottom right\ndev.off()\n\n#Add in stamen maps below the bivariate maps. Looks nice when it works, but sometimes it's tricky\n#to align the geographies of the maps\nlibrary(ggmap)\nlibrary(osmdata)\nlibrary(ggExtra)\n\n#get stamen map (can replace userLAname here with other names, e.g. 'Greater Manchester')\nstamen.map <- get_stamenmap(getbb(userLAname), maptype=\"toner-lines\", zoom=12)\n\nuserplot <- stamen.map %>%\n  ggmap()+\n  geom_sf(data=subset(map.data, LAname %in% userLA), aes(fill=RGB, geometry=geometry), \n          colour=ifelse(LSOABoundaries==FALSE ,NA, \"White\"), inherit.aes=FALSE, alpha=0.35)+\n  theme_classic()+\n  scale_fill_identity()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  labs(title=paste(\"Mapping potential COVID-19 risk across\", userLAname),\n       subtitle=\"LSOA-level health deprivation and potential COVID-19 mortality risk based on age-sex structure of population\",\n       caption=\"Population data from ONS, CFRs adapted from ISS & Imperial data\\nPlot by @VictimOfMaths\")\nkey <- ggplot(keydata)+\n  geom_tile(aes(x=morttert, y=IMDtert, fill=RGB))+\n  scale_fill_identity()+\n  labs(x = expression(\"Greater age-based COVID-19 risk\" %->%  \"\"),\n       y = expression(\"Greater health deprivation\" %->%  \"\")) +\n  theme_classic() +\n  # make font small enough\n  theme(\n    axis.title = element_text(size = 8),axis.line=element_blank(), \n    axis.ticks=element_blank(), axis.text=element_blank())+\n  # quadratic tiles\n  coord_fixed()\n\ntiff(paste0(\"Outputs/COVIDBivariate\",userLAname,\".tiff\"), units=\"in\", width=12, height=8, res=300)\nggdraw()+\n  draw_plot(userplot, 0,0,1,1)+\n  #Comment out all but the desired legend position below\n  draw_plot(key, 0.03,0.03,0.3,0.3) #Bottom left\n  #draw_plot(key, 0.03,0.6,0.3,0.3) #Top left\n#draw_plot(key, 0.68,0.6,0.3,0.3) #Top right\n#draw_plot(key, 0.68,0.05,0.3,0.3) #Bottom right\ndev.off()\n"
  },
  {
    "path": "Exposure mapping/SheffieldCOVIDRiskxLSOA.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(sf)\r\nlibrary(paletteer)\r\n\r\n#Download population age/sex structures at LSOA level from ONS 2018 mid-year estimates\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2018sape21dt1a/sape21dt1amid2018on2019lalsoasyoaestimatesformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\ndata_m <- read_excel(file.path(temp2, \"SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx\"), \r\n                     sheet=\"Mid-2018 Males\", range=\"A5:CQ35097\", col_names=TRUE)\r\ndata_f <- read_excel(file.path(temp2, \"SAPE21DT1a-mid-2018-on-2019-LA-lsoa-syoa-estimates-formatted.xlsx\"), \r\n                     sheet=\"Mid-2018 Females\", range=\"A5:CQ35097\", col_names=TRUE)\r\n\r\n#Merge sex-specific data\r\ndata_m$sex <- \"Male\"\r\ndata_f$sex <- \"Female\"\r\ndata <- rbind(data_m, data_f)%>% \r\n  filter(!is.na(LSOA)) %>% \r\n  gather(age, pop, c(6:ncol(.)-1)) %>% \r\n  select(c(1,5:7)) %>% \r\n  mutate(ageband=case_when(\r\n    age<5 ~ \"0-4\", age<10 ~ \"5-9\", age<15 ~ \"10-14\", age<20 ~ \"15-19\", age<25 ~ \"20-24\",\r\n    age<30 ~ \"25-29\", age<35 ~ \"30-34\", age<40 ~ \"35-39\", age<45 ~ \"40-44\",\r\n    age<50 ~ \"45-49\", age<55 ~ \"50-54\", age<60 ~ \"55-59\", age<65 ~ \"60-64\",\r\n    age<70 ~ \"65-69\", age<75 ~ \"70-74\", age<80 ~ \"75-79\", TRUE ~ \"80+\"\r\n  ))\r\n\r\n#Set IFRs based on O'Driscoll et al. synthesis of data across 45 countries\r\n#https://www.medrxiv.org/content/10.1101/2020.08.24.20180851v1.full.pdf\r\n#Date from Table S4\r\nIFR <- data.frame(ageband=rep(c(\"0-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\",\r\n                            \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\", \"65-69\", \"70-74\",\r\n                            \"75-79\", \"80+\"), times=2), \r\n                  sex=rep(c(\"Male\", \"Female\"), each=17),\r\n                  IFR=c(0.002, 0.000, 0.001, 0.002, 0.005, 0.012, 0.024, 0.040, 0.077, 0.118, 0.223, \r\n                        0.344, 0.473, 0.868, 1.445, 2.973, 8.619, 0.002, 0.001, 0.000, 0.001, 0.003, \r\n                        0.007, 0.010, 0.018, 0.028, 0.053, 0.084, 0.138, 0.246, 0.417, 0.707, 1.580,\r\n                        5.928))\r\n\r\n#Bring in IFRs and calculate expected mortality with 100% infection rates by LSOA\r\ndata <- merge(data, IFR, by=c(\"sex\", \"ageband\"))\r\n\r\nex_data <- data %>% \r\n  mutate(ex_deaths=pop*IFR/100) %>% \r\n  group_by(`Area Codes`) %>% \r\n  summarise(ex_deaths=sum(ex_deaths), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(ex_mortrate=ex_deaths*100000/pop)\r\n\r\n#Bring in LA names to allow filtering\r\ntemp <- tempfile()\r\nsource <- \"http://geoportal1-ons.opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLSOAtoLAD <- read.csv(temp) %>% \r\n  select(LSOA11CD, LAD17CD, LAD17NM) %>% \r\n  unique()\r\n\r\nex_data <- merge(ex_data, LSOAtoLAD, by.x=\"Area Codes\", by.y=\"LSOA11CD\", all.x=TRUE) \r\n\r\n#Save Sheffield LSOAs\r\nex_data %>% \r\n  filter(LAD17NM==\"Sheffield\") %>% \r\n  select(`Area Codes`, ex_mortrate) %>% \r\n  write.csv(\"Data/SheffCOVIDAgeRiskByLSOA.csv\")\r\n\r\n#Download shapefile of LSOA boundaries\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://data.cambridgeshireinsight.org.uk/sites/default/files/Lower_Layer_Super_Output_Areas_December_2011_Generalised_Clipped__Boundaries_in_England_and_Wales.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\r\nname <- list.files(temp2, pattern=\".shp\")\r\nshapefile <- st_read(file.path(temp2, name))\r\nnames(shapefile)[names(shapefile) == \"lsoa11cd\"] <- \"Area Codes\"\r\n\r\nmap.data <- full_join(shapefile, ex_data, by=\"Area Codes\")\r\n\r\npng(\"Outputs/SheffieldCOVIDRiskLSOA.png\", units=\"in\", width=10, height=7, res=500)\r\nmap.data %>% \r\n  filter(LAD17NM==\"Sheffield\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(geometry=geometry, fill=ex_mortrate), colour=NA)+\r\n  scale_fill_paletteer_c(\"pals::ocean.amp\", name=\"Expected max. deaths\\nper 100,000\")+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n        axis.title=element_blank(),)+\r\n  labs(title=\"Age-based COVID-19 risk\",\r\n       subtitle=\"Estimated mortality across Sheffield assuming 100% infection rates\",\r\n       caption=\"IFR data taken from O'Driscoll et al. | Population data from ONS 2018 mid-year estimates\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Exposure mapping/readme.md",
    "content": "Mapping potential population exposure to COVID-19.<br><br>\n[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/).\n\n![Bivariate map](https://github.com/VictimOfMaths/COVID-19/blob/master/Exposure%20mapping/COVIDBivariateLondon.png)\n\nSuggested citation for any of this analysis:<br>\nAngus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226\n"
  },
  {
    "path": "Heatmaps/COVIDAdmissionsLTLAPhasePlot.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(RcppRoll)\r\nlibrary(sf)\r\nlibrary(snakecase)\r\nlibrary(ggrepel)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\nlibrary(gtools)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Read in admissions data\r\n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-hospital-activity/\r\nadmurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/Weekly-covid-admissions-and-beds-publication-220623.xlsx\"\r\n\r\n#Increment by 7 when each new report is published\r\nadmrange <- \"CF\"\r\n#Set latest date of admissions data\r\nadmdate <- as.Date(\"2022-06-19\")\r\n\r\n#Read in admissions\r\n#First data up to 6th April\r\nadmurl.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\"\r\n\r\ntemp1 <- tempfile()\r\ntemp1 <- curl_download(url=admurl.old, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\nraw.adm.old <- read_excel(temp1, sheet=\"Hosp ads & diag\", range=paste0(\"B25:IS512\"), \r\n                          col_names=FALSE)\r\n\r\n#Then data from 7th April to 30th Sept\r\nadmurl.old2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/Weekly-covid-admissions-and-beds-publication-211209-210407-210930.xlsx\"\r\n\r\ntemp1 <- tempfile()\r\ntemp1 <- curl_download(url=admurl.old2, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\nraw.adm.old2 <- read_excel(temp1, sheet=\"Hosp ads & diag\", range=paste0(\"B25:FY512\"), \r\n                          col_names=FALSE)\r\n\r\n#Then data from 1st October to 31st March\r\nadmurl.old3 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/05/Weekly-covid-admissions-and-beds-publication-220512_211001to220331-1.xlsx\"\r\n\r\ntemp1 <- tempfile()\r\ntemp1 <- curl_download(url=admurl.old3, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\nraw.adm.old3 <- read_excel(temp1, sheet=\"Hosp ads & diag\", range=paste0(\"B25:GD512\"), \r\n                           col_names=FALSE)\r\n\r\n#Read in more recent data\r\ntemp2 <- tempfile()\r\ntemp2 <- curl_download(url=admurl, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\nraw.adm <- read_excel(temp2, sheet=\"Hosp ads & diag\", range=paste0(\"B25:\",admrange,\"304\"), \r\n                      col_names=FALSE)\r\n\r\n#Tidy up data\r\nadmissions.old <- raw.adm.old %>% \r\n  gather(date, admissions, c(4:ncol(raw.adm.old))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.integer(substr(date, 4, 6))-4)) %>% \r\n  rename(Region=...1, code=...2, name=...3) %>% \r\n  bind_rows(raw.adm.old2 %>% \r\n              gather(date, admissions, c(4:ncol(raw.adm.old2))) %>% \r\n              mutate(date=as.Date(\"2021-04-07\")+days(as.integer(substr(date, 4, 6))-4)) %>% \r\n              rename(Region=...1, code=...2, name=...3)) %>% \r\n  bind_rows(raw.adm.old3 %>% \r\n              gather(date, admissions, c(4:ncol(raw.adm.old3))) %>% \r\n              mutate(date=as.Date(\"2021-10-01\")+days(as.integer(substr(date, 4, 6))-4)) %>% \r\n              rename(Region=...1, code=...2, name=...3))\r\n\r\nadmissions <- raw.adm %>% \r\n  gather(date, admissions, c(4:ncol(raw.adm))) %>% \r\n  mutate(date=as.Date(\"2022-04-01\")+days(as.integer(substr(date, 4, 6))-4)) %>% \r\n  rename(Region=...1, code=...2, name=...3) %>% \r\n  bind_rows(admissions.old)\r\n\r\n#Bring in PHE data summarising admissions in HES to each trust by MSOA\r\nMSOA.adm <- read.csv(\"COVID_LA_Plots/Trust to MSOA HES data.csv\")\r\n\r\n#1st lookup for admissions up to 4th October, when RD3 and RDZ merged to form R0D in the admissions (but not deaths) data\r\nMSOA.adm1 <- MSOA.adm %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(CatchmentYear, msoa, TrustCode) %>% \r\n  summarise(msoa_total_catchment1=sum(msoa_total_catchment)) %>% \r\n  ungroup() \r\n\r\n#2nd lookup for after 4th October 2020\r\nMSOA.adm2 <- MSOA.adm %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(CatchmentYear, msoa, TrustCode) %>% \r\n  summarise(msoa_total_catchment2=sum(msoa_total_catchment)) %>% \r\n  ungroup()\r\n\r\n#3rd lookup for after 1st April 2021\r\nMSOA.adm3 <- MSOA.adm %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TrustCode==\"RXH\" ~ \"RYR\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(CatchmentYear, msoa, TrustCode) %>% \r\n  summarise(msoa_total_catchment3=sum(msoa_total_catchment)) %>% \r\n  ungroup()\r\n\r\n#4th lookup for after 1st June 2021\r\nMSOA.adm4 <- MSOA.adm %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TrustCode==\"RXH\" ~ \"RYR\",\r\n    TrustCode==\"RTV\" ~ \"RW4\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(CatchmentYear, msoa, TrustCode) %>% \r\n  summarise(msoa_total_catchment4=sum(msoa_total_catchment)) %>% \r\n  ungroup()\r\n\r\n#5th lookup for after 1st October 2021\r\nMSOA.adm5 <- MSOA.adm %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TrustCode==\"RXH\" ~ \"RYR\",\r\n    TrustCode==\"RTV\" ~ \"RW4\",\r\n    TrustCode==\"RW6\" ~ \"RM3\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(CatchmentYear, msoa, TrustCode) %>% \r\n  summarise(msoa_total_catchment5=sum(msoa_total_catchment)) %>% \r\n  ungroup()\r\n\r\ntemp1 <- data.frame(TrustCode=unique(MSOA.adm1$TrustCode))\r\ntemp2 <- data.frame(TrustCode=unique(MSOA.adm2$TrustCode))\r\ntemp3 <- data.frame(TrustCode=unique(MSOA.adm3$TrustCode))\r\ntemp4 <- data.frame(TrustCode=unique(MSOA.adm4$TrustCode))\r\ntemp5 <- data.frame(TrustCode=unique(MSOA.adm5$TrustCode))\r\n\r\ntemp <- bind_rows(temp1, temp2, temp3, temp4, temp5) %>%\r\n  unique()\r\n\r\nMSOA.adm <- merge(temp, MSOA.adm1, by=\"TrustCode\", all=TRUE) %>% \r\n  merge(., MSOA.adm2, all=TRUE) %>% \r\n  merge(., MSOA.adm3, all=TRUE) %>% \r\n  merge(., MSOA.adm4, all=TRUE) %>% \r\n  merge(., MSOA.adm5, all=TRUE)\r\n\r\n#Bring in MSOA to LTLA lookup\r\ntemp <- tempfile()\r\nsource <- \"http://geoportal1-ons.opendata.arcgis.com/datasets/0b3c76d1eb5e4ffd98a3679ab8dea605_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nMSOA.lookup <- read.csv(temp) %>% \r\n  select(MSOA11CD, LAD19CD, LAD19NM) %>% \r\n  unique() %>% \r\n  rename(msoa=MSOA11CD)\r\n\r\n#Merge into PHE lookup\r\nMSOA.adm <- merge(MSOA.adm, MSOA.lookup, by=\"msoa\", all.x=TRUE)\r\n\r\n#Convert to the lookup we want (trust to LTLA), averaging across last 3 years in data (2016-18)\r\ntrust.lookup <- MSOA.adm %>% \r\n  filter(CatchmentYear>=2016) %>% \r\n  group_by(TrustCode, LAD19CD, LAD19NM) %>% \r\n  summarise(catchment1=sum(msoa_total_catchment1, na.rm=TRUE),\r\n            catchment2=sum(msoa_total_catchment2, na.rm=TRUE),\r\n            catchment3=sum(msoa_total_catchment3, na.rm=TRUE),\r\n            catchment4=sum(msoa_total_catchment4, na.rm=TRUE),\r\n            catchment5=sum(msoa_total_catchment5, na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  group_by(TrustCode) %>% \r\n  mutate(pop1=sum(catchment1, na.rm=TRUE), popprop1=catchment1/pop1,\r\n         pop2=sum(catchment2, na.rm=TRUE), popprop2=catchment2/pop2,\r\n         pop3=sum(catchment3, na.rm=TRUE), popprop3=catchment3/pop3,\r\n         pop4=sum(catchment4, na.rm=TRUE), popprop4=catchment4/pop4,\r\n         pop5=sum(catchment5, na.rm=TRUE), popprop5=catchment5/pop5) %>% \r\n  ungroup() %>% \r\n  rename(code=TrustCode)\r\n\r\n#Bring lookup into admissions and deaths data\r\nadmissions <- merge(admissions, trust.lookup, by.x=\"code\", by.y=\"code\", all=TRUE)\r\n\r\n#Allocate admissions and deaths to LTLA based on population proportions and \r\n#aggregate up to LTLA level\r\nLAadmissions <- admissions %>% \r\n  mutate(LA.admissions=case_when(\r\n           date<=as.Date(\"2020-10-04\") ~ admissions*popprop1,\r\n           date<as.Date(\"2021-03-31\") ~ admissions*popprop2,\r\n           date<as.Date(\"2021-05-31\") ~ admissions*popprop3,\r\n           date<as.Date(\"2021-10-01\") ~ admissions*popprop4,\r\n           TRUE ~ admissions*popprop5)) %>% \r\n  group_by(LAD19CD, date, LAD19NM) %>% \r\n  summarise(admissions=sum(LA.admissions, na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  filter(!is.na(LAD19CD)) %>% \r\n  #merge City of London into Hackney and Isles of Scilly into Cornwall\r\n  mutate(LAD19CD=case_when(LAD19CD==\"E09000001\" ~ \"E09000012\",\r\n                           LAD19CD==\"E06000053\" ~ \"E06000052\",\r\n                           TRUE ~ as.character(LAD19CD))) %>%\r\n  group_by(LAD19CD, date, LAD19NM) %>% \r\n  summarise(admissions=sum(admissions)) %>% \r\n  ungroup()\r\n\r\n#Bring in regions\r\ntemp <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLADtoRegion <- read.csv(temp)[,c(1,4)]\r\ncolnames(LADtoRegion) <- c(\"LTLA\", \"Region\")\r\n\r\n#Bring in LA populations\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D435\", col_names=TRUE)\r\ncolnames(LApop) <- c(\"code\", \"name\", \"geography\", \"pop\")\r\n\r\n#Merge isles of Scilly in with Cornwall\r\nLApop$code <- if_else(LApop$code==\"E06000053\", \"E06000052\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"Isles of Scilly\", \"Cornwall\", LApop$name)\r\n\r\n#Merge City of London & Hackney\r\nLApop$code <- if_else(LApop$code==\"E09000001\", \"E09000012\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"City of London\", \"Hackney and City of London\", LApop$name)\r\nLApop$name <- if_else(LApop$name==\"Hackney\", \"Hackney and City of London\", LApop$name)\r\n\r\nLApop <- LApop %>% \r\n  group_by(name, code) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\nLAadmissions <- LAadmissions %>% \r\n  merge(LADtoRegion, all.x=TRUE, by.x=\"LAD19CD\", by.y=\"LTLA\") %>% \r\n  mutate(Region=case_when(\r\n    LAD19CD %in% c(\"E07000244\", \"E07000245\") ~ \"East of England\",\r\n    LAD19CD %in% c(\"E06000058\", \"E06000059\", \"E07000246\") ~ \"South West\",\r\n    LAD19CD %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\") ~ \"South East\",\r\n    TRUE ~ Region)) %>% \r\n  rename(Lacode=LAD19CD) %>% \r\n  merge(LApop, by.x=\"Lacode\", by.y=\"code\", all.x=TRUE) %>% \r\n  group_by(Lacode, LAD19NM) %>% \r\n  arrange(date) %>% \r\n  mutate(admrate=admissions*100000/pop,\r\n         adm_roll=roll_mean(admrate, 7, align=\"center\", fill=NA, na.rm=TRUE), \r\n         adm_change=adm_roll-lag(adm_roll, 7)) %>% \r\n  ungroup()\r\n\r\nadm_max=max(LAadmissions$date[!is.na(LAadmissions$adm_roll)])\r\n\r\nplotdata <-  LAadmissions %>% \r\n  filter(date==adm_max)\r\n\r\n#Download Carl Baker's lovely map\r\nltla <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg\")\r\nltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode=\"wb\")\r\n\r\nBackground <- st_read(ltla, layer=\"7 Background\")\r\n\r\nltlaadm <- st_read(ltla, layer=\"4 LTLA-2019\") %>% \r\n  left_join(plotdata, by=\"Lacode\")\r\n\r\nGroups <- st_read(ltla, layer=\"2 Groups\")\r\n\r\nGroup_labels <- st_read(ltla, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nplot1 <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name==\"England & Wales\"), \r\n          aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=ltlaadm %>% filter(!RegionNation %in% c(\"Scotland\", \"Wales\", \"Northern Ireland\")), \r\n          aes(geometry=geom, fill=adm_roll), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(!RegionNation %in% c(\"Scotland\", \"Wales\", \"Northern Ireland\")), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(!RegionNation %in% c(\"Scotland\", \"Wales\", \r\n                                                                 \"Northern Ireland\")), \r\n                                            aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, limits=c(0,NA),\r\n                         name=\"Admissions per day\\nper 100,000\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.caption.position=\"plot\", legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID admission rates vary a lot across England\",\r\n       subtitle=paste0(\"Rolling 7-day average number of daily new hospital admissions at Lower Tier Local Authority level\\nData up to \", adm_max),\r\n       caption=\"Data from NHS England & ONS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsLTLACartogram.tiff\", units=\"in\", width=8, height=9, res=500)\r\nplot1\r\ndev.off()\r\n\r\nplotdata2 <-LAadmissions %>% \r\n  filter(date>=adm_max-days(7) & date<=adm_max)\r\n\r\nplot2 <- ggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdata2,\r\n            aes(x=adm_roll, y=adm_change, group=LAD19NM, alpha=7-as.integer(adm_max-date)),\r\n            colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdata2 %>% filter(date==adm_max),\r\n             aes(x=adm_roll, y=adm_change, fill=Region, size=pop), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdata2 %>% filter(date==adm_max), \r\n                  aes(x=adm_roll, y=adm_change, label=LAD19NM), size=rel(2.3))+\r\n  scale_x_continuous(name=\"Average new admissions per day in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in admission rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_custom()+\r\n  labs(title=\"COVID admissions are rising in most NHS trusts in England️\",\r\n       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 \",\r\n                       adm_max),\r\n       caption=\"Data from NHS England & ONS\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsLTLAChangeScatterPaths.tiff\", units=\"in\", width=9, height=7, res=800)\r\nplot2\r\ndev.off()\r\n\r\n#Trust-level analysis\r\n#Download PHE's trust  catchment data from and save as a csv.\r\n#https://app.box.com/s/qh8gzpzeo1firv1ezfxx2e6c4tgtrudl\r\ncatchments <- read_csv(\"COVID_LA_Plots/2020 Trust Catchment Populations Worksheet.csv\") %>% \r\n  filter(CatchmentYear==2018) %>% \r\n  group_by(TrustCode) %>% \r\n  summarise(catchpop=sum(Catchment)) %>% \r\n  ungroup()\r\n\r\n#Sort out trust mergers/recodes\r\n#1st lookup for admissions up to 4th October 2020, when RD3 and RDZ merged to form R0D in the admissions (but not deaths) data\r\ncatchments1 <- catchments %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(TrustCode) %>% \r\n  summarise(catchpop1=sum(catchpop)) %>% \r\n  ungroup() \r\n\r\n#2nd lookup for after 4th October 2020\r\ncatchments2 <- catchments %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(TrustCode) %>% \r\n  summarise(catchpop2=sum(catchpop)) %>% \r\n  ungroup()\r\n\r\n\r\n#3rd lookup for after 1st April 2021 when West Sussex (RYR) and Brighton & Sussex (RXH) trusts merged\r\ncatchments3 <- catchments %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TrustCode==\"RXH\" ~ \"RYR\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(TrustCode) %>% \r\n  summarise(catchpop3=sum(catchpop)) %>% \r\n  ungroup()\r\n\r\n#4th lookup for after 1st June 2021 when NW boroughs (RTV) and Mersey (RW4) care trusts merged\r\ncatchments4 <- catchments %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TrustCode==\"RXH\" ~ \"RYR\",\r\n    TrustCode==\"RTV\" ~ \"RW4\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(TrustCode) %>% \r\n  summarise(catchpop4=sum(catchpop)) %>% \r\n  ungroup()\r\n\r\n#5th lookup for after 1st October 2021 when Pennine (RW6) & Salford (RM3) care trusts merged\r\ncatchments5 <- catchments %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TrustCode==\"RXH\" ~ \"RYR\",\r\n    TrustCode==\"RTV\" ~ \"RW4\",\r\n    TrustCode==\"RW6\" ~ \"RM3\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(TrustCode) %>% \r\n  summarise(catchpop5=sum(catchpop)) %>% \r\n  ungroup()\r\n\r\n#Merge into admissions data\r\ntrustadm <- admissions %>% \r\n  select(code, Region, name, admissions, date) %>%\r\n  distinct() %>% \r\n  merge(catchments1, all.x=TRUE, by.x=\"code\", by.y=\"TrustCode\") %>% \r\n  merge(catchments2, all.x=TRUE, by.x=\"code\", by.y=\"TrustCode\") %>% \r\n  merge(catchments3, all.x=TRUE, by.x=\"code\", by.y=\"TrustCode\") %>% \r\n  merge(catchments4, all.x=TRUE, by.x=\"code\", by.y=\"TrustCode\") %>% \r\n  merge(catchments5, all.x=TRUE, by.x=\"code\", by.y=\"TrustCode\") %>% \r\n  rename(trust=name) %>% \r\n  group_by(code) %>% \r\n  arrange(date) %>% \r\n  mutate(catchpop=case_when(\r\n    date<as.Date(\"2020-10-04\") ~ catchpop1,\r\n    date<as.Date(\"2021-03-21\") ~ catchpop2,\r\n    date<as.Date(\"2021-05-21\") ~ catchpop3,\r\n    date<as.Date(\"2021-10-01\") ~ catchpop4,\r\n    TRUE ~ catchpop5),\r\n         admrate=admissions*100000/catchpop,\r\n         adm_roll=roll_mean(admrate, 7, align=\"center\", fill=NA, na.rm=TRUE), \r\n         adm_change=adm_roll-lag(adm_roll, 7),\r\n         trust=str_replace(trust, \" NHS TRUST\", \"\"),\r\n         trust=str_replace(trust, \"NHS FOUNDATION TRUST\", \"\"),\r\n         trust=to_any_case(trust, case=\"title\"),\r\n         trust=str_replace(trust, \"King s\", \"King's\"),\r\n         trust=str_replace(trust, \"Guy s\", \"Guy's\"),\r\n         trust=str_replace(trust, \"George s\", \"George's\"),\r\n         trust=str_replace(trust, \"Women s\", \"Women's\"),\r\n         trust=str_replace(trust, \"Children s\", \"Children's\"),\r\n         trust=str_replace(trust, \"Peter s\", \"Peter's\")) %>% \r\n  ungroup()\r\n\r\nplotdata3 <-trustadm %>% \r\n  filter(date>=adm_max-days(7) & date<=adm_max & code!= \"REN\")\r\n\r\nplot3 <- ggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdata3,\r\n            aes(x=adm_roll, y=adm_change, group=trust, alpha=7-as.integer(adm_max-date)),\r\n            colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdata3 %>% filter(date==adm_max),\r\n             aes(x=adm_roll, y=adm_change, size=catchpop, fill=Region), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdata3 %>% filter(date==adm_max), \r\n                  aes(x=adm_roll, y=adm_change, label=trust), size=rel(2.3))+\r\n  scale_x_continuous(name=\"Average new admissions per day in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in admission rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\", name=\"\")+\r\n  scale_size(guide=\"none\")+\r\n  theme_custom()+\r\n  theme(axis.line=element_blank())+\r\n  labs(title=\"At an NHS trust level, COVID admission rates in England are a mixed picture\",\r\n       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 \",\r\n                       adm_max),\r\n       caption=\"Data from NHS England, PHE & ONS\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsTrustChangeScatterPaths.tiff\", units=\"in\", width=9, height=7, res=800)\r\nplot3\r\ndev.off()\r\n\r\n#Focus on London\r\nplot3London <- ggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  #geom_path(data=plotdata3,\r\n  #          aes(x=adm_roll, y=adm_change, group=trust, alpha=7-as.integer(adm_max-date)),\r\n  #          colour=\"Grey80\", show.legend=FALSE)+\r\n  geom_path(data=plotdata3 %>% filter(Region==\"London\"),\r\n            aes(x=adm_roll, y=adm_change, group=trust, alpha=7-as.integer(adm_max-date)),\r\n            colour=\"Black\", show.legend=FALSE)+\r\n  #geom_point(data=plotdata3 %>% filter(date==adm_max),\r\n  #           aes(x=adm_roll, y=adm_change, size=catchpop), shape=21, alpha=0.8, fill=\"Grey50\")+\r\n  geom_point(data=plotdata3 %>% filter(date==adm_max & Region==\"London\"),\r\n             aes(x=adm_roll, y=adm_change, size=catchpop), fill=\"Pink\", shape=21)+\r\n  geom_text_repel(data=plotdata3 %>% filter(date==adm_max), \r\n                  aes(x=adm_roll, y=adm_change, label=trust), size=rel(2.3))+\r\n  scale_x_continuous(name=\"Average new admissions per day in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in admission rate compared to the preceding week\")+\r\n  scale_size(guide=\"none\")+\r\n  theme_custom()+\r\n  theme(axis.line=element_blank())+\r\n  labs(title=\"At a local level, COVID admissions are a mixed picture\",\r\n       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 \",\r\n                       adm_max),\r\n       caption=\"Data from NHS England, PHE & ONS\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsTrustChangeScatterPathsLondon.tiff\", units=\"in\", width=9, height=7, res=800)\r\nplot3London\r\ndev.off()\r\n\r\n########################\r\n#Focus on County Durham/Darlington\r\nplotdata4 <-trustadm %>% \r\n  filter(date>=adm_max-days(120) & date<=adm_max)\r\n\r\nplot4 <- ggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdata4,\r\n            aes(x=adm_roll, y=adm_change, group=trust, alpha=120-as.integer(adm_max-date)),\r\n            colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_path(data=plotdata4 %>% filter(code==\"RXP\"),\r\n            aes(x=adm_roll, y=adm_change, group=trust, alpha=120-as.integer(adm_max-date)),\r\n            colour=\"#FF4E86\", show.legend=FALSE)+\r\n  geom_point(data=plotdata4 %>% filter(date==adm_max),\r\n             aes(x=adm_roll, y=adm_change, size=catchpop), shape=21, alpha=0.7, fill=\"Grey70\")+\r\n  geom_point(data=plotdata4 %>% filter(date==adm_max & code==\"RXP\"),\r\n             aes(x=adm_roll, y=adm_change, size=catchpop), shape=21, alpha=0.7, fill=\"#FF4E86\")+\r\n  #geom_text_repel(data=plotdata4 %>% filter(date==adm_max), \r\n  #                aes(x=adm_roll, y=adm_change, label=trust), size=rel(2.3))+\r\n  scale_x_continuous(name=\"Average new admissions per day in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in admission rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\", name=\"\")+\r\n  scale_size(guide=\"none\")+\r\n  theme_custom()+\r\n  theme(axis.line=element_blank(), plot.subtitle=element_markdown())+\r\n  labs(title=\"COVID admission rates have been persistently bad in County Durham & Darlington NHS Trust\",\r\n       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 \",\r\n                       adm_max),\r\n       caption=\"Data from NHS England, UKHSA & ONS\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsLTLAChangeScatterPathsLong.tiff\", units=\"in\", width=9, height=7, res=800)\r\nplot4\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsDurham.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot()+\r\n  geom_line(data=plotdata4, aes(x=date, y=adm_roll, group=trust), colour=\"Grey70\")+\r\n  geom_line(data=plotdata4 %>% filter(code==\"RXP\"), \r\n            aes(x=date, y=adm_roll), colour=\"#FF4E86\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Average new admissions per day in the past week\\n(rate per 100,000)\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"There's something odd about Durham and Darlington\",\r\n       subtitle=\"Rolling 7-day average of new COVID admissions during the delta wave in <span style='color:#FF4E86;'>Country Durham & Darlington NHS Trust </span><br>compared to <span style='color:Grey50;'>other trusts in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n####################\r\n#Explore fallout from Immensa scandal\r\n#Look at rates in LAs most impacted by testing, list taken from https://twitter.com/AlastairGrant4/status/1452897309591756800\r\nImm.data <- LAadmissions %>% \r\n  select(date, Region, admissions, name, pop) %>% \r\n  filter(date>as.Date(\"2021-08-01\")) %>% \r\n  mutate(flag1=case_when(\r\n    name %in% c(\"Gloucester\", \"South Gloucestershire\", \"West Berkshire\", \"North Somerset\", \"Swindon\",\r\n                \"Somerset West and Taunton\", \"Tewkesbury\", \"Bristol, City of\", \"Cheltenham\", \r\n                \"Bath and North East Somerset\",\r\n                \"Cotswold\", \"Sedgemoor\", \"Stroud\") ~ \"Most Affected Areas\",\r\n    TRUE ~ \"Rest of England\"),\r\n    flag2=case_when(\r\n      flag1==\"Most Affected Areas\" ~ \"Most Affected Areas\",\r\n      Region==\"South West\" ~ \"Rest of the South West\",\r\n      TRUE ~ \"Rest of England\"))\r\n\r\nImm.data1 <- Imm.data %>% \r\n  group_by(date, flag1) %>% \r\n  summarise(admissions=sum(admissions),\r\n            pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(flag1) %>% \r\n  mutate(admrate=admissions*100000/pop,\r\n         adm_roll=roll_mean(admrate, 7, align=\"center\", fill=NA, na.rm=TRUE)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsImmensa.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(Imm.data1)+\r\n  geom_rect(aes(xmin=as.Date(\"2021-09-02\")+days(8), xmax=as.Date(\"2021-10-12\")+days(8), ymin=0, ymax=2),\r\n             fill=\"Grey90\")+\r\n  geom_line(aes(x=date, y=adm_roll, colour=flag1), show.legend=FALSE)+\r\n  geom_text_repel(data=Imm.data1 %>% filter(date==max(date)-days(4)),\r\n                  aes(x=date, y=adm_roll, colour = flag1, label=flag1),\r\n                  family = \"Lato\", fontface = \"bold\", direction = \"y\", box.padding = 0.4, hjust=0,\r\n                  xlim = c(as.Date(\"2021-10-22\"), NA_Date_), show.legend=FALSE, segment.color = NA)+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2021-08-01\"), as.Date(\"2021-11-15\")))+\r\n  scale_y_continuous(name=\"Daily admissions per 100,000 population\")+\r\n  scale_colour_manual(values=c(\"#dc322f\", \"#073642\"))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(colour=\"Grey50\"))+\r\n  labs(title=\"COVID admissions have risen in areas most affected by the Immensa scandal\",\r\n       subtitle=\"Rolling 7-day average rate of new COVID-19 hospital admissions or in-hospital diagnoses in <span style='color:#dc322f;'>the 13 English<br>Local Authorities most affected</span> by the Immensa lab errors compared to <span style='color:#073642;'>the rest of England\",\r\n       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\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-09-30\"), y=0.5, family=\"Lato\", label=\"Period affected by testing errors*\")\r\ndev.off()\r\n\r\nImm.data2 <- Imm.data %>% \r\n  group_by(date, flag2) %>% \r\n  summarise(admissions=sum(admissions),\r\n            pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(flag2) %>% \r\n  mutate(admrate=admissions*100000/pop,\r\n         adm_roll=roll_mean(admrate, 7, align=\"center\", fill=NA, na.rm=TRUE)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsImmensa2.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(Imm.data2)+\r\n  geom_rect(aes(xmin=as.Date(\"2021-09-02\")+days(8), xmax=as.Date(\"2021-10-12\")+days(8), ymin=0, ymax=2),\r\n            fill=\"Grey90\")+\r\n  geom_line(aes(x=date, y=adm_roll, colour=flag2), show.legend=FALSE)+\r\n  geom_text_repel(data=Imm.data2 %>% filter(date==max(date)-days(4)),\r\n                  aes(x=date, y=adm_roll, colour = flag2, label=flag2),\r\n                  family = \"Lato\", fontface = \"bold\", direction = \"y\", box.padding = 0.4, hjust=0,\r\n                  xlim = c(as.Date(\"2021-10-25\"), NA_Date_), show.legend=FALSE, segment.color = NA)+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2021-08-01\"), as.Date(\"2021-11-23\")))+\r\n  scale_y_continuous(name=\"Daily admissions per 100,000 population\")+\r\n  scale_colour_manual(values=c(\"#dc322f\", \"#073642\", \"#268bd2\"))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(colour=\"Grey50\"))+\r\n  labs(title=\"COVID admissions have risen in areas most affected by the Immensa scandal\",\r\n       subtitle=\"Rolling 7-day average rate of new COVID-19 hospital admissions or in-hospital diagnoses in <span style='color:#dc322f;'>the 13 English<br>Local Authorities most affected</span> by the Immensa lab errors compared to <span style='color:#268bd2;'>other Local Authorities in the South West</span><br>and<span style='color:#073642;'> the rest of England\",\r\n       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\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-09-30\"), y=0.5, family=\"Lato\", label=\"Period affected by testing errors*\")\r\ndev.off()\r\n\r\n#Bring in case data for these areas\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\ntemp1 <- tempfile()\r\ntemp1 <- curl_download(url=url, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\n\r\ncases <- read.csv(temp1) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date>=\"2021-08-01\" & substr(areaCode, 1, 1)==\"E\") %>% \r\n  mutate(highlight=if_else(areaName %in% c(\"Gloucester\", \"South Gloucestershire\", \"West Berkshire\", \r\n                                           \"North Somerset\", \"Swindon\", \"Somerset West and Taunton\", \r\n                                           \"Tewkesbury\", \"Bristol, City of\", \"Cheltenham\", \"Bath and North East Somerset\",\r\n                                           \"Cotswold\", \"Sedgemoor\", \"Stroud\"),\r\n                           \"Most affected areas\", \"Rest of England\"))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesImmensa.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_rect(aes(xmin=as.Date(\"2021-09-02\"), xmax=as.Date(\"2021-10-12\"), ymin=0, ymax=1500),\r\n            fill=\"Grey90\")+\r\n  geom_line(data=cases, aes(x=date, y=newCasesBySpecimenDateRollingRate, group=areaName), colour=\"Grey70\")+\r\n  geom_line(data=cases %>% filter(highlight==\"Most affected areas\"), \r\n            aes(x=date, y=newCasesBySpecimenDateRollingRate, group=areaName), colour=\"#FF4E86\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Weekly COVID cases per 100,000 population\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"COVID cases fell sharply in areas affected by the Immensa scandal\",\r\n       subtitle=\"Rolling 7-day average rate of new COVID-19 cases in <span style='color:#FF4E86;'>the 13 English Local Authorities most affected</span><br>by the Immensa lab errors compared to <span style='color:Grey60;'>other Local Authorities in England\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Affected Local Authorities identified by @AlistairGrant4 | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-09-20\"), y=1400, family=\"Lato\", label=\"Period affected by testing errors\")\r\ndev.off()\r\n\r\ncases2 <- Imm.data %>% merge(cases %>% rename(\"name\"=\"areaName\")) %>% \r\n  mutate(cases=newCasesBySpecimenDateRollingRate*pop/100000) %>% \r\n  group_by(flag2, date) %>% \r\n  summarise(pop=sum(pop), cases=sum(cases)) %>% \r\n  ungroup() %>% \r\n  mutate(caserate=cases*100000/pop)\r\n\r\nagg_tiff(\"Outputs/COVIDCasesImmensa2.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(cases2)+\r\n  geom_rect(aes(xmin=as.Date(\"2021-09-02\"), xmax=as.Date(\"2021-10-12\"), ymin=0, ymax=1000),\r\n            fill=\"Grey90\")+\r\n  geom_line(aes(x=date, y=caserate, colour=flag2), show.legend=FALSE)+\r\n  geom_text_repel(data=cases2 %>% filter(date==max(date)),\r\n                  aes(x=date, y=caserate, colour = flag2, label=flag2),\r\n                  family = \"Lato\", fontface = \"bold\", direction = \"y\", box.padding = 0.4, hjust=0,\r\n                  xlim = c(as.Date(\"2021-10-24\"), NA_Date_), show.legend=FALSE, segment.color = NA)+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2021-08-01\"), as.Date(\"2021-11-23\")))+\r\n  scale_y_continuous(name=\"Weekly COVID cases per 100,000 population\")+\r\n  scale_colour_manual(values=c(\"#dc322f\", \"#073642\", \"#268bd2\"))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(colour=\"Grey50\"))+\r\n  labs(title=\"COVID cases in the most affected areas look different to the rest of the South West\",\r\n       subtitle=\"Rolling 7-day average rate of new COVID-19 cases in <span style='color:#dc322f;'>the 13 English Local Authorities most affected</span> by the<br>Immensa lab errors compared to <span style='color:#268bd2;'>other Local Authorities in the South West</span><br>and<span style='color:#073642;'> the rest of England\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Affected Local Authorities identified by @AlistairGrant4 | Plot by @VictimOfMaths\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-09-22\"), y=750, family=\"Lato\", label=\"Period affected by testing errors\")\r\n\r\ndev.off()\r\n\r\nImm.data3 <- Imm.data2 %>% select(date, flag2, admissions) %>% \r\n  spread(flag2, admissions) %>% \r\n  mutate(diffSW=`Most Affected Areas`-`Rest of the South West`)\r\n\r\nggplot(Imm.data3, aes(x=date, y=diffSW))+\r\n  geom_rect(aes(xmin=as.Date(\"2021-09-02\")+days(8), xmax=as.Date(\"2021-10-12\")+days(8), ymin=-25, ymax=20),\r\n            fill=\"Grey90\")+\r\n  geom_col(fill=\"tomato\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(\"Daily admissions in most affected areas - rest of South West\")+\r\n  theme_custom()\r\n\r\nbefore <- Imm.data3 %>% filter(date<as.Date(\"2021-09-02\")+days(8)) %>% \r\n  summarise(mean(diffSW))\r\n\r\nduring <- Imm.data3 %>% filter(date>=as.Date(\"2021-09-02\")+days(8) & date<=as.Date(\"2021-10-12\")+days(8)) %>% \r\n  summarise(sum(diffSW))\r\n\r\n####################################\r\n#Admissions by deprivation\r\n#Start by calculating IMD at MSOA level\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE) %>% \r\n  select(c(1,2,5,6)) %>% \r\n  set_names(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, LAD17CD) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:G34758\", col_names=FALSE) %>% \r\n  select(-c(2:6)) %>% \r\n  set_names(\"LSOA11CD\", \"pop\")\r\n\r\npop_full <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:CT34758\", col_names=FALSE) %>% \r\n  select(-c(2:7)) %>% \r\n  set_names(\"LSOA11CD\", c(0:90))\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at LTLA level, weighting by population\r\nIMD_LTLA <- IMD %>% \r\n  group_by(LAD17CD)%>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))\r\n\r\nAdm_IMD <- merge(LAadmissions, IMD_LTLA, by.x=\"Lacode\", by.y=\"LAD17CD\") %>% \r\n  group_by(date, decile) %>% \r\n  summarise(pop=sum(pop.x), adm_roll=sum(adm_roll)) %>% \r\n  ungroup() %>% \r\n  mutate(admrate_roll=adm_roll*100000/pop)\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxIMD.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(Adm_IMD, aes(x=date, y=admrate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new admissions per 100,000 people\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"Less deprived areas have consistently seen more COVID admissions\",\r\n       subtitle=\"Daily rate of new COVID admissions in England based on Local Authority-level data\",\r\n       caption=\"Data from NHS England, PHE & MHCLG | Plot by Colin Angus\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDAdmissionsWithFor.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(scales)\r\nlibrary(ggtext)\r\nlibrary(geofacet)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Download latest primary diagnosis data\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/Primary-Diagnosis-Supplement-20220616.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nnewdata_with <- read_excel(temp, sheet=1, range=\"C14:BZ22\", col_names=FALSE) %>% \r\n  drop_na() %>% \r\n  gather(date, with, c(2:ncol(.))) %>% \r\n  rename(\"Region\"=`...1`) %>% \r\n  mutate(date=as.Date(\"2022-04-01\")+days(as.numeric(substr(date, 4, 6))-2))\r\n\r\nnewdata_from <- read_excel(temp, sheet=2, range=\"C14:BZ22\", col_names=FALSE) %>% \r\n  drop_na() %>% \r\n  gather(date, from, c(2:ncol(.))) %>% \r\n  rename(\"Region\"=`...1`) %>% \r\n  mutate(date=as.Date(\"2022-04-01\")+days(as.numeric(substr(date, 4, 6))-2))\r\n\r\n#Slightly older data\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/05/Primary-Diagnosis-Supplement-20220512-211001-220331.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nolddata_with <- read_excel(temp, sheet=1, range=\"C14:GC22\", col_names=FALSE) %>% \r\n  drop_na() %>% \r\n  gather(date, with, c(2:ncol(.))) %>% \r\n  rename(\"Region\"=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4, 6))-2))\r\n\r\nolddata_from <- read_excel(temp, sheet=2, range=\"C14:GC22\", col_names=FALSE) %>% \r\n  drop_na() %>% \r\n  gather(date, from, c(2:ncol(.))) %>% \r\n  rename(\"Region\"=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4, 6))-2))\r\n\r\n#download older data\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/Primary-Diagnosis-Supplement-20211209-20210618-20210930.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nolderdata_with <- read_excel(temp, sheet=1, range=\"C14:DD22\", col_names=FALSE) %>% \r\n  drop_na() %>% \r\n  gather(date, with, c(2:ncol(.))) %>% \r\n  rename(\"Region\"=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-06-18\")+days(as.numeric(substr(date, 4, 6))-2))\r\n\r\nolderdata_from <- read_excel(temp, sheet=2, range=\"C14:DD22\", col_names=FALSE) %>% \r\n  drop_na() %>% \r\n  gather(date, from, c(2:ncol(.))) %>% \r\n  rename(\"Region\"=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-06-18\")+days(as.numeric(substr(date, 4, 6))-2))\r\n\r\ndata <- bind_rows(olderdata_with, olddata_with, newdata_with) %>% \r\n  merge(bind_rows(olderdata_from, olddata_from, newdata_from)) %>% \r\n  mutate(incidental=with-from,\r\n         Region=if_else(Region==\"ENGLAND\", \"England\", Region)) %>% \r\n  gather(type, count, c(\"with\", \"from\", \"incidental\"))\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCause.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data %>% filter(Region==\"England\" & type!=\"with\"), \r\n       aes(x=date, y=count, colour=type))+\r\n  #geom_area(position=\"stack\")+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of patients\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The BA.4/5 wave is here\",\r\n       subtitle=\"Patients in English acute hospitals <span style='color:#40A0D8;'>'for' COVID</span> and <span style='color:#F89088;'>where COVID is not the primary cause of hospitalisation</span>\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=as.Date(\"2021-10-15\"), y=11500/2, label=\"Patients being treated for COVID\",\r\n           colour=\"#40A0D8\", family=\"Lato\")+\r\n  annotate(\"text\", x=as.Date(\"2022-01-15\"), y=4500/4, label=\"Patients being treated for other causes, but 'with' COVID\",\r\n           colour=\"#F89088\", family=\"Lato\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCauseLondon.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data %>% filter(Region==\"London\" & type!=\"with\"), \r\n       aes(x=date, y=count, colour=type))+\r\n  #geom_area(position=\"stack\")+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of patients\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The majority of COVID patients in London are now 'with', not 'for' COVID\",\r\n       subtitle=\"Patients in London's acute hospitals <span style='color:#40A0D8;'>'for' COVID</span> and <span style='color:#F89088;'>where COVID is not the primary cause of hospitalisation</span>\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=as.Date(\"2021-10-30\"), y=920, label=\"Patients being treated for COVID\",\r\n           colour=\"#40A0D8\", family=\"Lato\")+\r\n  annotate(\"text\", x=as.Date(\"2021-09-30\"), y=280, label=\"Patients being treated for other causes, but 'with' COVID\",\r\n           colour=\"#F89088\", family=\"Lato\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCauseLondonStacked.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data %>% filter(Region==\"London\" & type!=\"with\"), \r\n       aes(x=date, y=count, fill=type))+\r\n  geom_area(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of patients\", limits=c(0,NA))+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"London's rising number of COVID patients are both 'with' and 'for' COVID\",\r\n       subtitle=\"Patients in London hospitals <span style='color:#40A0D8;'>'for' COVID</span> and <span style='color:#F89088;'>where COVID is not the primary cause of hospitalisation</span>\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCauseLondonProp.tiff\", units=\"in\", width=9, height=7, res=500)\r\ndata %>% filter(type!=\"incidental\" & Region==\"London\") %>% \r\n  spread(type, count) %>% \r\n  mutate(prop=from/with) %>% \r\n  ggplot(aes(x=date, y=prop))+\r\n  geom_line(colour=\"RoyalBlue\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of COVID patients for whom\\nCOVID is the main cause of hospitalisation\",\r\n                     limits=c(0,NA), labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  labs(title=\"Only around a third of London's COVID patients are being treated 'for' COVID\",\r\n       subtitle=\"Proportion of total COVID-positive patients assessed to be in hospital 'for' rather than 'with' COVID in London NHS trusts\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCauseNW.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data %>% filter(Region==\"North West\" & type!=\"with\"), \r\n       aes(x=date, y=count, colour=type))+\r\n  #geom_area(position=\"stack\")+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of patients\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"London's rising number of COVID patients are both 'with' and 'for' COVID\",\r\n       subtitle=\"Patients in London hospitals <span style='color:#40A0D8;'>'for' COVID</span> and <span style='color:#F89088;'>where COVID is not the primary cause of hospitalisation</span>\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Set up geofacet grid of NHS regions\r\nmygrid <- data.frame(name=c(\"North West\", \"North East and Yorkshire\", \r\n                            \"Midlands\",\"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,1,2,2,3,3,3), col=c(2,3,2,3,1,2,3),\r\n                     code=c(1:7))\r\n\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCausePropxReg.tiff\", units=\"in\", width=9.5, height=7, res=500)\r\ndata %>% filter(type!=\"incidental\" & Region!=\"ENGLAND\"& Region !=\"England\") %>% \r\n  spread(type, count) %>% \r\n  mutate(prop=from/with) %>% \r\n  ggplot(aes(x=date, y=prop, colour=Region))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of COVID patients for whom\\nCOVID is the main cause of hospitalisation\",\r\n                     limits=c(0,NA), labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  theme_custom()+\r\n  labs(title=\"The proportion of COVID patients hospitalised because of COVID varies a lot\",\r\n       subtitle=\"Proportion of total COVID-positive patients assessed to be in hospital 'for' rather than 'with' COVID by NHS region\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCausexReg.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data %>% filter(Region!=\"ENGLAND\" & Region !=\"England\" & type!=\"with\"), \r\n       aes(x=date, y=count, colour=type))+\r\n  #geom_area(position=\"stack\")+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of patients\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  facet_geo(~Region, scales=\"free_y\", grid=mygrid)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The balance between patients 'with' and 'for' COVID varies by region\",\r\n       subtitle=\"Patients in London hospitals <span style='color:#40A0D8;'>'for' COVID</span> and <span style='color:#F89088;'>where COVID is not the primary cause of hospitalisation</span>\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bring in unseparated data to get figures from non-acute trusts\r\nsource2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-daily-admissions-and-beds-20220112.xlsx\"\r\ntemp2 <- tempfile()\r\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\ncombdata <- read_excel(temp2, range=\"B90:DB97\", col_names=FALSE) %>% \r\n  gather(date, alltrusts, c(2:ncol(.))) %>% \r\n  rename(\"Region\"=`...1`) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4, 6))-2))\r\n\r\nalldata <- data %>% spread(type, count) %>% \r\n  merge(combdata, all.x=TRUE) %>% \r\n  mutate(\"Non-acute\"=alltrusts-with) %>% \r\n  gather(type, count, c(3:7))\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCauseLondonv2.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(alldata %>% filter(Region==\"London\" & type %in% c(\"from\", \"incidental\", \"Non-acute\") & \r\n                            date>as.Date(\"2021-10-01\")), \r\n       aes(x=date, y=count, colour=type))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of patients\", limits=c(0,NA))+\r\n  scale_colour_manual(values=c(\"#40A0D8\", \"#F89088\", \"DarkRed\"))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The number of COVID patients in non-acute hospitals in London is also rising\",\r\n       subtitle=\"Patients in London in acute hospitals <span style='color:#40A0D8;'>due to COVID</span> and <span style='color:#F89088;'>with COVID</span> and <span style='color:DarkRed;'>COVID-positive patients in non-acute hospitals</span>\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsCauseLondonv3.tiff\", units=\"in\", width=9, height=7, res=500)\r\nalldata %>% filter(Region==\"London\" & type %in% c(\"from\", \"incidental\", \"Non-acute\") & \r\n                     date>as.Date(\"2021-10-01\")) %>% \r\n  spread(type, count) %>% \r\n  mutate(with=incidental+`Non-acute`) %>% \r\n  gather(type, count, c(3:6)) %>% \r\n  filter(type %in% c(\"from\", \"with\")) %>% \r\n  ggplot(aes(x=date, y=count, colour=type))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of patients\", limits=c(0,NA))+\r\n  scale_colour_manual(values=c(\"#40A0D8\", \"DarkRed\"))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"In total the rise in patients 'with' COVID *may* be greater than patients 'for' COVID\",\r\n       subtitle=\"Patients in London in acute hospitals <span style='color:#40A0D8;'>due to COVID</span> and <span style='color:DarkRed;'>with COVID and COVID-positive patients in non-acute hospitals</span>\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDAdmissionsxAge.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(ggstream)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(RcppRoll)\r\nlibrary(ggrepel)\r\nlibrary(ragg)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Read in latest monthly age-stratified admissions data from NHS England website\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/03/Covid-Publication-10-03-2022-Supplementary-Data.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdata <- read_excel(temp, range=\"D16:EY25\", col_names=FALSE) %>% \r\n  mutate(age=c(\"0-5\", \"6-17\", \"18-24\", \"25-34\", \"35-44\", \"45-54\", \"55-64\", \"65-74\", \"75-84\", \"85+\")) %>% \r\n  gather(date, admissions, c(1:(ncol(.)-1))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.integer(substr(date, 4, 6))-1),\r\n         age=factor(age, levels=c(\"0-5\", \"6-17\", \"18-24\", \"25-34\", \"35-44\", \"45-54\", \"55-64\", \"65-74\", \r\n                                  \"75-84\", \"85+\")))\r\n\r\n#Previous data 1\r\nurl1 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/02/Covid-Publication-13-01-2022-Supplementary-Data-210407-210930.xlsx\"\r\ntemp <- curl_download(url=url1, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdataold1 <- read_excel(temp, range=\"D16:FX25\", col_names=FALSE) %>% \r\n  mutate(age=c(\"0-5\", \"6-17\", \"18-24\", \"25-34\", \"35-44\", \"45-54\", \"55-64\", \"65-74\", \"75-84\", \"85+\")) %>% \r\n  gather(date, admissions, c(1:(ncol(.)-1))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.integer(substr(date, 4, 6))-1),\r\n         age=factor(age, levels=c(\"0-5\", \"6-17\", \"18-24\", \"25-34\", \"35-44\", \"45-54\", \"55-64\", \"65-74\", \r\n                                  \"75-84\", \"85+\")))\r\n\r\n#Previous data 2\r\nurl2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/02/Covid-Publication-13-01-2022-Supplementary-Data-up-to-210406.xlsx\"\r\ntemp <- curl_download(url=url2, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdataold2 <- read_excel(temp, range=\"D16:FX25\", col_names=FALSE) %>% \r\n  mutate(age=c(\"0-5\", \"6-17\", \"18-24\", \"25-34\", \"35-44\", \"45-54\", \"55-64\", \"65-74\", \"75-84\", \"85+\")) %>% \r\n  gather(date, admissions, c(1:(ncol(.)-1))) %>% \r\n  mutate(date=as.Date(\"2020-10-12\")+days(as.integer(substr(date, 4, 6))-1),\r\n         age=factor(age, levels=c(\"0-5\", \"6-17\", \"18-24\", \"25-34\", \"35-44\", \"45-54\", \"55-64\", \"65-74\", \r\n                                  \"75-84\", \"85+\")))\r\n\r\nrawdata <- bind_rows(rawdata, rawdataold1, rawdataold2)\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsHeatmap.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot(rawdata, aes(x=date, y=age, fill=admissions))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Daily admissions\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID admission rates have been much lower and younger in the latest wave\",\r\n       subtitle=\"Number of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Version of Delta/Omicron wave only\r\nagg_tiff(\"Outputs/COVIDAdmissionsHeatmapRecent.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot(rawdata %>% filter(date>as.Date(\"2021-06-01\")), aes(x=date, y=age, fill=admissions))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Daily admissions\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"In recent weeks, COVID hospital admissions have been highest in older ages\",\r\n       subtitle=\"Number of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bring in populations to calculate rates\r\npopurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls\"\r\ntemp1 <- tempfile()\r\ntemp1 <- curl_download(url=popurl, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- as.data.frame(t(read_excel(temp1, sheet=\"MYE2 - Persons\", range=\"E12:CQ12\", \r\n                                  col_names=FALSE))) %>% \r\n  mutate(age=c(0:90),\r\n         age=case_when(\r\n           age<6 ~ \"0-5\",\r\n           age<18 ~ \"6-17\",\r\n           age<25 ~ \"18-24\",\r\n           age<35 ~ \"25-34\",\r\n           age<45 ~ \"35-44\",\r\n           age<55 ~ \"45-54\",\r\n           age<65 ~ \"55-64\",\r\n           age<75 ~ \"65-74\",\r\n           age<85 ~ \"75-84\",\r\n           TRUE ~ \"85+\")) %>% \r\n  group_by(age) %>% \r\n  summarise(pop=sum(V1)) %>% \r\n  ungroup()\r\n\r\ndata <- rawdata %>% \r\n  merge(pop) %>% \r\n  mutate(admrate=admissions*100000/pop)\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsHeatmapRate.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot(data, aes(x=date, y=age, fill=admrate))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Daily admissions per 100,000\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID admission rates have been much lower and younger in the latest wave\",\r\n       subtitle=\"Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsHeatmapRateRecent.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot(data %>% filter(date>as.Date(\"2021-06-01\")), aes(x=date, y=age, fill=admrate))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Daily admissions per 100,000\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID admission rates have been rising in older age groups\",\r\n       subtitle=\"Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n################\r\n#Take rolling averages\r\nrolldata <- data %>% \r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(admrate_roll=roll_mean(admrate, 7, align=\"center\", fill=NA),\r\n         agecont=case_when(\r\n           age==\"0-5\" ~ 2.5,\r\n           age==\"6-17\" ~ 12.5,\r\n           age==\"18-24\" ~ 20.5,\r\n           age==\"25-34\" ~ 29.5,\r\n           age==\"35-44\" ~ 39.5,\r\n           age==\"45-54\" ~ 49.5,\r\n           age==\"55-64\" ~ 59.5,\r\n           age==\"65-74\" ~ 69.5,\r\n           age==\"75-84\" ~ 79.5,\r\n           age==\"85+\" ~ 89.5))\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsHeatmapRateRecentSmoothed.tiff\", \r\n         units=\"in\", width=9, height=6, res=800)\r\nggplot(rolldata %>% filter(date>as.Date(\"2021-06-01\") & !is.na(admrate_roll)), \r\n       aes(x=date, y=age, fill=admrate_roll))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Daily admissions per 100,000\",\r\n                         limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID admission rates during the Delta and Omicron waves\",\r\n       subtitle=\"Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsHeatmapRateSmoothed.tiff\", \r\n         units=\"in\", width=9, height=6, res=800)\r\nggplot(rolldata %>% filter(!is.na(admrate_roll)), \r\n       aes(x=date, y=age, fill=admrate_roll))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Daily admissions per 100,000\",\r\n                         limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID admission rates have been *much* lower this winter\",\r\n       subtitle=\"Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsContourRateRecentSmoothed.tiff\", \r\n         units=\"in\", width=9, height=6, res=800)\r\nggplot(rolldata %>% filter(date>as.Date(\"2021-06-01\") & !is.na(admrate_roll)), \r\n       aes(x=date, y=agecont, z=admrate_roll))+\r\n  geom_contour_filled(colour=\"white\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Age\")+\r\n  scale_fill_viridis_d(option=\"turbo\", name=\"Daily admissions\\nper 100,000\",\r\n                       labels=c(\"<2\", \"2+\", \"4+\", \"6+\", \"8+\", \"10+\", \"12+\", \"14+\", \"16+\", \"18+\",\r\n  \"20+\", \"22+\", \"24+\"))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill=guide_legend(nrow=2))+\r\n  labs(title=\"COVID admission rates have been slow to fall since Omicron arrived\",\r\n       subtitle=\"Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsContourRateSmoothed.tiff\", \r\n         units=\"in\", width=9, height=6, res=800)\r\nggplot(rolldata %>% filter(!is.na(admrate_roll)), \r\n       aes(x=date, y=agecont, z=admrate_roll))+\r\n  geom_contour_filled(colour=\"white\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Age\")+\r\n  scale_fill_viridis_d(option=\"turbo\", name=\"Daily admissions\\nper 100,000\",\r\n                       labels=c(\"<5\", \"5+\", \"10+\", \"15+\", \"20+\", \"25+\", \"30+\", \"35+\", \r\n                                \"40+\", \"45+\", \"50+\"))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill=guide_legend(nrow=1))+\r\n  labs(title=\"COVID admission rates are *much* lower than last winter\",\r\n       subtitle=\"Rate of new daily admissions to hospital of patients with a positive COVID test, or new COVID diagnoses in hospital in England\",\r\n       caption=\"Admissions data from NHS England | Population date from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Bring in case data\r\ncaseurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp2 <- tempfile()\r\ntemp2 <- curl_download(url=caseurl, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read.csv(temp2) %>% \r\n  filter(!age %in% c(\"00_59\", \"60+\", \"unassigned\")) %>% \r\n  select(date, age, cases) %>% \r\n  #Do some simplistic apportioning of cases to align with admissions age bands assuming equal\r\n  #distributions of cases within each band\r\n  spread(age, cases) %>% \r\n  rowwise() %>% \r\n  mutate(`0-5`=`00_04`+0.2*`05_09`,\r\n         `6-17`=0.8*`05_09`+`10_14`+0.6*`15_19`,\r\n         `18-24`=0.4*`15_19`+`20_24`,\r\n         `25-34`=`25_29`+`30_34`,\r\n         `35-44`=`35_39`+`40_44`,\r\n         `45-54`=`45_49`+`50_54`,\r\n         `55-64`=`55_59`+`60_64`,\r\n         `65-74`=`65_69`+`70_74`,\r\n         `75-84`=`75_79`+`80_84`,\r\n         `85+`=`85_89`+`90+`) %>% \r\n  ungroup() %>% \r\n  select(date, `0-5`, `6-17`, `18-24`, `25-34`, `35-44`, `45-54`, `55-64`, `65-74`, `75-84`, `85+`) %>% \r\n  gather(age, cases, c(2:11))\r\n\r\n#Bring it all together\r\nalldata <- data %>% \r\n  merge(casedata, all=TRUE) %>%\r\n  #Add in total rows\r\n  bind_rows(data %>% merge(casedata, all=TRUE) %>% \r\n              group_by(date) %>% \r\n              summarise(admissions=sum(admissions), pop=sum(pop), cases=sum(cases)) %>%\r\n              mutate(admrate=admissions*100000/pop, age=\"Total\")) %>% \r\n  #Take rolling 7-day averages\r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(casesroll=roll_mean(cases, 7, align=\"center\", fill=NA),\r\n         caserate=cases*100000/pop,\r\n         caserateroll=roll_mean(caserate, 7, align=\"center\", fill=NA),\r\n         admroll=roll_mean(admissions, 7, align=\"center\", fill=NA),\r\n         admrateroll=roll_mean(admrate, 7, align=\"center\", fill=NA)) %>% \r\n  #Lag cases by 8 days from hospitalisations. Rationale for 8 days lag is here:\r\n  #https://twitter.com/nicfreeman1209/status/1404915641728081921\r\n  mutate(lagcasesroll=lag(casesroll, 8),\r\n         lagcaserateroll=lag(caserateroll, 8)) %>% \r\n  ungroup() %>% \r\n  mutate(CHR=admrateroll/lagcaserateroll,\r\n         age=factor(age, levels=c(\"0-5\", \"6-17\", \"18-24\", \"25-34\", \"35-44\", \"45-54\", \"55-64\", \"65-74\", \r\n                                  \"75-84\", \"85+\", \"Total\")))\r\n\r\nagg_tiff(\"Outputs/COVIDCHROverall.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(CHR) & age==\"Total\"), aes(x=date, y=CHR))+\r\n  geom_line(colour=\"dodgerblue\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases admitted to hospital\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA))+\r\n  theme_custom()+\r\n  labs(title=\"The proportion of COVID cases being admitted to hospital has been fairly steady recently\",\r\n       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\",\r\n       caption=\"Data from NHS England and coronavirues.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCHRxAge.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(CHR) & age!=\"Total\"), aes(x=date, y=CHR, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases admitted to hospital\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"ggsci::default_gsea\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The proportion of COVID cases being admitted to hospital varies a lot with age\",\r\n       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\",\r\n       caption=\"Data from NHS England and coronavirues.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCHRxAgeFacets.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(CHR) & age!=\"Total\"), aes(x=date, y=CHR, colour=age))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases admitted to hospital\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"ggsci::default_gsea\", name=\"Age\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(axis.text.x=element_text(angle=45, hjust=1, vjust=1))+\r\n  labs(title=\"The proportion of COVID cases being admitted to hospital has fallen in older ages\",\r\n       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\",\r\n       caption=\"Data from NHS England and coronavirues.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsStreamgraph.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(admroll) & age!=\"Total\"),\r\n       aes(x=date, y=admroll, fill=age))+\r\n  geom_stream()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new hospital admissions\", labels=abs)+\r\n  scale_fill_paletteer_d(\"ggsci::default_gsea\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The average age of COVID patients admitted to hospital has risen since July\",\r\n       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\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsStreamgraphRecent.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(admroll) & age!=\"Total\" & date>as.Date(\"2021-04-01\")),\r\n       aes(x=date, y=admroll, fill=age))+\r\n  geom_stream()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new hospital admissions\", labels=abs)+\r\n  scale_fill_paletteer_d(\"ggsci::default_gsea\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The average age of COVID patients admitted to hospital has risen since July\",\r\n       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\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Calculate admission rate ratios\r\nadmratios <- alldata %>% \r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(ratio=admroll/lag(admroll, 7)) %>% \r\n  filter(age!=\"Total\" & !is.na(ratio))\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionRatioHeatmapRecent.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(admratios %>% filter(date>as.Date(\"2021-05-01\")))+\r\n  geom_tile(aes(x=date, y=age, fill=ratio))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(0.249,4), direction=-1 ,\r\n                         trans=\"log\", breaks=c(0.25, 0.5, 1, 2, 4), \r\n                         labels=c(\"-75%\", \"-50%\", \"No change\", \"+100%\", \"+300%\"),\r\n                         name=\"Change in cases in the past week\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID hospital admissions have fallen in all age groups\",\r\n       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\",\r\n       caption=\"Data from NHS England | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#As a line graph\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgeLine.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(admroll) & age!=\"Total\" & date>as.Date(\"2021-05-01\")),\r\n       aes(x=date, y=admroll, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new hospital admissions\", labels=abs)+\r\n  scale_colour_paletteer_d(\"ggsci::default_gsea\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The average age of COVID patients admitted to hospital has risen since July\",\r\n       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\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgeLineRate.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(admrateroll) & age!=\"Total\" & date>as.Date(\"2021-05-01\")),\r\n       aes(x=date, y=admrateroll, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new hospital admissions per 100,000\", labels=abs)+\r\n  scale_colour_paletteer_d(\"ggsci::default_gsea\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The average age of COVID patients admitted to hospital has risen since July\",\r\n       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\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Cases vs admissions\r\nagg_tiff(\"Outputs/COVIDAdmissionsxCasesxAge.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(alldata %>% filter(!is.na(admrateroll)),\r\n       aes(x=caserateroll, y=admrateroll, colour=date))+\r\n  geom_path(show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_y_continuous(name=\"Daily new admissions per 100,000\")+\r\n  scale_colour_paletteer_c(\"pals::ocean.ice\", direction=-1)+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  labs(title=\"Older ages are seeing far fewer admissions per case, in younger ages it's less clear\",\r\n       subtitle=\"Rolling 7-day average rates of new COVID cases and hospital admissions in England since October 2020.\\nDarker colours represent more recent dates.\",\r\n       caption=\"Data from UKHSA and NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDAdmissionsxAgeDashboard.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(ggstream)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(RcppRoll)\r\nlibrary(ggrepel)\r\nlibrary(ragg)\r\nlibrary(scales)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Download admissions by age\r\n#Nationally\r\nsource1 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumAdmissionsByAge&format=csv\"\r\n#Regionally\r\nsource2 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nhsRegion&metric=cumAdmissionsByAge&format=csv\"\r\n\r\ntemp <- tempfile()\r\n\r\ntemp <- curl_download(url=source1, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nnatdata <- read.csv(temp)\r\ntemp <- curl_download(url=source2, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata <- read.csv(temp)\r\n\r\ndata <- bind_rows(natdata, regdata) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(areaName, age) %>% \r\n  arrange(date) %>% \r\n  mutate(admrate=rate-lag(rate, 1),\r\n         admissions=value-lag(value, 1),\r\n         age=gsub(\"_to_\", \"-\", age),\r\n         age=factor(age, levels=c(\"0-5\", \"6-17\", \"18-64\", \"65-84\", \"85+\")),\r\n         admrate_roll=roll_mean(admrate, 7, align=\"center\", fill=NA),\r\n         peakrate=max(admrate_roll[date>as.Date(\"2020-10-01\") & date<as.Date(\"2021-02-01\")], na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  mutate(peakprop=admrate_roll/peakrate)\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAge.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data %>% filter(areaName==\"England\"), aes(x=date, y=peakprop, colour=age))+\r\n  geom_hline(yintercept=1, linetype=2, colour=\"Grey80\")+\r\n  geom_line(show.legend=FALSE)+\r\n  geom_text_repel(data=data %>% filter(date==max(date[!is.na(peakprop)]) & areaName==\"England\"),\r\n                  aes(x=max(date[!is.na(peakprop)]), y=peakprop, label = age, \r\n                      colour=age),\r\n                  family = \"Calibri\", direction = \"y\", xlim = c(as.Date(\"2022-05-10\"), NA),\r\n                  hjust = 0, segment.color = NA, box.padding = .3, show.legend = FALSE)+\r\n  scale_x_date(name=\"\", limits=c(NA_Date_, as.Date(\"2022-06-01\")))+\r\n  scale_y_continuous(name=\"Proportion of January 2021 peak\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID vaccinations are doing a great job of keeping older age groups out of hospital\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgeAbs.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data %>% filter(areaName==\"England\"), aes(x=date, y=admrate_roll, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new admissions per 100,000\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID admission rates are still highest in older age groups\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital)\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgexReg.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data %>% filter(areaName!=\"England\"), aes(x=date, y=peakprop, colour=age))+\r\n  geom_hline(yintercept=1, linetype=2, colour=\"Grey80\")+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of January 2021 peak\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\")+\r\n  facet_wrap(~areaName)+\r\n  theme_custom()+\r\n  labs(title=\"The rise in COVID admissions in children isn't uniform across the country\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgexRegAbs.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data %>% filter(areaName!=\"England\"), aes(x=date, y=admrate_roll, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of January 2021 peak\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\")+\r\n  facet_wrap(~areaName)+\r\n  theme_custom()+\r\n  labs(title=\"The rise in COVID admissions in children isn't uniform across the country\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxRegxAgeAbs.tiff\", units=\"in\", width=13, height=8, res=500)\r\nggplot(data %>% filter(areaName!=\"England\"), aes(x=date, y=admrate_roll, colour=areaName))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of January 2021 peak\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"The rise in COVID admissions in children isn't uniform across the country\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nnatdata %>% mutate(date=as.Date(date),\r\n                   age=gsub(\"_to_\", \"-\", age),\r\n                   age=factor(age, levels=c(\"0-5\", \"6-17\", \"18-64\", \"65-84\", \"85+\"))) %>% \r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(newadm=value-lag(value, 1),\r\n         newadm_roll=roll_mean(newadm, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup() %>% \r\nggplot(aes(x=date, y=newadm_roll, fill=age))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of admissions\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  \r\n  theme_custom()\r\n\r\n#Repeat for Omicron-specific analysis\r\ndata2 <- bind_rows(natdata, regdata) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(areaName, age) %>% \r\n  arrange(date) %>% \r\n  mutate(admrate=rate-lag(rate, 1),\r\n         admissions=value-lag(value, 1),\r\n         age=gsub(\"_to_\", \"-\", age),\r\n         age=factor(age, levels=c(\"0-5\", \"6-17\", \"18-64\", \"65-84\", \"85+\")),\r\n         admrate_roll=roll_mean(admrate, 7, align=\"center\", fill=NA),\r\n         peakrate=max(admrate_roll[date>as.Date(\"2021-10-01\") & date<as.Date(\"2022-02-01\")], na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  mutate(peakprop=admrate_roll/peakrate)\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgeOmi.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data2 %>% filter(areaName==\"England\" & date>as.Date(\"2021-12-01\")), \r\n       aes(x=date, y=peakprop, colour=age))+\r\n  geom_hline(yintercept=1, linetype=2, colour=\"Grey80\")+\r\n  geom_line(show.legend=FALSE)+\r\n  geom_text_repel(data=data2 %>% filter(date==max(date[!is.na(peakprop)]) & areaName==\"England\"),\r\n                  aes(x=max(date[!is.na(peakprop)]), y=peakprop, label = age, \r\n                      colour=age),\r\n                  family = \"Calibri\", direction = \"y\", xlim = c(as.Date(\"2022-07-03\"), NA),\r\n                  hjust = 0, segment.color = NA, box.padding = .3, show.legend = FALSE)+\r\n  scale_x_date(name=\"\", limits=c(NA_Date_, as.Date(\"2022-07-15\")))+\r\n  scale_y_continuous(name=\"Proportion of Omicron peak\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA), \r\n                     breaks=c(0,0.2,0.4,0.6,0.8,1,1.2, 1.4))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\")+\r\n  theme_custom()+\r\n  labs(title=\"Hospital admissions in older age groups are close to the January peak\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2022\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDAdmissionsxAgeAbsOmi.png\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data2 %>% filter(areaName==\"England\" & date>as.Date(\"2021-12-01\")), \r\n       aes(x=date, y=admrate_roll, colour=age))+\r\n  geom_line(show.legend=FALSE)+\r\n  geom_text_repel(data=data2 %>% filter(date==max(date[!is.na(admrate_roll)]) & areaName==\"England\"),\r\n                  aes(x=max(date[!is.na(admrate_roll)]), y=admrate_roll, label = paste(age, \"year olds\"), \r\n                      colour=age),\r\n                  family = \"Calibri\", direction = \"y\", xlim = c(as.Date(\"2022-06-25\"), NA),\r\n                  hjust = 0, segment.color = NA, box.padding = .3, show.legend = FALSE)+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2021-12-01\"), as.Date(\"2022-07-15\")))+\r\n  scale_y_continuous(name=\"Daily new COVID admissions per 100,000\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(caption=\"Data from coronavirus.data.gov.uk | Plot by Colin Angus\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgeAbsOmiFacets.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data2 %>% filter(areaName==\"England\" & date>as.Date(\"2021-12-01\")), \r\n       aes(x=date, y=admrate_roll, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new admissions per 100,000\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_custom()+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  labs(title=\"COVID admission rates are falling rapidly\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital)\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgexRegOmi.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data2 %>% filter(areaName!=\"England\"  & date>as.Date(\"2021-12-01\")), \r\n       aes(x=date, y=peakprop, colour=age))+\r\n  geom_hline(yintercept=1, linetype=2, colour=\"Grey80\")+\r\n  geom_line()+\r\n  scale_x_date(name=\"\", limits=c(NA_Date_, as.Date(\"2022-03-15\")))+\r\n  scale_y_continuous(name=\"Proportion of Omicron peak\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  facet_wrap(~areaName)+\r\n  theme_custom()+\r\n  labs(title=\"COVID admissions are rising across all regions and age groups\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxAgexRegAbsOmi.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data2 %>% filter(areaName!=\"England\" & date>as.Date(\"2021-12-01\")), \r\n       aes(x=date, y=admrate_roll, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\", limits=c(NA_Date_, as.Date(\"2022-03-10\")))+\r\n  scale_y_continuous(name=\"Proportion of January 2022 peak\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\")+\r\n  facet_wrap(~areaName)+\r\n  theme_custom()+\r\n  labs(title=\"The rise in COVID admissions in children isn't uniform across the country\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsxRegxAgeAbsOmi.tiff\", units=\"in\", width=13, height=8, res=500)\r\nggplot(data2 %>% filter(areaName!=\"England\"  & date>as.Date(\"2021-12-01\")), \r\n       aes(x=date, y=admrate_roll, colour=areaName))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\", limits=c(NA_Date_, as.Date(\"2022-03-10\")))+\r\n  scale_y_continuous(name=\"Daily new admissions\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"The rise in COVID admissions in children isn't uniform across the country\",\r\n       subtitle=\"Rolling 7-day average new COVID admissions (including those testing positive in hospital) as a proportion of the peak in January 2021\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDAgeTrends.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(broom)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(RcppRoll)\r\nlibrary(ragg)\r\nlibrary(scales)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\n\r\n#Read in Case data\r\ntemp <- tempfile()\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata1 <- read.csv(temp) %>% \r\n  filter(!age %in% c(\"60+\", \"00_59\")) %>%\r\n  select(date, age, cases) %>% \r\n  mutate(metric=\"Cases\",\r\n         age=case_when(\r\n           age %in% c(\"00_04\", \"05_09\", \"10_14\") ~ \"0-14\",\r\n           age %in% c(\"15_19\", \"20_24\") ~ \"15-24\",\r\n           age %in% c(\"25_29\", \"30_34\", \"35_39\", \"40_44\") ~ \"25-44\",\r\n           age %in% c(\"45_49\", \"50_54\", \"55_59\", \"60_64\") ~ \"45-64\",\r\n           age %in% c(\"65_69\", \"70_74\", \"75_79\") ~ \"65-79\",\r\n           age %in% c(\"80_84\", \"85-89\", \"90+\") ~ \"80+\",\r\n           TRUE ~ \"Unknown\"),\r\n         date=as.Date(date)) %>% \r\n  group_by(date, age, metric) %>% \r\n  summarise(count=sum(cases))\r\n\r\n#Read in 28 day deaths data\r\ntemp <- tempfile()\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newDeaths28DaysByDeathDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata2 <- read.csv(temp) %>% \r\n  filter(!age %in% c(\"60+\", \"00_59\")) %>%\r\n  select(date, age, deaths) %>% \r\n  mutate(metric=\"Deaths\",\r\n         age=case_when(\r\n           age %in% c(\"00_04\", \"05_09\", \"10_14\") ~ \"0-14\",\r\n           age %in% c(\"15_19\", \"20_24\") ~ \"15-24\",\r\n           age %in% c(\"25_29\", \"30_34\", \"35_39\", \"40_44\") ~ \"25-44\",\r\n           age %in% c(\"45_49\", \"50_54\", \"55_59\", \"60_64\") ~ \"45-64\",\r\n           age %in% c(\"65_69\", \"70_74\", \"75_79\") ~ \"65-79\",\r\n           age %in% c(\"80_84\", \"85-89\", \"90+\") ~ \"80+\",\r\n           TRUE ~ \"Unknown\"),\r\n         date=as.Date(date)) %>% \r\n  group_by(date, age, metric) %>% \r\n  summarise(count=sum(deaths))\r\n\r\n#Read in Admissions data\r\n#Taken from https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-hospital-activity/\r\n#Updated each Thursday (I think)\r\nadmrange <- \"ET\"\r\n\r\ntemp <- tempfile()\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/Covid-Publication-11-03-2021-Supplementary-Data.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata3 <- as.data.frame(t(read_excel(temp, range=paste0(\"D16:\", admrange, \"23\"), \r\n                                    col_names=FALSE))) %>% \r\n  mutate(date=seq.Date(from=as.Date(\"2020-10-12\"), length=nrow(.), by=\"day\")) %>% \r\n  gather(age, count, c(1:8)) %>% \r\n  mutate(age=case_when(\r\n    age==\"V1\" ~ \"0-5\",\r\n    age==\"V2\" ~ \"6-17\",\r\n    age==\"V3\" ~ \"18-54\",\r\n    age==\"V4\" ~ \"55-64\",\r\n    age==\"V5\" ~ \"65-74\",\r\n    age==\"V6\" ~ \"75-84\",\r\n    age==\"V7\" ~ \"85+\",\r\n    TRUE ~ \"Unknown\"),\r\n    metric=\"Admissions\")\r\n\r\n#Read in less detailed but more regular admissions data from the dashboard\r\ntemp <- tempfile()\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumAdmissionsByAge&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata3.1 <- read.csv(temp) %>% \r\n  mutate(date=as.Date(date),\r\n         age=case_when(\r\n           age==\"0_to_5\" ~ \"0-5\",\r\n           age==\"6_to_17\" ~ \"6-17\",\r\n           age==\"18_to_64\" ~ \"18-64\",\r\n           age==\"65_to_84\" ~ \"65-84\",\r\n           TRUE ~ \"85+\"),\r\n         metric=\"Admissions2\") %>% \r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(count=value-lag(value, 1)) %>% \r\n  ungroup()\r\n\r\n#Read in Hospital deaths data\r\n#Taken from https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-daily-deaths/\r\n#Updated daily\r\ndeathrange <- \"NN\"\r\n\r\ntemp <- tempfile()\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-total-announced-deaths-15-March-2021.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata4 <- as.data.frame(t(read_excel(temp, sheet=\"Tab3 Deaths by age\", \r\n                                    range=paste0(\"E19:\", deathrange, \"24\"), \r\n                                    col_names=FALSE))) %>% \r\n  mutate(date=seq.Date(from=as.Date(\"2020-03-01\"), length=nrow(.), by=\"day\")) %>% \r\n  gather(age, count, c(1:6)) %>% \r\n  mutate(age=case_when(\r\n    age==\"V1\" ~ \"0-19\",\r\n    age==\"V2\" ~ \"20-39\",\r\n    age==\"V3\" ~ \"40-59\",\r\n    age==\"V4\" ~ \"60-79\",\r\n    age==\"V5\" ~ \"80+\",\r\n    age==\"V6\" ~ \"Unknown\"),\r\n    metric=\"Hospital Deaths\")\r\n  \r\n#Combine them all together\r\ndata <- bind_rows(data1, data2, data3, data3.1, data4)\r\n\r\n#Take rolling 7-day averages\r\ndata <- data %>% \r\n  group_by(age, metric) %>% \r\n  arrange(date) %>% \r\n  mutate(count_roll=roll_mean(count, 7, align=\"center\", fill=NA),\r\n         age=factor(age, levels=c(\"0-5\", \"0-14\", \"0-19\", \"6-17\", \"15-24\", \"18-54\", \"18-64\", \"20-39\",\r\n                                  \"25-44\", \"40-59\", \"45-64\", \"55-64\", \"60-79\", \"65-74\",\r\n                                  \"65-79\", \"65-84\", \"75-84\", \"80+\", \"85+\", \"Unknown\")))\r\n\r\n#Fit linear models\r\nFitFrom <- as.Date(\"2021-01-21\")\r\nFitTo <- as.Date(\"2021-01-27\")\r\n\r\nmodels <- data %>% \r\n  filter(date>=FitFrom & date<=FitTo) %>% \r\n  mutate(daysfrom=as.numeric(difftime(date, FitFrom, units = \"days\"))) %>% \r\n  group_by(metric, age) %>% \r\n  do(tidy(lm(log(count_roll+0.5)~daysfrom, .))) %>% \r\n  select(1:4) %>% \r\n  spread(term, estimate) %>% \r\n  rename(intercept=`(Intercept)`, slope=daysfrom)\r\n\r\n#Merge into case data\r\nplot.data <- data %>%\r\n  filter(date>=FitFrom) %>% \r\n  merge(models) %>% \r\n  mutate(daysfrom=as.numeric(difftime(date, FitFrom, units = \"days\")),\r\n         baseline=exp(intercept+slope*daysfrom))\r\n\r\n#Plot of cases\r\nagg_tiff(\"Outputs/COVIDAgeEffects1Cases.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Cases\" & age!=\"Unknown\"))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily new cases (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in new COVID-19 cases\",\r\n       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),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Plot of deaths within 28 days\r\nagg_tiff(\"Outputs/COVIDAgeEffects2Deaths.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Deaths\" & age!=\"Unknown\"))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily deaths (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in COVID-19 deaths\",\r\n       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),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAgeEffects2DeathsReduced.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Deaths\" & !age %in% c(\"Unknown\", \"0-14\", \"15-24\")))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily deaths (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in COVID-19 deaths\",\r\n       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),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot of admissions\r\nagg_tiff(\"Outputs/COVIDAgeEffects3Admissions.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Admissions\" & age!=\"Unknown\"))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily new admissions (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in new COVID-19 admissions\",\r\n       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),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAgeEffects3AdmissionsReduced.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Admissions\" & !age %in% c(\"Unknown\", \"0-5\", \"6-17\")))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily new admissions (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in new COVID-19 admissions\",\r\n       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),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot of admissions from dashboard data\r\nagg_tiff(\"Outputs/COVIDAgeEffects3.1Admissions.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Admissions2\" & age!=\"Unknown\"))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily new admissions (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in new COVID-19 admissions\",\r\n       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),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAgeEffects3.1AdmissionsReduced.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Admissions2\" & !age %in% c(\"Unknown\", \"0-5\", \"6-17\")))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily new admissions (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in new COVID-19 admissions\",\r\n       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),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot of hospital deaths\r\nagg_tiff(\"Outputs/COVIDAgeEffects4HopsDeaths.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Hospital Deaths\" & age!=\"Unknown\"))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily new cases (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in COVID-19 deaths in hospitals\",\r\n       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),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAgeEffects4HopsDeathsReduced.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(subset(plot.data, metric==\"Hospital Deaths\" & !age  %in% c(\"Unknown\", \"0-19\", \"20-39\")))+\r\n  geom_line(aes(x=date, y=baseline, colour=age), show.legend=FALSE)+\r\n  geom_ribbon(aes(x=date, ymin=count_roll, ymax=baseline, fill=age), alpha=0.3, show.legend=FALSE)+\r\n  geom_point(aes(x=date, y=count_roll, colour=age), show.legend = FALSE)+\r\n  geom_point(aes(x=date, y=count), colour=\"Black\", alpha=0.08)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"Daily new cases (log scale)\", \r\n                     labels=number_format(accuracy=1))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Age-specific trends in COVID-19 deaths in hospitals\",\r\n       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),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDBivariateCasesxIMD.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(sf)\r\nlibrary(paletteer)\r\nlibrary(ukcovid19)\r\nlibrary(readxl)\r\nlibrary(cowplot)\r\nlibrary(lubridate)\r\n\r\n########\r\n#London#\r\n########\r\n\r\n#Call MSOA level case data from coronavirus.data.gov.uk\r\ntemp <- tempfile()\r\nsource <- (\"https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read_csv(temp) \r\n\r\n#Download MSOA shapefile\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\r\nname <- list.files(temp2, pattern=\".shp\")\r\nshapefile <- st_read(file.path(temp2, name))\r\n\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE)[,c(1,2,5,6)]\r\ncolnames(IMD) <- c(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n  \r\n#Download LSOA to MSOA lookup\r\ntemp <- tempfile()\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, RGN11NM) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\npop <- read_excel(file.path(temp2, \"SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx\"),\r\n                  sheet=\"Mid-2019 Persons\", range=\"A6:G34758\", col_names=FALSE)[,c(1,7)]\r\ncolnames(pop) <- c(\"LSOA11CD\", \"pop\")\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop)) %>% \r\n  ungroup() %>% \r\n  #Then merge into COVID case data\r\n  merge(casedata %>% filter(date==max(date)), by.x=\"MSOA11CD\", by.y=\"areaCode\", all=TRUE) %>% \r\n  rename(msoa11cd=MSOA11CD)\r\n\r\n#Join with map\r\nmapdata <- full_join(shapefile, IMD_MSOA)\r\n\r\n#Map of Deprivation\r\nmapdata %>% \r\n  filter(regionName==\"London\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(fill=max(IMDrank)-IMDrank, geometry=geometry), colour=NA)+\r\n  scale_fill_paletteer_c(\"pals::ocean.matter\", name=\"Deprivation\\n(darker = more deprived)\", \r\n                         limits=c(0,NA), direction=-1)+\r\n  theme_void()\r\n\r\n#Map of Deprivation\r\nmapdata %>% \r\n  filter(regionName==\"London\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(fill=newCasesBySpecimenDateRollingRate, geometry=geometry), colour=NA)+\r\n  scale_fill_paletteer_c(\"pals::ocean.deep\", name=\"New cases\\nper 100,000\", \r\n                         limits=c(0,NA), direction=-1)+\r\n  theme_void()\r\n\r\n#Scatter plot\r\ntiff(\"Outputs/COVIDLondonCasesScatter.tiff\", units=\"in\", width=8, height=6, res=300)\r\nmapdata %>% \r\n  filter(regionName==\"London\") %>% \r\n  ggplot(aes(x=newCasesBySpecimenDateRollingRate, y=max(IMDrank)-IMDrank))+\r\n  geom_point(colour=\"#c51b8a\")+\r\n  geom_smooth(method=\"lm\", formula=y~x)+\r\n  scale_x_continuous(name=\"New COVID-19 cases per 100,000 in the past week\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"There are more COVID-19 cases in deprived parts of London\",\r\n       subtitle=\"Rolling 7-day rate of new cases plotted against the Index of Multiple Deprivation for MSOAs in London\",\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bivariate map\r\nBVmapdata <- mapdata %>% \r\n  filter(regionName==\"London\") %>% \r\n  mutate(IMDtert=quantcut(-IMDrank, q=4, labels=FALSE),\r\n         casetert=quantcut(newCasesBySpecimenDateRollingRate, q=4, labels=FALSE))\r\n\r\n#Generate key\r\n#Colours inspired by @jscarto's post here: \r\n#https://www.joshuastevens.net/cartography/make-a-bivariate-choropleth-map/\r\nkeydata <- data.frame(IMDtert=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4), \r\n                      casetert=c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4),\r\n                      RGB=c(\"#e8e8e8\",\"#b9dddd\",\"#89d3d3\",\"#5ac8c8\",\r\n                            \"#dabcd4\",\"#acb2ca\",\"#7ea8c1\",\"#509eb7\",\r\n                            \"#cc90c0\",\"#9f86b7\",\"#727dae\",\"#4573a5\",\r\n                            \"#be64ac\",\"#925ba4\",\"#67529c\",\"#3b4994\"))\r\n\r\n#Bring colours into main data for plotting\r\nBVmapdata <- left_join(BVmapdata, keydata, by=c(\"IMDtert\", \"casetert\"))\r\n\r\n#Bivariate map\r\nBVmap <- BVmapdata %>% \r\n  filter(regionName==\"London\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(fill=RGB, geometry=geometry), colour=NA)+\r\n  scale_fill_identity()+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)))+\r\n  labs(title=\"In London, more deprived areas have more COVID-19 cases\",\r\n       subtitle=\"Rolling 7-day average rates of new cases compared to Index of Multiple Deprivation ranks for Middle Super Output Areas (MSOAs)\",\r\n       cation=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=545000, y=199000, label=\"High deprivation,\\nhigh cases\", size=4)+\r\n  annotate(\"text\", x=515000, y=198000, label=\"High deprivation,\\nlow cases\", size=4)+\r\n  annotate(\"text\", x=561000, y=180000, label=\"Low deprivation,\\nhigh cases\", size=4)+\r\n  annotate(\"text\", x=507000, y=167000, label=\"Low deprivation,\\nlow cases\", size=4)+\r\n  geom_curve(aes(x=541500, y=198800, xend=537000, yend=199000), curvature=-0.15,\r\n            arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\r\n  geom_curve(aes(x=559000, y=181300, xend=556000, yend=185000), curvature=0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+  \r\n  geom_curve(aes(x=518000, y=197000, xend=534000, yend=187600), curvature=-0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\r\n  geom_curve(aes(x=510000, y=166500, xend=516500, yend=169000), curvature=0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))\r\n\r\n#Bivariate key\r\nkey <- ggplot(keydata)+\r\n  geom_tile(aes(x=casetert, y=IMDtert, fill=RGB))+\r\n  scale_fill_identity()+\r\n  labs(x = expression(\"More COVID-19 cases\" %->%  \"\"),\r\n       y = expression(\"Greater deprivation\" %->%  \"\")) +\r\n  theme_classic() +\r\n  # make font small enough\r\n  theme(\r\n    axis.title = element_text(size = 9),axis.line=element_blank(), \r\n    axis.ticks=element_blank(), axis.text=element_blank())+\r\n  # quadratic tiles\r\n  coord_fixed()\r\n\r\n#Final plot\r\ntiff(\"Outputs/COVIDLondonCasesxIMD.tiff\", units=\"in\", width=12, height=8, res=300)\r\nggdraw()+\r\n  draw_plot(BVmap, 0,0,1,1)+\r\n  draw_plot(key, 0.68,0.05,0.3,0.3) \r\ndev.off()\r\n\r\n#########\r\n#Glasgow#\r\n#########\r\n\r\n#Call Intermediate Zone level case data from https://www.opendata.nhs.scot/dataset/covid-19-in-scotland\r\ntemp <- tempfile()\r\nsource <- (\"https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/8906de12-f413-4b3f-95a0-11ed15e61773/download/trend_iz_20210111.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata.s <- read_csv(temp, col_types=\"cccccicicc\") %>% \r\n  mutate(date=ymd(Date),\r\n         caserate=Positive7Day*100000/Population) %>% \r\n  select(date, IntZone, IntZoneName, CA, CAName, caserate) %>% \r\n  #keep only the latest day's data\r\n  filter(date==max(date)) %>% \r\n  mutate(region=if_else(CAName %in% c(\"East Dunbartonshire\", \"East renfrewshire\",\r\n                                      \"Glasgow City\", \"Inverclyde\", \"Renfrewshire\",\r\n                                      \"West Dunbartonshire\"), \"Glasgow\", \"\"))\r\n\r\n#Bring in SIMD data (at datazone level)\r\ntemp <- tempfile()\r\nsource <- (\"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\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nSIMD <- read_excel(temp, sheet=2, range=\"A1:F6977\")\r\n\r\n#Bring in DZ to IZ lookup\r\ntemp <- tempfile()\r\nsource <- (\"http://statistics.gov.scot/downloads/file?id=2a2be2f0-bf5f-4e53-9726-7ef16fa893b7%2FDatazone2011lookup.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nDZIZlookup <- read.csv(temp) %>% \r\n  select(DZ2011_Code, IZ2011_Code) %>% \r\n  rename(Data_Zone=DZ2011_Code, IntZone=IZ2011_Code)\r\n\r\n#Merge into SIMD data\r\nSIMD_IZ <- SIMD %>% \r\n  merge(DZIZlookup) %>% \r\n  group_by(IntZone) %>% \r\n  summarise(SIMDrank=weighted.mean(SIMD2020v2_Rank, Total_population)) %>% \r\n  ungroup() %>% \r\n  #Merge into case data\r\n  merge(casedata.s)\r\n\r\n#Get IZ boundaries\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"http://sedsh127.sedsh.gov.uk/Atom_data/ScotGov/ZippedShapefiles/SG_IntermediateZoneBdry_2011.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\nshapefile.s <- st_read(file.path(temp2, \"SG_IntermediateZone_Bdry_2011.shp\"))\r\n\r\nmapdata.s <- full_join(shapefile.s, SIMD_IZ, by=c(\"InterZone\"=\"IntZone\")) \r\n\r\n#Map of Deprivation\r\nmapdata.s %>% \r\n  filter(region==\"Glasgow\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(fill=max(SIMDrank)-SIMDrank, geometry=geometry), colour=NA)+\r\n  scale_fill_paletteer_c(\"pals::ocean.matter\", name=\"Deprivation\\n(darker = more deprived)\", \r\n                         limits=c(0,NA), direction=-1)+\r\n  theme_void()\r\n\r\n#Map of Deprivation\r\nmapdata.s %>% \r\n  filter(region==\"Glasgow\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(fill=caserate, geometry=geometry), colour=NA)+\r\n  scale_fill_paletteer_c(\"pals::ocean.deep\", name=\"New cases\\nper 100,000\", \r\n                         limits=c(0,NA), direction=-1)+\r\n  theme_void()\r\n\r\n#Scatter plot\r\ntiff(\"Outputs/COVIDGlasgowCasesScatter.tiff\", units=\"in\", width=10, height=7, res=300)\r\nmapdata.s %>% \r\n  filter(region==\"Glasgow\") %>% \r\n  ggplot(aes(x=caserate, y=max(SIMDrank)-SIMDrank))+\r\n  geom_point(colour=\"#c51b8a\")+\r\n  geom_smooth(method=\"lm\", formula=y~x)+\r\n  scale_x_continuous(name=\"New COVID-19 cases per 100,000 in the past week\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"There are more COVID-19 cases in deprived parts of Glasgow\",\r\n       subtitle=\"Rolling 7-day rate of new cases plotted against the Index of Multiple Deprivation for Intermediate Zones in Greater Glasgow\",\r\n       caption=\"Data from PHS, Scottish Government | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bivariate map\r\nBVmapdata.s <- mapdata.s %>% \r\n  filter(region==\"Glasgow\") %>% \r\n  mutate(SIMDtert=quantcut(-SIMDrank, q=4, labels=FALSE),\r\n         casetert=quantcut(caserate, q=4, labels=FALSE))\r\n\r\n#Generate key\r\nkeydata.s <- data.frame(SIMDtert=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4), \r\n                      casetert=c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4),\r\n                      RGB=c(\"#e8e8e8\",\"#b9dddd\",\"#89d3d3\",\"#5ac8c8\",\r\n                            \"#dabcd4\",\"#acb2ca\",\"#7ea8c1\",\"#509eb7\",\r\n                            \"#cc90c0\",\"#9f86b7\",\"#727dae\",\"#4573a5\",\r\n                            \"#be64ac\",\"#925ba4\",\"#67529c\",\"#3b4994\"))\r\n\r\n#Bring colours into main data for plotting\r\nBVmapdata.s <- left_join(BVmapdata.s, keydata.s, by=c(\"SIMDtert\", \"casetert\"))\r\n\r\n#Bivariate map\r\nBVmap.s <- BVmapdata.s %>% \r\n  filter(region==\"Glasgow\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(fill=RGB, geometry=geometry), colour=NA)+\r\n  scale_fill_identity()+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)))+\r\n  labs(title=\"In Glasgow, the most deprived areas generally have more COVID-19 cases\",\r\n       subtitle=\"Rolling 7-day rate of new cases plotted against the Index of Multiple Deprivation for Intermediate Zones\",\r\n       cation=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=273000, y=670000, label=\"High deprivation,\\nhigh cases\", size=4)+\r\n  annotate(\"text\", x=268000, y=658000, label=\"High deprivation,\\nlow cases\", size=4)+\r\n  annotate(\"text\", x=227000, y=657000, label=\"Low deprivation,\\nhigh cases\", size=4)+\r\n  annotate(\"text\", x=251000, y=684000, label=\"Low deprivation,\\nlow cases\", size=4)+\r\n  geom_curve(aes(x=272200, y=668800, xend=269300, yend=666000), curvature=-0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\r\n  geom_curve(aes(x=265400, y=659300, xend=259100, yend=662700), curvature=0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+  \r\n  geom_curve(aes(x=229000, y=658300, xend=231000, yend=661000), curvature=-0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))+\r\n  geom_curve(aes(x=251500, y=682700, xend=252300, yend=677000), curvature=0.15,\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"))\r\n\r\n#Bivariate key\r\nkey.s <- ggplot(keydata)+\r\n  geom_tile(aes(x=casetert, y=SIMDtert, fill=RGB))+\r\n  scale_fill_identity()+\r\n  labs(x = expression(\"More COVID-19 cases\" %->%  \"\"),\r\n       y = expression(\"Greater deprivation\" %->%  \"\")) +\r\n  theme_classic() +\r\n  # make font small enough\r\n  theme(\r\n    axis.title = element_text(size = 9),axis.line=element_blank(), \r\n    axis.ticks=element_blank(), axis.text=element_blank())+\r\n  # quadratic tiles\r\n  coord_fixed()\r\n\r\n#Final plot\r\ntiff(\"Outputs/COVIDGlasgowCasesxIMD.tiff\", units=\"in\", width=12, height=8, res=300)\r\nggdraw()+\r\n  draw_plot(BVmap.s, 0,0,1,1)+\r\n  draw_plot(key.s, 0.03,0.6,0.3,0.3) \r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDBivariateCasesxVax.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(sf)\r\nlibrary(gtools)\r\nlibrary(extrafont)\r\nlibrary(cowplot)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(readxl)\r\n\r\n#Read in MSOA-level case data from the dashboard\r\ncaseurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingSum&format=csv\"\r\n\r\ncases <- tempfile()\r\ncases <- curl_download(url=caseurl, destfile=cases, quiet=FALSE, mode=\"wb\")\r\ncasedata <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date==max(date)) %>% \r\n  rename(cases=newCasesBySpecimenDateRollingSum, msoa11cd=areaCode) %>% \r\n  select(cases, msoa11cd)\r\n\r\n#Read in vaccination data\r\n#Download vaccination data by MSOA\r\n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/\r\nvax <- tempfile()\r\nvaxurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-10-June-2021.xlsx\"\r\nvax <- curl_download(url=vaxurl, destfile=vax, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read_excel(vax, sheet=\"MSOA\", range=\"F16:S6806\", col_names=FALSE) %>% \r\n  set_names(c(\"msoa11cd\", \"msoa11nm\", \"<30\", \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\",\r\n              \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \"80+\")) %>% \r\n  gather(age, vaccinated, c(3:14))\r\n\r\npop2 <- read_excel(vax, sheet=\"Population estimates (NIMS)\", range=\"U16:AI6806\", col_names=FALSE) %>% \r\n  select(-c(2,3)) %>% \r\n  set_names(c(\"msoa11cd\", \"<30\",  \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\",\r\n              \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \"80+\")) %>% \r\ngather(age, pop, c(2:13)) %>% \r\n  group_by(msoa11cd, age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\n#COMBINE and calculate age-standardised vax rates\r\ncombineddata <- merge(vaxdata, pop2) %>% \r\n  mutate(vaxprop=vaccinated/pop) %>% \r\n  select(-c(vaccinated, pop)) %>% \r\n  spread(age, vaxprop) %>% \r\n  mutate(asrate=((`<30`*(0.8*5500+6000+6000)+`30-34`*6500+\r\n                    `35-39`*7000+`40-44`*7000+`45-49`*7000+`50-54`*7000+`55-59`*6500+\r\n                    `60-64`*6000+`65-69`*5500+`70-74`*5000+`75-79`*4000+\r\n                    `80+`*5000)/82900)) %>% \r\n  merge(casedata, all=TRUE) %>% \r\n  merge(pop2 %>% group_by(msoa11cd) %>% summarise(pop=sum(pop)) %>%  ungroup()) %>% \r\n  mutate(caserate=cases*100000/pop)\r\n\r\nggplot(combineddata, aes(x=caserate, y=asrate))+\r\n  geom_point()\r\n\r\n#Download Carl Baker's lovely cartogram\r\nmsoa <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\nmsoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode=\"wb\")\r\n\r\nBackgroundMSOA <- st_read(msoa, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(combineddata, by=\"msoa11cd\")\r\n\r\nGroupsMSOA <- st_read(msoa, layer=\"2 Groups\")\r\n\r\nGroup_labelsMSOA <- st_read(msoa, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAsMSOA <- st_read(msoa, layer=\"3 Local authority outlines (2019)\")\r\n\r\n#Option 1\r\n#Remove missing MSOAs and calculate tertiles\r\nMSOAv1 <- MSOA %>% \r\n  filter(!is.na(caserate)) %>% \r\n  mutate(casetert=quantcut(caserate, q=3, labels=FALSE),\r\n         vaxtert=quantcut(asrate, q=3, labels=FALSE),\r\n         key=case_when(\r\n           casetert==1 & vaxtert==1 ~ 1,\r\n           casetert==1 & vaxtert==2 ~ 2,\r\n           casetert==1 & vaxtert==3 ~ 3,\r\n           casetert==2 & vaxtert==1 ~ 4,\r\n           casetert==2 & vaxtert==2 ~ 5,\r\n           casetert==2 & vaxtert==3 ~ 6,\r\n           casetert==3 & vaxtert==1 ~ 7,\r\n           casetert==3 & vaxtert==2 ~ 8,\r\n           TRUE ~ 9),\r\n         fillcolour=case_when(\r\n           key==1 ~ \"#f0f0f0\", key==2 ~ \"#a0dcdd\", key==3 ~ \"#00cfc1\",\r\n           key==4 ~ \"#ffa2aa\", key==5 ~ \"#afa7b7\", key==6 ~ \"#44b4cb\",\r\n           key==7 ~ \"#ff3968\", key==8 ~ \"#c066b2\", TRUE ~ \"#6d87cc\"))\r\n\r\n#Option 2\r\n#Have all missing MSOAs as a single category and calculate tertiles\r\ntemp <- MSOA %>% \r\n  filter(is.na(caserate) & RegionNation!=\"Wales\") %>% \r\n  mutate(casetert=1)\r\n\r\nMSOAv2 <- MSOA %>% \r\n  filter(!is.na(caserate)) %>% \r\n  mutate(casetert=quantcut(caserate, q=2, labels=FALSE)+1) %>% \r\n  bind_rows(temp) %>% \r\n  mutate(vaxtert=quantcut(asrate, q=3, labels=FALSE),\r\n         key=case_when(\r\n           casetert==1 & vaxtert==1 ~ 1,\r\n           casetert==1 & vaxtert==2 ~ 2,\r\n           casetert==1 & vaxtert==3 ~ 3,\r\n           casetert==2 & vaxtert==1 ~ 4,\r\n           casetert==2 & vaxtert==2 ~ 5,\r\n           casetert==2 & vaxtert==3 ~ 6,\r\n           casetert==3 & vaxtert==1 ~ 7,\r\n           casetert==3 & vaxtert==2 ~ 8,\r\n           TRUE ~ 9),\r\n         fillcolour=case_when(\r\n           key==1 ~ \"#f0f0f0\", key==2 ~ \"#a0dcdd\", key==3 ~ \"#00cfc1\",\r\n           key==4 ~ \"#ffa2aa\", key==5 ~ \"#afa7b7\", key==6 ~ \"#44b4cb\",\r\n           key==7 ~ \"#ff3968\", key==8 ~ \"#c066b2\", TRUE ~ \"#6d87cc\"))\r\n\r\n#generate dataframe for key\r\nkeydata <- MSOAv2 %>%\r\n  filter(!is.na(fillcolour)) %>%\r\n  group_by(casetert, vaxtert) %>%\r\n  summarise(RGB=unique(fillcolour))\r\n\r\nkey <- ggplot(keydata)+\r\n  geom_tile(aes(x=casetert, y=vaxtert, fill=RGB))+\r\n  scale_fill_identity()+\r\n  labs(x = expression(\"More COVID cases\" %->%  \"\"),\r\n       y = expression(\"Higher vaccination rates\" %->%  \"\")) +\r\n  theme_classic() +\r\n  # make font small enough\r\n  theme(\r\n    axis.title = element_text(size = 9),axis.line=element_blank(), \r\n    axis.ticks=element_blank(), axis.text=element_blank(),\r\n    text=element_text(family=\"Lato\"))+\r\n  # quadratic tiles\r\n  coord_fixed()\r\n\r\nplot <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOAv2, \r\n          aes(geometry=geom, fill=fillcolour), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\", family=\"Lato\")+\r\n  scale_fill_identity(na.value=\"Black\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), plot.title.position = \"panel\")+\r\n  annotate(\"text\", x=55.5, y=14, label=\"Fewer cases,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=53, y=14, xend=47.8, yend=14.5), curvature=0.15)+\r\n  annotate(\"text\", x=15, y=10, label=\"Fewer cases,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=16, y=9, xend=19.7, yend=5), curvature=0.2)+\r\n  annotate(\"text\", x=51, y=35, label=\"More cases,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=47.5, y=34, xend=43.8, yend=34.5), curvature=-0.2)+\r\n  annotate(\"text\", x=24, y=54, label=\"More cases,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=26, y=52.8, xend=31.3, yend=50.4), curvature=0.1)+\r\n  labs(title=\"Comparing COVID-19 case rates and vaccine coverage\",\r\n       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.\",       \r\n       caption=\"Data from coronavirus.data.gov.uk and NHS England, cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\n#agg_png(\"Outputs/COVIDBivariateCasesVax.png\", units=\"in\", width=8, height=10, res=800)\r\nagg_tiff(\"Outputs/COVIDBivariateCasesVax.tiff\", units=\"in\", width=8, height=10, res=800)\r\nggdraw()+\r\n  draw_plot(plot, 0,0,1,1)+\r\n  draw_plot(key, 0.66,0.66,0.28,0.28)\r\ndev.off()\r\n\r\n#Repeat for cumulative infection rates\r\ncasedata.full <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  rename(cases=newCasesBySpecimenDateRollingSum, msoa11cd=areaCode) %>% \r\n  select(cases, date, msoa11cd) %>% \r\n  group_by(msoa11cd) %>% \r\n  summarise(cases=sum(cases)) %>% \r\n  ungroup() \r\n\r\ncasedata.full <- merge(vaxdata, pop2) %>% \r\n  mutate(vaxprop=vaccinated/pop) %>% \r\n  select(-c(vaccinated, pop)) %>% \r\n  spread(age, vaxprop) %>% \r\n  mutate(asrate=(`<30`*(0.8*5500+6000+6000)+`30-34`*6500+\r\n                   `35-39`*7000+`40-44`*7000+`45-49`*7000+`50-54`*7000+`55-59`*6500+\r\n                   `60-64`*6000+`65-69`*5500+`70-74`*5000+`75-79`*4000+\r\n                   `80+`*5000)/82900) %>% \r\n  merge(casedata.full, all=TRUE) %>% \r\n  merge(pop2 %>% group_by(msoa11cd) %>% summarise(pop=sum(pop)) %>%  ungroup()) %>% \r\n  mutate(caserate=cases*100000/pop,\r\n         caseprop=cases/pop,\r\n         casetert=quantcut(caserate, q=3, labels=FALSE),\r\n         vaxtert=quantcut(asrate, q=3, labels=FALSE),\r\n         key=case_when(\r\n           casetert==1 & vaxtert==1 ~ 1,\r\n           casetert==1 & vaxtert==2 ~ 2,\r\n           casetert==1 & vaxtert==3 ~ 3,\r\n           casetert==2 & vaxtert==1 ~ 4,\r\n           casetert==2 & vaxtert==2 ~ 5,\r\n           casetert==2 & vaxtert==3 ~ 6,\r\n           casetert==3 & vaxtert==1 ~ 7,\r\n           casetert==3 & vaxtert==2 ~ 8,\r\n           TRUE ~ 9),\r\n         fillcolour=case_when(\r\n           key==1 ~ \"#f0f0f0\", key==2 ~ \"#a0dcdd\", key==3 ~ \"#00cfc1\",\r\n           key==4 ~ \"#ffa2aa\", key==5 ~ \"#afa7b7\", key==6 ~ \"#44b4cb\",\r\n           key==7 ~ \"#ff3968\", key==8 ~ \"#c066b2\", TRUE ~ \"#6d87cc\"))\r\n\r\nMSOA.full <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(casedata.full, by=\"msoa11cd\")\r\n\r\n#Plot cumulative attack rates across the pandemic\r\nagg_tiff(\"Outputs/COVIDCasesMSOACumul.tiff\", units=\"in\", width=8, height=10, res=800)\r\nggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA.full%>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom, fill=caseprop), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\", family=\"Roboto\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, name=\"Cumulative\\ninfection rate\",\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Merriweather\"), plot.margin=margin(0,10,0,10))+\r\n  labs(title=\"Cumulative COVID infection rates across the pandemic\",\r\n       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. \",       \r\n       caption=\"Data from coronavirus.data.gov.uk and NHS England, cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nplot.full <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA.full, \r\n          aes(geometry=geom, fill=fillcolour), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\", family=\"Lato\")+\r\n  scale_fill_identity(na.value=\"Black\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), plot.title.position = \"panel\")+\r\n  annotate(\"text\", x=55.5, y=14, label=\"Fewer cases,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=53, y=14, xend=43.1, yend=13.6), curvature=0.15)+\r\n  annotate(\"text\", x=15, y=10, label=\"Fewer cases,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=16, y=9, xend=20, yend=5), curvature=0.2)+\r\n  annotate(\"text\", x=51, y=35, label=\"More cases,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=47.5, y=34, xend=39.9, yend=34.5), curvature=-0.2)+\r\n  annotate(\"text\", x=19, y=43, label=\"More cases,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=19.5, y=41.5, xend=22.5, yend=35.4), curvature=0.1)+\r\n  labs(title=\"Comparing total COVID-19 case rates across the pandemic \\nwith current vaccine coverage\",\r\n       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\",       \r\n       caption=\"Data from coronavirus.data.gov.uk and NHS England, cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nkey.full <- ggplot(keydata)+\r\n  geom_tile(aes(x=casetert, y=vaxtert, fill=RGB))+\r\n  scale_fill_identity()+\r\n  scale_x_continuous(breaks=c(1,2,3), labels=c(\"<6%\", \"6%\", \">6%\"))+\r\n  scale_y_continuous(breaks=c(1,2,3), labels=c(\"<55%\", \"55-57%\", \">57%\"))+\r\n  labs(x = \"Overall COVID incidence\",\r\n       y = \"Adult vaccination rates\") +\r\n  theme_classic() +\r\n  # make font small enough\r\n  theme(\r\n    axis.title = element_text(size = 9),axis.line=element_blank(), \r\n    axis.ticks=element_blank(), text=element_text(family=\"Lato\"))+\r\n  # quadratic tiles\r\n  coord_fixed()\r\n\r\nagg_tiff(\"Outputs/COVIDBivariateCasesVaxFull.tiff\", units=\"in\", width=8, height=10, res=800)\r\nggdraw()+\r\n  draw_plot(plot.full, 0,0,1,1)+\r\n  draw_plot(key.full, 0.66,0.64,0.28,0.28)\r\ndev.off()\r\n\r\n#Read in James Ward's estimated attack rate data\r\nJWMSOAEst <- read.csv(\"Data/MSOAAttackRates.csv\") %>% \r\n  rename(msoa11cd=MSOA.Code, attackrate=Estimated.Attack.Rate.to.8.3.21) %>% \r\n  mutate(attackrate=as.numeric(gsub(\"%\", \"\", attackrate)))\r\n\r\ncasedata2 <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  rename(cases=newCasesBySpecimenDateRollingSum, msoa11cd=areaCode) %>% \r\n  select(cases, date, msoa11cd) %>% \r\n  filter(date>as.Date(\"2021-03-10\")) %>% \r\n  group_by(msoa11cd) %>% \r\n  summarise(cases=sum(cases)) %>% \r\n  ungroup() %>% \r\n  merge(JWMSOAEst, all=TRUE) %>% \r\n  mutate(cases=if_else(is.na(cases), 0, as.numeric(cases)))\r\n\r\ncasedata3 <- merge(vaxdata, pop2) %>% \r\n  mutate(vaxprop=vaccinated/pop) %>% \r\n  select(-c(vaccinated, pop)) %>% \r\n  spread(age, vaxprop) %>% \r\n  mutate(asrate=(`<30`*(0.8*5500+6000+6000)+`30-34`*6500+\r\n                           `35-39`*7000+`40-44`*7000+`45-49`*7000+`50-54`*7000+`55-59`*6500+\r\n                           `60-64`*6000+`65-69`*5500+`70-74`*5000+`75-79`*4000+\r\n                           `80+`*5000)/82900) %>% \r\n  merge(casedata2, all=TRUE) %>% \r\n  merge(pop2 %>% group_by(msoa11cd) %>% summarise(pop=sum(pop)) %>%  ungroup()) %>% \r\n  mutate(caserate=cases/pop,\r\n         caseprop=caserate+attackrate,\r\n         casetert=quantcut(caseprop, q=3, labels=FALSE),\r\n         vaxtert=quantcut(asrate, q=3, labels=FALSE),\r\n         key=case_when(\r\n           casetert==1 & vaxtert==1 ~ 1,\r\n           casetert==1 & vaxtert==2 ~ 2,\r\n           casetert==1 & vaxtert==3 ~ 3,\r\n           casetert==2 & vaxtert==1 ~ 4,\r\n           casetert==2 & vaxtert==2 ~ 5,\r\n           casetert==2 & vaxtert==3 ~ 6,\r\n           casetert==3 & vaxtert==1 ~ 7,\r\n           casetert==3 & vaxtert==2 ~ 8,\r\n           TRUE ~ 9),\r\n         fillcolour=case_when(\r\n           key==1 ~ \"#f0f0f0\", key==2 ~ \"#a0dcdd\", key==3 ~ \"#00cfc1\",\r\n           key==4 ~ \"#ffa2aa\", key==5 ~ \"#afa7b7\", key==6 ~ \"#44b4cb\",\r\n           key==7 ~ \"#ff3968\", key==8 ~ \"#c066b2\", TRUE ~ \"#6d87cc\"))\r\n\r\nMSOA2 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(casedata3, by=\"msoa11cd\")\r\n\r\n#Plot cumulative attack rates across the pandemic\r\nagg_tiff(\"Outputs/COVIDCasesMSOACumulEst.tiff\", units=\"in\", width=8, height=10, res=800)\r\nggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA2%>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom, fill=caseprop/100), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\", family=\"Roboto\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, name=\"Cumulative\\ninfection rate\",\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), plot.margin=margin(0,10,0,10))+\r\n  labs(title=\"Cumulative COVID infection rates across the pandemic\",\r\n       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.\",       \r\n       caption=\"Data from James Ward (@JamesWard73), cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nplot.full <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA2, \r\n          aes(geometry=geom, fill=fillcolour), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\", family=\"Lato\")+\r\n  scale_fill_identity(na.value=\"Black\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), plot.title.position = \"panel\")+\r\n  annotate(\"text\", x=55.5, y=14, label=\"More cases,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=53, y=14, xend=48.5, yend=14.2), curvature=0.15)+\r\n  annotate(\"text\", x=15, y=10, label=\"Fewer cases,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=16, y=9, xend=19.9, yend=4.4), curvature=0.2)+\r\n  annotate(\"text\", x=52, y=33, label=\"Fewer cases,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=49.5, y=33.3, xend=45.3, yend=31.8), curvature=0.2)+\r\n  annotate(\"text\", x=19, y=43, label=\"More cases,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=19.5, y=41.5, xend=23, yend=36.6), curvature=0.1)+\r\n  labs(title=\"Comparing total COVID-19 infection rates across the pandemic \\nwith current vaccine coverage\",\r\n       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\",       \r\n       caption=\"Data from James Ward (@JamesWard73), cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nkey.full <- ggplot(keydata)+\r\n  geom_tile(aes(x=casetert, y=vaxtert, fill=RGB))+\r\n  scale_fill_identity()+\r\n  scale_x_continuous(breaks=c(1,2,3), labels=c(\"<19%\", \"19-26%\", \">26%\"))+\r\n  scale_y_continuous(breaks=c(1,2,3), labels=c(\"<55%\", \"55-57%\", \">57%\"))+\r\n  labs(x = \"Overall COVID incidence\",\r\n       y = \"Adult vaccination rates\") +\r\n  theme_classic() +\r\n  # make font small enough\r\n  theme(\r\n    axis.title = element_text(size = 9),axis.line=element_blank(), \r\n    axis.ticks=element_blank(), text=element_text(family=\"Lato\"))+\r\n  # quadratic tiles\r\n  coord_fixed()\r\n\r\nagg_tiff(\"Outputs/COVIDBivariateCasesVaxFullEst.tiff\", units=\"in\", width=8, height=10, res=800)\r\nggdraw()+\r\n  draw_plot(plot.full, 0,0,1,1)+\r\n  draw_plot(key.full, 0.66,0.64,0.28,0.28)\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDBoosters.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(readxl)\r\n\r\noptions(scipen=10000)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Download vaccination data from NHS England website\r\n#Daily data (includes boosters)\r\ndailyurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-20-October-2021.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=dailyurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n  select(1,5) %>% \r\n  filter(complete.cases(.)) %>% \r\n  set_names(c(\"Region\", \"Booster\")) %>% \r\n  mutate(date=as.Date(\"2021-10-19\"), Region=if_else(Region==\"England4\", \"England\", Region))\r\n\r\ndailydata.age <- read_excel(temp, sheet=2, range=\"B15:F28\", col_names=FALSE) %>% \r\n  select(1,5) %>% \r\n  set_names(c(\"Age\", \"Booster\"))%>% \r\n  mutate(date=as.Date(\"2021-10-19\"))\r\n\r\ndaily19th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-19-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily19th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-18\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-18\")))\r\n\r\ndaily18th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-18-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily18th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-17\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-17\")))\r\n\r\ndaily17th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-17-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily17th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n  select(1,5) %>% \r\n  filter(complete.cases(.)) %>% \r\n  set_names(c(\"Region\", \"Booster\")) %>% \r\n  mutate(date=as.Date(\"2021-10-16\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n  select(1,5) %>% \r\n  set_names(c(\"Age\", \"Booster\"))%>% \r\n  mutate(date=as.Date(\"2021-10-16\")))\r\n\r\ndaily16th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-16-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily16th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-15\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B15:F28\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-15\")))\r\n\r\ndaily15th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-15-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily15th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-14\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B15:F28\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-14\")))\r\n\r\ndaily14th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-14-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily14th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-13\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-13\")))\r\n\r\ndaily13th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-13-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily13th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-12\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-12\")))\r\n\r\ndaily12th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-12-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily12th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-11\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B15:F28\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-11\")))\r\n\r\ndaily11th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-11-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily11th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-10\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-10\")))\r\n\r\ndaily10th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-10-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily10th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-09\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B15:F28\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-09\")))\r\n\r\ndaily9th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-09-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily9th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-08\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-08\")))\r\n\r\ndaily8th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-08-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily8th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-07\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B15:F28\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-07\")))\r\n\r\ndaily7th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-07-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily7th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-06\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-06\")))\r\n\r\ndaily6th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-06-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily6th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-05\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-05\")))\r\n\r\ndaily5th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-05-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily5th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-04\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-04\")))\r\n\r\ndaily4th <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-04-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily4th, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-03\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-03\")))\r\n\r\ndaily3rd <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-03-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily3rd, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-02\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B15:F28\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-02\")))\r\n\r\ndaily2nd <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-02-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily2nd, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-10-01\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-10-01\")))\r\n\r\ndaily1st <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-01-October-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=daily1st, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.region <- dailydata.region %>% \r\n  bind_rows(read_excel(temp, sheet=1, range=\"B14:F22\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              filter(complete.cases(.)) %>% \r\n              set_names(c(\"Region\", \"Booster\")) %>% \r\n              mutate(date=as.Date(\"2021-09-30\"), Region=if_else(Region==\"England4\", \"England\", Region)))\r\n\r\ndailydata.age <- dailydata.age %>% \r\n  bind_rows(read_excel(temp, sheet=2, range=\"B16:F29\", col_names=FALSE) %>% \r\n              select(1,5) %>% \r\n              set_names(c(\"Age\", \"Booster\"))%>% \r\n              mutate(date=as.Date(\"2021-09-30\")))\r\n\r\n#Calculate daily boosters by age and region\r\nfinal.region <- dailydata.region %>% \r\n  group_by(Region) %>% \r\n  arrange(date) %>% \r\n  mutate(newBoosters=Booster-lag(Booster, 1)) %>% \r\n  ungroup()\r\n\r\nfinal.age <- dailydata.age %>% \r\n  group_by(Age) %>% \r\n  arrange(date) %>% \r\n  mutate(newBoosters=Booster-lag(Booster, 1)) %>% \r\n  ungroup() %>% \r\n  mutate(Age=factor(Age, levels=c(\"Under 18\", \"18-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\",\r\n                                  \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \"80+\")))\r\n\r\nggplot(final.region %>% filter(Region!=\"England\"), aes(x=date, y=newBoosters, colour=Region))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(limits=c(0,NA), name=\"Booster jabs delivered per day\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  theme_custom()\r\n\r\nggplot(final.age, aes(x=date, y=newBoosters, colour=Age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(limits=c(0,NA), name=\"Booster jabs delivered per day\")+\r\n  scale_colour_paletteer_d(\"pals::stepped\")+\r\n  theme_custom()\r\n\r\n#Calculate eligible populations using dashboard data\r\n#National data\r\nnaturl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumPeopleVaccinatedSecondDoseByVaccinationDate&format=csv\"\r\ntemp <- curl_download(url=naturl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nnatdata <- read.csv(temp) %>% \r\n  select(4,5) %>% \r\n  set_names(\"date\", \"Eligible\") %>% \r\n  mutate(date=as.Date(date)+days(182), Region=\"England\")\r\n  \r\n#Regional data\r\nregurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=cumPeopleVaccinatedSecondDoseByVaccinationDate&format=csv\"\r\ntemp <- curl_download(url=regurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\neligible.region <- read.csv(temp) %>% \r\n  mutate(date=as.Date(date)+days(182)) %>% \r\n  select(c(2,4, 5)) %>% \r\n  set_names(\"Region\", \"date\", \"Eligible\") %>% \r\n  mutate(Region=case_when(\r\n    Region %in% c(\"North East\", \"Yorkshire and The Humber\") ~ \"North East and Yorkshire\",\r\n    Region %in% c(\"West Midlands\", \"East Midlands\") ~ \"Midlands\",\r\n    TRUE ~ Region)) %>% \r\n  bind_rows(natdata) %>% \r\n  group_by(Region, date) %>% \r\n  summarise(Eligible=sum(Eligible)) %>% \r\n  ungroup() %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  merge(final.region) %>% \r\n  group_by(Region) %>% \r\n  arrange(date) %>% \r\n  mutate(newEligible=Eligible-lag(Eligible, 1)) %>% \r\n  ungroup() %>% \r\n  mutate(BoosterProp=Booster/Eligible)\r\n\r\n#Age banded data\r\nageurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=ageurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\neligible.age <- read.csv(temp) %>% \r\n  mutate(date==as.Date(date)+days(182)) %>% \r\n  select(age, date, cumPeopleVaccinatedSecondDoseByVaccinationDate) %>% \r\n  set_names(\"Age\", \"date\", \"Eligible\") %>% \r\n  mutate(Age=case_when(\r\n    Age %in% c(\"12_15\", \"16_17\") ~ \"Under 18\",\r\n    Age %in% c(\"80_84\", \"85_89\", \"90+\") ~ \"80+\",\r\n    TRUE ~ gsub(\"_\", \"-\", Age))) %>% \r\n  group_by(Age, date) %>% \r\n  summarise(Eligible=sum(Eligible)) %>% \r\n  ungroup() %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  merge(final.age) %>% \r\n  group_by(Age) %>% \r\n  arrange(date) %>% \r\n  mutate(newEligible=Eligible-lag(Eligible, 1)) %>% \r\n  ungroup() %>% \r\n  mutate(BoosterProp=Booster/Eligible)\r\n\r\nggplot(eligile.region %>% filter(Region!=\"England\"), aes(x=date, y=BoosterProp, colour=Region))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(limits=c(0,NA), name=\"Booster jabs delivered per day\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  theme_custom()\r\n\r\nggplot(eligile.region %>% filter(Region==\"England\"))+\r\n  geom_col(aes(x=date, y=newBoosters), fill=\"Blue\")+\r\n  geom_col(aes(x=date, y=-newEligible), fill=\"Red\")+\r\n  theme_custom()\r\n\r\nggplot(final.age, aes(x=date, y=newBoosters, colour=Age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(limits=c(0,NA), name=\"Booster jabs delivered per day\")+\r\n  scale_colour_paletteer_d(\"pals::stepped\")+\r\n  theme_custom()\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDBoosters2.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(readxl)\r\nlibrary(ggtext)\r\n\r\noptions(scipen=10000)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Total English doses\r\n\r\n#Download vaccination data from NHS England website\r\n#Daily data (includes boosters)\r\n#Start with most recent data\r\ntemp <- tempfile()\r\n\r\nlatest <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/11/COVID-19-daily-announced-vaccinations-15-November-2021.xlsx\"\r\n\r\ntemp <- curl_download(url=latest, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata <- read_excel(temp, sheet=1, range=\"B13:F14\", col_names=FALSE) %>% \r\n  select(1,5) %>% \r\n  set_names(c(\"Region\", \"Booster\")) %>% \r\n  mutate(date=as.Date(\"2021-11-14\"), Region=if_else(Region==\"England4\", \"England\", Region)) %>% \r\n  filter(substr(Region, 1, 7)==\"England\") %>% \r\n  mutate(Booster=as.numeric(Booster))\r\n\r\n#Shout out to @jackd1801 for suggesting this would be *much* easier as a for loop.\r\n#October\r\nfor(i in c(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", as.character(10:31))){\r\n  \r\n  url <- paste0(\"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-\", i, \"-October-2021.xlsx\")\r\n  \r\n  temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n  \r\n  dailydata <- dailydata %>% \r\n    bind_rows(read_excel(temp, sheet=1, range=\"B13:F14\", col_names=FALSE) %>% \r\n                select(1,5) %>% \r\n                set_names(c(\"Region\", \"Booster\")) %>% \r\n                mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(i)-2), \r\n                       Region=if_else(Region==\"England4\", \"England\", Region))%>% \r\n    filter(substr(Region, 1, 7)==\"England\")%>% \r\n      mutate(Booster=as.numeric(Booster)))\r\n}\r\n\r\n#November\r\nfor(i in c(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", as.character(10:14))){\r\n  \r\n  url <- paste0(\"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/11/COVID-19-daily-announced-vaccinations-\", i, \"-November-2021.xlsx\")\r\n  \r\n  temp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n  \r\n  dailydata <- dailydata %>% \r\n    bind_rows(read_excel(temp, sheet=1, range=\"B13:F14\", col_names=FALSE) %>% \r\n                select(1,5) %>% \r\n                set_names(c(\"Region\", \"Booster\")) %>% \r\n                mutate(date=as.Date(\"2021-11-01\")+days(as.numeric(i)-2), \r\n                       Region=if_else(Region==\"England4\", \"England\", Region))%>% \r\n                filter(substr(Region, 1, 7)==\"England\")%>% \r\n                mutate(Booster=as.numeric(Booster)))\r\n}\r\n\r\n#Calculate 'run rate' for last 14 days\r\nrunrate.e <- as.numeric(dailydata %>% filter(date>=max(date)-days(14)) %>% \r\n  summarise((value=max(Booster)-min(Booster))/14))\r\n\r\n#Bring in eligible population\r\n#Commented out lines are for switching to alternative assumptions about eligibility based on age\r\n#Engurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv\"\r\nEngurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=cumPeopleVaccinatedSecondDoseByVaccinationDate&format=csv\"\r\n\r\ntemp <- curl_download(url=Engurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nEngdata <- read.csv(temp) %>% \r\n  select(4,5) %>% \r\n  set_names(\"date\", \"Eligible\") %>% \r\n  mutate(date=as.Date(date)+days(182)) %>% \r\n  #select(4,5,11) %>% \r\n  #set_names(\"date\", \"age\", \"Eligible\") %>% \r\n  #mutate(date=as.Date(date)+days(182),\r\n  #       Eligible=if_else(age %in% c(\"12_15\", \"16_17\", \"18_24\", \"25_29\", \"30_34\", \"35_39\",\r\n  #                                   \"40_44\", \"45_49\"), 0, Eligible)) %>% \r\n  #group_by(date) %>% \r\n  #summarise(Eligible=sum(Eligible)) %>% \r\n  #ungroup() %>% \r\n  merge(dailydata, by=\"date\", all.x=TRUE) %>% \r\n  mutate(EligibleUnvax=Eligible-Booster,\r\n         Boosterprop=Booster/Eligible,\r\n         Forecast=if_else(date>max(date[!is.na(Booster)]), \r\n                          Booster[date==max(date[!is.na(Booster)])]+\r\n                            runrate.e*as.numeric(interval(max(date[!is.na(Booster)]), date), \"days\"),\r\n                          NA_real_),\r\n         Forecastprop=Forecast/Eligible)\r\n\r\nEngprop <- as.numeric(Engdata %>% filter(date==max(date[!is.na(Booster)])) %>% \r\n                         summarise(value=Booster/Eligible))\r\n\r\nagg_tiff(\"Outputs/COVIDBoostersEng.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(Engdata %>% filter(date>=as.Date(\"2021-09-21\")))+\r\n  geom_line(aes(x=date, y=Eligible), colour=\"#CC3300\")+\r\n  geom_line(aes(x=date, y=Booster), colour=\"#006666\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of people\", limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=paste0(\"England has delivered booster jabs to \",round(Engprop*100, 0),\"% of eligible people\"),\r\n       subtitle=\"Total number of <span style='color:#CC3300;'>people eligible</span> and <span style='color:#006666;'>having received</span> a COVID booster jab in England since bookings were opened on 21st September\",\r\n       caption=\"Data from NHS England & coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Total Scottish doses\r\nScotdoseurl <- \"https://www.opendata.nhs.scot/dataset/6dbdd466-45e3-4348-9ee3-1eac72b5a592/resource/42f17a3c-a4db-4965-ba68-3dffe6bca13a/download/daily_vacc_scot_20211029.csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Scotdoseurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nScotDoses <- read.csv(temp) %>% \r\n  filter(Product==\"Total\" & AgeBand==\"12 years and over\") %>% \r\n  mutate(date=as.Date(as.character(Date), format=\"%Y%m%d\"))\r\n\r\nggplot(ScotDoses, aes(x=date, y=CumulativeNumberVaccinated, colour=Dose))+\r\n  geom_line()\r\n\r\n#Calculate 'run rate' for last 14 days\r\nrunrate.s <- as.numeric(ScotDoses %>% filter(Dose==\"Dose 3 and Booster\" & date>=max(date)-days(14)) %>% \r\n                          summarise((value=max(CumulativeNumberVaccinated)-min(CumulativeNumberVaccinated))/14))\r\n\r\nScotdata <- ScotDoses %>% \r\n  filter(Dose==\"Dose 2\") %>% \r\n  mutate(date=date+days(182)) %>% \r\n  select(date, CumulativeNumberVaccinated) %>% \r\n  rename(\"Eligible\"=\"CumulativeNumberVaccinated\") %>% \r\n  merge(ScotDoses %>% filter(Dose==\"Dose 3 and Booster\"), by=\"date\", all.x=TRUE) %>% \r\n  filter(date>=max(date[Eligible==0])) %>% \r\n  mutate(EligibleUnvax=Eligible-CumulativeNumberVaccinated,\r\n         Boosterprop=CumulativeNumberVaccinated/Eligible,      \r\n         Forecast=if_else(date>max(date[!is.na(CumulativeNumberVaccinated)]), \r\n                          CumulativeNumberVaccinated[date==max(date[!is.na(CumulativeNumberVaccinated)])]+ \r\n                            runrate.s*as.numeric(interval(max(date[!is.na(CumulativeNumberVaccinated)]), date), \"days\"),\r\n                          NA_real_),\r\n         Forecastprop=Forecast/Eligible)\r\n\r\nScotprop <- as.numeric(Scotdata %>% filter(date==max(date[!is.na(CumulativeNumberVaccinated)])) %>% \r\n                         summarise(value=CumulativeNumberVaccinated/Eligible))\r\n\r\nagg_tiff(\"Outputs/COVIDBoostersScot.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(Scotdata %>% filter(date>=as.Date(\"2021-09-21\")))+\r\n  geom_line(aes(x=date, y=Eligible), colour=\"#CC3300\")+\r\n  geom_line(aes(x=date, y=CumulativeNumberVaccinated), colour=\"#006666\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of people\", limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=paste0(\"Scotland has delivered booster jabs to \",round(Scotprop*100, 0),\"% of eligible people\"),\r\n       subtitle=\"Total number of <span style='color:#CC3300;'>people eligible</span> and <span style='color:#006666;'>having received</span> a COVID booster jab in Scotland since bookings were opened on 21st September\",\r\n       caption=\"Data from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Comparison of both countries\r\nagg_tiff(\"Outputs/COVIDBoostersEngScot.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot()+\r\n  geom_line(data=Engdata, aes(x=date, y=Boosterprop), colour=\"Red\")+\r\n  geom_line(data=Scotdata, aes(x=date, y=Boosterprop), colour=\"RoyalBlue\")+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2021-09-21\"), as.Date(\"2021-11-15\")))+\r\n  scale_y_continuous(name=\"Proportion of eligible population who have received a booster\", \r\n                     limits=c(0,1),\r\n               labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"<span style='color:RoyalBlue;'>Scotland's</span> COVID booster coverage has overtaken <span style='color:Red;'>England</span>\",\r\n       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.\",\r\n       caption=\"Data from Public Health Scotland, NHS England & coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ncombined <- Engdata %>% \r\n  select(date, Eligible, Booster, Boosterprop, Forecast, Forecastprop) %>% \r\n  mutate(country=\"England\") %>% \r\n  bind_rows(Scotdata %>% \r\n              select(date, Eligible, CumulativeNumberVaccinated, Boosterprop, Forecast, Forecastprop) %>% \r\n              rename(\"Booster\"=\"CumulativeNumberVaccinated\") %>% \r\n              mutate(country=\"Scotland\")) %>% \r\n  filter(date>=as.Date(\"2021-09-21\") & date<as.Date(\"2022-01-01\")) \r\n\r\nagg_tiff(\"Outputs/COVIDBoostersEngScotForecasts.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(combined, aes(x=date, colour=country))+\r\n  geom_line(aes(y=Boosterprop), show.legend=FALSE)+\r\n  geom_line(aes(y=Forecastprop), linetype=2, show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of eligible population who have received a booster\", limits=c(0,NA),\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_manual(values=c(\"Red\", \"RoyalBlue\"))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"<span style='color:Red;'>England</span> needs to speed up its booster rollout to keep up with <span style='color:RoyalBlue;'>Scotland</span>\",\r\n       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\",\r\n       caption=\"Data from Public Health Scotland, NHS England & coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDBoostersEngScotForecasts2.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(combined %>% mutate(Eligible=if_else(is.na(Booster) & date<as.Date(\"2021-10-15\"), 0, as.numeric(Eligible))), \r\n       aes(x=date))+\r\n  geom_col(aes(y=Eligible), fill=\"#D72000\")+\r\n  geom_col(aes(y=Booster), fill=\"#172869\")+\r\n  geom_col(aes(y=Forecast), fill=\"#088BBE\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Individuals\")+\r\n  scale_fill_manual(values=c(\"Red\", \"RoyalBlue\"))+\r\n  facet_wrap(~country, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"Both England and Scotland have accelerated their booster programmes\",\r\n       subtitle=\"Total number of <span style='color:#D72000;'>people eligible for a COVID booster</span> and the number of those who have <span style='color:#172869;'>already been vaccinated</span>, or <span style='color:#088BBE;'>will be in coming months</span><br>at current vaccination rates\",\r\n       caption=\"Data from Public Health Scotland, NHS England & coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCFRs.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(ragg)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Read in CFR data provided by Dan Howdon\r\n#These estimates are not mine to share, sorry, contact Dan for more info.\r\n#https://medicinehealth.leeds.ac.uk/medicine/staff/447/dr-dan-howdon\r\nCFRdata <- read.csv(\"Data/cfrs_2021_06_16.csv\") %>% \r\n  mutate(age=case_when(\r\n    agegroup==0 ~ \"0-4\", agegroup==5 ~ \"5-9\", agegroup==10 ~ \"10-14\", agegroup==15 ~ \"15-19\",\r\n    agegroup==20 ~ \"20-24\", agegroup==25 ~ \"25-29\", agegroup==30 ~ \"30-34\", \r\n    agegroup==35 ~ \"35-39\", agegroup==40 ~ \"40-44\", agegroup==45 ~ \"45-49\", \r\n    agegroup==50 ~ \"50-54\", agegroup==55 ~ \"55-59\", agegroup==60 ~ \"60-64\", \r\n    agegroup==65 ~ \"65-69\", agegroup==70 ~ \"70-74\", agegroup==75 ~ \"75-79\",\r\n    agegroup==80 ~ \"80-84\", agegroup==85 ~ \"85-89\", TRUE ~ \"90+\"),\r\n    date=as.Date(date, format=\"%d/%m/%Y\"),\r\n    age = age %>% str_replace(\"_\", \"-\") %>%\r\n      factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\r\n                      \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                      \"40-44\", \"45-49\", \"50-54\", \"55-59\", \r\n                      \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                      \"80-84\", \"85-89\", \"90+\"))) \r\n\r\n#Bring in dashboard vaccination data by age\r\ntemp=tempfile()\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read.csv(temp) %>% \r\n  select(date, age, cumVaccinationFirstDoseUptakeByVaccinationDatePercentage,\r\n         cumVaccinationSecondDoseUptakeByVaccinationDatePercentage) %>% \r\n  set_names(c(\"date\", \"age\", \"1st Dose\", \"2nd Dose\")) %>% \r\n  mutate(age=str_replace(age, \"_\", \"-\"),\r\n         age=if_else(age==\"18-24\", \"20-24\", age)) %>% \r\n  group_by(age) %>% \r\n  #Pick out the data when vaccination coverage first passed 25% of the population\r\n  summarise(vaxstart1=min(date[`1st Dose`>=20]),\r\n            vaxstart2=min(date[`2nd Dose`>=20]))\r\n\r\n#Merge together\r\ndata <- merge(CFRdata , CFRdata %>% \r\n  merge(vaxdata, by=\"age\") %>% \r\n    filter(date==vaxstart1) %>% \r\n    select(age, cfr_month, vaxstart1, vaxstart2) %>% \r\n    rename(indexcfr=cfr_month)) %>% \r\n  select(age, date, cfr_month, indexcfr, vaxstart1, vaxstart2) %>% \r\n  mutate(indexed=cfr_month/indexcfr,\r\n         dayssince=as.integer(date-as.Date(vaxstart1)),\r\n         daysto2nd=as.integer(as.Date(vaxstart2)-as.Date(vaxstart1)))\r\n  \r\nagg_tiff(\"Outputs/COVIDCFRChangesLagged.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot(data %>% filter(!age %in% c(\"20-24\", \"25-29\", \"30-34\") & date>vaxstart1), \r\n       aes(x=dayssince, y=indexed, colour=age))+\r\n  geom_line(show.legend=FALSE)+\r\n  geom_hline(yintercept=1, colour=\"Grey70\", linetype=2)+\r\n  #geom_segment(aes(y=0.12, yend=1.2, x=daysto2nd, xend=daysto2nd), colour=\"Grey50\")+\r\n  scale_x_continuous(name=\"Days since at least 20% of population received 1st dose\")+\r\n  scale_y_continuous(name=\"Change in Case Fatality Rate \\n(log scale)\", trans=\"log\",\r\n                     breaks=c(0.25,0.5,1),\r\n                     labels=c(\"-75%\", \"-50%\", \"0%\"))+\r\n  facet_wrap(~age)+\r\n  scale_colour_paletteer_d(\"pals::tol\")+\r\n  theme_custom()+\r\n  labs(title=\"Across all age groups, Case Fatality Rates have fallen as vaccine coverage increases\",\r\n       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\",\r\n       caption=\"CFRs estimated by Daniel Howdon\\nVaccination data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCFRChangesLagged2.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot(data %>% filter(!age %in% c(\"20-24\", \"25-29\", \"30-34\") & date>vaxstart1), aes(x=date, y=indexed, colour=age))+\r\n  geom_line(show.legend=FALSE)+\r\n  geom_hline(yintercept=1, colour=\"Grey70\", linetype=2)+\r\n  #geom_vline(xintercept=as.Date(\"2021-05-15\"))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Change in Case Fatality Rate \\n(log scale)\", trans=\"log\",\r\n                     breaks=c(0.25,0.5,1),\r\n                     labels=c(\"-75%\", \"-50%\", \"0%\"))+\r\n  facet_wrap(~age)+\r\n  scale_colour_paletteer_d(\"pals::tol\")+\r\n  theme_custom()+\r\n  labs(title=\"Across all age groups, Case Fatality Rates have fallen as vaccine coverage increases\",\r\n       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\",\r\n       caption=\"CFRs estimated by Daniel Howdon\\nVaccination data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n  \r\nagg_tiff(\"Outputs/COVIDCFRChangesLagged3.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot(data %>% filter(!age %in% c(\"20-24\", \"25-29\", \"30-34\") & date>as.Date(vaxstart1)-days(50)), \r\n       aes(x=dayssince, y=indexed, colour=age))+\r\n  geom_line(show.legend=FALSE)+\r\n  geom_hline(yintercept=1, colour=\"Grey70\", linetype=2)+\r\n  geom_vline(xintercept=0)+\r\n  #geom_segment(aes(y=0.12, yend=1.2, x=daysto2nd, xend=daysto2nd), colour=\"Grey50\")+\r\n  scale_x_continuous(name=\"Days since at least 20% of population received 1st dose\")+\r\n  scale_y_continuous(name=\"Change in Case Fatality Rate \\n(log scale)\", trans=\"log\",\r\n                     breaks=c(0.25,0.5,1),\r\n                     labels=c(\"-75%\", \"-50%\", \"0%\"))+\r\n  facet_wrap(~age)+\r\n  scale_colour_paletteer_d(\"pals::tol\")+\r\n  theme_custom()+\r\n  labs(title=\"Across all age groups, Case Fatality Rates have fallen as vaccine coverage increases\",\r\n       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\",\r\n       caption=\"CFRs estimated by Daniel Howdon\\nVaccination data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCanadaHeatmap.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(padr)\r\nlibrary(lubridate)\r\nlibrary(scales)\r\nlibrary(grDevices)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\n\r\n#Read in Canadian data\r\ntemp <- tempfile()\r\nsource <- \"https://health-infobase.canada.ca/src/data/covidLive/covid19-download.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ndata <- read.csv(temp)\r\n\r\ndata <- data %>% \r\n  select(prname, date, numtoday, numdeathstoday) %>% \r\n  filter(!prname %in% c(\"Canada\", \"Repatriated travellers\")) %>% \r\n  rename(cases=numtoday, deaths=numdeathstoday) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(prname) %>% \r\n  pad()\r\n\r\n#Bring in populations\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www150.statcan.gc.ca/n1/tbl/csv/17100005-eng.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\npop <- read.csv(file.path(temp2, \"17100005.csv\"))\r\n\r\npop <- pop %>% \r\n  filter(ï..REF_DATE==2020 & GEO!=\"Canada\" & Sex==\"Both sexes\" &\r\n            Age.group==\"All ages\") %>% \r\n  rename(prname=GEO, pop=VALUE) %>% \r\n  select(prname, pop)\r\n  \r\ndata <- merge(data, pop, all.x=TRUE) %>%\r\n  group_by(prname) %>% \r\n  #Set up data for heatmap\r\n  mutate(caserate=cases*100000/pop, deathrate=deaths*100000/pop,\r\n         caserate_avg=roll_mean(caserate, 7, align=\"right\", fill=NA),\r\n         deathrate_avg=roll_mean(deathrate, 7, align=\"right\", fill=NA),\r\n         maxcaserate=max(caserate_avg, na.rm=TRUE),\r\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\r\n         maxcaseprop=caserate_avg/maxcaserate,\r\n         maxdeathrate=max(deathrate_avg, na.rm=TRUE),\r\n         maxdeathday=date[which(deathrate_avg==maxdeathrate)][1],\r\n         maxdeathprop=deathrate_avg/maxdeathrate,\r\n         totalcases=sum(cases, na.rm=TRUE),\r\n         totaldeaths=sum(deaths, na.rm=TRUE)) %>% \r\n  filter(!is.na(caserate_avg)) %>% \r\n  ungroup\r\n\r\nplotfrom <- \"2020-03-11\"\r\nplotto <- max(data$date)\r\n\r\n#Plot case trajectories\r\ncasetiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxcaseday), fill=maxcaseprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \r\n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  labs(title=\"Timelines for COVID-19 cases in Canadian provinces\",\r\n       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.\"),\r\n       caption=\"Data from Public Health Agency of Canada | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"black\"), plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"))\r\n\r\ncasebars.all <- ggplot(subset(data, date==maxcaseday), aes(x=totalcases, y=fct_reorder(prname, maxcaseday), fill=totalcases))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Total confirmed cases\")+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\", angle=45, hjust=1, \r\n                                                               vjust=1),\r\n        text=element_text(family=\"Lato\"))\r\n\r\nagg_tiff(\"Outputs/COVIDCanadaCasesHeatmap.tiff\", units=\"in\", width=15, height=5, res=500)\r\nplot_grid(casetiles.all, casebars.all, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\n#Plot case rate trajectories\r\ncaseratetiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxcaseday), fill=caserate_avg))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \r\n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  labs(title=\"Timelines for COVID-19 case rates in Canadian provinces\",\r\n       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.\"),\r\n       caption=\"Data from Public Health Agency of Canada | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"))\r\n\r\ncaseratebars.all <- ggplot(subset(data, date==maxcaseday), aes(x=pop/1000000, y=fct_reorder(prname, maxcaseday), fill=pop))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Population (millions)\")+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"),\r\n        text=element_text(family=\"Lato\"))\r\n\r\nagg_tiff(\"Outputs/COVIDCanadaCaseRatesHeatmap.tiff\", units=\"in\", width=15, height=5, res=500)\r\nplot_grid(caseratetiles.all, caseratebars.all, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off() \r\n\r\n#Plot death trajectories\r\ndeathtiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxdeathday), fill=maxdeathprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\", na.value=\"white\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \r\n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  labs(title=\"Timelines for COVID-19 deaths in Canadian provinces\",\r\n       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.\"),\r\n       caption=\"Data from Public Health Agency of Canada | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"))\r\n\r\ndeathbars.all <- ggplot(subset(data, date==maxdeathday), aes(x=totaldeaths, y=fct_reorder(prname, maxdeathday), fill=totaldeaths))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Total confirmed deaths\")+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\", angle=45, hjust=1, \r\n                                                               vjust=1),\r\n        text=element_text(family=\"Lato\"))\r\n\r\ntiff(\"Outputs/COVIDCanadaDeathsHeatmap.tiff\", units=\"in\", width=15, height=5, res=500)\r\nplot_grid(deathtiles.all, deathbars.all, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\n#Plot death rate trajectories\r\ndeathratetiles.all <- ggplot(data, aes(x=date, y=fct_reorder(prname, maxdeathday), fill=deathrate_avg))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \r\n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  labs(title=\"Timelines for COVID-19 death rates in Canadian provinces\",\r\n       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.\"),\r\n       caption=\"Data from Public Health Agency of Canada | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"))\r\n\r\ndeathratebars.all <- ggplot(subset(data, date==maxdeathday), aes(x=pop/1000000, y=fct_reorder(prname, maxdeathday), fill=pop))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Population (millions)\")+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"),\r\n        text=element_text(family=\"Lato\"))\r\n\r\ntiff(\"Outputs/COVIDCanadaDeathRatesHeatmap.tiff\", units=\"in\", width=15, height=5, res=500)\r\nplot_grid(deathratetiles.all, deathratebars.all, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off() \r\n"
  },
  {
    "path": "Heatmaps/COVIDCaseCartograms.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(sf)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ggrepel)\r\nlibrary(gganimate)\r\n\r\n#Start with LA level cases for the whole of the UK\r\ncases <- tempfile()\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\ncases <- curl_download(url=url, destfile=cases, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date))\r\n\r\nmaxdate <- max(casedata$date)\r\n\r\ncasedata <- casedata %>% \r\n  #Take the most recent 2 weeks of data\r\n  group_by(areaName) %>% \r\n  arrange(date) %>% \r\n  slice_tail(n=8) %>% \r\n  ungroup() %>% \r\n  spread(date, newCasesBySpecimenDateRollingRate) %>% \r\n  select(c(1,2,4,11))\r\n\r\ncolnames(casedata) <- c(\"Lacode\", \"areaName\", \"prev\", \"latest\")\r\n\r\ncasedata <- casedata %>% \r\n  mutate(abschange=latest-prev, relchange=abschange/prev)\r\n\r\n#Download Carl Baker's lovely map\r\nltla <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg\")\r\nltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode=\"wb\")\r\n\r\nBackground <- st_read(ltla, layer=\"7 Background\")\r\n\r\nltlacases <- st_read(ltla, layer=\"4 LTLA-2019\") %>% \r\n  left_join(casedata, by=\"Lacode\")\r\n\r\nGroups <- st_read(ltla, layer=\"2 Groups\")\r\n\r\nGroup_labels <- st_read(ltla, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nplot1 <- ggplot()+\r\n  geom_sf(data=Background, aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=ltlacases, aes(geometry=geom, fill=latest), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1,\r\n                         name=\"Cases per\\n100,000\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 cases are high across large parts of the UK\",\r\n       subtitle=paste0(\"Rolling 7-day average number of cases in the past week at Lower Tier Local Authority level\\nData up to \", maxdate),\r\n       caption=\"Data from PHE, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDCasesLTLACartogram.tiff\", units=\"in\", width=9, height=10, res=800)\r\nplot1\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDCasesLTLACartogram.png\", units=\"in\", width=9, height=10, res=800)\r\nplot1\r\ndev.off()\r\n\r\nplot2 <- ggplot()+\r\n  geom_sf(data=Background, aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=ltlacases, aes(geometry=geom, fill=abschange), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(-1,1)*max(abs(casedata$abschange)), \r\n                         name=\"Change in cases\\nper day per 100,000\\nin the past week\", direction=-1,\r\n                         na.value=\"transparent\")+\r\n  theme_void()+\r\n  theme(plot.title=element_markdown(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"In the past week, COVID cases have risen almost everywhere except SW Scotland\",\r\n       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),\r\n       caption=\"Data from PHE, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\n\r\nagg_tiff(\"Outputs/COVIDCasesLTLAChangeCartogram.tiff\", units=\"in\", width=9, height=10, res=800)\r\nplot2\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDCasesLTLAChangeCartogram.png\", units=\"in\", width=9, height=10, res=800)\r\nplot2\r\ndev.off()\r\n\r\n#Scatter plot of case level vs change\r\n#Bring in region\r\ntemp <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLADtoRegion <- read.csv(temp)[,c(1,4)]\r\ncolnames(LADtoRegion) <- c(\"LTLA\", \"Region\")\r\n\r\ncasedata <- casedata %>% \r\n  merge(LADtoRegion, all.x=TRUE, by.x=\"Lacode\", by.y=\"LTLA\") %>% \r\n  mutate(Region=case_when(\r\n    Lacode %in% c(\"E07000244\", \"E07000245\") ~ \"East of England\",\r\n    Lacode %in% c(\"E06000058\", \"E06000059\", \"E07000246\") ~ \"South West\",\r\n    substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n    substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n    substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\",\r\n    TRUE ~ Region),\r\n    Country=case_when(\r\n      substr(Lacode, 1, 1) == \"E\" ~ \"England\",\r\n      substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n      substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n      substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\"))\r\n\r\n#Bring in LA populations\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D435\", col_names=TRUE)\r\ncolnames(LApop) <- c(\"code\", \"name\", \"geography\", \"pop\")\r\n\r\n#Merge isles of Scilly in with Cornwall\r\nLApop$code <- if_else(LApop$code==\"E06000053\", \"E06000052\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"Isles of Scilly\", \"Cornwall\", LApop$name)\r\n\r\n#Merge City of London & Hackney\r\nLApop$code <- if_else(LApop$code==\"E09000001\", \"E09000012\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"City of London\", \"Hackney and City of London\", LApop$name)\r\nLApop$name <- if_else(LApop$name==\"Hackney\", \"Hackney and City of London\", LApop$name)\r\n\r\nLApop <- LApop %>% \r\n  group_by(name, code) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\nplotdata <- casedata %>% \r\n  merge(LApop, by.x=\"Lacode\", by.y=\"code\" , all.x=TRUE)\r\n\r\nagg_tiff(\"Outputs/COVIDCasesLTLAChangeScatter.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot(plotdata, aes(x=latest, y=abschange, fill=Country))+\r\n  geom_point(aes(size=pop), shape=21, alpha=0.7)+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_text_repel(aes(label=areaName), size=rel(2.3))+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"COVID cases have fallen sharply across England\",\r\n       subtitle=\"COVID case rates and how these have changed in the past week in UK Local Authorities\\nBubbles are sized by population\",\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#####################################\r\n#MSOA level data\r\nmsoacases <- tempfile()\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\nmsoacases <- curl_download(url=url, destfile=msoacases, quiet=FALSE, mode=\"wb\")\r\n\r\nmsoacasedata <- read.csv(msoacases) %>% \r\n  mutate(date=as.Date(date))\r\n\r\nmaxdate2 <- max(msoacasedata$date)\r\n\r\nmsoacasedata <- msoacasedata %>% \r\n  #Take the most recent 2 weeks of data\r\n  group_by(areaName) %>% \r\n  arrange(date) %>% \r\n  slice_tail(n=2) %>% \r\n  ungroup() %>% \r\n  spread(date, newCasesBySpecimenDateRollingRate) %>% \r\n  select(c(7,8,ncol(.)-1,ncol(.)))\r\n\r\ncolnames(msoacasedata) <- c(\"msoa11cd\", \"areaName\", \"prev\", \"latest\")\r\n\r\nmsoacasedata <- msoacasedata %>% \r\n  mutate(abschange=latest-prev, relchange=abschange/prev)\r\n\r\nmsoa <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\nmsoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode=\"wb\")\r\n\r\nBackgroundMSOA <- st_read(msoa, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(msoacasedata, by=\"msoa11cd\")\r\n\r\nGroupsMSOA <- st_read(msoa, layer=\"2 Groups\")\r\n\r\nGroup_labelsMSOA <- st_read(msoa, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAsMSOA <- st_read(msoa, layer=\"3 Local authority outlines (2019)\")\r\n\r\nplot3 <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom, fill=latest), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Cases per\\n100,000\", limits=c(0,NA))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"There are local COVID outbreaks across many parts of England\",\r\n       subtitle=paste0(\"Rolling 7-day average number of cases in the past week at Middle Super Output Area level in England\\nData up to \", \r\n                       maxdate, \". MSOAs with small populations and/or low case counts may be censored and appear in grey.\"),       \r\n       caption=\"Data from coronavirus.data.gov.uk | Cartogram from the House of Commons Library\\nAnalysis and plot by Colin Angus\")\r\n\r\nagg_tiff(\"Outputs/COVIDCasesMSOACartogram.tiff\", units=\"in\", width=10, height=8, res=800)\r\nplot3\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDCasesMSOACartogram.png\", units=\"in\", width=10, height=8, res=800)\r\nplot3\r\ndev.off()\r\n\r\nplot4 <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=MSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom, fill=abschange), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(-1,1)*max(abs(msoacasedata$abschange), na.rm=TRUE), \r\n                         name=\"Change in cases\\nper day per 100,000\\nin the past week\", direction=-1,\r\n                         na.value=\"transparent\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"), plot.caption.position = \"plot\")+\r\n  labs(title=\"At neighbourhood level, recent changes in COVID cases are a mixed picture\",\r\n       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 \", \r\n                       maxdate, \". MSOAs with small populations and/or low case counts may be censored and appear in white\"),       \r\n       caption=\"Data from coronavirus.data.gov.uk | Cartogram from the House of Commons Library\\nAnalysis and plot by Colin Angus\")\r\n\r\nagg_tiff(\"Outputs/COVIDCasesMSOAChangeCartogram.tiff\", units=\"in\", width=10, height=8, res=800)\r\nplot4\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDCasesMSOAChangeCartogram.png\", units=\"in\", width=10, height=8, res=800)\r\nplot4\r\ndev.off()\r\n\r\n#######################################################\r\n#LTLA level animation\r\nanimdata <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  rename(Lacode=areaCode)\r\n\r\nltlacaseanim <- st_read(ltla, layer=\"4 LTLA-2019\") %>% \r\n  left_join(animdata, by=\"Lacode\")\r\n\r\n#extract latest date with full UK data\r\ntemp <- animdata %>%\r\n  group_by(Lacode) %>%\r\n  filter(!is.na(newCasesBySpecimenDateRollingRate)) %>% \r\n  mutate(min=min(date), max=max(date))\r\n\r\ncompletefrom <- max(temp$min, na.rm=TRUE)\r\ncompleteto <- min(temp$max, na.rm=TRUE)\r\n\r\nCartogramanimUK <- ggplot()+\r\n  geom_sf(data=Background, aes(geometry=geom))+\r\n  geom_sf(data=subset(ltlacaseanim, date>=as.Date(\"2020-09-01\") & date<=as.Date(completeto)), \r\n          aes(geometry=geom, fill=newCasesBySpecimenDateRollingRate), \r\n          colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups, aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels, aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily confirmed\\ncases per\\n100,000\", \r\n                       na.value=\"white\")+\r\n  transition_time(date)+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Timeline of the UK's 'Second Wave'\",\r\n       subtitle=\"Rolling 7-day average number of case rates\\nData up to  {frame_time}\",\r\n       caption=\"Data from PHE, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nanimate(CartogramanimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/CartogramanimUK.gif\"), \r\n        device=\"ragg_png\", end_pause=60)\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesDeathsxIMD.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(RcppRoll)\r\nlibrary(readxl)\r\nlibrary(gtools)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(scales)\r\nlibrary(forcats)\r\n\r\noptions(scipen=99999)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Start by calculating IMD at MSOA level\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE) %>% \r\n  select(c(1,2,5,6)) %>% \r\n  set_names(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, LAD17CD) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:G34758\", col_names=FALSE) %>% \r\n  select(-c(2:6)) %>% \r\n  set_names(\"LSOA11CD\", \"pop\")\r\n\r\npop_full <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:CT34758\", col_names=FALSE) %>% \r\n  select(-c(2:7)) %>% \r\n  set_names(\"LSOA11CD\", c(0:90))\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD, LAD17CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))\r\n\r\nIMD_LTLA <- IMD %>% \r\n  group_by(LAD17CD)%>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))\r\n\r\n#####################\r\n#Analysis of population age by IMD decile (at LSOA level)\r\nu18xIMD <- pop_full %>% \r\n  gather(age, pop, c(2:ncol(.))) %>% \r\n  mutate(age=as.numeric(age)) %>% \r\n  filter(age<18) %>% \r\n  mutate(ageband=case_when(\r\n    age<12 ~ \"Under 12\", \r\n    age<16 ~ \"12-15\",\r\n    TRUE ~ \"16-17\")) %>% \r\n  merge(IMD %>% select(LSOA11CD, IMDdecile)) %>% \r\n  group_by(IMDdecile, ageband) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(IMDdecile) %>% \r\n  mutate(total=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(prop=pop/total, ageband=factor(ageband, levels=c(\"Under 12\", \"12-15\", \"16-17\")))\r\n\r\nagg_tiff(\"Outputs/EngU18Pop.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(u18xIMD, aes(x=prop, y=as.factor(IMDdecile), fill=fct_rev(ageband)))+\r\n  geom_col(position=\"stack\")+\r\n  scale_x_continuous(name=\"Proportion of under 18s\", labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"IMD decile\", labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                            \"10 - least deprived\"))+\r\n  scale_fill_paletteer_d(\"ggthemr::solarized\", name=\"\", guide=guide_legend(reverse=TRUE))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"You would expect under 18 vaccination rates in deprived areas to be *slightly* lower\",\r\n       subtitle=\"Age distribution of the under 18s in England by deprivation decile\",\r\n       caption=\"Population data from ONS 2020 estimates | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bring in MSOA level case data\r\ntemp.cases <- tempfile()\r\ncaseurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingSum&format=csv\"\r\ntemp.cases <- curl_download(url=caseurl, destfile=temp.cases, quiet=FALSE, mode=\"wb\")\r\n\r\ncases <- read.csv(temp.cases) %>% \r\n  select(areaCode, date, newCasesBySpecimenDateRollingSum) %>% \r\n  set_names(\"MSOA11CD\", \"date\", \"cases\") %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  merge(IMD_MSOA) %>% \r\n  group_by(decile, date) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(decile) %>% \r\n  mutate(caserate=cases*100000/pop) %>% \r\n  ungroup()\r\n\r\ncases_MSOA <- read.csv(temp.cases) %>% \r\n  select(areaCode, date, newCasesBySpecimenDateRollingSum) %>% \r\n  set_names(\"MSOA11CD\", \"date\", \"cases\") %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date==max(date)) %>% \r\n  merge(IMD_MSOA) %>% \r\n  rename(allpop=pop)\r\n\r\nagg_png(\"Outputs/COVIDCasesxIMD.png\", units=\"in\", width=8, height=6, res=800)\r\nggplot(cases, aes(x=date, y=caserate, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Weekly new cases per 100,000 people\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic profile of COVID cases has recently reversed\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by Colin Angus\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxIMDRecent.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(cases %>% filter(date>as.Date(\"2021-05-01\")), \r\n       aes(x=date, y=caserate, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Weekly new cases per 100,000 people\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic profile of COVID cases has recently reversed\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxIMDRecentArea.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(cases %>% filter(date>as.Date(\"2021-05-01\")), \r\n       aes(x=date, y=cases, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of new cases\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic profile of COVID cases has recently reversed\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxIMDArea.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(cases %>% filter(date>as.Date(\"2020-04-01\")), \r\n       aes(x=date, y=cases, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of new cases\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic profile of COVID cases has recently reversed\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Repeat using LA-level data\r\nsource <- (\"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDate&metric=newDeaths28DaysByDeathDate&format=csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nLAcases <- read.csv(temp) %>% \r\n  rename(cases=newCasesBySpecimenDate, deaths=newDeaths28DaysByDeathDate) %>%  \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date<max(date)-days(3)) %>% \r\n  merge(IMD_LTLA, by.x=\"areaCode\", by.y=\"LAD17CD\") %>% \r\n  group_by(decile, date) %>% \r\n  summarise(cases=sum(cases), deaths=sum(deaths), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(decile) %>% \r\n  mutate(caserate=cases*100000/pop,\r\n         deathrate=deaths*100000/pop,\r\n         caserate_roll=roll_mean(caserate, 7, align=\"center\", fill=NA),\r\n         deathrate_roll=roll_mean(deathrate, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup() \r\n\r\nagg_tiff(\"Outputs/COVIDCasesxIMDLTLA.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(LAcases, aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new cases per 100,000 people\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic profile of COVID cases has recently reversed\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxIMDAreaLTLA.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(LAcases %>% filter(date>as.Date(\"2020-04-01\")), \r\n       aes(x=date, y=caserate_roll, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of new cases\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic profile of COVID cases has recently reversed\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDDeathsxIMDLTLA.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(LAcases, aes(x=date, y=deathrate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily deaths per 100,000 people\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"COVID deaths are still highest in more deprived groups\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDDeathsxIMDAreaLTLA.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(LAcases %>% filter(date>as.Date(\"2020-04-01\")), \r\n       aes(x=date, y=deathrate_roll, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of deaths\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"COVID deaths are still highest in more deprived groups\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDDeathsxIMDLTLARecent.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(LAcases %>% filter(date>as.Date(\"2021-05-01\")), \r\n                          aes(x=date, y=deathrate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily deaths per 100,000 people\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"COVID deaths are still highest in more deprived groups\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDDeathsxIMDAreaLTLARecent.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(LAcases %>% filter(date>as.Date(\"2021-05-01\")), \r\n       aes(x=date, y=deathrate_roll, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of deaths\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"COVID deaths are still highest in more deprived groups\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Bring in u18 vaccine uptake\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-weekly-announced-vaccinations-13-January-2022.xlsx\"\r\n\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read_excel(temp, sheet=\"MSOA\", range=\"F15:I6803\", col_names=FALSE, \r\n                      col_types=\"text\") %>% \r\n  set_names(\"MSOA11CD\", \"areaName\", \"12-15\", \"16-17\") %>%\r\n  mutate(`12-15`=as.numeric(`12-15`),\r\n         `16-17`=as.numeric(`16-17`),\r\n         `12-17`=`12-15`+`16-17`) %>% \r\n  gather(age, vaccinated, c(3:5)) %>% \r\n  merge(pop_full %>% select(c(1,14:19)) %>% \r\n          gather(age, pop, c(2:7)) %>% \r\n          mutate(age=case_when(\r\n            age<16 ~ \"12-15\",\r\n            TRUE ~ \"16-17\")) %>% \r\n          group_by(LSOA11CD, age) %>% \r\n          summarise(pop=sum(pop)) %>% \r\n          ungroup() %>% \r\n          merge(lookup) %>% \r\n          group_by(MSOA11CD, age) %>% \r\n          summarise(pop=sum(pop)) %>% \r\n          ungroup() %>% \r\n          spread(age, pop) %>% \r\n          mutate(`12-17`=`12-15`+`16-17`) %>% \r\n          gather(age, pop, c(2:4))) %>% \r\n  merge(IMD_MSOA %>% select(MSOA11CD, decile)) %>% \r\n  group_by(age, decile) %>% \r\n  summarise(vaccinated=sum(vaccinated, na.rm=TRUE), vaxpop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(vaxrate=vaccinated/vaxpop)\r\n\r\nvaxdata_MSOA <- read_excel(temp, sheet=\"MSOA\", range=\"F15:I6803\", col_names=FALSE, \r\n                           col_types=\"text\") %>% \r\n  set_names(\"MSOA11CD\", \"areaName\", \"12-15\", \"16-17\") %>% \r\n  mutate(`12-15`=as.numeric(`12-15`),\r\n         `16-17`=as.numeric(`16-17`),\r\n         `12-17`=`12-15`+`16-17`) %>% \r\n  gather(age, vaccinated, c(3:5)) %>% \r\n  merge(pop_full %>% select(c(1,14:19)) %>% \r\n          gather(age, pop, c(2:7)) %>% \r\n          mutate(age=case_when(\r\n            age<16 ~ \"12-15\",\r\n            TRUE ~ \"16-17\")) %>% \r\n          merge(lookup) %>% \r\n          group_by(MSOA11CD) %>% \r\n          summarise(pop=sum(pop)) %>% \r\n          ungroup()) %>% \r\n  merge(IMD_MSOA %>% select(MSOA11CD, decile)) %>% \r\n  mutate(vaxprop=vaccinated/pop)\r\n\r\nagg_tiff(\"Outputs/COVIDVaxU18xIMDONS.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(vaxdata %>% filter(age!=\"12-17\"), aes(x=vaxrate, y=as.factor(decile), fill=as.factor(decile)))+\r\n  geom_col(show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Proportion of age group vaccinated\", labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"IMD decile\", labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                               \"10 - least deprived\"))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"Child vaccination rates are lowest in deprived areas\",\r\n       subtitle=\"Proportion of under 18s who have received at least one COVID-19 vaccine dose\",\r\n       caption=\"Vaccination data from NHS England, population data from ONS\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVax1217xIMDONS.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(vaxdata %>% filter(age==\"12-17\"), aes(x=vaxrate, y=as.factor(decile), fill=as.factor(decile)))+\r\n  geom_col(show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Proportion of age group vaccinated\", labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"IMD decile\", labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                               \"10 - least deprived\"))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"Child vaccination rates are lowest in deprived areas\",\r\n       subtitle=\"Proportion of 12-17 year olds who have received at least one COVID-19 vaccine dose\",\r\n       caption=\"Vaccination data from NHS England, population data from ONS\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n########\r\n#Combine analysis of u18 vax uptake with cases and IMD deciles\r\n\r\ncombined <- vaxdata_MSOA %>% \r\n  merge(cases_MSOA) %>% \r\n  mutate(caserate=cases*100000/allpop)\r\n\r\nagg_tiff(\"Outputs/COVIDVaxU18xCasesxIMDBW.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(combined %>% filter(age==\"12-17\"), aes(x=caserate, y=vaxprop))+\r\n  geom_point(alpha=0.6)+\r\n  geom_smooth(method=\"lm\")+\r\n  scale_x_continuous(name=\"Cases per 100,000 in the past week\")+\r\n  scale_y_continuous(name=\"Proportion of 12-17 year-olds vaccinated\", labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  labs(title=\"Areas with higher cases have higher child vaccination rates\",\r\n       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)\",\r\n       caption=\"Data from NHS England, ONS and coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxU18xCasesxIMD.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(combined %>% filter(age==\"12-17\"), aes(x=caserate, y=vaxprop, colour=as.factor(decile)))+\r\n  geom_point(alpha=0.6)+\r\n  scale_x_continuous(name=\"Cases per 100,000 in the past week\")+\r\n  scale_y_continuous(name=\"Proportion of 12-17 year-olds vaccinated\", labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"Areas with higher cases are more affluent and have higher child vaccination rates\",\r\n       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)\",\r\n       caption=\"Data from NHS England, ONS and coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nmodel <- lm(caserate ~ vaxprop + decile, combined %>% filter(age==\"12-17\"))\r\n\r\naf <- anova(model)\r\nafss <- af$\"Sum Sq\"\r\nprint(cbind(af,PctExp=afss/sum(afss)*100))\r\n\r\n#COVID case rates *by age* and deprivation over time using ltla data\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ncases_age <- read.csv(temp) %>% \r\n  filter(!age %in% c(\"00_59\", \"60+\", \"unassigned\")) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  #filter(date<max(date)-days(3)) %>% \r\n  merge(IMD_LTLA, by.x=\"areaCode\", by.y=\"LAD17CD\") %>% \r\n  group_by(age, decile, date) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(caserate=cases*100000/pop, \r\n         caserate_roll=roll_mean(caserate, 7, align=\"center\", fill=NA),\r\n         age=gsub(\"_\", \"-\", age))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgexIMD.tiff\", units=\"in\", width=11, height=8, res=500)\r\nggplot(cases_age %>% filter(date>=as.Date(\"2021-05-01\")), \r\n       aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"Cases have risen in less deprived areas in schoolkids and their parents age group\",\r\n       subtitle=\"7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgexIMDv2.tiff\", units=\"in\", width=11, height=8, res=500)\r\nggplot(cases_age %>% filter(date>=as.Date(\"2021-05-01\")), \r\n       aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  labs(title=\"Cases have risen in less deprived areas in schoolkids and their parents age group\",\r\n       subtitle=\"7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgexIMDU20.tiff\", units=\"in\", width=11, height=6, res=500)\r\nggplot(cases_age %>% filter(date>=as.Date(\"2021-05-01\") & age %in% c(\"05-09\", \"10-14\", \"15-19\")), \r\n       aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"Recent peaks in COVID cases in children have been in less deprived areas\",\r\n       subtitle=\"7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgexIMD2039.tiff\", units=\"in\", width=11, height=6, res=500)\r\nggplot(cases_age %>% filter(date>=as.Date(\"2021-05-01\") & \r\n                              age %in% c(\"20-24\", \"25-29\", \"30-34\", \"35-39\")), \r\n       aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic gradient in 20-39 year olds has been more stable\",\r\n       subtitle=\"7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgexIMD4059.tiff\", units=\"in\", width=11, height=6, res=500)\r\nggplot(cases_age %>% filter(date>=as.Date(\"2021-05-01\") & \r\n                              age %in% c(\"40-44\", \"45-49\", \"50-54\", \"55-59\")), \r\n       aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic gradient in 40-59 year olds has reversed\",\r\n       subtitle=\"7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgexIMD6079.tiff\", units=\"in\", width=11, height=6, res=500)\r\nggplot(cases_age %>% filter(date>=as.Date(\"2021-05-01\") & \r\n                              age %in% c(\"60-64\", \"65-69\", \"70-74\", \"75-79\")), \r\n       aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic gradient in 60-79 year olds has reversed\",\r\n       subtitle=\"7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgexIMD80Plus.tiff\", units=\"in\", width=11, height=6, res=500)\r\nggplot(cases_age %>% filter(date>=as.Date(\"2021-05-01\") & \r\n                              age %in% c(\"80-84\", \"85-89\", \"90+\")), \r\n       aes(x=date, y=caserate_roll, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic gradient in 80+ year olds has reversed\",\r\n       subtitle=\"7-day rolling average rate of new COVID cases by age and IMD decile, based on average deprivation across each Local Authority\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Cases x age\r\nagedata <- cases_age %>% \r\n  group_by(age, date) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  mutate(cases_roll=roll_mean(cases, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup() %>% \r\n  mutate(caserate=cases*100000/pop)\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeProportion.tiff\", units=\"in\", width=11, height=6, res=500)\r\nggplot(agedata %>% filter(date>as.Date(\"2020-03-01\")), aes(x=date, y=cases_roll, fill=age))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The shifting age dynamics of the pandemic\",\r\n       subtitle=\"Proportion of confirmed COVID-19 cases (based on a 7-day rolling average) in England by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesLTLAPhasePlot.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(sf)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\nlibrary(readxl)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ggrepel)\r\nlibrary(gganimate)\r\nlibrary(lubridate)\r\n\r\n#Start with LA level cases for the whole of the UK\r\ncases <- tempfile()\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\ncases <- curl_download(url=url, destfile=cases, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(areaName) %>% \r\n  arrange(date) %>% \r\n  rename(caserate=newCasesBySpecimenDateRollingRate) %>% \r\n  mutate(change=caserate-lag(caserate,7)) %>% \r\n  ungroup() %>% \r\n  rename(\"Lacode\"=\"areaCode\")\r\n  \r\nmaxdate <- max(casedata$date)\r\n\r\n#Bring in region\r\ntemp <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLADtoRegion <- read.csv(temp)[,c(1,4)]\r\ncolnames(LADtoRegion) <- c(\"LTLA\", \"Region\")\r\n\r\ncasedata <- casedata %>% \r\n  merge(LADtoRegion, all.x=TRUE, by.x=\"Lacode\", by.y=\"LTLA\") %>% \r\n  mutate(Region=case_when(\r\n    Lacode %in% c(\"E07000244\", \"E07000245\") ~ \"East of England\",\r\n    Lacode %in% c(\"E06000058\", \"E06000059\", \"E07000246\") ~ \"South West\",\r\n    substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n    substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n    substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\",\r\n    TRUE ~ Region),\r\n    Country=case_when(\r\n      substr(Lacode, 1, 1) == \"E\" ~ \"England\",\r\n      substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n      substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n      substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\"))\r\n\r\n#Bring in LA populations\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D435\", col_names=TRUE)\r\ncolnames(LApop) <- c(\"code\", \"name\", \"geography\", \"pop\")\r\n\r\n#Merge isles of Scilly in with Cornwall\r\nLApop$code <- if_else(LApop$code==\"E06000053\", \"E06000052\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"Isles of Scilly\", \"Cornwall\", LApop$name)\r\n\r\n#Merge City of London & Hackney\r\nLApop$code <- if_else(LApop$code==\"E09000001\", \"E09000012\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"City of London\", \"Hackney and City of London\", LApop$name)\r\nLApop$name <- if_else(LApop$name==\"Hackney\", \"Hackney and City of London\", LApop$name)\r\n\r\nLApop <- LApop %>% \r\n  group_by(name, code) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\nplotdata <- casedata %>% \r\n  merge(LApop, by.x=\"Lacode\", by.y=\"code\" , all.x=TRUE) %>% \r\n  mutate(dayssince=as.integer(maxdate-date)) %>% \r\n  arrange(date)\r\n\r\nagg_tiff(\"Outputs/COVIDCasesLTLAChangeScatter.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot(plotdata %>% filter(date==maxdate), aes(x=caserate, y=change, fill=Country))+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_point(aes(size=pop), shape=21, alpha=0.7)+\r\n  geom_text_repel(aes(label=areaName), size=rel(2.3), box.padding=0.3)+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"Recent COVID outbreaks are currently contained to a few areas\",\r\n       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 \",\r\n       maxdate),\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nplot <- ggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdata %>% filter(date>=maxdate-days(7)), \r\n            aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),\r\n            colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdata %>% filter(date==maxdate),\r\n            aes(x=caserate, y=change, fill=Country, size=pop), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdata %>% filter(date==maxdate), \r\n                  aes(x=caserate, y=change, label=areaName), size=rel(2.3))+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        legend.text = element_text(face=\"bold\", size=rel(1)))+\r\n  guides(fill=guide_legend(override.aes=list(size=3)))+\r\n  labs(title=\"Heading in the wrong direction\",\r\n       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 \",\r\n                       maxdate),\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDCasesLTLAChangeScatterPaths.tiff\", units=\"in\", width=9, height=7, res=800)\r\nplot\r\ndev.off()\r\n\r\n#Regional version\r\nregplot <- ggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdata %>% filter(date>=maxdate-days(7) & Country==\"England\"), \r\n            aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),\r\n            colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdata %>% filter(date==maxdate & Country==\"England\"),\r\n             aes(x=caserate, y=change, fill=Region, size=pop), shape=21, alpha=0.7,\r\n             show.legend=FALSE)+\r\n  geom_text_repel(data=plotdata %>% filter(date==maxdate & Country==\"England\"), \r\n                  aes(x=caserate, y=change, label=areaName), size=rel(2.3))+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  facet_wrap(~Region)+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        legend.text = element_text(face=\"bold\", size=rel(1)),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  guides(fill=guide_legend(override.aes=list(size=3)))+\r\n  labs(title=\"The explosion in COVID cases is slowing down everywhere\",\r\n       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 \",\r\n                       maxdate),\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDCasesLTLAChangeScatterPathsxRegion.tiff\", units=\"in\", width=10, height=10, res=500)\r\nregplot\r\ndev.off()\r\n\r\n#Free scales version\r\nregplot <- ggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdata %>% filter(date>=maxdate-days(7) & Country==\"England\"), \r\n            aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),\r\n            colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdata %>% filter(date==maxdate & Country==\"England\"),\r\n             aes(x=caserate, y=change, fill=Region, size=pop), shape=21, alpha=0.7,\r\n             show.legend=FALSE)+\r\n  geom_text_repel(data=plotdata %>% filter(date==maxdate & Country==\"England\"), \r\n                  aes(x=caserate, y=change, label=areaName), size=rel(2.3))+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  facet_wrap(~Region, scales=\"free\")+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        legend.text = element_text(face=\"bold\", size=rel(1)),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  guides(fill=guide_legend(override.aes=list(size=3)))+\r\n  labs(title=\"COVID case rates are threatening to take off away from London/the South East\",\r\n       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 \",\r\n                       maxdate),\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDCasesLTLAChangeScatterPathsxRegionv2.tiff\", units=\"in\", width=10, height=10, res=500)\r\nregplot\r\ndev.off()\r\n\r\n#Whole region/nation version (i.e. one dot per region)\r\nplotdatareg <- plotdata %>% \r\n  mutate(cases=caserate*pop/100000, change=change*pop/100000) %>% \r\n  group_by(Region, date, dayssince) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  mutate(caserate=cases*100000/pop) %>% \r\n  ungroup() %>% \r\n  group_by(Region) %>% \r\n  mutate(change=caserate-lag(caserate,7)) %>% \r\n  ungroup() %>% \r\n  mutate(Country=case_when(\r\n    Region==\"Scotland\" ~ \"Scotland\",\r\n    Region==\"Wales\" ~ \"Wales\",\r\n    Region==\"Northern Ireland\" ~ \"Northern Ireland\",\r\n    TRUE ~ \"England\"))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesRegionChangeScatter.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdatareg %>% filter(date>=maxdate-days(30)), \r\n            aes(x=caserate, y=change, group=Region, alpha=30-dayssince),\r\n            colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdatareg %>% filter(date==maxdate),\r\n             aes(x=caserate, y=change, size=pop), fill=\"White\", shape=21)+\r\n  geom_point(data=plotdatareg %>% filter(date==maxdate),\r\n             aes(x=caserate, y=change, fill=Country, size=pop), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdatareg %>% filter(date==maxdate), \r\n                  aes(x=caserate, y=change, label=Region), size=rel(2.3))+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"Case numbers are rising again\",\r\n       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 \",\r\n                       maxdate),\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Whole region/nation version (i.e. one dot per region)\r\nplotdatanat <- plotdata %>% \r\n  mutate(cases=caserate*pop/100000, change=change*pop/100000,\r\n         Country=case_when(\r\n           Region==\"Scotland\" ~ \"Scotland\",\r\n           Region==\"Wales\" ~ \"Wales\",\r\n           Region==\"Northern Ireland\" ~ \"Northern Ireland\",\r\n           TRUE ~ \"England\")) %>% \r\n  group_by(Country, date, dayssince) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  mutate(caserate=cases*100000/pop) %>% \r\n  ungroup() %>% \r\n  group_by(Country) %>% \r\n  mutate(change=caserate-lag(caserate,7)) %>% \r\n  ungroup() \r\n\r\nagg_tiff(\"Outputs/COVIDCasesNationChangeScatter.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_path(data=plotdatanat %>% filter(date>=maxdate-days(182)), \r\n            aes(x=caserate, y=change, colour=Country, alpha=182-dayssince),\r\n            show.legend=FALSE)+\r\n  geom_point(data=plotdatanat %>% filter(date==maxdate),\r\n             aes(x=caserate, y=change, size=pop), fill=\"White\", shape=21)+\r\n  geom_point(data=plotdatanat %>% filter(date==maxdate),\r\n             aes(x=caserate, y=change, fill=Country, size=pop), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdatanat %>% filter(date==maxdate), \r\n                  aes(x=caserate, y=change, label=Country), size=rel(2.3))+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"Case numbers are rising again\",\r\n       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 \",\r\n                       maxdate),\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\n#Animated version (to be honest, this needs tweaking, it looks pretty rubbish with\r\n#these settings)\r\nanim <- ggplot(plotdata %>% filter(date>=as.Date(\"2021-04-19\")), \r\n               aes(x=caserate, y=change, fill=Country))+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_point(aes(size=pop), shape=21, alpha=0.7)+\r\n  geom_text_repel(aes(label=areaName), size=rel(2.3), box.padding=0.3)+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"),\r\n        legend.position = \"top\", plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"Recent COVID outbreaks are currently contained to a few areas\",\r\n       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}\",\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")+\r\n  transition_states(date, transition_length=1, state_length=1)\r\n\r\nanimate(anim, units=\"in\", width=8, height=8*4/5, res=500, \r\n        renderer=gifski_renderer(\"Outputs/COVIDCasesPhasePlotAnim.gif\"), \r\n        device=\"ragg_png\", end_pause=5, duration=10, fps=10)\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesOctHalfTerm.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(curl)\r\nlibrary(arrow)\r\nlibrary(tidyverse)\r\nlibrary(RcppRoll)\r\nlibrary(ggtext)\r\nlibrary(ragg)\r\n\r\noptions(scipen=10000)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Download case data by age and UTLA\r\ntemp <- tempfile()\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read_csv_arrow(temp) %>% \r\n  select(c(1:6)) %>% \r\n  filter(age!=\"unassigned\") %>% \r\n  mutate(age=case_when(\r\n    age==\"00_04\" ~ \"0_4\",\r\n    age==\"05_09\" ~ \"5-9\",\r\n    TRUE ~ age),\r\n    age = age %>% str_replace(\"_\", \"-\") %>%\r\n      factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\r\n                      \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                      \"40-44\", \"45-49\", \"50-54\", \"55-59\", \r\n                      \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                      \"80-84\", \"85-89\", \"90+\"))) %>% \r\n  #Remove two bonus age categories that we don't need (0-59 and 60+)\r\n  filter(!is.na(age)) %>% \r\n  #Sort out Buckinghamsire (as 4 separate LTLAs in the data, but pop data only available for Bucks)\r\n  mutate(Code=case_when(\r\n    areaCode %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\") ~ \"E06000060\",\r\n    TRUE ~ as.character(areaCode)),\r\n  areaName=case_when(\r\n    Code==\"E06000060\" ~ \"Buckinghamshire\",\r\n    TRUE ~ as.character(areaName)),\r\n  areaType=case_when(\r\n    Code==\"E06000060\" ~ \"ltla\",\r\n    TRUE ~ as.character(areaType)),\r\n  date=as.Date(date)) %>% \r\n  group_by(Code, areaName, areaType, date, age) %>% \r\n  mutate(cases=sum(cases)) %>% \r\n  ungroup()\r\n\r\n#Bring in populations\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2020geography.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- read_excel(temp, sheet=\"MYE2 - Persons\", range=\"A8:CQ434\")\r\n\r\n#Align age bands\r\npop <- pop %>% \r\n  gather(age.sgl, pop, c(5:95)) %>% \r\n  mutate(age.sgl=as.numeric(gsub(\"\\\\+\", \"\", age.sgl)),\r\n         age=case_when(\r\n           age.sgl<5 ~ \"0-4\",\r\n           age.sgl<10 ~ \"5-9\",\r\n           age.sgl<15 ~ \"10-14\",\r\n           age.sgl<20 ~ \"15-19\",\r\n           age.sgl<25 ~ \"20-24\",\r\n           age.sgl<30 ~ \"25-29\",\r\n           age.sgl<35 ~ \"30-34\",\r\n           age.sgl<40 ~ \"35-39\",\r\n           age.sgl<45 ~ \"40-44\",\r\n           age.sgl<50 ~ \"45-49\",\r\n           age.sgl<55 ~ \"50-54\",\r\n           age.sgl<60 ~ \"55-59\",\r\n           age.sgl<65 ~ \"60-64\",\r\n           age.sgl<70 ~ \"65-69\",\r\n           age.sgl<75 ~ \"70-74\",\r\n           age.sgl<80 ~ \"75-79\",\r\n           age.sgl<85 ~ \"80-84\",\r\n           age.sgl<90 ~ \"85-89\",\r\n           TRUE ~ \"90+\") %>% \r\n           factor(levels = levels(data$age))) %>% \r\n  #And sort out Buckinghamshire codes\r\n  mutate(Code=case_when(\r\n    Code %in% c(\"E07000005\", \"E07000006\", \"E07000007\", \"E07000004\") ~ \"E06000060\",\r\n    TRUE ~ Code\r\n  )) %>% \r\n  group_by(age, Code) %>%\r\n  summarise(pop=sum(pop))\r\n\r\n#Merge into case data\r\ndata <- data %>% \r\n  left_join(pop, by=c(\"Code\", \"age\")) %>% \r\n  arrange(date) \r\n\r\n#Pick out Leicestershire vs rest of E Mids vs rest of England\r\nplotdata <- data %>% \r\n  filter(date>as.Date(\"2021-10-01\")) %>% \r\n  mutate(Region=case_when(\r\n    areaName %in% c(\"Blaby\", \"Charnwood\", \"Harborough\", \"Hinckley and Bosworth\", \"Melton\",\r\n                    \"North West Leicestershire\", \"Oadby and Wigston\", \"Leicester\") ~ \"Leicestershire\",\r\n    areaName %in% c(\"Ashfield\", \"Bassetlaw\", \"Broxtowe\", \"Gedling\", \"Mansfield\", \r\n                    \"Newark and Sherwood\", \"Rushcliffe\", \"Nottingham\") ~ \"Nottinghamshire\",\r\n    areaName %in% c(\"Kettering\", \"Corby\", \"East Northamptonshire\", \"Wellingborough\", \"Daventry\",\r\n                    \"Northampton\", \"South Northamptonshire\") ~ \"Northamptonshire\",\r\n    areaName %in% c(\"Amber Valley\", \"Erewash\", \"Bolsover\", \"Chesterfield\", \"North East Derbyshire\",\r\n                    \"High Peak\", \"Derbyshire Dales\", \"South Derbyshire\", \"Derby\") ~ \"Derbyshire\",\r\n    areaName %in% c(\"North Warwickshire\", \"Nuneaton and Bedworth\", \"Rugby\", \"Stratford\", \"Warwick\") ~\r\n      \"Warwickshire\",\r\n    TRUE ~ \"Rest of England\")) %>% \r\n  group_by(date, age, Region) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(age, Region) %>% \r\n  arrange(date) %>% \r\n  mutate(cases_roll=roll_mean(cases, 7, align=\"center\", fill=NA),\r\n         caserate_roll=cases_roll*100000/pop,\r\n         caserate=cases*100000/pop) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxHalfTerm1.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(plotdata %>% filter(age %in% c(\"5-9\", \"10-14\", \"15-19\", \"35-39\", \"40-44\", \"45-49\") &\r\n                             Region!=\"Rest of England\"), \r\n       aes(x=date, y=caserate, colour=Region))+\r\n  geom_rect(aes(xmin=as.Date(\"2021-10-25\"), xmax=as.Date(\"2021-10-29\"),\r\n                ymin=0, ymax=550), fill=\"Grey90\", colour=NA)+\r\n  geom_rect(aes(xmin=as.Date(\"2021-10-18\"), xmax=as.Date(\"2021-10-22\"),\r\n                ymin=0, ymax=550), fill=\"Deeppink\", colour=NA, alpha=0.002)+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"New cases per 100,000 per day\")+\r\n  scale_colour_manual(values=c(\"Grey60\", \"Deeppink\", \"Grey60\", \"Grey60\", \"Grey60\"))+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"COVID cases in <span style='color:Deeppink;'>Leicestershire</span> compared to <span style='color:Grey60;'>neighbouring counties\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nplotdata2 <- data %>% \r\n  filter(date>as.Date(\"2021-10-01\")) %>% \r\n  mutate(Region=case_when(\r\n    areaName %in% c(\"Blaby\", \"Charnwood\", \"Harborough\", \"Hinckley and Bosworth\", \"Melton\",\r\n                    \"North West Leicestershire\", \"Oadby and Wigston\", \"Leicester\") ~ \"Leicestershire\",\r\n    TRUE ~ \"Rest of England\")) %>% \r\n  group_by(date, age, Region) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(age, Region) %>% \r\n  arrange(date) %>% \r\n  mutate(cases_roll=roll_mean(cases, 7, align=\"center\", fill=NA),\r\n         caserate_roll=cases_roll*100000/pop,\r\n         caserate=cases*100000/pop) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxHalfTerm2.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(plotdata2 %>% filter(age %in% c(\"5-9\", \"10-14\", \"15-19\", \"35-39\", \"40-44\", \"45-49\")), \r\n       aes(x=date, y=caserate, colour=Region))+\r\n  geom_rect(aes(xmin=as.Date(\"2021-10-18\"), xmax=as.Date(\"2021-10-22\"),\r\n                ymin=0, ymax=400), fill=\"Deeppink\", colour=NA, alpha=0.005)+\r\n  geom_rect(aes(xmin=as.Date(\"2021-10-25\"), xmax=as.Date(\"2021-10-29\"),\r\n                ymin=0, ymax=400), fill=\"DodgerBlue\", colour=NA, alpha=0.005)+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"New cases per 100,000 per day\")+\r\n  scale_colour_manual(values=c(\"Deeppink\",\"DodgerBlue\"))+\r\n  facet_wrap(~age, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"COVID cases in <span style='color:Deeppink;'>Leicestershire</span> started rising *slightly* before <span style='color:DodgerBlue;'>the rest of England</span>\",\r\n       subtitle=\"Daily rate of new COVID cases in selected age bands. Coloured rectangles represent school half term dates.\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesPhasePlotHighights.R",
    "content": "#You need to make sure all these packages are installed on your machine\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\nlibrary(readxl)\r\nlibrary(ggrepel)\r\nlibrary(lubridate)\r\n\r\n#Define Local Authority/Authorities to highlight\r\nhighlightareas <- c(\"Barnsley\", \"Bradford\", \"Calderdale\", \"Doncaster\", \"Kirklees\", \"Leeds\", \"Craven\",\r\n                    \"Rotherham\", \"Sheffield\", \"Wakefield\", \"Richmondshire\", \"Hambleton\", \r\n                    \"York\", \"Selby\", \"Ryedale\", \"Scarborough\")\r\n\r\n#Pick title for areas for plot\r\nareaname <- \"Yorkshire\"\r\n\r\n#Define colour to pick out areas of interest\r\nhighlightcolour <- \"#FF4E86\"\r\n\r\n#Start with LA level cases for the whole of the UK from the dashboard\r\ncases <- tempfile()\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\ncases <- curl_download(url=url, destfile=cases, quiet=FALSE, mode=\"wb\")\r\n\r\n#Tidy up the data\r\ncasedata <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(areaName) %>% \r\n  arrange(date) %>% \r\n  rename(caserate=newCasesBySpecimenDateRollingRate) %>% \r\n  mutate(change=caserate-lag(caserate,7)) %>% \r\n  ungroup() %>% \r\n  rename(\"Lacode\"=\"areaCode\")\r\n\r\nmaxdate <- max(casedata$date)\r\n\r\n#Bring in region\r\ntemp <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLADtoRegion <- read.csv(temp)[,c(1,4)]\r\ncolnames(LADtoRegion) <- c(\"LTLA\", \"Region\")\r\n\r\ncasedata <- casedata %>% \r\n  merge(LADtoRegion, all.x=TRUE, by.x=\"Lacode\", by.y=\"LTLA\") %>% \r\n  mutate(Region=case_when(\r\n    Lacode %in% c(\"E07000244\", \"E07000245\") ~ \"East of England\",\r\n    Lacode %in% c(\"E06000058\", \"E06000059\", \"E07000246\") ~ \"South West\",\r\n    substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n    substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n    substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\",\r\n    TRUE ~ Region),\r\n    Country=case_when(\r\n      substr(Lacode, 1, 1) == \"E\" ~ \"England\",\r\n      substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n      substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n      substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\"))\r\n\r\n#Bring in LA populations (this is only 2019 mid-year estimates, but we're only using them for a \r\n#general sense of LA sizes, so the precise numbers aren't totally critical)\r\n#If anyone wants to rewrite this for to 2020 populations then be my guest!\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D435\", col_names=TRUE)\r\ncolnames(LApop) <- c(\"code\", \"name\", \"geography\", \"pop\")\r\n\r\n#Merge isles of Scilly in with Cornwall\r\nLApop$code <- if_else(LApop$code==\"E06000053\", \"E06000052\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"Isles of Scilly\", \"Cornwall\", LApop$name)\r\n\r\n#Merge City of London & Hackney\r\nLApop$code <- if_else(LApop$code==\"E09000001\", \"E09000012\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"City of London\", \"Hackney and City of London\", LApop$name)\r\nLApop$name <- if_else(LApop$name==\"Hackney\", \"Hackney and City of London\", LApop$name)\r\n\r\nLApop <- LApop %>% \r\n  group_by(name, code) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\n#Merge populations into case data\r\nplotdata <- casedata %>% \r\n  merge(LApop, by.x=\"Lacode\", by.y=\"code\" , all.x=TRUE) %>% \r\n  mutate(dayssince=as.integer(maxdate-date)) %>% \r\n  arrange(date) %>% \r\n  #Add flag to pick out Local Authorities of interest\r\n  mutate(highlight=if_else(areaName %in% highlightareas, 1, 0))\r\n\r\n#Create plot\r\nplot <- ggplot()+\r\n  #Draw axes\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  #Draw all LA paths\r\n  geom_path(data=plotdata %>% filter(date>=maxdate-days(7)), \r\n            aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),\r\n            colour=\"Grey70\", show.legend=FALSE)+\r\n  #Draw all LA points\r\n  geom_point(data=plotdata %>% filter(date==maxdate),\r\n             aes(x=caserate, y=change, size=pop), shape=21, alpha=0.5, colour=\"Grey50\", fill=\"Grey70\")+\r\n  #Draw highlighted area paths\r\n  geom_path(data=plotdata %>% filter(date>=maxdate-days(7) & highlight==1), \r\n            aes(x=caserate, y=change, group=areaName, alpha=7-dayssince),\r\n            colour=\"Black\", show.legend=FALSE)+\r\n  #Draw highlighted area points\r\n  geom_point(data=plotdata %>% filter(date==maxdate & highlight==1),\r\n             aes(x=caserate, y=change, size=pop), shape=21, alpha=0.9, colour=\"Black\", fill=highlightcolour)+\r\n  #Label highlighted areas\r\n  geom_text_repel(data=plotdata %>% filter(date==maxdate & highlight==1), \r\n                  aes(x=caserate, y=change, label=areaName), size=rel(2.3))+\r\n  scale_x_continuous(name=\"New cases in the past week\\n(rate per 100,000)\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Change in case rate compared to the preceding week\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Trajectories of new COVID cases\",\r\n       subtitle=paste0(\"COVID case rates and how these have changed in the past week in <span style='color:\", highlightcolour, \r\n                       \";'>\", areaname, \"</span> compared to<br>other UK Local Authorities. Bubbles are sized by population. Trails represent each area's movement in the past week.<br>Data up to \",\r\n                       maxdate),\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS\\nPlot by @VictimOfMaths\")\r\n\r\n#Write the plot out to the working directory\r\n#You can choose either a .tiff or a .png by commenting out the one you don't want in these two lines:\r\nagg_tiff(\"COVIDCasesPhasePlotHighlights.tiff\", units=\"in\", width=9, height=7, res=800)\r\n#agg_png(\"COVIDCasesPhasePlotHighlights.png\", units=\"in\", width=9, height=7, res=800)\r\nplot\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesSGTFNew.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(RcppRoll)\r\nlibrary(readODS)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(scales)\r\n\r\noptions(scipen=99999)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Read in case data by variant from UKHSA https://www.gov.uk/government/publications/covid-19-variants-genomically-confirmed-case-numbers\r\ntemp <- tempfile()\r\nurl <- (\"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\")\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nseqdata <- read_ods(temp, sheet=\"Fig4\", range=\"A3:H2418\") %>% \r\n  mutate(specimen_date=as.Date(specimen_date, format=\"%d/%m/%Y\"),\r\n         Variant=case_when(\r\n           specimen_date<as.Date(\"2022-01-10\") & sgtf==\"SGTP\" ~ \"Delta\",\r\n           specimen_date>=as.Date(\"2022-01-10\") & sgtf==\"SGTP\" ~ \"BA.2\",\r\n           sgtf==\"SGTF\" ~ \"BA.1\"),\r\n         Variant=factor(Variant, levels=c(\"Delta\", \"BA.1\", \"BA.2\")))\r\n\r\nggplot(seqdata, aes(x=specimen_date, y=percent/100, fill=Variant))+\r\n  geom_area()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases sequenced\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"unikn::pal_unikn_pref\")+\r\n  facet_wrap(~UKHSA_region)+\r\n  theme_custom()\r\n\r\n#Bring in case data\r\ntemp2 <- tempfile()\r\nurl2 <- (\"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDate&format=csv\")\r\ntemp2 <- curl_download(url=url2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read.csv(temp2) %>% \r\n  select(2,4,5) %>% \r\n  set_names(\"UKHSA_region\", \"specimen_date\", \"Cases\") %>% \r\n  mutate(specimen_date=as.Date(specimen_date),\r\n         cases_roll=roll_mean(Cases, n=7, align=\"center\", fill=NA))\r\n\r\ndata <- merge(seqdata, casedata) %>% \r\n  mutate(seqCases=percent*cases_roll/100)\r\n\r\nnatdata <- data %>% \r\n  group_by(specimen_date, Variant) %>% \r\n  summarise(seqCases=sum(seqCases)) %>% \r\n  ungroup()\r\n\r\nggplot(data, aes(x=specimen_date, y=seqCases, fill=Variant))+\r\n  geom_area(position=\"identity\", alpha=0.6)+\r\n  scale_y_continuous(name=\"Estimated total cases per day\")+\r\n  scale_fill_manual(values=c(\"#4AB2B8\", \"#F6871F\", \"#ED1C24\"), name=\"\")+\r\n  scale_colour_manual(values=c(\"#4AB2B8\", \"#F6871F\", \"#ED1C24\"), name=\"\")+\r\n  facet_wrap(~UKHSA_region)+\r\n  theme_custom()+\r\n  labs()\r\n\r\nagg_png(\"Outputs/COVIDSGTFCases.png\", units=\"in\", width=8, height=6, res=800)\r\nggplot(natdata, aes(x=specimen_date, y=seqCases, fill=Variant, colour=Variant))+\r\n  geom_area(position=\"identity\", alpha=0.6)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Estimated total cases per day\")+\r\n  scale_fill_manual(values=c(\"#4AB2B8\", \"#F6871F\", \"#ED1C24\"), name=\"\")+\r\n  scale_colour_manual(values=c(\"#4AB2B8\", \"#F6871F\", \"#ED1C24\"), name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"BA.2's rise to dominance has been slower than BA.1's\",\r\n       subtitle=\"Estimated number of daily cases by variant, based on confirmed case data apportioned between variants\\nusing SGTF data up to 22nd March\",\r\n       caption=\"Data from TaqPath/UKHSA | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDSGTFCasesProp.png\", units=\"in\", width=8, height=6, res=800)\r\nggplot(natdata, aes(x=specimen_date, y=seqCases, fill=Variant, colour=Variant))+\r\n  geom_area(position=\"fill\", alpha=0.6)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of sequenced cases\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#4AB2B8\", \"#F6871F\", \"#ED1C24\"), name=\"\")+\r\n  scale_colour_manual(values=c(\"#4AB2B8\", \"#F6871F\", \"#ED1C24\"), name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"BA.2's rise to dominance has been slower than BA.1's\",\r\n       subtitle=\"Proportion of daily cases sequenced in England by variant, based on SGTF data up to 22nd March\",\r\n       caption=\"Data from TaqPath/UKHSA | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesSince100k.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(ggrepel)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingRate&metric=newCasesBySpecimenDateRollingSum&format=csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdata <- read.csv(temp) %>% \r\n  rename(casesum=newCasesBySpecimenDateRollingSum, caserate=newCasesBySpecimenDateRollingRate) %>% \r\n  mutate(date=as.Date(date), country=case_when(\r\n    substr(areaCode, 1, 1)==\"E\" ~ \"England\",\r\n    substr(areaCode, 1, 1)==\"S\" ~ \"Scotland\",\r\n    substr(areaCode, 1, 1)==\"W\" ~ \"Wales\",\r\n    substr(areaCode, 1, 1)==\"N\" ~ \"Northern Ireland\"),\r\n    pop=casesum*100000/caserate)\r\n\r\n#Pick out date cases first exceeded 100/100,000 in 7-day period since 1st May\r\ndata <- rawdata %>%\r\n  merge(rawdata %>% \r\n          group_by(areaName, areaCode) %>% \r\n          filter(date>as.Date(\"2021-05-01\") & caserate>100) %>% \r\n          summarise(startdate=min(date)) %>% \r\n          ungroup() %>% \r\n          select(areaCode, startdate), by=\"areaCode\", all.x=TRUE) %>% \r\n  mutate(dayssince=as.integer(if_else(date-startdate>=0, date-startdate, NA_real_)))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesSince100k.tiff\", units=\"in\", width=9, height=7, res=800)\r\nggplot()+\r\n  geom_line(data=data %>% filter(dayssince>=0), aes(x=dayssince, y=caserate, group=areaName), colour=\"Grey80\")+\r\n  geom_line(data=data %>% filter(dayssince>=0 & areaName %in% c(\"Bolton\", \"Blackburn with Darwen\")), \r\n            aes(x=dayssince, y=caserate, group=areaName), colour=\"Black\")+\r\n  geom_point(data=data %>% filter(date==max(date)), \r\n             aes(x=dayssince, y=caserate, fill=country, size=pop),\r\n             shape=21, alpha=0.7)+\r\n  geom_text_repel(data=data %>% filter(date==max(date)),\r\n                  aes(x=dayssince, y=caserate, label=areaName), size=rel(2.3),\r\n                  box.padding=0.5)+\r\n  scale_x_continuous(name=\"Days since cases first passed 100/100,000\")+\r\n  scale_y_continuous(name=\"Weekly cases per 100,000 people\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"Local Delta variant outbreaks seem to follow different trajectories\",\r\n       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 \",\r\n                       max(data$date), \". Bubbles are sized by area population.\"), \r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesSince100kxTime.tiff\",  units=\"in\", width=9, height=7, res=800)\r\nggplot()+\r\n  geom_line(data=data %>% filter(dayssince>=0), aes(x=date, y=caserate, group=areaName), colour=\"Grey80\")+\r\n  geom_line(data=data %>% filter(dayssince>=0 & areaName %in% c(\"Bolton\", \"Blackburn with Darwen\")), \r\n            aes(x=date, y=caserate, group=areaName, colour=areaName))+\r\n  #geom_point(data=data %>% filter(date==max(date)), \r\n  #           aes(x=date, y=caserate, fill=country, size=pop),\r\n  #           shape=21, alpha=0.7)+\r\n  #geom_text_repel(data=data %>% filter(date==max(date)),\r\n  #                aes(x=date, y=caserate, label=areaName), size=rel(2.3),\r\n  #                box.padding=0.5)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Weekly cases per 100,000 people\")+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"The Delta wave in Bolton and Blackburn is far from over\",\r\n       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 \",\r\n                       max(data$date)), \r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesVaxxIMD.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(RcppRoll)\r\nlibrary(readxl)\r\nlibrary(gtools)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(scales)\r\nlibrary(forcats)\r\n\r\noptions(scipen=99999)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Start by calculating IMD at MSOA level\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE) %>% \r\n  select(c(1,2,5,6)) %>% \r\n  set_names(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, LAD17CD) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:G34758\", col_names=FALSE) %>% \r\n  select(-c(2:6)) %>% \r\n  set_names(\"LSOA11CD\", \"pop\")\r\n\r\npop_full <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:CT34758\", col_names=FALSE) %>% \r\n  select(-c(2:7)) %>% \r\n  set_names(\"LSOA11CD\", c(0:90))\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD, LAD17CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))\r\n\r\nIMD_LTLA <- IMD %>% \r\n  mutate(LAD17CD=case_when(\r\n    LAD17CD %in% c(\"E07000049\", \"E07000050\", \"E07000051\", \"E07000052\", \"E07000053\") ~ \"E06000059\",\r\n    LAD17CD %in% c(\"E06000028\", \"E06000029\", \"E07000048\") ~ \"E06000058\",\r\n    LAD17CD %in% c(\"E07000201\", \"E07000204\") ~ \"E07000245\",\r\n    LAD17CD %in% c(\"E07000205\", \"E07000206\") ~ \"E07000244\",\r\n    LAD17CD %in% c(\"E07000190\", \"E07000191\") ~ \"E07000246\",\r\n    TRUE ~ LAD17CD)) %>% \r\n  group_by(LAD17CD)%>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))\r\n\r\npop_LTLA <- pop_full %>% \r\n  gather(age, pop, c(2:ncol(.))) %>% \r\n  mutate(age=case_when(\r\n    age<5 ~ \"00_04\", age<10 ~ \"05_09\", age<15 ~ \"10_14\", age<20 ~ \"15_19\", age<25 ~ \"20_24\",\r\n    age<30 ~ \"25_29\", age<35 ~ \"30_34\", age<40 ~ \"35_39\", age<45 ~ \"40_44\", age<50 ~ \"45_49\",\r\n    age<55 ~ \"50_54\", age<60 ~ \"55_59\", age<65 ~ \"60_64\", age<70 ~ \"65_69\", age<75 ~ \"70_74\",\r\n    age<80 ~ \"75_79\", age<85 ~ \"80_84\", age<90 ~ \"85_89\", TRUE ~ \"90+\")) %>% \r\n  group_by(age, LSOA11CD) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  merge(lookup) %>% \r\n  mutate(LAD17CD=case_when(\r\n    LAD17CD %in% c(\"E07000049\", \"E07000050\", \"E07000051\", \"E07000052\", \"E07000053\") ~ \"E06000059\",\r\n    LAD17CD %in% c(\"E06000028\", \"E06000029\", \"E07000048\") ~ \"E06000058\",\r\n    LAD17CD %in% c(\"E07000201\", \"E07000204\") ~ \"E07000245\",\r\n    LAD17CD %in% c(\"E07000205\", \"E07000206\") ~ \"E07000244\",\r\n    LAD17CD %in% c(\"E07000190\", \"E07000191\") ~ \"E07000246\",\r\n    TRUE ~ LAD17CD)) %>% \r\n  group_by(age, LAD17CD) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\npop_LTLA_vax <- pop_full %>% \r\n  gather(age, pop, c(2:ncol(.))) %>% \r\n  mutate(age=case_when(\r\n    age<18 ~ \"Under18\", age<25 ~ \"18-24\", age<30 ~ \"25-29\", age<35 ~ \"30-34\", age<40 ~ \"35-39\", \r\n    age<45 ~ \"40-44\", age<50 ~ \"45-49\", age<55 ~ \"50-54\", age<60 ~ \"55-59\", age<65 ~ \"60-64\", \r\n    age<70 ~ \"65-69\", age<75 ~ \"70-74\", age<80 ~ \"75-79\", TRUE ~ \"80+\")) %>% \r\n  group_by(age, LSOA11CD) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  merge(lookup) %>% \r\n  mutate(LAD17CD=case_when(\r\n    LAD17CD %in% c(\"E07000049\", \"E07000050\", \"E07000051\", \"E07000052\", \"E07000053\") ~ \"E06000059\",\r\n    LAD17CD %in% c(\"E06000028\", \"E06000029\", \"E07000048\") ~ \"E06000058\",\r\n    LAD17CD %in% c(\"E07000201\", \"E07000204\") ~ \"E07000245\",\r\n    LAD17CD %in% c(\"E07000205\", \"E07000206\") ~ \"E07000244\",\r\n    LAD17CD %in% c(\"E07000190\", \"E07000191\") ~ \"E07000246\",\r\n    TRUE ~ LAD17CD)) %>% \r\n  group_by(age, LAD17CD) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\n\r\n#Bring in age-stratified cases by LTLA\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read.csv(temp) %>% \r\n  select(areaCode, areaName, date, age, cases) %>% \r\n  filter(!age %in% c(\"00_59\", \"60+\", \"unassigned\")) %>% \r\n  merge(pop_LTLA, by.x=c(\"age\", \"areaCode\"), by.y=c(\"age\", \"LAD17CD\")) %>% \r\n  merge(IMD_LTLA %>% select(-pop), by.x=\"areaCode\", by.y=\"LAD17CD\") %>% \r\n  mutate(date=as.Date(date), decile=as.factor(decile)) %>% \r\n  #collapse to IMD deciles\r\n  group_by(date, age, decile) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  #age-standardise\r\n  mutate(caserate=cases*100000/pop,\r\n         stdpop=case_when(\r\n           age %in% c(\"00_04\", \"70_74\") ~ 5000, \r\n           age %in% c(\"05_09\", \"10_14\", \"15_19\", \"65_69\") ~ 5500,\r\n           age %in% c(\"20_24\", \"25_29\", \"60_64\") ~ 6000,\r\n           age %in% c(\"30_34\", \"55_59\") ~ 6500,\r\n           age %in% c(\"35_39\", \"40_44\", \"45_49\", \"50_54\") ~ 7000,\r\n           age==\"75_79\" ~ 4000,\r\n           age==\"80_84\" ~ 2500,\r\n           age==\"85_89\" ~ 1500,\r\n           age==\"90+\" ~ 1000)) %>% \r\n  group_by(date, decile) %>% \r\n  arrange(date, decile) %>% \r\n  summarise(as_caserate=weighted.mean(caserate, stdpop)) %>% \r\n  ungroup() %>% \r\n  group_by(decile) %>% \r\n  mutate(as_caserate_roll=roll_mean(as_caserate, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n  \r\nagg_tiff(\"Outputs/COVIDCasesxIMDAS.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(casedata, aes(x=as.Date(date), y=as_caserate_roll, colour=decile))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Cases per 100,000 (age-standardised)\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxIMDASRecent.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(casedata %>% filter(date>as.Date(\"2021-06-01\")), \r\n       aes(x=as.Date(date), y=as_caserate_roll, colour=decile))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Cases per 100,000 (age-standardised)\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"Omicron has hit more deprived areas harder\",\r\n       subtitle=\"Rolling 7-day average rate of age-standardised new COVID cases by decile of the Index of Multiple Deprivation\",\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#LA-level age-standardised cases\r\ncasedata_LA <- read.csv(temp) %>% \r\n  select(areaCode, areaName, date, age, cases) %>% \r\n  filter(!age %in% c(\"00_59\", \"60+\", \"unassigned\")) %>% \r\n  merge(pop_LTLA, by.x=c(\"age\", \"areaCode\"), by.y=c(\"age\", \"LAD17CD\")) %>% \r\n  merge(IMD_LTLA %>% select(-pop), by.x=\"areaCode\", by.y=\"LAD17CD\") %>% \r\n  mutate(date=as.Date(date), decile=as.factor(decile)) %>% \r\n  #age-standardise\r\n  mutate(caserate=cases*100000/pop,\r\n         stdpop=case_when(\r\n           age %in% c(\"00_04\", \"70_74\") ~ 5000, \r\n           age %in% c(\"05_09\", \"10_14\", \"15_19\", \"65_69\") ~ 5500,\r\n           age %in% c(\"20_24\", \"25_29\", \"60_64\") ~ 6000,\r\n           age %in% c(\"30_34\", \"55_59\") ~ 6500,\r\n           age %in% c(\"35_39\", \"40_44\", \"45_49\", \"50_54\") ~ 7000,\r\n           age==\"75_79\" ~ 4000,\r\n           age==\"80_84\" ~ 2500,\r\n           age==\"85_89\" ~ 1500,\r\n           age==\"90+\" ~ 1000)) %>% \r\n  group_by(date, areaCode, areaName) %>% \r\n  arrange(date) %>% \r\n  summarise(as_caserate=weighted.mean(caserate, stdpop)) %>% \r\n  ungroup() %>% \r\n  group_by(areaName, areaCode) %>% \r\n  mutate(as_caserate_roll=roll_mean(as_caserate, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\n\r\n###############################\r\n#Calculate age-standardised vaccination rates by IMD\r\n\r\n#Download data from NHS England\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-weekly-announced-vaccinations-13-January-2022.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata_LA <- read_excel(temp, sheet=\"LTLA\", range=\"F15:AZ321\", col_names=FALSE) %>% \r\n  select(c(1:17, 19:32, 34:47)) %>% \r\n  set_names(\"LAD17CD\", \"areaName\", \"12-15_1st\", \"16-17_1st\", \"18-24_1st\", \"25-29_1st\", \"30-34_1st\", \r\n            \"35-39_1st\", \"40-44_1st\", \"45-49_1st\", \"50-54_1st\", \"55-59_1st\", \"60-64_1st\", \r\n            \"65-69_1st\", \"70-74_1st\", \"75-79_1st\", \"80+_1st\", \"Under18_2nd\", \"18-24_2nd\", \r\n            \"25-29_2nd\", \"30-34_2nd\", \"35-39_2nd\", \"40-44_2nd\", \"45-49_2nd\", \"50-54_2nd\", \r\n            \"55-59_2nd\", \"60-64_2nd\", \"65-69_2nd\", \"70-74_2nd\", \"75-79_2nd\", \"80+_2nd\", \r\n            \"Under18_3rd\", \"18-24_3rd\", \"25-29_3rd\", \"30-34_3rd\", \"35-39_3rd\",  \"40-44_3rd\", \r\n            \"45-49_3rd\", \"50-54_3rd\", \"55-59_3rd\", \"60-64_3rd\", \"65-69_3rd\", \"70-74_3rd\", \r\n            \"75-79_3rd\", \"80+_3rd\") %>% \r\n  mutate(`Under18_1st`=`12-15_1st`+`16-17_1st`) %>% \r\n  select(-c(\"12-15_1st\", \"16-17_1st\")) %>% \r\n  pivot_longer(cols=c(3:44), names_to=c(\"age\", \"dose\"), names_sep=\"_\", values_to=\"vaxxed\") %>% \r\n  merge(pop_LTLA_vax) %>% \r\n  mutate(vaxrate=vaxxed/pop,\r\n         stdpop=case_when(\r\n           age==\"Under18\" ~ 5000+5500+5500+5500*4/5,\r\n           age==\"18-24\" ~ 5500*4/5+6000,\r\n           age %in% c(\"25-29\", \"60-64\") ~ 6000,\r\n           age %in% c(\"30-34\", \"55-59\") ~ 6500,\r\n           age %in% c(\"35-39\", \"40-44\", \"45-49\", \"50-54\") ~ 7000,\r\n           age==\"65-69\" ~ 5500,\r\n           age==\"70-74\" ~ 5000,\r\n           age==\"75-79\" ~ 4000,\r\n           age==\"80+\" ~ 2500+1500+1000)) %>% \r\n  group_by(LAD17CD, dose) %>% \r\n  summarise(as_vaxrate=weighted.mean(vaxrate, stdpop)) %>% \r\n  ungroup() \r\n\r\nLAcasesxvax <- casedata_LA %>% \r\n  filter(date==max(date[!is.na(as_caserate_roll)])) %>% \r\n  merge(vaxdata_LA, by.x=\"areaCode\", by.y=\"LAD17CD\") %>% \r\n  merge(IMD_LTLA, by.x=\"areaCode\", by.y=\"LAD17CD\")\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxVaxIMDAS.tiff\", units=\"in\", width=12, height=6, res=800)\r\nggplot(LAcasesxvax, aes(x=as_vaxrate, y=as_caserate_roll, fill=as.factor(decile)))+\r\n  geom_point(shape=21)+\r\n  scale_y_continuous(name=\"Cases per 100,000 (age-standardised)\", limits=c(0,NA))+\r\n  scale_x_continuous(name=\"Age-standardised vaccination rate (two doses)\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                           labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                    \"10 - least deprived\"))+\r\n  facet_wrap(~dose)+\r\n  theme_custom()+\r\n  labs(title=\"Less deprived Local Authorities have higher vaccination rates, but more cases\",\r\n       subtitle=\"Rolling 7-day average age-standardised rate of new COVID cases and age-standardised vaccination rates for\\nEnglish Local Authorities\",\r\n       caption=\"Data from coronavirus.data.gov.uk, NHS England and ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxVaxIMDAS3rdDose.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(LAcasesxvax %>% filter(dose==\"3rd\"), \r\n       aes(x=as_vaxrate, y=as_caserate_roll, fill=as.factor(decile)))+\r\n  geom_point(shape=21)+\r\n  scale_y_continuous(name=\"Cases per 100,000 (age-standardised)\", limits=c(0,NA))+\r\n  scale_x_continuous(name=\"Age-standardised vaccination rate (two doses)\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"More deprived areas have lower booster coverage and more cases\",\r\n       subtitle=\"Rolling 7-day average age-standardised rate of new COVID cases and age-standardised 3rd dose/booster vaccination\\nrates for English Local Authorities\",\r\n       caption=\"Data from coronavirus.data.gov.uk, NHS England and ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesvsCFR.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(arrow)\r\nlibrary(readxl)\r\nlibrary(RcppRoll)\r\nlibrary(scales)\r\nlibrary(lubridate)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(ggrepel)\r\n\r\ntemp=tempfile()\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdata <- read_csv_arrow(temp) %>% \r\n  filter(!age %in% c(\"unassigned\", \"00_59\", \"60+\")) %>% \r\n  mutate(date=as.Date(date),\r\n         age=case_when(\r\n           age==\"00_04\" ~ \"0_4\",\r\n           age==\"05_09\" ~ \"5_9\",\r\n           TRUE ~ age),\r\n         age = age %>% str_replace(\"_\", \"-\") %>%\r\n           factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\r\n                           \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                           \"40-44\", \"45-49\", \"50-54\", \"55-59\", \r\n                           \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                           \"80-84\", \"85-89\", \"90+\"))) \r\n\r\n#Read in CFR data provided by Dan Howdon\r\nCFRdata <- read.csv(\"Data/cfrs_2021_06_16.csv\") %>% \r\n  mutate(age=case_when(\r\n    agegroup==0 ~ \"0-4\", agegroup==5 ~ \"5-9\", agegroup==10 ~ \"10-14\", agegroup==15 ~ \"15-19\",\r\n    agegroup==20 ~ \"20-24\", agegroup==25 ~ \"25-29\", agegroup==30 ~ \"30-34\", \r\n    agegroup==35 ~ \"35-39\", agegroup==40 ~ \"40-44\", agegroup==45 ~ \"45-49\", \r\n    agegroup==50 ~ \"50-54\", agegroup==55 ~ \"55-59\", agegroup==60 ~ \"60-64\", \r\n    agegroup==65 ~ \"65-69\", agegroup==70 ~ \"70-74\", agegroup==75 ~ \"75-79\",\r\n    agegroup==80 ~ \"80-84\", agegroup==85 ~ \"85-89\", TRUE ~ \"90+\"),\r\n    date=as.Date(date, format=\"%d/%m/%Y\"),\r\n    age = age %>% str_replace(\"_\", \"-\") %>%\r\n      factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\r\n                      \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                      \"40-44\", \"45-49\", \"50-54\", \"55-59\", \r\n                      \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                      \"80-84\", \"85-89\", \"90+\"))) \r\n\r\nagg_tiff(\"Outputs/COVIDCFRs.tiff\", units=\"in\", width=12, height=7, res=800)\r\nggplot(CFRdata %>% filter(date>as.Date(\"2020-06-01\")), aes(x=date, y=cfr_month, colour=age))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(labels=label_date(format=\"%b-%Y\"), name=\"\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=0.01), name=\"Case Fatality Rate\",\r\n                     limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"pals::stepped\")+\r\n  facet_wrap(~age, scales=\"free_y\", ncol=4)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position=\"plot\")+\r\n  labs(title=\"Case Fatality Rates for COVID have varied a lot over the past year\",\r\n       subtitle=\"Proportion of people testing positive for COVID who die (of any cause) within 28 days, by age group\",\r\n       caption=\"CFRs calculated by Daniel Howdon\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nggplot(CFRdata %>% filter(date>as.Date(\"2021-01-01\") & age %in% c(\"55-59\", \"60-64\",\r\n                                                                  \"65-69\", \"70-74\", \"75-79\",\r\n                                                                  \"80-84\", \"85-89\", \"90+\")), \r\n       aes(x=date, y=cfr_month, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(labels=label_date(format=\"%b-%Y\"), name=\"\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), name=\"Case Fatality Rate\",\r\n                     limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position=\"plot\")+\r\n  labs(title=\"Case Fatality Rates for COVID have varied a lot over the past year\",\r\n       subtitle=\"Proportion of people testing positive for COVID who die (of any cause) within 28 days, by age group\",\r\n       caption=\"CFRs calculated by Daniel Howdon\\nPlot by @VictimOfMaths\")\r\n\r\n#Index to CFR on 1st Jan\r\nCFR2 <- merge(CFRdata, CFRdata %>% \r\n  filter(date==as.Date(\"2021-01-01\")) %>% \r\n  select(age, cfr_month) %>% \r\n  rename(indexcfr=cfr_month), by=\"age\") %>% \r\n  mutate(indexed=cfr_month/indexcfr, percchance=(cfr_month-indexcfr)/indexcfr)\r\n\r\nagg_tiff(\"Outputs/COVIDCFRChanges.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot(CFR2 %>% filter(date>=as.Date(\"2021-01-01\") & age %in% c(\"55-59\", \"60-64\",\r\n                                                                  \"65-69\", \"70-74\", \"75-79\",\r\n                                                                  \"80-84\", \"85-89\", \"90+\")), \r\n       aes(x=date, y=percchance, colour=age))+\r\n  geom_hline(yintercept=0, colour=\"Grey70\", linetype=2)+\r\n  geom_line()+\r\n  scale_x_date(labels=label_date(format=\"%b-%Y\"), name=\"\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), name=\"Change in Case Fatality Rate\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position=\"plot\")+\r\n  labs(title=\"Case Fatality Rates for COVID have fallen in all age groups in 2021\",\r\n       subtitle=\"Change in age-specific Case Fatality Rates based on deaths within 28 days of a positive test since 1st January\",\r\n       caption=\"CFRs calculated by Daniel Howdon\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCFRChanges2.tiff\", units=\"in\", width=12, height=7, res=800)\r\nggplot(CFR2 %>% filter(date>=as.Date(\"2021-01-01\") & !age %in% c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\r\n                                                                 \"20-24\")), \r\n       aes(x=date, y=percchance, colour=age))+\r\n  geom_hline(yintercept=0, colour=\"Grey70\", linetype=2)+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(labels=label_date(format=\"%b\"), name=\"\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), name=\"Change in Case Fatality Rate\")+\r\n  #scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  facet_wrap(~age)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position=\"plot\")+\r\n  labs(title=\"Case Fatality Rates for COVID have fallen in all age groups in 2021\",\r\n       subtitle=\"Change in age-specific Case Fatality Rates based on deaths within 28 days of a positive test since 1st January\",\r\n       caption=\"CFRs calculated by Daniel Howdon\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nmaxCFRdate <- max(CFRdata$date[!is.na(CFRdata$cfr_month)])\r\n\r\n#Just extract the most recent monthly CFRs\r\nCFRs <- CFRdata %>% \r\n  filter(date==maxCFRdate) %>% \r\n  mutate(CFR=cfr_month*100) %>% \r\n  select(age, CFR)\r\n\r\n#Here are the latest age-specific CFRs:\r\n#CFRs <- tibble::tribble(\r\n#  ~age, ~CFR,\r\n#  \"0-4\",   0,\r\n#  \"5-9\",   0,\r\n#  \"10-14\", 0,\r\n#  \"15-19\", 0.02164,\r\n#  \"20-24\", 0,\r\n#  \"25-29\", 0,\r\n#  \"30-34\", 0,\r\n#  \"35-39\", 0.0242269,\r\n#  \"40-44\", 0.0289471,\r\n#  \"45-49\", 0.2123436,\r\n#  \"50-54\", 0.2208057,\r\n#  \"55-59\", 0.5648288,\r\n#  \"60-64\", 0.4692304,\r\n#  \"65-69\", 3.5336073,\r\n#  \"70-74\", 4.1047055,\r\n#  \"75-79\", 6.2152125,\r\n#  \"80-84\", 11.6088927,\r\n#  \"85-89\", 16.7702883,\r\n#  \"90+\",   22.6581156)\r\n\r\ndata <- merge(rawdata, CFRs) %>% \r\n  mutate(ex_deaths=cases*CFR/100) %>% \r\n  group_by(areaName, areaCode, date) %>% \r\n  summarise(ex_deaths=sum(ex_deaths), cases=sum(cases)) %>% \r\n  ungroup()\r\n\r\n#Bring in populations\r\n#Bring in LA populations\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D435\", col_names=TRUE)\r\ncolnames(LApop) <- c(\"areaCode\", \"name\", \"geography\", \"pop\")\r\n\r\n#Merge isles of Scilly in with Cornwall\r\nLApop$code <- if_else(LApop$areaCode==\"E06000053\", \"E06000052\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"Isles of Scilly\", \"Cornwall\", LApop$name)\r\n\r\n#Merge City of London & Hackney\r\nLApop$code <- if_else(LApop$areaCode==\"E09000001\", \"E09000012\", LApop$code)\r\nLApop$name <- if_else(LApop$name==\"City of London\", \"Hackney and City of London\", LApop$name)\r\nLApop$name <- if_else(LApop$name==\"Hackney\", \"Hackney and City of London\", LApop$name)\r\n\r\nLApop <- LApop %>% \r\n  group_by(name, areaCode) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\n#Bring in region\r\ntemp <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLADtoRegion <- read.csv(temp)[,c(1,4)]\r\ncolnames(LADtoRegion) <- c(\"LTLA\", \"Region\")\r\n\r\ndata <- data %>% \r\n  merge(LADtoRegion, all.x=TRUE, by.x=\"areaCode\", by.y=\"LTLA\") %>% \r\n  mutate(Region=case_when(\r\n    areaCode %in% c(\"E07000244\", \"E07000245\") ~ \"East of England\",\r\n    areaCode %in% c(\"E06000058\", \"E06000059\", \"E07000246\") ~ \"South West\",\r\n    TRUE ~ Region))\r\n\r\nplotdata <- data %>% \r\n  merge(LApop) %>% \r\n  mutate(caserate=cases*100000/pop,\r\n         deathspercase=ex_deaths/cases) %>% \r\n  #take rolling averages\r\n  group_by(areaCode, areaName) %>% \r\n  arrange(date) %>% \r\n  mutate(deathsroll=roll_mean(deathspercase, 7, align=\"center\", fill=NA),\r\n         casesroll=roll_mean(caserate, 7, align=\"center\", fill=NA),\r\n         flag=if_else(date %in% c(as.Date(\"2020-10-23\"), as.Date(\"2020-12-08\"),\r\n                                  as.Date(\"2020-04-10\"), as.Date(\"2021-01-06\"),\r\n                                  as.Date(\"2020-07-10\"), max(date)-days(3)), 1, 0),\r\n         ex_deathsroll=deathsroll*casesroll) %>% \r\n  ungroup()\r\n\r\nBoltonpop <- unique(plotdata$pop[plotdata$areaName==\"Bolton\"])\r\n\r\nagg_tiff(\"Outputs/COVIDCasevsMortPropBolton.tiff\", units=\"in\", width=8, height=8, res=800)\r\nggplot()+\r\n  geom_path(data=plotdata %>% filter(areaName==\"Bolton\"), \r\n            aes(x=deathsroll, y=casesroll, alpha=date), show.legend=FALSE, colour=\"Red4\")+\r\n  geom_point(data=plotdata %>% filter(areaName==\"Bolton\" & flag==1), \r\n            aes(x=deathsroll, y=casesroll), colour=\"Red4\")+\r\n  geom_text(data=plotdata %>% filter(areaName==\"Bolton\" & flag==1), \r\n             aes(x=deathsroll, y=casesroll, label=date %>% format(\"%d-%b-%y\")), colour=\"Grey30\",\r\n            hjust=-0.1, size=3)+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  scale_x_continuous(name=\"Proportion of cases expected to lead to death\",\r\n                     labels=label_percent(accuracy=1), \r\n                     limits=c(0,max(plotdata$deathsroll[plotdata$areaName==\"Bolton\"], \r\n                                    na.rm=TRUE)*1.05))+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.title.position = \"plot\")+\r\n  labs(title=\"Case rates in Bolton are high, but the younger age profile means we should\\nexpect far fewer deaths than in previous waves\",\r\n       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.\",\r\n       caption=\"Case data from coronavirus.data.gov.uk\\nCFRs estimated by Daniel Howden\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#version with countours\r\nagg_tiff(\"Outputs/COVIDCasevsMortPropBoltonIso.tiff\", units=\"in\", width=8, height=8, res=800)\r\nggplot()+\r\n  geom_line(data=plotdata, aes(x=deathsroll, y=0.25*100000/(Boltonpop*deathsroll)), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, aes(x=deathsroll, y=1*100000/(Boltonpop*deathsroll)), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, aes(x=deathsroll, y=2.5*100000/(Boltonpop*deathsroll)), colour=\"SkyBlue\")+\r\n  geom_path(data=plotdata %>% filter(areaName==\"Bolton\"), \r\n            aes(x=deathsroll, y=casesroll, colour=date), show.legend=FALSE)+\r\n  geom_point(data=plotdata %>% filter(areaName==\"Bolton\" & flag==1), \r\n             aes(x=deathsroll, y=casesroll), colour=\"Red4\")+\r\n  geom_text(data=plotdata %>% filter(areaName==\"Bolton\" & flag==1), \r\n            aes(x=deathsroll, y=casesroll, label=date %>% format(\"%d-%b-%y\")), colour=\"Grey30\",\r\n            hjust=-0.1, size=3)+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  scale_x_continuous(name=\"Proportion of cases expected to lead to death\",\r\n                     labels=label_percent(accuracy=1), \r\n                     limits=c(0,max(plotdata$deathsroll[plotdata$areaName==\"Bolton\"], \r\n                                    na.rm=TRUE)*1.05))+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\",\r\n                     limits=c(0,max(plotdata$casesroll[plotdata$areaName==\"Bolton\"], \r\n                                    na.rm=TRUE)*1.05))+\r\n  scale_colour_viridis_c(option=\"rocket\", direction=-1)+\r\n  annotate(\"text\", x=0.045, y=3.5, angle=-2, label=\"0.25 deaths/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.035, y=12, angle=-14, label=\"1 deaths/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.035, y=27, angle=-32, label=\"2.5 death/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.title.position = \"plot\")+\r\n  labs(title=\"Case rates in Bolton are high, but the younger age profile means we should\\nexpect far fewer deaths than in previous waves\",\r\n       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.\",\r\n       caption=\"Case data from coronavirus.data.gov.uk\\nCFRs estimated by Daniel Howden\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nLA <- \"Blackburn with Darwen\"\r\nLApop <- unique(plotdata$pop[plotdata$areaName==LA])\r\n\r\nview(plotdata %>% filter(areaName==LA))\r\n\r\nplotdata <- plotdata %>% \r\n  mutate(flag=if_else(date %in% c(as.Date(\"2021-01-05\"), as.Date(\"2020-10-05\"),\r\n                          #as.Date(\"2020-10-04\"), as.Date(\"2020-12-09\"),\r\n                          as.Date(\"2020-03-25\"), max(date)-days(4)), 1, 0))\r\n\r\nagg_tiff(paste0(\"Outputs/COVIDCasevsMortProp\", LA, \"Iso.tiff\"), units=\"in\", width=8, height=8, res=800)\r\nggplot()+\r\n  geom_line(data=plotdata, aes(x=deathsroll, y=0.25*100000/(LApop*deathsroll)), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, aes(x=deathsroll, y=1*100000/(LApop*deathsroll)), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, aes(x=deathsroll, y=2.5*100000/(LApop*deathsroll)), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, aes(x=deathsroll, y=5*100000/(LApop*deathsroll)), colour=\"SkyBlue\")+\r\n  geom_path(data=plotdata %>% filter(areaName==LA), \r\n            aes(x=deathsroll, y=casesroll, colour=date), show.legend=FALSE)+\r\n  geom_point(data=plotdata %>% filter(areaName==LA & flag==1), \r\n             aes(x=deathsroll, y=casesroll), colour=\"Red4\")+\r\n  geom_text(data=plotdata %>% filter(areaName==LA & flag==1), \r\n            aes(x=deathsroll, y=casesroll, label=date %>% format(\"%d-%b-%y\")), colour=\"Grey30\",\r\n            hjust=-0.1, size=3)+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  scale_x_continuous(name=\"Proportion of cases expected to lead to death\",\r\n                     labels=label_percent(accuracy=1), \r\n                     limits=c(0,max(plotdata$deathsroll[plotdata$areaName==LA], \r\n                                    na.rm=TRUE)*1.05))+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\",\r\n                     limits=c(0,max(plotdata$casesroll[plotdata$areaName==LA], \r\n                                    na.rm=TRUE)*1.05))+\r\n  scale_colour_viridis_c(option=\"rocket\", direction=-1)+\r\n  annotate(\"text\", x=0.04, y=6, angle=-5, label=\"0.25 deaths/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.04, y=19, angle=-12, label=\"1 death/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.04, y=45, angle=-33, label=\"2.5 deaths/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.04, y=88, angle=-52, label=\"5 deaths/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.title.position = \"plot\")+\r\n  labs(title=paste0(\"Evolution of COVID cases and associated mortality risk in \", LA),\r\n       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.\",\r\n       caption=\"Case data from coronavirus.data.gov.uk\\nCFRs estimated by Daniel Howden\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nnewmax=max(plotdata$date[!is.na(plotdata$casesroll)])\r\n#newmax=as.Date(\"2020-11-10\")\r\nxmax=max(plotdata$deathsroll[plotdata$date==newmax], na.rm=TRUE)*1.05\r\nymax=max(plotdata$casesroll[plotdata$date==newmax], na.rm=TRUE)*1.05\r\n\r\nview(plotdata %>% filter(date==newmax))\r\n\r\n#ggplot(plotdata %>% filter(date==max(date)-days(3)), \r\nagg_tiff(\"Outputs/COVIDCasevsMortPropIsoAllLTLAs3.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot()+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=0.25/deathsroll), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=1/deathsroll), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=2.5/deathsroll), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=5/deathsroll), colour=\"SkyBlue\")+\r\n  geom_point(data=plotdata %>% filter(date==newmax),\r\n             aes(x=deathsroll, y=casesroll, size=pop, fill=Region), shape=21, alpha=0.7)+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_text_repel(data=plotdata %>% filter(date==newmax),\r\n                  aes(x=deathsroll, y=casesroll,label=areaName), size=rel(2.5))+\r\n  scale_x_continuous(name=\"Proportion of cases expected to lead to death\",\r\n                     labels=label_percent(accuracy=1), \r\n                     limits=c(0,0.05))+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\",\r\n                     limits=c(0,250))+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\")+\r\n  scale_size(guide=FALSE)+\r\n  annotate(\"text\", x=0.039, y=10, angle=-2, label=\"0.25 deaths/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.041, y=28, angle=-6, label=\"1 death/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.043, y=63, angle=-15, label=\"2.5 deaths/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.045, y=117, angle=-26, label=\"5 deaths/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.title.position = \"plot\",\r\n        plot.caption.position=\"plot\")+\r\n  labs(title=\"Current fatality rates are much lower than in previous waves\",\r\n       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\")),\r\n       caption=\"Data from coronavirus.data.gov.uk\\nCFRs estimated by Daniel Howdon\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasevsMortPropIsoAllLTLAs.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot()+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=0.25/deathsroll), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=1/deathsroll), colour=\"SkyBlue\")+\r\n  #geom_line(data=plotdata, \r\n  #          aes(x=deathsroll, y=2.5/deathsroll), colour=\"SkyBlue\")+\r\n  geom_point(data=plotdata %>% filter(date==newmax),\r\n             aes(x=deathsroll, y=casesroll, size=pop, fill=Region), shape=21, alpha=0.7)+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  geom_text_repel(data=plotdata %>% filter(date==newmax),\r\n                  aes(x=deathsroll, y=casesroll,label=areaName), size=rel(2.5))+\r\n  scale_x_continuous(name=\"Proportion of cases expected to lead to death\",\r\n                     labels=label_percent(accuracy=1), #trans=\"log\")+ \r\n                     limits=c(0,0.03))+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\", #trans=\"log\")+ \r\n                     limits=c(0,90))+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\")+\r\n  scale_size(guide=FALSE)+\r\n  annotate(\"text\", x=0.02, y=15, angle=-12, label=\"0.25 deaths/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.023, y=46, angle=-32, label=\"1 death/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  #annotate(\"text\", x=0.026, y=67, angle=-44, label=\"2.5 deaths/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n  #         size=3)+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.title.position = \"plot\",\r\n        plot.caption.position=\"plot\")+\r\n  labs(title=\"Even in areas with high case rates, we can expect relatively low COVID death rates\",\r\n       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\")),\r\n       caption=\"Data from coronavirus.data.gov.uk\\nCFRs estimated by Daniel Howdon\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasevsMortPropIsoAllLTLAsLog.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot()+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=0.25/deathsroll), colour=\"SkyBlue\")+\r\n  geom_line(data=plotdata, \r\n            aes(x=deathsroll, y=1/deathsroll), colour=\"SkyBlue\")+\r\n  #geom_line(data=plotdata, \r\n  #          aes(x=deathsroll, y=2.5/deathsroll), colour=\"SkyBlue\")+\r\n  geom_point(data=plotdata %>% filter(date==newmax),\r\n             aes(x=deathsroll, y=casesroll, size=pop, fill=Region), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdata %>% filter(date==newmax),\r\n                  aes(x=deathsroll, y=casesroll,label=areaName), size=rel(2.5))+\r\n  scale_x_continuous(name=\"Proportion of cases expected to lead to death\\n(log scale)\",\r\n                     labels=label_percent(accuracy=0.01), trans=\"log\", \r\n                     limits=c(NA,0.3), breaks=c(0.0001, 0.0025, 0.05))+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\\n(log scale)\", trans=\"log\", \r\n                     limits=c(NA,75), labels=label_number(accuracy=1),\r\n                     breaks=c(1, 10, 50))+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\")+\r\n  scale_size(guide=FALSE)+\r\n  annotate(\"text\", x=0.022, y=14, angle=-60, label=\"0.25 deaths/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  annotate(\"text\", x=0.03, y=40, angle=-60, label=\"1 death/100,000/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n           size=3)+\r\n  #annotate(\"text\", x=0.026, y=67, angle=-44, label=\"2.5 deaths/day\", colour=\"SkyBlue\", family=\"Lato\",\r\n  #         size=3)+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.title.position = \"plot\",\r\n        plot.caption.position=\"plot\")+\r\n  labs(title=\"Even in areas with high case rates, we can expect relatively low COVID death rates\",\r\n       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\")),\r\n       caption=\"Data from coronavirus.data.gov.uk\\nCFRs estimated by Daniel Howdon\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesxAgeContours.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(lubridate)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(geofacet)\r\nlibrary(readxl)\r\nlibrary(ggridges)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\ntemp <- tempfile()\r\nregurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=regurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nregdata <- read.csv(temp) \r\n\r\nnaturl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=naturl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nnatdata <- read.csv(temp) \r\n\r\ndata <- bind_rows(regdata, natdata) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(!age %in% c(\"00_59\", \"60+\", \"unassigned\")) %>% \r\n  mutate(agecont=as.numeric(substr(age, 1, 2)))\r\n  \r\nagg_tiff(\"Outputs/COVIDCasesxAgeContours.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(data %>% filter(areaName==\"England\" & date>as.Date(\"2020-08-01\")), \r\n       aes(x=date, y=agecont, z=rollingRate))+\r\n  geom_contour_filled(colour=\"white\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Age\")+\r\n  scale_fill_viridis_d(option=\"turbo\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"The changing age distribution of COVID cases in England\",\r\n       subtitle=\"Rolling 7-day rate per 100,000 of people testing positive for COVID-19\",\r\n       caption=\"Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()  \r\n  \r\nagg_tiff(\"Outputs/COVIDCasesxAgeContoursLondon.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(data %>% filter(areaName==\"London\" & date>as.Date(\"2020-08-01\")), \r\n       aes(x=date, y=agecont, z=rollingRate))+\r\n  geom_contour_filled(colour=\"white\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Age\")+\r\n  scale_fill_viridis_d(option=\"turbo\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"The changing age distribution of COVID cases in London\",\r\n       subtitle=\"Rolling 7-day rate per 100,000 of people testing positive for COVID-19\",\r\n       caption=\"Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()    \r\n  \r\nagg_tiff(\"Outputs/COVIDCasesxAgeContoursNW.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(data %>% filter(areaName==\"North West\" & date>as.Date(\"2020-08-01\")), \r\n       aes(x=date, y=agecont, z=rollingRate))+\r\n  geom_contour_filled(colour=\"white\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Age\")+\r\n  scale_fill_viridis_d(option=\"turbo\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"The changing age distribution of COVID cases in the North West\",\r\n       subtitle=\"Rolling 7-day rate per 100,000 of people testing positive for COVID-19\",\r\n       caption=\"Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()  \r\n\r\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\r\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),\r\n                     code=c(1:9))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeContoursxReg.tiff\", units=\"in\", width=12, height=10, res=500)\r\nggplot(data %>% filter(areaName!=\"England\" & date>as.Date(\"2020-08-01\")), \r\n       aes(x=date, y=agecont, z=rollingRate))+\r\n  geom_contour_filled(colour=\"white\", bins=10, size=0.1)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Age\")+\r\n  scale_fill_viridis_d(option=\"turbo\", name=\"\")+\r\n  facet_geo(~areaName, grid=mygrid)+\r\n  theme_custom()+\r\n  labs(title=\"The changing age distribution of COVID cases in England\",\r\n       subtitle=\"Rolling 7-day rate per 100,000 of people testing positive for COVID-19\",\r\n       caption=\"Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()  \r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeRidges.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(data %>% filter(areaName==\"England\" & date>as.Date(\"2020-08-01\")), \r\n       aes(x=date, y=age, height=rollingRate))+\r\n  geom_ridgeline(colour=\"white\", scale=0.005, fill=\"Black\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  #scale_fill_viridis_d(option=\"turbo\", name=\"\")+\r\n  theme_custom()+\r\n  theme(text=element_text(colour=\"White\"), \r\n        plot.background=element_rect(fill=\"black\", colour=\"black\"),\r\n        panel.background=element_rect(fill=\"black\", colour=\"black\"))+\r\n  labs(title=\"The changing age distribution of COVID cases in England\",\r\n       subtitle=\"Rolling 7-day rate per 100,000 of people testing positive for COVID-19\",\r\n       caption=\"Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Scottish version\r\nscoturl <- \"https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/9393bd66-5012-4f01-9bc5-e7a10accacf4/download/trend_agesex_20211109.csv\"\r\ntemp <- curl_download(url=scoturl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nscotdata <- read.csv(temp) %>% \r\n  filter(Sex==\"Total\" & !AgeGroup %in% c(\"Total\", \"0 to 59\", \"60+\")) %>% \r\n  mutate(date=as.Date(as.character(Date), format=\"%Y%m%d\"),\r\n         agecont=as.numeric(substr(AgeGroup, 1, 2)))\r\n\r\n#Bring in LA populations\r\ntemp2 <- tempfile()\r\nsource2 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls\"\r\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\npop.m <- as.data.frame(t(read_excel(temp2, sheet=\"MYE2 - Males\", range=\"E387:CQ387\", col_names=FALSE)))\r\npop.m$age <- c(0:90)\r\npop.m$Sex <- \"Male\"\r\npop.f <- as.data.frame(t(read_excel(temp2, sheet=\"MYE2 - Females\", range=\"E387:CQ387\", col_names=FALSE)))\r\npop.f$age <- c(0:90)\r\npop.f$Sex <- \"Female\"\r\npop <- bind_rows(pop.m, pop.f)\r\n\r\npop$age <- c(0:90)\r\npop$AgeGroup <- case_when(\r\n  pop$age<15 ~ \"0 to 14\",\r\n  pop$age<20 ~ \"15 to 19\",\r\n  pop$age<25 ~ \"20 to 24\",\r\n  pop$age<45 ~ \"25 to 44\",\r\n  pop$age<65 ~ \"45 to 64\",\r\n  pop$age<75 ~ \"65 to 74\",\r\n  pop$age<85 ~ \"75 to 84\",\r\n  TRUE ~ \"85plus\"\r\n)\r\n\r\npop1 <- pop %>% \r\n  group_by(AgeGroup, Sex) %>% \r\n  summarise(pop=sum(V1))\r\n\r\npop2 <- pop %>% \r\n  group_by(AgeGroup) %>%\r\n  summarise(pop=sum(V1)) %>% \r\n  mutate(Sex=\"Total\")\r\n\r\npop <- bind_rows(pop1, pop2)\r\n\r\nscotdata <- merge(scotdata, pop, by=c(\"Sex\", \"AgeGroup\"), all.x=TRUE)\r\n\r\nscotdata$posrate <- scotdata$DailyPositive*100000/scotdata$pop\r\n\r\n#Take rolling 7-day averages\r\nscotdata <- scotdata %>% \r\n  group_by(AgeGroup) %>% \r\n  arrange(date) %>% \r\n  mutate(cases_avg=roll_mean(DailyPositive, 7, align=\"right\", fill=0),\r\n         posrate_avg=roll_mean(posrate*7, 7, align=\"right\", fill=0))\r\n         \r\nagg_tiff(\"Outputs/COVIDCasesxAgeContoursScot.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(scotdata %>% filter(date>as.Date(\"2020-08-01\")), \r\n       aes(x=date, y=agecont, z=posrate_avg))+\r\n  geom_contour_filled(colour=\"white\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Age\")+\r\n  scale_fill_viridis_d(option=\"turbo\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"The changing age distribution of COVID cases in Scotland\",\r\n       subtitle=\"Rolling 7-day rate per 100,000 of people testing positive for COVID-19\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()  \r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesxSex.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(lubridate)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(readxl)\r\nlibrary(readODS)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Download data (have to do this separately for male and females because the dashboard is weird)\r\nsource.f <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=femaleCases&format=csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source.f, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata.f <- read.csv(temp) %>% \r\n  mutate(sex=\"Female\")\r\n\r\nsource.m <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=maleCases&format=csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source.m, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata.m <- read.csv(temp) %>% \r\n  mutate(sex=\"Male\")\r\n\r\n#Combine and extract daily figures from cumulative ones\r\ndata <- bind_rows(data.f, data.m) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(age, sex) %>% \r\n  arrange(date) %>% \r\n  mutate(newcases=value-lag(value, 1),\r\n         ratechange=rate-lag(rate, 1),\r\n         cases_roll=roll_mean(newcases, 7, align=\"center\", fill=NA),\r\n         rates_roll=roll_mean(ratechange, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup() %>% \r\n  mutate(age=gsub(\"_\", \" \", age),\r\n         age=factor(age, levels=c(\"0 to 4\", \"5 to 9\", \"10 to 14\", \"15 to 19\", \"20 to 24\",\r\n                                  \"25 to 29\", \"30 to 34\", \"35 to 39\", \"40 to 44\", \r\n                                  \"45 to 49\", \"50 to 54\", \"55 to 59\", \"60 to 64\",\r\n                                  \"65 to 69\", \"70 to 74\", \"75 to 79\", \"80 to 84\",\r\n                                  \"85 to 89\", \"90+\")))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxSex.tiff\", units=\"in\", width=12, height=7, res=500)\r\nggplot(data %>% filter(date>as.Date(\"2021-05-25\") & date<max(date)-days(3)), \r\n       aes(x=date, y=rates_roll, colour=sex))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new cases per 100,000\")+\r\n  scale_colour_manual(values=c(\"#00cc99\", \"#6600cc\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(), strip.text=element_blank())+\r\n  geom_text(data=data %>% filter(date==as.Date(\"2021-07-16\") & sex==\"Male\"),\r\n            aes(x=date, y=240, label=age), colour=\"Black\", family=\"Lato\", fontface=\"bold\")+\r\n  labs(title=\"COVID case rates have diverged for men and women\",\r\n       subtitle=\"Rolling 7-day average of new COVID case rates in <span style='color:#6600cc;'>men</span> and <span style='color:#00cc99;'>women</span> in England, by age.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxSexFull.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(data %>% filter(date<max(date)-days(3)), \r\n       aes(x=date, y=rates_roll, colour=sex))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new cases per 100,000\")+\r\n  scale_colour_manual(values=c(\"#00cc99\", \"#6600cc\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The gender gap in COVID cases in younger adults in England is growing\",\r\n       subtitle=\"Rolling 7-day average of new COVID case rates in <span style='color:#6600cc;'>men</span> and <span style='color:#00cc99;'>women</span> in England, by age.\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ndata %>% select(date, age, rates_roll, sex) %>% \r\n  spread(sex, rates_roll) %>% \r\n  mutate(ratio=Male/(Male+Female), test=Female-Male) %>% \r\n  filter(date>as.Date(\"2021-05-01\")) %>% \r\n  ggplot(aes(x=date, y=ratio, colour=age, group=age))+\r\n  geom_line()+\r\n  theme_custom()\r\n\r\nheatmapdata <- data %>% \r\n  select(sex, rates_roll, age, date) %>% \r\n  spread(sex, rates_roll) %>% \r\n  mutate(maleprop=Male/(Male+Female))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxSexHeatmap.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(heatmapdata %>% filter(date>as.Date(\"2021-05-25\") & date<max(date)-days(3)))+\r\n  geom_tile(aes(x=date, y=age, fill=maleprop))+\r\n  theme_custom()+\r\n  scale_fill_distiller(palette=\"PRGn\", limits=c(0.33,0.67), name=\"\", breaks=c(0.33,0.5,0.67),\r\n                       labels=c(\"2 Female cases\\nfor each\\nmale case\", \"Equal male\\nand female\\ncases\", \r\n                                \"2 Male cases\\nfor each\\nfemale case\"))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme(legend.position = \"top\", plot.subtitle=element_markdown())+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID cases in working age adults are slowly becoming less female-dominated\",\r\n       subtitle=\"Ratio of <span style='color:#1b7837;'>female</span> to <span style='color:#762a83;'>male</span> cases in England, based on a 7-day rolling average\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxSexHeatmapFull.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(heatmapdata %>% filter(date>as.Date(\"2020-03-10\") &date<max(date)-days(3)))+\r\n  geom_tile(aes(x=date, y=age, fill=maleprop))+\r\n  theme_custom()+\r\n  scale_fill_distiller(palette=\"PRGn\", limits=c(0.2,0.8), name=\"\", breaks=c(0.2, 0.33,0.5,0.67, 0.8),\r\n                       labels=c(\"4 Female cases\\nfor each\\nmale case\", \r\n                                \"2:1\", \r\n                                \"Equal male\\nand female\\ncases\", \r\n                                \"2:1\", \r\n                                \"4 Male cases\\nfor each\\nmale case\"))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme(legend.position = \"top\", plot.subtitle=element_markdown())+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID cases in 20 year-olds in the 1st wave were heavily female-dominated\",\r\n       subtitle=\"Ratio of <span style='color:#1b7837;'>female</span> to <span style='color:#762a83;'>male</span> cases in England, based on a 7-day rolling average\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxSexHeatmapU60s.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(temp<-heatmapdata %>% filter(date>as.Date(\"2021-05-25\") & date<max(date)-days(3) &\r\n         age %in% c(\"0 to 4\", \"5 to 9\", \"10 to 14\", \"15 to 19\", \"20 to 24\",\r\n                    \"25 to 29\", \"30 to 34\", \"35 to 39\", \"40 to 44\", \r\n                    \"45 to 49\", \"50 to 54\", \"55 to 59\")))+\r\n  geom_tile(aes(x=date, y=age, fill=maleprop))+\r\n  theme_custom()+\r\n  scale_fill_distiller(palette=\"PRGn\", limits=c(0.37,0.63), name=\"\", breaks=c(0.37,0.5,0.63),\r\n                       labels=c(\"17 Female cases\\nfor every\\n10 male cases\", \"Equal male\\nand female\\ncases\", \r\n                                \"17 Male cases\\nfor every\\n10 female cases\"))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme(legend.position = \"top\", plot.subtitle=element_markdown())+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID cases in working age adults are becomine increasingly female-dominated\",\r\n       subtitle=\"Ratio of <span style='color:#1b7837;'>female</span> to <span style='color:#762a83;'>male</span> cases in England, based on a 7-day rolling average\",\r\n       caption=\"Date from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Calculate case rate ratios\r\ncaseratios <- data %>% \r\n  group_by(age, date) %>% \r\n  summarise(cases_roll=sum(cases_roll)) %>% \r\n  mutate(sex=\"Total\") %>%\r\n  ungroup() %>% \r\n  bind_rows(data) %>% \r\n  filter(!is.na(cases_roll)) %>% \r\n  select(age, sex, date, cases_roll) %>% \r\n  group_by(age, sex) %>% \r\n  mutate(caseratio=cases_roll/lag(cases_roll, 7)) %>% \r\n  ungroup()\r\n\r\n#Whole population\r\npopheatmap <- caseratios %>% \r\n  filter(sex==\"Total\" & date>as.Date(\"2020-04-01\")) \r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioHeatmap.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap)+\r\n  geom_tile(aes(x=date, y=age, fill=caseratio))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(0.249,4), direction=-1 ,\r\n                         trans=\"log\", breaks=c(0.25, 0.5, 1, 2, 4), \r\n                         labels=c(\"-75%\", \"-50%\", \"No change\", \"+100%\", \"+300%\"),\r\n                         name=\"Change in cases in the past week\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Generally COVID case numbers have risen or fallen across all age groups at once\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioHeatmapRecent.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date)))+\r\n  geom_tile(aes(x=date, y=age, fill=caseratio))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(1/3.3,3.3), direction=-1 ,\r\n                         trans=\"log\", breaks=c(0.5, 1, 1.9999), \r\n                         labels=c(\"-50%\", \"No change\", \"+100%\"),\r\n                         name=\"Change in cases in the past week\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID case rates have turned a corner in recent days\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n  \r\npopheatmapxsex <- caseratios %>% \r\n  filter(sex!=\"Total\" & date>as.Date(\"2020-04-01\")) \r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioHeatmapxSex.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmapxsex)+\r\n  geom_tile(aes(x=date, y=age, fill=caseratio))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(0.249,4), direction=-1 ,\r\n                         trans=\"log\", breaks=c(0.25, 0.5, 1, 2, 4), \r\n                         labels=c(\"-75%\", \"-50%\", \"No change\", \"+100%\", \"+300%\"),\r\n                         name=\"Change in cases in the past week\")+\r\n  facet_wrap(~sex)+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Generally COVID case numbers have risen or fallen across all age groups at once\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioHeatmapxSexRecent.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmapxsex %>% filter(date>as.Date(\"2021-05-01\")))+\r\n  geom_tile(aes(x=date, y=age, fill=caseratio))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(0.249,4), direction=-1 ,\r\n                         trans=\"log\", breaks=c(0.25, 0.5, 1, 2, 4), \r\n                         labels=c(\"-75%\", \"-50%\", \"No change\", \"+100%\", \"+300%\"),\r\n                         name=\"Change in cases in the past week\")+\r\n  facet_wrap(~sex)+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Generally COVID case numbers have risen or fallen across all age groups at once\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Get tidy case rates by bringing in ONS 2020 populations\r\n#Bring in ONS 2020 population figures for comparison\r\nurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nONSpop_m <- read_excel(temp, sheet=\"MYE2 - Males\", range=\"E8:CQ12\") %>% \r\n  slice_tail() %>% \r\n  gather(age, Male, c(1:ncol(.)))\r\n\r\nONSpop_f <- read_excel(temp, sheet=\"MYE2 - Females\", range=\"E8:CQ12\") %>% \r\n  slice_tail() %>% \r\n  gather(age, Female, c(1:ncol(.)))\r\n\r\nONSpop <- merge(ONSpop_m, ONSpop_f) %>% \r\n  mutate(age=as.numeric(substr(age, 1, 2)),\r\n         age=case_when(\r\n           age<5 ~ \"0 to 4\",\r\n           age<10 ~ \"5 to 9\",\r\n           age<15 ~ \"10 to 14\",\r\n           age<20 ~ \"15 to 19\",\r\n           age<25 ~ \"20 to 24\",\r\n           age<30 ~ \"25 to 29\",\r\n           age<35 ~ \"30 to 34\",\r\n           age<40 ~ \"35 to 39\",\r\n           age<45 ~ \"40 to 44\",\r\n           age<50 ~ \"45 to 49\",\r\n           age<55 ~ \"50 to 54\",\r\n           age<60 ~ \"55 to 59\",\r\n           age<65 ~ \"60 to 64\",\r\n           age<70 ~ \"65 to 69\",\r\n           age<75 ~ \"70 to 74\",\r\n           age<80 ~ \"75 to 79\",\r\n           age<85 ~ \"80 to 84\",\r\n           age<90 ~ \"85 to 89\",\r\n           TRUE ~ \"90+\")) %>% \r\n   group_by(age) %>% \r\n  summarise(Male=sum(Male), Female=sum(Female)) %>% \r\n  ungroup()\r\n\r\nratesdata <- caseratios %>% \r\n  merge(ONSpop %>% \r\n  rowwise() %>% \r\n  mutate(Total=Male+Female) %>% \r\n  gather(sex, pop, c(2:4)) %>%\r\n  ungroup()) %>% \r\n  mutate(rates_roll=cases_roll*100000/pop)\r\n\r\nagg_png(\"Outputs/COVIDCasesHeatmapxAge.png\", units=\"in\", width=10, height=6, res=500)\r\nggplot(ratesdata %>% filter(sex==\"Total\" & date>as.Date(\"2021-12-01\") & date<max(date)-days(1)),\r\n       aes(x=date, y=age, fill=rates_roll))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Cases per 100,000\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5, \r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"The Omicron wave in cases seems to be subsiding\",\r\n       subtitle=\"Rolling 7-day average rates of new COVID-19 cases by age in England\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDCaseRatesLineRecent.png\", units=\"in\", width=10, height=6, res=500)\r\nggplot(ratesdata %>% filter(sex==\"Total\" & date>as.Date(\"2021-12-01\") & date<max(date)-days(1)), \r\n       aes(x=date, y=rates_roll, colour=age))+\r\n\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"New COVID cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID case rates are much lower than they were\",\r\n       subtitle=\"Rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDCaseRatesLineRecent60Plus.png\", units=\"in\", width=10, height=6, res=800)\r\nggplot(ratesdata %>% filter(sex==\"Total\" & date>as.Date(\"2021-10-01\") & \r\n                              date<max(date)-days(1)), \r\n       aes(x=date, y=rates_roll, group=age))+\r\n  geom_line(colour=\"Grey70\")+\r\n  geom_line(data=ratesdata %>% filter(sex==\"Total\" & date>as.Date(\"2021-10-01\") & \r\n                                        date<max(date)-days(1) &\r\n                                        age %in% c(\"60 to 64\", \"65 to 69\", \"70 to 74\",\r\n                                                   \"75 to 79\", \"80 to 84\", \"85 to 89\",\r\n                                                   \"90+\")),\r\n            aes(colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"New COVID cases per 100,000\")+\r\n  scale_colour_manual(values=c(\"#0F8299FF\", \"#3E9FB3FF\", \"#7ABECCFF\", \"#B8DEE6FF\", \r\n                               \"#3D0F99FF\", \"#653EB3FF\", \"#967ACCFF\"), name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID cases have fallen in the ages that received boosters earliest\",\r\n       subtitle=\"Rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDCaseRatesLineRecentu60.png\", units=\"in\", width=10, height=6, res=800)\r\nggplot(ratesdata %>% filter(sex==\"Total\" & date>as.Date(\"2021-10-01\") & \r\n                              date<max(date)-days(1)), \r\n       aes(x=date, y=rates_roll, group=age))+\r\n  geom_line(colour=\"Grey70\")+\r\n  geom_line(data=ratesdata %>% filter(sex==\"Total\" & date>as.Date(\"2021-10-01\") & \r\n                                        date<max(date)-days(1) &\r\n                                        !age %in% c(\"60 to 64\", \"65 to 69\", \"70 to 74\",\r\n                                                   \"75 to 79\", \"80 to 84\", \"85 to 89\",\r\n                                                   \"90+\")),\r\n            aes(colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"New COVID cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"COVID cases have risen in younger age groups\",\r\n       subtitle=\"Rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Line chart of CRRs\r\nagg_tiff(\"Outputs/COVIDCaseRatioLineRecent.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date)))+\r\n  geom_hline(yintercept=1, colour=\"Grey50\")+\r\n  geom_hline(yintercept=0.5, colour=\"Grey70\", linetype=2)+\r\n  geom_hline(yintercept=2, colour=\"Grey70\", linetype=2)+\r\n  geom_text(aes(x=as.Date(\"2021-12-15\"), y=0.52, label=\"Cases halving each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_text(aes(x=as.Date(\"2022-02-20\"), y=2.1, label=\"Cases doubling each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_line(aes(x=date, y=caseratio, colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"7-day Case Rate Ratio\",\r\n                     breaks=c(0.5, 1, 2), \r\n                     labels=c(\"-50%\", \"No change\", \"+100%\"))+\r\n  scale_colour_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"The fall in COVID cases has started slowing in the last few days\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioLineRecent019.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date)))+\r\n  geom_hline(yintercept=1, colour=\"Grey50\")+\r\n  geom_hline(yintercept=0.5, colour=\"Grey70\", linetype=2)+\r\n  geom_hline(yintercept=2, colour=\"Grey70\", linetype=2)+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=0.52, label=\"Cases halving each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=2.1, label=\"Cases doubling each week\"),\r\n            colour=\"Grey70\")+\r\n  #geom_rect(aes(xmin=as.Date(\"2021-10-25\"), xmax=as.Date(\"2021-10-29\"),\r\n  #              ymin=0.5, ymax=2), fill=\"Grey90\", colour=\"Grey90\")+\r\n  #geom_text(aes(x=as.Date(\"2021-10-23\"), y=1.5, label=\"Half term\"),\r\n  #          colour=\"Grey70\", angle=90)+\r\n  geom_line(aes(x=date, y=caseratio, group=age), colour=\"Grey80\")+\r\n  geom_line(data=popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date) &\r\n                                         age %in% c(\"0 to 4\", \"5 to 9\", \"10 to 14\",\r\n                                                    \"15 to 19\")),\r\n            aes(x=date, y=caseratio, colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"7-day Case Rate Ratio\",\r\n                     breaks=c(0.5, 1, 2), \r\n                     labels=c(\"-50%\", \"No change\", \"+100%\"))+\r\n  scale_colour_manual(values=c(\"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"Age\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"COVID case rate ratios are not following a consistent pattern in <span style='color:#c51b8a;'>the under 20s</span>\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioLineRecent2039.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date)))+\r\n  geom_hline(yintercept=1, colour=\"Grey50\")+\r\n  geom_hline(yintercept=0.5, colour=\"Grey70\", linetype=2)+\r\n  geom_hline(yintercept=2, colour=\"Grey70\", linetype=2)+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=0.52, label=\"Cases halving each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=2.1, label=\"Cases doubling each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_line(aes(x=date, y=caseratio, group=age), colour=\"Grey80\")+\r\n  geom_line(data=popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date) &\r\n                                         age %in% c(\"20 to 24\", \"25 to 29\", \"30 to 34\",\r\n                                                    \"35 to 39\")),\r\n            aes(x=date, y=caseratio, colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"7-day Case Rate Ratio\",\r\n                     breaks=c(0.5, 1, 2), \r\n                     labels=c(\"-50%\", \"No change\", \"+100%\"))+\r\n  scale_colour_manual(values=c(\"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"Age\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"Case growth in <span style='color:#c51b8a;'>20-39 year olds</span> has more or less plateaued\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioLineRecent4059.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date)))+\r\n  geom_hline(yintercept=1, colour=\"Grey50\")+\r\n  geom_hline(yintercept=0.5, colour=\"Grey70\", linetype=2)+\r\n  geom_hline(yintercept=2, colour=\"Grey70\", linetype=2)+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=0.52, label=\"Cases halving each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=2.1, label=\"Cases doubling each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_line(aes(x=date, y=caseratio, group=age), colour=\"Grey80\")+\r\n  geom_line(data=popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date) &\r\n                                         age %in% c(\"40 to 44\", \"45 to 49\", \"50 to 54\",\r\n                                                    \"55 to 59\")),\r\n            aes(x=date, y=caseratio, colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"7-day Case Rate Ratio\",\r\n                     breaks=c(0.5, 1, 2), \r\n                     labels=c(\"-50%\", \"No change\", \"+100%\"))+\r\n  scale_colour_manual(values=c(\"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"Age\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"COVID cases rate ratios are also levelling off in <span style='color:#c51b8a;'>40-59 year olds\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioLineRecent6579.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date)))+\r\n  geom_hline(yintercept=1, colour=\"Grey50\")+\r\n  geom_hline(yintercept=0.5, colour=\"Grey70\", linetype=2)+\r\n  geom_hline(yintercept=2, colour=\"Grey70\", linetype=2)+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=0.52, label=\"Cases halving each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=2.1, label=\"Cases doubling each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_line(aes(x=date, y=caseratio, group=age), colour=\"Grey80\")+\r\n  geom_line(data=popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date) &\r\n                                         age %in% c(\"60 to 64\", \"65 to 69\", \"70 to 74\",\r\n                                                    \"75 to 79\")),\r\n            aes(x=date, y=caseratio, colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"7-day Case Rate Ratio\",\r\n                     breaks=c(0.5, 1, 2), \r\n                     labels=c(\"-50%\", \"No change\", \"+100%\"))+\r\n  scale_colour_manual(values=c(\"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"Age\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"COVID case rates in <span style='color:#c51b8a;'>60-79 year olds</span> are still falling\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioLineRecent80Plus.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date)))+\r\n  geom_hline(yintercept=1, colour=\"Grey50\")+\r\n  geom_hline(yintercept=0.5, colour=\"Grey70\", linetype=2)+\r\n  geom_hline(yintercept=2, colour=\"Grey70\", linetype=2)+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=0.52, label=\"Cases halving each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_text(aes(x=as.Date(\"2021-12-10\"), y=2.1, label=\"Cases doubling each week\"),\r\n            colour=\"Grey70\")+\r\n  geom_line(aes(x=date, y=caseratio, group=age), colour=\"Grey80\")+\r\n  geom_line(data=popheatmap %>% filter(date>as.Date(\"2021-12-01\") & date<max(date) &\r\n                                         age %in% c(\"80 to 84\", \"85 to 89\", \"90+\")),\r\n            aes(x=date, y=caseratio, colour=age))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(trans=\"log\", name=\"7-day Case Rate Ratio\",\r\n                     breaks=c(0.5, 1, 2), \r\n                     labels=c(\"-50%\", \"No change\", \"+100%\"))+\r\n  scale_colour_manual(values=c(\"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"Age\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"COVID case rates are now falling fastest in <span style='color:#c51b8a;'>the over 80s</span>\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Positivity rates by sex (pillar 2 only)\r\n#Data from weekly surveillance reports #https://www.gov.uk/government/statistics/national-flu-and-covid-19-surveillance-reports-2021-to-2022-season\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1052282/Weekly_Influenza_and_COVID19_report_data_w5.ods\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#posdata.m <- read_excel(temp, sheet=\"Figure 7. Positivity by age\", range=\"C121:L174\") %>% \r\n#mutate(index=0:(nrow(.)-1), date=as.Date(\"2020-12-14\")+weeks(index+4)) %>% \r\n#gather(ageband, posrate, c(1:(ncol(.)-2))) %>% \r\n#mutate(ageband=gsub(\"_\", \"-\", ageband), sex=\"Male\")\r\nposdata.m <- read_ods(temp, sheet=\"Figure_7__Positivity_by_age\", range=\"C122:L174\", \r\n                      col_names=FALSE) %>% \r\n  set_names(\"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\",\r\n            \"50-59\", \"60-69\", \"70-79\", \"80+\") %>% \r\n  mutate(index=0:(nrow(.)-1), date=as.Date(\"2020-12-14\")+weeks(index+4)) %>% \r\n  gather(ageband, posrate, c(1:(ncol(.)-2))) %>% \r\n  mutate(sex=\"Male\")\r\n\r\n#posdata.f <- read_excel(temp, sheet=\"Figure 7. Positivity by age\", range=\"C177:L230\") %>% \r\n#  mutate(index=0:(nrow(.)-1), date=as.Date(\"2020-12-14\")+weeks(index+4)) %>% \r\n#  gather(ageband, posrate, c(1:(ncol(.)-2))) %>% \r\n#  mutate(ageband=gsub(\"_\", \"-\", ageband), sex=\"Female\")\r\n\r\nposdata.f <- read_ods(temp, sheet=\"Figure_7__Positivity_by_age\", range=\"C178:L230\", \r\n                      col_names=FALSE) %>% \r\n  set_names(\"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\",\r\n            \"50-59\", \"60-69\", \"70-79\", \"80+\") %>% \r\n  mutate(index=0:(nrow(.)-1), date=as.Date(\"2020-12-14\")+weeks(index+4)) %>% \r\n  gather(ageband, posrate, c(1:(ncol(.)-2))) %>% \r\n  mutate(sex=\"Female\")\r\n\r\nposdata <- bind_rows(posdata.m, posdata.f) %>% \r\n  select(-index) %>% \r\n  mutate(posrate=posrate/100,\r\n         ageband=factor(ageband, levels=c(\"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\",\r\n                                          \"50-59\", \"60-69\", \"70-79\", \"80+\")))\r\n\r\nagg_tiff(\"Outputs/COVIDPosratexSex.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(posdata, aes(x=date, y=posrate, colour=sex))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Positivity rate\", labels=label_percent(accuracy=1))+\r\n  scale_colour_manual(values=c(\"#00cc99\", \"#6600cc\"))+\r\n  facet_wrap(~ageband)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"Women test more than men\",\r\n       subtitle=\"COVID test posivity rate for <span style='color:#00cc99;'>women</span> and <span style='color:#6600cc;'>men</span> in England, for pillar 2 (community) tests, by age\",\r\n       caption=\"Date from UKHSA | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nsexratio <- posdata %>% spread(sex, posrate) %>% \r\n  mutate(sexratio=Female/Male) \r\n\r\nagg_tiff(\"Outputs/COVIDPosrateSexRatio.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(sexratio, aes(x=date, y=sexratio, colour=ageband))+\r\n  geom_hline(yintercept=1, colour=\"Grey50\")+\r\n  geom_line(show.legend=FALSE)+\r\n  geom_text_repel(data=sexratio %>% filter(date==max(date)),\r\n                  aes(x=max(date), y=sexratio, label = ageband, \r\n                      colour=ageband),\r\n                  family = \"Calibri\", direction = \"y\", xlim = c(as.Date(\"2022-01-20\"), NA),\r\n                  hjust = 0, segment.size = .7,\r\n                  segment.alpha = .5,\r\n                  segment.linetype = \"dotted\",\r\n                  segment.curvature = -0.1,\r\n                  segment.ncp = 3,\r\n                  segment.angle = 20, box.padding = .3, show.legend = FALSE)+\r\n  scale_x_date(name=\"\", limits=c(NA_Date_, as.Date(\"2022-01-30\")))+\r\n  scale_y_continuous(trans=\"log10\", name=\"Female:Male positivity rate ratio\\n(log scale)\",\r\n                     breaks=c(0.25, 0.5, 1, 2), limits=c(NA, 2))+\r\n  scale_colour_paletteer_d(\"rcartocolor::Prism\")+\r\n  theme_custom()+\r\n  theme(panel.grid.major.y=element_line(colour=\"Grey90\"))+\r\n  annotate(\"text\", x=as.Date(\"2021-10-10\"), y=0.26, label=\"Male positivity 4x higher\",\r\n           colour=\"Grey70\", family=\"Lato\")+\r\n  annotate(\"text\", x=as.Date(\"2021-10-10\"), y=0.52, label=\"Male positivity 2x higher\",\r\n           colour=\"Grey70\", family=\"Lato\")+\r\n  annotate(\"text\", x=as.Date(\"2021-10-10\"), y=1.92, label=\"Female positivity 2x higher\",\r\n           colour=\"Grey70\", family=\"Lato\")+\r\n  labs(title=\"Adult women consistently test more than men\",\r\n       subtitle=\"Ratio of COVID test positivity rates in England, for pillar 2 (community) tests, by age\",\r\n       caption=\"Data from UKHSA | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n\r\n\r\n#Scotland\r\ntemp <- tempfile()\r\nsource <- \"https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/9393bd66-5012-4f01-9bc5-e7a10accacf4/download/trend_agesex_20211231.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nscotdata <- read.csv(temp) %>% \r\n  filter(!AgeGroup %in% c(\"Total\", \"0 to 59\", \"60+\")) %>% \r\n  mutate(date=as.Date(as.character(Date), format=\"%Y%m%d\")) %>% \r\n  select(date, Sex, AgeGroup, DailyPositive) %>% \r\n  group_by(Sex, AgeGroup) %>% \r\n  mutate(cases_roll=roll_mean(DailyPositive, 7, align=\"center\", fill=NA),\r\n         #Populations hard coded because the data is unhelpfully structured and\r\n         #I am a lazy, terrible, person. Source:\r\n         #https://www.nrscotland.gov.uk/statistics-and-data/statistics/statistics-by-theme/population/population-estimates/mid-year-population-estimates/mid-2020\r\n         pop=case_when(\r\n           AgeGroup==\"0 to 14\" & Sex==\"Male\" ~ 135959+152847+151875,\r\n           AgeGroup==\"15 to 19\" & Sex==\"Male\" ~ 144207,\r\n           AgeGroup==\"20 to 24\" & Sex==\"Male\" ~ 173302,\r\n           AgeGroup==\"25 to 44\" & Sex==\"Male\" ~ 189139+185637+174079+159586,\r\n           AgeGroup==\"45 to 64\" & Sex==\"Male\" ~ 169376+189355+193348+170701,\r\n           AgeGroup==\"65 to 74\" & Sex==\"Male\" ~ 144529+135910,\r\n           AgeGroup==\"75 to 84\" & Sex==\"Male\" ~ 89206+60270,\r\n           AgeGroup==\"85plus\" & Sex==\"Male\" ~ 32227+13659,\r\n           AgeGroup==\"0 to 14\" & Sex==\"Female\" ~ 127847+145056+146206,\r\n           AgeGroup==\"15 to 19\" & Sex==\"Female\" ~ 137913,\r\n           AgeGroup==\"20 to 24\" & Sex==\"Female\" ~ 168453,\r\n           AgeGroup==\"25 to 44\" & Sex==\"Female\" ~ 188065+188432+181587+164780,\r\n           AgeGroup==\"45 to 64\" & Sex==\"Female\" ~ 180548+203758+205996+181868,\r\n           AgeGroup==\"65 to 74\" & Sex==\"Female\" ~ 155904+149920,\r\n           AgeGroup==\"75 to 84\" & Sex==\"Female\" ~ 109004+83026,\r\n           AgeGroup==\"85plus\" & Sex==\"Female\" ~ 52335+30090),\r\n         caserate_roll=cases_roll*100000/pop)\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxSexScot.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot(scotdata %>% filter(date>as.Date(\"2021-05-10\") & date<max(date)-days(3) &\r\n                             Sex!=\"Total\"), \r\n       aes(x=date, y=caserate_roll, colour=Sex))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new cases per 100,000\")+\r\n  scale_colour_manual(values=c(\"#00cc99\", \"#6600cc\"))+\r\n  facet_wrap(~AgeGroup)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The male/female gap in Scottish COVID cases seems fairly stable\",\r\n       subtitle=\"Rolling 7-day average of new COVID case rates in <span style='color:#6600cc;'>men</span> and <span style='color:#00cc99;'>women</span> in Scotland, by age.\",\r\n       caption=\"Data from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Calculate case rate ratios\r\ncaseratios.scot <- scotdata %>% \r\n  group_by(AgeGroup, date) %>% \r\n  summarise(cases_roll=sum(cases_roll)) %>% \r\n  mutate(Sex=\"Total\") %>%\r\n  ungroup() %>% \r\n  bind_rows(data) %>% \r\n  filter(!is.na(cases_roll)) %>% \r\n  select(AgeGroup, Sex, date, cases_roll) %>% \r\n  group_by(AgeGroup, Sex) %>% \r\n  mutate(caseratio=cases_roll/lag(cases_roll, 7)) %>% \r\n  ungroup()\r\n\r\n#Whole population\r\npopheatmap.scot <- caseratios.scot %>% \r\n  filter(Sex==\"Total\" & date>as.Date(\"2020-04-01\")) \r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioHeatmapScot.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(popheatmap.scot)+\r\n  geom_tile(aes(x=date, y=AgeGroup, fill=caseratio))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(0.249,4), direction=-1 ,\r\n                         trans=\"log\", breaks=c(0.25, 0.5, 1, 2, 4), \r\n                         labels=c(\"-75%\", \"-50%\", \"No change\", \"+100%\", \"+300%\"),\r\n                         name=\"Change in cases in the past week\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Generally COVID case numbers have risen or fallen across all age groups at once\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in England, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nscotheatmapdata <- scotdata %>% \r\n  select(Sex, caserate_roll, AgeGroup, date) %>% \r\n  spread(Sex, caserate_roll) %>% \r\n  mutate(maleprop=Male/(Male+Female))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxSexHeatmapScot.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(scotheatmapdata %>% filter(date>as.Date(\"2021-05-25\") & date<max(date)-days(3)))+\r\n  geom_tile(aes(x=date, y=AgeGroup, fill=maleprop))+\r\n  theme_custom()+\r\n  scale_fill_distiller(palette=\"PRGn\", limits=c(0.3,0.7), name=\"\", breaks=c(0.33,0.5,0.67),\r\n                       labels=c(\"2 Female cases\\nfor each\\nmale case\", \"Equal male\\nand female\\ncases\", \r\n                                \"2 Male cases\\nfor each\\nfemale case\"))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme(legend.position = \"top\", plot.subtitle=element_markdown())+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Scotland has a smaller gender imbalance in 20-44 year old case rates than England\",\r\n       subtitle=\"Ratio of <span style='color:#1b7837;'>female</span> to <span style='color:#762a83;'>male</span> cases in Scotland, based on a 7-day rolling average\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatioHeatmapRecentScot.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(popheatmap.scot %>% filter(date>as.Date(\"2021-05-01\")))+\r\n  geom_tile(aes(x=date, y=AgeGroup, fill=caseratio))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"pals::warmcool\", limit=c(0.249,4), direction=-1 ,\r\n                         trans=\"log\", breaks=c(0.25, 0.5, 1, 2, 4), \r\n                         labels=c(\"-75%\", \"-50%\", \"No change\", \"+100%\", \"+300%\"),\r\n                         name=\"Change in cases in the past week\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID case rates in Scotland are falling across all age groups\",\r\n       subtitle=\"Weekly change in the rolling 7-day average number of new COVID cases in Scotland, by age group\",\r\n       caption=\"Data from NHS Scotland | Plot inspired by @danc00ks0n & @russss | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatesLineRecentScot.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(scotdata %>% filter(date>as.Date(\"2021-05-10\") & date<max(date)-days(3) &\r\n                             Sex!=\"Total\"), \r\n       aes(x=date, y=caserate_roll, colour=AgeGroup, group=AgeGroup))+\r\n  #geom_rect(aes(xmin=as.Date(\"2021-06-11\"), xmax=as.Date(\"2021-07-11\"), ymin=0, ymax=220),\r\n  #          fill=\"Grey90\", colour=\"Grey90\")+\r\n  #geom_rect(aes(xmin=as.Date(\"2021-09-01\"), xmax=as.Date(\"2021-09-27\"), ymin=0, ymax=220),\r\n  #          fill=\"Grey90\", colour=\"Grey90\")+\r\n  #geom_segment(aes(x=as.Date(\"2021-07-19\"), xend=as.Date(\"2021-07-19\"), y=0, yend=220),\r\n  #             colour=\"Grey30\", linetype=2)+\r\n  geom_line()+\r\n  facet_wrap(~Sex)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"New COVID cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_custom()+\r\n  labs(title=\"Current case rates are still highest (by far) in schoolchildren\",\r\n       subtitle=\"Rolling 7-day average number of new COVID cases in Scotland, by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesxVaxTadpoles.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ggrepel)\r\n\r\n#LTLA analysis\r\ntemp <- tempfile()\r\ndashurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=VaccineRegisterPopulationByVaccinationDate&metric=cumPeopleVaccinatedFirstDoseByVaccinationDate&metric=cumPeopleVaccinatedSecondDoseByVaccinationDate&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\ntemp <- curl_download(url=dashurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndashdata <- read.csv(temp) %>% \r\n  set_names(c(\"Lacode\", \"name\", \"areaType\", \"date\", \"NIMSpop\", \"Vax1st\", \"Vax2nd\", \"caserate\")) %>% \r\n  mutate(date=as.Date(date), Vax1st=Vax1st/NIMSpop, Vax2nd=Vax2nd/NIMSpop)\r\n\r\nmaxdate=max(dashdata$date[!is.na(dashdata$caserate)])\r\n\r\n#Bring in region\r\ntemp <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLADtoRegion <- read.csv(temp)[,c(1,4)]\r\ncolnames(LADtoRegion) <- c(\"LTLA\", \"Region\")\r\n\r\ndashdata <- dashdata %>% \r\n  merge(LADtoRegion, all.x=TRUE, by.x=\"Lacode\", by.y=\"LTLA\") %>% \r\n  mutate(Region=case_when(\r\n    Lacode %in% c(\"E07000244\", \"E07000245\") ~ \"East of England\",\r\n    Lacode %in% c(\"E06000058\", \"E06000059\", \"E07000246\") ~ \"South West\",\r\n    substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n    substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n    substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\",\r\n    TRUE ~ Region),\r\n    Country=case_when(\r\n      substr(Lacode, 1, 1) == \"E\" ~ \"England\",\r\n      substr(Lacode, 1, 1) == \"W\" ~ \"Wales\",\r\n      substr(Lacode, 1, 1) == \"S\" ~ \"Scotland\",\r\n      substr(Lacode, 1, 1) == \"N\" ~ \"Northern Ireland\")) %>% \r\n  arrange(date)\r\n\r\nagg_tiff(\"Outputs/COVIDCasesvsVaxLTLA.tiff\", units=\"in\", width=9, height=7, res=800)\r\nggplot()+\r\n  geom_path(data=dashdata %>% filter(date>maxdate-days(7)), \r\n            aes(x=caserate, y=Vax1st, group=name, alpha=7-as.integer(maxdate-date)),\r\n            show.legend=FALSE)+\r\n  geom_point(data=dashdata %>% filter(date==maxdate & !is.na(Vax1st)), \r\n             aes(x=caserate, y=Vax1st, fill=Region, size=NIMSpop), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=dashdata %>% filter(date==maxdate), \r\n                  aes(x=caserate, y=Vax1st, label=name), size=rel(2.3),\r\n                  label.padding=1)+\r\n  scale_fill_manual(name=\"\", values=c(\"#C70E7B\", \"#FC6882\", \"#007BC3\", \"#54BCD1\", \"#EF7C12\",\r\n                                      \"Black\", \"#F4B95A\", \"#009F3F\", \"#8FDA04\", \"#AF6125\"))+\r\n  scale_size(guide=FALSE)+\r\n  scale_y_continuous(name=\"Proportion of adults who have received at least one dose\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_x_continuous(name=\"Cases per 100,000 population in the past week\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title.position=\"plot\", plot.caption.position = \"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)))+\r\n  labs(title=\"Areas with high COVID case rates have fairly average vaccine coverage\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nInspired by Russ Garrett (@russss)\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesvsVax2LTLA.tiff\", units=\"in\", width=9, height=7, res=800)\r\nggplot()+\r\n  geom_path(data=dashdata %>% filter(date>maxdate-days(7)), \r\n            aes(x=caserate, y=Vax2nd, group=name, alpha=7-as.integer(maxdate-date)),\r\n            show.legend=FALSE)+\r\n  geom_point(data=dashdata %>% filter(date==maxdate & !is.na(Vax2nd)), \r\n             aes(x=caserate, y=Vax2nd, fill=Region, size=NIMSpop), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=dashdata %>% filter(date==maxdate), \r\n                  aes(x=caserate, y=Vax2nd, label=name), size=rel(2.3),\r\n                  label.padding=1)+\r\n  scale_fill_manual(name=\"\", values=c(\"#C70E7B\", \"#FC6882\", \"#007BC3\", \"#54BCD1\", \"#EF7C12\",\r\n                                      \"Black\", \"#F4B95A\", \"#009F3F\", \"#8FDA04\", \"#AF6125\"))+\r\n  scale_size(guide=FALSE)+\r\n  scale_y_continuous(name=\"Proportion of adults who have received two doses\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_x_continuous(name=\"Cases per 100,000 population in the past week\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title.position=\"plot\", plot.caption.position = \"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)))+\r\n  labs(title=\"Areas with high COVID case rates have fairly average vaccine coverage\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nInspired by Russ Garrett (@russss)\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#MSOA-level version (England only)\r\ntemp <- tempfile()\r\nvaxurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-10-June-2021.xlsx\"\r\ntemp <- curl_download(url=vaxurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nmsoadata <- read_excel(temp, sheet=\"MSOA\", range=\"B16:S6806\", col_names=FALSE) %>% \r\n  mutate(Vax1st=`...7`+`...8`+`...9`+`...10`+`...11`+`...12`+`...13`+`...14`+`...15`+`...16`+\r\n           `...17`+`...18`) %>% \r\n  select(c(2,5,6,19)) %>% \r\n  set_names(c(\"Region\", \"code\", \"name\", \"Vax1st\"))\r\n  \r\n#NIMS populations\r\npop <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"U16:AJ6806\", col_names=FALSE) %>% \r\n  select(c(1, 16)) %>% \r\n  set_names(c(\"code\", \"pop\"))\r\n\r\n#MSOA-level cases\r\ntemp <- tempfile()\r\nMSOArateurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\ntemp <- curl_download(url=MSOArateurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nMSOAcases <- read.csv(temp) %>% \r\n  filter(date==max(date))\r\n\r\nMSOAdata <- msoadata %>% \r\n  merge(pop, by=\"code\") %>% \r\n  merge(MSOAcases, by.x=\"code\", by.y=\"areaCode\", all.x=TRUE) %>% \r\n  mutate(cases=if_else(is.na(newCasesBySpecimenDateRollingRate), 0, \r\n                       newCasesBySpecimenDateRollingRate),\r\n         vaxprop=Vax1st/pop,\r\n         date=as.Date(date))\r\n\r\nagg_tiff(\"Outputs/COVIDCasesvsVaxMSOA.tiff\", units=\"in\", width=9, height=7, res=800)\r\nggplot()+\r\n  geom_point(data=MSOAdata %>% filter(date==maxdate & !is.na(Vax1st)), \r\n             aes(x=cases, y=vaxprop, fill=Region, size=pop), shape=21, alpha=0.7)+\r\n  #geom_text_repel(data=MSOAdata %>% filter(date==maxdate), \r\n  #                aes(x=cases, y=vaxprop, label=name), size=rel(2.3),\r\n  #                label.padding=1)+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  scale_size(guide=FALSE)+\r\n  scale_y_continuous(name=\"Proportion of adults who have received at least one dose\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_x_continuous(name=\"Cases per 100,000 population in the past week\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title.position=\"plot\", plot.caption.position = \"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)))+\r\n  labs(title=\"Areas with high COVID case rates have fairly average vaccine coverage\",\r\n       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.\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nInspired by Russ Garrett (@russss)\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCasesxVaxxAge.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(scales)\r\nlibrary(ggrepel)\r\nlibrary(ggridges)\r\nlibrary(ungroup)\r\nlibrary(lubridate)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Have to download these two metrics separately for some reason?\r\ntemp <- tempfile()\r\nsourcevax <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=sourcevax, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read.csv(temp) %>% \r\n  select(date, age, newPeopleVaccinatedFirstDoseByVaccinationDate,\r\n         newPeopleVaccinatedSecondDoseByVaccinationDate,\r\n         newPeopleVaccinatedThirdInjectionByVaccinationDate,\r\n         newPeopleVaccinatedSpring22ByVaccinationDate,\r\n         newPeopleVaccinatedAutumn22ByVaccinationDate) %>% \r\n  set_names(\"date\", \"age\", \"dose1\", \"dose2\", \"dose3\", \"spring22\", \"autumn22\") %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  #Some fuckery to crudely align the age bands, assuming equal coverage *within* each\r\n  #age band in the vaccination data\r\n  pivot_wider(names_from=age, values_from=c(dose1, dose2, dose3, spring22, autumn22), \r\n              names_sep=\"__\") %>% \r\n  mutate(across(starts_with(\"spring22\"), ~replace_na(., 0)),\r\n         across(starts_with(\"autumn22\"), ~replace_na(., 0)),\r\n         dose1__10_14=dose1__12_15*0.75, dose2__10_14=dose2__12_15*0.75, \r\n         dose3__10_14=dose3__12_15*0.75, spring22__10_14=spring22__05_11*2/7+spring22__12_15*0.75,\r\n         autumn22__10_14=autumn22__05_11*2/7+autumn22__12_15*0.75,\r\n         dose1__15_19=dose1__12_15*0.25+dose1__16_17+dose1__18_24*2/7,\r\n         dose2__15_19=dose2__12_15*0.25+dose2__16_17+dose2__18_24*2/7,\r\n         dose3__15_19=dose3__12_15*0.25+dose3__16_17+dose3__18_24*2/7,\r\n         spring22__15_19=spring22__12_15*0.25+spring22__16_17+spring22__18_24*2/7,\r\n         autumn22__15_19=autumn22__12_15*0.25+autumn22__16_17+autumn22__18_24*2/7,\r\n         dose1__20_24=dose1__18_24*5/7, dose2__20_24=dose2__18_24*5/7,\r\n         dose3__20_24=dose3__18_24*5/7, spring22__20_24=spring22__18_24*5/7,\r\n         autumn22__20_24=autumn22__18_24*5/7) %>% \r\n  pivot_longer(cols=c(2:ncol(.)), names_to=c(\"dose\", \"age\"), names_sep=\"__\") %>% \r\n  filter(!age %in% c(\"12_15\", \"16_17\", \"18_24\")) %>% \r\n  spread(dose, value)\r\n\r\n#Case data\r\nsourcecases <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=sourcecases, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read.csv(temp) %>% \r\n  filter(!age %in% c(\"unassigned\", \"00_59\", \"60+\")) %>% \r\n  select(date, age, cases) %>% \r\n  mutate(date=as.Date(date))\r\n\r\n#Deaths data\r\nsourcedeaths <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newDeaths28DaysByDeathDateAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=sourcedeaths, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndeathsdata <- read.csv(temp) %>% \r\n  filter(!age %in% c(\"00_59\", \"60+\")) %>% \r\n  select(date, age, deaths) %>% \r\n  mutate(date=as.Date(date))\r\n\r\n#Combine (avoiding missing date/age combinations because of faff reasons)  \r\ndata <- data.frame(date=rep(seq.Date(from=min(min(deathsdata$date), min(casedata$date), \r\n                                          min(vaxdata$date)),\r\n                                 to=max(max(deathsdata$date), max(casedata$date), \r\n                                        max(vaxdata$date)), \"days\"), \r\n                       each=length(unique(casedata$age)))) %>% \r\n  mutate(age=rep(unique(casedata$age), \r\n                 times=length(seq.Date(from=min(min(deathsdata$date), min(casedata$date), \r\n                                                                      min(vaxdata$date)),\r\n                                       to=max(max(deathsdata$date), max(casedata$date), \r\n                                                                    max(vaxdata$date)), \r\n                                       \"days\")))) %>% \r\n  merge(casedata, all=TRUE) %>% \r\n  merge(vaxdata, all=TRUE) %>% \r\n  merge(deathsdata, all=TRUE) %>% \r\n  mutate(dose1=if_else(is.na(dose1), 0, dose1),\r\n         dose2=if_else(is.na(dose2), 0, dose2),\r\n         dose3=if_else(is.na(dose3), 0, dose3),\r\n         spring22=replace_na(spring22, 0),\r\n         autumn22=replace_na(autumn22, 0)) %>% \r\n  #Calculate rolling avg cases and cumulative vax doses\r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(cases_roll=roll_mean(cases, 7, align=\"center\", fill=NA),\r\n         deaths_roll=roll_mean(deaths, 7, align=\"center\", fill=NA),\r\n         cum_dose1=cumsum(dose1), cum_dose2=cumsum(dose2),\r\n         cum_dose3=cumsum(dose3), cumspring22=cumsum(spring22),\r\n         cumautumn22=cumsum(autumn22)) %>% \r\n  ungroup()\r\n\r\n#Bring in populations for rates\r\nurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nONSpop <- read_excel(temp, sheet=\"MYE2 - Persons\", range=\"E8:CQ12\") %>% \r\n  slice_tail() %>% \r\n  gather(age, pop, c(1:ncol(.))) %>% \r\n  mutate(age=as.numeric(substr(age, 1, 2)),\r\n         age=case_when(\r\n           age<5 ~ \"00_04\",\r\n           age<10 ~ \"05_09\",\r\n           age<15 ~ \"10_14\",\r\n           age<20 ~ \"15_19\",\r\n           age<25 ~ \"20_24\",\r\n           age<30 ~ \"25_29\",\r\n           age<35 ~ \"30_34\",\r\n           age<40 ~ \"35_39\",\r\n           age<45 ~ \"40_44\",\r\n           age<50 ~ \"45_49\",\r\n           age<55 ~ \"50_54\",\r\n           age<60 ~ \"55_59\",\r\n           age<65 ~ \"60_64\",\r\n           age<70 ~ \"65_69\",\r\n           age<75 ~ \"70_74\",\r\n           age<80 ~ \"75_79\",\r\n           age<85 ~ \"80_84\",\r\n           age<90 ~ \"85_89\",\r\n           TRUE ~ \"90+\")) %>% \r\n  group_by(age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\nfinaldata <- data %>% \r\n  merge(ONSpop, all=TRUE) %>% \r\n  mutate(caserate_roll=cases_roll*100000/pop,\r\n         deathrate_roll=deaths_roll*100000/pop,\r\n         dose1prop=cum_dose1/pop,\r\n         dose2prop=cum_dose2/pop,\r\n         dose3prop=cum_dose3/pop, spring22prop=cumspring22/pop,\r\n         autumn22prop=cumautumn22/pop) %>% \r\n  #Pick out Dec20/Jan21 peak\r\n  group_by(age) %>% \r\n  mutate(casepeak=max(caserate_roll[date>as.Date(\"2020-10-01\") & \r\n                                      date<as.Date(\"2021-02-01\")]),\r\n         deathpeak=max(deathrate_roll[date>as.Date(\"2020-10-01\") & \r\n                                      date<as.Date(\"2021-02-01\")])) %>% \r\n  ungroup() %>% \r\n  mutate(caseproppeak=caserate_roll/casepeak,\r\n         deathproppeak=deathrate_roll/deathpeak)\r\n\r\nagg_tiff(\"Outputs/COVIDBoostersxAgevsCases.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot()+\r\n  geom_hline(yintercept=1, linetype=2, colour=\"Grey60\")+\r\n  geom_line(data=finaldata %>% filter(date>as.Date(\"2021-09-10\") & \r\n                                        !age %in% c(\"00_04\", \"05_09\",\"10_14\")), \r\n            aes(x=date, y=caseproppeak, group=age, colour=dose3prop))+\r\n  geom_text_repel(data=finaldata %>% filter(date==max(date[!is.na(caseproppeak)]) & \r\n                                              !age %in% c(\"00_04\", \"05_09\",\"10_14\")),\r\n    aes(x=max(date[!is.na(caseproppeak)]), y=caseproppeak, label = age, colour=dose3prop),\r\n    family = \"Lato\", direction = \"y\", xlim = c(as.Date(\"2021-12-10\"), NA),\r\n    hjust = 0, segment.size = .7, segment.alpha = .5, segment.linetype = \"dotted\",\r\n    box.padding = .3, segment.curvature = -0.1, segment.ncp = 3, segment.angle = 20) +\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"COVID cases as a proportion of their Dec 20/Jan21 peak\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA),\r\n                     breaks=c(0,0.25,0.5,0.75,1,1.25))+\r\n  scale_colour_paletteer_c(\"ggthemes::Red-Green Diverging\", name=\"Booster coverage\",\r\n                           limits=c(0,1), labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Boosters have been doing a great job against Delta transmission\",\r\n       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+\",\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDBoostersxAgevsCasesDark.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot()+\r\n  geom_hline(yintercept=1, linetype=2, colour=\"Grey40\")+\r\n  geom_line(data=finaldata %>% filter(date>as.Date(\"2021-09-10\") & \r\n                                        !age %in% c(\"00_04\", \"05_09\",\"10_14\")), \r\n            aes(x=date, y=caseproppeak, group=age, colour=dose3prop))+\r\n  geom_text_repel(data=finaldata %>% filter(date==max(date[!is.na(caseproppeak)]) & \r\n                                              !age %in% c(\"00_04\", \"05_09\",\"10_14\")),\r\n                  aes(x=max(date[!is.na(caseproppeak)]), y=caseproppeak, label = age, colour=dose3prop),\r\n                  family = \"Lato\", direction = \"y\", xlim = c(as.Date(\"2021-12-10\"), NA),\r\n                  hjust = 0, segment.size = .7, segment.alpha = .5, segment.linetype = \"dotted\",\r\n                  box.padding = .3, segment.curvature = -0.1, segment.ncp = 3, segment.angle = 20) +\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"COVID cases as a proportion of their Dec 20/Jan21 peak\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA),\r\n                     breaks=c(0,0.25,0.5,0.75,1,1.25))+\r\n  scale_colour_paletteer_c(\"viridis::magma\", name=\"Booster coverage\",\r\n                           limits=c(0,1), labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\", plot.background=element_rect(fill=\"Grey20\", \r\n                                                            colour=\"Grey20\"),\r\n        panel.background=element_rect(fill=\"Grey20\", \r\n                                      colour=\"Grey20\"),\r\n        legend.background=element_rect(fill=\"Grey20\", \r\n                                       colour=\"Grey20\"),\r\n        text=element_text(colour=\"cornsilk\"),\r\n        axis.text=element_text(colour=\"cornsilk\"))+\r\n  guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                 barwidth = unit(20, 'lines'), \r\n                                 barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Boosters have been doing a great job against Delta transmission\",\r\n       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+\",\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDBoostersxAgevsCasesFacet.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot()+\r\n  geom_hline(yintercept=1, linetype=2, colour=\"Grey60\")+\r\n  geom_line(data=finaldata %>% filter(date>as.Date(\"2021-09-10\") & \r\n                                        !age %in% c(\"00_04\", \"05_09\",\"10_14\")), \r\n            aes(x=date, y=caseproppeak, group=age, colour=dose3prop))+\r\n  \r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"COVID cases as a proportion of their Dec 20/Jan21 peak\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA),\r\n                     breaks=c(0,0.25,0.5,0.75,1,1.25))+\r\n  scale_colour_paletteer_c(\"ggthemes::Red-Green Diverging\", name=\"Booster coverage\",\r\n                           limits=c(0,1), labels=label_percent(accuracy=1))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                 barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Boosters have been doing a great job against Delta transmission\",\r\n       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+\",\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDBoostersxAgevsDeaths.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot()+\r\n  #geom_hline(yintercept=1, linetype=2, colour=\"Grey60\")+\r\n  geom_line(data=finaldata %>% filter(date>as.Date(\"2021-09-10\") & \r\n                                        !age %in% c(\"00_04\", \"05_09\",\"10_14\", \"15_19\", \r\n                                                    \"20_24\", \"25_29\", \"30_34\", \"35_39\")), \r\n            aes(x=date, y=deathproppeak, group=age, colour=dose3prop))+\r\n  geom_text_repel(data=finaldata %>% filter(date==max(date[!is.na(deathproppeak)]) & \r\n                                              !age %in% c(\"00_04\", \"05_09\",\"10_14\", \"15_19\", \r\n                                                          \"20_24\", \"25_29\", \"30_34\", \"35_39\")),\r\n                  aes(x=max(date[!is.na(deathproppeak)]), y=deathproppeak, label = age, colour=dose3prop),\r\n                  family = \"Lato\", direction = \"y\", xlim = c(as.Date(\"2021-12-10\"), NA),\r\n                  hjust = 0, segment.size = .7, segment.alpha = .5, segment.linetype = \"dotted\",\r\n                  box.padding = .3, segment.curvature = -0.1, segment.ncp = 3, segment.angle = 20) +\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"COVID deaths as a proportion of their Dec 20/Jan21 peak\",\r\n                     labels=label_percent(accuracy=1), limits=c(0,NA))+\r\n  scale_colour_paletteer_c(\"ggthemes::Red-Green Diverging\", name=\"Booster coverage\",\r\n                           limits=c(0,1), labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(colour = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                 barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Boosters have been effective at limiting deaths due to Delta\",\r\n       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+\",\r\n       caption=\"Data from coronavirus.data.gov.uk and ONS | Inspired by @jburnmurdoch | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n##########################\r\n#Ridgeplots of vaccination age profiles by week\r\n#Heavily inspired by this wonderful plot \r\n#https://twitter.com/MathiasLeroy_/status/1470785658537062407\r\n#from Mathias Leroy\r\n\r\nridgedata <- finaldata %>% \r\n  filter(!age %in% c(\"50+\", \"75+\", \"05_11\")) %>% \r\n  select(date, age, dose1, dose2, dose3, spring22, autumn22) %>% \r\n  filter(date>as.Date(\"2020-12-01\")) %>% \r\n  gather(dose, no, c(dose1, dose2, dose3, spring22, autumn22)) %>% \r\n  mutate(contage=case_when(\r\n    age==\"00_04\" ~ 2, age==\"05_09\" ~ 7, age==\"10_14\" ~ 12, age==\"15_19\" ~ 17,\r\n    age==\"20_24\" ~ 22, age==\"25_29\" ~ 27, age==\"30_34\" ~ 32, age==\"35_39\" ~ 37,\r\n    age==\"40_44\" ~ 42, age==\"45_49\" ~ 47, age==\"50_54\" ~ 52, age==\"55_59\" ~ 57,\r\n    age==\"60_64\" ~ 62, age==\"65_69\" ~ 67, age==\"70_74\" ~ 72, age==\"75_79\" ~ 77,\r\n    age==\"80_84\" ~ 82, age==\"85_89\" ~ 87, age==\"90+\" ~ 92),\r\n    week=case_when(\r\n      year(date)==2020 ~ week(date), \r\n      year(date)==2021 ~ week(date)+53,\r\n      TRUE ~ week(date)+105)) %>% \r\n  group_by(contage, week, dose) %>% \r\n  summarise(no=sum(no)) %>% \r\n  ungroup() %>% \r\n  mutate(dose=factor(dose, levels=c(\"dose1\", \"dose2\", \"dose3\", \"spring22\", \"autumn22\")))\r\n\r\n\r\nagg_tiff(\"Outputs/COVIDVaxRidgesxAgexDose.tiff\", units=\"in\", width=8, height=8, res=500)\r\nggplot(ridgedata, aes(x=contage, y=fct_rev(as.factor(week)), height=no, fill=dose))+\r\n  geom_density_ridges(stat=\"identity\", scale=10, alpha=0.3, colour=NA)+\r\n  scale_x_continuous(name=\"Age\", limits=c(0,95))+\r\n  scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101, 106, 110, 114,\r\n                            118, 123, 127, 131, 136, 140),\r\n                   labels=c(\"Dec\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                            \"Oct\", \"Nov\", \"Dec\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \r\n                            \"Aug\", \"Sep\"), name=\"\")+\r\n  scale_fill_paletteer_d(\"lisa::AndyWarhol_2\", name=\"Dose\", \r\n                         labels=c(\"1st dose\", \"2nd dose\", \"3rd dose/booster\",\r\n                                  \"Spring booster\", \"Autumn booster\"))+\r\n  theme_custom()+\r\n  theme(axis.line.y=element_blank())+\r\n  labs(title=\"Vaccine rollout down the age groups\",\r\n       subtitle=\"Age distribution of COVID vaccines delivered each week in England by dose\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Alternative version interpolating the age groups to give (hopefully) smoother\r\nsmoothdata <- finaldata %>% \r\n  filter(!age %in% c(\"50+\", \"75+\", \"05_11\")) %>% \r\n  select(date, age, dose1, dose2, dose3, spring22, autumn22) %>% \r\n  filter(date>as.Date(\"2020-12-01\")) %>% \r\n  gather(dose, no, c(dose1, dose2, dose3, spring22, autumn22)) %>% \r\n  mutate(contage=case_when(\r\n    age==\"00_04\" ~ 0, age==\"05_09\" ~ 5, age==\"10_14\" ~ 10, age==\"15_19\" ~ 15,\r\n    age==\"20_24\" ~ 20, age==\"25_29\" ~ 25, age==\"30_34\" ~ 30, age==\"35_39\" ~ 35,\r\n    age==\"40_44\" ~ 40, age==\"45_49\" ~ 45, age==\"50_54\" ~ 50, age==\"55_59\" ~ 55,\r\n    age==\"60_64\" ~ 60, age==\"65_69\" ~ 65, age==\"70_74\" ~ 70, age==\"75_79\" ~ 75,\r\n    age==\"80_84\" ~ 80, age==\"85_89\" ~ 85, age==\"90+\" ~ 90),\r\n    week=case_when(\r\n      year(date)==2020 ~ week(date), \r\n      year(date)==2021 ~ week(date)+53,\r\n      TRUE ~ week(date)+105)) %>% \r\n  #filter(dose==\"dose1\" & week==\"55\") %>% \r\n  group_by(age, contage, week, dose) %>% \r\n  summarise(no=sum(no)) %>% \r\n  ungroup() %>% \r\n  merge(ONSpop)%>% \r\n  mutate(dose=factor(dose, levels=c(\"dose1\", \"dose2\", \"dose3\", \"spring22\", \"autumn22\")))\r\n\r\nsmootheddata <- data.frame(dose=character(), week=integer(), age=integer(),\r\n                            smoothedno=double())\r\n\r\n#First smooth out first 3 doses\r\nfor(i in c(\"dose1\", \"dose2\", \"dose3\")){\r\n  for(j in min(smoothdata$week):max(smoothdata$week)){\r\n    working <- smoothdata %>% \r\n      filter(dose==i & week==j) %>% \r\n      mutate(no=if_else(no==0, 0.001, no))\r\n    x <- working$contage\r\n    y <- working$no\r\n    offset <- working$pop\r\n    nlast <- 21\r\n    \r\n    smoothed <- pclm(x, y, nlast)\r\n    \r\n    outputs <- as.data.frame(smoothed$fitted) %>% \r\n      mutate(dose=i, week=j, age=0:110) %>% \r\n      rename(\"smoothedno\"=\"smoothed$fitted\")\r\n    \r\n    smootheddata=smootheddata %>% bind_rows(outputs)\r\n  }\r\n}\r\n\r\n#Add in spring boosters (only available to over 75s)\r\nfor(j in c(117:140)){\r\n  working <- smoothdata %>% \r\n    filter(dose==\"spring22\" & week==j & contage>=75) %>% \r\n    mutate(no=if_else(no==0, 0.001, no))\r\n  x <- working$contage\r\n  y <- working$no\r\n  offset <- working$pop\r\n  nlast <- 21\r\n  \r\n  smoothed <- pclm(x, y, nlast)\r\n  \r\n  outputs <- as.data.frame(smoothed$fitted) %>% \r\n    mutate(dose=\"spring22\", week=j, age=75:110) %>% \r\n    rename(\"smoothedno\"=\"smoothed$fitted\")\r\n  \r\n  smootheddata=smootheddata %>% bind_rows(outputs)\r\n}\r\n\r\n#Add in autumn boosters (only available to over 50s)\r\nfor(j in c(140:max(smoothdata$week))){\r\n  working <- smoothdata %>% \r\n    filter(dose==\"autumn22\" & week==j & contage>=50) %>% \r\n    mutate(no=if_else(no==0, 0.001, no))\r\n  x <- working$contage\r\n  y <- working$no\r\n  offset <- working$pop\r\n  nlast <- 21\r\n  \r\n  smoothed <- pclm(x, y, nlast)\r\n  \r\n  outputs <- as.data.frame(smoothed$fitted) %>% \r\n    mutate(dose=\"autumn22\", week=j, age=50:110) %>% \r\n    rename(\"smoothedno\"=\"smoothed$fitted\")\r\n  \r\n  smootheddata=smootheddata %>% bind_rows(outputs)\r\n}\r\n\r\nsmootheddata <- smootheddata %>% \r\n  mutate(dose=factor(dose, levels=c(\"dose1\", \"dose2\", \"dose3\", \"spring22\", \"autumn22\")))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxRidgesxAgexDoseSmoothed.tiff\", units=\"in\", width=8, height=8, res=500)\r\nggplot(smootheddata, aes(x=age, y=fct_rev(as.factor(week)), height=smoothedno, fill=dose,\r\n                         colour=dose))+\r\n  geom_density_ridges(stat=\"identity\", scale=10, alpha=0.4, rel_min_height=0.01)+\r\n  geom_segment(aes(x = 5, y = 35, xend = 5, yend = 25),\r\n               arrow = arrow(length = unit(0.3, \"cm\")), colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Age\", limits=c(0,105))+\r\n  scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101, 106, 110, 114,\r\n                            118, 123, 127, 131, 136, 140, 144),\r\n                   labels=c(\"Dec\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                            \"Oct\", \"Nov\", \"Dec\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \r\n                            \"Aug\", \"Sep\", \"Oct\"), name=\"\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_tricolor\", name=\"Dose\", \r\n                         labels=c(\"1st dose\", \"2nd dose\", \"3rd dose/booster\",\r\n                                  \"Spring booster\", \"Autumn booster\"))+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_tricolor\", guide=\"none\")+\r\n  annotate(\"text\", x=2, y=30, angle=90, label=\"More recent\", family=\"Lato\", colour=\"Grey40\")+\r\n  annotate(\"text\", x=0, y=38, label=\"2022\", family=\"Lato\", colour=\"Grey40\", size=rel(3))+\r\n  annotate(\"text\", x=0, y=90, label=\"2021\", family=\"Lato\", colour=\"Grey40\", size=rel(3))+\r\n  theme_custom()+\r\n  theme(axis.line.y=element_blank())+\r\n  labs(title=\"Vaccine rollout down the age groups\",\r\n       subtitle=\"Age distribution of COVID vaccines delivered each week in England by dose\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxRidgesxAgexDoseSmoothedv2.tiff\", units=\"in\", width=8, height=8, res=500)\r\nggplot(smootheddata, aes(x=age, y=fct_rev(as.factor(week)), height=smoothedno, fill=dose))+\r\n  geom_density_ridges(stat=\"identity\", scale=10, alpha=0.4, rel_min_height=0.01, colour=NA)+\r\n  geom_segment(aes(x = 5, y = 35, xend = 5, yend = 25),\r\n               arrow = arrow(length = unit(0.3, \"cm\")), colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Age\", limits=c(0,105))+\r\n  scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101, 106, 110, 114,\r\n                            118, 123, 127, 131, 136, 140, 144),\r\n                   labels=c(\"Dec\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                            \"Oct\", \"Nov\", \"Dec\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \r\n                            \"Aug\", \"Sep\", \"Oct\"), name=\"\")+\r\n  scale_fill_paletteer_d(\"fishualize::Scarus_tricolor\", name=\"Dose\", \r\n                         labels=c(\"1st dose\", \"2nd dose\", \"3rd dose/booster\",\r\n                                  \"Spring booster\", \"Autumn booster\"))+\r\n  annotate(\"text\", x=2, y=30, angle=90, label=\"More recent\", family=\"Lato\", colour=\"Grey40\")+\r\n  annotate(\"text\", x=0, y=43, label=\"2022\", family=\"Lato\", colour=\"Grey40\", size=rel(3))+\r\n  annotate(\"text\", x=0, y=95, label=\"2021\", family=\"Lato\", colour=\"Grey40\", size=rel(3))+\r\n  theme_custom()+\r\n  theme(axis.line.y=element_blank())+\r\n  labs(title=\"Vaccine rollout down the age groups\",\r\n       subtitle=\"Age distribution of COVID vaccines delivered each week in England by dose\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxRidgesxAgexDoseSmoothedv3.tiff\", units=\"in\", width=8, height=8, res=500)\r\nggplot(smootheddata, aes(x=age, y=as.factor(week), height=smoothedno, fill=dose))+\r\n  geom_density_ridges(stat=\"identity\", scale=10, alpha=0.4, colour=NA)+\r\n  geom_segment(aes(x = 5, y = 25, xend = 5, yend = 35),\r\n               arrow = arrow(length = unit(0.3, \"cm\")), colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Age\", limits=c(0,105))+\r\n  scale_y_discrete(breaks=c(49, 54, 58, 62, 67, 71, 75, 79, 84, 88, 93, 97, 101),\r\n                   labels=c(\"Dec\\n2020\", \"Jan\\n2021\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                            \"Oct\", \"Nov\", \"Dec\"), name=\"\")+\r\n  scale_fill_paletteer_d(\"lisa::AndyWarhol_2\", name=\"Dose\", \r\n                         labels=c(\"1st dose\", \"2nd dose\", \"3rd dose/booster\"))+\r\n  annotate(\"text\", x=3, y=30, label=\"More recent\", family=\"Lato\", colour=\"Grey40\")+\r\n  theme_custom()+\r\n  theme(axis.line.y=element_blank())+\r\n  labs(title=\"Vaccine rollout down the age groups\",\r\n       subtitle=\"Age distribution of COVID vaccines delivered each week in England by dose\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Inspired by @MathiasLeroy_ | Plot by @VictimOfMaths\")+\r\n  coord_flip()\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCycle.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(ukcovid19) #remotes::install_github(\"publichealthengland/coronavirus-dashboard-api-R-sdk\")\r\nlibrary(paletteer)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\n\r\noptions(scipen=9999)\r\n\r\nadmissions <- get_data(filters=\"areaType=nation\", structure=list(date=\"date\",\r\n                                                             name=\"areaName\",\r\n                                                             admissions=\"newAdmissions\"))\r\n\r\nadmissions <- admissions %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date>as.Date(\"2020-03-19\"))\r\n\r\ndeaths <- get_data(filters=\"areaType=nation\", structure=list(date=\"date\",\r\n                                                             name=\"areaName\",\r\n                                                             deaths=\"newDeaths28DaysByDeathDate\"))\r\n\r\ndeaths <- deaths %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date>as.Date(\"2020-03-19\"))\r\n\r\ndata <- merge(admissions, deaths) %>% \r\n  mutate(days=yday(date), weekno=if_else(year(date)==2020, week(date), week(date)+52), pop=case_when(\r\n    name==\"England\" ~ 56286961,\r\n    name==\"Northern Ireland\" ~ 1893667,\r\n    name==\"Scotland\" ~ 5463300,\r\n    name==\"Wales\" ~ 3152879),\r\n    admrate=admissions*100000/pop, mortrate=deaths*100000/pop) %>% \r\n  arrange(date)\r\n\r\nweekdata <- data %>% \r\n  group_by(weekno, name) %>% \r\n  summarise(admissions=mean(admissions), deaths=mean(deaths),\r\n            admrate=mean(admrate), mortrate=mean(mortrate)) %>% \r\n  mutate(label=as.Date(\"2020-01-01\")+days(weekno)*7-1, label=format(label, \"%d %b %y\")) %>% \r\n  ungroup() %>% \r\n  #Pull out every 4th week for labelling, making sure the most recent week is always labelled\r\n  #I bet there is a more elegant solution than this, but I just learned that %% does, so I am unrepentant\r\n  group_by(name) %>% \r\n  arrange(-weekno) %>% \r\n  mutate(flag=(max(weekno)-weekno) %% 4) %>% \r\n  ungroup() %>% \r\n  arrange(weekno)\r\n  \r\n#Faceted plot for UK nations\r\ntiff(\"Outputs/COVIDCycleUK.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot()+\r\n  geom_path(data=data, aes(x=admrate, y=mortrate), alpha=0.1,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=weekdata, aes(x=admrate, y=mortrate), colour=\"tomato\",\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_text(data=weekdata %>% filter(flag==0), \r\n            aes(x=admrate, y=mortrate, label=label), size=rel(2), colour=\"Grey40\",\r\n            vjust=-0.4)+\r\n  scale_x_continuous(trans=\"log10\", name=\"Daily COVID-19 admissions per 100,000 (log scale)\")+\r\n  scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths per 100,000 (log scale)\")+\r\n  facet_wrap(~name)+\r\n  theme_classic()+\r\n  theme(plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Going round in circles\",\r\n       subtitle=\"New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test across the UK <span style='color:Grey60;'>by day</span> and <span style='color:tomato;'>the weekly average\",\r\n       caption=\"Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Plot for England only\r\nEngCycle <- ggplot()+\r\n  geom_path(data=subset(data, name==\"England\"), aes(x=admissions, y=deaths), alpha=0.1,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=subset(weekdata, name==\"England\"), aes(x=admissions, y=deaths), colour=\"tomato\",\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_text(data=weekdata %>% filter(name==\"England\" & flag==0), \r\n            aes(x=admissions, y=deaths, label=label), size=rel(2), colour=\"Grey40\",\r\n            vjust=-0.4)+\r\n scale_x_continuous(trans=\"log10\", name=\"Daily COVID-19 admissions (log scale)\")+\r\n scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths (log scale)\")+\r\n  theme_classic()+\r\n  theme(plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Going round in circles\",\r\n       subtitle=\"New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test<br>in England <span style='color:Grey60;'>by day</span> and <span style='color:tomato;'>the weekly average\",\r\n       caption=\"Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ntiff(\"Outputs/COVIDCycleEng.tiff\", units=\"in\", width=8, height=6, res=500)\r\nEngCycle\r\ndev.off()\r\n\r\npng(\"Outputs/COVIDCycleEng.png\", units=\"in\", width=8, height=6, res=500)\r\nEngCycle\r\ndev.off()\r\n\r\n#Plot for Wales only\r\ntiff(\"Outputs/COVIDCycleWal.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_path(data=subset(data, name==\"Wales\"), aes(x=admissions, y=deaths), alpha=0.1,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=subset(weekdata, name==\"Wales\"), aes(x=admissions, y=deaths), colour=\"tomato\",\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_text(data=weekdata %>% filter(name==\"Wales\" & flag==0), \r\n            aes(x=admissions, y=deaths, label=label), size=rel(2), colour=\"Grey40\",\r\n            vjust=-0.4)+\r\n  scale_x_continuous(trans=\"log10\", name=\"Daily COVID-19 admissions (log scale)\")+\r\n  scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths (log scale)\")+\r\n  theme_classic()+\r\n  theme(plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Going round in circles\",\r\n       subtitle=\"New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test<br>in Wales <span style='color:Grey60;'>by day</span> and <span style='color:tomato;'>the weekly average\",\r\n       caption=\"Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Plot for Scotland only\r\ntiff(\"Outputs/COVIDCycleSco.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_path(data=subset(data, name==\"Scotland\"), aes(x=admissions, y=deaths), alpha=0.1,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=subset(weekdata, name==\"Scotland\"), aes(x=admissions, y=deaths), colour=\"tomato\",\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_text(data=weekdata %>% filter(name==\"Scotland\" & flag==0), \r\n            aes(x=admissions, y=deaths, label=label), size=rel(2), colour=\"Grey40\",\r\n            vjust=-0.4)+\r\n  scale_x_continuous(trans=\"log10\", name=\"Daily COVID-19 admissions (log scale)\")+\r\n  scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths (log scale)\")+\r\n  theme_classic()+\r\n  theme(plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Going round in circles\",\r\n       subtitle=\"New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test<br>in Scotland <span style='color:Grey60;'>by day</span> and <span style='color:tomato;'>the weekly average\",\r\n       caption=\"Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Plot for NI only\r\ntiff(\"Outputs/COVIDCycleNI.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_path(data=subset(data, name==\"Northern Ireland\"), aes(x=admissions, y=deaths), alpha=0.1,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=subset(weekdata, name==\"Northern Ireland\"), aes(x=admissions, y=deaths), colour=\"tomato\",\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_text(data=weekdata %>% filter(name==\"Northern Ireland\" & flag==0), \r\n            aes(x=admissions, y=deaths, label=label), size=rel(2), colour=\"Grey40\",\r\n            vjust=-0.4)+\r\n  scale_x_continuous(trans=\"log10\", name=\"Daily COVID-19 admissions (log scale)\")+\r\n  scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths (log scale)\")+\r\n  theme_classic()+\r\n  theme(plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Going round in circles\",\r\n       subtitle=\"New hospital admissions with positive COVID-19 test and deaths within 28 days of a positive test<br>in Northern Ireland <span style='color:Grey60;'>by day</span> and <span style='color:tomato;'>the weekly average\",\r\n       caption=\"Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Repeat at regional level\r\nadmissions.reg <- get_data(filters=\"areaType=nhsregion\", structure=list(date=\"date\",\r\n                                                                 name=\"areaName\",\r\n                                                                 admissions=\"newAdmissions\"))\r\n\r\nadmissions.reg <- admissions.reg %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date>as.Date(\"2020-03-19\"))\r\n\r\ndeaths.reg <- get_data(filters=\"areaType=region\", structure=list(date=\"date\",\r\n                                                             name=\"areaName\",\r\n                                                             deaths=\"newDeaths28DaysByDeathDate\"))\r\n\r\n#Compress regions to align (more or less) with NHS regions\r\ndeaths.reg <- deaths.reg %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date>as.Date(\"2020-03-19\")) %>% \r\n  mutate(name=case_when(name %in% c(\"East Midlands\", \"West Midlands\") ~ \"Midlands\",\r\n                        name %in% c(\"North East\", \"Yorkshire and The Humber\") ~ \"North East and Yorkshire\",\r\n                        TRUE ~ name)) %>% \r\n  group_by(date, name) %>% \r\n  summarise(deaths=sum(deaths)) %>% \r\n  ungroup()\r\n\r\ndata.reg <- merge(admissions.reg, deaths.reg) %>% \r\n  mutate(days=yday(date), weekno=if_else(year(date)==2020, week(date), week(date)+52), pop=case_when(\r\n    name==\"East of England\" ~ 6236072,\r\n    name==\"London\" ~ 8961989,\r\n    name==\"Midlands\" ~ 4835928+5934037,\r\n    name==\"North East and Yorkshire\" ~ 2669941+5502967,\r\n    name==\"North West\" ~ 7341196,\r\n    name==\"South East\" ~ 9180135,\r\n    name==\"South West\" ~ 5624696),\r\n    admrate=admissions*100000/pop, mortrate=deaths*100000/pop) %>% \r\n  arrange(date)\r\n\r\nweekdata.reg <- data.reg %>% \r\n  group_by(weekno, name) %>% \r\n  summarise(admissions=mean(admissions), deaths=mean(deaths),\r\n            admrate=mean(admrate), mortrate=mean(mortrate)) %>% \r\n  mutate(label=as.Date(\"2020-01-01\")+days(weekno)*7-1, label=format(label, \"%d %b\")) %>% \r\n  ungroup() %>% \r\n  group_by(name) %>% \r\n  arrange(-weekno) %>% \r\n  mutate(flag=(max(weekno)-weekno) %% 4) %>% \r\n  ungroup() %>% \r\n  arrange(weekno)\r\n\r\n#Faceted plot for English regions\r\ntiff(\"Outputs/COVIDCycleReg.tiff\", units=\"in\", width=14, height=8, res=500)\r\nggplot()+\r\n  geom_path(data=data.reg, aes(x=admrate, y=mortrate), alpha=0.1,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=weekdata.reg, aes(x=admrate, y=mortrate), colour=\"tomato\",\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  #geom_text(data=weekdata.reg, aes(x=admrate, y=mortrate, label=label), size=rel(2), colour=\"Grey40\",\r\n  #          vjust=-0.4)+\r\n  scale_x_continuous(trans=\"log10\", name=\"Daily COVID-19 admissions per 100,000 (log scale)\")+\r\n  scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths per 100,000 (log scale)\")+\r\n  facet_wrap(~name)+\r\n  theme_classic()+\r\n  theme(plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Going round in circles\",\r\n       subtitle=\"New hospital admissions with a positive COVID-19 test and deaths within 28 days of a positive test in England England <span style='color:Grey60;'>by day</span> and <span style='color:tomato;'>the weekly average</span>.<br>Admissions data is published for NHS regions while deaths data is at government region level. These geographies are similar but may not overlap perfectly.\",\r\n       caption=\"Inspired by @maartenzam | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDCycle_US.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(paletteer)\nlibrary(geofacet)\nlibrary(ggtext)\nlibrary(ragg)\n\noptions(scipen=999)\n\n#Get US state level COVID-19 admissions data from CDC/COVID-NET\n#https://covidtracking.com/data/download\ntemp <- tempfile()\nsource <- \"https://covidtracking.com/data/download/all-states-history.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\") \n\ndata <- read.csv(temp) %>% \n  select(date, state, deathIncrease, hospitalizedIncrease, hospitalizedCurrently) %>% \n  mutate(date=as.Date(date))\n\n#Bring in populations from Johns Hopkins data\n#https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data\ntemp <- tempfile()\nsource <- \"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/UID_ISO_FIPS_LookUp_Table.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\") \n\npop <- read.csv(temp) %>% \n  filter(iso3==\"USA\" & FIPS %in% c(1:56)) %>% \n  select(Province_State, Population)\n\n#Get state abbreviations\nst_crosswalk <- tibble(Province_State = state.name) %>%\n  bind_cols(tibble(state = state.abb)) %>% \n  bind_rows(tibble(Province_State = \"District of Columbia\", state = \"DC\"))\n\n#Merge them in\npop <- merge(pop, st_crosswalk)\n\ndata <- merge(data, pop)\n\n#Calculate rates\ndata <- data %>% \n  arrange(state, date) %>% \n  mutate(hosprate=hospitalizedIncrease*100000/Population,\n         deathrate=deathIncrease*100000/Population,\n         inhosprate=hospitalizedCurrently*100000/Population,\n         week=if_else(year(date)==2020, week(date), week(date)+52))\n\n#National version\nnatdata <- data %>% \n  group_by(date) %>% \n  summarise(hospitalizedIncrease=sum(hospitalizedIncrease),\n            deathIncrease=sum(deathIncrease),\n            hospitalizedCurrently=sum(hospitalizedCurrently),\n            Population=sum(Population)) %>% \n  mutate(hosprate=hospitalizedIncrease*100000/(Population),\n         deathrate=deathIncrease*100000/(Population),\n         inhosprate=hospitalizedCurrently*100000/Population,\n         week=if_else(year(date)==2020, week(date), week(date)+52))\n\n#generate weekly time series for both\nweekdata <- data %>% \n  group_by(state, week) %>% \n  summarise(hospitalizedIncrease=sum(hospitalizedIncrease),\n            deathIncrease=sum(deathIncrease),\n            hospitalizedCurrently=sum(hospitalizedCurrently),\n            Population=unique(Population)) %>% \n  mutate(hosprate=hospitalizedIncrease*100000/(7*Population),\n         deathrate=deathIncrease*100000/(7*Population),\n         inhosprate=hospitalizedCurrently*100000/(7*Population),\n         label=as.Date(\"2020-03-03\")+days(week-10)*7, \n         label=format(label, \"%d %b\"))\n\nweeknatdata <- natdata %>% \n  group_by(week) %>% \n  summarise(hospitalizedIncrease=sum(hospitalizedIncrease),\n            deathIncrease=sum(deathIncrease),\n            hospitalizedCurrently=sum(hospitalizedCurrently),\n            Population=sum(Population)/7) %>% \n  mutate(hosprate=hospitalizedIncrease*100000/(7*Population),\n         deathrate=deathIncrease*100000/(7*Population),\n         inhosprate=hospitalizedCurrently*100000/(7*Population),\n         label=as.Date(\"2020-03-03\")+days(week-10)*7, \n         label=format(label, \"%d %b\"))\n\n#Plot\nagg_tiff(\"Outputs/COVIDCycleUSA.tiff\", units=\"in\", width=12, height=8, res=500)\nggplot()+\n  geom_path(data=subset(natdata, week>=12), \n            aes(x=hosprate, y=deathrate), colour=\"Grey40\", alpha=0.1,\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\n  geom_path(data=subset(weeknatdata, week>=12), \n            aes(x=hosprate, y=deathrate, colour=week), show.legend=FALSE,# colour=\"tomato\", \n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\n  geom_text(data=subset(weeknatdata, week>=12), \n            aes(x=hosprate, y=deathrate, label=label), size=rel(2), \n            colour=\"Grey40\", vjust=-0.4)+\n  scale_x_continuous(trans=\"log10\", name=\"Number of COVID-19 patients in hospital per 100,000 (log scale)\")+\n  scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths per 100,000 (log scale)\")+\n  scale_colour_paletteer_c(\"pals::ocean.amp\", limits=c(0.75*min(data$week),NA))+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown(), plot.title=element_text(face=\"bold\", size=rel(2)))+\n  labs(title=\"Things in the US are slowly getting better\",\n       subtitle=\"COVID-19 hospitalisations and deaths in the United States <span style='color:Grey60;'>by day</span> and <span style='color:tomato;'>the weekly average\",\n       caption=\"Inspired by @maartenzam | Data from The COVID Tracking Project (CC BY 4.0) | Plot by @VictimOfMaths\")\n\ndev.off()\n\nagg_tiff(\"Outputs/COVIDCycleUSStates.tiff\", units=\"in\", width=14, height=10, res=500)\nggplot(data)+\n  #geom_path(data=subset(data, week>=12), \n  #          aes(x=inhosprate, y=deathrate), colour=\"Grey40\", alpha=0.1,\n  #          arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\n  geom_path(data=subset(weekdata, week>=12), \n            aes(x=inhosprate, y=deathrate, colour=week), show.legend=FALSE)+\n  scale_x_continuous(trans=\"log10\", name=\"Number of COVID-19 patients in hospital per 100,000 (log scale)\")+\n  scale_y_continuous(trans=\"log10\", name=\"Daily COVID-19 deaths per 100,000 (log scale)\")+\n  scale_colour_paletteer_c(\"pals::ocean.amp\")+\n  facet_geo(~state)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.title=element_text(face=\"bold\", size=rel(2)))+\n  labs(title=\"Breaking the cycles\",\n       subtitle=\"COVID-19 hospitalisations and deaths in the United States. Darker colours reflect more recent data\",\n       caption=\"Inspired by @maartenzam | Data from The COVID Tracking Project (CC BY 4.0) | Plot by @VictimOfMaths\")\n\ndev.off()\n"
  },
  {
    "path": "Heatmaps/COVIDDeathsWithFrom.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(scales)\r\nlibrary(ggtext)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Download latest primary diagnosis data\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- as.data.frame(t(read_excel(temp, sheet=\"Weekly figures by cause\", range=\"B19:BA20\", \r\n                                   col_names=FALSE))) %>% \r\n  mutate(date=seq.Date(from=as.Date(\"2021-01-02\"), length.out=nrow(.), by=\"weeks\")) %>% \r\n  set_names(\"total\", \"from\", \"date\") %>% \r\n  mutate(with=total-from) %>% \r\n  gather(cause, deaths, c(\"with\", \"from\")) %>% \r\n  mutate(cause=factor(cause, levels=c(\"with\", \"from\")))\r\n\r\nagg_tiff(\"Outputs/COVIDDeathsWithFrom.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data, aes(x=date, y=deaths, fill=cause))+\r\n  geom_col(position=\"fill\", show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of all deaths reported\", label=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#F89088\", \"#40A0D8\"))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+\r\n  labs(title=\"Most COVID deaths are <span style='color:#40A0D8;'>from</span> not <span style='color:#F89088;'>with</span> COVID\",\r\n       subtitle=\"Proportion of weekly deaths reported in England & Wales that mention COVID on the death certificate<br><span style='color:#40A0D8;'>where COVID was the underlying cause of death</span> or <span style='color:#F89088;'>only mentioned as a contributory cause\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDHFRs.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(scales)\r\nlibrary(lubridate)\r\nlibrary(RcppRoll)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(ragg)\r\n\r\n#Read in admissions data at regional level\r\nadmurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-daily-admissions-and-beds-20210610.xlsx\"\r\nadmrange <- \"BM\"\r\ndeathurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-total-announced-deaths-11-June-2021.xlsx\"\r\ndeathrange <- \"QX\"\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=admurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nadmissions.new <- read_excel(temp, range=paste0(\"B14:\", admrange, \"21\"), \r\n                             col_names=FALSE) %>% \r\n  rename(region=`...1`) %>% \r\n  gather(date, admissions, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\nbeds.new <- read_excel(temp, range=paste0(\"B90:\", admrange, \"97\"), \r\n                       col_names=FALSE)%>% \r\n  rename(region=`...1`)%>% \r\n  gather(date, beds, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\n\r\n#Read in older data\r\nadmurl.old <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-daily-admissions-and-beds-20210406-1.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=admurl.old, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nadmissions.old <- read_excel(temp, range=\"B14:IQ21\", col_names=FALSE)%>% \r\n  rename(region=`...1`)%>% \r\n  gather(date, admissions, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\n\r\nbeds.old <- read_excel(temp, range=\"B90:IQ97\", col_names=FALSE)%>% \r\n  rename(region=`...1`)%>% \r\n  gather(date, beds, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\n\r\nadmissions <- bind_rows(admissions.old, admissions.new) %>% \r\n  arrange(region, date) \r\n\r\n#Bring in deaths\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=deathurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndeaths <- read_excel(temp, sheet=\"Tab1 Deaths by region\",\r\n                     range=paste0(\"B17:\", deathrange, \"25\"), col_names=FALSE) %>% \r\n  rename(region=`...1`) %>% \r\n  gather(date, deaths, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-03-01\")+days(as.numeric(substr(date, 4, 7))-2),\r\n         region=case_when(\r\n           region==\"East Of England\" ~ \"East of England\",\r\n           region==\"North East And Yorkshire\" ~ \"North East and Yorkshire\",\r\n           region==\"England\" ~ \"ENGLAND\",\r\n           TRUE ~ region))\r\n\r\nbeds <- bind_rows(beds.old, beds.new) %>% \r\n  mutate(date=date-days(1)) %>% \r\n  arrange(region, date) %>% \r\n  group_by(region) %>% \r\n  mutate(bedchange=beds-lag(beds, 1)) %>% \r\n  ungroup() %>% \r\n  merge(admissions) %>% \r\n  mutate(exits=admissions-bedchange) %>% \r\n  merge(deaths, all.x=TRUE) %>% \r\n  mutate(deaths=if_else(is.na(deaths), 0, deaths),\r\n         discharges=exits-deaths,\r\n         adm_roll=roll_mean(admissions, n=7, align=\"center\", fill=NA),\r\n         deaths_roll=roll_mean(deaths, n=7, align=\"center\", fill=NA),\r\n         discharges_roll=roll_mean(discharges, n=7, align=\"center\", fill=NA),\r\n         deathstoadm=deaths_roll/adm_roll,\r\n         distoadm=discharges_roll/adm_roll,\r\n         region=if_else(region==\"ENGLAND\", \"England\", region))\r\n\r\nagg_tiff(\"Outputs/COVIDNHSDeathsvsAdm.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(beds %>% filter(region==\"England\"), \r\n       aes(x=date, y=deathstoadm))+\r\n  geom_line(colour=\"#D62828\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of deaths per new admission\", limits=c(0,NA))+\r\n  theme_custom()+\r\n  labs(title=\"The ratio of hospital deaths to admissions with COVID is still low\",\r\n       subtitle=\"Rolling 7-day average of in-hospital COVID deaths divided by the number of new admissions and newly identified\\ncases in hospital\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSDeathsvsAdmxReg.tiff\", units=\"in\", width=10, height=6, res=800)\r\nggplot(beds %>% filter(region!=\"England\"), \r\n       aes(x=date, y=deathstoadm, colour=region))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of deaths per new admission\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"The ratio of hospital deaths to admissions with COVID is still low\",\r\n       subtitle=\"Rolling 7-day average of in-hospital COVID deaths divided by the number of new admissions and newly identified\\ncases in hospital\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDHKVaxxAge.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(lubridate)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(readxl)\r\nlibrary(scales)\r\nlibrary(stringr)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n\r\n#Download HK vaccination data by age and dose from HK gov dashboard\r\nsource <- \"https://static.data.gov.hk/covid-vaccine/bar_age.csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read.csv(temp) %>% \r\n  select(age_group, population, firstDose.total, secondDose.total, thirdDose.total) %>% \r\n  set_names(\"age\", \"pop\", \"Dose1\", \"Dose2\", \"Dose3\") \r\n\r\nareadata <- data %>% \r\n  mutate(unvax=pop-Dose1,\r\n         Dose1only=Dose1-Dose2,\r\n         Dose2only=Dose2-Dose3,\r\n         agemin=case_when(\r\n           age==\"Aged 3-11\" ~ 3,\r\n           TRUE ~ as.numeric(substr(age, 6,7))),\r\n         agemax=case_when(\r\n           age==\"Aged 3-11\" ~ 12,\r\n           age==\"Aged 80 and above\" ~ 100,\r\n           TRUE ~ as.numeric(substr(age, 9,10))+1),\r\n         agewidth=agemax-agemin,\r\n         dose3plot=pop/agewidth,\r\n         dose2plot=(Dose2only+Dose1only+unvax)/agewidth,\r\n         dose1plot=(Dose1only+unvax)/agewidth,\r\n         unvaxplot=unvax/agewidth)\r\n  \r\ntiff(\"Outputs/COVIDVaxxAgeHKArea.tiff\", units=\"in\", width=9, height=6.6, res=500)\r\nggplot(areadata)+\r\n  geom_rect(aes(xmin=0, xmax=unvaxplot, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_rect(aes(xmin=unvaxplot, xmax=dose1plot, ymin=agemin, ymax=agemax), fill=\"#D32934\")+\r\n  geom_rect(aes(xmin=dose1plot, xmax=dose2plot, ymin=agemin, ymax=agemax), fill=\"#2F191B\")+\r\n  geom_rect(aes(xmin=dose2plot, xmax=dose3plot, ymin=agemin, ymax=agemax), fill=\"#2BAA92\")+\r\n  scale_x_continuous(name=\"Number of people at each single year of age\", labels=abs)+\r\n  scale_y_continuous(name=\"Age\", limits=c(0,100))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(colour=\"Black\"))+\r\n  labs(title=\"Hong Kong's vaccination programme has been poorly targeted\",\r\n       subtitle=\"The number of people who are <span style='color:Grey70;'>unvaccinated</span>, or have received <span style='color:#D32934;'>one </span>,<span style='color:#2F191B;'>two </span>or <span style='color:#2BAA92;'>three </span>doses\",\r\n       caption=\"Data from www.covidvaccine.gov.hk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n  \r\nbardata <- data %>% \r\n  mutate(unvax=pop-Dose1) %>% \r\n  gather(Doses, Number, c(3:6)) %>% \r\n  mutate(age=factor(age, levels=c(\"Aged 3-11\", \"Aged 12-19\", \"Aged 20-29\", \"Aged 30-39\",\r\n                                  \"Aged 40-49\", \"Aged 50-59\", \"Aged 60-69\", \"Aged 70-79\",\r\n                                  \"Aged 80 and above\")),\r\n         Doses=factor(Doses, levels=c(\"Dose3\", \"Dose2\", \"Dose1\", \"unvax\")))\r\n\r\ntiff(\"Outputs/COVIDVaxxAgeHK.tiff\", units=\"in\", width=7, height=6, res=500)\r\nggplot(bardata, aes(x=Number, y=age, fill=Doses))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_continuous(name=\"Proportion of population\", labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_manual(values=c(\"#2BAA92\", \"#2F191B\", \"#D32934\", \"Grey70\"), \r\n                    labels=c(\"Booster\", \"2 doses\", \"1 dose\", \"Unvaccinated\"),\r\n                    guide = guide_legend(reverse = TRUE), name=\"\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"Hong Kong has many unvaccinated older people\",\r\n       caption=\"Data from www.covidvaccine.gov.hk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDLACaseData.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(forcats)\nlibrary(cowplot)\nlibrary(ggridges)\nlibrary(geojsonio)\nlibrary(broom)\nlibrary(sf)\nlibrary(scales)\nlibrary(curl)\nlibrary(rmapshaper)\nlibrary(gganimate)\nlibrary(paletteer)\nlibrary(lubridate)\nlibrary(ragg)\nlibrary(extrafont)\n\noptions(scipen=999)\n\ntheme_custom <- function() {\n  theme_classic() %+replace%\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\n                                  margin=margin(0,0,5.5,0)),\n          text=element_text(family=\"Lato\"))\n}\n\n#Read in data created by COVID_LA_Plots/UnderlyingCode.R, which lives here:\n#https://github.com/VictimOfMaths/COVID_LA_Plots/blob/master/UnderlyingCode.R\n\n#data <- read.csv(\"COVID_LA_Plots/LACases.csv\")[,-c(1)]\nload(\"COVID_LA_Plots/Alldata.RData\")\n\nmortdata <- data\ndata <- daydata\n\nrm(daydata)\n\n#EVERYWHERE\ndata.all <- data %>% \n  group_by(name) %>% \n  filter(!Region %in% c(\"Nation\", \"Region\") & !is.na(casesroll_avg)) %>% \n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\n         maxcaseprop=caserate_avg/maxcaserate,\n         totalcases=sum(cases), recentpeak=maxcaseprop[date==as.Date(\"2020-09-15\")],\n         maxadmrate=max(admrate_avg, na.rm=TRUE),\n         maxadmday=date[which(admrate_avg==maxadmrate)][1],\n         maxadmprop=admrate_avg/maxadmrate, totaladm=sum(admissions, na.rm=TRUE))\n\nplotfrom <- \"2020-03-01\"\nplotto <- max(data.all$date)\n\n#Plot case trajectories\ncasetiles.all <- ggplot(data.all, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK\",\n       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.\"),\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")+\n  theme_custom()+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), \n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(size=rel(1.8)))\n\ncasebars.all <- ggplot(subset(data.all, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme_custom()+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLACasesHeatmapUK.tiff\", units=\"in\", width=16, height=30, res=500)\nplot_grid(casetiles.all, casebars.all, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLACasesHeatmapUK.png\", units=\"in\", width=16, height=30, res=500)\nplot_grid(casetiles.all, casebars.all, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#Rate trajectories\n\nratetiles.all <- ggplot(data.all, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 case rates in Local Authorities/Council Areas across the UK\",\n       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.\"),\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\nratebars.all <- ggplot(subset(data.all, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLARatesHeatmapUK.tiff\", units=\"in\", width=16, height=30, res=500)\nplot_grid(ratetiles.all, ratebars.all, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLARatesHeatmapUK.png\", units=\"in\", width=16, height=30, res=500)\nplot_grid(ratetiles.all, ratebars.all, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#EVERYWHERE - SINCE 1ST JULY ONLY\ndata.all.recent <- data %>% \n  group_by(name) %>% \n  mutate(date=as.Date(date)) %>% \n  filter(!Region %in% c(\"Nation\", \"Region\") & !is.na(casesroll_avg) & date>as.Date(\"2020-07-01\")) %>% \n  mutate(maxcaserate=max(caserate_avg),\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\n         maxcaseprop=caserate_avg/maxcaserate,\n         totalcases=sum(cases), recentpeak=maxcaseprop[date==as.Date(\"2020-09-15\")])\n\nplotfrom <- \"2020-07-01\"\nplotto <- max(data.all.recent$date)\n\n#Plot case trajectories\ncasetiles.all.recent <- ggplot(data.all.recent, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK\",\n       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.\"),\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\ncasebars.all.recent <- ggplot(subset(data.all.recent, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\", breaks=c(0,5000,10000))+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLACasesHeatmapUK_Recent.tiff\", units=\"in\", width=10, height=30, res=500)\nplot_grid(casetiles.all.recent, casebars.all.recent, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLACasesHeatmapUK_Recent.png\", units=\"in\", width=16, height=30, res=500)\nplot_grid(casetiles.all.recent, casebars.all.recent, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#########\n#ENGLAND#\n#########\ndata.e <- data %>% \n  group_by(name) %>% \n  filter(country==\"England\" & name!=\"England\" & !is.na(casesroll_avg)) %>% \n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\n         maxcaseprop=caserate_avg/maxcaserate,\n         totalcases=sum(cases), maxadmrate=max(admrate_avg, na.rm=TRUE),\n         maxadmday=date[which(admrate_avg==maxadmrate)][1],\n         maxadmprop=admrate_avg/maxadmrate, totaladm=sum(admissions, na.rm=TRUE))\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-01\"\nplotto <- max(data.e$date)\nplotadmto <- max(data.e$date[!is.na(data.e$admrate_avg)])\n\n#Plot case trajectories\ncasetiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 cases in English Local Authorities\",\n       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.\"),\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\ncasebars.e <- ggplot(subset(data.e, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLACasesHeatmap.tiff\", units=\"in\", width=16, height=26, res=500)\nplot_grid(casetiles.e, casebars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLACasesHeatmap.png\", units=\"in\", width=16, height=26, res=500)\nplot_grid(casetiles.e, casebars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nratetiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 case rates in Local Authorities in England\",\n       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.\"),\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\nratebars.e <- ggplot(subset(data.e, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLARatesHeatmapEng.tiff\", units=\"in\", width=16, height=24, res=500)\nplot_grid(ratetiles.e, ratebars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLARatesHeatmapEng.png\", units=\"in\", width=16, height=24, res=500)\nplot_grid(ratetiles.e, ratebars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nadmtiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxadmday), fill=maxadmprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(as.Date(\"2020-08-03\"), plotadmto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotadmto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 admissions in English Local Authorities\",\n       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 \", \n                       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\"),\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\nadmbars.e <- ggplot(subset(data.e, date==maxadmday), aes(x=totaladm, y=fct_reorder(name, maxadmday), \n                                                         fill=totaladm))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed admissions\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLAAdmissionsHeatmap.tiff\", units=\"in\", width=10, height=26, res=500)\nplot_grid(admtiles.e, admbars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLAAdmissionsHeatmap.png\", units=\"in\", width=10, height=26, res=500)\nplot_grid(admtiles.e, admbars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nadmratetiles.e <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxadmday), fill=admrate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(as.Date(\"2020-08-03\"), plotadmto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotadmto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 admission rates in Local Authorities in England\",\n       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 \", \n                       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\"),\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\nadmratebars.e <- ggplot(subset(data.e, date==maxadmday), aes(x=pop, y=fct_reorder(name, maxadmday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLAAdmRatesHeatmapEng.tiff\", units=\"in\", width=10, height=24, res=500)\nplot_grid(admratetiles.e, admratebars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLAAdmRatesHeatmapEng.png\", units=\"in\", width=10, height=24, res=500)\nplot_grid(admratetiles.e, admratebars.e, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#######\n#WALES#\n#######\ndata.w <- data %>% \n  group_by(name) %>% \n  filter(country==\"Wales\" & name!=\"Wales\" & !is.na(casesroll_avg)) %>% \n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\n         maxcaseprop=caserate_avg/maxcaserate,\n         totalcases=sum(cases))\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-01\"\nplotto <- max(data.w$date)\n\n#Plot case trajectories\ncasetiles.w <- ggplot(data.w, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 cases in Welsh Local Authorities\",\n       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.\"),\n       caption=\"Data from Public Health Wales | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\ncasebars.w <- ggplot(subset(data.w, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDWelshLACasesHeatmap.tiff\", units=\"in\", width=12, height=6, res=500)\nplot_grid(casetiles.w, casebars.w, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_tiff(\"Outputs/COVIDWelshLACaseRidges.tiff\", units=\"in\", width=10, height=6, res=500)\nggplot(data.w, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\")+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 cases in Welsh Local Authorities\",\n       caption=\"Data from Public Health Wales | Plot by @VictimOfMaths\")\ndev.off()\n\nratetiles.w <- ggplot(data.w, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 case rates in Local Authorities in Wales\",\n       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.\"),\n       caption=\"Data from PHW | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"))\n\nratebars.w <- ggplot(subset(data.w, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLARatesHeatmapWal.tiff\", units=\"in\", width=12, height=6, res=500)\nplot_grid(ratetiles.w, ratebars.w, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n##########\n#Scotland#\n##########\ndata.s <- data %>% \n  group_by(name) %>% \n  filter(country==\"Scotland\" & name!=\"Scotland\" & !is.na(casesroll_avg)) %>% \n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\n         maxcaseprop=caserate_avg/maxcaserate,\n         totalcases=sum(cases))\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-01\"\nplotto <- max(data.s$date)\n\n#Plot case trajectories\ncasetiles.s <- ggplot(data.s, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 cases in Scottish Coucils\",\n       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.\"),\n       caption=\"Data from Public Health Scotland | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\ncasebars.s <- ggplot(subset(data.s, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDScottishCouncilCasesHeatmap.tiff\", units=\"in\", width=12, height=6, res=500)\nplot_grid(casetiles.s, casebars.s, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_tiff(\"Outputs/COVIDScottishCouncilCaseRidges.tiff\", units=\"in\", width=10, height=6, res=500)\nggplot(data.s, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\")+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 cases in Scottish Council areas\",\n       caption=\"Data from Public Health Scotland | Plot by @VictimOfMaths\")\ndev.off()\n\nratetiles.s <- ggplot(data.s, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 case rates in Council Areas in Scotland\",\n       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.\"),\n       caption=\"Data from PHS | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"))\n\nratebars.s <- ggplot(subset(data.s, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLARatesHeatmapSco.tiff\", units=\"in\", width=12, height=6, res=500)\nplot_grid(ratetiles.s, ratebars.s, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n##########\n#Northern Ireland#\n##########\ndata.ni <- data %>% \n  group_by(name) %>% \n  filter(country==\"Northern Ireland\" & name!=\"Northern Ireland\" & !is.na(casesroll_avg)) %>% \n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\n         maxcaseprop=caserate_avg/maxcaserate,\n         totalcases=sum(cases))\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-01\"\nplotto <- max(data.ni$date)\n\n#Plot case trajectories\ncasetiles.ni <- ggplot(data.ni, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(2)))+\n  labs(title=\"Timelines for COVID-19 cases in Northern Irish Local Authoritiess\",\n       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.\"),\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)),\n        axis.text.x=element_text(colour=\"Black\"))\n\ncasebars.ni <- ggplot(subset(data.ni, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDNILACasesHeatmap.tiff\", units=\"in\", width=12, height=6, res=500)\nplot_grid(casetiles.ni, casebars.ni, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_tiff(\"Outputs/COVIDNILACaseRidges.tiff\", units=\"in\", width=10, height=6, res=500)\nggplot(data.ni, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\")+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(2)))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 cases in Northern Irish Local Authorities\",\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\ndev.off()\n\nratetiles.ni <- ggplot(data.ni, aes(x=date, y=fct_reorder(name, maxcaseday), fill=caserate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 case rates in Local Authorities in Northern Ireland\",\n       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.\"),\n       caption=\"Data from DoHNI | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\nratebars.ni <- ggplot(subset(data.ni, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLARatesHeatmapNI.tiff\", units=\"in\", width=12, height=4, res=500)\nplot_grid(ratetiles.ni, ratebars.ni, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n############\n#Animations#\n############\n\n#Hex map\ndata.hex <- data\n\n#Sort out Buckinghamshire to match hex template\ntemp <- subset(data, code==\"E06000060\")\n\ndata.hex$code <- if_else(data$code==\"E06000060\", \"E07000004\", as.character(data$code))\ndata.hex$name <- if_else(data$name==\"Buckinghamshire\", \"Aylesbury Vale\", as.character(data$name))\n\ntemp1 <- temp\ntemp1$code <- \"E07000005\"\ntemp1$name <- \"Chiltern\"\n\ntemp2 <- temp\ntemp2$code <- \"E07000006\"\ntemp2$name <- \"South Bucks\"\n\ntemp$code <- \"E07000007\"\ntemp$name <- \"Wycombe\"\n\ndata.hex <- bind_rows(data.hex, temp, temp1, temp2)\n\n#Bring in hexmap\n#Read in hex boundaries (adapted from from https://olihawkins.com/2018/02/1 and ODI Leeds)\nhex <- geojson_read(\"Data/UKLA.geojson\", what=\"sp\")\n\n# Fortify into a data frame format to be shown with ggplot2\nhexes <- tidy(hex, region=\"id\")\n\nhexes$id <- if_else(hexes$id==\"E09000001\", \"E09000012\", hexes$id)\n\ndata.hex <- left_join(hexes, data.hex, by=c(\"id\"=\"code\"), all.y=TRUE)\ndata.hex$date <- as.Date(data.hex$date)\n\n#Remove Isles of Scilly which are too small to have their own data\ndata.hex <- subset(data.hex, id!=\"E06000053\")\n\n#extract latest date with full UK data\ndata.hex <- data.hex %>%\n  group_by(country) %>%\n  filter(country!=\"Republic of Ireland\" & !is.na(casesroll_avg)) %>% \n  mutate(min=min(date), max=max(date))\n\ncompletefrom <- max(data.hex$min, na.rm=TRUE)\ncompleteto <- min(data.hex$max, na.rm=TRUE)\n\nHexAnimUK <- ggplot()+\n  geom_polygon(data=subset(data.hex, date>as.Date(\"2020-03-06\") & date<=completeto), \n               aes(x=long, y=lat, group=id, fill=casesroll_avg))+\n  coord_fixed()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily confirmed\\ncases (7-day\\nrolling avg.)\", na.value=\"white\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of COVID-19 across the UK\",\n       subtitle=\"Rolling 7-day average number of new confirmed cases.\\nDate: {frame_time}\",\n       caption=\"Data from PHE, PHW, PHS & DoHNI\\nVisualisation by @VictimOfMaths\")\n\nanimate(HexAnimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/HexAnimUK.gif\"), \n        device=\"ragg_png\", end_pause=60)\n\n#Rates version\nHexAnimUKrate <- ggplot()+\n  geom_polygon(data=subset(data.hex, date>as.Date(\"2020-03-06\") & date<=completeto), \n               aes(x=long, y=lat, group=id, fill=caserate_avg))+\n  coord_fixed()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily confirmed\\ncases/100,000\\n(7-day rolling avg.)\", na.value=\"white\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of COVID-19 across the UK\",\n       subtitle=\"Rolling 7-day average number of new confirmed cases per 100,000.\\nDate: {frame_time}\",\n       caption=\"Data from PHE, PHW, PHS & DoHNI\\nVisualisation by @VictimOfMaths\")\n\nanimate(HexAnimUKrate, duration=18, fps=10, width=2000, height=3000, res=300, \n        renderer=gifski_renderer(\"Outputs/HexAnimUKrate.gif\"), \n        device=\"ragg_png\", end_pause=60)\n\n#Chloropeth map\ndata.map <- subset(data, as.Date(date) %within% interval(completefrom,completeto)) %>% \n  filter(!Region %in% c(\"Nation\", \"Region\"))\n\n#Sort out Buckinghamshire to match hex template\ntemp <- subset(data.map, code==\"E06000060\")\n\ndata.map$code <- if_else(data.map$code==\"E06000060\", \"E07000004\", as.character(data.map$code))\ndata.map$name <- if_else(data.map$name==\"Buckinghamshire\", \"Aylesbury Vale\", as.character(data.map$name))\n\ntemp1 <- temp\ntemp1$code <- \"E07000005\"\ntemp1$name <- \"Chiltern\"\n\ntemp2 <- temp\ntemp2$code <- \"E07000006\"\ntemp2$name <- \"South Bucks\"\n\ntemp$code <- \"E07000007\"\ntemp$name <- \"Wycombe\"\n\ndata.map <- bind_rows(data.map, temp, temp1, temp2)\n\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://t.co/GwVCSDNThM?amp=1\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile <- st_read(file.path(temp2, name))\n\nnames(shapefile)[names(shapefile) == \"LAD19CD\"] <- \"code\"\n\nsimplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)\n\n#TODO fix Northamptonshire in these maps\n\nmap.cases <- full_join(simplemap, data.map, by=\"code\", all.y=TRUE)\nmap.cases$date <- as.Date(map.cases$date)\n\n#Map of current cases\nagg_tiff(\"Outputs/COVIDCaseMapUK.tiff\", units=\"in\", width=8, height=12, res=500)\nmap.cases %>% \n  filter(date==completeto-days(3) & !name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\")) %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=casesroll_avg), colour=NA)+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\n(rolling 7-day avg.)\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"Confirmed new COVID-19 cases in the UK\",\n       subtitle=paste0(\"Rolling 7-day average of confirmed new cases at Local Authority/Council Area level\\nData up to \", completeto-days(3)),\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")\ndev.off()\n\nagg_tiff(\"Outputs/COVIDCaserateMapUK.tiff\", units=\"in\", width=8, height=12, res=500)\nmap.cases %>% \n  filter(date==completeto-days(3) & !name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\")) %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=caserate_avg), colour=NA)+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\nper 100,000\\n(rolling 7-day avg.)\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"Rates of confirmed new COVID-19 cases in the UK\",\n       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)),\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")\ndev.off()\n\n#Map of admission rates\nadmmaxdate <- max(map.cases$date[!is.na(map.cases$admrate_avg)])\n\nagg_tiff(\"Outputs/COVIDAdmrateMapUK.tiff\", units=\"in\", width=8, height=7.5, res=500)\nmap.cases %>% \n  filter(date==admmaxdate & !name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\")) %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=admrate_avg), colour=NA)+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily admissions\\nper 100,000\",\n                       na.value=\"transparent\")+\n  xlim(-116,655644)+\n  ylim(5337,620000)+\n  theme_classic()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"Rates of confirmed new COVID-19 admissions in England\",\n       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),\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\ndev.off()\n\n###########################\n#UKLTLA heatmap ordered from S->N\nlat.data <- map.cases %>% \n  select(code, LAT) %>% \n  as.data.frame() %>% \n  select(code, LAT) %>% \n  distinct() %>% \n  filter(!is.na(code) & !code %in% c(\"E06000062\", \"E06000061\")) %>% \n  #Fix Northamptonshire LA changes (use Northampton and Kettering as the latitudes for the new counties)\n  bind_rows(map.cases %>% filter(code %in% c(\"E07000154\", \"E07000153\")) %>% \n              as.data.frame() %>% \n              select(code, LAT) %>% \n              mutate(code=if_else(code==\"E07000154\", \"E06000062\", \"E06000061\")))\n\ndata.all2 <- merge(data.all, lat.data)\n\n#Plot case trajectories\ncasetiles.all2 <- ggplot(data.all2, aes(x=date, y=fct_reorder(name, LAT), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK\",\n       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.\"),\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(1.6)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(2.5)))\n\ncasebars.all2 <- ggplot(subset(data.all2, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, LAT), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLACasesHeatmapUKOrdered.tiff\", units=\"in\", width=25, height=30, res=500)\nplot_grid(casetiles.all2, casebars.all2, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLACasesHeatmapUKOrdered.png\", units=\"in\", width=25, height=30, res=500)\nplot_grid(casetiles.all2, casebars.all2, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nratetiles.all2 <- ggplot(data.all2, aes(x=date, y=fct_reorder(name, LAT), fill=caserate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 cases in Local Authorities/Council Areas across the UK\",\n       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.\"),\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\nratebars.all2 <- ggplot(subset(data.all2, date==maxcaseday), aes(x=pop, y=fct_reorder(name, LAT), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLARatesHeatmapUKOrdered.tiff\", units=\"in\", width=16, height=30, res=500)\nplot_grid(ratetiles.all2, ratebars.all2, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLARatesHeatmapUKOrdered.png\", units=\"in\", width=16, height=30, res=500)\nplot_grid(ratetiles.all2, ratebars.all2, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#Order admissions map for England only\nadmtiles.e2 <- ggplot(subset(data.all2, !is.na(admrate_avg)), aes(x=date, y=fct_reorder(name, lat), \n                                                                  fill=admrate_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(as.Date(\"2020-08-03\"), plotadmto)), expand=c(0,0), \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotadmto)%/% months(1)))+\n  labs(title=\"Timelines for COVID-19 admissions in Local Authorities in England\",\n       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 \", \n                       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\"),\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.2)))\n\nadmbars.e2 <- ggplot(subset(data.all2, !is.na(admrate_avg) & date==maxadmday), \n                     aes(x=pop, y=fct_reorder(name, lat), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_custom()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\nagg_tiff(\"Outputs/COVIDLTLAAdmRatesHeatmapEngOrdered.tiff\", units=\"in\", width=10, height=26, res=500)\nplot_grid(admtiles.e2, admbars.e2, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nagg_png(\"Outputs/COVIDLTLAAdmRatesHeatmapEngOrdered.png\", units=\"in\", width=10, height=26, res=500)\nplot_grid(admtiles.e2, admbars.e2, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n\n#Map of changes in admission and case rates in the last 7 days:\ndata.map2 <- data.map %>% \n  filter(country==\"England\") %>% \n  mutate(date=as.Date(date)) %>% \n  arrange(code, date) %>% \n  group_by(code) %>% \n  mutate(admchange=admrate_avg-lag(admrate_avg,7)) %>% \n  filter(date==plotadmto)\n\ndata.map3 <- data.map %>% \n  mutate(date=as.Date(date)) %>% \n  arrange(code, date) %>% \n  group_by(code) %>% \n  mutate(casechange=caserate_avg-lag(caserate_avg,7)) %>% \n  filter(date==plotto-days(3))\n\nmap.admchange <- full_join(simplemap, data.map2, by=\"code\", all.y=TRUE) %>% \n  filter(!is.na(admchange))\nmap.admchange$date <- as.Date(map.admchange$date)\n\n\nmap.casechange <- full_join(simplemap, data.map3, by=\"code\", all.y=TRUE) %>% \n  filter(!is.na(casechange)) \nmap.casechange$date <- as.Date(map.casechange$date)\n\n#Map of week-on-week change in cases\nagg_tiff(\"Outputs/COVIDCasesChangeMapUK.tiff\", units=\"in\", width=8, height=10, res=500)\nmap.casechange %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=casechange), colour=NA)+\n  scale_fill_paletteer_c(\"scico::roma\", limit=c(-1,1)*max(abs(map.casechange$casechange)), \n                         name=\"Change in cases\\nper day per 100,000\\nin the past week\", direction=-1,\n                         na.value=\"transparent\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.5)))+\n  labs(title=\"Changes in COVID-19 cases across the UK\",\n       subtitle=paste0(\"Change in the rolling 7-day average rate of new confirmed COVID-19\\nbetween \", plotto-days(10) , \" and \", plotto-days(3)),\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\ndev.off()\n\n#Map of week-on-week change in admissions\nagg_tiff(\"Outputs/COVIDAdmChangeMap.tiff\", units=\"in\", width=8, height=8, res=500)\nmap.admchange %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=admchange), colour=NA)+\n  scale_fill_paletteer_c(\"scico::roma\", limit=c(-1,1)*max(abs(map.admchange$admchange)), \n                         name=\"Change in admissions\\nper day per 100,000\\nin the past week\", direction=-1,\n                         na.value=\"transparent\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.5)))+\n  labs(title=\"Changes in COVID-19 hospital admissions across England\",\n       subtitle=paste0(\"Change in the rolling 7-day average rate of new admissions between \", plotadmto-days(7), \" and \", plotadmto),\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\ndev.off()\n\n#Line chart of cases by country\nagg_tiff(\"Outputs/COVIDCaserateUK.tiff\", units=\"in\", width=12, height=6, res=500)\nggplot(subset(data, Region==\"Nation\" & as.Date(date)>as.Date(\"2021-05-01\") & as.Date(date)<plotto-days(1)))+\n  geom_line(aes(x=as.Date(date), y=caserate_avg, colour=country, group=country))+\n  scale_x_date(name=\"\", date_breaks=\"1 week\", date_labels=\"%d %b\")+\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\n  theme_custom()+\n  labs(title=\"The delta wave isn't over in any of the UK nations\",\n       subtitle=\"Rolling 7-day average of daily confirmed new cases per 100,000\",\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\ndev.off()\n\n#Line chart of cases by region\nagg_tiff(\"Outputs/COVIDCaseRateReg.tiff\", units=\"in\", width=12, height=6, res=500)\nggplot(subset(data, Region==\"Region\" & as.Date(date)>as.Date(\"2021-05-01\") & as.Date(date)<plotto-days(1)))+\n  geom_line(aes(x=as.Date(date), y=caserate_avg, colour=name, group=name))+\n  scale_x_date(name=\"\", date_breaks=\"1 week\", date_labels=\"%d %b\")+\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\n  theme_custom()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\n        axis.text.x=element_text(angle=45, hjust=1),\n        text=element_text(family=\"Lato\"))+\n  labs(title=\"All English regions have seen similar case trajectories, but at very different levels\",\n       subtitle=\"Rolling 7-day average of daily confirmed new cases per 100,000\",\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\ndev.off()\n\nagg_tiff(\"Outputs/COVIDCaseRateRegxRestrictions.tiff\", units=\"in\", width=12, height=6, res=500)\nggplot(subset(data, Region==\"Region\" & as.Date(date)>as.Date(\"2020-10-01\") & as.Date(date)<plotto-days(1)))+\n  geom_rect(aes(xmin=as.Date(\"2021-01-06\"), xmax=plotto,\n                ymin=-Inf, ymax=Inf), fill=\"Grey80\")+\n  geom_rect(aes(xmin=as.Date(\"2020-11-05\"), xmax=as.Date(\"2020-12-02\"),\n                ymin=-Inf, ymax=Inf), fill=\"Grey80\")+\n  geom_vline(xintercept=as.Date(\"2020-12-25\"), colour=\"Red\", linetype=2)+\n  geom_line(aes(x=as.Date(date), y=caserate_avg, colour=name, group=name))+\n  scale_x_date(name=\"\", date_breaks=\"1 week\", date_labels=\"%d %b\")+\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\n  theme_custom()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\n        text=element_text(family=\"Roboto\"))+\n  labs(title=\"COVID-19 case rates and lockdown restrictions in England\",\n       subtitle=\"Rolling 7-day average of daily confirmed new cases per 100,000\",\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")+\n  annotate(\"text\", x=as.Date(\"2020-11-18\"), y=160, label=\"2nd national lockdown\")+\n  annotate(\"text\", x=as.Date(\"2021-01-20\"), y=160, label=\"3rd national lockdown\")+\n  annotate(\"text\", x=as.Date(\"2020-12-24\"), y=160, label=\"Christmas day\",\n           colour=\"Red\", hjust=1)\ndev.off()\n\nagg_tiff(\"Outputs/COVIDCaseRateRegLog.tiff\", units=\"in\", width=12, height=6, res=500)\nggplot(subset(data, Region==\"Region\" & as.Date(date)>as.Date(\"2021-01-01\") & as.Date(date)<plotto-days(1)))+\n  geom_line(aes(x=as.Date(date), y=caserate_avg, colour=name, group=name))+\n  scale_x_date(name=\"\", date_breaks=\"1 week\", date_labels=\"%d %b\")+\n  scale_y_continuous(name=\"Daily cases per 100,000 (log scale)\", trans=\"log\")+\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\n  theme_custom()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\n        text=element_text(family=\"Roboto\"))+\n  labs(title=\"COVID case rates are falling at different speeds in different parts of England\",\n       subtitle=\"Rolling 7-day average of daily confirmed new cases per 100,000\",\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\ndev.off()\n\n#Whole UK bar chart\nbardata <- data %>% \n  filter(Region==\"Nation\") %>% \n  mutate(date=as.Date(date)) %>% \n  group_by(date) %>% \n  summarise(cases=sum(cases), casesroll_avg=sum(casesroll_avg))\n\nagg_tiff(\"Outputs/COVIDCaseNumbersUK.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot()+\n  geom_col(data=subset(bardata, date<=plotto),aes(x=date, y=cases), fill=\"skyblue2\")+\n  geom_line(data=subset(bardata, date<=plotto-days(3)), aes(x=date, y=casesroll_avg), colour=\"red\")+\n  scale_x_date(name=\"\", \n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\n  scale_y_continuous(name=\"Daily new cases\")+\n  theme_custom()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\n        plot.subtitle=element_markdown(),\n        text=element_text(family=\"Roboto\"), axis.text.x=element_text(angle=45, hjust=1, vjust=1))+\n  labs(title=\"The fall in new COVID cases has stalled\",\n       subtitle=\"Daily <span style='color:SkyBlue4;'>confirmed new cases </span>and the <span style='color:red;'>rolling 7-day average</span> across the UK\",\n       caption=\"Date from coronavirus.gov.uk | Plot by @VictimOfMaths\")\ndev.off()\n\n#Map of COVID deaths rates and changes in COVID death rates\nmaxweek <- 56\n\n#Collapse to LA level\nmortdata <- mortdata %>% \n  group_by(week, name, code) %>% \n  filter(measure==\"Registrations\") %>% \n  summarise(deaths=sum(COVID.20), pop=unique(pop)) %>% \n  group_by(name, code) %>% \n  mutate(mortrate=deaths*100000/pop,\n         mortratechange=mortrate-lag(mortrate, 1, order_by=week)) %>% \n  ungroup() %>% \n  filter(week==maxweek)\n\n#Sort out Buckinghamshire to match map template\ntemp <- subset(mortdata, code==\"E06000060\")\n\nmortdata$code <- if_else(mortdata$code==\"E06000060\", \"E07000004\", as.character(mortdata$code))\nmortdata$name <- if_else(mortdata$name==\"Buckinghamshire\", \"Aylesbury Vale\", as.character(mortdata$name))\n\ntemp1 <- temp\ntemp1$code <- \"E07000005\"\ntemp1$name <- \"Chiltern\"\n\ntemp2 <- temp\ntemp2$code <- \"E07000006\"\ntemp2$name <- \"South Bucks\"\n\ntemp$code <- \"E07000007\"\ntemp$name <- \"Wycombe\"\n\nmortdata <- bind_rows(mortdata, temp, temp1, temp2)\n\nmortmap.data <- full_join(simplemap, mortdata, by=\"code\", all.y=TRUE)\n\n#Map of death rates\nagg_tiff(\"Outputs/COVIDMortrateMapUK.tiff\", units=\"in\", width=8, height=7.5, res=500)\nmortmap.data %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=mortrate), colour=NA)+\n  scale_fill_distiller(palette=\"Spectral\", name=\"COVID-19 deaths\\nper 100,000\",\n                       na.value=\"transparent\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.2)))+\n  labs(title=\"Rates of confirmed COVID-19 deaths in Great Britain\",\n       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)),\n       caption=\"Data from ONS & NRS | Plot by @VictimOfMaths\")\n\ndev.off()\n\n#Map of week-on-week change in death rates\nagg_tiff(\"Outputs/COVIDMortChangeMap.tiff\", units=\"in\", width=8, height=8, res=500)\nmortmap.data %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=mortratechange), colour=NA)+\n  scale_fill_paletteer_c(\"scico::roma\", limit=c(-1,1)*max(abs(mortmap.data$mortratechange)), \n                         name=\"Change in deaths\\nper week per 100,000\\nvs. the previous week\", direction=-1,\n                         na.value=\"transparent\")+\n  theme_custom()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.5)))+\n  labs(title=\"Changes in confirmed COVID-19 deaths in Great Britain\",\n       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)),\n       caption=\"Data from ONS & NRS | Plot by @VictimOfMaths\")\ndev.off()\n\n####################################################################################################\n\n\n\n\n#These last 2 animations require a more powerful computer/more patience than I have, so I'm\n#not 100% certain they actually work...\n\nCaseAnimAbs <- map.cases %>% \n  filter(!name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\") & date>as.Date(\"2020-02-25\")) %>% \n  ggplot(aes(geometry=geometry, fill=casesroll_avg))+\n  geom_sf(colour=NA)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\n(rolling 7-day avg.)\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of the pandemic across England\",\n       subtitle=\"Rolling 7-day average number of new confirmed cases in each Local Authority/Council area\\nDate: {frame_time}\",\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths\")\n\nanimate(CaseAnimAbs, duration=25, fps=2, width=2000, height=3000, res=100, renderer=gifski_renderer(\"Outputs/CaseAnimAbs.gif\"), end_pause=60)\n\nCaseAnimRate <- map.cases %>% \n  filter(!name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\") & !is.na(date)) %>% \n  ggplot(aes(geometry=geometry, fill=caserate_avg))+\n  geom_sf(colour=NA)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\nper 100,000\\n(rolling 7-day avg.)\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of the pandemic across England\",\n       subtitle=\"Rolling 7-day average rate of new confirmed cases per 100,000 in each Local Authority/Council area\\nDate: {frame_time}\",\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths\")\n\nanimate(CaseAnimRate, duration=25, fps=2, width=2000, height=3000, res=100, renderer=gifski_renderer(\"Outputs/CaseAnimRate.gif\"), end_pause=60)\n"
  },
  {
    "path": "Heatmaps/COVIDLineages.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(geofacet)\r\nlibrary(scales)\r\nlibrary(ragg)\r\n\r\nurl <- \"https://covid-surveillance-data.cog.sanger.ac.uk/download/lineages_by_ltla_and_week.tsv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdata <- read_tsv(temp)\r\n\r\n#Read in LTLA to region lookup\r\n\r\ntemp <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/0c3a9643cc7c4015bb80751aad1d2594_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nLADtoRegion <- read.csv(temp)[,c(1,4)]\r\ncolnames(LADtoRegion) <- c(\"LTLA\", \"Region\")\r\n\r\ndata <- merge(rawdata, LADtoRegion,all.x=TRUE) %>% \r\n  mutate(Region=case_when(\r\n    LTLA %in% c(\"E07000246\", \"E06000058\", \"E06000059\") ~ \"South West\",\r\n    LTLA %in% c(\"E07000245\", \"E07000244\") ~ \"East of England\",\r\n    TRUE ~ Region),\r\n    WeekEndDate=as.Date(WeekEndDate),\r\n    strain=case_when(\r\n      Lineage==\"B.1.177\" ~ \"B.1.177\",\r\n      Lineage==\"AY.4.2\" ~ \"Delta (AY4.2 variant)\",\r\n      Lineage==\"B.1.617.2\" | substr(Lineage,1,3)==\"AY.\" ~ \"Delta (OG)\",\r\n      Lineage==\"B.1.1.7\" ~ \"Alpha\",\r\n      Lineage %in% c(\"B.1.1.529\", \"BA.1\") ~ \"Omicron\",\r\n      Lineage==\"BA.2\" ~ \"Stealth Omicron\",\r\n      TRUE ~ \"Other variants\")) %>% \r\n  group_by(WeekEndDate, strain, Region) %>% \r\n  summarise(Count=sum(Count)) %>% \r\n  ungroup() %>% \r\n  group_by(WeekEndDate, Region) %>% \r\n  mutate(Total=sum(Count)) %>% \r\n  ungroup() %>% \r\n  mutate(prop=Count/Total,\r\n         strain=factor(strain, levels=c(\"B.1.177\", \"Alpha\", \"Delta (OG)\", \"Delta (AY4.2 variant)\",\r\n                                        \"Omicron\", \"Stealth Omicron\", \"Other variants\")))\r\n\r\n#Compare regions\r\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\r\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),\r\n                     code=c(1:9))\r\n\r\nagg_tiff(\"Outputs/COVIDGenomesCountxReg.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(data, aes(x=WeekEndDate, y=Count, fill=strain))+\r\n  geom_col(position=\"stack\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Genomes sequenced\")+\r\n  scale_fill_paletteer_d(\"khroma::bright\", name=\"Lineage\")+\r\n  facet_geo(~Region, grid=mygrid)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.4)))+\r\n  labs(title=\"We are now sequencing more COVID genomes than ever before\",\r\n       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)),\r\n       caption=\"Data from Wellcome Sanger Institute | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDGenomesStackedxReg.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(data, aes(x=WeekEndDate, y=prop, fill=strain))+\r\n  geom_col(position=\"stack\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Genomes sequenced\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"khroma::bright\", name=\"Lineage\")+\r\n  facet_geo(~Region, grid=mygrid)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        axis.text.x=element_text(angle=45, hjust=1, vjust=1))+\r\n  labs(title=\"The Delta variant is still dominant across England. For now\",\r\n       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)),\r\n       caption=\"Data from Wellcome Sanger Institute | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#National picture\r\nnatdata <- data %>% \r\n  group_by(WeekEndDate, strain) %>% \r\n  summarise(Count=sum(Count), Total=sum(Total)) %>% \r\n  ungroup() %>% \r\n  mutate(prop=Count/Total)\r\n\r\nagg_tiff(\"Outputs/COVIDGenomesCount.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(natdata, aes(x=WeekEndDate, y=Count, fill=strain))+\r\n  geom_col(position=\"stack\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Genomes sequenced\")+\r\n  scale_fill_paletteer_d(\"khroma::bright\", name=\"Lineage\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.4)))+\r\n  labs(title=\"We are now sequencing more COVID genomes than ever before\",\r\n       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)),\r\n       caption=\"Data from Wellcome Sanger Institute | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDGenomesStacked.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(natdata, aes(x=WeekEndDate, y=Count, fill=strain))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proprtion of genomes sequenced\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"khroma::bright\", name=\"Lineage\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        axis.text.x=element_text(angle=45, hjust=1, vjust=1))+\r\n  labs(title=\"The Delta variant is still dominant across England. For now\",\r\n       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)),\r\n       caption=\"Data from Wellcome Sanger Institute | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Using more current COG data (no subnational split)\r\n#Download Covid genome data\r\ntemp <- tempfile()\r\nsource <- \"https://cog-uk.s3.climb.ac.uk/phylogenetics/latest/cog_metadata.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read.csv(temp) %>% \r\n  mutate(sample_date=as.Date(sample_date)) %>% \r\n  select(sample_date, scorpio_call, epi_week, lineage) %>% \r\n  mutate(lineagegroup=case_when(\r\n    substr(scorpio_call, 1, 5)==\"Alpha\" ~ \"Alpha\",\r\n    scorpio_call==\"Delta (AY.4.2-like)\" ~ \"Delta (AY4.2 variant)\",\r\n    substr(scorpio_call, 1, 5)==\"Delta\" ~ \"Delta (OG)\",\r\n    grepl(\"Omicron\", scorpio_call) ~ \"Omicron\",\r\n    lineage==\"B.1.177\" ~ \"B.1.177\",\r\n    TRUE ~ \"Other variants\"),\r\n    lineagegroup=factor(lineagegroup, levels=c(\"B.1.177\", \"Alpha\", \"Delta (OG)\", \"Delta (AY4.2 variant)\",\r\n                                               \"Omicron\", \"Other variants\")))\r\n\r\ndailydata <- data %>% \r\n  group_by(lineagegroup, sample_date) %>% \r\n  summarise(count=n())\r\n\r\nagg_tiff(\"Outputs/COVIDGenomesStackedCOG.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(dailydata %>% filter(sample_date>as.Date(\"2020-08-01\")), \r\n       aes(x=sample_date, y=count, fill=lineagegroup))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of genomes sequenced\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"khroma::bright\", name=\"Lineage\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"Omicron is coming...\",\r\n       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)),\r\n       caption=\"Data from COG-UK | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDMSOACaseRatexIMD.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(geofacet)\r\nlibrary(scales)\r\n\r\ntemp <- tempfile()\r\nsource <- (\"https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read_csv(temp) \r\n\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE)[,c(1,2,5,6)]\r\ncolnames(IMD) <- c(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\ntemp <- tempfile()\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, RGN11NM) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\npop <- read_excel(file.path(temp2, \"SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx\"),\r\n                  sheet=\"Mid-2019 Persons\", range=\"A6:G34758\", col_names=FALSE)[,c(1,7)]\r\ncolnames(pop) <- c(\"LSOA11CD\", \"pop\")\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop)) %>% \r\n  ungroup() %>% \r\n  #Then merge into COVID case data\r\n  merge(casedata, by.x=\"MSOA11CD\", by.y=\"areaCode\", all=TRUE) %>% \r\n  rename(msoa11cd=MSOA11CD, caserate=newCasesBySpecimenDateRollingRate)\r\n\r\n#Calculate lagged changes in 1 week, 2 weeks and 3 weeks for each MSOA\r\ndata <- IMD_MSOA %>% \r\n  select(caserate, date, IMDrank, regionName) %>% \r\n  filter(date>=max(date)-weeks(3)) %>% \r\n  spread(date, caserate) %>% \r\n  #There is definitely a better way to dynamically reference these columns, but this does work\r\n  mutate(abs1wk=.[[ncol(.)]]-.[[ncol(.)-1]],\r\n         abs2wk=.[[ncol(.)]]-.[[ncol(.)-2]],\r\n         abs3wk=.[[ncol(.)]]-.[[ncol(.)-3]],\r\n         rel1wk=abs1wk/.[[ncol(.)-1]],\r\n         rel2wk=abs2wk/.[[ncol(.)-2]],\r\n         rel3wk=abs3wk/.[[ncol(.)-3]],\r\n         IMDrank=max(IMDrank)-IMDrank) %>% \r\n  rename(oldcases=4)\r\n\r\n#National level plots\r\nnatrhocases <- cor(subset(data, !is.na(oldcases))$IMDrank, subset(data, !is.na(oldcases))$oldcases)\r\nnatrhoabs <- cor(subset(data, !is.na(abs2wk))$IMDrank, subset(data, !is.na(abs2wk))$abs2wk)\r\nnatrhorel <- cor(subset(data, !is.na(rel2wk))$IMDrank, subset(data, !is.na(rel2wk))$rel2wk)\r\n\r\ntiff(\"Outputs/COVIDMSOACaseRatexIMDOld.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data, aes(x=IMDrank, y=oldcases, colour=oldcases))+\r\n  geom_point(show.legend=FALSE)+\r\n  geom_smooth(method=\"lm\", formula=y~x, colour=\"Red\")+\r\n  scale_x_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  scale_y_continuous(name=\"Change in cases per 100,000 in the past 2 weeks\")+\r\n  scale_colour_paletteer_c(\"scico::tokyo\", direction=-1)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"COVID-19 case rates were higher, on average, in more deprived areas\",\r\n       subtitle=paste0(\"7-day average rates of new COVID-19 cases for MSOAs in England in the week ending \", \r\n                       max(IMD_MSOA$date)-weeks(2)),\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=33000, y=850, label=paste0(\"\\u03C1\", \"=\", round(natrhocases, 2)), colour=\"Red\")\r\n\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDMSOACaseRatexIMDAbs.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data, aes(x=IMDrank, y=abs2wk, colour=abs2wk))+\r\n  geom_point()+\r\n  geom_hline(yintercept=0, colour=\"Grey60\")+\r\n  geom_smooth(method=\"lm\", formula=y~x, colour=\"Red\")+\r\n  scale_x_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  scale_y_continuous(name=\"Change in cases per 100,000 in the past 2 weeks\")+\r\n  scale_colour_paletteer_c(\"scico::roma\", name=\"Change in\\ncase rates\",\r\n                           limit=c(-1,1)*max(abs(data$abs2wk), na.rm=TRUE))+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"The absolute fall in COVID-19 cases is larger in more deprived areas\",\r\n       subtitle=paste0(\"Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between \", \r\n                       max(IMD_MSOA$date)-weeks(2), \" and \",  max(IMD_MSOA$date)),\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=33000, y=-100, label=paste0(\"\\u03C1\", \"=\", round(natrhoabs, 2)), colour=\"Red\")\r\n\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDMSOACaseRatexIMDRel.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data, aes(x=IMDrank, y=rel2wk, colour=rel2wk))+\r\n  geom_point(show.legend=FALSE)+\r\n  geom_hline(yintercept=0, colour=\"Grey60\")+\r\n  geom_smooth(method=\"lm\", formula=y~x, colour=\"Red\")+\r\n  scale_x_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  scale_y_continuous(name=\"Change in cases per 100,000 in the past 2 weeks\", \r\n                     labels=scales::label_percent(accuracy=1))+\r\n  scale_colour_paletteer_c(\"scico::roma\",\r\n                           limit=c(-1,1)*max(abs(subset(data, !is.na(rel2wk))$rel2wk)))+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"Relative reductions in COVID-19 cases are broadly equal across the deprivation spectrum\",\r\n       subtitle=paste0(\"Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between \", \r\n                       max(IMD_MSOA$date)-weeks(2), \" and \",  max(IMD_MSOA$date)),\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=33000, y=-0.3, label=paste0(\"\\u03C1\", \"=\", round(natrhorel, 2)), colour=\"Red\")\r\n\r\ndev.off()\r\n\r\n\r\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\r\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),\r\n                     code=c(1:9))\r\n\r\nrhoold <- data %>% \r\n  filter(!is.na(oldcases)) %>% \r\n  group_by(regionName) %>% \r\n  mutate(rho=cor(IMDrank, oldcases), \r\n         IMDrank=27000, oldcases=2200) %>% \r\n  ungroup() %>% \r\n  select(regionName, rho, IMDrank, oldcases) %>% \r\n  distinct() %>% \r\n  mutate(label=paste0(\"\\u03C1\", \"=\", round(rho, 2)))\r\n\r\nrhoabs <- data %>% \r\n  filter(!is.na(abs2wk)) %>% \r\n  group_by(regionName) %>% \r\n  mutate(rho=cor(IMDrank, abs2wk), \r\n         IMDrank=25000, abs2wk=1500) %>% \r\n  ungroup() %>% \r\n  select(regionName, rho, IMDrank, abs2wk) %>% \r\n  distinct() %>% \r\n  mutate(label=paste0(\"\\u03C1\", \"=\", round(rho, 2)))\r\n\r\nrhorel <- data %>% \r\n  filter(!is.na(rel2wk)) %>% \r\n  group_by(regionName) %>% \r\n  mutate(rho=cor(IMDrank, rel2wk), \r\n         IMDrank=25000, rel2wk=3) %>% \r\n  ungroup() %>% \r\n  select(regionName, rho, IMDrank, rel2wk) %>% \r\n  distinct() %>% \r\n  mutate(label=paste0(\"\\u03C1\", \"=\", round(rho, 2)))\r\n\r\ntiff(\"Outputs/COVIDMSOACaseRatexIMDOldxReg.tiff\", units=\"in\", width=10, height=10, res=500)\r\nggplot(data, aes(x=IMDrank, y=oldcases, colour=oldcases))+\r\n  geom_point(show.legend=FALSE)+\r\n  geom_hline(yintercept=0, colour=\"Grey60\")+\r\n  geom_smooth(method=\"lm\", formula=y~x, colour=\"Red\")+\r\n  geom_text(data=rhoold, aes(label=label), colour=\"Red\")+\r\n  scale_x_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  scale_y_continuous(name=\"Change in cases per 100,000 in the past 2 weeks\")+\r\n  scale_colour_paletteer_c(\"scico::tokyo\", direction=-1)+\r\n  facet_geo(~regionName, grid=mygrid)+  \r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"COVID-19 case rates were higher, on average, in more deprived areas\",\r\n       subtitle=paste0(\"7-day average rates of new COVID-19 cases for MSOAs in England in the week ending \", \r\n                       max(IMD_MSOA$date)-weeks(2)),\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\ntiff(\"Outputs/COVIDMSOACaseRatexIMDAbsxReg.tiff\", units=\"in\", width=10, height=10, res=500)\r\nggplot(data, aes(x=IMDrank, y=abs2wk, colour=abs2wk))+\r\n  geom_point()+\r\n  geom_hline(yintercept=0, colour=\"Grey60\")+\r\n  geom_smooth(method=\"lm\", formula=y~x, colour=\"Red\")+\r\n  geom_text(data=rhoabs, aes(label=label), colour=\"Red\")+\r\n  scale_x_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  scale_y_continuous(name=\"Change in cases per 100,000 in the past 2 weeks\")+\r\n  scale_colour_paletteer_c(\"scico::roma\", name=\"Change in\\ncase rates\",\r\n                           limit=c(-1,1)*max(abs(data$abs2wk), na.rm=TRUE))+\r\n  facet_geo(~regionName, grid=mygrid)+  \r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"Absolute falls in COVID-19 deaths are bigger in more deprived parts of London and the South East\",\r\n       subtitle=paste0(\"Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between \", \r\n                       max(IMD_MSOA$date)-weeks(2), \" and \",  max(IMD_MSOA$date)),\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDMSOACaseRatexIMDRelxReg.tiff\", units=\"in\", width=10, height=10, res=500)\r\nggplot(data, aes(x=IMDrank, y=rel2wk, colour=rel2wk))+\r\n  geom_point(show.legend=FALSE)+\r\n  geom_hline(yintercept=0, colour=\"Grey60\")+\r\n  geom_smooth(method=\"lm\", formula=y~x, colour=\"Red\")+\r\n  geom_text(data=rhorel, aes(label=label), colour=\"Red\")+\r\n  scale_x_continuous(name=\"Deprivation (higher = more deprived)\")+\r\n  scale_y_continuous(name=\"Change in cases per 100,000 in the past 2 weeks\",\r\n                     labels=scales::label_percent(accuracy=1))+\r\n  scale_colour_paletteer_c(\"scico::roma\",\r\n                           limit=c(-1,1)*max(abs(subset(data, !is.na(rel2wk))$rel2wk)))+\r\n  facet_geo(~regionName, grid=mygrid)+  \r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"The relative fall in COVID-19 cases is most unequal in Yorkshire and the North West\",\r\n       subtitle=paste0(\"Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between \", \r\n                       max(IMD_MSOA$date)-weeks(2), \" and \",  max(IMD_MSOA$date)),\r\n       caption=\"Data from PHE, ONS & MHCLG | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Add deciles\r\ndeciledata <- data %>% \r\n  mutate(decile=ntile(IMDrank, 10)) %>% \r\n  group_by(regionName, decile) %>% \r\n  summarise(oldcases=sum(oldcases, na.rm=TRUE), abs2wk=sum(abs2wk, na.rm=TRUE),\r\n            rel2wk=abs2wk/oldcases)\r\n\r\ntiff(\"Outputs/COVIDMSOACaseRatexIMDRelxRegBar.tiff\", units=\"in\", width=10, height=10, res=500)\r\nggplot(deciledata)+\r\n  geom_col(aes(x=decile, y=rel2wk, fill=rel2wk), show.legend=FALSE)+\r\n  #geom_col(aes(x=decile, y=rel2wk, fill=as.factor(decile)), show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Deprivation\", breaks=c(1,10), \r\n                     labels=c(\"Least\\ndeprived\", \"Most\\ndeprived\"))+\r\n  scale_y_continuous(name=\"Change in cases per 100,000 in the past 2 weeks\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_c(\"pals::ocean.tempo\",\r\n                           limit=c(NA,0), direction=-1)+\r\n  #scale_fill_paletteer_d(\"ggsci::purple_material\")+\r\n  facet_geo(~regionName, grid=mygrid)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)))+\r\n  labs(title=\"COVID-19 cases are falling across England, but at unequal rates\",\r\n       subtitle=paste0(\"Change in rolling 7-day rates of new COVID-19 cases for MSOAs in England between \", \r\n                       max(IMD_MSOA$date)-weeks(2), \" and \",  max(IMD_MSOA$date)),\r\n       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\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDMetricsNormalised.R",
    "content": "rm(list=ls())\r\n\r\n#Code to replicate this nice graph from Paul Mainwood\r\n#https://twitter.com/PaulMainwood/status/1449467211442098181\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(RcppRoll)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(ggtext)\r\nlibrary(ragg)\r\nlibrary(geofacet)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#UK version\r\n\r\n#Download data from dashboard\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=overview&metric=newAdmissions&metric=newCasesBySpecimenDate&metric=newDeaths28DaysByDeathDate&format=csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#Read the data in and tidy it up\r\ndata <- read.csv(temp) %>% \r\n  select(-c(1:3)) %>% \r\n  set_names(c(\"date\", \"Admissions\", \"Cases\", \"Deaths\")) %>% \r\n  gather(metric, count, c(2:4)) %>% \r\n  mutate(date=as.Date(date),\r\n         metric=factor(metric, levels=c(\"Cases\", \"Admissions\", \"Deaths\"))) %>% \r\n  group_by(metric) %>% \r\n  #Calculate rolling means\r\n  mutate(count_roll=roll_mean(count, 7, align=\"center\", fill=NA)) %>% \r\n  #Normalise against the peak.\r\n  #Step 1 - grab the peak value for each metric\r\n  #Option 1, just using the max value across the entire time series\r\n  #mutate(max=max(count, na.rm=TRUE)) %>% \r\n  #Option 2, normalising against the max value within a chosen date range\r\n  mutate(max=max(count_roll[date>as.Date(\"2020-08-01\") & date<as.Date(\"2021-05-01\")], \r\n                 na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  #Step 2 - calculate each date's value as a proportion of the peak\r\n  mutate(prop=count_roll/max)\r\n\r\n#Simple replication\r\nggplot(data, aes(x=date, y=prop, colour=metric))+\r\n  geom_line()\r\n\r\n#Prettier version (because why not)\r\n\r\nagg_tiff(\"Outputs/COVIDMetricsNormalised.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data %>% filter(date>as.Date(\"2020-04-01\")), \r\n       aes(x=date, y=prop, colour=metric))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\", date_labels=\"%B %y\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), \r\n                     name=\"Level as a proportion of January 2021 peak\")+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        plot.subtitle=element_markdown(),\r\n        panel.grid.major.y=element_line(colour=\"Grey90\"))+\r\n  labs(title=\"Vaccination is keeping admissions and deaths lower than previous waves\",\r\n       subtitle=\"Rolling 7-day average of new COVID <span style='color:#FF0000;'>cases</span>, <span style='color:#00A08A;'>admissions</span> and <span style='color:#F2AD00;'>deaths</span> as a proportion of their peak value in January 2021\",\r\n       caption=\"Plot inspired by @PaulMainwood | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Now replicate for the USA using Our World in Data data (the CDC website makes it bafflingly hard\r\n#to machine read their data and their API confuses my simple brain - long live the UK dashboard)\r\nurl.us <- \"https://covid.ourworldindata.org/data/owid-covid-data.csv\"\r\ntemp <- curl_download(url=url.us, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nusukdata <- read.csv(temp) %>% \r\n  filter(iso_code %in% c(\"USA\", \"GBR\")) %>% \r\n  select(location, date, new_cases, new_deaths, hosp_patients) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(location) %>% \r\n  arrange(date) %>% \r\n  mutate(Cases=roll_mean(new_cases, 7, align=\"center\", fill=NA),\r\n         Deaths=roll_mean(new_deaths, 7, align=\"center\", fill=NA),\r\n         Admissions=roll_mean(hosp_patients, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup() %>% \r\n  gather(metric, count, c(6:8)) %>% \r\n  mutate(metric=factor(metric, levels=c(\"Cases\", \"Admissions\", \"Deaths\"))) %>% \r\n  group_by(location, metric) %>% \r\n  #Normalise against the peak.\r\n  #Step 1 - grab the peak value for each metric\r\n  #Option 1, just using the max value across the entire time series\r\n  #mutate(max=max(count, na.rm=TRUE)) %>% \r\n  #Option 2, normalising against the max value within a chosen date range\r\n  mutate(max=max(count[date>as.Date(\"2020-08-01\") & date<as.Date(\"2021-05-01\")], \r\n                 na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  #Step 2 - calculate each date's value as a proportion of the peak\r\n  mutate(prop=count/max)\r\n  \r\nagg_tiff(\"Outputs/COVIDMetricsNormalisedUKUSA.tiff\", units=\"in\", width=12, height=6, res=500)\r\nggplot(usukdata %>% filter(date>as.Date(\"2020-04-01\")), \r\n       aes(x=date, y=prop, colour=metric))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\", date_labels=\"%B %y\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), \r\n                     name=\"Level as a proportion of January 2021 peak\")+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\")+\r\n  facet_wrap(~location)+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        plot.subtitle=element_markdown(),\r\n        panel.grid.major.y=element_line(colour=\"Grey90\"),\r\n        strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"Cases, admissions and deaths have decoupled much less clearly in the US than the UK\",\r\n       subtitle=\"Rolling 7-day average of new COVID <span style='color:#FF0000;'>cases</span>, <span style='color:#00A08A;'>hospital bed occupancy</span> and <span style='color:#F2AD00;'>deaths</span> as a proportion of their peak value in January 2021\",\r\n       caption=\"Plot inspired by @PaulMainwood | Data from Our World In Data | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n################\r\n#Version by region of England\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDate&metric=newDeaths28DaysByDeathDate&format=csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nregdata1 <- read.csv(temp) %>% \r\n  select(-c(1,3)) %>% \r\n  set_names(c(\"Region\", \"date\", \"Cases\", \"Deaths\")) %>% \r\n  gather(metric, count, c(3:4)) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  group_by(metric, Region) %>% \r\n  #Calculate rolling means\r\n  mutate(count_roll=roll_mean(count, 7, align=\"center\", fill=NA)) %>% \r\n  #Normalise against the peak.\r\n  #Step 1 - grab the peak value for each metric\r\n  #Option 1, just using the max value across the entire time series\r\n  #mutate(max=max(count, na.rm=TRUE)) %>% \r\n  #Option 2, normalising against the max value within a chosen date range\r\n  mutate(max=max(count_roll[date>as.Date(\"2020-08-01\") & date<as.Date(\"2021-05-01\")], \r\n                 na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  #Step 2 - calculate each date's value as a proportion of the peak\r\n  mutate(prop=count_roll/max)\r\n\r\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\r\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),\r\n                     code=c(1:9))\r\n\r\nagg_tiff(\"Outputs/COVIDMetricsNormalisedReg.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(regdata1 %>% filter(date>as.Date(\"2020-04-01\")), \r\n       aes(x=date, y=prop, colour=metric))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\", date_labels=\"%B %y\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), \r\n                     name=\"Level as a proportion of January 2021 peak\")+\r\n  scale_colour_manual(values=c(\"#FF0000\", \"#F2AD00\"))+\r\n  facet_geo(~Region, grid=mygrid)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(),\r\n        panel.grid.major.y=element_line(colour=\"Grey90\"))+\r\n  labs(title=\"Vaccination is keeping deaths lower than previous waves\",\r\n       subtitle=\"Rolling 7-day average of new COVID <span style='color:#FF0000;'>cases</span> and <span style='color:#F2AD00;'>deaths</span> as a proportion of their peak value in January 2021 in English regions\",\r\n       caption=\"Plot inspired by @PaulMainwood | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Admissions only available by NHS region\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nhsRegion&metric=newAdmissions&format=csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nregdata2 <- read.csv(temp) %>% \r\n  select(-c(1,3)) %>% \r\n  set_names(c(\"Region\", \"date\", \"count\")) %>% \r\n  mutate(date=as.Date(date), metric=\"Admissions\") %>% \r\n  group_by(Region) %>% \r\n  #Calculate rolling means\r\n  mutate(count_roll=roll_mean(count, 7, align=\"center\", fill=NA)) %>% \r\n  #Normalise against the peak.\r\n  #Step 1 - grab the peak value for each metric\r\n  #Option 1, just using the max value across the entire time series\r\n  #mutate(max=max(count, na.rm=TRUE)) %>% \r\n  #Option 2, normalising against the max value within a chosen date range\r\n  mutate(max=max(count_roll[date>as.Date(\"2020-08-01\") & date<as.Date(\"2021-05-01\")], \r\n                 na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  #Step 2 - calculate each date's value as a proportion of the peak\r\n  mutate(prop=count_roll/max)\r\n\r\n#Stick together (ignoring differences in regional boundaries)\r\nregdata <- bind_rows(regdata1, regdata2) %>% \r\n  mutate(metric=factor(metric, levels=c(\"Cases\", \"Admissions\", \"Deaths\")))\r\n\r\nagg_tiff(\"Outputs/COVIDMetricsNormalisedLondon.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(regdata %>% filter(Region==\"London\" & date>as.Date(\"2020-04-01\")), \r\n       aes(x=date, y=prop, colour=metric))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\", date_labels=\"%B %y\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), \r\n                     name=\"Level as a proportion of January 2021 peak\")+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        plot.subtitle=element_markdown(),\r\n        panel.grid.major.y=element_line(colour=\"Grey90\"))+\r\n  labs(title=\"Hospital admissions in London *might* have peaked 🤞\",\r\n       subtitle=\"Rolling 7-day average of new COVID <span style='color:#FF0000;'>cases</span>, <span style='color:#00A08A;'>admissions</span> and <span style='color:#F2AD00;'>deaths</span> in London* as a proportion of their peak value in January 2021\",\r\n       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\")\r\n\r\ndev.off()\r\n\r\n####################\r\n#Version for Omicron only\r\ndata2 <- read.csv(temp) %>% \r\n  select(-c(1:3)) %>% \r\n  set_names(c(\"date\", \"Admissions\", \"Cases\", \"Deaths\")) %>% \r\n  gather(metric, count, c(2:4)) %>% \r\n  mutate(date=as.Date(date),\r\n         metric=factor(metric, levels=c(\"Cases\", \"Admissions\", \"Deaths\"))) %>% \r\n  group_by(metric) %>% \r\n  #Calculate rolling means\r\n  mutate(count_roll=roll_mean(count, 7, align=\"center\", fill=NA)) %>% \r\n  #Normalise against the peak.\r\n  #Step 1 - grab the peak value for each metric\r\n  #Option 1, just using the max value across the entire time series\r\n  #mutate(max=max(count, na.rm=TRUE)) %>% \r\n  #Option 2, normalising against the max value within a chosen date range\r\n  mutate(max=max(count_roll[date>as.Date(\"2021-10-01\") & date<as.Date(\"2022-02-01\")], \r\n                 na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  #Step 2 - calculate each date's value as a proportion of the peak\r\n  mutate(prop=count_roll/max)\r\n\r\n#Simple replication\r\nggplot(data2, aes(x=date, y=prop, colour=metric))+\r\n  geom_line()\r\n\r\n#Prettier version (because why not)\r\n\r\nagg_tiff(\"Outputs/COVIDMetricsNormalisedOmi.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(data2 %>% filter(date>as.Date(\"2021-12-01\")), \r\n       aes(x=date, y=prop, colour=metric))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\", date_labels=\"%B %y\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), \r\n                     name=\"Level as a proportion of Omicron peak\",\r\n                     limits=c(0,1))+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\")+\r\n  theme_classic()+\r\n  theme(text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        plot.subtitle=element_markdown(),\r\n        panel.grid.major.y=element_line(colour=\"Grey90\"))+\r\n  labs(title=\"Both admissions and cases have started rising in recent days\",\r\n       subtitle=\"Rolling 7-day average of new COVID <span style='color:#FF0000;'>cases</span>, <span style='color:#00A08A;'>admissions</span> and <span style='color:#F2AD00;'>deaths</span> in England as a proportion of their peak value in January 2022\",\r\n       caption=\"Plot inspired by @PaulMainwood | Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDNHSAbsences.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(scales)\r\nlibrary(ggtext)\r\nlibrary(geofacet)\r\nlibrary(snakecase)\r\nlibrary(ggrepel)\r\nlibrary(RcppRoll)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Download latest absence data\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/04/Staff-Absences-Web-File-Timeseries.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#Trust:Region lookup\r\nlookup <- read_excel(temp, sheet=\"Total Absences\", range=\"B26:C163\", col_names=FALSE) %>% \r\n  set_names(\"Region\", \"TrustCode\")\r\n\r\ntotalraw <- read_excel(temp, sheet=\"Total Absences\", range=\"C16:DZ163\", col_names=FALSE) \r\n  \r\nCOVIDraw <- read_excel(temp, sheet=\"COVID Absences\", range=\"C16:DZ163\", col_names=FALSE) \r\n\r\n#Pull out national figures\r\nnattotals <- totalraw %>% \r\n  slice(1) %>% \r\n  gather(Date, Total, c(3:ncol(.))) %>% \r\n  select(-c(1,2)) %>% \r\n  mutate(Date=as.Date(\"2021-11-29\")+days(as.numeric(substr(Date, 4, 6))-3))\r\n\r\nnatCOVID <- COVIDraw %>% \r\n  slice(1) %>% \r\n  gather(Date, COVID, c(3:ncol(.))) %>% \r\n  select(-c(1,2)) %>% \r\n  mutate(Date=as.Date(\"2021-11-29\")+days(as.numeric(substr(Date, 4, 6))-3))\r\n\r\nnatdata <- merge(nattotals, natCOVID) %>% \r\n  mutate(Other=Total-COVID) %>% \r\n  gather(Cause, Count, c(2:4)) %>% \r\n  group_by(Cause) %>% \r\n  mutate(Count_roll=roll_mean(Count, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSAbsences.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(natdata %>% filter(Cause!=\"Total\"), aes(x=Date, y=Count_roll, fill=Cause))+\r\n  geom_area(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Total staff absent\")+\r\n  scale_fill_paletteer_d(\"lisa::Jean_MichelBasquiat_1\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"NHS staff absences are high but have stopped rising\",\r\n       subtitle=\"Rolling 7-day average number of staff ill or isolating <span style='color:#C11432FF;'>due to COVID</span> or <span style='color:#009ADAFF ;'>absent for other reasons</span><br>in English acute NHS trusts\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Regional version\r\nregtotals <- totalraw[c(3:9),] %>% \r\n  gather(Date, Total, c(3:ncol(.))) %>% \r\n  select(-c(1)) %>% \r\n  rename(Region=`...2`) %>% \r\n  mutate(Date=as.Date(\"2021-11-29\")+days(as.numeric(substr(Date, 4, 6))-3))\r\n\r\nregCOVID <- COVIDraw[c(3:9),] %>% \r\n  gather(Date, COVID, c(3:ncol(.))) %>% \r\n  select(-c(1)) %>% \r\n  rename(Region=`...2`) %>%   \r\n  mutate(Date=as.Date(\"2021-11-29\")+days(as.numeric(substr(Date, 4, 6))-3))\r\n\r\nregdata <- merge(regtotals, regCOVID) %>% \r\n  mutate(Other=Total-COVID) %>% \r\n  gather(Cause, Count, c(3:5)) %>% \r\n  group_by(Cause, Region) %>% \r\n  mutate(Count_roll=roll_mean(Count, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\n#Set up geofacet grid of NHS regions\r\nmygrid <- data.frame(name=c(\"North West\", \"North East and Yorkshire\", \r\n                            \"Midlands\",\"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,1,2,2,3,3,3), col=c(2,3,2,3,1,2,3),\r\n                     code=c(1:7))\r\n\r\nagg_tiff(\"Outputs/COVIDNHSAbsencesxReg.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(regdata %>% filter(Cause!=\"Total\"), aes(x=Date, y=Count_roll, fill=Cause))+\r\n  geom_area(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Total staff absent\")+\r\n  scale_fill_paletteer_d(\"lisa::Jean_MichelBasquiat_1\")+\r\n  facet_geo(~Region, grid=mygrid)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"NHS staff absences are most acute in the Midlands and North of England\",\r\n       subtitle=\"Rolling 7-day average number of staff ill or isolating <span style='color:#C11432FF;'>due to COVID</span> or <span style='color:#009ADAFF ;'>absent for other reasons</span><br>in English acute NHS trusts\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Tidy up trust-level data\r\ntrusttotals <- totalraw[c(11:148),] %>%\r\n  gather(Date, Total, c(3:ncol(.))) %>% \r\n  rename(Trust=`...2`, TrustCode=`...1`) %>% \r\n  mutate(Date=as.Date(\"2021-11-29\")+days(as.numeric(substr(Date, 4, 6))-3))\r\n\r\ntrustCOVID <- COVIDraw[c(11:148),] %>% \r\n  gather(Date, COVID, c(3:ncol(.))) %>% \r\n  rename(Trust=`...2`, TrustCode=`...1`) %>% \r\n  mutate(Date=as.Date(\"2021-11-29\")+days(as.numeric(substr(Date, 4, 6))-3))\r\n\r\ntrustdata <- merge(trusttotals, trustCOVID) %>% \r\n  mutate(Other=Total-COVID) %>% \r\n  gather(Cause, Count, c(4:6)) %>% \r\n  group_by(TrustCode, Trust, Cause) %>% \r\n  mutate(Count_roll=roll_mean(Count, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\n#Bring in some denominators\r\n#Source https://digital.nhs.uk/data-and-information/publications/statistical/nhs-workforce-statistics/september-2021\r\nsource <- \"https://files.digital.nhs.uk/18/78CB98/NHS%20Workforce%20Statistics%2C%20September%202021%20England%20and%20Organisation.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nstaffpops <- read_excel(temp, sheet=\"2. NHSE, Org & SG - HC\", range=\"C12:E329\", col_names=FALSE) %>% \r\n  filter(!is.na(`...2`)) %>% \r\n  set_names(\"TrustName\", \"TrustCode\", \"Staff\") %>% \r\n  mutate(TrustCode=if_else(TrustCode==\"RW6\", \"RM3\", TrustCode),\r\n         TrustName=if_else(TrustCode==\"RM3\", \"Northern Healthcare Alliance NHS Foundation Trust\",\r\n                            TrustName)) %>% \r\n  group_by(TrustName, TrustCode) %>% \r\n  summarise(Staff=sum(Staff)) %>% \r\n  ungroup()\r\n\r\ncombined <- merge(trustdata, staffpops) %>% \r\n  mutate(AbsProp=Count/Staff, AbsProp_roll=Count_roll/Staff) %>% \r\n  merge(lookup)\r\n\r\ncombinedreg <- combined %>% \r\n  group_by(Date, Region, Cause) %>% \r\n  summarise(Count=sum(Count), Staff=sum(Staff), Count_roll=sum(Count_roll)) %>% \r\n  ungroup() %>% \r\n  mutate(AbsProp=Count/Staff, AbsProp_roll=Count_roll/Staff)\r\n\r\nagg_tiff(\"Outputs/COVIDNHSAbsencePropxReg.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(combinedreg %>% filter(Cause==\"Total\"), aes(x=Date, y=AbsProp_roll, colour=Region))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of staff absent\", limits=c(0,NA),\r\n                     labels=label_percent(accuracy=1), breaks=c(0,0.02,0.04,0.06,0.08,0.1, 0.12))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  theme_custom()+\r\n  labs(title=\"The Midlands and the North have the highest levels of NHS staff absence\",\r\n       subtitle=\"Proportion of NHS staff currently absent through sickness or isolation in acute trusts in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSAbsencePropxTrust.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(combined %>% filter(Cause==\"Total\" & Date==as.Date(\"2022-01-16\")), \r\n       aes(x=AbsProp, y=fct_reorder(Trust, AbsProp), fill=Region))+\r\n  geom_col()+\r\n  scale_x_continuous(labels=label_percent(accuracy=1), name=\"Proportion of staff absent\")+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  theme_custom()+\r\n  theme(axis.text.y=element_blank(), axis.ticks.y=element_blank())+\r\n  labs(title=\"Some NHS trusts have more than 10% of staff off work\",\r\n       subtitle=\"Proportion of NHS staff absent for any reason as of 20th March, by trust (acute trusts only)\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bring in bed occupancy data\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/03/Weekly-covid-admissions-and-beds-publication-220324.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nweeklyrange <- \"FS\"\r\n\r\nGACV19 <- read_excel(temp, sheet=\"Adult G&A Beds Occupied COVID\", \r\n                          range=paste0(\"B25:\", weeklyrange, \"164\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, GACV19, c(4:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nGAOther <- read_excel(temp, sheet=\"Adult G&A Bed Occupied NonCOVID\", \r\n                     range=paste0(\"B25:\", weeklyrange, \"164\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, GAOther, c(4:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nGAUnocc <- read_excel(temp, sheet=\"Adult G&A Beds Unoccupied\", \r\n                     range=paste0(\"B25:\", weeklyrange, \"164\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, GAUnocc, c(4:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nCCCV19 <- read_excel(temp, sheet=\"Adult CC Beds Occupied COVID\", \r\n                     range=paste0(\"B25:\", weeklyrange, \"164\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, CCCV19, c(4:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nCCOther <- read_excel(temp, sheet=\"Adult CC Bed Occupied NonCOVID\", \r\n                     range=paste0(\"B25:\", weeklyrange, \"164\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, CCOther, c(4:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nCCUnocc <- read_excel(temp, sheet=\"Adult CC Beds Unoccupied\", \r\n                     range=paste0(\"B25:\", weeklyrange, \"164\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, CCUnocc, c(4:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\n#Merge and calculate % of beds currently occupied\r\noccdata <- GACV19 %>% \r\n  merge(GAOther %>% select(date, code, GAOther), by=c(\"date\", \"code\")) %>% \r\n  merge(GAUnocc %>% select(date, code, GAUnocc), by=c(\"date\", \"code\")) %>% \r\n  merge(CCCV19 %>% select(date, code, CCCV19), by=c(\"date\", \"code\")) %>% \r\n  merge(CCOther %>% select(date, code, CCOther), by=c(\"date\", \"code\")) %>% \r\n  merge(CCUnocc %>% select(date, code, CCUnocc), by=c(\"date\", \"code\")) %>% \r\n  mutate(GABeds=GAUnocc+GACV19+GAOther, \r\n         CCBeds=CCUnocc+CCCV19+CCOther, \r\n         GAOccprop=(GACV19+GAOther)/GABeds,\r\n         CCOccprop=(CCCV19+CCOther)/CCBeds)\r\n\r\n#Download PHE's trust  catchment data from and save as a csv.\r\n#https://app.box.com/s/qh8gzpzeo1firv1ezfxx2e6c4tgtrudl\r\ncatchments <- read_csv(\"COVID_LA_Plots/2020 Trust Catchment Populations Worksheet.csv\") %>% \r\n  filter(CatchmentYear==2018) %>% \r\n  group_by(TrustCode) %>% \r\n  summarise(catchpop=sum(Catchment)) %>% \r\n  ungroup()\r\n\r\n\r\nalldata <- merge(combined, occdata, by.x=c(\"Date\", \"TrustCode\"),\r\n                 by.y=c(\"date\", \"code\")) %>% \r\n  merge(catchments)\r\n\r\nplotdata <- alldata %>% \r\n  filter(Date>=max(Date)-days(7) & Cause==\"Total\" & CCBeds>=10) %>% \r\n  mutate(trust=str_replace(trust, \" NHS TRUST\", \"\"),\r\n         trust=str_replace(trust, \"NHS FOUNDATION TRUST\", \"\"),\r\n         trust=to_any_case(trust, case=\"title\"),\r\n         trust=str_replace(trust, \"King s\", \"King's\"),\r\n         trust=str_replace(trust, \"Guy s\", \"Guy's\"),\r\n         trust=str_replace(trust, \"George s\", \"George's\"),\r\n         trust=str_replace(trust, \"Women s\", \"Women's\"),\r\n         trust=str_replace(trust, \"Children s\", \"Children's\"),\r\n         trust=str_replace(trust, \"Peter s\", \"Peter's\"),\r\n         trust=str_replace(trust, \" Nhs Ft\", \"\"))\r\n         \r\nagg_tiff(\"Outputs/COVIDCCBedsvsAbsences.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  #geom_path(data=plotdata,\r\n  #          aes(x=AbsProp, y=CCOccprop, group=trust, alpha=7-as.integer(max(Date)-Date)),\r\n  #          colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdata %>% filter(Date==max(Date)),\r\n             aes(x=AbsProp, y=CCOccprop, size=CCBeds, fill=Region), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdata %>% filter(Date==max(Date)), \r\n                  aes(x=AbsProp, y=CCOccprop, label=trust), size=rel(3),\r\n                  box.padding=0.7, point.padding=0)+\r\n  scale_x_continuous(name=\"Proportion of NHS staff absent\", limits=c(0,NA), \r\n                     label=label_percent(accuracy=1))+\r\n  scale_y_continuous(name=\"Proportion of Critical Care beds occupied\", limits=c(0,NA), \r\n                     label=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\", name=\"\")+\r\n  scale_size(guide=\"none\")+\r\n  theme_custom()+\r\n  theme(axis.line=element_blank())+\r\n  labs(title=\"Critical care capacity is at risk in many hospitals\",\r\n       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 \",\r\n                       max(plotdata$Date)),\r\n       caption=\"Data from NHS England, PHE & ONS\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDGABedsvsAbsences.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot()+\r\n  geom_hline(yintercept=0)+\r\n  geom_vline(xintercept=0)+\r\n  #geom_path(data=plotdata,\r\n  #          aes(x=AbsProp, y=GAOccprop, group=trust, alpha=7-as.integer(max(Date)-Date)),\r\n  #          colour=\"Grey50\", show.legend=FALSE)+\r\n  geom_point(data=plotdata %>% filter(Date==max(Date)),\r\n             aes(x=AbsProp, y=GAOccprop, size=GABeds, fill=Region), shape=21, alpha=0.7)+\r\n  geom_text_repel(data=plotdata %>% filter(Date==max(Date)), \r\n                  aes(x=AbsProp, y=GAOccprop, label=trust), size=rel(3),\r\n                  box.padding=0.7, point.padding=0)+\r\n  scale_x_continuous(name=\"Proportion of NHS staff absent\", limits=c(0,NA), \r\n                     label=label_percent(accuracy=1))+\r\n  scale_y_continuous(name=\"Proportion of General & Acute beds occupied\", limits=c(0.5,1),\r\n                     label=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"colorblindr::OkabeIto\", name=\"\")+\r\n  scale_size(guide=\"none\")+\r\n  theme_custom()+\r\n  theme(axis.line=element_blank())+\r\n  labs(title=\"Most English hospitals have less than 10% of beds unoccupied\",\r\n       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 \",\r\n                       max(plotdata$Date)),\r\n       caption=\"Data from NHS England, PHE & ONS\\nPlot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDNHSAdmissions.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(RcppRoll)\r\nlibrary(geofacet)\r\nlibrary(ggtext)\r\nlibrary(snakecase)\r\nlibrary(forcats)\r\nlibrary(ragg)\r\nlibrary(extrafont)\r\nlibrary(scales)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Hospital admissions data available from https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-hospital-activity/\r\n#Longer time series of regional data updated daily\r\ndailyurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/COVID-19-daily-admissions-and-beds-20220623.xlsx\"\r\n#Shorter time series of trust-level data updated weekly on a Thursday afternoon\r\nweeklyurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/06/Weekly-covid-admissions-and-beds-publication-220623.xlsx\"\r\n#Increment by one each day\r\ndailyrange <- \"CF\"\r\ndailyoccrange <- \"CH\"\r\n#Increment by seven each week\r\nweeklyrange <- \"CF\"\r\n\r\ndailydata <- tempfile()\r\ndailydata <- curl_download(url=dailyurl, destfile=dailydata, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.old1 <- tempfile()\r\ndailyurl.old1 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/02/COVID-19-daily-admissions-and-beds-20210406-DQnotes.xlsx\"\r\ndailydata.old1 <- curl_download(url=dailyurl.old1, destfile=dailydata.old1, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.old2 <- tempfile()\r\ndailyurl.old2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/COVID-19-daily-admissions-and-beds-20211207-20210407-20210930.xlsx\"\r\ndailydata.old2 <- curl_download(url=dailyurl.old2, destfile=dailydata.old2, quiet=FALSE, mode=\"wb\")\r\n\r\ndailydata.old3 <- tempfile()\r\ndailyurl.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\"\r\ndailydata.old3 <- curl_download(url=dailyurl.old3, destfile=dailydata.old3, quiet=FALSE, mode=\"wb\")\r\n\r\n#Total admissions\r\ndaily1 <- read_excel(dailydata, sheet=\"Daily publication\", range=paste0(\"B15:\", dailyrange, \"21\"), \r\n                     col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Admissions\",\r\n         date=as.Date(\"2022-04-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily1.old1 <- read_excel(dailydata.old1, sheet=\"Daily publication\", range=\"B15:IQ21\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Admissions\",\r\n         date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n           rename(region=`...1`)\r\n\r\ndaily1.old2 <- read_excel(dailydata.old2, sheet=\"Daily publication\", range=\"B15:FW21\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Admissions\",\r\n         date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily1.old3 <- read_excel(dailydata.old3, sheet=\"Daily publication\", range=\"B15:GB21\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Admissions\",\r\n         date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\n#Total occupancy\r\ndaily2 <- read_excel(dailydata, sheet=\"Daily publication\", range=paste0(\"B91:\", dailyoccrange, \"97\"), col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy\",\r\n         date=as.Date(\"2022-04-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily2.old1 <- read_excel(dailydata.old1, sheet=\"Daily publication\", range=\"B91:IQ97\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy\",\r\n         date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily2.old2 <- read_excel(dailydata.old2, sheet=\"Daily publication\", range=\"B91:FW97\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy\",\r\n         date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily2.old3 <- read_excel(dailydata.old3, sheet=\"Daily publication\", range=\"B91:GB97\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy\",\r\n         date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\n#Total MV occupancy\r\ndaily3 <- read_excel(dailydata, sheet=\"Daily publication\", range=paste0(\"B106:\", dailyoccrange, \"112\"), col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy of MV beds\",\r\n         date=as.Date(\"2022-04-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily3.old1 <- read_excel(dailydata.old1, sheet=\"Daily publication\", range=\"B106:IQ112\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy of MV beds\",\r\n         date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily3.old2 <- read_excel(dailydata.old2, sheet=\"Daily publication\", range=\"B106:FW112\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy of MV beds\",\r\n         date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\ndaily3.old3 <- read_excel(dailydata.old3, sheet=\"Daily publication\", range=\"B106:GB112\", col_names=FALSE) %>% \r\n  gather(date, count, c(2:ncol(.))) %>% \r\n  mutate(metric=\"Occupancy of MV beds\",\r\n         date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(region=`...1`)\r\n\r\n#Merge and convert to rates\r\ndailydata <- bind_rows(daily1.old1, daily1.old2, daily1.old3, daily1, \r\n                       daily2.old1, daily2.old2, daily2.old3, daily2, \r\n                       daily3.old1, daily3.old2, daily3.old3, daily3) %>% \r\n  mutate(pop=case_when(\r\n    region==\"East of England\" ~ 6236072,\r\n    region==\"London\" ~ 8961989,\r\n    region==\"Midlands\" ~ 5934037+4835928,\r\n    region==\"North East and Yorkshire\" ~ 2669941+5502967,\r\n    region==\"North West\" ~ 7341196,\r\n    region==\"South East\" ~ 9180135,\r\n    region==\"South West\" ~ 5624696),\r\n    rate=count*100000/pop) %>% \r\n  group_by(region, metric) %>% \r\n  mutate(rollrate=roll_mean(rate, 7, align=\"center\", fill=NA))\r\n\r\n#Extract max date\r\nmaxdailydate=max(dailydata$date)\r\n\r\n#Line charts\r\nagg_tiff(\"Outputs/COVIDNHSMetricsxReg.tiff\", units=\"in\", width=12, height=6, res=500)\r\nggplot(dailydata)+\r\n  geom_line(aes(x=date, y=rollrate, colour=region))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Rate per 100,000 population\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"NHS Region\")+\r\n  facet_wrap(~metric, scales=\"free_y\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"The number of COVID patients in English hospitals is currently well below last winter's levels\",\r\n       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, \".\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Recent version\r\nagg_tiff(\"Outputs/COVIDNHSMetricsxRegRecent.tiff\", units=\"in\", width=12, height=6, res=500)\r\nggplot(dailydata %>% filter(date>as.Date(\"2021-12-01\")))+\r\n  geom_line(aes(x=date, y=rollrate, colour=region))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Rate per 100,000 population\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"NHS Region\")+\r\n  facet_wrap(~metric, scales=\"free_y\")+\r\n  theme_custom()+\r\n  labs(title=\"Admissions and occupancy are rising, but not ventilator beds (so far)\",\r\n       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, \".\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSMetricsxRegLog.tiff\", units=\"in\", width=12, height=6, res=500)\r\nggplot(subset(dailydata, date>as.Date(\"2021-04-01\")))+\r\n  geom_line(aes(x=date, y=rollrate, colour=region))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Rate per 100,000 population (log scale)\", trans=\"log\",\r\n                     labels=label_number(accuracy=0.01))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"NHS Region\")+\r\n  facet_wrap(~metric, scales=\"free_y\")+\r\n  theme_custom()+\r\n  labs(title=\"On a log scale it's clear that hospital numbers are rising exponentially everywhere\",\r\n       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, \".\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Admissions only\r\nagg_tiff(\"Outputs/COVIDNHSAdmissionsxReg.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(subset(dailydata, metric==\"Admissions\"))+\r\n  geom_line(aes(x=date, y=rollrate, colour=region))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Rate per 100,000 population\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"NHS Region\")+\r\n  theme_custom()+\r\n  labs(title=\"The number of new COVID admissions is falling in London\",\r\n       subtitle=paste0(\"Rolling 7-day averages of new hospital admissions for patients with a positive COVID-19 diagnosis.\\nData up to \", maxdailydate, \".\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSAdmissionsxRegRecent.tiff\", units=\"in\", width=9, height=6, res=500)\r\nggplot(subset(dailydata, metric==\"Admissions\" & date>as.Date(\"2021-12-01\")))+\r\n  geom_line(aes(x=date, y=rollrate, colour=region))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Rate per 100,000 population\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\", name=\"NHS Region\")+\r\n  theme_custom()+\r\n  labs(title=\"The North West is leading the BA.4/5 wave\",\r\n       subtitle=paste0(\"Rolling 7-day averages of new hospital admissions for patients with a positive COVID-19 diagnosis.\\nData up to \", maxdailydate, \".\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\n#Now look at trust-level weekly data\r\nweeklydata <- tempfile()\r\nweeklydata <- curl_download(url=weeklyurl, destfile=weeklydata, quiet=FALSE, mode=\"wb\")\r\n\r\nweeklydata.old1 <- tempfile()\r\nweeklyurl.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\"\r\nweeklydata.old1 <- curl_download(url=weeklyurl.old1, destfile=weeklydata.old1, quiet=FALSE, mode=\"wb\")\r\n\r\nweeklydata.old2 <- tempfile()\r\nweeklyurl.old2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/Weekly-covid-admissions-and-beds-publication-211209-210407-210930.xlsx\"\r\nweeklydata.old2 <- curl_download(url=weeklyurl.old2, destfile=weeklydata.old2, quiet=FALSE, mode=\"wb\")\r\n\r\n\r\nweeklyCOVID <- read_excel(weeklydata, sheet=\"Adult G&A Beds Occupied COVID\", \r\n                          range=paste0(\"B16:\", weeklyrange, \"167\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"COVID\",\r\n         date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyCOVID.old1 <- read_excel(weeklydata.old1, sheet=\"Adult G&A Beds Occupied COVID\", \r\n                          range=\"B16:EO167\", col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"COVID\",\r\n         date=as.Date(\"2020-11-17\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyCOVID.old2 <- read_excel(weeklydata.old2, sheet=\"Adult G&A Beds Occupied COVID\", \r\n                               range=\"B16:FY167\", col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"COVID\",\r\n         date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyOther <- read_excel(weeklydata, sheet=\"Adult G&A Bed Occupied NonCOVID\", \r\n                          range=paste0(\"B16:\", weeklyrange, \"167\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"non-COVID\",\r\n         date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyOther.old1 <- read_excel(weeklydata.old1, sheet=\"Adult G&A Bed Occupied NonCOVID\", \r\n                          range=\"B16:EO167\", col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"non-COVID\",\r\n         date=as.Date(\"2020-11-17\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyOther.old2 <- read_excel(weeklydata.old2, sheet=\"Adult G&A Bed Occupied NonCOVID\", \r\n                               range=\"B16:FY167\", col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"non-COVID\",\r\n         date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyEmpty <- read_excel(weeklydata, sheet=\"Adult G&A Beds Unoccupied\", \r\n                          range=paste0(\"B16:\", weeklyrange, \"167\"), col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"Unoccupied\",\r\n         date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyEmpty.old1 <- read_excel(weeklydata.old1, sheet=\"Adult G&A Beds Unoccupied\", \r\n                          range=\"B16:EO167\", col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"Unoccupied\",\r\n         date=as.Date(\"2020-11-17\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklyEmpty.old2 <- read_excel(weeklydata.old2, sheet=\"Adult G&A Beds Unoccupied\", \r\n                               range=\"B16:FY167\", col_names=FALSE)[-c(2),] %>% \r\n  gather(date, count, c(4:ncol(.))) %>% \r\n  mutate(type=\"Unoccupied\",\r\n         date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-4)) %>% \r\n  rename(region=`...1`, code=`...2`, trust=`...3`)\r\n\r\nweeklydata <- bind_rows(weeklyCOVID, weeklyCOVID.old1, weeklyCOVID.old2,\r\n                        weeklyOther, weeklyOther.old1, weeklyOther.old2,\r\n                        weeklyEmpty, weeklyEmpty.old1, weeklyEmpty.old2) %>% \r\n  mutate(region=case_when(\r\n    trust==\"ENGLAND\" ~ \"Nation\", \r\n    trust %in% c(\"East of England\", \"London\", \"Midlands\", \"North East and Yorkshire\",\r\n                 \"North West\", \"South East\", \"South West\") ~ \"Region\",\r\n    TRUE ~ region)) %>% \r\n  group_by(trust, date) %>% \r\n  mutate(capacity=sum(count)) %>% \r\n  ungroup() %>% \r\n  mutate(proportion=count/capacity)\r\n\r\n#Extract max date\r\nmaxweeklydate=max(weeklydata$date)\r\n\r\n#Carve out into separate regional/national and trust-level datasets\r\nnatdata <- weeklydata %>% filter(region %in% c(\"Nation\", \"Region\"))\r\ntrustdata <- weeklydata %>% \r\n  filter(!region %in% c(\"Nation\", \"Region\") & capacity>=100) %>% \r\n  mutate(trust=str_replace(trust, \" NHS TRUST\", \"\"),\r\n         trust=str_replace(trust, \"NHS FOUNDATION TRUST\", \"\"),\r\n         trust=to_any_case(trust, case=\"title\"),\r\n         trust=str_replace(trust, \"King s\", \"King's\"),\r\n         trust=str_replace(trust, \"Guy s\", \"Guy's\"),\r\n         trust=str_replace(trust, \"George s\", \"George's\"),\r\n         trust=str_replace(trust, \"Women s\", \"Women's\"),\r\n         trust=str_replace(trust, \"Children s\", \"Children's\"),\r\n         trust=str_replace(trust, \"Peter s\", \"Peter's\")) %>% \r\n  group_by(trust) %>% \r\n  mutate(maxcap=max(count[type==\"COVID\"])) %>% \r\n  ungroup() %>% \r\n  mutate(trust=fct_reorder(trust, -maxcap))\r\n\r\n#Convert national/region data to rates\r\nnatdata <- natdata %>% \r\n  mutate(pop=case_when(\r\n    trust==\"East of England\" ~ 6236072,\r\n    trust==\"London\" ~ 8961989,\r\n    trust==\"Midlands\" ~ 5934037+4835928,\r\n    trust==\"North East and Yorkshire\" ~ 2669941+5502967,\r\n    trust==\"North West\" ~ 7341196,\r\n    trust==\"South East\" ~ 9180135,\r\n    trust==\"South West\" ~ 5624696,\r\n    trust==\"ENGLAND\" ~ 56286961),\r\n    rate=count*100000/pop)\r\n\r\n#Single national plot\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancy.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(subset(natdata, trust==\"ENGLAND\"))+\r\n  geom_area(aes(x=date, y=rate, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Beds per 100,000 population\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"There are very few unoccupied beds in the NHS\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy rate in England for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" .\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Set up geofacet grid of NHS regions\r\nmygrid <- data.frame(name=c(\"North West\", \"North East and Yorkshire\", \r\n                            \"Midlands\",\"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,1,2,2,3,3,3), col=c(2,3,2,3,1,2,3),\r\n                     code=c(1:7))\r\n\r\n#Faceted regional plot\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancyxReg.tiff\", units=\"in\", width=8, height=8, res=500)\r\nggplot(subset(natdata, trust!=\"ENGLAND\"))+\r\n  geom_area(aes(x=date, y=rate, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Beds per 100,000 population\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                         labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_geo(~trust, grid=mygrid)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"Empty NHS beds are in short supply across the whole of England\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy rate by NHS region for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" .\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Get into trust-level data\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancyLondon.tiff\", units=\"in\", width=13, height=8, res=500)\r\ntrustdata %>% \r\n  filter(region==\"London\") %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of beds\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_wrap(~trust)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.6)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 bed occupancy has fallen across London\",\r\n     subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy by NHS trust for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" . Excluding trusts with fewer than 100 beds.\"),\r\n     caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancySouthEast.tiff\", units=\"in\", width=13, height=8, res=500)\r\ntrustdata %>% \r\n  filter(region==\"South East\") %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of beds\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_wrap(~trust)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.6)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"The number of COVID-19 patients in hospital is falling across the South East\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy by NHS trust for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" . Excluding trusts with fewer than 100 beds.\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancySouthWest.tiff\", units=\"in\", width=10, height=6, res=500)\r\ntrustdata %>% \r\n  filter(region==\"South West\") %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of beds\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_wrap(~trust)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.6)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 bed occupancy is falling across the South West\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy by NHS trust for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" . Excluding trusts with fewer than 100 beds.\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancyMidlands.tiff\", units=\"in\", width=14, height=9, res=500)\r\ntrustdata %>% \r\n  filter(region==\"Midlands\") %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of beds\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_wrap(~trust)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.6)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 bed occupancy in the Midlands is falling across all NHS trusts\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy by NHS trust for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" . Excluding trusts with fewer than 100 beds.\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancyEast.tiff\", units=\"in\", width=10, height=6, res=500)\r\ntrustdata %>% \r\n  filter(region==\"East of England\") %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of beds\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_wrap(~trust)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.6)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"The number of COVID-19 patients is falling in hospitals in the East of England\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy by NHS trust for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" . Excluding trusts with fewer than 100 beds.\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancyNorthWest.tiff\", units=\"in\", width=13, height=8, res=500)\r\ntrustdata %>% \r\n  filter(region==\"North West\") %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of beds\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_wrap(~trust)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.6)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"The number of COVID-19 patients in hospital is still relatively low across the North West\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy by NHS trust for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" . Excluding trusts with fewer than 100 beds.\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDNHSBedOccupancyNEYorks.tiff\", units=\"in\", width=13, height=8, res=500)\r\ntrustdata %>% \r\n  filter(region==\"North East and Yorkshire\") %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=count, fill=type), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of beds\")+\r\n  scale_fill_manual(values=c(\"#FD625E\", \"#374649\", \"#00B8AA\"), name=\"Occupied by\", \r\n                    labels=c(\"Patient with COVID-19\", \"Other patient\", \"Unoccupied\"))+\r\n  facet_wrap(~trust)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.6)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown(),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 patient numbers are falling across North East and Yorkshire\",\r\n       subtitle=paste0(\"<span style='color:Grey60;'>Bed occupancy by NHS trust for <span style='color:#FD625E;'>COVID-19 patients</span>, <span style='color:#374649;'>non-COVID patients</span> and <span style='color:#00B8AA;'>unoccupied beds</span>.<br>Data up to \", maxweeklydate, \" . Excluding trusts with fewer than 100 beds.\"),\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDNHSBolton.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\n\r\nnewfile <- tempfile()\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/Weekly-covid-admissions-and-beds-publication-210603.xlsx\"\r\nmaxday=\"BF\"\r\n\r\nnewfile <- curl_download(url=url, destfile=newfile, quiet=FALSE, mode=\"wb\")\r\n\r\nnewdata1 <- read_excel(newfile, sheet=\"All beds COVID\", range=paste0(\"C18:\", maxday,\"304\"), \r\n                       col_names=FALSE) %>% \r\n  gather(date, allbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(code=`...1`, trust=`...2`)\r\n\r\nnewdata2 <- read_excel(newfile, sheet=\"MV beds COVID\", range=paste0(\"C18:\", maxday,\"304\"), \r\n                       col_names=FALSE) %>% \r\n  gather(date, MVbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(code=`...1`, trust=`...2`)\r\n\r\noldfile <- tempfile()\r\noldurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/Weekly-covid-admissions-and-beds-publication-210429-up-to-210406.xlsx\"\r\n\r\noldfile <- curl_download(url=oldurl, destfile=oldfile, quiet=FALSE, mode=\"wb\")\r\n\r\nolddata1 <- read_excel(oldfile, sheet=\"All beds COVID\", range=\"C18:IS512\", col_names=FALSE) %>% \r\n  gather(date, allbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(code=`...1`, trust=`...2`)\r\n\r\nolddata2 <- read_excel(oldfile, sheet=\"MV beds COVID\", range=\"C18:IS512\", col_names=FALSE) %>% \r\n  gather(date, MVbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2)) %>% \r\n  rename(code=`...1`, trust=`...2`) \r\n\r\ndata <- bind_rows(newdata1, olddata1) %>% \r\n  merge(bind_rows(newdata2, olddata2), by=c(\"code\", \"date\")) %>% \r\n  mutate(Otherbeds=allbeds-MVbeds) %>% \r\n  gather(bedtype, count, c(\"MVbeds\", \"Otherbeds\")) %>% \r\n  mutate(count=if_else(is.na(count), 0, count),\r\n         date=as.Date(date))\r\n\r\n#Interpolate missing data from 29th November\r\nplotdata <- data %>% \r\n  filter(code==\"RMC\") %>% \r\n  group_by(bedtype) %>% \r\n  mutate(count=if_else(date==as.Date(\"2020-11-29\"), (lag(count, 1)+lead(count,1))/2,count))\r\n\r\nagg_tiff(\"Outputs/COVIDNHSOccupancyBolton.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(plotdata, aes(x=date, y=count, fill=fct_rev(bedtype)))+\r\n  geom_area(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Beds occupied\")+\r\n  scale_fill_paletteer_d(\"rcartocolor::Vivid\", direction=-1)+\r\n  theme_classic()+\r\n  theme(plot.title.position=\"plot\", plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), \r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Hospital occupancy seems to have levelled off in Bolton\",\r\n       subtitle=\"Daily number of patients in <span style='color:#CC3A8E;'>mechanical ventilator</span> and <span style='color:#A5AA99;'>other</span> beds with a positive COVID diagnosis\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDNHSTrustLakePlots.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(extrafont)\r\nlibrary(ggtext)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#NE & Yorkshire version\r\nlatestcol <- \"BR\"\r\n\r\nadmurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/COVID-19-daily-admissions-and-beds-20211209.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=admurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\noldadmurl1 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-daily-admissions-and-beds-20210406-1.xlsx\"\r\n\r\noldtemp1 <- tempfile()\r\noldtemp1 <- curl_download(url=oldadmurl1, destfile=oldtemp1, quiet=FALSE, mode=\"wb\")\r\n\r\noldadmurl2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/12/COVID-19-daily-admissions-and-beds-20211207-20210407-20210930.xlsx\"\r\n\r\noldtemp2 <- tempfile()\r\noldtemp2 <- curl_download(url=oldadmurl2, destfile=oldtemp2, quiet=FALSE, mode=\"wb\")\r\n\r\noccdata <- read_excel(temp, range=paste0(\"B90:\",latestcol, \"97\"), col_names=FALSE) %>% \r\n  gather(date, occupancy, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\noldoccdata1 <- read_excel(oldtemp1, range=\"B90:IQ97\", col_names=FALSE) %>% \r\n  gather(date, occupancy, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\noldoccdata2 <- read_excel(oldtemp2, range=\"B90:FY97\", col_names=FALSE) %>% \r\n  gather(date, occupancy, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2))\r\n  \r\nMVdata <-   read_excel(temp, range=paste0(\"B105:\", latestcol, \"112\"), col_names=FALSE) %>% \r\n  gather(date, MVoccupancy, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-10-01\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\noldMVdata1 <-   read_excel(oldtemp1, range=\"B105:IQ112\", col_names=FALSE) %>% \r\n  gather(date, MVoccupancy, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\noldMVdata2 <-   read_excel(oldtemp2, range=\"B105:FY112\", col_names=FALSE) %>% \r\n  gather(date, MVoccupancy, c(2:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.numeric(substr(date, 4,7))-2))\r\n\r\ndata <- merge(occdata, MVdata) %>% \r\n  bind_rows(merge(oldoccdata1, oldMVdata1), merge(oldoccdata2, oldMVdata2)) %>% \r\n  rename(Region=`...1`) %>% \r\n  mutate(Otherbeds=occupancy-MVoccupancy) %>% \r\n  gather(type, beds, c(3:5)) %>% \r\n  filter(type!=\"occupancy\") %>% \r\n  mutate(type=factor(type, levels=c(\"Otherbeds\", \"MVoccupancy\")))\r\n\r\nggplot(data %>% filter(Region!=\"ENGLAND\" & date>as.Date(\"2021-06-01\")), \r\n       aes(x=date, y=beds, fill=type))+\r\n  geom_col(position=\"stack\")+\r\n  facet_wrap(~Region)+\r\n  theme_custom()\r\n\r\nggplot(data %>% filter(Region!=\"ENGLAND\" & date>as.Date(\"2021-06-01\")),\r\n       aes(x=date, y=beds, colour=Region))+\r\n  geom_line()+\r\n  facet_wrap(~type, scales=\"free_y\")+\r\n  scale_colour_paletteer_d(\"colorblindr::OkabeIto\")+\r\n  theme_custom()\r\n\r\n#Bring in case data\r\ncaseurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateRollingSum&format=csv\"\r\n\r\ncasetemp <- tempfile()\r\ncasetemp <- curl_download(url=caseurl, destfile=casetemp, quiet=FALSE, mode=\"wb\")\r\n\r\ncases <- read.csv(casetemp) %>% \r\n  mutate(Region=case_when(\r\n    areaName %in% c(\"East Midlands\", \"West Midlands\") ~ \"Midlands\",\r\n    areaName %in% c(\"Yorkshire and The Humber\", \"North East\") ~ \r\n      \"North East and Yorkshire\",\r\n    TRUE ~ areaName),\r\n    date=as.Date(date)) %>% \r\n  group_by(Region, date) %>% \r\n  summarise(cases=sum(newCasesBySpecimenDateRollingSum)/7) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsLakePlotxReg.tiff\", units=\"in\", width=10, height=7, \r\n         res=500)\r\nggplot()+\r\n  geom_col(data=cases %>% filter(date>as.Date(\"2020-08-01\")), \r\n           aes(x=date, y=cases), fill=\"#47d4ae\")+\r\n  geom_col(data=data %>% filter(Region!=\"ENGLAND\"),\r\n           aes(x=date, y=-beds, fill=type), position=\"stack\", show.legend=FALSE)+\r\n  geom_hline(yintercept=0, colour=\"Black\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"\", labels=abs, position = \"right\")+\r\n  scale_fill_manual(values=c(\"#ff9f55\", \"#ff1437\"))+\r\n  facet_wrap(~Region)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"One of these waves is not like the others...\",\r\n       subtitle=\"Daily confirmed <span style='color:#47d4ae;'>new COVID-19 cases</span> and patients in hospital with COVID-19 in <span style='color:#ff1437;'>Mechanically Ventilated</span> and<span style='color:#ff9f55;'> all other</span> beds\",\r\n       caption=\"Data from NHS England and coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsLakePlotEng.tiff\", units=\"in\", width=10, height=7, \r\n         res=500)\r\nggplot()+\r\n  geom_col(data=cases %>% filter(date>as.Date(\"2020-08-01\")) %>% \r\n                                   group_by(date) %>% \r\n                                   summarise(cases=sum(cases)) %>% \r\n                                   ungroup(), \r\n           aes(x=date, y=cases), fill=\"#47d4ae\")+\r\n  geom_col(data=data %>% filter(Region==\"ENGLAND\"),\r\n           aes(x=date, y=-beds, fill=type), position=\"stack\", show.legend=FALSE)+\r\n  geom_hline(yintercept=0, colour=\"Black\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"\", labels=abs, position = \"right\")+\r\n  scale_fill_manual(values=c(\"#ff9f55\", \"#ff1437\"))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-09-01\"), y=25000, \r\n           label=\"New cases in the population\", hjust=0, family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-09-01\"), y=-20000, \r\n           label=\"Total patients in hospital\", hjust=0, family=\"Lato\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"COVID admission rates have been less volatile than case rates in recent months\",\r\n       subtitle=\"Daily confirmed <span style='color:#47d4ae;'>new COVID-19 cases</span> and patients in hospital with COVID-19 in <span style='color:#ff1437;'>Mechanically Ventilated</span> and<span style='color:#ff9f55;'> all other</span> beds in England\",\r\n       caption=\"Data from NHS England and coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#######################################\r\n#LA-level version\r\n\r\nurl.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\"\r\ntemp1 <- tempfile()\r\ntemp1 <- curl_download(url=url.adm.old, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\n\r\nurl.adm.new <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/07/Weekly-covid-admissions-and-beds-publication-210715.xlsx\"\r\ntemp2 <- tempfile()\r\ntemp2 <- curl_download(url=url.adm.new, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\nMV.old <- read_excel(temp1, sheet=\"MV beds COVID\", range=\"C25:IS512\", \r\n                     col_names=FALSE) %>% \r\n  gather(date, MVbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.integer(substr(date, 4, 6))-3)) %>% \r\n  rename(code=...1, name=...2)\r\n\r\nMV.new <- read_excel(temp2, sheet=\"MV beds COVID\", range=\"C25:CX304\", col_names=FALSE) %>% \r\n  gather(date, MVbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.integer(substr(date, 4, 6))-3)) %>% \r\n  rename(code=...1, name=...2)\r\n\r\nMVdata <- bind_rows(MV.old, MV.new)\r\n\r\nall.old <- read_excel(temp1, sheet=\"All beds COVID\", range=\"C25:IS512\", col_names=FALSE) %>% \r\n  gather(date, Allbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2020-08-01\")+days(as.integer(substr(date, 4, 6))-3)) %>% \r\n  rename(code=...1, name=...2)\r\n\r\nall.new <- read_excel(temp2, sheet=\"All beds COVID\", range=\"C25:CX304\", col_names=FALSE) %>% \r\n  gather(date, Allbeds, c(3:ncol(.))) %>% \r\n  mutate(date=as.Date(\"2021-04-07\")+days(as.integer(substr(date, 4, 6))-3)) %>% \r\n  rename(code=...1, name=...2)\r\n\r\nalldata <- bind_rows(all.old, all.new)\r\n\r\ntrustdata <- merge(MVdata, alldata, all=TRUE) %>% \r\n  mutate(MVbeds=if_else(is.na(MVbeds), 0, MVbeds),\r\n         #Fix a couple of apparent errors in the MV data\r\n         MVbeds=if_else(date==as.Date(\"2020-09-11\") & code==\"RT1\", 0, MVbeds),\r\n         MVbeds=if_else(date==as.Date(\"2020-08-02\") & code==\"RNU\", 0, MVbeds),\r\n         Allbeds=if_else(is.na(Allbeds), 0, Allbeds),\r\n         Otherbeds=Allbeds-MVbeds)\r\n\r\n#Bring in PHE data summarising admissions in HES to each trust by MSOA\r\nMSOA.adm <- read.csv(\"COVID_LA_Plots/Trust to MSOA HES data.csv\")\r\n\r\n#1st lookup for admissions up to 4th October, when RD3 and RDZ merged to form R0D in the admissions (but not deaths) data\r\nMSOA.adm1 <- MSOA.adm %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(CatchmentYear, msoa, TrustCode) %>% \r\n  summarise(msoa_total_catchment1=sum(msoa_total_catchment)) %>% \r\n  ungroup() \r\n\r\n#2nd lookup for after 4th October\r\nMSOA.adm2 <- MSOA.adm %>% \r\n  mutate(TrustCode=case_when(\r\n    TrustCode %in% c(\"RE9\", \"RLN\") ~ \"R0B\",\r\n    TrustCode==\"R1J\" ~ \"RTQ\",\r\n    TrustCode==\"RQ6\" ~ \"REM\",\r\n    TrustCode==\"RNL\" ~ \"RNN\",\r\n    TrustCode %in% c(\"RQ8\", \"RDD\") ~ \"RAJ\",\r\n    TrustCode==\"RA3\" ~ \"RA7\",\r\n    TrustCode==\"RC1\" ~ \"RC9\",\r\n    TrustCode==\"RBA\" ~ \"RH5\",\r\n    TrustCode %in% c(\"RDZ\", \"RD3\") ~ \"R0D\",\r\n    TRUE ~ as.character(TrustCode))) %>% \r\n  group_by(CatchmentYear, msoa, TrustCode) %>% \r\n  summarise(msoa_total_catchment2=sum(msoa_total_catchment)) %>% \r\n  ungroup()\r\n\r\ntemp1 <- data.frame(TrustCode=unique(MSOA.adm1$TrustCode))\r\ntemp2 <- data.frame(TrustCode=unique(MSOA.adm2$TrustCode))\r\ntemp <- bind_rows(temp1, temp2) %>%\r\n  unique()\r\n\r\nMSOA.adm <- merge(temp, MSOA.adm1, by=\"TrustCode\", all=TRUE) %>% \r\n  merge(., MSOA.adm2, all=TRUE) \r\n\r\n#Bring in MSOA to LTLA lookup\r\ntemp <- tempfile()\r\nsource <- \"http://geoportal1-ons.opendata.arcgis.com/datasets/0b3c76d1eb5e4ffd98a3679ab8dea605_0.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nMSOA.lookup <- read.csv(temp) %>% \r\n  select(MSOA11CD, LAD19CD, LAD19NM) %>% \r\n  unique() %>% \r\n  rename(msoa=MSOA11CD)\r\n\r\n#Merge into PHE lookup\r\nMSOA.adm <- merge(MSOA.adm, MSOA.lookup, by=\"msoa\", all.x=TRUE)\r\n\r\n#Convert to the lookup we want (trust to LTLA), averaging across last 3 years in data (2016-18)\r\ntrust.lookup <- MSOA.adm %>% \r\n  filter(CatchmentYear>=2016) %>% \r\n  group_by(TrustCode, LAD19CD, LAD19NM) %>% \r\n  summarise(catchment1=sum(msoa_total_catchment1, na.rm=TRUE),\r\n            catchment2=sum(msoa_total_catchment2, na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  group_by(TrustCode) %>% \r\n  mutate(pop1=sum(catchment1, na.rm=TRUE), popprop1=catchment1/pop1,\r\n         pop2=sum(catchment2, na.rm=TRUE), popprop2=catchment2/pop2) %>% \r\n  ungroup() %>% \r\n  rename(code=TrustCode)\r\n\r\nadmissions <- merge(trustdata, trust.lookup, by.x=\"code\", by.y=\"code\", all=TRUE)\r\n\r\nLAadmissions <- admissions %>% \r\n  mutate(MVbeds=case_when(\r\n    date<=as.Date(\"2020-10-04\") ~ MVbeds*popprop1,\r\n    TRUE ~ MVbeds*popprop2),\r\n    Otherbeds=case_when(\r\n      date<=as.Date(\"2020-10-04\") ~ Otherbeds*popprop1,\r\n      TRUE ~ Otherbeds*popprop2)\r\n    ) %>% \r\n  group_by(LAD19CD, date, LAD19NM) %>% \r\n  summarise(MVbeds=sum(MVbeds, na.rm=TRUE),\r\n            Otherbeds=sum(Otherbeds, na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  filter(!is.na(LAD19CD)) %>% \r\n  #merge City of London into Hackney and Isles of Scilly into Cornwall\r\n  mutate(LAD19CD=case_when(LAD19CD==\"E09000001\" ~ \"E09000012\",\r\n                           LAD19CD==\"E06000053\" ~ \"E06000052\",\r\n                           TRUE ~ as.character(LAD19CD))) %>%\r\n  group_by(LAD19CD, date, LAD19NM) %>% \r\n  summarise(MVbeds=sum(MVbeds),\r\n            Otherbeds=sum(Otherbeds)) %>% \r\n  ungroup() %>% \r\n  gather(type, beds, c(\"MVbeds\", \"Otherbeds\"))\r\n\r\n#Bring in LA level cases\r\nLAcasesurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateRollingSum&format=csv\" \r\n\r\ncasetemp2 <- tempfile()\r\ncasetemp2 <- curl_download(url=LAcasesurl, destfile=casetemp2, quiet=FALSE, mode=\"wb\")\r\n\r\nLAcases <- read.csv(casetemp2) %>% \r\n  mutate(date=as.Date(date))\r\n\r\n#Get Yorkshire-only datasets\r\nYorksbeds <- LAadmissions %>% \r\n  filter(LAD19NM %in% c(\"Barnsley\", \"Bradford\", \"Calderdale\", \"Doncaster\", \r\n                        \"East Riding of Yorkshire\", \"Hull\", \"Kirklees\", \"Leeds\",\r\n                        \"Rotherham\", \"Sheffield\", \"Wakefield\", \"York\", \"Craven\",\r\n                        \"Hambleton\", \"Harrogate\", \"Richmondshire\", \"Ryedale\",\r\n                        \"Scarborough\", \"Selby\")) %>% \r\n  group_by(date, type) %>% \r\n  summarise(beds=sum(beds)) %>% \r\n  ungroup() %>% \r\n  mutate(type=factor(type, levels=c(\"Otherbeds\", \"MVbeds\")))\r\n\r\nYorkscases <- LAcases %>% \r\n  filter(areaName %in% c(\"Barnsley\", \"Bradford\", \"Calderdale\", \"Doncaster\", \r\n                        \"Hull\", \"Kirklees\", \"Leeds\",\r\n                        \"Rotherham\", \"Sheffield\", \"Wakefield\", \"York\", \"Craven\",\r\n                        \"Hambleton\", \"Harrogate\", \"Richmondshire\", \"Ryedale\",\r\n                        \"Scarborough\", \"Selby\")) %>% \r\n  group_by(date) %>% \r\n  summarise(cases=sum(newCasesBySpecimenDateRollingSum)/7) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDYorkshireAdmissionsvsOccupancy.tiff\", units=\"in\", width=9, height=6,\r\n         res=800)\r\nggplot()+\r\n  geom_col(data=Yorkscases %>% filter(date>as.Date(\"2020-08-01\")), \r\n           aes(x=date, y=cases), fill=\"#47d4ae\")+\r\n  geom_col(data=Yorksbeds,\r\n           aes(x=date, y=-beds, fill=type), position=\"stack\", show.legend=FALSE)+\r\n  geom_hline(yintercept=0, colour=\"Black\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"\", labels=abs, position = \"right\")+\r\n  scale_fill_manual(values=c(\"#ff9f55\", \"#ff1437\"))+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-04-01\"), y=1200, \r\n           label=\"New cases in the population\", hjust=0, family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-04-01\"), y=-800, \r\n           label=\"Total patients in hospital\", hjust=0, family=\"Lato\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"New COVID-19 cases in Yorkshire are rising, but hospital beds have yet to follow\",\r\n       subtitle=\"Daily confirmed <span style='color:#47d4ae;'>new COVID-19 cases</span> and patients in hospital with COVID-19 in <span style='color:#ff1437;'>Mechanically Ventilated</span> and<br><span style='color:#ff9f55;'> all other</span> beds in Yorkshire\",\r\n       caption=\"Data from NHS England and coronavirus.data.gov.uk | Plot and analysis by Colin Angus\")\r\ndev.off()\r\n\r\n#Generic version for any LAs\r\nplotbeds <- LAadmissions %>% \r\n  filter(LAD19NM %in% c(\"Sheffield\")) %>% \r\n  group_by(date, type) %>% \r\n  summarise(beds=sum(beds)) %>% \r\n  ungroup() %>% \r\n  mutate(type=factor(type, levels=c(\"Otherbeds\", \"MVbeds\")))\r\n\r\nplotcases <- LAcases %>% \r\n  filter(areaName %in% c(\"Sheffield\")) %>% \r\n  group_by(date) %>% \r\n  summarise(cases=sum(newCasesBySpecimenDateRollingSum)/7) %>% \r\n  ungroup()\r\n\r\nplotname <- \"Sheffield\"\r\n\r\nagg_tiff(paste0(\"Outputs/COVIDAdmissionsvsOccupancy\", plotname, \".tiff\"), units=\"in\", width=9, height=6,\r\n         res=800)\r\nggplot()+\r\n  geom_col(data=plotcases %>% filter(date>as.Date(\"2020-08-01\")), \r\n           aes(x=date, y=cases), fill=\"#47d4ae\")+\r\n  geom_col(data=plotbeds,\r\n           aes(x=date, y=-beds, fill=type), position=\"stack\", show.legend=FALSE)+\r\n  geom_hline(yintercept=0, colour=\"Black\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"\", labels=abs, position = \"right\")+\r\n  scale_fill_manual(values=c(\"#ff9f55\", \"#ff1437\"))+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-04-01\"), y=400, \r\n           label=\"New cases in the population\", hjust=0, family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2021-04-01\"), y=-200, \r\n           label=\"Total patients in hospital\", hjust=0, family=\"Lato\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=paste0(\"New COVID-19 cases in \", plotname, \" are rising, but hospital beds have yet to follow\"),\r\n       subtitle=paste0(\"Daily confirmed <span style='color:#47d4ae;'>new COVID-19 cases</span> and patients in hospital with COVID-19 in <span style='color:#ff1437;'>Mechanically Ventilated</span> and<br><span style='color:#ff9f55;'> all other</span> beds in \", plotname),\r\n       caption=\"Data from NHS England and coronavirus.data.gov.uk | Plot and analysis by Colin Angus\")\r\ndev.off()\r\n\r\n#Welsh version\r\n#Because Wales loves pretty, but not very friendly dashboards, I've had to manually download the data\r\n#My gratitude to anyone who can work out how to automate this\r\n#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\r\n\r\nWalesdata <- read.csv(\"Data/WalesHospData.csv\") %>% \r\n  mutate(Date=as.Date(Date, format=\"%d-%b-%y\"))\r\n\r\nWalesurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=W92000004&metric=newCasesBySpecimenDateRollingSum&format=csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Walesurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nWalescases <- read.csv(temp) %>% \r\n  mutate(Date=as.Date(date), cases=newCasesBySpecimenDateRollingSum/7)\r\n\r\nagg_tiff(\"Outputs/COVIDWalesAdmissionsvsOccupancy.tiff\", units=\"in\", width=9, height=6,\r\n         res=800)\r\nggplot()+\r\n  geom_col(data=Walescases, aes(x=Date, y=cases), fill=\"#47d4ae\")+\r\n  geom_col(data=Walesdata, aes(x=Date, y=-Hospitalisations), fill=\"#ff9f55\")+ \r\n  geom_hline(yintercept=0, colour=\"Black\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"\", labels=abs, position = \"right\")+\r\n  scale_fill_manual(values=c(\"#ff9f55\", \"#ff1437\"))+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-05-01\"), y=800, \r\n           label=\"New cases in the population\", hjust=0, family=\"Lato\")+\r\n  annotate(geom=\"text\", x=as.Date(\"2020-05-01\"), y=-1500, \r\n           label=\"Total patients in hospital\", hjust=0, family=\"Lato\")+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"New COVID-19 cases in Wales are rising, but hospital beds have yet to follow\",\r\n       subtitle=\"Rolling 7-day average of daily confirmed <span style='color:#47d4ae;'>new COVID-19 cases</span> and the number of <span style='color:#ff9f55;'>patients in hospital </span>with suspected<br>or confirmed COVID-19 in Wales\",\r\n       caption=\"Data from StatsWales and coronavirus.data.gov.uk | Plot and analysis by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDONSDeathIneq.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(RcppRoll)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(scales)\r\n\r\noptions(scipen=99999)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Read in 2022 deaths by LA from ONS\r\ntemp <- tempfile()\r\nsource22 <- (\"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/causesofdeath/datasets/deathregistrationsandoccurrencesbylocalauthorityandhealthboard/2022/lahbtables2022week24.xlsx\")\r\ntemp <- curl_download(url=source22, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndeaths22 <- read_excel(temp, sheet=\"Registrations - All data\", range=\"A4:G97348\") %>% \r\n  set_names(\"LAD17CD\", \"Geography\", \"LAName\", \"Cause\", \"Week\", \"Location\", \"Deaths\") %>% \r\n  mutate(Date=as.Date(\"2022-01-07\")+weeks(Week-1))\r\n\r\n#2021 deaths\r\nsource21 <- (\"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fcausesofdeath%2fdatasets%2fdeathregistrationsandoccurrencesbylocalauthorityandhealthboard%2f2021/lahbtables20211.xlsx\")\r\ntemp <- curl_download(url=source21, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndeaths21 <- read_excel(temp, sheet=\"Registrations - All data\")[-c(1:4),] %>% \r\n  set_names(\"LAD17CD\", \"Geography\", \"LAName\", \"Cause\", \"Week\", \"Location\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(Week), Deaths=as.numeric(Deaths),\r\n         Date=as.Date(\"2021-01-08\")+weeks(Week-1))\r\n\r\n#2020 deaths\r\nsource20 <- (\"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fcausesofdeath%2fdatasets%2fdeathregistrationsandoccurrencesbylocalauthorityandhealthboard%2f2020/lahbtablesweek01to532020datawk232021.xlsx\")\r\ntemp <- curl_download(url=source20, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndeaths20 <- read_excel(temp, sheet=\"Registrations - All data\")[-c(1:4),] %>% \r\n  set_names(\"LAD17CD\", \"Geography\", \"LAName\", \"Cause\", \"Week\", \"Location\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(Week), Deaths=as.numeric(Deaths),\r\n         Date=as.Date(\"2020-01-03\")+weeks(Week-1))\r\n\r\n#Stick together and tidy up\r\ndeaths <- bind_rows(deaths20, deaths21, deaths22) %>% \r\n  group_by(LAD17CD, LAName, Cause, Date) %>% \r\n  spread(Location, Deaths) %>% \r\n  mutate(CareHome=if_else(is.na(`Care home`),0,`Care home`)+if_else(is.na(Hospice), 0, Hospice),\r\n         Home=if_else(is.na(Home), 0, Home)+if_else(is.na(Elsewhere), 0, Elsewhere)+\r\n           if_else(is.na(`Other communal establishment`), 0, `Other communal establishment`),\r\n         Hospital=if_else(is.na(Hospital), 0, Hospital),\r\n         AllLocations=CareHome+Home+Hospital) %>% \r\n  select(LAD17CD, LAName, Cause, Date, CareHome, Home, Hospital, AllLocations) %>% \r\n  gather(Location, Deaths, c(\"CareHome\", \"Home\", \"Hospital\", \"AllLocations\")) %>% \r\n  ungroup()\r\n\r\n#Calculate mean LA-level deprivation score\r\n#Start by calculating IMD at MSOA level\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE) %>% \r\n  select(c(1,2,5,6)) %>% \r\n  set_names(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, LAD17CD) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:G34758\", col_names=FALSE) %>% \r\n  select(-c(2:6)) %>% \r\n  set_names(\"LSOA11CD\", \"pop\")\r\n\r\npop_full <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:CT34758\", col_names=FALSE) %>% \r\n  select(-c(2:7)) %>% \r\n  set_names(\"LSOA11CD\", c(0:90))\r\n\r\n#Merge into IMD data and mess about with LA codes due to boundary changes\r\nIMD <- merge(IMD, pop) %>% \r\n  mutate(LAD17CD=case_when(\r\n    LAD17CD %in% c(\"E07000190\", \"E07000191\") ~ \"E07000246\",\r\n    LAD17CD %in% c(\"E07000206\", \"E07000205\") ~ \"E07000244\",\r\n    LAD17CD %in% c(\"E07000204\", \"E07000201\") ~ \"E07000245\",\r\n    LAD17CD %in% c(\"E06000028\", \"E06000029\", \"E07000048\") ~ \"E06000058\",\r\n    LAD17CD %in% c(\"E07000049\", \"E07000050\", \"E07000051\", \"E07000052\", \"E07000053\") ~ \"E06000059\",\r\n    LAD17CD %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\") ~ \"E06000060\",\r\n    TRUE ~ LAD17CD))\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\n#Need 2 versions as Northamptonshire split part way through the pandemic\r\nIMD_LTLA2020 <- IMD %>% \r\n  group_by(LAD17CD)%>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  arrange(IMDrank) %>% \r\n  mutate(cumpop=cumsum(pop),\r\n         popprop=cumpop/max(cumpop),\r\n         decile1=case_when(\r\n           #popprop<=0.1 ~ 1,\r\n           popprop<=0.2 ~ 2,\r\n           #popprop<=0.3 ~ 3,\r\n           popprop<=0.4 ~ 4,\r\n           #popprop<=0.5 ~ 5,\r\n           popprop<=0.6 ~ 6,\r\n           #popprop<=0.7 ~ 7,\r\n           popprop<=0.8 ~ 8,\r\n           #popprop<=0.9 ~ 9,\r\n           TRUE ~ 10)) \r\n  \r\nIMD_LTLA2021 <- IMD %>% \r\n    #Sort out Northamptonshire\r\n  mutate(LAD17CD=case_when(\r\n    LAD17CD %in% c(\"E07000150\", \"E07000152\", \"E07000153\", \"E07000156\") ~\r\n        \"E06000061\",\r\n    LAD17CD %in% c(\"E07000151\", \"E07000154\", \"E07000155\") ~\r\n        \"E06000062\",\r\n    TRUE ~ LAD17CD)) %>% \r\n      group_by(LAD17CD)%>% \r\n        summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n        ungroup()%>% \r\n  arrange(IMDrank) %>% \r\n  mutate(cumpop=cumsum(pop),\r\n         popprop=cumpop/max(cumpop),\r\n         decile2=case_when(\r\n           #popprop<=0.1 ~ 1,\r\n           popprop<=0.2 ~ 2,\r\n           #popprop<=0.3 ~ 3,\r\n           popprop<=0.4 ~ 4,\r\n           #popprop<=0.5 ~ 5,\r\n           popprop<=0.6 ~ 6,\r\n           #popprop<=0.7 ~ 7,\r\n           popprop<=0.8 ~ 8,\r\n           #popprop<=0.9 ~ 9,\r\n           TRUE ~ 10)) \r\n\r\n#Join together, removing Welsh LAs as IMD is English only\r\nfulldata <- merge(deaths %>% filter(substr(LAD17CD, 1, 1)==\"E\"), IMD_LTLA2020, all=TRUE, by=\"LAD17CD\") %>% \r\n  merge(IMD_LTLA2021, all=TRUE, by=\"LAD17CD\") %>% \r\n  mutate(decile=if_else(Date<as.Date(\"2021-01-02\"), decile1, decile2),\r\n         pop=if_else(Date<as.Date(\"2021-01-02\"), pop.x, pop.y)) %>% \r\n  select(LAD17CD, LAName, Cause, Date, Location, Deaths, decile, pop)\r\n\r\ndeciledata <- fulldata %>% \r\n  group_by(decile, Date, Cause, Location) %>% \r\n  summarise(Deaths=sum(Deaths), pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\ndeciledata %>% filter(Location==\"AllLocations\" & Cause==\"COVID 19\") %>% \r\n  ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Weekly COVID deaths\")+\r\n  scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()\r\n\r\nagg_png(\"Outputs/COVIDDeathsONSIneq2122.png\", units=\"in\", width=8, height=6, res=800)\r\ndeciledata %>% filter(Location==\"AllLocations\" & Cause==\"COVID 19\" & \r\n                        Date>as.Date(\"2021-07-01\")) %>% \r\n  ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\", breaks=c(as.Date(\"2021-07-01\"), as.Date(\"2021-09-01\"), \r\n                                 as.Date(\"2021-11-01\"), as.Date(\"2022-01-01\"),\r\n                                 as.Date(\"2022-03-01\"), as.Date(\"2022-05-01\")), \r\n               labels=c(\"Jul '21\", \"Sep '21\",\"Nov '21\",  \"Jan '22\", \"Mar '22\", \"May '22\"))+\r\n  scale_y_continuous(name=\"Weekly COVID deaths\", limits=c(0,NA))+\r\n  #scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"Deprivation decile\",\r\n  #                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n  #                                  \"10 - least deprived\"))+\r\n  scale_colour_manual(values=c(\"#663000\", \"#CC9B7A\", \"#F2DACE\", \"#66F0FF\", \"#00AACC\"), name=\"Deprivation quintile\",\r\n                      labels=c(\"1 - Most deprived\", \"2\", \"3\", \"4\", \"5 - Least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The BA.2 wave hit less deprived areas hardest\",\r\n       subtitle=\"Number of deaths registered with Covid on the death certificate by quintiles of the Index of Multiple Deprivation\",\r\n       caption=\"Data from the Office for National Statistics | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDDeathsONSIneq2122Prop.png\", units=\"in\", width=8, height=6, res=800)\r\ndeciledata %>% filter(Location==\"AllLocations\" & Cause==\"COVID 19\" & \r\n                        Date>as.Date(\"2021-07-01\")) %>% \r\n  ggplot(aes(x=Date, y=Deaths, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\", breaks=c(as.Date(\"2021-07-01\"), as.Date(\"2021-09-01\"), \r\n                                 as.Date(\"2021-11-01\"), as.Date(\"2022-01-01\"),\r\n                                 as.Date(\"2022-03-01\"), as.Date(\"2022-05-01\")), \r\n               labels=c(\"Jul '21\", \"Sep '21\",\"Nov '21\",  \"Jan '22\", \"Mar '22\", \"May '22\"))+\r\n  scale_y_continuous(name=\"Proportion of COVID deaths\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  #scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"Deprivation decile\",\r\n  #                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n  #                                  \"10 - least deprived\"))+\r\n  scale_fill_manual(values=c(\"#663000\", \"#CC9B7A\", \"#F2DACE\", \"#66F0FF\", \"#00AACC\"), name=\"Deprivation quintile\",\r\n                      labels=c(\"1 - Most deprived\", \"2\", \"3\", \"4\", \"5 - Least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"The proportion of COVID deaths coming from less deprived areas is rising\",\r\n       subtitle=\"Number of deaths registered with Covid on the death certificate by quintiles of the Index of Multiple Deprivation\",\r\n       caption=\"Data from the Office for National Statistics | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDDeathsONSIneq2022.png\", units=\"in\", width=8, height=6, res=800)\r\ndeciledata %>% filter(Location==\"AllLocations\" & Cause==\"COVID 19\") %>% \r\n  ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\", )+\r\n  scale_y_continuous(name=\"Weekly COVID deaths\", limits=c(0,NA))+\r\n  #scale_colour_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"Deprivation decile\",\r\n  #                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n  #                                  \"10 - least deprived\"))+\r\n  scale_colour_manual(values=c(\"#663000\", \"#CC9B7A\", \"#F2DACE\", \"#66F0FF\", \"#00AACC\"), name=\"Deprivation quintile\",\r\n                      labels=c(\"1 - Most deprived\", \"2\", \"3\", \"4\", \"5 - Least deprived\"))+\r\n  theme_custom()+\r\n  labs(title=\"COVID deaths have been consistently higher in more deprived areas\",\r\n       subtitle=\"Number of deaths registered with Covid on the death certificate by quintiles of the Index of Multiple Deprivation\",\r\n       caption=\"Data from the Office for National Statistics | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ndeciledata %>% filter(Location==\"AllLocations\" & Cause==\"COVID 19\") %>% \r\n  ggplot(aes(x=Date, y=Deaths, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of COVID deaths\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n                         labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                  \"10 - least deprived\"))+\r\n  theme_custom()\r\n\r\nagg_png(\"Outputs/COVIDDeathsONSIneqProp2122.png\", units=\"in\", width=10, height=6, res=800)\r\ndeciledata %>% filter(Location!=\"AllLocations\" & Cause==\"COVID 19\" & \r\n                        Date>as.Date(\"2021-07-01\")) %>% \r\n  mutate(Location=case_when(\r\n    Location==\"CareHome\" ~ \"Care home\",\r\n    Location==\"Home\" ~ \"Home/other\",\r\n    Location==\"Hospital\" ~ \"Hospital\"),\r\n    Location=factor(Location, levels=c(\"Hospital\", \"Care home\", \"Home/other\"))) %>% \r\n  ggplot(aes(x=Date, y=Deaths, fill=as.factor(decile)))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of COVID deaths\", limits=c(0,NA), \r\n                     labels=label_percent(accuracy=1))+\r\n  #scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n  #                       labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n  #                                \"10 - least deprived\"))+\r\n  scale_fill_manual(values=c(\"#663000\", \"#CC9B7A\", \"#F2DACE\", \"#66F0FF\", \"#00AACC\"), name=\"Deprivation quintile\",\r\n                      labels=c(\"1 - Most deprived\", \"2\", \"3\", \"4\", \"5 - Least deprived\"))+\r\n  facet_wrap(~Location)+\r\n  theme_custom()+\r\n  labs(title=\"The socioeconomic distribution of deaths has shifted in all locations\",\r\n       subtitle=\"Proportion of deaths registered weekly in England by place of death and quintile of the Index of Multiple Deprivation\\n \",\r\n       caption=\"Data from the Office for National Statistics | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDDeathsONSIneqxLoc2122.png\", units=\"in\", width=10, height=6, res=800)\r\ndeciledata %>% filter(Location!=\"AllLocations\" & Cause==\"COVID 19\" & \r\n                        Date>as.Date(\"2021-07-01\")) %>% \r\n  mutate(Location=case_when(\r\n    Location==\"CareHome\" ~ \"Care home\",\r\n    Location==\"Home\" ~ \"Home/other\",\r\n    Location==\"Hospital\" ~ \"Hospital\"),\r\n    Location=factor(Location, levels=c(\"Hospital\", \"Care home\", \"Home/other\"))) %>% \r\n  ggplot(aes(x=Date, y=Deaths, colour=as.factor(decile)))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"COVID deaths\")+\r\n  #scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\", name=\"\",\r\n  #                       labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n  #                                \"10 - least deprived\"))+\r\n  scale_colour_manual(values=c(\"#663000\", \"#CC9B7A\", \"#F2DACE\", \"#66F0FF\", \"#00AACC\"), name=\"Deprivation quintile\",\r\n                    labels=c(\"1 - Most deprived\", \"2\", \"3\", \"4\", \"5 - Least deprived\"))+\r\n  facet_wrap(~Location)+\r\n  theme_custom()+\r\n  labs(title=\"The biggest difference in COVID deaths between more and less deprived areas is in care homes\",\r\n       subtitle=\"Proportion of deaths registered weekly in England by place of death and quintile of the Index of Multiple Deprivation\\n \",\r\n       caption=\"Data from the Office for National Statistics | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nsummarydata <- deciledata %>% filter(Location==\"AllLocations\" & Cause==\"COVID 19\") %>% \r\n  select(decile, Deaths, Date) %>% \r\n  spread(Date, Deaths) %>% \r\n  mutate(decile=case_when(\r\n    decile==1 ~ \"1 - Most deprived\",\r\n    decile==10 ~ \"10 - least deprived\",\r\n    TRUE ~ as.character(decile)\r\n  ))\r\n\r\nwrite.csv(summarydata, \"Outputs/COVIDDeathsIneq.csv\", row.names=FALSE)\r\n  \r\n"
  },
  {
    "path": "Heatmaps/COVIDONSInfectionSurvey.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(readxl)\r\nlibrary(geofacet)\r\nlibrary(scales)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\ntemp <- tempfile()\r\n\r\n#Surely there is a sensible full time series of this???\r\n#Downloading each week's data individually seems kind of daft, but hey ho...\r\n#I'm sure I'm missing something obvious here...\r\n#26th Jan\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcoronaviruscovid19infectionsurveyheadlineresultsuk%2f2022/20220202covidinfectionsurveyheadlinedataset.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata260122 <- read_excel(temp, sheet=\"1b\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2022-01-26\")) %>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\nagedata260122 <- read_excel(temp, sheet=\"1c\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2022-01-26\"))%>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`,\r\n         `Grouped age`=`Age/school year group`)\r\n\r\n\r\n#19th Jan\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveyheadlineresultsuk/2022/20220126covidinfectionsurveyheadlinedataset.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata190122 <- read_excel(temp, sheet=\"1b\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2022-01-19\")) %>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\nagedata190122 <- read_excel(temp, sheet=\"1c\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2022-01-19\"))%>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\n\r\n#12th Jan\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcoronaviruscovid19infectionsurveyheadlineresultsuk%2f2022/20220119covidinfectionsurveyheadlinedataset19012022102636.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata120122 <- read_excel(temp, sheet=\"1b\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2022-01-12\")) %>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\nagedata120122 <- read_excel(temp, sheet=\"1c\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2022-01-12\"))%>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\n\r\n#3rd Jan\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/20220107covid19infectionsurveydatasetsengland.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata030122 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2022-01-03\")) %>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\nagedata030122 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2022-01-03\"))%>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\n\r\n#31st Dec\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/20220107covid19infectionsurveydatasetsengland.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata311221 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-12-31\"))%>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\nagedata311221 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-12-31\"))%>% \r\n  rename(`95% Lower credible Interval`=`95% Lower credible interval`,\r\n         `95% Upper credible Interval`=`95% Upper credible interval`)\r\n\r\n#28th Dec\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcoronaviruscovid19infectionsurveyheadlineresultsuk%2f2021/20220105covidinfectionsurveyheadlinedataset.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata281221 <- read_excel(temp, sheet=\"1b\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-12-28\"))\r\nagedata281221 <- read_excel(temp, sheet=\"1c\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-12-28\"))\r\n\r\n#16th Dec\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/covid19infectionsurvey24122021england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata161221 <- read_excel(temp, sheet=\"1c England\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-12-16\"))\r\nagedata161221 <- read_excel(temp, sheet=\"1e England\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-12-16\"))\r\n\r\n#8th Dec\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v55/covid19infectionsurveydatasets20211217england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata081221 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-12-08\"))\r\nagedata081221 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-12-08\"))\r\n\r\n#28th Nov\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v54/covid19infectionsurveydatasets20211210england1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata281121 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-11-28\"))\r\nagedata281121 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-11-28\"))\r\n\r\n#24th Nov\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v53/covid19infectionsurveydatasets20211203england1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata241121 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-11-24\"))\r\nagedata241121 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-11-24\"))\r\n\r\n#17th Nov\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v52/covid19infectionsurveydatasets20211126england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata171121 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-11-17\"))\r\nagedata171121 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-11-17\"))\r\n\r\n#10th Nov\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v51/covid19infectionsurveydatasets20211119england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata101121 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-11-10\"))\r\nagedata101121 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-11-10\"))\r\n\r\n#3rd Nov\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v50/covid19infectionsurveydatasets20211112england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata031121 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-11-03\"))\r\nagedata031121 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-11-03\"))\r\n\r\n#27th Oct\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v49/covid19infectionsurveydatasets20211105england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata271021 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-10-27\"))\r\nagedata271021 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-10-27\"))\r\n\r\n#19th Oct\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v48/covid19infectionsurveydatasets20211029england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata191021 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-10-19\"))\r\nagedata191021 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-10-19\"))\r\n\r\n#13th Oct\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v47/covid19infectionsurveydatasets20211022england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata131021 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-10-13\"))\r\nagedata131021 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-10-13\"))\r\n\r\n#6th Oct\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v46/covid19infectionsurveydatasets20211015england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata061021 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-10-06\"))\r\nagedata061021 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-10-06\"))\r\n\r\n#29th Sept\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v45/covid19infectionsurveydatasets20211008england08102021091213.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata290921 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-09-29\"))\r\nagedata290921 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-09-29\"))\r\n\r\n#22nd Sept\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v44/covid19infectionsurveydatasets20211001england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata220921 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-09-22\"))\r\nagedata220921 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-09-22\"))\r\n\r\n#15th Sept\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v43/covid19infectionsurveydatasets20210924england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata150921 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-09-15\"))\r\nagedata150921 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-09-15\"))\r\n\r\n#8th Sept\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v42/covid19infectionsurveydatasets20210917england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata080921 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-09-08\"))\r\nagedata080921 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-09-08\"))\r\n\r\n#1st Sept\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v41/covid19infectionsurveydatasets20210910england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata010921 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-09-01\"))\r\nagedata010921 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-09-01\"))\r\n\r\n#24th August\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v40/covid19infectionsurveydatasets20210903england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata240821 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-08-24\"))\r\nagedata240821 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-08-24\"))\r\n\r\n#17th August\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v39/covid19infectionsurveydatasets20210827england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata170821 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-08-17\"))\r\nagedata170821 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-08-17\"))\r\n\r\n#11th August\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v38/covid19infectionsurveydatasetsengland20210820.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata110821 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-08-11\"))\r\nagedata110821 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-08-11\"))\r\n\r\n#3rd August\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v37/covid19infectionsurveydatasetsengland20210813.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata030821 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-08-03\"))\r\nagedata030821 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-08-03\"))\r\n\r\n#28th July\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v36/covid19infectionsurveydatasets20210806england05082021171453.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata280721 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-07-28\"))\r\nagedata280721 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-07-28\"))\r\n\r\n#21st July\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v35/covid19infectionsurveydatasets20210730englandpostsdc2.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata210721 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-07-21\"))\r\nagedata210721 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-07-21\"))\r\n\r\n#14th July\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v34/covid19infectionsurveydatasets20210723england1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata140721 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-07-14\"))\r\nagedata140721 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-07-14\"))\r\n\r\n#7th July\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v33/covid19infectionsurveydatasets20210716england1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata070721 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-07-07\"))\r\nagedata070721 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-07-07\"))\r\n\r\n#30th June\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v32/covid19infectionsurveydatasets20210709england08072021180807.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata300621 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-06-30\"))\r\nagedata300621 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-06-30\"))\r\n\r\n#23rd June\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v31/covid19infectionsurveydatasets20210702england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata230621 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-06-23\"))\r\nagedata230621 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-06-23\"))\r\n\r\n#16th June\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v30/covid19infectionsurveydatasets20210625england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata160621 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-06-16\"))\r\nagedata160621 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-06-16\"))\r\n\r\n#9th June\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v29/covid19infectionsurveydatasets20210618england1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata090621 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-06-09\"))\r\nagedata090621 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-06-09\"))\r\n\r\n#2nd June\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v28/covid19infectionsurveydatasets20210611england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata020621 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-06-02\"))\r\nagedata020621 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-06-02\"))\r\n\r\n#26th May\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v27/covid19infectionsurveydatasets20210604england.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata260521 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-05-26\"))\r\nagedata260521 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-05-26\"))\r\n\r\n#19th May\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v26/covid19infectionsurveydatasets20210528eng.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata190521 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-05-19\"))\r\nagedata190521 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-05-19\"))\r\n\r\n#12th May\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v25/covid19infectionsurveydatasets20210521eng.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata120521 <- read_excel(temp, sheet=\"1e\", range=\"A5:E14\") %>% \r\n  mutate(date=as.Date(\"2021-05-12\"))\r\nagedata120521 <- read_excel(temp, sheet=\"1g\", range=\"A5:D12\") %>% \r\n  mutate(date=as.Date(\"2021-05-12\"))\r\n\r\n#5th May\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v24/covid19infectionsurveydatasets20210514engfinal.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata050521 <- read_excel(temp, sheet=\"1e\", range=\"A6:E15\") %>% \r\n  mutate(date=as.Date(\"2021-05-05\"))%>% \r\n  set_names(c(\"Region\", \"Pop\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\nagedata050521 <- read_excel(temp, sheet=\"1g\", range=\"A6:D13\") %>% \r\n  mutate(date=as.Date(\"2021-05-05\"))%>% \r\n  set_names(c(\"Age\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\n\r\n#29th April\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v23/covid19infectionsurveydatasets20210507eng.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata290421 <- read_excel(temp, sheet=\"1e\", range=\"A6:E15\") %>% \r\n  mutate(date=as.Date(\"2021-04-29\"))%>% \r\n  set_names(c(\"Region\", \"Pop\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\nagedata290421 <- read_excel(temp, sheet=\"1g\", range=\"A6:D13\") %>% \r\n  mutate(date=as.Date(\"2021-04-29\"))%>% \r\n  set_names(c(\"Age\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\n\r\n#21st April\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v22/covid19infectionsurveydatasets20210430eng1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata210421 <- read_excel(temp, sheet=\"1e\", range=\"A6:E15\") %>% \r\n  mutate(date=as.Date(\"2021-04-21\"))%>% \r\n  set_names(c(\"Region\", \"Pop\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\nagedata210421 <- read_excel(temp, sheet=\"1g\", range=\"A6:D13\") %>% \r\n  mutate(date=as.Date(\"2021-04-21\"))%>% \r\n  set_names(c(\"Age\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\n\r\n#13th April\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v21/covid19infectionsurveydatasets20210423eng.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nregdata130421 <- read_excel(temp, sheet=\"1e\", range=\"A6:E15\") %>% \r\n  mutate(date=as.Date(\"2021-04-13\"))%>% \r\n  set_names(c(\"Region\", \"Pop\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\nagedata130421 <- read_excel(temp, sheet=\"1g\", range=\"A6:D13\") %>% \r\n  mutate(date=as.Date(\"2021-04-13\"))%>% \r\n  set_names(c(\"Age\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))\r\n\r\n#7th April \r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/previous/v19/covid19infectionsurveydatasets202104161.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#At last! A time series\r\nregdataold <- read_excel(temp, sheet=\"1j\", range=\"C8:AC31\", col_names=FALSE) %>% \r\n  set_names(c(paste(rep(c(\"North_East\", \"North_West\", \"Yorkshire_and_The_Humber\", \"East_Midlands\",\r\n                    \"West_Midlands\", \"East_of_England\", \"London\", \"South_East\", \"South_West\"),\r\n                  each=3), rep(c(\"PosProp\", \"LowerCI\", \"UpperCI\"), times=9), sep=\"-\"))) %>% \r\n  mutate(Date=seq.Date(from=as.Date(\"2020-05-17\"), to=as.Date(\"2021-04-04\"), by=\"2 weeks\")) %>% \r\n  pivot_longer(cols=c(1:(ncol(.)-1)), names_to=c(\"Region\", \"Metric\"), names_sep=\"-\", \r\n               values_to=\"Values\") %>% \r\n  spread(Metric, Values) %>% \r\n  mutate(Region=gsub(\"_\", \" \", Region))\r\n\r\nagedataold <- read_excel(temp, sheet=\"1i\", range=\"C8:W31\", col_names=FALSE) %>% \r\n  set_names(c(paste(rep(c(\"Age_2_to_School_Year_6\", \"School_Year_7_to_School_Year_11\",\r\n                          \"School_Year_12_to_Age_24\", \"Age_25_to_Age_34\",\r\n                          \"Age_35_to_Age_49\", \"Age_50_to_Age_69\", \"Age_70+\"),\r\n                        each=3), rep(c(\"PosProp\", \"LowerCI\", \"UpperCI\"), times=7), sep=\"-\"))) %>% \r\n  mutate(Date=seq.Date(from=as.Date(\"2020-05-17\"), to=as.Date(\"2021-04-04\"), by=\"2 weeks\")) %>% \r\n  pivot_longer(cols=c(1:(ncol(.)-1)), names_to=c(\"Age\", \"Metric\"), names_sep=\"-\", \r\n               values_to=\"Values\") %>% \r\n  spread(Metric, Values) %>% \r\n  mutate(Age=gsub(\"_\", \" \", Age))\r\n\r\n#Combine and plot\r\nregdata <- bind_rows(regdata260122, regdata190122, regdata120122, regdata030122, regdata311221, \r\n                     regdata281221, regdata161221, regdata081221, regdata281121,\r\n                     regdata241121, regdata171121, regdata101121, regdata031121,\r\n                     regdata271021, regdata191021, regdata131021, regdata061021,\r\n                     regdata290921, regdata220921, regdata150921, regdata080921,\r\n                     regdata010921, regdata240821, regdata170821, regdata110821,\r\n                     regdata030821, regdata280721, regdata210721, regdata140721,\r\n                     regdata070721, regdata300621, regdata230621, regdata160621) %>% \r\n  set_names(c(\"Region\", \"Pop\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\")) %>% \r\n  mutate(PosProp=PosProp/100, LowerCI=LowerCI/100, UpperCI=UpperCI/100) %>% \r\n  bind_rows(bind_rows(regdata090621, regdata020621, regdata260521, regdata190521,\r\n                     regdata120521) %>% \r\n              set_names(c(\"Region\", \"Pop\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\"))) %>% \r\n  bind_rows(regdata050521, regdata290421, regdata210421, regdata130421, regdataold)\r\n\r\nagedata <- bind_rows(agedata260122, agedata190122, agedata120122, agedata030122, agedata311221, \r\n                     agedata281221, agedata161221, agedata081221, agedata281121,\r\n                     agedata241121, agedata171121, agedata101121, agedata031121,\r\n                     agedata271021, agedata191021, agedata131021, agedata061021,\r\n                     agedata290921, agedata220921, agedata150921, agedata080921,\r\n                     agedata010921, agedata240821, agedata170821, agedata110821,\r\n                     agedata030821, agedata280721, agedata210721, agedata140721,\r\n                     agedata070721, agedata300621, agedata230621, agedata160621) %>% \r\n  set_names(c(\"Age\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\")) %>% \r\n  mutate(PosProp=PosProp/100, LowerCI=LowerCI/100, UpperCI=UpperCI/100) %>% \r\n  bind_rows(bind_rows(agedata090621, agedata020621, agedata260521, agedata190521,\r\n                      agedata120521) %>% \r\n              set_names(c(\"Age\", \"PosProp\", \"LowerCI\", \"UpperCI\", \"Date\")))%>% \r\n  bind_rows(agedata050521, agedata290421, agedata210421, agedata130421, agedataold) %>% \r\n  mutate(Age=factor(Age, levels=c(\"Age 2 to School Year 6\", \"School Year 7 to School Year 11\",\r\n                                  \"School Year 12 to Age 24\", \"Age 25 to Age 34\",\r\n                                  \"Age 35 to Age 49\", \"Age 50 to Age 69\", \"Age 70+\")))\r\n\r\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\r\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),\r\n                     code=c(1:9))\r\n\r\nmaxdate <- max(regdata$Date)\r\n  \r\nagg_tiff(\"Outputs/COVIDONSInfSurvxReg.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(regdata, aes(x=Date, y=PosProp, ymin=LowerCI, ymax=UpperCI, colour=Region, fill=Region))+\r\n  geom_ribbon(alpha=0.1, colour=NA, show.legend=FALSE)+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of population testing positive\", limits=c(0,NA),\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\")+\r\n  scale_fill_paletteer_d(\"LaCroixColoR::paired\")+\r\n  facet_geo(~Region, grid=mygrid)+\r\n  theme_custom()+\r\n  theme(strip.text=element_blank(), plot.title=element_text(size=rel(2.2)))+\r\n  geom_text(aes(x=as.Date(\"2021-02-02\"), y=0.05, label=Region), family=\"Lato\", fontface=\"bold\",\r\n            size=rel(4), show.legend=FALSE)+\r\n  labs(title=\"ONS data suggests the South West is a bit of an outlier\",\r\n       subtitle=paste0(\"Estimated proportion of the population who would test positive for COVID according to the ONS infection survey.\\nData up to \", maxdate),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDONSInfSurvxAge.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(agedata, aes(x=Date, y=PosProp, ymin=LowerCI, ymax=UpperCI, colour=Age, fill=Age))+\r\n  geom_ribbon(alpha=0.1, colour=NA, show.legend=FALSE)+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of population testing positive\", limits=c(0,NA),\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\")+\r\n  scale_fill_paletteer_d(\"awtools::a_palette\")+\r\n  facet_wrap(~Age)+\r\n  theme_custom()+\r\n  theme(strip.text=element_blank(), plot.title=element_text(size=rel(2.2)))+\r\n  geom_text(aes(x=as.Date(\"2021-01-20\"), y=0.05, label=Age), family=\"Lato\", fontface=\"bold\",\r\n            size=rel(4), show.legend=FALSE)+\r\n  labs(title=\"Prevalence was still rising last week in the very young\",\r\n       subtitle=paste0(\"Estimated proportion of the population who would test positive for COVID according to the ONS infection survey.\\nData up to \", maxdate),\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Calculate national picture from weighted average of regional one\r\npops <- regdata010921 %>% \r\n  select(Region, `Population size`) %>% \r\n  set_names(\"Region\", \"Pop\")\r\n\r\nnatdata <- regdata %>% \r\n  select(-Pop) %>% \r\n  merge(pops, all.x=TRUE, by=\"Region\") %>% \r\n  group_by(Date) %>% \r\n  summarise(PosProp=weighted.mean(PosProp, Pop)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDONSInfSurv.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(natdata, aes(x=Date, y=PosProp))+\r\n  geom_line(colour=\"Tomato2\", size=1)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of population testing positive\", limits=c(0,NA),\r\n                     labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  labs(title=\"COVID prevalence has plateaued in the last week\",\r\n       subtitle=\"Estimated proportion of the population who would test positive for COVID according to the ONS infection survey\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n\r\nagg_tiff(\"Outputs/COVIDONSInfSurvWaves.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(natdata, aes(x=Date, y=PosProp))+\r\n  geom_rect(aes(xmin=as.Date(\"2020-12-01\"), xmax=as.Date(\"2021-05-01\"),\r\n                ymin=0, ymax=0.065), fill=\"#EE6677\", alpha=0.01)+\r\n  geom_rect(aes(xmin=as.Date(\"2021-05-01\"), xmax=as.Date(\"2021-12-10\"),\r\n                ymin=0, ymax=0.065), fill=\"#228833\", alpha=0.01)+\r\n  geom_rect(aes(xmin=as.Date(\"2021-12-10\"), xmax=as.Date(\"2022-01-03\"),\r\n                ymin=0, ymax=0.065), fill=\"#66CCEE\", alpha=0.01)+\r\n  geom_line(colour=\"Black\", size=1)+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2020-12-01\"), NA_Date_))+\r\n  scale_y_continuous(name=\"Proportion of population testing positive\", limits=c(0,NA),\r\n                     labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"<span style='color:#66CCEE;'>Omicron</span> is not like <span style='color:#EE6677;'>Alpha</span> or <span style='color:#228833;'>Delta\",\r\n       subtitle=\"Estimated proportion of the population who would test positive for COVID according to the ONS infection survey\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDONSInfectionSurveyVariants.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(readxl)\r\nlibrary(scales)\r\nlibrary(geofacet)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Set up facets\r\nmygrid <- data.frame(name=c(\"Scotland\", \"North East\", \"Northern Ireland\", \"North West\",\r\n                            \"Yorkshire & Humber\", \"West Midlands\", \"East Midlands\",\r\n                            \"East of England\", \"South West\", \"London\", \"South East\"),\r\n                     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), \r\n                     code=c(1:11))\r\n\r\n#Download technical data from ONS infection survey including variant estimates \r\ntemp <- tempfile()\r\nurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fhealthandsocialcare%2fconditionsanddiseases%2fdatasets%2fcovid19infectionsurveytechnicaldata%2f2022/20220311covid19infectionsurveydatasetstechnical2.xlsx\"\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nnatdata <- read_excel(temp, sheet=\"1c\", range=\"A6:AK49\") %>% \r\n  set_names(\"Date\", paste(rep(c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\"), each=9), \r\n                          rep(c(\"BA.1\", \"BA.2\", \"Unknown\"), each=3, times=4), \r\n                          rep(c(\"perc\", \"lower\", \"upper\"), times=12), sep=\"_\")) %>% \r\n  mutate(Date=as.Date(Date)) %>% \r\n  pivot_longer(c(2:37), names_to=c(\"Country\", \"Variant\", \"Metric\"), names_sep=\"_\", values_to=\"Percentage\") %>% \r\n  mutate(Percentage=as.numeric(Percentage)) %>% \r\n  spread(Metric, Percentage)\r\n\r\n#Bring in English regions\r\nregdata <- read_excel(temp, sheet=\"1d\", range=\"A6:CD48\") %>% \r\n  set_names(\"Date\", paste(rep(c(\"North East\", \"North West\", \"Yorkshire & Humber\", \r\n                                \"East Midlands\", \"West Midlands\", \"East of England\",\r\n                                \"London\", \"South East\", \"South West\"), each=9), \r\n                          rep(c(\"BA.1\", \"BA.2\", \"Unknown\"), each=3, times=9), \r\n                          rep(c(\"perc\", \"lower\", \"upper\"), times=27), sep=\"_\")) %>% \r\n  mutate(Date=as.Date(Date)) %>% \r\n  pivot_longer(c(2:82), names_to=c(\"Region\", \"Variant\", \"Metric\"), names_sep=\"_\", values_to=\"Percentage\") %>% \r\n  mutate(Percentage=as.numeric(Percentage)) %>% \r\n  spread(Metric, Percentage)\r\n\r\n#Combine regions with Scotland, Wales and NI\r\ncombined <- natdata %>% \r\n  filter(Country!=\"England\") %>% \r\n  rename(Region=Country) %>% \r\n  bind_rows(regdata)\r\n\r\n#Plot prevalence by variant\r\nggplot(natdata, aes(x=Date, y=perc/100, fill=Variant))+\r\n  geom_area()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of population\", labels=label_percent(accuracy=0.1))+\r\n  scale_fill_manual(values=c(\"#11B2E8\", \"#CF2154\", \"#DBF4F8\"))+\r\n  facet_wrap(~Country)+\r\n  theme_custom()\r\n\r\nggplot(regdata, aes(x=Date, y=perc/100, fill=Variant))+\r\n  geom_area()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of population\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#11B2E8\", \"#CF2154\", \"#DBF4F8\"))+\r\n  facet_wrap(~Region)+\r\n  theme_custom()\r\n\r\nagg_tiff(\"Outputs/COVIDONSInfectionStudyVariants.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(combined, aes(x=Date, y=perc/100, fill=Variant))+\r\n  geom_area()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of population testing positive\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#11B2E8\", \"#CF2154\", \"#DBF4F8\"))+\r\n  facet_geo(~Region, grid=mygrid)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"Rising COVID prevalence across the UK is being driven by the BA.2 variant\",\r\n       subtitle=\"Estimated proportion of the population testing positive for the<span style='color:#11B2E8;'> BA.1</span> or <span style='color:#CF2154;'>BA.2</span> variants according to the ONS Infection Survey.<br>A small number of samples did not contain enough genetic material to determine the variant.\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot prevalence by variant\r\nggplot(natdata, aes(x=Date, y=perc/100, fill=Variant))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#11B2E8\", \"#CF2154\", \"#DBF4F8\"))+\r\n  facet_wrap(~Country)+\r\n  theme_custom()\r\n   \r\nggplot(regdata, aes(x=Date, y=perc/100, fill=Variant))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#11B2E8\", \"#CF2154\", \"#DBF4F8\"))+\r\n  facet_wrap(~Region)+\r\n  theme_custom()\r\n\r\nagg_tiff(\"Outputs/COVIDONSInfectionStudyVariantsProp.tiff\", units=\"in\", width=10, height=7, res=500)\r\nggplot(combined, aes(x=Date, y=perc/100, fill=Variant))+\r\n  geom_area(position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#11B2E8\", \"#CF2154\", \"#DBF4F8\"))+\r\n  facet_geo(~Region, grid=mygrid)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"But BA.1 is still hanging in there in some parts of the country\",\r\n       subtitle=\"Estimated proportion people testing positive for COVID who have either the<span style='color:#11B2E8;'> BA.1</span> or <span style='color:#CF2154;'>BA.2</span> variants according to the ONS Infection Survey.<br>A small number of samples did not contain enough genetic material to determine the variant.\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDPHECasesxAgev2.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(arrow)\r\nlibrary(readxl)\r\nlibrary(RcppRoll)\r\nlibrary(paletteer)\r\nlibrary(ggstream) #remotes::install_github(\"davidsjoberg/ggstream\")\r\nlibrary(lubridate)\r\nlibrary(geofacet)\r\nlibrary(ggtext)\r\nlibrary(gghighlight)\r\nlibrary(ragg)\r\nlibrary(extrafont)\r\n\r\ntemp1 <- tempfile()\r\nsource1 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\n\r\ntemp2 <- tempfile()\r\nsource2 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\ntemp3 <- tempfile()\r\nsource3 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp3 <- curl_download(url=source3, destfile=temp3, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read_csv_arrow(temp1) %>% \r\n  bind_rows(read_csv_arrow(temp2), read_csv_arrow(temp3)) %>% \r\n  select(c(1:6)) %>% \r\n  filter(age!=\"unassigned\") %>% \r\n  mutate(age=case_when(\r\n    age==\"00_04\" ~ \"0_4\",\r\n    age==\"05_09\" ~ \"5-9\",\r\n    TRUE ~ age),\r\n    age = age %>% str_replace(\"_\", \"-\") %>%\r\n           factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\r\n                           \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                           \"40-44\", \"45-49\", \"50-54\", \"55-59\", \r\n                           \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                           \"80-84\", \"85-89\", \"90+\"))) %>% \r\n  #Remove two bonus age categories that we don't need (0-59 and 60+)\r\n  filter(!is.na(age)) %>% \r\n  #Sort out Buckinghamsire (as 4 separate LTLAs in the data, but pop data only available for Bucks)\r\n  mutate(Code=case_when(\r\n    areaCode %in% c(\"E07000004\", \"E07000005\", \"E07000006\", \"E07000007\") ~ \"E06000060\",\r\n    TRUE ~ as.character(areaCode)\r\n  ),\r\n  areaName=case_when(\r\n    Code==\"E06000060\" ~ \"Buckinghamshire\",\r\n    TRUE ~ as.character(areaName)\r\n  ),\r\n  areaType=case_when(\r\n    Code==\"E06000060\" ~ \"ltla\",\r\n    TRUE ~ as.character(areaType)\r\n  ),\r\n  date=as.Date(date)) %>% \r\n  group_by(Code, areaName, areaType, date, age) %>% \r\n  mutate(cases=sum(cases)) %>% \r\n  ungroup()\r\n\r\n#Bring in populations\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- read_excel(temp, sheet=\"MYE2 - Persons\", range=\"A5:CQ431\")\r\n\r\n#Align age bands\r\npop <- pop %>% \r\n  gather(age.sgl, pop, c(5:95)) %>% \r\n  mutate(age.sgl=as.numeric(gsub(\"\\\\+\", \"\", age.sgl)),\r\n         age=case_when(\r\n           age.sgl<5 ~ \"0-4\",\r\n           age.sgl<10 ~ \"5-9\",\r\n           age.sgl<15 ~ \"10-14\",\r\n           age.sgl<20 ~ \"15-19\",\r\n           age.sgl<25 ~ \"20-24\",\r\n           age.sgl<30 ~ \"25-29\",\r\n           age.sgl<35 ~ \"30-34\",\r\n           age.sgl<40 ~ \"35-39\",\r\n           age.sgl<45 ~ \"40-44\",\r\n           age.sgl<50 ~ \"45-49\",\r\n           age.sgl<55 ~ \"50-54\",\r\n           age.sgl<60 ~ \"55-59\",\r\n           age.sgl<65 ~ \"60-64\",\r\n           age.sgl<70 ~ \"65-69\",\r\n           age.sgl<75 ~ \"70-74\",\r\n           age.sgl<80 ~ \"75-79\",\r\n           age.sgl<85 ~ \"80-84\",\r\n           age.sgl<90 ~ \"85-89\",\r\n           TRUE ~ \"90+\"\r\n         ) %>% factor(levels = levels(data$age))\r\n  ) %>% \r\n  #And sort out Buckinghamshire codes\r\n  mutate(Code=case_when(\r\n    Code %in% c(\"E07000005\", \"E07000006\", \"E07000007\", \"E07000004\") ~ \"E06000060\",\r\n    TRUE ~ Code\r\n  )) %>% \r\n  group_by(age, Code) %>%\r\n  summarise(pop=sum(pop))\r\n\r\n#Merge into case data\r\ndata <- data %>% \r\n  left_join(pop, by=c(\"Code\", \"age\")) %>% \r\n  arrange(date) \r\n\r\n#Collapse age bands further\r\nshortdata <- data %>% \r\n  mutate(ageband=case_when(\r\n    age %in% c(\"0-4\", \"5-9\", \"10-14\") ~ \"0-14\",\r\n    age %in% c(\"15-19\", \"20-24\") ~ \"15-24\",\r\n    age %in% c(\"25-29\", \"30-34\", \"35-39\", \"40-44\") ~ \"25-44\",\r\n    age %in% c(\"45-49\", \"50-54\", \"55-59\", \"60-64\") ~ \"45-64\",\r\n    age %in% c(\"65-69\", \"70-74\", \"75-79\") ~ \"65-79\",\r\n    TRUE ~ \"80+\"\r\n  )) %>% \r\n  group_by(ageband, areaCode, areaType, areaName, date) %>% \r\n  summarise(cases=sum(cases), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(caserate=cases*100000/pop) %>% \r\n  group_by(ageband, areaCode, areaType) %>% \r\n  mutate(casesroll=roll_mean(cases, n=7, align=\"center\", fill=NA),\r\n         caserateroll=roll_mean(caserate, n=7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\ndata <- data %>% \r\n  mutate(caserate=cases*100000/pop) %>% \r\n  group_by(age, areaCode, areaType) %>% \r\n  mutate(casesroll=roll_mean(cases, n=7, align=\"center\", fill=NA),\r\n         caserateroll=roll_mean(caserate, n=7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\ndata1 <- data %>% filter(areaType %in% c(\"ltla\", \"nation\", \"region\")) %>% \r\n  select(areaName, areaType, date, age, casesroll, caserateroll, pop, cases)\r\ndata1b <- data %>% filter(areaType %in% c(\"ltla\", \"nation\", \"region\")) %>% \r\n  select(areaName, areaType, date, age, casesroll, caserateroll)\r\ndata2 <- data %>% filter(areaType %in% c(\"ltla\", \"nation\", \"region\") & \r\n                           date>=as.Date(\"2021-01-01\")) \r\ndata3 <- shortdata %>% filter(areaType %in% c(\"ltla\", \"nation\", \"region\")) %>% \r\n  select(areaName, areaType, date, ageband, casesroll, caserateroll)\r\n\r\n#Save files for the app to use\r\nsave(data1b, data3, file=\"COVID_Cases_By_Age/Alldata.RData\")\r\nsave(data1, data3, file=\"COVID_Case_Trends_By_Age/Alldata.RData\")\r\n\r\ndata1 %>% write.csv(\"COVID_Cases_By_Age/data.csv\")\r\ndata2 %>% write.csv(\"COVID_Case_Trends_By_Age/data.csv\")\r\ndata3 %>% write.csv(\"COVID_Cases_By_Age/shortdata.csv\")\r\n\r\nplotfrom <- as.Date(\"2021-04-01\")\r\n\r\n#Bolton plots\r\nagg_tiff(\"Outputs/COVIDCasesxAgeBolton.tiff\", units=\"in\", width=8, height=6, res=800)\r\ndata %>% \r\n  #filter(areaType==\"nation\" & !is.na(caserateroll)) %>%\r\n  filter(areaName==\"Bolton\" & !is.na(caserateroll) & date>=plotfrom) %>% \r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=age, fill=caserateroll*7))+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Weekly cases per 100,000\", limits=c(0,1300))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), text=element_text(family=\"Lato\"),\r\n        legend.position=\"top\")+\r\n  guides(fill=guide_colourbar(ticks=FALSE, title.position = \"top\", title.hjust = 0.5,\r\n                              barwidth=unit(10, \"lines\"), barheight=unit(0.5, \"lines\")))+\r\n  labs(title=\"The current outbreak in Bolton is largely in unvaccinated age groups\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeBlackburn.tiff\", units=\"in\", width=8, height=6, res=800)\r\ndata %>% \r\n  #filter(areaType==\"nation\" & !is.na(caserateroll)) %>%\r\n  filter(areaName==\"Blackburn with Darwen\" & !is.na(caserateroll) & date>=plotfrom) %>% \r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=age, fill=caserateroll*7))+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Weekly cases per 100,000\", limits=c(0,1300))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), text=element_text(family=\"Lato\"),\r\n        legend.position=\"top\")+\r\n  guides(fill=guide_colourbar(ticks=FALSE, title.position = \"top\", title.hjust = 0.5,\r\n                              barwidth=unit(10, \"lines\"), barheight=unit(0.5, \"lines\")))+\r\n  labs(title=\"The current outbreak in Blackburn is largely in unvaccinated age groups\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases rates in Blackburn by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeBolton2.tiff\", units=\"in\", width=8, height=6, res=800)\r\ndata %>% \r\n  #filter(areaType==\"nation\" & !is.na(caserateroll)) %>%\r\n  filter(areaName==\"Bolton\" & !is.na(caserateroll) & date>=as.Date(\"2020-12-15\") & \r\n           date<=as.Date(\"2021-01-09\")) %>% \r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=age, fill=caserateroll*7))+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Weekly cases per 100,000\", limits=c(0,1520))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), text=element_text(family=\"Lato\"),\r\n        legend.position=\"top\")+\r\n  guides(fill=guide_colourbar(ticks=FALSE, title.position = \"top\", title.hjust = 0.5,\r\n                              barwidth=unit(10, \"lines\"), barheight=unit(0.5, \"lines\")))+\r\n  labs(title=\"The age profile of Bolton's December/January cases\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeBolton3.tiff\", units=\"in\", width=8, height=6, res=800)\r\ndata %>% \r\n  #filter(areaType==\"nation\" & !is.na(caserateroll)) %>%\r\n  filter(areaName==\"Bolton\" & !is.na(caserateroll) & date>=as.Date(\"2020-08-10\") & \r\n           date<=as.Date(\"2020-10-23\")) %>% \r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=age, fill=caserateroll*7))+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Weekly cases per 100,000\", limits=c(0,1520))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), text=element_text(family=\"Lato\"),\r\n        legend.position=\"top\")+\r\n  guides(fill=guide_colourbar(ticks=FALSE, title.position = \"top\", title.hjust = 0.5,\r\n                              barwidth=unit(10, \"lines\"), barheight=unit(0.5, \"lines\")))+\r\n  labs(title=\"The age profile of Bolton's September/October cases\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\ntiff(\"Outputs/COVIDCasesxAgeEngLine.tiff\", units=\"in\", width=10, height=8, res=500)\r\ndata %>% \r\n  filter(areaType==\"nation\" & !is.na(caserateroll) & date>=plotfrom) %>%\r\n  ggplot()+\r\n  geom_line(aes(x=date, y=caserateroll, colour=age))+\r\n  scale_colour_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new cases per 100,000\", limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\"))+\r\n  labs(title=\"Case rates are falling across all age groups\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases in England per 100,000 by age group\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDCasesOver90.tiff\", units=\"in\", width=10, height=8, res=500)\r\ndata %>% \r\n  filter(areaType==\"nation\" & !is.na(caserateroll) & date>=plotfrom) %>%\r\n  ggplot()+\r\n  geom_line(aes(x=date, y=caserateroll, colour=age), show.legend=FALSE)+\r\n  scale_colour_manual(values=c(rep(\"Grey80\", times=18), \"#FF4E86\"))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new cases per 100,000\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\"), plot.subtitle=element_markdown())+\r\n  labs(title=\"New COVID-19 cases are falling fastest in the most vulnerable group\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases in England per 100,000 in the <span style='color:#FF4E86;'>**over 90s**</span> compared to <span style='color:Grey70;'>**other ages**\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Compare regions\r\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\r\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,2,2,3,3,3,4,4,4), col=c(2,1,2,1,2,3,1,2,3),\r\n                     code=c(1:9))\r\n\r\ntiff(\"Outputs/COVIDCasesxAgeReg.tiff\", units=\"in\", width=10, height=11, res=800)\r\ndata %>% \r\n  filter(areaType==\"region\" & !is.na(caserateroll) & date>=plotfrom) %>% \r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=age, fill=caserateroll))+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Daily cases\\nper 100,000\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  facet_geo(~areaName, grid=mygrid)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), text=element_text(family=\"Late\"))+\r\n  labs(title=\"Cases are still confined to younger age groups\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases per 100,000 by age group\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Look at age patterns in Blackpool\r\ntiff(\"Outputs/COVIDCasesxAgeBlackpool.tiff\", units=\"in\", width=12, height=8, res=500)\r\ndata %>% \r\n  filter(areaType==\"ltla\" & !is.na(caserateroll) & date>=plotfrom) %>%\r\n  mutate(flag=if_else(areaName==\"Blackpool\", \"x\", \"y\")) %>% \r\n  ggplot()+\r\n  geom_line(aes(x=date, y=caserateroll, group=areaName), colour=\"Grey80\")+\r\n  geom_line(aes(x=date, y=caserateroll, group=areaName, colour=flag), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_manual(values=c(\"#FF4E86\", \"transparent\"))+\r\n  facet_wrap(~age)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\"), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Blackpool's COVID cases are older than then average\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases per 100,000 in <span style='color:#FF4E86;'>Blackpool</span> compared to <span style='color:Grey60;'>other Local Authorities in England\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Calculate mean age of cases\r\nmeanages <- data %>%\r\n  mutate(point.age=case_when(\r\n    age==\"0-4\" ~ 2.5, age==\"5-9\" ~ 7.5, age==\"10-14\" ~ 12.5, age==\"15-19\" ~ 17.5,\r\n    age==\"20-24\" ~ 22.5, age==\"25-29\" ~ 27.5, age==\"30-34\" ~ 32.5,\r\n    age==\"35-39\" ~ 37.5, age==\"40-44\" ~ 42.5, age==\"45-49\" ~ 47.5,\r\n    age==\"50-54\" ~ 52.5, age==\"55-59\" ~ 57.5, age==\"60-64\" ~ 62.5,\r\n    age==\"65-69\" ~ 67.5, age==\"70-74\" ~ 72.5, age==\"75-79\" ~ 77.5,\r\n    age==\"80-84\" ~ 82.5, age==\"85-89\" ~ 87.5, age==\"90+\" ~ 92.5\r\n  )) %>% \r\n  group_by(areaType, areaCode, areaName, date) %>% \r\n  summarise(mean.age=weighted.mean(point.age, casesroll), casesroll=sum(casesroll),\r\n            pop=sum(pop)) %>%\r\n  mutate(caserateroll=casesroll*100000/pop) %>% \r\n  ungroup()\r\n\r\ntiff(\"Outputs/COVIDCasesxAgeBlackpool2.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot()+\r\n  geom_line(data=meanages, aes(x=date, y=mean.age, group=areaName), \r\n            colour=\"Grey80\")+\r\n  geom_line(data=subset(meanages, areaName==\"Blackpool\"), \r\n            aes(x=date, y=mean.age, group=areaName), colour=\"#FF4E86\")+\r\n  scale_x_date(name=\"\", limits=c(plotfrom, NA))+\r\n  scale_y_continuous(name=\"Mean age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\"), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Blackpool's cases are older than then average\",\r\n       subtitle=\"Average age of new confirmed COVID-19 cases in <span style='color:#FF4E86;'>Blackpool</span> compared to <span style='color:Grey60;'>other Local Authorities in England\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDCasesxMeanAge.tiff\", units=\"in\", width=8, height=6, res=500)\r\nmeanages %>% \r\n  filter(date==as.Date(\"2020-10-31\") & areaType==\"ltla\") %>% \r\n  mutate(flag=caserateroll+mean.age) %>% \r\n  ggplot()+\r\n  geom_point(aes(x=caserateroll, y=mean.age), colour=\"#FF4E86\")+\r\n  gghighlight(flag>105, caserateroll>68, mean.age>42)+\r\n  scale_x_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_y_continuous(name=\"Mean age\")+\r\n  #scale_colour_paletteer_d(\"LaCroixColoR::paired\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\"))+\r\n  labs(title=\"Blackpool has more, older, COVID-19 cases\",\r\n       subtitle=\"Rolling 7-day average of daily new cases per 100,000 plotted against their average age*\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#regional simple lines\r\ntiff(\"Outputs/COVIDCasesxAgeRegLine.tiff\", units=\"in\", width=9, height=11, res=500)\r\nshortdata %>% \r\n  filter(areaType==\"region\" & date>=plotfrom) %>% \r\n  ggplot()+\r\n  geom_line(aes(x=date, y=caserateroll, colour=ageband))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  facet_geo(~areaName, grid=mygrid)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"COVID-19 case rates are falling at different rates across England\",\r\n       subtitle=\"Rolling 7-day average of confirmed new cases by age\",\r\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDCasesxAgeRegStream.tiff\", units=\"in\", width=9, height=11, res=500)\r\nshortdata %>% \r\n  filter(areaType==\"region\" & date>=plotfrom) %>% \r\n  ggplot()+\r\n  geom_stream(aes(x=date, y=caserateroll, fill=ageband))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\", labels=abs, breaks=c(-200,0,200))+\r\n  scale_fill_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  facet_geo(~areaName, grid=mygrid)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"COVID-19 case rates continue to fall across England in all age groups\",\r\n       subtitle=\"Rolling 7-day average of confirmed new cases by age\",\r\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDCasesxAgeEngStream.tiff\", units=\"in\", width=9, height=6, res=500)\r\nshortdata %>% \r\n  filter(areaType==\"nation\" & date>=plotfrom) %>% \r\n  ggplot()+\r\n  geom_stream(aes(x=date, y=caserateroll, fill=ageband))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\", labels=abs)+\r\n  scale_fill_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 cases have been getting older in recent months\",\r\n       subtitle=\"Rolling 7-day average of confirmed new cases in England by age\",\r\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeEng.tiff\", units=\"in\", width=8, height=6, res=800)\r\ndata %>% \r\n  filter(areaType==\"nation\" & !is.na(caserateroll)) %>%\r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=age, fill=caserateroll*7))+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Weekly cases per 100,000\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), text=element_text(family=\"Lato\"),\r\n        legend.position=\"top\")+\r\n  guides(fill=guide_colourbar(ticks=FALSE, title.position = \"top\", title.hjust = 0.5,\r\n                              barwidth=unit(10, \"lines\"), barheight=unit(0.5, \"lines\")))+\r\n  labs(title=\"The age profile of current COVID cases is very different to\\nprevious waves\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases rates in Bolton by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDCasesxAgeEngRecent.tiff\", units=\"in\", width=8, height=6, res=800)\r\ndata %>% \r\n  filter(areaType==\"nation\" & !is.na(caserateroll) & date>as.Date(\"2021-04-01\")) %>%\r\n  ggplot()+\r\n  geom_tile(aes(x=date, y=age, fill=caserateroll*7))+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Weekly cases per 100,000\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)), text=element_text(family=\"Lato\"),\r\n        legend.position=\"top\")+\r\n  guides(fill=guide_colourbar(ticks=FALSE, title.position = \"top\", title.hjust = 0.5,\r\n                              barwidth=unit(10, \"lines\"), barheight=unit(0.5, \"lines\")))+\r\n  labs(title=\"The age profile of current COVID cases is very different to\\nprevious waves\",\r\n       subtitle=\"Rolling 7-day average of confirmed new COVID-19 cases rates in England by age group\",\r\n       caption=\"Data from coronavirus.data.gov.uk\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntemp <- data %>% filter(areaType==\"nation\") %>% \r\n  mutate(flag=case_when(\r\n    age %in% c(\"0-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\",\r\n               \"45-49\") ~ \"<50\",\r\n    TRUE ~ \">50\")) %>% \r\n  group_by(date, flag) %>%\r\n  summarise(cases=sum(cases)) %>%\r\n  group_by(date) %>% \r\n  mutate(total=sum(cases),\r\n         caseprop=cases*100/total) %>% \r\n  ungroup()\r\n"
  },
  {
    "path": "Heatmaps/COVIDPHEPositivity.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(lubridate)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\nsource <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1020037/Weekly_Influenza_and_COVID19_report_data_W38_v2.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata_m <- read_excel(temp, sheet=\"Figure 7. Positivity by age\", range=\"C121:L174\") %>% \r\n  mutate(date=seq.Date(from=as.Date(\"2020-09-14\"), by=\"weeks\", length.out=nrow(.))) %>% \r\n  gather(age, positivity, c(1:ncol(.)-1)) %>% \r\n  mutate(age=gsub(\"_\", \" to \", age), sex=\"Male\")\r\n\r\ndata_f <- read_excel(temp, sheet=\"Figure 7. Positivity by age\", range=\"C177:L230\") %>% \r\n  mutate(date=seq.Date(from=as.Date(\"2020-09-14\"), by=\"weeks\", length.out=nrow(.))) %>% \r\n  gather(age, positivity, c(1:ncol(.)-1)) %>% \r\n  mutate(age=gsub(\"_\", \" to \", age), sex=\"Female\")\r\n\r\ndata <- bind_rows(data_m, data_f) %>% \r\n  mutate(age=factor(age, levels=c(\"0 to 4\", \"5 to 9\", \"10 to 19\", \"20 to 29\", \r\n                                  \"30 to 39\", \"40 to 49\", \"50 to 59\",\r\n                                  \"60 to 69\", \"70 to 79\", \"80+\")),\r\n         positivity=positivity/100)\r\n\r\nagg_tiff(\"Outputs/COVIDPositivityxAgexSex.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot(data %>% filter(date>as.Date(\"2021-05-25\")), aes(x=date, y=positivity, colour=sex))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Positivity\", labels=label_percent(accuracy=1))+\r\n  scale_colour_manual(values=c(\"#00cc99\", \"#6600cc\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"Positivity rates are consistently higher among men\",\r\n       subtitle=\"Rolling 7-day average of COVID test positivity rates in <span style='color:#6600cc;'>men</span> and <span style='color:#00cc99;'>women</span> for pillar 2 (community) testing in England, by age.\",\r\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDPHESurveillance.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(ggtext)\r\nlibrary(ggridges)\r\nlibrary(paletteer)\r\n\r\n#Surveillance reports taken from:\r\n#https://www.gov.uk/government/publications/national-covid-19-surveillance-reports\r\n\r\n#Confusingly, PHE number them by the week of publication, which is 1 week later\r\n#than the data relates to. Numbers here relate to actual weeks of data.\r\n\r\n#As of 28th August, PHE are actually publishing a time series of case numbers by age and sex\r\ntemp1 <- tempfile()\r\nsource1 <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/923669/Weekly_COVID19_report_data_w40.xlsx\"\r\ntemp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\ncase.m <- read_excel(temp1, sheet=\"Figure 2b Cases by age and sex \", range=\"B45:L73\", \r\n                     col_names=FALSE)\r\ncolnames(case.m) <- c(\"Week\", \"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\", \r\n                          \"50-59\", \"60-69\", \"70-79\", \"80+\")\r\ncase.m$sex <- \"Male\"\r\ncase.m <- gather(case.m, age, cases, c(2:11))\r\ncase.m$cases <- as.character(case.m$cases)\r\n\r\ncase.f <- read_excel(temp1, sheet=\"Figure 2b Cases by age and sex \", range=\"B12:L40\", \r\n                     col_names=FALSE)\r\ncolnames(case.f) <- c(\"Week\", \"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\", \r\n                      \"50-59\", \"60-69\", \"70-79\", \"80+\")\r\ncase.f$sex <- \"Female\"\r\ncase.f <- gather(case.f, age, cases, c(2:11))\r\ncase.f$cases <- as.character(case.f$cases)\r\n\r\ncases <- bind_rows(case.m, case.f)\r\n\r\n#Bring in LA populations\r\ntemp2 <- tempfile()\r\nsource2 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\r\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\npop <- as.data.frame(t(read_excel(temp2, sheet=\"MYE2-All\", range=\"E9:CQ9\", col_names=FALSE)))\r\npop$age <- c(0:90)\r\npop$ageband <- case_when(\r\n  pop$age<5 ~ \"0-4\",\r\n  pop$age<10 ~ \"5-9\",\r\n  pop$age<20 ~ \"10-19\",\r\n  pop$age<30 ~ \"20-29\",\r\n  pop$age<40 ~ \"30-39\",\r\n  pop$age<50 ~ \"40-49\",\r\n  pop$age<60 ~ \"50-59\",\r\n  pop$age<70 ~ \"60-69\",\r\n  pop$age<80 ~ \"70-79\",\r\n  TRUE ~ \"80+\"\r\n)\r\n\r\npop <- pop %>% \r\n  group_by(ageband) %>% \r\n  summarise(pop=sum(V1))\r\n\r\ncases <- merge(cases, pop, by.x=\"age\", by.y=\"ageband\", all.x=TRUE)\r\n\r\ncases$cases <- if_else(cases$cases==\"*\", \"0\", cases$cases)\r\ncases$cases <- if_else(cases$cases==\"-\", \"0\", cases$cases)\r\ncases$cases <- if_else(is.na(cases$cases), \"0\", cases$cases)\r\ncases$cases <- as.numeric(cases$cases)\r\ncases$caserate <- cases$cases*100000/cases$pop\r\n\r\ncases$age <- factor(cases$age, levels=c(\"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\",\r\n                                        \"40-49\", \"50-59\", \"60-69\", \"70-79\", \"80+\"))\r\n\r\n#Heatmaps of cases by age: rates\r\n###############################\r\n#Need to split populations out by sex as there are currently wrong\r\n###############################\r\ntiff(\"Outputs/COVIDNewCasesHeatmap.tiff\", units=\"in\", width=13, height=4, res=500)\r\nggplot(cases)+\r\n  geom_tile(aes(x=Week, y=age, fill=caserate))+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Cases per 100,000\")+ \r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  labs(title=\"New COVID-19 cases by age during the pandemic\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDNewCasesHeatmapRecent.tiff\", units=\"in\", width=10, height=5, res=500)\r\nggplot(subset(cases, Week>=26))+\r\n  geom_tile(aes(x=Week, y=age, fill=caserate))+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Cases per 100,000\")+ \r\n  scale_x_continuous(breaks=c(25,27,29,31,33,35,37,39))+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+ \r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"Cases are concentrated in young people, but now rising in older age groups\",\r\n    subtitle=\"Rates of new COVID-19 cases in England by age during the pandemic\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Absolute numbers\r\ntiff(\"Outputs/COVIDNewCasesHeatmapAbs.tiff\", units=\"in\", width=13, height=4, res=500)\r\nggplot(cases)+\r\n  geom_tile(aes(x=Week, y=age, fill=cases))+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Confirmed cases\")+ \r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  labs(title=\"COVID-19 cases are currently concentrated in working ages\",\r\n       subtitle=\"New confirmed COVID-19 cases by age in England\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nlibrary(ggstream) #devtools::install_github(\"davidsjoberg/ggstream\")\r\n\r\ntiff(\"Outputs/COVIDCasesStreamgraphxSex.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(cases, aes(x=Week, y=cases, fill=age))+\r\n  geom_stream(bw=0.2)+\r\n  scale_fill_paletteer_d(\"RColorBrewer::RdYlGn\", name=\"Age\", direction=-1)+\r\n  scale_y_continuous(name=\"New cases per week\", breaks=c(-15000,-10000,-5000,0,5000,10000,15000),\r\n                     labels=c(\"15,000\", \"10,000\", \"5,000\", \"0\", \"5,000\", \"10,000\", \"15,000\"))+\r\n  #scale_x_date(name=\"\", date_breaks=\"1 month\", date_labels=\"%B\", \r\n  #             limits=c(as.Date(\"2020-03-01\"), max(cases$Date)))+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"The rise in COVID-19 cases is greatest in the under-40s\",\r\n       subtitle=\"Confirmed new cases in England by age band\",\r\n       caption=\"Date from PHE | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Combined sex version\r\ntiff(\"Outputs/COVIDCasesStreamgraph.tiff\", units=\"in\", width=10, height=6, res=500)\r\ncases %>% \r\n  group_by(Week, age) %>% \r\n  summarise(cases=sum(cases)) %>% \r\n  ggplot(aes(x=Week, y=cases, fill=age))+\r\n  geom_stream(bw=0.2)+\r\n  scale_fill_paletteer_d(\"RColorBrewer::RdYlGn\", name=\"Age\", direction=-1)+\r\n  scale_y_continuous(name=\"New cases per week\", breaks=c(-15000,-10000,-5000,0,5000,10000,15000),\r\n                     labels=c(\"15,000\", \"10,000\", \"5,000\", \"0\", \"5,000\", \"10,000\", \"15,000\"))+\r\n  #scale_x_date(name=\"\", date_breaks=\"1 month\", date_labels=\"%B\", \r\n  #             limits=c(as.Date(\"2020-03-01\"), max(cases$Date)))+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"COVID-19 cases are rising in almost all age groups\",\r\n       subtitle=\"Confirmed new cases in England by age band\",\r\n       caption=\"Date from PHE | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Analysis of positivity data\r\n#Overall by pillar\r\npos.pillars <- read_excel(temp1, sheet=\"Figure 1. Pillar 1+2 epicurve\", range=\"B9:F43\",\r\n                          col_names=FALSE)\r\ncolnames(pos.pillars) <- c(\"Week\", \"P1cases\", \"P2cases\", \"P1pos\", \"P2pos\")\r\n\r\npos.pillars <- gather(pos.pillars, Pillar, posrate, c(4,5))\r\npos.pillars$posrate <- as.numeric(if_else(pos.pillars$posrate==\"-\", \"NA\", pos.pillars$posrate))\r\n\r\ntiff(\"Outputs/COVIDPillarsPosRate.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(pos.pillars, aes(x=Week, y=posrate/100, colour=Pillar))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_colour_paletteer_d(\"NineteenEightyR::malibu\")+\r\n  scale_y_continuous(name=\"Proportion of tests which are positive\", \r\n                     labels = scales::percent_format(accuracy = 1))+  \r\n  theme_classic()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The positivity rate of Pillar 1 and 2 tests is still rising\",\r\n       subtitle=\"Weekly positivity rates for <span style='color:#FF4E86;'>Pillar 1</span> and <span style='color:#FF9E44;'>Pillar 2 </span>tests in England\",\r\n       caption=\"Date from PHE | Visualisation by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#By age and sex\r\npos.age.m <- read_excel(temp1, sheet=\"Figure 6. Positivity by agegrp\", range=\"B86:I120\",\r\n                        col_names=FALSE)\r\ncolnames(pos.age.m) <- c(\"Week\", \"0-4\", \"5-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")\r\npos.age.m <- gather(pos.age.m, age, posrate, c(2:8))\r\npos.age.m$posrate <- as.numeric(if_else(pos.age.m$posrate==\"-\", \"NA\", pos.age.m$posrate))\r\npos.age.m$sex <- \"Male\"\r\n\r\npos.age.f <- read_excel(temp1, sheet=\"Figure 6. Positivity by agegrp\", range=\"B124:I158\",\r\n                        col_names=FALSE)\r\ncolnames(pos.age.f) <- c(\"Week\", \"0-4\", \"5-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\")\r\npos.age.f <- gather(pos.age.f, age, posrate, c(2:8))\r\npos.age.f$posrate <- as.numeric(if_else(pos.age.f$posrate==\"-\", \"NA\", pos.age.f$posrate))\r\npos.age.f$sex <- \"Female\"\r\n\r\npos.age <- bind_rows(pos.age.m, pos.age.f)\r\n\r\npos.age$age <- factor(pos.age$age, levels=c(\"0-4\", \"5-14\", \"15-44\", \"45-64\", \"65-74\",\r\n                                            \"75-84\", \"85+\"))\r\n\r\ntiff(\"Outputs/COVIDPosRatexAge.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(pos.age, aes(x=Week, y=posrate/100, colour=age))+\r\n  geom_line()+\r\n  scale_colour_paletteer_d(pal=\"awtools::a_palette\",name=\"Age\")+\r\n  scale_y_continuous(name=\"Proportion of tests which are positive\", \r\n                     labels = scales::percent_format(accuracy = 1))+  \r\n  xlim(c(18,max(pos.age$Week)+1))+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"The positivity rate of tests is rising in adults\",\r\n       subtitle=\"Weekly positivity rates for Pillar 2 tests in England by age group\",\r\n       caption=\"Date from PHE | Visualisation by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#By region\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDPHESurveillance2.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(ggtext)\r\nlibrary(ggridges)\r\nlibrary(ggstream)\r\nlibrary(paletteer)\r\nlibrary(lubridate)\r\n\r\n#Surveillance reports taken from:\r\n#https://www.gov.uk/government/statistics/national-flu-and-covid-19-surveillance-reports\r\n\r\n#Confusingly, PHE number them by the week of publication, which is 1 week later\r\n#than the data relates to. Numbers here relate to actual weeks of data.\r\n\r\ntemp1 <- tempfile()\r\nsource1 <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/928752/Weekly_Influenza_and_COVID19_report_data_W43.xlsx\"\r\ntemp1 <- curl_download(url=source1, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\n\r\ndata.age <- read_excel(temp1, sheet=5, range=\"B9:L25\")\r\ncolnames(data.age) <- c(\"week\", \"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\", \"50-59\",\r\n                        \"60-69\", \"70-79\", \"80+\")\r\n\r\ndata.age <- gather(data.age, age, caserate, c(2:11))\r\n\r\n#Bring in populations\r\ntemp2 <- tempfile()\r\nsource2 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\r\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\npop <- as.data.frame(t(read_excel(temp2, sheet=\"MYE2-All\", range=\"E9:CQ9\", col_names=FALSE)))\r\npop$age <- c(0:90)\r\npop$ageband <- case_when(\r\n  pop$age<5 ~ \"0-4\",\r\n  pop$age<10 ~ \"5-9\",\r\n  pop$age<20 ~ \"10-19\",\r\n  pop$age<30 ~ \"20-29\",\r\n  pop$age<40 ~ \"30-39\",\r\n  pop$age<50 ~ \"40-49\",\r\n  pop$age<60 ~ \"50-59\",\r\n  pop$age<70 ~ \"60-69\",\r\n  pop$age<80 ~ \"70-79\",\r\n  TRUE ~ \"80+\"\r\n)\r\n\r\npop <- pop %>% \r\n  group_by(ageband) %>% \r\n  summarise(pop=sum(V1))\r\n\r\ndata.age <- merge(data.age, pop, by.x=\"age\", by.y=\"ageband\", all.x=TRUE)\r\n\r\ndata.age$cases <- data.age$caserate*data.age$pop/100000\r\n\r\ndata.age$age <- factor(data.age$age, levels=c(\"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\", \r\n                                              \"50-59\", \"60-69\", \"70-79\", \"80+\"))\r\n\r\ndata.age$weeklab <- as.Date(\"2020-01-03\")+days(7*(data.age$week-1))\r\n\r\ntiff(\"Outputs/COVIDNewCasesHeatmapRecent.tiff\", units=\"in\", width=7, height=5, res=500)\r\nggplot(data.age)+\r\n  geom_tile(aes(x=weeklab, y=age, fill=caserate))+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Cases\\nper 100,000\")+ \r\n  scale_x_date(name=\"Week ending\", breaks=seq.Date(from=as.Date(\"2020-07-03\"), \r\n                                                        to=max(data.age$weeklab), by=\"week\"),\r\n               date_labels=\"%d %b\")+\r\n  theme_classic()+ \r\n  theme(axis.text.x=element_text(angle=45, hjust=1))+\r\n  labs(title=\"Cases numbers are falling in young people, but are rising elsewhere\",\r\n       subtitle=\"Rates of new COVID-19 cases in England by age during the pandemic\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Absolute numbers\r\ntiff(\"Outputs/COVIDNewCasesHeatmapAbsRecent.tiff\", units=\"in\", width=7, height=5, res=500)\r\nggplot(data.age)+\r\n  geom_tile(aes(x=weeklab, y=age, fill=cases))+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Cases per day\")+ \r\n  scale_x_date(name=\"Week ending\", breaks=seq.Date(from=as.Date(\"2020-07-03\"), \r\n                                                   to=max(data.age$weeklab), by=\"week\"),\r\n               date_labels=\"%d %b\")+\r\n  theme_classic()+ \r\n  theme(axis.text.x=element_text(angle=45, hjust=1))+\r\n  labs(title=\"Cases numbers are falling in young people, but are rising elsewhere\",\r\n       subtitle=\"Rates of new COVID-19 cases in England by age during the pandemic\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Streamgraph\r\ntiff(\"Outputs/COVIDCasesStreamgraphRecent.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(data.age, aes(x=weeklab, y=cases, fill=age))+\r\n  geom_stream(bw=0.5)+\r\n  scale_y_continuous(name=\"New cases per week\", \r\n                     breaks=c(-40000, -30000, -20000, -10000,0,10000,\r\n                              20000, 30000, 40000),\r\n                     labels=abs)+\r\n  scale_fill_paletteer_d(\"RColorBrewer::RdYlGn\", name=\"Age\", direction=-1)+ \r\n  scale_x_date(name=\"Week ending\", breaks=seq.Date(from=as.Date(\"2020-07-03\"), \r\n                                                   to=max(data.age$weeklab), by=\"week\"),\r\n               date_labels=\"%d %b\")+\r\n  theme_classic()+ \r\n  theme(axis.text.x=element_text(angle=45, hjust=1))+\r\n  labs(title=\"Cases are rising across older age groups\",\r\n       subtitle=\"Confirmed new COVID-19 cases in England by age band\",\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Analysis of positivity data\r\n#By age and sex\r\npos.age.m <- read_excel(temp1, sheet=\"Figure 6. Positivity by agegrp\", range=\"B48:L63\",\r\n                        col_names=FALSE)\r\ncolnames(pos.age.m) <- c(\"Week\", \"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\", \"50-59\", \r\n                         \"60-69\", \"70-79\", \"80+\")\r\npos.age.m <- gather(pos.age.m, age, posrate, c(2:11))\r\npos.age.m$sex <- \"Male\"\r\n\r\npos.age.f <- read_excel(temp1, sheet=\"Figure 6. Positivity by agegrp\", range=\"B67:L82\",\r\n                        col_names=FALSE)\r\ncolnames(pos.age.f) <- c(\"Week\", \"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\", \"50-59\", \r\n                         \"60-69\", \"70-79\", \"80+\")\r\npos.age.f <- gather(pos.age.f, age, posrate, c(2:11))\r\npos.age.f$sex <- \"Female\"\r\n\r\npos.age <- bind_rows(pos.age.m, pos.age.f)\r\n\r\npos.age$age <- factor(pos.age$age, levels=c(\"0-4\", \"5-9\", \"10-19\", \"20-29\", \"30-39\", \"40-49\", \r\n                                            \"50-59\", \"60-69\", \"70-79\", \"80+\"))\r\n\r\ntiff(\"Outputs/COVIDPosRatexAge.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(pos.age, aes(x=Week, y=posrate/100, colour=age))+\r\n  geom_line()+\r\n  scale_colour_paletteer_d(\"RColorBrewer::RdYlGn\", name=\"Age\", direction=-1)+\r\n  scale_y_continuous(name=\"Proportion of tests which are positive\", \r\n                     labels = scales::percent_format(accuracy = 1))+  \r\n  xlim(c(26,max(pos.age$Week)+1))+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"The positivity rate of tests is still rising\",\r\n       subtitle=\"Weekly positivity rates for Pillar 2 tests in England by age group\",\r\n       caption=\"Date from PHE | Visualisation by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#By region\r\n"
  },
  {
    "path": "Heatmaps/COVIDPHEVaxSurveillance.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#All case data from the latest PHE vaccine surveillance report\r\n#https://www.gov.uk/government/publications/covid-19-vaccine-surveillance-report\r\n\r\n#Cases\r\ncases <- data.frame(\r\n  age=c(\"Under 18\", \"18-29\", \"30-39\", \"40-49\", \"50-59\", \"60-69\", \"70-79\", \"80+\"),\r\n  Unlinked=c(15901, 19529, 12452, 8930, 6868, 3657, 2034, 1124),\r\n  Unvaccinated=c(141676, 53187, 33986, 15106, 7552, 2650, 910, 545),\r\n  Fully_vaccinated=c(757, 32533, 43004, 67349, 67652, 38119, 22270, 10087)\r\n) %>% \r\n  mutate(metric=\"cases\")\r\n\r\ndeaths28 <- data.frame(\r\n  age=c(\"Under 18\", \"18-29\", \"30-39\", \"40-49\", \"50-59\", \"60-69\", \"70-79\", \"80+\"),\r\n  Unlinked=c(0,1,2,3,3,7,2,7),\r\n  Unvaccinated=c(3,13,31,54,100,115,129,155),\r\n  Fully_vaccinated=c(0,3,8,27,71,194,428,928)\r\n) %>% \r\n  mutate(metric=\"deaths\")\r\n\r\nadmissions <-  data.frame(\r\n  age=c(\"Under 18\", \"18-29\", \"30-39\", \"40-49\", \"50-59\", \"60-69\", \"70-79\", \"80+\"),\r\n  Unlinked=c(25,14,16,14,10,7,3,1),\r\n  Unvaccinated=c(404,387,516,497,421,328,194,144),\r\n  Fully_vaccinated=c(0,80,118,220,406,571,873,965)\r\n) %>% \r\n  mutate(metric=\"admissions\")\r\n\r\nrawdata <- bind_rows(cases, admissions, deaths28)\r\n\r\n#Bring in vaccinated and NIMS/ONS population data - use figures from week 32 (to allow for 2 weeks post 2nd jab by\r\n#~mid-point of 4 week analysis window)\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/08/COVID-19-weekly-announced-vaccinations-12-August-2021.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxed1st <- read_excel(temp, sheet=\"NHS Region\", range=\"D12:Q13\") %>% \r\n  mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,\r\n         `50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>% \r\n  select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>% \r\n  gather(age, vax1pop)\r\n\r\nvaxed2nd <- read_excel(temp, sheet=\"NHS Region\", range=\"U12:AH13\") %>% \r\n  mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,\r\n         `50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>% \r\n  select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>% \r\n  gather(age, vax2pop)\r\n\r\nNIMSpop <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"F13:S14\") %>% \r\n  mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,\r\n         `50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>% \r\n  select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>% \r\n  gather(age, pop_NIMS)\r\n\r\nONSpop <- read_excel(temp, sheet=\"Population estimates (ONS 2020)\", range=\"B16:D29\", col_names=FALSE) %>% \r\n  select(-2) %>% \r\n  set_names(c(\"age\", \"pop_ONS\")) %>% \r\n  spread(age, pop_ONS) %>% \r\n  mutate(`18-29`=`18-24`+`25-29`, `30-39`=`30-34`+`35-39`, `40-49`=`40-44`+`45-49`,\r\n         `50-59`=`50-54`+`55-59`, `60-69`=`60-64`+`65-69`, `70-79`=`70-74`+`75-79`) %>% \r\n  select(`Under 18`, `18-29`, `30-39`, `40-49`, `50-59`, `60-69`, `70-79`, `80+`) %>% \r\n  gather(age, pop_ONS)\r\n\r\n#Alternative approach to calculating vaxed populations from dashboard\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndashboarddata <- read.csv(temp) %>% \r\n  mutate(age=case_when(\r\n    age==\"16_17\" ~ \"16-17\",\r\n    age %in% c(\"18_24\", \"25_29\") ~ \"18-29\",\r\n    age %in% c(\"30_34\", \"35_39\") ~ \"30-39\",\r\n    age %in% c(\"40_44\", \"45_49\") ~ \"40-49\",\r\n    age %in% c(\"50_54\", \"55_59\") ~ \"50-59\",\r\n    age %in% c(\"60_64\", \"65_69\") ~ \"60-69\",\r\n    age %in% c(\"70_74\", \"75_79\") ~ \"70-79\",\r\n    age %in% c(\"80_84\", \"85_89\", \"90+\") ~ \"80+\",\r\n    TRUE ~ age)) %>% \r\n  group_by(age, date) %>% \r\n  summarise(cumPeopleVaccinatedSecondDoseByVaccinationDate=sum(cumPeopleVaccinatedSecondDoseByVaccinationDate),\r\n            cumPeopleVaccinatedFirstDoseByVaccinationDate=sum(cumPeopleVaccinatedFirstDoseByVaccinationDate)) %>% \r\n  ungroup() %>% \r\n  #lag second doses by 2 weeks\r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(dose2=lag(cumPeopleVaccinatedSecondDoseByVaccinationDate, 14)) %>% \r\n  #filter out weeks 32-35 to match PHE data\r\n  filter(date>=as.Date(\"2021-08-09\") & date<=as.Date(\"2021-09-05\")) %>% \r\n  #calculate average populations across the study period\r\n  summarise(singledose=mean(cumPeopleVaccinatedFirstDoseByVaccinationDate),\r\n            doubledose=mean(dose2))\r\n\r\n#Because of reasons, PHE's NIMS figures in the dashboard are not (in spite of the field name) by vaccination date,\r\n#The data reflects only the NIMS pop estimates on the day that you download the data.\r\n#So, here's a big old faff with the archive data to get the actual figures\r\ncallarchive <- function(funcdate) {\r\n  filepath <- paste0(\"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv&release=\",\r\n                     as.character(as.Date(funcdate)+days(1)))\r\n  temp <- curl_download(url=filepath, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n  file <- read.csv(temp) %>% \r\n    select(date, age, VaccineRegisterPopulationByVaccinationDate) %>% \r\n    filter(date==as.Date(funcdate))\r\n  return(file)\r\n}\r\n\r\n#Without doubt there is a better way to do this, probably involving lists\r\narchivepops <- bind_rows(callarchive(\"2021-07-26\"), callarchive(\"2021-07-27\"),\r\n                         callarchive(\"2021-07-28\"), callarchive(\"2021-07-29\"),\r\n                         callarchive(\"2021-07-30\"), callarchive(\"2021-07-31\"),\r\n                         callarchive(\"2021-08-01\"), callarchive(\"2021-08-02\"),\r\n                         callarchive(\"2021-08-03\"), callarchive(\"2021-08-04\"),\r\n                         callarchive(\"2021-08-05\"), callarchive(\"2021-08-06\"),\r\n                         callarchive(\"2021-08-07\"), callarchive(\"2021-08-08\"),\r\n                         callarchive(\"2021-08-09\"), callarchive(\"2021-08-10\"),\r\n                         callarchive(\"2021-08-11\"), callarchive(\"2021-08-12\"),\r\n                         callarchive(\"2021-08-13\"), callarchive(\"2021-08-14\"),\r\n                         callarchive(\"2021-08-15\"), callarchive(\"2021-08-16\"),\r\n                         callarchive(\"2021-08-17\"), callarchive(\"2021-08-18\"),\r\n                         callarchive(\"2021-08-19\"), callarchive(\"2021-08-20\"),\r\n                         callarchive(\"2021-08-21\"), callarchive(\"2021-08-22\")) %>% \r\n  mutate(age=case_when(\r\n    age==\"16_17\" ~ \"16-17\",\r\n    age %in% c(\"18_24\", \"25_29\") ~ \"18-29\",\r\n    age %in% c(\"30_34\", \"35_39\") ~ \"30-39\",\r\n    age %in% c(\"40_44\", \"45_49\") ~ \"40-49\",\r\n    age %in% c(\"50_54\", \"55_59\") ~ \"50-59\",\r\n    age %in% c(\"60_64\", \"65_69\") ~ \"60-69\",\r\n    age %in% c(\"70_74\", \"75_79\") ~ \"70-79\",\r\n    age %in% c(\"80_84\", \"85_89\", \"90+\") ~ \"80+\",\r\n    TRUE ~ age)) %>% \r\n  group_by(age, date) %>% \r\n  summarise(VaccineRegisterPopulationByVaccinationDate=sum(VaccineRegisterPopulationByVaccinationDate)) %>% \r\n  ungroup() %>% \r\n  #lag second doses by 2 weeks\r\n  group_by(age) %>% \r\n  arrange(date) %>% \r\n  mutate(dose2pop=lag(VaccineRegisterPopulationByVaccinationDate, 14)) %>% \r\n  #filter out weeks 32-35 to match PHE data\r\n  filter(date>=as.Date(\"2021-08-09\") & date<=as.Date(\"2021-09-05\")) %>% \r\n  #calculate average populations across the study period\r\n  summarise(singledoseNIMSpop=mean(VaccineRegisterPopulationByVaccinationDate),\r\n            doubledoseNIMSpop=mean(dose2pop))\r\n\r\ndata <- merge(rawdata, vaxed1st) %>% \r\n  merge(vaxed2nd) %>% \r\n  merge(NIMSpop) %>% \r\n  merge(ONSpop) %>% \r\n  merge(dashboarddata, all=TRUE) %>% \r\n  merge(archivepops, all=TRUE) %>% \r\n  mutate(singledose=if_else(age==\"Under 18\", vax1pop, singledose),\r\n         doubledose=if_else(age==\"Under 18\", vax2pop, doubledose),\r\n         unvaxpop_ONS=pop_ONS-singledose, unvaxpop_NIMS=pop_NIMS-singledose,\r\n         age=factor(age, levels=c(\"Under 18\", \"18-29\", \"30-39\", \"40-49\", \"50-59\", \"60-69\", \"70-79\", \"80+\")))\r\n\r\n#Graphic of difference in estimates of unvaxed pop\r\nagg_tiff(\"Outputs/EngPopUnvaxEstimates.tiff\", units=\"in\", width=9, height=6, res=800)\r\ndata %>% filter(metric==\"cases\") %>%\r\n  mutate(popdiff_abs=unvaxpop_ONS-unvaxpop_NIMS,\r\n         popdiff_rel=popdiff_abs/unvaxpop_NIMS, \r\n         labpos=if_else(popdiff_abs<0, 1.1, -0.1)) %>% \r\n  ggplot()+\r\n  geom_col(aes(x=popdiff_abs, y=age), fill=\"aquamarine4\")+\r\n  geom_vline(aes(xintercept=0), colour=\"Grey60\")+\r\n  geom_text(aes(x=popdiff_abs, y=age, label=paste0(if_else(popdiff_abs>0, \"+\", \"\"),\r\n                                                   round(popdiff_rel*100, 0), \"%\"),\r\n            hjust=labpos), size=rel(3.6))+\r\n  scale_x_continuous(limits=c(-1800000, 1800000), breaks=c(-1500000, -1000000, -500000, 0, 500000,\r\n                                                           1000000, 1500000),\r\n                     labels=c(\"-1.5m\", \"-1m\", \"-0.5m\", \"0\", \"+0.5m\", \"+1m\", \"+1.5m\"),\r\n                     name=\"Difference between using ONS and NIMS denominators\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  annotate(\"text\", x=-1000000, y=8, label=\"ONS estimates\\nlower than NIMS\", \r\n           colour=\"Grey60\", size=rel(5), family=\"Lato\")+  \r\n  annotate(\"text\", x=1000000, y=8, label=\"ONS estimates\\nhigher than NIMS\", \r\n           colour=\"Grey60\", size=rel(5), family=\"Lato\")+  \r\n  theme_custom()+\r\n  labs(title=\"Estimating the number of unvaccinated people is hard\",\r\n       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.\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()  \r\n  \r\nplotdata <- data %>% \r\n  rowwise() %>% \r\n  mutate(unvaxrate_NIMS=Unvaccinated*100000/unvaxpop_NIMS,\r\n         unvaxrate_ONS=Unvaccinated*100000/unvaxpop_ONS,\r\n         vaxrate=Fully_vaccinated*100000/doubledose, minunvaxrate=min(unvaxrate_NIMS, unvaxrate_ONS),\r\n         maxunvaxrate=max(unvaxrate_NIMS, unvaxrate_ONS)) %>% \r\n  gather(measure, rate, c(16:20)) %>% \r\n  select(age, measure, rate, metric) \r\n\r\nplotdata2 <- data %>% \r\n  rowwise() %>% \r\n  mutate(unvaxrate_NIMS=Unvaccinated*100000/unvaxpop_NIMS,\r\n         unvaxrate_ONS=Unvaccinated*100000/unvaxpop_ONS) %>% \r\n  gather(measure, rate, c(\"unvaxrate_NIMS\", \"unvaxrate_ONS\"))\r\n\r\n#Updated version of the plot in the PHE report (Figure 2)\r\n#Cases from PHE report, fully vaccinated counts from dashboard (accounting for changes over time),\r\n#ONS population figures lifted from NHS England spreadsheet,\r\n#NIMS populations for u18s taken from NHS England spreadsheet,\r\n#NIMS populations for adults taken from dashboard (accountinf for changes over time).\r\n\r\nagg_tiff(\"Outputs/COVIDCaseRatesxAgexVax.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot()+\r\n  geom_col(data=plotdata %>% filter(metric==\"cases\" & measure %in% c(\"vaxrate\", \"maxunvaxrate\")), \r\n           aes(x=rate, y=age, fill=measure), position=\"dodge\")+\r\n  geom_col(data=plotdata %>% filter(metric==\"cases\" & measure %in% c(\"vaxrate\", \"minunvaxrate\")), \r\n           aes(x=rate, y=age, fill=measure), position=\"dodge\")+\r\n  geom_point(data=plotdata2 %>% filter(metric==\"cases\"),\r\n             aes(x=rate, y=age, colour=measure), position=position_nudge(y=-0.225), size=5.8, shape=\"|\")+\r\n  scale_x_continuous(name=\"Confirmed cases per 100,000 people\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"Grey70\", \"Grey30\", \"Red\"), breaks=c(\"vaxrate\", \"minunvaxrate\"),\r\n                    labels=c(\"Fully vaccinated\", \"Unvaccinated\"), name=\"\")+\r\n  scale_colour_manual(values=c(\"Grey90\", \"Black\"), labels=c(\"Based on NIMS\", \"Based on ONS\"),\r\n                      name=\"\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\", plot.subtitle=element_markdown())+\r\n  labs(title=\"Choice of population data has a huge impact on estimates of vaccine effectiveness\",\r\n       subtitle=\"Rates of confirmed COVID cases between 8th August and 5th September 2021 by age and vaccination status.<br> <span style='color:Grey70;'>Light grey</span> bars represent the difference in estimated case rates in unvaccinated groups between ONS and NIMS estimates.\",\r\n       caption=\"Data from PHE & NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDPHEVaxxAgexSex.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(extrafont)\r\nlibrary(ggtext)\r\nlibrary(ragg)\r\nlibrary(lubridate)\r\nlibrary(gganimate)\r\n\r\n#Download data from PHE surveillance report\r\n#https://www.gov.uk/government/statistics/national-flu-and-covid-19-surveillance-reports-2021-to-2022-season\r\n\r\n\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1027448/Weekly_Influenza_and_COVID19_report_data_w42.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read_excel(temp, sheet=\"Figure 63&64. COVID Vac Age Sex\", range=\"B13:N29\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(data) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                     \"Female_Vax2\")\r\n\r\ndata <- data %>% \r\n  rowwise() %>% \r\n  mutate(Male_Unvax=Male_Pop-Male_Vax1,\r\n         Female_Unvax=Female_Pop-Female_Vax1,\r\n         Male_Vax1Only=Male_Vax1-Male_Vax2,\r\n         Female_Vax1Only=Female_Vax1-Female_Vax2) %>% \r\n  ungroup() %>% \r\n  select(Age, Male_Unvax, Female_Unvax, Male_Vax1Only, Female_Vax1Only, Male_Vax2, Female_Vax2)\r\n\r\ndata_long <- pivot_longer(data, cols=c(2:7), names_to=c(\"Sex\", \"Measure\"), names_sep=\"_\", \r\n                          values_to=\"Value\") %>% \r\n  mutate(Value=if_else(Sex==\"Male\", -Value, Value),\r\n         Age=case_when(\r\n           Age==\"Under 12\" ~ \"<12\",\r\n           Age==\"12 to under 16\" ~ \"12-15\",\r\n           Age==\"16 to under 18\" ~ \"16-17\",\r\n           Age==\"18 to under 20\" ~ \"18-19\",\r\n           Age==\"20 to under 25\" ~ \"20-24\",\r\n           Age==\"25 to under 30\" ~ \"25-29\",\r\n           Age==\"30 to under 35\" ~ \"30-34\",\r\n           Age==\"35 to under 40\" ~ \"35-39\",\r\n           Age==\"40 to under 45\" ~ \"40-44\",\r\n           Age==\"45 to under 50\" ~ \"45-49\",\r\n           Age==\"50 to under 55\" ~ \"50-54\",\r\n           Age==\"55 to under 60\" ~ \"55-59\",\r\n           Age==\"60 to under 65\" ~ \"60-64\",\r\n           Age==\"65 to under 70\" ~ \"65-69\",\r\n           Age==\"70 to under 75\" ~ \"70-74\",\r\n           Age==\"75 to under 80\" ~ \"75-79\",\r\n           TRUE ~ \"80+\"),\r\n         Age=factor(Age, levels=c(\"<12\", \"12-15\", \"16-17\", \"18-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                                  \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                                  \"80+\")),\r\n         SexMeasure=paste0(Sex, Measure))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxxAgexSex.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot(data_long, aes(x=Value, y=Age, fill=SexMeasure))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),\r\n                     labels=c(\"5m\", \"2.5m\", \"0\", \"2.5m\", \"5m\"),\r\n                     limits=c(-5000000, 5000000), name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"Grey80\", \"#7dffdd\", \"#00cc99\", \"Grey80\", \"#be7dff\", \"#6600cc\"))+\r\n  theme_classic()+\r\n  theme(axis.line.y=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccine delivery in England by age and sex\",\r\n       subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\",\r\n       caption=\"Data from PHE, population figures from NIMS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=-4000000, y=9, label=\"Men\", colour=\"#6600cc\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")+\r\n  annotate(\"text\", x=4000000, y=9, label=\"Women\", colour=\"#00cc99\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")\r\ndev.off()  \r\n\r\nagg_tiff(\"Outputs/COVIDVaxxAgexSexv2.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot(data_long %>% \r\n         mutate(SexMeasure=factor(SexMeasure, levels=c(\"FemaleVax2\", \"FemaleVax1Only\", \"FemaleUnvax\",\r\n                                                       \"MaleVax2\", \"MaleVax1Only\", \"MaleUnvax\"))), \r\n       aes(x=Value, y=Age, fill=SexMeasure))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  geom_segment(aes(x=0, xend=0, y=0.5, yend=17.5))+\r\n  scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),\r\n                     labels=c(\"5m\", \"2.5m\", \"0\", \"2.5m\", \"5m\"),\r\n                     limits=c(-5000000, 5000000), name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"#00cc99\", \"#7dffdd\", \"Grey80\",  \"#6600cc\", \"#be7dff\",\"Grey80\"))+\r\n  theme_classic()+\r\n  theme(axis.line.y=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccine delivery in England by age and sex\",\r\n       subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\",\r\n       caption=\"Data from PHE, population figures from NIMS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=-4000000, y=9, label=\"Men\", colour=\"#6600cc\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")+\r\n  annotate(\"text\", x=4000000, y=9, label=\"Women\", colour=\"#00cc99\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")\r\ndev.off()\r\n\r\n#Bring in ONS 2020 population figures for comparison\r\nurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nONSpop_m <- read_excel(temp, sheet=\"MYE2 - Males\", range=\"E8:CQ12\") %>% \r\n  slice_tail() %>% \r\n  gather(Age, pop_m, c(1:ncol(.)))\r\n\r\nONSpop_f <- read_excel(temp, sheet=\"MYE2 - Females\", range=\"E8:CQ12\") %>% \r\n  slice_tail() %>% \r\n  gather(Age, pop_f, c(1:ncol(.)))\r\n\r\nONSpop <- merge(ONSpop_m, ONSpop_f) %>% \r\n  mutate(Age=as.numeric(substr(Age, 1, 2)),\r\n         Age=case_when(\r\n           Age<12 ~ \"Under 12\",\r\n           Age<16 ~ \"12 to under 16\",\r\n           Age<18 ~ \"16 to under 18\",\r\n           Age<20 ~ \"18 to under 20\",\r\n           Age<25 ~ \"20 to under 25\",\r\n           Age<30 ~ \"25 to under 30\",\r\n           Age<35 ~ \"30 to under 35\",\r\n           Age<40 ~ \"35 to under 40\",\r\n           Age<45 ~ \"40 to under 45\",\r\n           Age<50 ~ \"45 to under 50\",\r\n           Age<55 ~ \"50 to under 55\",\r\n           Age<60 ~ \"55 to under 60\",\r\n           Age<65 ~ \"60 to under 65\",\r\n           Age<70 ~ \"65 to under 70\",\r\n           Age<75 ~ \"70 to under 75\",\r\n           Age<80 ~ \"75 to under 80\",\r\n           TRUE ~ \"Over 80\")) %>% \r\n  group_by(Age) %>% \r\n  summarise(pop_m=sum(pop_m), pop_f=sum(pop_f)) %>% \r\n  ungroup()\r\n\r\nONSdata <- merge(data, ONSpop) %>% \r\n  mutate(Male_Unvax=pop_m-Male_Vax1Only-Male_Vax2,\r\n         Female_Unvax=pop_f-Female_Vax1Only-Female_Vax2)\r\n\r\nONSdata_long <- pivot_longer(ONSdata, cols=c(2:7), names_to=c(\"Sex\", \"Measure\"), names_sep=\"_\", \r\n                          values_to=\"Value\") %>% \r\n  mutate(Value=if_else(Sex==\"Male\", -Value, Value),\r\n         Age=case_when(\r\n           Age==\"Under 12\" ~ \"<12\",\r\n           Age==\"12 to under 16\" ~ \"12-15\",\r\n           Age==\"16 to under 18\" ~ \"16-17\",\r\n           Age==\"18 to under 20\" ~ \"18-19\",\r\n           Age==\"20 to under 25\" ~ \"20-24\",\r\n           Age==\"25 to under 30\" ~ \"25-29\",\r\n           Age==\"30 to under 35\" ~ \"30-34\",\r\n           Age==\"35 to under 40\" ~ \"35-39\",\r\n           Age==\"40 to under 45\" ~ \"40-44\",\r\n           Age==\"45 to under 50\" ~ \"45-49\",\r\n           Age==\"50 to under 55\" ~ \"50-54\",\r\n           Age==\"55 to under 60\" ~ \"55-59\",\r\n           Age==\"60 to under 65\" ~ \"60-64\",\r\n           Age==\"65 to under 70\" ~ \"65-69\",\r\n           Age==\"70 to under 75\" ~ \"70-74\",\r\n           Age==\"75 to under 80\" ~ \"75-79\",\r\n           TRUE ~ \"80+\"),\r\n         Age=factor(Age, levels=c(\"<12\", \"12-15\", \"16-17\", \"18-19\", \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                                  \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                                  \"80+\")),\r\n         SexMeasure=paste0(Sex, Measure))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxxAgexSexONS.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot(ONSdata_long, aes(x=Value, y=Age, fill=SexMeasure))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),\r\n                     labels=c(\"5m\", \"2.5m\", \"0\", \"2.5m\", \"5m\"),\r\n                     limits=c(-5000000, 5000000), name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"Grey80\", \"#7dffdd\", \"#00cc99\", \"Grey80\", \"#be7dff\", \"#6600cc\"))+\r\n  theme_classic()+\r\n  theme(axis.line.y=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccine delivery in England by age and sex\",\r\n       subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\",\r\n       caption=\"Data from PHE, population figures from ONS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=-4000000, y=9, label=\"Men\", colour=\"#6600cc\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")+\r\n  annotate(\"text\", x=4000000, y=9, label=\"Women\", colour=\"#00cc99\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")\r\ndev.off()  \r\n\r\nagg_tiff(\"Outputs/COVIDVaxxAgexSexONSv2.tiff\", units=\"in\", width=8, height=7, res=800)\r\nggplot(ONSdata_long %>% \r\n         mutate(SexMeasure=factor(SexMeasure, levels=c(\"FemaleVax2\", \"FemaleVax1Only\", \"FemaleUnvax\",\r\n                                                       \"MaleVax2\", \"MaleVax1Only\", \"MaleUnvax\"))), \r\n       aes(x=Value, y=Age, fill=SexMeasure))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  geom_segment(aes(x=0, xend=0, y=0.5, yend=17.5))+\r\n  scale_x_continuous(breaks=c(-5000000, -2500000, 0, 2500000, 5000000),\r\n                     labels=c(\"5m\", \"2.5m\", \"0\", \"2.5m\", \"5m\"),\r\n                     limits=c(-5000000, 5000000), name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"#00cc99\", \"#7dffdd\", \"Grey80\",  \"#6600cc\", \"#be7dff\",\"Grey80\"))+\r\n  theme_classic()+\r\n  theme(axis.line.y=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccine delivery in England by age and sex\",\r\n       subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\",\r\n       caption=\"Data from PHE, population figures from ONS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=-4000000, y=9, label=\"Men\", colour=\"#6600cc\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")+\r\n  annotate(\"text\", x=4000000, y=9, label=\"Women\", colour=\"#00cc99\", size=rel(6), \r\n           fontface=\"bold\", family=\"Lato\")\r\ndev.off()  \r\n\r\n#####################################\r\n\r\n#Produce version with compressed age bands\r\n#V1 10 year bands for >20\r\nagg_tiff(\"Outputs/COVIDVaxxAgexSexv2.tiff\", units=\"in\", width=8, height=6, res=800)\r\ndata_long %>% \r\n  mutate(Age=case_when(\r\n    Age %in% c(\"18-24\", \"25-29\") ~ \"18-29\",\r\n    Age %in% c(\"30-34\", \"35-39\") ~ \"30-39\",\r\n    Age %in% c(\"40-44\", \"45-49\") ~ \"40-49\",\r\n    Age %in% c(\"50-54\", \"55-59\") ~ \"50-59\",\r\n    Age %in% c(\"60-64\", \"65-69\") ~ \"60-69\",\r\n    Age %in% c(\"70-74\", \"75-79\") ~ \"70-79\",\r\n    TRUE ~ as.character(Age))) %>% \r\n  group_by(Age, SexMeasure) %>% \r\n  summarise(Value=sum(Value)) %>% \r\n  ungroup() %>% \r\n  ggplot(aes(x=Value, y=Age, fill=SexMeasure))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_continuous(breaks=c(-7500000, -5000000, -2500000, 0, 2500000, 5000000, 7500000),\r\n                     labels=c(\"7.5m\", \"5m\", \"2.5m\", \"0\", \"2.5m\", \"5m\", \"7.5m\"),\r\n                     limits=c(-7500000, 7500000), name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"Grey80\", \"#7dffdd\", \"#00cc99\", \"Grey80\", \"#be7dff\", \"#6600cc\"))+\r\n  theme_classic()+\r\n  theme(axis.line.y=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccine delivery in England by age and sex\",\r\n       subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\",\r\n       caption=\"Data from PHE, population figures from NIMS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=-5000000, y=6.5, label=\"Men\", colour=\"#6600cc\", size=rel(6), fontface=\"bold\",\r\n           family=\"Lato\")+\r\n  annotate(\"text\", x=5000000, y=6.5, label=\"Women\", colour=\"#00cc99\", size=rel(6), fontface=\"bold\",\r\n           family=\"Lato\")\r\ndev.off()  \r\n\r\n#V2 20 year bands\r\nagg_tiff(\"Outputs/COVIDVaxxAgexSexv3.tiff\", units=\"in\", width=8, height=5, res=800)\r\ndata_long %>% \r\n  mutate(Age=case_when(\r\n    Age %in% c(\"18-24\", \"25-29\", \"30-34\", \"35-39\") ~ \"18-39\",\r\n    Age %in% c(\"40-44\", \"45-49\", \"50-54\", \"55-59\") ~ \"40-59\",\r\n    Age %in% c(\"60-64\", \"65-69\", \"70-74\", \"75-79\") ~ \"60-79\",\r\n    TRUE ~ as.character(Age))) %>% \r\n  group_by(Age, SexMeasure) %>% \r\n  summarise(Value=sum(Value)) %>% \r\n  ungroup() %>% \r\n  ggplot(aes(x=Value, y=Age, fill=SexMeasure))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_continuous(breaks=c(-7500000, -5000000, -2500000, 0, 2500000, 5000000, 7500000),\r\n                     labels=c(\"7.5m\", \"5m\", \"2.5m\", \"0\", \"2.5m\", \"5m\", \"7.5m\"),\r\n                     limits=c(NA,NA), name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"Grey80\", \"#7dffdd\", \"#00cc99\", \"Grey80\", \"#be7dff\", \"#6600cc\"))+\r\n  theme_classic()+\r\n  theme(axis.line.y=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccine delivery in England by age and sex\",\r\n       subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\",\r\n       caption=\"Data from PHE, population figures from NIMS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=-5000000, y=5, label=\"Men\", colour=\"#6600cc\", size=rel(6), fontface=\"bold\",\r\n           family=\"Lato\")+\r\n  annotate(\"text\", x=5000000, y=5, label=\"Women\", colour=\"#00cc99\", size=rel(6), fontface=\"bold\",\r\n           family=\"Lato\")\r\ndev.off()  \r\n\r\n#Animated versions\r\n#Read in historic data\r\n#Week 29\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1007253/Weekly_Influenza_and_COVID19_report_data_W30.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw29 <- read_excel(temp, sheet=\"Figure 62&63. COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw29) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 28\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1005058/Weekly_Influenza_and_COVID19_report_data_W29.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw28 <- read_excel(temp, sheet=\"Figure 62&63. COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw28) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 27\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1002563/Weekly_Influenza_and_COVID19_report_data_w28.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw27 <- read_excel(temp, sheet=\"Figure 61&62. COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw27) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n\r\n#Week 26\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1000375/Weekly_Influenza_and_COVID19_report_data_w27.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw26 <- read_excel(temp, sheet=\"Figure 57&58. COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw26) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 25\r\n\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/998394/Weekly_Influenza_and_COVID19_report_data_W26.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw25 <- read_excel(temp, sheet=\"Figure 57&58. COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw25) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n\r\n#Week 24\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/996366/Weekly_Influenza_and_COVID19_report_data_w25.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw24 <- read_excel(temp, sheet=\"Figure 57&58. COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw24) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 23\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/994574/Weekly_Influenza_and_COVID19_report_data_w24.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw23 <- read_excel(temp, sheet=\"Figure 57&58. COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw23) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 22\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/992616/Weekly_Influenza_and_COVID19_report_data_w23.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw22 <- read_excel(temp, sheet=\"Figure 55&56 COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw22) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n\r\n#Week 21\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/991080/Weekly_Influenza_and_COVID19_report_data_w22.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw21 <- read_excel(temp, sheet=\"Figure 55&56 COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw21) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 20\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/989842/Weekly_Influenza_and_COVID19_report_data_W21.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw20 <- read_excel(temp, sheet=\"Figure 58&59 COVID Vac Age Sex\", range=\"B13:N26\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw20) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 19\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/988026/Weekly_Influenza_and_COVID19_report_data_w20.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw19 <- read_excel(temp, sheet=\"Figure 58&59 COVID Vac Age Sex\", range=\"B13:N23\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw19) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n\r\n#Week 18\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/986164/Weekly_Influenza_and_COVID19_report_data_w19.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw18 <- read_excel(temp, sheet=\"Figure 58&59 COVID Vac Age Sex\", range=\"B13:N23\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw18) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 17\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/983708/Weekly_Influenza_and_COVID19_report_data_w18.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw17 <- read_excel(temp, sheet=\"Figure 58&59 COVID Vac Age Sex\", range=\"B13:N23\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw17) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n#Week 16\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/982284/Weekly_Influenza_and_COVID19_report_data_w17.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw16 <- read_excel(temp, sheet=\"Figure 58&59 COVID Vac Age Sex\", range=\"B13:N23\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw16) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                       \"Female_Vax2\")\r\n\r\n#Week 15\r\nurl <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/979626/Weekly_Influenza_and_COVID19_report_data_w16.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndataw15 <- read_excel(temp, sheet=\"Figure 58&59 COVID Vac Age Sex\", range=\"B13:N23\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw15) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                    \"Female_Vax2\")\r\n\r\n\r\n#Week 14\r\ndataw14 <- read_excel(temp, sheet=\"Figure 58&59 COVID Vac Age Sex\", range=\"B31:N41\", col_names=FALSE) %>% \r\n  select(`...1`, `...2`, `...3`, `...5`, `...6`, `...9`, `...12`)\r\n\r\ncolnames(dataw14) <- c(\"Age\", \"Male_Pop\", \"Male_Vax1\", \"Female_Pop\", \"Female_Vax1\", \"Male_Vax2\",\r\n                       \"Female_Vax2\")\r\n\r\n#Data for weeks prior to 21 uses different age bands. Aligning them is a project for the interested reader...\r\n\r\nmergeddata <- dataw29 %>% mutate(Week=29) %>% \r\n  bind_rows(dataw28 %>% mutate(Week=28)) %>% \r\n  bind_rows(dataw27 %>% mutate(Week=27)) %>% \r\n  bind_rows(dataw26 %>% mutate(Week=26)) %>% \r\n  bind_rows(dataw25 %>% mutate(Week=25)) %>% \r\n  bind_rows(dataw24 %>% mutate(Week=24)) %>% \r\n  bind_rows(dataw23 %>% mutate(Week=23)) %>% \r\n  bind_rows(dataw22 %>% mutate(Week=22)) %>% \r\n  bind_rows(dataw21 %>% mutate(Week=21)) %>% \r\n  rowwise() %>% \r\n  mutate(Male_Unvax=Male_Pop-Male_Vax1,\r\n         Female_Unvax=Female_Pop-Female_Vax1,\r\n         Male_Vax1Only=Male_Vax1-Male_Vax2,\r\n         Female_Vax1Only=Female_Vax1-Female_Vax2) %>% \r\n  ungroup() %>% \r\n  select(Age, Week, Male_Unvax, Female_Unvax, Male_Vax1Only, Female_Vax1Only, Male_Vax2, Female_Vax2) %>% \r\n  bind_rows(data %>% mutate(Week=30))\r\n\r\nmergeddata_long <- pivot_longer(mergeddata, cols=c(3:8), names_to=c(\"Sex\", \"Measure\"), names_sep=\"_\", \r\n                          values_to=\"Value\") %>% \r\n  mutate(Value=if_else(Sex==\"Male\", -Value, Value),\r\n         Age=case_when(\r\n           Age==\"Under 18 years\" ~ \"<18\",\r\n           Age==\"18 to 24 years\" ~ \"18-24\",\r\n           Age==\"25 to 29 years\" ~ \"25-29\",\r\n           Age==\"30 to 34 years\" ~ \"30-34\",\r\n           Age==\"35 to 39 years\" ~ \"35-39\",\r\n           Age==\"40 to 44 years\" ~ \"40-44\",\r\n           Age==\"45 to 49 years\" ~ \"45-49\",\r\n           Age==\"50 to 54 years\" ~ \"50-54\",\r\n           Age==\"55 to 59 years\" ~ \"55-59\",\r\n           Age==\"60 to 64 years\" ~ \"60-64\",\r\n           Age==\"65 to 69 years\" ~ \"65-69\",\r\n           Age==\"70 to 74 years\" ~ \"70-74\",\r\n           Age==\"75 to 79 years\" ~ \"75-79\",\r\n           TRUE ~ \"80+\"),\r\n         Age=factor(Age, levels=c(\"<18\", \"18-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\", \"45-49\",\r\n                                  \"50-54\", \"55-59\", \"60-64\",\r\n                                  \"65-69\", \"70-74\", \"75-79\", \"80+\")),\r\n         SexMeasure=paste0(Sex, Measure),\r\n         date=as.Date(\"2021-04-11\")+weeks(Week-14)) %>% \r\n  arrange(Week)\r\n\r\nanim <- ggplot(mergeddata_long, aes(x=Value, y=Age, fill=SexMeasure))+\r\n  geom_col(position=\"stack\", show.legend=FALSE)+\r\n  scale_x_continuous(breaks=c(-7500000, -5000000, -2500000, 0, 2500000, 5000000, 7500000),\r\n                     labels=c(\"7.5m\", \"5m\", \"2.5m\", \"0\", \"2.5m\", \"5m\", \"7.5m\"),\r\n                     limits=c(-7500000, 7500000), name=\"\")+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_fill_manual(values=c(\"Grey80\", \"#7dffdd\", \"#00cc99\", \"Grey80\", \"#be7dff\", \"#6600cc\"))+\r\n  theme_classic()+\r\n  theme(axis.line.y=element_blank(), text=element_text(family=\"Lato\"), \r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.subtitle=element_markdown())+\r\n  labs(caption=\"Data from PHE, population figures from NIMS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=-4000000, y=9, label=\"Men\", colour=\"#6600cc\", size=rel(6), fontface=\"bold\",\r\n           family=\"Lato\")+\r\n  annotate(\"text\", x=4000000, y=9, label=\"Women\", colour=\"#00cc99\", size=rel(6), fontface=\"bold\",\r\n           family=\"Lato\")+\r\n  transition_states(date, transition_length=2, state_length=1, wrap=FALSE)+\r\n  ggtitle(\"Vaccine delivery in England by age and sex up to {closest_state}\",\r\n          subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses<br>and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\")\r\n\r\nanimate(anim, units=\"in\", width=8, height=8*4/5, res=250, \r\n        renderer=gifski_renderer(\"Outputs/COVIDVaxPyramidAnim.gif\"), \r\n        device=\"ragg_png\", end_pause=5, duration=10, fps=8)\r\n"
  },
  {
    "path": "Heatmaps/COVIDPillars.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(paletteer)\nlibrary(ggtext)\nlibrary(RcppRoll)\nlibrary(readxl)\nlibrary(googledrive)\nlibrary(sf)\n\n#Download latest testing data from \n# https://www.gov.uk/guidance/coronavirus-covid-19-information-for-the-public\ntemp <- tempfile()\nsource <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/910857/2020-08-20_COVID-19_UK_testing_time_series.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nrawdata <- read.csv(temp)[,c(1,3,4,7,11,13)]\ncolnames(rawdata) <- c(\"Date\", \"Nation\", \"Pillar\", \"Tests\", \"Cases.old\", \"Cases.new\")\nrawdata$Date <- as.Date(rawdata$Date, format=\"%d/%m/%Y\")\n\nrawdata$Cases.new <- as.numeric(as.character(rawdata$Cases.new))\nrawdata$Tests <- as.numeric(as.character(rawdata$Tests))\n\n#Do some mangling of the data to address the change in methodology on 1st July\nrawdata <- rawdata %>% \n  filter(!Pillar %in% c(\"Pillar 3\", \"Pillar 4\") & Nation==\"UK\") %>% \n  mutate(Cases=coalesce(Cases.old, Cases.new), Cases=replace_na(Cases,0),\n         Pillar=substr(Pillar,1,8), Tests=replace_na(Tests,0)) %>% \n  group_by(Pillar, Date) %>% \n  arrange(Date) %>% \n  summarise(Cases=sum(Cases), Tests=sum(Tests)) %>% \n  mutate(Cases_roll=roll_mean(Cases, 7, align=\"right\", fill=0),\n         Tests_roll=roll_mean(Tests, 7, align=\"right\", fill=0),\n         Posrate=Cases/Tests,\n         Posrate_roll=roll_mean(Posrate, 7, align=\"right\", fill=0))\n\ntiff(\"Outputs/COVIDPillars.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(rawdata, aes(x=Date, y=Cases_roll, fill=Pillar))+\n  geom_area(show.legend=FALSE)+\n  scale_fill_paletteer_d(\"NineteenEightyR::malibu\")+\n  scale_y_continuous(\"New confirmed COVID-19 cases\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"Positive tests from both Pillars 1 and 2 seem to have flatlined\",\n       subtitle=\"Rolling 7-day average of new COVID-19 cases in the UK identified through <span style='color:#FF4E86;'>Pillar 1</span> and <span style='color:#FF9E44;'>Pillar 2</span> testing<br>(Pillar 1 data includes Welsh data on both Pillars).\",\n       caption=\"Data from DHSC & PHE | Plot by @VictimOfMaths\")\ndev.off()\n\ndata_wide <- spread(rawdata[,-c(4:8)], Pillar, Cases)\ndata_wide$Cases=data_wide$`Pillar 1`+data_wide$`Pillar 2`\ndata_wide$Cases_roll <- roll_mean(data_wide$Cases, 7, align=\"right\", fill=0)\n\n#Bar chart version\ntiff(\"Outputs/COVIDPillarsBar.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot()+\n  geom_col(data=rawdata, aes(x=Date, y=Cases, fill=Pillar), show.legend=FALSE)+\n  geom_line(data=data_wide, aes(x=Date, y=Cases_roll), colour=\"navyblue\")+\n  scale_fill_paletteer_d(\"NineteenEightyR::malibu\")+\n  scale_y_continuous(\"New confirmed COVID-19 cases\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"The decline in new COVID-19 cases has definitely stopped\",\n       subtitle=\"Rolling 7-day average of new COVID-19 cases in the UK identified through <span style='color:#FF4E86;'>Pillar 1</span> and <span style='color:#FF9E44;'>Pillar 2</span> testing<br>(Pillar 1 data includes Welsh data on both Pillars).\",\n       caption=\"Data from DHSC & PHE | Plot by @VictimOfMaths\")+\n  annotate(\"text\", x=as.Date(\"2020-05-13\"), y=4200, label=\"Rolling 7-day average of new cases\",\n           colour=\"navyblue\", hjust=0)\ndev.off()\n  \n#Plot of positivity rates\ntiff(\"Outputs/COVIDPillarsPosRate.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(subset(rawdata, Date>as.Date(\"2020-04-06\")), \n       aes(x=Date, y=Posrate_roll, colour=Pillar))+\n  geom_line(show.legend=FALSE)+\n  scale_y_continuous(name=\"Proportion of tests returning a positive result\",\n                     breaks=c(0,0.1,0.2,0.3), labels=c(\"0%\", \"10%\", \"20%\", \"30%\"))+\n  scale_colour_paletteer_d(\"NineteenEightyR::malibu\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"The proportion of COVID-19 tests returning positive remains low\",\n       subtitle=\"Rolling 7-day average test positivity rate for <span style='color:#FF4E86;'>Pillar 1</span> and <span style='color:#FF9E44;'>Pillar 2</span> testing<br>(Pillar 1 data includes Welsh data on both Pillars).\",\n       caption=\"Data from DHSC & PHE | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDPillarsPosRateRecent.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(subset(rawdata, Date>as.Date(\"2020-07-01\")), \n       aes(x=Date, y=Posrate_roll, colour=Pillar))+\n  geom_line(show.legend=FALSE)+\n  scale_y_continuous(name=\"Proportion of tests returning a positive result\",\n                     breaks=c(0,0.005,0.01,0.015), labels=c(\"0%\", \"0.5%\", \"1%\", \"1.5%\"))+\n  scale_colour_paletteer_d(\"NineteenEightyR::malibu\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"The proportion of Pillar 2 tests returning a positive has changed little in the past month\",\n       subtitle=\"Rolling 7-day average test positivity rate for <span style='color:#FF4E86;'>Pillar 1</span> and <span style='color:#FF9E44;'>Pillar 2</span> testing<br>(Pillar 1 data includes Welsh data on both Pillars).\",\n       caption=\"Data from DHSC & PHE | Plot by @VictimOfMaths\")\ndev.off()\n\n#Download from Google Drive compiled by Daniel Howdon\n#https://twitter.com/danielhowdon/status/1278062684622258177?s=20\n#New version:https://twitter.com/danielhowdon/status/1278676343631347712?s=20\ntemp <- tempfile()\n#drive_download(as_id(\"1JcyH0Z85Fi8LS_1F4l92-12biPQHY7biYO2EgwFK6CE\"), path=temp, overwrite=TRUE)\ndrive_download(as_id(\"1uh3E396yMFCTr_d6P__gyi99EshQ1BxFpjqwljXxR_M\"), path=temp, overwrite=TRUE)\ntemp <- paste0(temp, \".xlsx\")\ndata <- read_excel(temp, sheet=, range=\"A1:R151\")\n\n#Calculate pillar 2 cases as a proportion of total\ndata$pillar2propwk26 <- data$`Week 26 pillar 2 cases`/data$`Week 26 implied cases`\ndata$pillar2propwk27 <- data$`Week 27 pillar 2 cases`/data$`Week 27 implied cases`\n\n#set negative proportions to missing\ndata$pillar2propwk26 <- if_else(data$pillar2propwk26<0, -1, data$pillar2propwk26)\ndata$pillar2propwk26 <- na_if(data$pillar2propwk26, -1)\ndata$pillar2propwk27 <- if_else(data$pillar2propwk27<0, -1, data$pillar2propwk27)\ndata$pillar2propwk27 <- na_if(data$pillar2propwk27, -1)\n\n#Download LA shapefile\n#Download shapefile of LA boundaries\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/6638c31a8e9842f98a037748f72258ed_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile <- st_read(file.path(temp2, name))\n\nnames(shapefile)[names(shapefile) == \"ctyua17cd\"] <- \"UTLA code\"\n\nint1 <- filter(data, `UTLA name`==\"Bournemouth, Christchurch and Poole\")\nint1$`UTLA code` <- \"E06000028\"\nint2 <- filter(data, `UTLA name`==\"Bournemouth, Christchurch and Poole\")\nint2$`UTLA code` <- \"E06000029\"\nint3 <- filter(data, `UTLA name`==\"Bournemouth, Christchurch and Poole\")\nint3$`UTLA code` <- \"E10000009\"\n\ndata <- rbind(data, int1, int2, int3)\n\nmap.data <- full_join(shapefile, data, by=\"UTLA code\", all.y=TRUE)\nmap.data <- map.data %>% drop_na(\"population\")\n\ntiff(\"Outputs/COVIDPillars1vs2wk26.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot()+\n  geom_sf(data=map.data, aes(geometry=geometry, fill=pillar2propwk26), colour=NA)+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  scale_fill_paletteer_c(\"scico::roma\", name=\"Proportion coming\\nfrom Pillar 2\",\n                         breaks=c(0,0.25,0.5,0.75,1), \n                         labels=c(\"0%\", \"25%\", \"50%\", \"75%\", \"100%\"), \n                         na.value=\"grey60\")+\n  theme_classic()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title.position=\"plot\",\n        plot.subtitle=element_markdown())+\n  labs(title=\"New COVID cases are being identified through different routes across England\",\n       subtitle=\"Proportion of new confirmed cases estimated to have come from <span style='color:#1c3699;'>Pillar 2 </span>vs. <span style='color:#801f01;'>Pillar 1 </span>tests in week 26\",\n       caption=\"Data estimated fromn PHE figures by @danielhowdon | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDPillars1vs2wk27.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot()+\n  geom_sf(data=map.data, aes(geometry=geometry, fill=pillar2propwk27), colour=NA)+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  scale_fill_paletteer_c(\"scico::roma\", name=\"Proportion coming\\nfrom Pillar 2\",\n                         breaks=c(0,0.25,0.5,0.75,1), \n                         labels=c(\"0%\", \"25%\", \"50%\", \"75%\", \"100%\"), \n                         na.value=\"grey60\")+\n  theme_classic()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title.position=\"plot\",\n        plot.subtitle=element_markdown())+\n  labs(title=\"New COVID cases are being identified through different routes across England\",\n       subtitle=\"Proportion of new confirmed cases estimated to have come from <span style='color:#1c3699;'>Pillar 2 </span>vs. <span style='color:#801f01;'>Pillar 1 </span>tests in week27\",\n       caption=\"Data estimated fromn PHE figures by @danielhowdon | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Heatmaps/COVIDReinfections.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(lubridate)\r\nlibrary(scales)\r\nlibrary(RcppRoll)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(ggtext)\r\nlibrary(ragg)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Read in data on infections and reinfections by LTLA\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newCasesBySpecimenDate&metric=newFirstEpisodesBySpecimenDate&format=csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#Get rid of Scottish and Welsh data (not using new definition yet)\r\nrawdata <- read.csv(temp) %>% \r\n  filter(substr(areaCode,1,1) %in% c(\"E\")) %>% \r\n  mutate(date=as.Date(date))\r\n\r\n#National level plot\r\nnatdata <- rawdata %>% \r\n  mutate(country=if_else(substr(areaCode,1,1)==\"E\", \"England\", \"Northern Ireland\")) %>% \r\n  group_by(country, date) %>% \r\n  summarise(TotalCases=sum(newCasesBySpecimenDate), \r\n            NewInfections=sum(newFirstEpisodesBySpecimenDate)) %>% \r\n  ungroup() %>% \r\n  mutate(Reinfections=TotalCases-NewInfections) %>% \r\n  gather(Metric, Cases, c(3:5)) %>% \r\n  group_by(Metric) %>% \r\n  mutate(Cases_roll=roll_mean(Cases, 7, align=\"center\", fill=NA)) %>% \r\n  filter(date>as.Date(\"2020-03-01\"))\r\n\r\nagg_tiff(\"Outputs/COVIDReinfections.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(natdata %>% filter(Metric!=\"TotalCases\"), aes(x=date, y=Cases_roll, fill=Metric))+\r\n  geom_col(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases\")+\r\n  scale_fill_manual(values=c(\"#FF9E44\", \"#FF4E86\"))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"Reinfections are an Omicron phenomenon\",\r\n       subtitle=\"Rolling 7-day average number of <span style='color:#FF9E44;'>first time COVID cases</span> and <span style='color:#FF4E86;'>reinfections</span> in England\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDReinfectionsProp.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(natdata %>% filter(Metric!=\"TotalCases\"), aes(x=date, y=Cases_roll, fill=Metric))+\r\n  geom_col(show.legend=FALSE, position=\"fill\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of cases\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#FF9E44\", \"#FF4E86\"))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The proportion of cases that are reinfections has remained steady\",\r\n       subtitle=\"Rolling 7-day average proportion of cases in England that are <span style='color:#FF9E44;'>first time COVID cases</span> and <span style='color:#FF4E86;'>reinfections\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#####################\r\n#Age-stratified reinfection data\r\n#Read in data on infections and reinfections by LTLA\r\nurl1 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newCasesBySpecimenDateAgeDemographics&format=csv\"\r\nurl2 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newFirstEpisodesBySpecimenDateAgeDemographics&format=csv\"\r\ntemp1 <- tempfile()\r\ntemp2 <- tempfile()\r\ntemp1 <- curl_download(url=url1, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\ntemp2 <- curl_download(url=url2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\n#Get rid of Scottish and Welsh data (not using new definition yet)\r\nagedata <- read.csv(temp1) %>% \r\n  rename(\"TotalCases\"=\"cases\") %>% \r\n  select(-c(\"rollingSum\", \"rollingRate\")) %>% \r\n  merge(read.csv(temp2) %>% rename(\"NewInfections\"=\"cases\") %>% \r\n          select(-c(\"rollingSum\", \"rollingRate\")), all=TRUE) %>% \r\n  mutate(date=as.Date(date),\r\n         Reinfections=TotalCases-NewInfections,\r\n         age=gsub(\"_\", \"-\", age)) %>% \r\n  gather(Metric, Cases, c(6:8)) %>% \r\n  group_by(Metric) %>% \r\n  mutate(Cases_roll=roll_mean(Cases, 7, align=\"center\", fill=NA)) %>% \r\n  select(-Cases) %>% \r\n  filter(date>as.Date(\"2020-03-01\") & age!=\"00-59\" & age!=\"unassigned\" & age!=\"60+\") %>% \r\n  spread(Metric, Cases_roll) %>% \r\n  mutate(ReinfectionProp=Reinfections/TotalCases) %>% \r\n  gather(Metric, Cases_roll, c(6:9))\r\n\r\nagg_tiff(\"Outputs/COVIDReinfectionsPropxAge.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(agedata %>% filter(Metric==\"ReinfectionProp\" & date>as.Date(\"2020-06-01\")), \r\n       aes(x=date, y=Cases_roll, colour=age))+\r\n  geom_line(size=0.2)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of new cases that are reinfections\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"pals::stepped\", name=\"Age\")+\r\n  theme_custom()\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDReinfectionsPropxAgeHeatmap.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(agedata %>% filter(Metric==\"ReinfectionProp\" & date>as.Date(\"2020-06-01\") & !is.na(Cases_roll)), \r\n       aes(x=date, y=age, fill=Cases_roll, colour=Cases_roll))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_c(\"viridis::rocket\", name=\"Proportion of new cases\\nthat are reinfections\", \r\n                         labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_c(\"viridis::rocket\", name=\"Proportion of new cases\\nthat are reinfections\", \r\n                           labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"The age composition of reinfections has changed with Omicron\",\r\n       subtitle=\"Rolling 7-day average proportion of new cases that are reinfections by age\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDSGTF.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(ragg)\r\nlibrary(RcppRoll)\r\nlibrary(ggtext)\r\nlibrary(geofacet)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Bring in SGTF data from UKHSA\r\n#https://www.gov.uk/government/publications/covid-19-omicron-daily-overview\r\nsource <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1043909/sgtf_regionepicurve_2021-12-27.csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nSGTFdata <- read.csv(temp) %>% \r\n  mutate(specimen_date=as.Date(specimen_date, format=\"%d/%m/%Y\"),\r\n  #mutate(specimen_date=as.Date(specimen_date),\r\n         areaName=if_else(UKHSA_region==\"Yorkshire and Humber\", \r\n                          \"Yorkshire and The Humber\", UKHSA_region))\r\n\r\n#Add in case data from dashboard\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDate&format=csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ncasedata <- read.csv(temp) %>% \r\n  mutate(specimen_date=as.Date(date))\r\n\r\ndata <- merge(SGTFdata, casedata, all.x=T) %>% \r\n  select(specimen_date, areaName, percent, newCasesBySpecimenDate, sgtf) %>% \r\n  mutate(cases=newCasesBySpecimenDate*percent/100) %>% \r\n  group_by(areaName, sgtf) %>% \r\n  mutate(cases_roll=roll_mean(cases, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\nmaxdate=max(data$specimen_date)\r\n\r\nmygrid <- data.frame(name=c(\"North East\", \"North West\", \"Yorkshire and The Humber\",\r\n                            \"West Midlands\", \"East Midlands\", \"East of England\",\r\n                            \"South West\", \"London\", \"South East\"),\r\n                     row=c(1,1,1,2,2,2,3,3,3), col=c(3,1,2,1,2,3,1,2,3),\r\n                     code=c(1:9))\r\n\r\nagg_tiff(\"Outputs/COVIDSGTFxRegion.tiff\", units=\"in\", width=9, height=7, res=500)\r\nggplot(data)+\r\n  geom_line(aes(x=specimen_date, y=cases_roll, colour=sgtf), show.legend=FALSE)+\r\n  geom_point(aes(x=specimen_date, y=cases, colour=sgtf), shape=21, show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases\")+\r\n  scale_colour_manual(values=c(\"#3D98D3\", \"#FD0409\"))+\r\n  facet_geo(~areaName, grid=mygrid)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(),\r\n        strip.text=element_blank())+\r\n  labs(title=\"Omicron cases *may* be falling in London, but they are rising elsewhere\",\r\n       subtitle=paste0(\"Estimated total number of <span style='color:#FD0409;'>Omicron</span> and <span style='color:#3D98D3;'>Delta</span> cases based on SGTF data and total positve tests.<br> Dots represent daily figures, lines the 7-day centered rolling average. Data up to \", maxdate),\r\n       caption=\"Data from UKHSA & coronavirus.data.gov.uk| Plot by @VictimOfMaths\")+\r\n  geom_text(aes(x=as.Date(\"2021-11-20\"), y=13000, label=areaName), family=\"Lato\", fontface=\"bold\",\r\n            size=rel(4))\r\n\r\ndev.off()\r\n\r\n#rates instead of cases. Populations from ONS 2020 mid-year estimates. \r\n#Hard coded because I AM A MONSTER AND I DON'T CARE\r\nagg_tiff(\"Outputs/COVIDSGTFxRegionRates.tiff\", units=\"in\", width=9, height=7, res=500)\r\ndata %>% mutate(pop=case_when(\r\n  areaName==\"North East\" ~ 2680763,\r\n  areaName==\"North West\" ~ 7367456,\r\n  areaName==\"Yorkshire and The Humber\" ~ 5526350,\r\n  areaName==\"East Midlands\" ~ 4865583,\r\n  areaName==\"West Midlands\" ~ 5961929,\r\n  areaName==\"East of England\" ~ 6269161,\r\n  areaName==\"London\" ~ 9002488,\r\n  areaName==\"South East\" ~ 9217265,\r\n  areaName==\"South West\" ~ 5659143),\r\n  caserate=cases*100000/pop,\r\n  caserate_roll=cases_roll*100000/pop) %>% \r\n  ggplot()+\r\n  geom_line(aes(x=specimen_date, y=caserate_roll, colour=sgtf), show.legend=FALSE)+\r\n  geom_point(aes(x=specimen_date, y=caserate, colour=sgtf), shape=21, show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily cases per 100,000\")+\r\n  scale_colour_manual(values=c(\"#3D98D3\", \"#FD0409\"))+\r\n  facet_geo(~areaName, grid=mygrid)+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(),\r\n        strip.text=element_blank())+\r\n  labs(title=\"Omicron has seen off Delta\",\r\n       subtitle=paste0(\"Estimated total number of <span style='color:#FD0409;'>Omicron</span> and <span style='color:#3D98D3;'>Delta</span> cases based on SGTF data and total positve tests.<br> Dots represent daily figures, lines the 7-day centered rolling average. Data up to \", maxdate),\r\n       caption=\"Data from UKHSA & coronavirus.data.gov.uk| Plot by @VictimOfMaths\")+\r\n  geom_text(aes(x=as.Date(\"2021-11-20\"), y=200, label=areaName), family=\"Lato\", fontface=\"bold\",\r\n            size=rel(4))\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDSpiral.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(RcppRoll)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(lubridate)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Function borrowed from stackoverflow answer from truenbrand to draw annotations on a polar plot\r\n#https://stackoverflow.com/questions/66196451/draw-straight-line-between-any-two-point-when-using-coord-polar-in-ggplot2-r/66196752#66196752\r\ngeom_segment_straight <- function(...) {\r\n  layer <- geom_segment(...)\r\n  new_layer <- ggproto(NULL, layer)\r\n  old_geom <- new_layer$geom\r\n  geom <- ggproto(\r\n    NULL, old_geom,\r\n    draw_panel = function(data, panel_params, coord, \r\n                          arrow = NULL, arrow.fill = NULL,\r\n                          lineend = \"butt\", linejoin = \"round\",\r\n                          na.rm = FALSE) {\r\n      data <- ggplot2:::remove_missing(\r\n        data, na.rm = na.rm, c(\"x\", \"y\", \"xend\", \"yend\", \r\n                               \"linetype\", \"size\", \"shape\")\r\n      )\r\n      if (ggplot2:::empty(data)) {\r\n        return(zeroGrob())\r\n      }\r\n      coords <- coord$transform(data, panel_params)\r\n      # xend and yend need to be transformed separately, as coord doesn't understand\r\n      ends <- transform(data, x = xend, y = yend)\r\n      ends <- coord$transform(ends, panel_params)\r\n      \r\n      arrow.fill <- if (!is.null(arrow.fill)) arrow.fill else coords$colour\r\n      return(grid::segmentsGrob(\r\n        coords$x, coords$y, ends$x, ends$y,\r\n        default.units = \"native\", gp = grid::gpar(\r\n          col = alpha(coords$colour, coords$alpha),\r\n          fill = alpha(arrow.fill, coords$alpha),\r\n          lwd = coords$size * .pt,\r\n          lty = coords$linetype,\r\n          lineend = lineend,\r\n          linejoin = linejoin\r\n        ),\r\n        arrow = arrow\r\n      ))\r\n      \r\n    }\r\n  )\r\n  new_layer$geom <- geom\r\n  return(new_layer)\r\n}\r\n\r\n#Read in case data from dashboard\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newCasesBySpecimenDate&format=csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read.csv(temp) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  rename(\"cases\"=\"newCasesBySpecimenDate\")\r\n\r\n#Set value for increment size (basically controls the tightness of the spiral, bigger numbers =>\r\n#a looser spiral)\r\nspiralincrement <- 220\r\n\r\ndata <- data %>% \r\n  group_by(date) %>% \r\n  summarise(cases=sum(cases)) %>% \r\n  mutate(areaName=\"UK\") %>% \r\n  ungroup() %>% \r\n  #Comment out this next row if you wanted data for UK nations, not whole country\r\n  #bind_rows(data) %>% \r\n  #2020 being a leap year messes things up, so remove 31st December 2020 (arbitrarily) \r\n  #to make all the years the same length\r\n  #Also cut off the last few days of data as they are incomplete\r\n  filter(date!=as.Date(\"2020-12-31\") & date<max(date)-days(3)) %>% \r\n  group_by(areaName) %>% \r\n  mutate(cases_roll=roll_mean(cases, 7, align=\"center\", fill=NA),\r\n         #Create variable to represent the base of each bar - change the number to tighten/relax the spiral\r\n         increment=spiralincrement*c(1:n()),\r\n         #Add cases to the base to get the top of each bar\r\n         incrementcases=increment+cases_roll,\r\n         year=year(date)) %>% \r\n  ungroup() %>% \r\n  #Calculate the number of days since the start of the year\r\n  group_by(year) %>% \r\n  mutate(yeardays=as.numeric(difftime(date ,as.Date(paste0(year, \"-01-01\")) , units = c(\"days\")))) %>% \r\n  ungroup()\r\n\r\n#Pull out a couple of parameters to control the positioning of the segments\r\nseg2021 <- data$increment[data$year==2020 & data$yeardays==364]-spiralincrement*0.5\r\nseg2122 <- data$increment[data$year==2021 & data$yeardays==364]-spiralincrement*0.5\r\narrowmin <- max(data$increment[data$year==2022 & !is.na(data$cases_roll)])+spiralincrement*4\r\narrowxpos <- max(data$yeardays[data$year==2022 & !is.na(data$cases_roll)])+4\r\n\r\nagg_tiff(\"Outputs/COVIDCasesSpiral.tiff\", units=\"in\", width=8, height=8, res=800)\r\nggplot()+\r\n  #Need to plot each year separately, to 'trick' coord_polar to make a spiral, not a single\r\n  #loop\r\n  geom_rect(data=data %>% filter(year==2020 & ! is.na(cases_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases, \r\n                fill=cases_roll), show.legend=FALSE)+\r\n  geom_rect(data=data %>% filter(year==2021 & ! is.na(cases_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases, \r\n                fill=cases_roll), show.legend=FALSE)+\r\n  geom_rect(data=data %>% filter(year==2022 & ! is.na(cases_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases, \r\n                fill=cases_roll), show.legend=FALSE)+\r\n  geom_line(data=data %>% filter(year==2020 & ! is.na(cases_roll)),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  geom_line(data=data %>% filter(year==2021),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  geom_line(data=data %>% filter(year==2022 & yeardays<arrowxpos-3),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  #Add a couple of tiny segments to patch the holes in the baseline at the end of each year\r\n  geom_segment_straight(aes(x=363.5, xend=0.5, y=seg2021, yend=seg2021+2*spiralincrement), \r\n                        colour=\"black\")+\r\n  geom_segment_straight(aes(x=363.5, xend=0.5, y=seg2122, yend=seg2122+2*spiralincrement), \r\n                        colour=\"black\")+\r\n  scale_x_continuous(breaks=c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334),\r\n                     labels=c(\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                              \"Oct\", \"Nov\", \"Dec\"))+\r\n  scale_colour_paletteer_c(\"viridis::rocket\", direction=-1)+\r\n  scale_fill_paletteer_c(\"viridis::rocket\", direction=-1)+\r\n  coord_polar()+\r\n  theme_void()+\r\n  theme(panel.grid.major.x=element_line(colour=\"Grey90\"),\r\n        axis.text.x=element_text(colour=\"Grey60\"),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position = \"plot\", plot.caption.position = \"plot\")+\r\n  #Add low key legend for a bit of context\r\n  geom_segment(aes(y=arrowmin, yend=arrowmin+200000, x=arrowxpos, xend=arrowxpos), colour=\"Grey30\",\r\n               arrow = arrow(length=unit(0.20,\"cm\"), ends=\"both\", type = \"closed\"))+\r\n  #Will need to manually tweak the placement of this annotation\r\n  annotate(\"text\", x=arrowxpos+3, y=250000, label=\"200,000\\ncases\\nper\\nday\", hjust=0, colour=\"Grey30\",\r\n           size=rel(2.5), family=\"Lato\")+\r\n  labs(title=\"The eternal spiral of COVID\",\r\n       subtitle=\"COVID case numbers in the UK since the start of the pandemic\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Inspiration from the NYT | Plot by @VictimOfMaths\")\r\n\r\n  \r\ndev.off()\r\n\r\n#Repeat with hospital admissions. Because why not\r\n\r\n#Read in data from dashboard\r\nsource2 <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=overview&metric=newAdmissions&format=csv\"\r\n\r\ntemp2 <- tempfile()\r\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\nspiralincrement2 <- 20\r\n\r\ndata2 <- read.csv(temp2) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  arrange(date) %>% \r\n  filter(date!=as.Date(\"2020-12-31\")) %>% \r\n  mutate(adm_roll=roll_mean(newAdmissions, 5, align=\"center\", fill=NA),\r\n         #Create variable to represent the base of each bar - change the number to tighten/relax the spiral\r\n         increment=spiralincrement2*c(1:n()),\r\n         #Add cases to the base to get the top of each bar\r\n         incrementadm=increment+adm_roll,\r\n         year=year(date)) %>% \r\n  #Calculate the number of days since the start of the year\r\n  group_by(year) %>% \r\n  mutate(yeardays=as.numeric(difftime(date ,as.Date(paste0(year, \"-01-01\")) , units = c(\"days\")))) %>% \r\n  ungroup()\r\n\r\nseg20212 <- data2$increment[data2$year==2020 & data2$yeardays==364]-spiralincrement2*0.5\r\nseg21222 <- data2$increment[data2$year==2021 & data2$yeardays==364]-spiralincrement2*0.5\r\narrowmin2 <- max(data2$increment[data2$year==2022 & !is.na(data2$adm_roll)])+spiralincrement2*4\r\narrowxpos2 <- max(data2$yeardays[data2$year==2022 & !is.na(data2$adm_roll)])+4\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsSpiral.tiff\", units=\"in\", width=8, height=8, res=800)\r\nggplot()+\r\n  #Need to plot each year separately\r\n  geom_rect(data=data2 %>% filter(year==2020 & ! is.na(adm_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementadm, \r\n                fill=adm_roll), show.legend=FALSE)+\r\n  geom_rect(data=data2 %>% filter(year==2021 & ! is.na(adm_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementadm, \r\n                fill=adm_roll), show.legend=FALSE)+\r\n  geom_rect(data=data2 %>% filter(year==2022 & ! is.na(adm_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementadm, \r\n                fill=adm_roll), show.legend=FALSE)+\r\n  #negative offset is to cover up the base of the bars\r\n  geom_line(data=data2 %>% filter(year==\"2020\" & ! is.na(adm_roll)),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  geom_line(data=data2 %>% filter(year==\"2021\"),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  geom_line(data=data2 %>% filter(year==\"2022\" & yeardays<arrowxpos2-2),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  #Add a couple of tiny segments to patch the holes in the baseline at the end of each year\r\n  geom_segment_straight(aes(x=363.5, xend=0.5, y=seg20212, yend=seg20212+2*spiralincrement2), \r\n                        colour=\"black\")+\r\n  geom_segment_straight(aes(x=363.5, xend=0.5, y=seg21222, yend=seg21222+2*spiralincrement2), \r\n                        colour=\"black\")+\r\n  scale_x_continuous(breaks=c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334),\r\n                     labels=c(\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                              \"Oct\", \"Nov\", \"Dec\"))+\r\n  scale_colour_paletteer_c(\"viridis::mako\", direction=-1)+\r\n  scale_fill_paletteer_c(\"viridis::mako\", direction=-1)+\r\n  coord_polar()+\r\n  theme_void()+\r\n  theme(panel.grid.major.x=element_line(colour=\"Grey90\"),\r\n        axis.text.x=element_text(colour=\"Grey60\"),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position = \"plot\", plot.caption.position = \"plot\")+\r\n  #Add low key legend for a bit of context\r\n  #Add low key legend for a bit of context\r\n  geom_segment(aes(y=arrowmin2, yend=arrowmin2+2500, x=arrowxpos2, xend=arrowxpos2), colour=\"Grey30\",\r\n               arrow = arrow(length=unit(0.15,\"cm\"), ends=\"both\", type = \"closed\"))+\r\n  #Will need to manually tweak the placement of this annotation\r\n  annotate(\"text\", x=arrowxpos2+3, y=14500, label=\"2,500\\nadmissions\\nper day\", hjust=0, colour=\"Grey30\",\r\n           size=rel(2.5), family=\"Lato\")+\r\n  labs(title=\"The eternal spiral of COVID\",\r\n       subtitle=\"Daily new COVID admissions in the UK since the start of the pandemic\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Inspiration from the NYT | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#And a sensible version\r\nagg_tiff(\"Outputs/COVIDAdmissionsPolar.tiff\", units=\"in\", width=8, height=8, res=800)\r\nggplot(data2, aes(x=yeardays, y=adm_roll, colour=as.factor(year)))+\r\n  geom_line()+\r\n  scale_x_continuous(breaks=c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334),\r\n                     labels=c(\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                              \"Oct\", \"Nov\", \"Dec\"))+\r\n  coord_polar()+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\", name=\"\")+\r\n  theme_void()+\r\n  theme(panel.grid.major.x=element_line(colour=\"Grey90\"),\r\n        axis.text.x=element_text(colour=\"Grey60\"),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position = \"plot\", plot.caption.position = \"plot\")+\r\n  labs(title=\"Seasonal (?) patterns in COVID hosptial admissions\",\r\n       subtitle=\"Rolling 7-day average of new COVID hospital admissions in England\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n\r\nagg_tiff(\"Outputs/COVIDAdmissionsLinear.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(data2, aes(x=yeardays, y=adm_roll, colour=as.factor(year)))+\r\n  geom_line()+\r\n  scale_x_continuous(breaks=c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334),\r\n                     labels=c(\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                              \"Oct\", \"Nov\", \"Dec\"), name=\"\")+\r\n  scale_y_continuous(name=\"Daily new hospital admissions\")+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"Seasonal (?) patterns in COVID hospital admissions\",\r\n       subtitle=\"Rolling 7-day average of new COVID hospital admissions in England\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDSpiralEurope.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(RcppRoll)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(lubridate)\r\nlibrary(geofacet)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Function borrowed from stackoverflow answer from truenbrand to draw annotations on a polar plot\r\n#https://stackoverflow.com/questions/66196451/draw-straight-line-between-any-two-point-when-using-coord-polar-in-ggplot2-r/66196752#66196752\r\ngeom_segment_straight <- function(...) {\r\n  layer <- geom_segment(...)\r\n  new_layer <- ggproto(NULL, layer)\r\n  old_geom <- new_layer$geom\r\n  geom <- ggproto(\r\n    NULL, old_geom,\r\n    draw_panel = function(data, panel_params, coord, \r\n                          arrow = NULL, arrow.fill = NULL,\r\n                          lineend = \"butt\", linejoin = \"round\",\r\n                          na.rm = FALSE) {\r\n      data <- ggplot2:::remove_missing(\r\n        data, na.rm = na.rm, c(\"x\", \"y\", \"xend\", \"yend\", \r\n                               \"linetype\", \"size\", \"shape\")\r\n      )\r\n      if (ggplot2:::empty(data)) {\r\n        return(zeroGrob())\r\n      }\r\n      coords <- coord$transform(data, panel_params)\r\n      # xend and yend need to be transformed separately, as coord doesn't understand\r\n      ends <- transform(data, x = xend, y = yend)\r\n      ends <- coord$transform(ends, panel_params)\r\n      \r\n      arrow.fill <- if (!is.null(arrow.fill)) arrow.fill else coords$colour\r\n      return(grid::segmentsGrob(\r\n        coords$x, coords$y, ends$x, ends$y,\r\n        default.units = \"native\", gp = grid::gpar(\r\n          col = alpha(coords$colour, coords$alpha),\r\n          fill = alpha(arrow.fill, coords$alpha),\r\n          lwd = coords$size * .pt,\r\n          lty = coords$linetype,\r\n          lineend = lineend,\r\n          linejoin = linejoin\r\n        ),\r\n        arrow = arrow\r\n      ))\r\n      \r\n    }\r\n  )\r\n  new_layer$geom <- geom\r\n  return(new_layer)\r\n}\r\n\r\n#Read in hospital data from Our World In Data\r\nsource <- \"https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/hospitalizations/covid-hospitalizations.csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read.csv(temp) %>% \r\n  mutate(date=as.Date(date)) %>%\r\n  filter(indicator %in% c(\"Daily ICU occupancy per million\", \r\n                          \"Daily hospital occupancy per million\", \r\n                          \"Weekly new hospital admissions per million\",\r\n                          \"Weekly new ICU admissions per million\")) %>% \r\n  filter(iso_code %in% c(\"AUT\", \"BEL\", \"BGR\", \"HRV\", \"CYP\", \"CZE\", \"DNK\", \"EST\", \"FIN\", \"FRA\",\r\n                         \"DEU\", \"GRC\", \"HUN\", \"ISL\", \"IRL\", \"ITA\", \"LIE\", \"LTU\", \"LUX\", \"MLT\",\r\n                         \"NLD\", \"NOR\", \"POL\", \"PRT\", \"ROU\", \"SRB\", \"SVK\", \"SVN\", \"ESP\", \"SWE\",\r\n                         \"CHE\", \"GBR\"))\r\n\r\n#Set value for increment size (basically controls the tightness of the spiral, bigger numbers =>\r\n#a looser spiral)\r\nspiralincrement <- 5\r\n\r\ndailydata <- data %>% \r\n  filter(indicator %in% c(\"Daily ICU occupancy per million\", \r\n                          \"Daily hospital occupancy per million\")) %>% \r\n  #2020 being a leap year messes things up, so remove 31st December 2020 (arbitrarily) \r\n  #to make all the years the same length\r\n  filter(date!=as.Date(\"2020-12-31\")) %>% \r\n  group_by(iso_code, entity, indicator) %>%\r\n  arrange(date) %>% \r\n  mutate(value_roll=roll_mean(value, 7, align=\"center\", fill=NA),\r\n         #Create variable to represent the base of each bar - change the number to tighten/relax the spiral\r\n         increment=spiralincrement*c(1:n()),\r\n         #Add cases to the base to get the top of each bar\r\n         incrementcases=increment+value_roll,\r\n         year=year(date)) %>% \r\n  ungroup() %>% \r\n  #Calculate the number of days since the start of the year\r\n  group_by(year) %>% \r\n  mutate(yeardays=as.numeric(difftime(date ,as.Date(paste0(year, \"-01-01\")) , units = c(\"days\")))) %>% \r\n  ungroup()\r\n\r\n#Occupancy plot\r\noccdata <- dailydata %>% filter(indicator==\"Daily hospital occupancy per million\")\r\n\r\n#Pull out a couple of parameters to control the positioning of the segments\r\nparams <- data.frame(entity=unique(occdata$entity)) %>% \r\n  merge(occdata)\r\nseg2021 <- occdata$increment[occdata$year==2020 & occdata$yeardays==364]-spiralincrement*0.5\r\nseg2122 <- occdata$increment[occdata$year==2021 & occdata$yeardays==364]-spiralincrement*0.5\r\narrowmin <- max(occdata$increment[occdata$year==2022 & !is.na(occdata$value_roll)])+spiralincrement*4\r\narrowxpos <- max(occdata$yeardays[occdata$year==2022 & !is.na(occdata$value_roll)])+4\r\n\r\noccparams <- occdata %>% group_by(entity, iso_code) %>% \r\n  summarise(seg2021=increment[year==2020 & yeardays==max(yeardays[year==2020])]-spiralincrement*0.5,\r\n            seg2122=increment[year==2021 & yeardays==max(yeardays[year==2021])]-spiralincrement*0.5,\r\n            arrowmin=max(increment[year==2022 & !is.na(value_roll)])+spiralincrement*4,\r\n            arrowxpos=max(yeardays[year==2022 & !is.na(value_roll)]))\r\n\r\nagg_tiff(\"Outputs/COVIDSpiralEuropeICU.tiff\", units=\"in\", width=14, height=14, res=500)\r\nggplot(occdata)+\r\n  #Need to plot each year separately, to 'trick' coord_polar to make a spiral, not a single\r\n  #loop\r\n  geom_rect(data=occdata %>% filter(year==2020 & ! is.na(value_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases, \r\n                fill=value_roll), show.legend=FALSE)+\r\n  geom_rect(data=occdata %>% filter(year==2021 & ! is.na(value_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases, \r\n                fill=value_roll), show.legend=FALSE)+\r\n  geom_rect(data=occdata %>% filter(year==2022 & ! is.na(value_roll)),\r\n            aes(xmin=yeardays, xmax=yeardays+1, ymin=increment, ymax=incrementcases, \r\n                fill=value_roll), show.legend=FALSE)+\r\n  geom_line(data=occdata %>% filter(year==2020 & ! is.na(value_roll)),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  geom_line(data=occdata %>% filter(year==2021),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  geom_line(data=occdata %>% filter(year==2022),\r\n            aes(x=yeardays, y=increment), colour=\"black\")+\r\n  #Add a couple of tiny segments to patch the holes in the baseline at the end of each year\r\n  geom_segment_straight(data=occparams, aes(x=363.5, xend=0.5, y=seg2021, yend=seg2021+2*spiralincrement), \r\n                        colour=\"black\")+\r\n  geom_segment_straight(data=occparams, aes(x=363.5, xend=0.5, y=seg2122, yend=seg2122+2*spiralincrement), \r\n                        colour=\"black\")+\r\n  scale_x_continuous(breaks=c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334),\r\n                     labels=c(\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\",\r\n                              \"Oct\", \"Nov\", \"Dec\"))+\r\n  scale_y_continuous(limits=c(0,5000))+\r\n  scale_colour_paletteer_c(\"viridis::rocket\", direction=-1)+\r\n  scale_fill_paletteer_c(\"viridis::rocket\", direction=-1)+\r\n  #facet_wrap(~entity)+\r\n  facet_geo(~iso_code, grid=\"europe_countries_grid2\", label=\"name\")+\r\n  coord_polar()+\r\n  theme_void()+\r\n  theme(panel.grid.major.x=element_line(colour=\"Grey90\"),\r\n        axis.text.x=element_text(colour=\"Grey60\"),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        plot.title.position = \"plot\", plot.caption.position = \"plot\")+\r\n  #Add low key legend for a bit of context\r\n  #geom_segment(aes(y=arrowmin, yend=arrowmin+200000, x=arrowxpos, xend=arrowxpos), colour=\"Grey30\",\r\n  #             arrow = arrow(length=unit(0.20,\"cm\"), ends=\"both\", type = \"closed\"))+\r\n  #Will need to manually tweak the placement of this annotation\r\n  #annotate(\"text\", x=arrowxpos+3, y=250000, label=\"200,000\\ncases\\nper\\nday\", hjust=0, colour=\"Grey30\",\r\n  #         size=rel(2.5), family=\"Lato\")+\r\n  labs(title=\"The eternal spiral of COVID\",\r\n       subtitle=\"COVID hospital occupancy across Europe\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Inspiration from the NYT | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDTestingData.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(paletteer)\r\nlibrary(ukcovid19)\r\nlibrary(RcppRoll)\r\nlibrary(scales)\r\n\r\n#Call data from PHE API\r\nAPIdata <- get_data(filters=\"areaType=nation\", \r\n                    structure=list(date=\"date\",\r\n                                   name=\"areaName\",\r\n                                   cases=\"newCasesByPublishDate\",\r\n                                   tests=\"newTestsByPublishDate\",\r\n                                   positivity=\"uniqueCasePositivityBySpecimenDateRollingSum\"))\r\n\r\ndata <- APIdata %>% \r\n  group_by(name) %>% \r\n  mutate(date=as.Date(date),\r\n         #Calculate rolling averages\r\n         tests_avg=roll_mean(tests, 7, align=\"center\", fill=NA),\r\n         cases_avg=roll_mean(cases, 7, align=\"center\", fill=NA),\r\n         #Calculate positivity rate\r\n         posrate_avg=cases_avg/tests_avg,\r\n         #Bring in population\r\n         pop=case_when(\r\n           name==\"England\" ~ 56286961,\r\n           name==\"Scotland\" ~ 5463300,\r\n           name==\"Wales\" ~ 3152879,\r\n           name==\"Northern Ireland\" ~ 1893667\r\n         ),\r\n         testrate_avg=tests_avg*100000/pop,\r\n         ) %>% \r\n  ungroup()\r\n\r\nplotto <- data %>% \r\n  filter(!is.na(tests_avg)) %>% \r\n  mutate(temp=max(date, na.rm=TRUE)) %>% \r\n  filter(date==temp & name==\"England\") %>% \r\n  select(date)\r\n\r\n#Plot case rates by country by specimen date\r\nggplot(data)+\r\n  geom_line(aes(x=date, y=testrate_avg, colour=name))+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2020-08-01\"), NA))+\r\n  scale_y_continuous(name=\"Daily tests published per 100,000 population\")+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"Testing rates have risen in England since Christmas\",\r\n       subtitle=\"Rolling 7-day average of new COVID-19 tests by publication date\",\r\n       caption=\"Date from coronavirus.gov.uk | Plot by @VictimOfMaths\")\r\n\r\n#Plot test rates by country\r\ntiff(\"Outputs/COVIDTestRatesUK.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(data)+\r\n  geom_line(aes(x=date, y=testrate_avg, colour=name))+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2020-11-01\"), NA))+\r\n  scale_y_continuous(name=\"Daily tests published per 100,000 population\")+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"Testing rates have risen in England since Christmas\",\r\n       subtitle=\"Rolling 7-day average of new COVID-19 tests by publication date\",\r\n       caption=\"Date from coronavirus.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Plot positivity rates by country\r\ntiff(\"Outputs/COVIDPosRatesUK.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(data)+\r\n  geom_line(aes(x=date, y=posrate_avg, colour=name))+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2020-11-01\"), NA))+\r\n  scale_y_continuous(name=\"Proportion of tests returned as positive\", labels=percent_format(accuracy = 1))+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  labs(title=\"Test positivity rates are falling in all four UK nations\",\r\n       subtitle=\"Rolling 7-day average proportion of tests which are returned positive by publication date\",\r\n       caption=\"Date from coronavirus.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Regional data\r\nAPIdata2 <- get_data(filters=\"areaType=region\", \r\n                    structure=list(date=\"date\",\r\n                                   name=\"areaName\",\r\n                                   cases=\"newCasesBySpecimenDate\",\r\n                                   positivity=\"uniqueCasePositivityBySpecimenDateRollingSum\",\r\n                                   people=\"uniquePeopleTestedBySpecimenDateRollingSum\")) %>% \r\n            group_by(name) %>% \r\n              mutate(date=as.Date(date),\r\n                     cases_avg=roll_mean(cases, 7, align=\"center\", fill=NA),\r\n                     pop=case_when(\r\n                       name==\"East of England\" ~ 6236072,\r\n                       name==\"London\" ~ 8961989,\r\n                       name==\"West Midlands\" ~ 5934037,\r\n                       name==\"East Midlands\" ~ 4835928,\r\n                       name==\"North East\" ~ 2669941,\r\n                       name==\"Yorkshire and The Humber\" ~ 5502967,\r\n                       name==\"North West\" ~ 7341196,\r\n                       name==\"South East\" ~ 9180135,\r\n                       name==\"South West\" ~ 5624696),\r\n                     peoplerate=people*100000/pop,\r\n                     caserate=cases_avg*100000/pop)\r\n\r\ntiff(\"Outputs/COVIDRegTestCounts.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(subset(APIdata2, date>as.Date(\"2020-11-01\")))+\r\n  geom_line(aes(x=date, y=peoplerate, colour=name))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Number of unique people tested per 100,000\", limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  labs(title=\"The number of people being tested for COVID-19 is falling across England\",\r\n       subtitle=\"Rolling 7-day rate of the number of individuals being tested per 100,000 population\",\r\n       caption=\"Data from coronavirus.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDRegPosRates.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(subset(APIdata2, date>as.Date(\"2020-11-01\")))+\r\n  geom_line(aes(x=date, y=positivity/100, colour=name))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Positivity rate\", labels=scales::label_percent(accuracy=1), limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  labs(title=\"Test positivity is falling across England again\",\r\n       subtitle=\"Rolling 7-day average proportion of COVID-19 tests returned as positive by specimen date\",\r\n       caption=\"Data from coronavirus.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDRegTestsxCases.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(subset(APIdata2, date>as.Date(\"2020-11-01\")))+\r\n  geom_path(aes(x=peoplerate, y=caserate, colour=name, alpha=date))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)))+\r\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  scale_alpha_date(guide=\"none\")+\r\n  scale_x_continuous(name=\"Number of unique people tested per 100,000\")+\r\n  scale_y_continuous(name=\"Number of positive test results per 100,000\")+\r\n  labs(title=\"COVID-19 testing seems to have changed dramatically during the holidays\",\r\n       subtitle=\"Rolling 7-day average rates of individuals being tested and positive results being returned\",\r\n       caption=\"Data from coronavirus.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDTotalDeathsPyramid.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\n\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Download 2020 COVID deaths data by age\r\ntemp <- tempfile()\r\nurl2020 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek532020.xlsx\"\r\ntemp <- curl_download(url=url2020, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata20m <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B34:BC53\", \r\n                     col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2020, Sex=\"Male\")\r\n\r\ndata20f <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B56:BC75\", \r\n                      col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2020, Sex=\"Female\")\r\n\r\n#2021\r\nurl2021 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx\"\r\ntemp <- curl_download(url=url2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata21m <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B34:BB53\", \r\n                      col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2021, Sex=\"Male\")\r\n\r\ndata21f <- read_excel(temp, sheet=\"Covid-19 - Weekly registrations\", range=\"B56:BB75\", \r\n                       col_names=FALSE) %>% \r\n  gather(Week, Deaths, c(2:ncol(.))) %>% \r\n  set_names(\"Age\", \"Week\", \"Deaths\") %>% \r\n  mutate(Week=as.numeric(substr(Week, 4,5))-1,\r\n         Year=2021, Sex=\"Female\")\r\n\r\n#2022 (in a different format, thanks for that ONS)\r\nurl2022 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2022/publicationfileweek182022.xlsx\"\r\ntemp <- curl_download(url=url2022, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata22m <- read_excel(temp, sheet=\"4\", range=\"A28:W46\") %>% \r\n  select(-c(2,3)) %>% \r\n  gather(Age, Deaths, c(2:ncol(.))) %>% \r\n  set_names(c(\"Week\", \"Age\", \"Deaths\")) %>% \r\n  mutate(Year=2022, Sex=\"Male\")\r\n\r\ndata22f <- read_excel(temp, sheet=\"4\", range=\"A49:W67\") %>% \r\n  select(-c(2,3)) %>% \r\n  gather(Age, Deaths, c(2:ncol(.))) %>% \r\n  set_names(c(\"Week\", \"Age\", \"Deaths\")) %>% \r\n  mutate(Year=2022, Sex=\"Female\")\r\n\r\ndata <- bind_rows(data20f, data20m, data21f, data21m, data22f, data22m) %>% \r\n  mutate(Age=case_when(\r\n    Age==\"01-04\" ~ \"1-4\",\r\n    Age==\"05-09\" ~ \"5-9\",\r\n    TRUE ~Age)) %>% \r\n  group_by(Age, Sex) %>% \r\n  summarise(Deaths=sum(Deaths)) %>% \r\n  ungroup() %>% \r\n  mutate(plotdeaths=if_else(Sex==\"Male\", -Deaths, Deaths),\r\n         Age=factor(Age, levels=c(\"<1\", \"1-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\",\r\n                                  \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\",\r\n                                  \"65-69\", \"70-74\", \"75-79\", \"80-84\", \"85-89\", \"90+\")))\r\n\r\nagg_png(\"Outputs/COVIDTotalDeathsxAgexSex.png\", units=\"in\", width=8, height=8, res=800)\r\nggplot(data, aes(x=plotdeaths, y=Age, fill=Sex))+\r\n  geom_col()+\r\n  geom_vline(xintercept=0, colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Total COVID deaths\", limits=c(-25000, 25000),\r\n                     breaks=c(-20000, -10000, 0, 10000, 20000),\r\n                     labels=c(\"20,000\", \"10,000\", \"0\", \"10,000\", \"20,000\"))+\r\n  scale_fill_manual(values=c(\"#00cc99\", \"#6600cc\"), name=\"\", guide = guide_legend(reverse = TRUE))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"Total COVID-19 deaths by age and sex\",\r\n       subtitle=\"Deaths in England & Wales registered up to 6th May 2022 where COVID-19 was mentioned on the death certificate\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\ndata2 <- bind_rows(data20f, data20m, data21f, data21m, data22f, data22m) %>% \r\n  mutate(Age=case_when(\r\n    Age==\"01-04\" ~ \"1-4\",\r\n    Age==\"05-09\" ~ \"5-9\",\r\n    TRUE ~Age)) %>% \r\n  group_by(Age, Sex, Year) %>% \r\n  summarise(Deaths=sum(Deaths)) %>% \r\n  ungroup() %>% \r\n  mutate(plotdeaths=if_else(Sex==\"Male\", -Deaths, Deaths),\r\n         Age=factor(Age, levels=c(\"<1\", \"1-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\",\r\n                                  \"30-34\", \"35-39\", \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\",\r\n                                  \"65-69\", \"70-74\", \"75-79\", \"80-84\", \"85-89\", \"90+\")))\r\n\r\nagg_png(\"Outputs/COVIDTotalDeathsxAgexSexxYear.png\", units=\"in\", width=8, height=8, res=800)\r\nggplot(data2, aes(x=plotdeaths, y=Age, fill=as.factor(Year)))+\r\n  geom_col(position=\"dodge\")+\r\n  geom_vline(xintercept=0, colour=\"Grey40\")+\r\n  scale_x_continuous(name=\"Total COVID deaths\", limits=c(-11000, 11000),\r\n                     breaks=c(-10000, -5000, 0, 5000, 10000),\r\n                     labels=c(\"10,000\", \"5,000\", \"0\", \"5,000\", \"10,000\"))+\r\n  scale_fill_paletteer_d(\"calecopal::superbloom3\", name=\"\")+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"COVID-19 deaths by age, sex and year\",\r\n       subtitle=\"Deaths in England & Wales registered up to 6th May 2022 where COVID-19 was mentioned on the death certificate\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDUKUSADeathsxAge.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(lubridate)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\nlibrary(readxl)\r\nlibrary(scales)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"),\r\n          plot.subtitle=element_text(colour=\"Grey40\", hjust=0, vjust=1),\r\n          plot.caption=element_text(colour=\"Grey40\", hjust=1, vjust=1, size=rel(0.8)),\r\n          axis.text=element_text(colour=\"Grey40\"),\r\n          axis.title=element_text(colour=\"Grey20\"),\r\n          legend.text=element_text(colour=\"Grey40\"),\r\n          legend.title=element_text(colour=\"Grey20\"))\r\n}\r\n\r\n#Download US data from CDC website\r\nUSurl <- \"https://data.cdc.gov/api/views/vsak-wrfu/rows.csv?accessType=DOWNLOAD\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=USurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nUSdata <- read.csv(temp) %>% \r\n  mutate(Country=\"USA\", End.Week=as.Date(End.Week, format=\"%m/%d/%Y\")) %>% \r\n  filter(Age.Group!=\"All Ages\")\r\n\r\n#US population data\r\nUSpopurl <- \"https://www2.census.gov/programs-surveys/popest/technical-documentation/file-layouts/2010-2019/nc-est2019-agesex-res.csv\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=USpopurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nUSpop <- read.csv(temp) %>% \r\n  mutate(Sex=case_when(\r\n    SEX==0 ~ \"All Sex\",\r\n    SEX==1 ~ \"Male\",\r\n    TRUE ~ \"Female\")) %>% \r\n  select(Sex, AGE, POPESTIMATE2019) %>% \r\n  filter(AGE!=999) %>% \r\n  mutate(Age.Group=case_when(\r\n    AGE==0 ~ \"Under 1 year\", AGE<5 ~ \"1-4 Years\", AGE<15 ~ \"5-14 Years\", AGE<25 ~ \"15-24 Years\",\r\n    AGE<35 ~ \"25-34 Years\", AGE<45 ~ \"35-44 Years\", AGE<55 ~ \"45-54 Years\", AGE<65 ~ \"55-64 Years\", \r\n    AGE<75 ~ \"65-74 Years\", AGE<85 ~ \"75-84 Years\", TRUE ~ \"85 Years and Over\")) %>%\r\n  group_by(Age.Group, Sex) %>% \r\n  summarise(Pop=sum(POPESTIMATE2019)) %>% \r\n  ungroup()\r\n  \r\n#Read in UK data year by year\r\n\r\nUKurl2021 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2021/publishedweek522021.xlsx\"\r\n\r\ntemp <- curl_download(url=UKurl2021, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nUKdata2021 <- read_excel(temp, sheet=\"Covid-19 - Weekly occurrences\", range=\"B12:DC75\", \r\n                         col_names=FALSE) %>% \r\n  na.omit() %>% \r\n  mutate(Sex=rep(c(\"All Sex\", \"Male\", \"Female\"), each=20)) %>% \r\n  gather(End.Week, COVID.19.Deaths, c(2:(ncol(.)-1))) %>% \r\n  mutate(End.Week=as.Date(\"2020-01-03\")+weeks(as.numeric(substr(End.Week,4,6))-2)) %>% \r\n  rename(Age=`...1`) %>% \r\n  mutate(Country=\"UK\", Age.Group=case_when(\r\n    Age==\"<1\" ~ \"Under 1 year\",\r\n    Age==\"1-4\" ~ \"1-4 Years\",\r\n    Age %in% c(\"5-9\", \"10-14\") ~ \"5-14 Years\",\r\n    Age %in% c(\"15-19\", \"20-24\") ~ \"15-24 Years\",\r\n    Age %in% c(\"25-29\", \"30-34\") ~ \"25-34 Years\",\r\n    Age %in% c(\"35-39\", \"40-44\") ~ \"35-44 Years\",\r\n    Age %in% c(\"45-49\", \"50-54\") ~ \"45-54 Years\",\r\n    Age %in% c(\"55-59\", \"60-64\") ~ \"55-64 Years\",\r\n    Age %in% c(\"65-69\", \"70-74\") ~ \"65-74 Years\",\r\n    Age %in% c(\"75-79\", \"80-84\") ~ \"75-84 Years\",\r\n    TRUE ~ \"85 Years and Over\")) %>% \r\n  group_by(End.Week, Age.Group, Country, Sex) %>% \r\n  summarise(COVID.19.Deaths=sum(COVID.19.Deaths)) %>% \r\n  ungroup()\r\n\r\n#UK population data\r\n\r\nEWpopurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2020geography.xls\"\r\n\r\ntemp <- curl_download(url=EWpopurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nEWpop.m <- as.data.frame(t(read_excel(temp, sheet=\"MYE2 - Males\", range=\"E11:CQ11\", col_names=FALSE))) %>% \r\n  mutate(Age=c(0:90)) %>% \r\n  rename(Male=V1)\r\n\r\nEWpop.f <- as.data.frame(t(read_excel(temp, sheet=\"MYE2 - Females\", range=\"E11:CQ11\", col_names=FALSE))) %>% \r\n  mutate(Age=c(0:90)) %>% \r\n  rename(Female=V1)\r\n\r\nEWpop <- merge(EWpop.m, EWpop.f) %>% \r\n  mutate(`All Sex`=Male+Female) %>% \r\n  mutate(Age.Group=case_when(\r\n    Age==0 ~ \"Under 1 year\", Age<5 ~ \"1-4 Years\", Age<15 ~ \"5-14 Years\", Age<25 ~ \"15-24 Years\",\r\n    Age<35 ~ \"25-34 Years\", Age<45 ~ \"35-44 Years\", Age<55 ~ \"45-54 Years\", Age<65 ~ \"55-64 Years\", \r\n    Age<75 ~ \"65-74 Years\", Age<85 ~ \"75-84 Years\", TRUE ~ \"85 Years and Over\")) %>%\r\n  group_by(Age.Group) %>% \r\n  summarise(Male=sum(Male), Female=sum(Female), `All Sex`=sum(`All Sex`)) %>% \r\n  ungroup() %>% \r\n  gather(Sex, Pop, c(2:4))\r\n  \r\n\r\ndata <- bind_rows(UKdata2021 %>% merge(EWpop), USdata %>% merge(USpop)) %>% \r\n  select(End.Week, COVID.19.Deaths, Country, Age.Group, Sex, Pop) %>% \r\n  mutate(Age.Group=case_when(\r\n    Age.Group %in% c(\"Under 1 year\", \"1-4 Years\", \"5-14 Years\") ~ \"0-14 Years\",\r\n    TRUE ~ Age.Group)) %>% \r\n  group_by(Age.Group, Sex, End.Week, Country) %>% \r\n  summarise(COVID.19.Deaths=sum(COVID.19.Deaths), Pop=sum(Pop)) %>% \r\n  ungroup() %>% \r\n  mutate(Age.Group=factor(Age.Group, levels=c(\"0-14 Years\",\r\n                                              \"15-24 Years\", \"25-34 Years\", \"35-44 Years\",\r\n                                              \"45-54 Years\", \"55-64 Years\", \"65-74 Years\",\r\n                                              \"75-84 Years\", \"85 Years and Over\")),\r\n         MortRate=COVID.19.Deaths*100000/Pop) \r\n\r\nagg_tiff(\"Outputs/COVIDDeathsUKUSA.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot(data %>% filter(Sex==\"All Sex\"), aes(x=End.Week, y=MortRate, colour=Country))+\r\n  geom_line(show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Weekly deaths per 100,000\")+\r\n  scale_colour_paletteer_d(\"ggsci::uniform_startrek\")+\r\n  facet_wrap(~Age.Group, scales=\"free_y\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"Recent months have seen more COVID deaths in younger adults in <span style='color:#5C88DA;'>the US</span> than <span style='color:#CC0C00;'>England & Wales</span>\",\r\n       subtitle=\"Registered COVID-19 deaths by date of occurrence in England & Wales and the USA\",\r\n       caption=\"Data from ONS, CDC and the US Census Bureau\")\r\n\r\ndev.off()\r\n\r\ncollapse <- data %>% \r\n  filter(End.Week>=as.Date(\"2021-07-01\") & Sex==\"All Sex\" & End.Week<=as.Date(\"2022-01-01\")) %>% \r\n  group_by(Country, Age.Group) %>% \r\n  summarise(COVID.19.Deaths=sum(COVID.19.Deaths), Pop=unique(Pop)) %>% \r\n  ungroup() %>% \r\n  group_by(Country) %>% \r\n  mutate(AllDeaths=sum(COVID.19.Deaths), AllPop=sum(Pop)) %>% \r\n  ungroup() %>% \r\n  mutate(Deathprop=COVID.19.Deaths/AllDeaths, AllRate=AllDeaths/AllPop, \r\n         MortRate=COVID.19.Deaths*100000/Pop)\r\n\r\nratio <- collapse %>% \r\n  select(Country, Age.Group, MortRate) %>% \r\n  spread(Country, MortRate) %>% \r\n  mutate(ratio=USA/UK)\r\n\r\nagg_png(\"Outputs/COVIDDeathsUKUSAProp.png\", units=\"in\", width=8, height=6, res=500)\r\nggplot(collapse, aes(x=Deathprop, y=Country, fill=Age.Group))+\r\n  geom_col()+\r\n  scale_x_continuous(name=\"Proportion of COVID deaths\", labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"\", labels=c(\"E&W\", \"USA\"))+\r\n  scale_fill_paletteer_d(\"RColorBrewer::Spectral\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"Recent COVID-19 deaths in the USA have been younger than England & Wales\",\r\n       subtitle=\"Proportion of all COVID-19 deaths since 1st July 2021 by age group\",\r\n       caption=\"Data from ONS & CDC\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDDeathsUKUSABars.png\", units=\"in\", width=8, height=6, res=500)\r\nggplot(collapse, aes(y=Age.Group, x=MortRate, fill=Country))+\r\n  geom_col(position=\"dodge\", show.legend=FALSE)+\r\n  scale_x_continuous(name=\"COVID-19 deaths per 100,000\")+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_paletteer_d(\"ggsci::uniform_startrek\", name=\"\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"Recent months have seen more COVID deaths in younger adults<br>in <span style='color:#5C88DA;'>the US</span> than <span style='color:#CC0C00;'>England & Wales</span>\",\r\n       subtitle=\"Registered COVID-19 deaths in July-December 2021 by date of occurrence in England & Wales and the USA\",\r\n       caption=\"Data from ONS, CDC and the US Census Bureau\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDDeathsUKUSABarsAnnotated.png\", units=\"in\", width=8, height=6, res=500)\r\nggplot(collapse, aes(y=Age.Group, x=MortRate, fill=Country))+\r\n  geom_col(position=\"dodge\", show.legend=FALSE)+\r\n  scale_x_continuous(name=\"COVID-19 deaths per 100,000\")+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_paletteer_d(\"ggsci::uniform_startrek\", name=\"\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"Recent months have seen more COVID deaths in younger adults<br>in <span style='color:#5C88DA;'>the US</span> than <span style='color:#CC0C00;'>England & Wales</span>\",\r\n       subtitle=\"Registered COVID-19 deaths in July-December 2021 by date of occurrence in England & Wales and the USA\",\r\n       caption=\"Data from ONS, CDC and the US Census Bureau\")+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"85 Years and Over\"]+10, y=\"85 Years and Over\",\r\n           label=paste0(\"The <span style='color:#5C88DA;'>US COVID death rate</span> is <span style='color:Black;'>\", \r\n                        round(ratio$ratio[ratio$Age.Group==\"85 Years and Over\"], 1),\r\n                        \"</span> <br>times higher than <span style='color:#CC0C00;'>England & Wales\")),\r\n           text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"75-84 Years\"]+50, y=\"75-84 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"75-84 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"65-74 Years\"]+20, y=\"65-74 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"65-74 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"55-64 Years\"]+3, y=\"55-64 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"55-64 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"45-54 Years\"]+3, y=\"45-54 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"45-54 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"35-44 Years\"]+3, y=\"35-44 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"35-44 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"25-34 Years\"]+3, y=\"25-34 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"25-34 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"15-24 Years\"]+3, y=\"15-24 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"15-24 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))+\r\n  geom_richtext(aes(x=ratio$UK[ratio$Age.Group==\"0-14 Years\"]+3, y=\"0-14 Years\",\r\n                    label=paste0(\"<span style='color:#5C88DA;'>US </span><span style='color:Black;'>\", \r\n                                 round(ratio$ratio[ratio$Age.Group==\"0-14 Years\"], 1), \"x</span> higher\")),\r\n                text.colour=\"Grey50\", fill = NA, label.color = NA, hjust=0, vjust=1, family=\"Lato\", size=rel(3))\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDUnvaxRisk.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(sf)\r\nlibrary(arrow)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(gtools)\r\nlibrary(cowplot)\r\n\r\n#Read in MSOA level vaccination rates\r\n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/\r\nmaxdate <- \"6th June\"\r\n\r\nvax <- tempfile()\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-10-June-2021.xlsx\"\r\nvax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read_excel(vax, sheet=\"MSOA\", range=\"F16:AF6806\", col_names=FALSE) %>% \r\n  set_names(\"msoa11cd\", \"msoa11nm\", \"<30_1st\", \"30-34_1st\", \"35-39_1st\", \"40-44_1st\", \r\n            \"45-49_1st\", \"50-54_1st\", \"55-59_1st\", \"60-64_1st\", \"65-69_1st\", \"70-74_1st\", \r\n            \"75-79_1st\", \"80+_1st\", \"blank\", \"<30_2nd\", \"30-34_2nd\", \"35-39_2nd\", \"40-44_2nd\", \r\n            \"45-49_2nd\", \"50-54_2nd\", \"55-59_2nd\", \"60-64_2nd\", \"65-69_2nd\", \"70-74_2nd\", \r\n            \"75-79_2nd\", \"80+_2nd\") %>% \r\n  select(-blank) %>% \r\n  pivot_longer(c(3:26), names_to=c(\"age\", \"dose\"), names_sep=\"_\", values_to=\"vaccinated\")\r\n\r\n#Read in NIMS populations\r\npop <- read_excel(vax, sheet=\"Population estimates (NIMS)\", range=\"U16:AI6806\", col_names=FALSE) %>% \r\n  select(-c(2,3)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop.NIMS, c(2:13)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...4\" ~ \"<30\", \r\n    age==\"...5\" ~ \"30-34\",\r\n    age==\"...6\" ~ \"35-39\",\r\n    age==\"...7\" ~ \"40-44\",\r\n    age==\"...8\" ~ \"45-49\",\r\n    age==\"...9\" ~ \"50-54\",\r\n    age==\"...10\" ~ \"55-59\",\r\n    age==\"...11\" ~ \"60-64\",\r\n    age==\"...12\" ~ \"65-69\",\r\n    age==\"...13\" ~ \"70-74\",\r\n    age==\"...14\" ~ \"75-79\",\r\n    TRUE ~ \"80+\")) %>% \r\n  group_by(msoa11cd, age) %>% \r\n  summarise(pop.NIMS=sum(pop.NIMS)) %>% \r\n  ungroup()\r\n\r\n#Read in ONS populations\r\npop2 <- read_excel(vax, sheet=\"Population estimates (ONS)\", range=\"BW16:CK6806\", col_names=FALSE) %>% \r\n  select(-c(2,3)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop.ONS, c(2:13)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...4\" ~ \"<30\", \r\n    age==\"...5\" ~ \"30-34\",\r\n    age==\"...6\" ~ \"35-39\",\r\n    age==\"...7\" ~ \"40-44\",\r\n    age==\"...8\" ~ \"45-49\",\r\n    age==\"...9\" ~ \"50-54\",\r\n    age==\"...10\" ~ \"55-59\",\r\n    age==\"...11\" ~ \"60-64\",\r\n    age==\"...12\" ~ \"65-69\",\r\n    age==\"...13\" ~ \"70-74\",\r\n    age==\"...14\" ~ \"75-79\",\r\n    TRUE ~ \"80+\")) %>% \r\n  group_by(msoa11cd, age) %>% \r\n  summarise(pop.ONS=sum(pop.ONS)) %>% \r\n  ungroup()\r\n\r\n\r\n#COMBINE\r\nvaxdata <- merge(vaxdata, pop) %>%\r\n  merge(pop2)\r\n  mutate(vaxprop.NIMS=vaccinated/pop.NIMS,\r\n         vaxprop.ONS=vaccinated/pop.ONS)\r\n\r\n#Bring in CFRs estimated by Dan Howdon\r\nCFRdata <- read_csv_arrow(\"Data/cfrs_2021_06_07.csv\") %>% \r\n  mutate(age=case_when(\r\n    agegroup==0 ~ \"0-4\", agegroup==5 ~ \"5-9\", agegroup==10 ~ \"10-14\", agegroup==15 ~ \"15-19\",\r\n    agegroup==20 ~ \"20-24\", agegroup==25 ~ \"25-29\", agegroup==30 ~ \"30-34\", \r\n    agegroup==35 ~ \"35-39\", agegroup==40 ~ \"40-44\", agegroup==45 ~ \"45-49\", \r\n    agegroup==50 ~ \"50-54\", agegroup==55 ~ \"55-59\", agegroup==60 ~ \"60-64\", \r\n    agegroup==65 ~ \"65-69\", agegroup==70 ~ \"70-74\", agegroup==75 ~ \"75-79\",\r\n    agegroup==80 ~ \"80-84\", agegroup==85 ~ \"85-89\", TRUE ~ \"90+\"),\r\n    date=as.Date(date, format=\"%d/%m/%Y\"),\r\n    age = age %>% str_replace(\"_\", \"-\") %>%\r\n      factor(levels=c(\"0-4\", \"5-9\", \"10-14\", \"15-19\",\r\n                      \"20-24\", \"25-29\", \"30-34\", \"35-39\", \r\n                      \"40-44\", \"45-49\", \"50-54\", \"55-59\", \r\n                      \"60-64\", \"65-69\", \"70-74\", \"75-79\", \r\n                      \"80-84\", \"85-89\", \"90+\"))) \r\n\r\nmaxCFRdate <- max(CFRdata$date[!is.na(CFRdata$cfr_month)])\r\n\r\n#Just extract the most recent monthly CFRs\r\nCFRs <- CFRdata %>% \r\n  filter(date==maxCFRdate) %>% \r\n  mutate(CFR=cfr_month*100) %>% \r\n  select(age, CFR)\r\n\r\n#Here are the latest age-specific CFRs:\r\n#CFRs <- tibble::tribble(\r\n#  ~age, ~CFR,\r\n#  \"0-4\",   0,\r\n#  \"5-9\",   0,\r\n#  \"10-14\", 0,\r\n#  \"15-19\", 0.02164,\r\n#  \"20-24\", 0,\r\n#  \"25-29\", 0,\r\n#  \"30-34\", 0,\r\n#  \"35-39\", 0.0242269,\r\n#  \"40-44\", 0.0289471,\r\n#  \"45-49\", 0.2123436,\r\n#  \"50-54\", 0.2208057,\r\n#  \"55-59\", 0.5648288,\r\n#  \"60-64\", 0.4692304,\r\n#  \"65-69\", 3.5336073,\r\n#  \"70-74\", 4.1047055,\r\n#  \"75-79\", 6.2152125,\r\n#  \"80-84\", 11.6088927,\r\n#  \"85-89\", 16.7702883,\r\n#  \"90+\",   22.6581156)\r\n\r\n#Condense to age groups to match the vaxdata. Pop group weights from ONS mid-year estimates\r\nCFRs <- CFRs %>% \r\n  mutate(weight=case_when(\r\n    age==\"0-4\" ~ 3299637,\r\n    age==\"5-9\"~ 3538206,\r\n    age==\"10-14\" ~ 3354246,\r\n    age==\"15-19\" ~ 3090232,\r\n    age==\"20-24\" ~ 3487863,\r\n    age==\"25-29\" ~ 3801409,\r\n    age==\"80-84\" ~ 1439913,\r\n    age==\"85-89\" ~ 879778,\r\n    age==\"90+\" ~ 517273,\r\n    TRUE ~ 1),\r\n    wgt_cfr=weight*CFR,\r\n    age=case_when(\r\n      as.character(age) %in% c(\"0-4\", \"5-9\", \"10-14\", \"15-19\", \"20-24\", \"25-29\") ~ \"<30\",\r\n      as.character(age) %in% c(\"80-84\", \"85-89\", \"90+\") ~ \"80+\",\r\n      TRUE ~ as.character(age))) %>% \r\n  group_by(age) %>% \r\n  summarise(CFR=sum(wgt_cfr)/sum(weight)) %>% \r\n  ungroup()\r\n\r\ndata <- merge(vaxdata, CFRs) %>% \r\n  rowwise() %>% \r\n  mutate(ex_deaths.NIMS=max((pop.NIMS-vaccinated),0)*CFR/100,\r\n         ex_deaths.ONS=max((pop.ONS-vaccinated),0)*CFR/100) %>% \r\n  group_by(msoa11nm, msoa11cd, dose) %>% \r\n  summarise(ex_deaths.NIMS=sum(ex_deaths.NIMS), ex_deaths.ONS=sum(ex_deaths.ONS),\r\n            unvax.NIMS=sum(pop.NIMS-vaccinated), pop.NIMS=sum(pop.NIMS),\r\n            unvax.ONS=sum(max(pop.ONS-vaccinated),0),\r\n            pop.ONS=sum(pop.ONS)) %>% \r\n  ungroup() %>% \r\n  mutate(ex_deathrate.NIMS=ex_deaths.NIMS*100000/pop.NIMS,\r\n         ex_deathrate.ONS=ex_deaths.ONS*100000/pop.ONS)\r\n\r\n#Download Carl Baker's lovely cartogram\r\nmsoa <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\nmsoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode=\"wb\")\r\n\r\nBackgroundMSOA <- st_read(msoa, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(data, by=\"msoa11cd\")\r\n\r\nGroupsMSOA <- st_read(msoa, layer=\"2 Groups\")\r\n\r\nGroup_labelsMSOA <- st_read(msoa, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAsMSOA <- st_read(msoa, layer=\"3 Local authority outlines (2019)\")\r\n\r\nUnvaxrisk.NIMS <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=MSOA %>% filter(dose==\"1st\"), \r\n          aes(geometry=geom, fill=ex_deathrate.NIMS), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.amp\", \r\n                         name=\"Expected deaths per 100,000 adults\",\r\n                         limits=c(0,500))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\",\r\n        plot.title.position=\"plot\", plot.caption.position=\"plot\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"London has the highest risk through non-vaccination\",\r\n       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 \"),       \r\n       caption=\"Vaccine data from NHS England, Populations from NIMS\\nCFRs from Dan Howdon, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogramUnVaxRiskNIMS.tiff\", units=\"in\", width=8, height=9, res=800)\r\nUnvaxrisk.NIMS\r\ndev.off()\r\n\r\nUnvaxrisk.ONS <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=MSOA %>% filter(dose==\"1st\"), \r\n          aes(geometry=geom, fill=ex_deathrate.ONS), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.amp\", \r\n                         name=\"Expected deaths per 100,000 adults\",\r\n                         limits=c(0,500))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\",\r\n        plot.title.position=\"plot\", plot.caption.position=\"plot\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"London has the highest risk through non-vaccination\",\r\n       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 \"),       \r\n       caption=\"Vaccine data from NHS England, Populations from ONS\\nCFRs from Dan Howdon, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogramUnVaxRiskONS.tiff\", units=\"in\", width=8, height=9, res=800)\r\nUnvaxrisk.ONS\r\ndev.off()\r\n\r\n#Incorporate estimates of vaccine effectiveness from James Ward (@JamesWard73)\r\n#https://twitter.com/JamesWard73/status/1403496072606064642\r\nVE1st=0.8\r\nVE2nd=0.96\r\n\r\n#Protection of 1st dose vs. death\r\ndata1 <-  merge(vaxdata, CFRs) %>% \r\n  pivot_wider(id_cols=c(\"age\", \"msoa11cd\", \"msoa11nm\", \"pop.NIMS\", \"pop.ONS\",\r\n                        \"CFR\"), \r\n              names_from=dose,\r\n              values_from=vaccinated) %>% \r\n  rowwise() %>% \r\n  mutate(ex_deaths.NIMS=#unvaccinated risk\r\n           (pop.NIMS-`1st`)*CFR/100+\r\n           #1st dose onlyrisk\r\n           (`1st`-`2nd`)*(1-VE1st)*CFR/100+\r\n           #2nd dose risk\r\n           `2nd`*(1-VE2nd)*CFR/100,\r\n         ex_deaths.ONS=#unvaccinated risk\r\n           max((pop.ONS-`1st`),0)*CFR/100+\r\n           #1st dose onlyrisk\r\n           (`1st`-`2nd`)*(1-VE1st)*CFR/100+\r\n           #2nd dose risk\r\n           `2nd`*(1-VE2nd)*CFR/100) %>% \r\n  group_by(msoa11nm, msoa11cd) %>% \r\n  summarise(ex_deaths.NIMS=sum(ex_deaths.NIMS),pop.NIMS=sum(pop.NIMS),\r\n            ex_deaths.ONS=sum(ex_deaths.ONS),pop.ONS=sum(pop.ONS)) %>% \r\n  ungroup() %>% \r\n  mutate(ex_deathrate.NIMS=ex_deaths.NIMS*100000/pop.NIMS,\r\n         ex_deathrate.ONS=ex_deaths.ONS*100000/pop.ONS) %>% \r\n  #Remove MSOAs close to the Welsh border with questionable vaccination rates\r\n  filter(!msoa11nm %in% c(\"Wigmore, Orleton & Brimfield\",\r\n                          \"Clun & Bucknell\",\r\n                          \"Gobowen, St Martin's & Weston Rhyn\",\r\n                          \"Tidenham & Woolaston\",\r\n                          \"Lydbrook, Newland & St Briavels\",\r\n                          \"Penyard, Llangarron & Goodrich\",\r\n                          \"Golden Valley\",\r\n                          \"Ellesmere\",\r\n                          \"Trefonen & Pant\",\r\n                          \"Kington, Eardisley & Staunton\",\r\n                          \"Bishop's Castle, Brockton & Chirbury\"))\r\n\r\nMSOA2 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(data1, by=\"msoa11cd\")\r\n\r\nUnvaxrisk2.NIMS <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=MSOA2 %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom, fill=ex_deathrate.NIMS), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.amp\", \r\n                         name=\"Expected deaths per 100,000 adults\", limits=c(0,800))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\",\r\n        plot.title.position=\"plot\", plot.caption.position=\"plot\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"London has the highest risk through non-vaccination\",\r\n       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 \"),       \r\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\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogramUnVaxRisk2NIMS.tiff\", units=\"in\", width=7.5, height=9, res=800)\r\nUnvaxrisk2.NIMS\r\ndev.off()\r\n\r\nUnvaxrisk2.ONS <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom), fill=\"White\")+\r\n  geom_sf(data=MSOA2 %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom, fill=ex_deathrate.ONS), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.amp\", \r\n                         name=\"Expected deaths per 100,000 adults\", limits=c(0,800))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\",\r\n        plot.title.position=\"plot\", plot.caption.position=\"plot\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"London has the highest risk through non-vaccination\",\r\n       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 \"),       \r\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\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogramUnVaxRisk2ONS.tiff\", units=\"in\", width=7.5, height=9, res=800)\r\nUnvaxrisk2.ONS\r\ndev.off()\r\n\r\n#Bivariate map of risk vs. case rates\r\n#Read in MSOA-level case data from the dashboard\r\ncaseurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=msoa&metric=newCasesBySpecimenDateRollingRate&format=csv\"\r\n\r\ncases <- tempfile()\r\ncases <- curl_download(url=caseurl, destfile=cases, quiet=FALSE, mode=\"wb\")\r\ncasedata <- read.csv(cases) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  filter(date==max(date)) %>% \r\n  rename(caserate=newCasesBySpecimenDateRollingRate, msoa11cd=areaCode) %>% \r\n  select(caserate, msoa11cd) %>% \r\n  merge(data1, by=\"msoa11cd\", all.y=TRUE) \r\n\r\ntemp <- casedata %>% \r\n  filter(is.na(caserate)) %>% \r\n  mutate(casetert=1)\r\n\r\ncasedata2 <- casedata %>% \r\n  filter(!is.na(caserate)) %>% \r\n  mutate(casetert=quantcut(caserate, q=2, labels=FALSE)+1) %>% \r\n  bind_rows(temp) %>% \r\n  mutate(risktert=quantcut(ex_deathrate.NIMS, q=3, labels=FALSE),\r\n         key=case_when(\r\n           casetert==1 & risktert==3 ~ 1,\r\n           casetert==1 & risktert==2 ~ 2,\r\n           casetert==1 & risktert==1 ~ 3,\r\n           casetert==2 & risktert==3 ~ 4,\r\n           casetert==2 & risktert==2 ~ 5,\r\n           casetert==2 & risktert==1 ~ 6,\r\n           casetert==3 & risktert==3 ~ 7,\r\n           casetert==3 & risktert==2 ~ 8,\r\n           TRUE ~ 9),\r\n         fillcolour=case_when(\r\n           key==1 ~ \"#f0f0f0\", key==2 ~ \"#a0dcdd\", key==3 ~ \"#00cfc1\",\r\n           key==4 ~ \"#ffa2aa\", key==5 ~ \"#afa7b7\", key==6 ~ \"#44b4cb\", \r\n           key==7 ~ \"#ff3968\", key==8 ~ \"#c066b2\", TRUE ~ \"#6d87cc\"))\r\n\r\nMSOA3 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(casedata2, by=\"msoa11cd\")\r\n\r\n#generate dataframe for key\r\nkeydata <- MSOA3 %>%\r\n  filter(!is.na(fillcolour)) %>%\r\n  group_by(casetert, risktert) %>%\r\n  summarise(RGB=unique(fillcolour))\r\n\r\nplot.full <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA3 %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom, fill=fillcolour), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\", family=\"Lato\")+\r\n  scale_fill_identity(na.value=\"Black\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), plot.title.position = \"panel\")+\r\n  labs(title=\"Comparing COVID-19 infection rates with overall mortality risks\",\r\n       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.\",       \r\n       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\")\r\n\r\nkey <- ggplot(keydata)+\r\n  geom_tile(aes(x=casetert, y=-risktert, fill=RGB))+\r\n  scale_fill_identity()+\r\n  labs(x = expression(\"More COVID cases\" %->%  \"\"),\r\n       y = expression(\"Lower mortality risk\" %->%  \"\")) +\r\n  theme_classic() +\r\n  # make font small enough\r\n  theme(\r\n    axis.title = element_text(size = 9),axis.line=element_blank(), \r\n    axis.ticks=element_blank(), axis.text=element_blank(),\r\n    text=element_text(family=\"Lato\"))+\r\n  # quadratic tiles\r\n  coord_fixed()\r\n\r\nagg_tiff(\"Outputs/COVIDBivariateCasesRisk.tiff\", units=\"in\", width=8, height=10, res=800)\r\nggdraw()+\r\n  draw_plot(plot.full, 0,0,1,1)+\r\n  draw_plot(key, 0.66,0.64,0.26,0.26)\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaccinationAnimations.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(sf)\r\nlibrary(scales)\r\nlibrary(ragg)\r\nlibrary(extrafont)\r\nlibrary(ggrepel)\r\nlibrary(gganimate)\r\nlibrary(paletteer)\r\n\r\n#Read in data for vax rates over 50, available since 25th March\r\n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/\r\n\r\n#25th March file\r\ntemp1 <- tempfile()\r\nurl1 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx\"\r\ntemp1 <- curl_download(url=url1, destfile=temp1, quiet=FALSE, mode=\"wb\")\r\n\r\ndata1 <- read_excel(temp1, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`,  `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, \r\n         `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(age, vaccinated, c(3:10)) %>% \r\n  mutate(date=as.Date(\"2021-03-21\"))\r\n\r\npop1 <- read_excel(temp1, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  select(-c(2)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:10)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...3\" ~ \"<16\",\r\n    age==\"...4\" ~ \"<50\",\r\n    age==\"...5\" ~ \"50-54\",\r\n    age==\"...6\" ~ \"55-59\",\r\n    age==\"...7\" ~ \"60-64\",\r\n    age==\"...8\" ~ \"65-69\",\r\n    age==\"...9\" ~ \"70-74\",\r\n    age==\"...10\" ~ \"75-79\",\r\n    TRUE ~ \"80+\"))\r\n\r\ndata1 <- merge(data1, pop1)\r\n\r\n#1st April file\r\ntemp2 <- tempfile()\r\nurl2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-1-April-2021.xlsx\"\r\ntemp2 <- curl_download(url=url2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\n\r\ndata2 <- read_excel(temp2, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`,  `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, \r\n         `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(age, vaccinated, c(3:10)) %>% \r\n  mutate(date=as.Date(\"2021-03-28\"))\r\n\r\npop2 <- read_excel(temp2, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  select(-c(2)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:10)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...3\" ~ \"<16\",\r\n    age==\"...4\" ~ \"<50\",\r\n    age==\"...5\" ~ \"50-54\",\r\n    age==\"...6\" ~ \"55-59\",\r\n    age==\"...7\" ~ \"60-64\",\r\n    age==\"...8\" ~ \"65-69\",\r\n    age==\"...9\" ~ \"70-74\",\r\n    age==\"...10\" ~ \"75-79\",\r\n    TRUE ~ \"80+\"))\r\n\r\ndata2 <- merge(data2, pop2)\r\n\r\n#8th April file\r\ntemp3 <- tempfile()\r\nurl3 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-8-April-2021.xlsx\"\r\ntemp3 <- curl_download(url=url3, destfile=temp3, quiet=FALSE, mode=\"wb\")\r\n\r\ndata3 <- read_excel(temp3, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`,  `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, \r\n         `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(age, vaccinated, c(3:10)) %>% \r\n  mutate(date=as.Date(\"2021-04-04\"))\r\n\r\npop3 <- read_excel(temp3, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  select(-c(2)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:10)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...3\" ~ \"<16\",\r\n    age==\"...4\" ~ \"<50\",\r\n    age==\"...5\" ~ \"50-54\",\r\n    age==\"...6\" ~ \"55-59\",\r\n    age==\"...7\" ~ \"60-64\",\r\n    age==\"...8\" ~ \"65-69\",\r\n    age==\"...9\" ~ \"70-74\",\r\n    age==\"...10\" ~ \"75-79\",\r\n    TRUE ~ \"80+\"))\r\n\r\ndata3 <- merge(data3, pop3)\r\n\r\n\r\n#15th April file\r\ntemp4 <- tempfile()\r\nurl4 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-15-April-2021.xlsx\"\r\ntemp4 <- curl_download(url=url4, destfile=temp4, quiet=FALSE, mode=\"wb\")\r\n\r\ndata4 <- read_excel(temp4, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<50`=`...3`,  `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, \r\n         `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(age, vaccinated, c(3:10)) %>% \r\n  mutate(date=as.Date(\"2021-04-11\"))\r\n\r\npop4 <- read_excel(temp4, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  select(-c(2)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:10)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...3\" ~ \"<16\",\r\n    age==\"...4\" ~ \"<50\",\r\n    age==\"...5\" ~ \"50-54\",\r\n    age==\"...6\" ~ \"55-59\",\r\n    age==\"...7\" ~ \"60-64\",\r\n    age==\"...8\" ~ \"65-69\",\r\n    age==\"...9\" ~ \"70-74\",\r\n    age==\"...10\" ~ \"75-79\",\r\n    TRUE ~ \"80+\"))\r\n\r\ndata4 <- merge(data4, pop4)\r\n\r\n#22nd April file\r\ntemp5 <- tempfile()\r\nurl5 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-22-April-2021.xlsx\"\r\ntemp5 <- curl_download(url=url5, destfile=temp5, quiet=FALSE, mode=\"wb\")\r\n\r\ndata5 <- read_excel(temp5, sheet=\"MSOA\", range=\"F16:P6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`,  `45-49`=`...4`, `50-54`=`...5`, \r\n         `55-59`=`...6`, `60-64`=`...7`, \r\n         `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(age, vaccinated, c(3:11)) %>% \r\n  mutate(date=as.Date(\"2021-04-18\"),\r\n         age=if_else(age %in% c(\"<45\", \"45-49\"), \"<50\", age)) %>% \r\n  group_by(age, msoa11cd, msoa11nm, date) %>% \r\n  summarise(vaccinated=sum(vaccinated)) %>% \r\n  ungroup()\r\n\r\npop5 <- read_excel(temp5, sheet=\"Population estimates (NIMS)\", range=\"R16:AC6806\", col_names=FALSE) %>% \r\n  select(-c(2)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:11)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...3\" ~ \"<16\",\r\n    age %in% c(\"...4\", \"...5\") ~ \"<50\",\r\n    age==\"...6\" ~ \"50-54\",\r\n    age==\"...7\" ~ \"55-59\",\r\n    age==\"...8\" ~ \"60-64\",\r\n    age==\"...9\" ~ \"65-69\",\r\n    age==\"...10\" ~ \"70-74\",\r\n    age==\"...11\" ~ \"75-79\",\r\n    TRUE ~ \"80+\")) %>% \r\n  group_by(msoa11cd, age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\ndata5 <- merge(data5, pop5)\r\n\r\n#29th April file\r\ntemp6 <- tempfile()\r\nurl6 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-29-April-2021.xlsx\"\r\ntemp6 <- curl_download(url=url6, destfile=temp6, quiet=FALSE, mode=\"wb\")\r\n\r\ndata6 <- read_excel(temp6, sheet=\"MSOA\", range=\"F16:P6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`,  `45-49`=`...4`, `50-54`=`...5`, \r\n         `55-59`=`...6`, `60-64`=`...7`, \r\n         `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(age, vaccinated, c(3:11)) %>% \r\n  mutate(date=as.Date(\"2021-04-25\"),\r\n         age=if_else(age %in% c(\"<45\", \"45-49\"), \"<50\", age)) %>% \r\n  group_by(age, msoa11cd, msoa11nm, date) %>% \r\n  summarise(vaccinated=sum(vaccinated)) %>% \r\n  ungroup()\r\n\r\npop6 <- read_excel(temp6, sheet=\"Population estimates (NIMS)\", range=\"R16:AC6806\", col_names=FALSE) %>% \r\n  select(-c(2)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:11)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...3\" ~ \"<16\",\r\n    age %in% c(\"...4\", \"...5\") ~ \"<50\",\r\n    age==\"...6\" ~ \"50-54\",\r\n    age==\"...7\" ~ \"55-59\",\r\n    age==\"...8\" ~ \"60-64\",\r\n    age==\"...9\" ~ \"65-69\",\r\n    age==\"...10\" ~ \"70-74\",\r\n    age==\"...11\" ~ \"75-79\",\r\n    TRUE ~ \"80+\")) %>% \r\n  group_by(msoa11cd, age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\ndata6 <- merge(data6, pop6)\r\n\r\n#Merge them all together\r\ndata <- bind_rows(data1, data2, data3, data4, data5, data6) %>% \r\n  mutate(vaxprop=vaccinated/pop)\r\n\r\n#Calculate IMD at MSOA level\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE)[,c(1,2,5,6)]\r\ncolnames(IMD) <- c(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\ntemp <- tempfile()\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, RGN11NM) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\npop <- read_excel(file.path(temp2, \"SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx\"),\r\n                  sheet=\"Mid-2019 Persons\", range=\"A6:G34758\", col_names=FALSE)[,c(1,7)]\r\ncolnames(pop) <- c(\"LSOA11CD\", \"pop\")\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() \r\n\r\ndata_IMD <- data %>% \r\n  merge(IMD_MSOA %>% select(-pop), by.x=\"msoa11cd\", by.y=\"MSOA11CD\")\r\n\r\n#Download Carl Baker's lovely cartogram\r\nmsoa <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\nmsoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode=\"wb\")\r\n\r\nBackgroundMSOA <- st_read(msoa, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(data_IMD, by=\"msoa11cd\")\r\n\r\nGroupsMSOA <- st_read(msoa, layer=\"2 Groups\")\r\n\r\nGroup_labelsMSOA <- st_read(msoa, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAsMSOA <- st_read(msoa, layer=\"3 Local authority outlines (2019)\")\r\n\r\n#Local analysis\r\nscatterdata <- MSOA %>% \r\n  filter(Laname==\"Sheffield\" & age %in% c(\"80+\", \"75-79\", \"70-74\", \"65-69\", \"60-64\",\r\n                                          \"55-59\", \"50-54\")) %>%\r\n  group_by(msoa11cd, MSOA.name.HCL, IMDrank, date) %>% \r\n  summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(vaxprop=vaccinated/pop) %>% \r\n  group_by(msoa11cd) %>% \r\n  mutate(labels=if_else(max(vaxprop)<0.8, unique(MSOA.name.HCL), \"\")) %>% \r\n  ungroup()\r\n\r\nSheffanim <- ggplot(scatterdata, aes(x=vaxprop, y=-IMDrank))+\r\n  geom_point(aes(size=pop), shape=21, colour=\"DarkRed\", fill=\"tomato\", alpha=0.8)+\r\n  geom_segment(aes(x=1, xend=1, y=-1000, yend=-32000), colour=\"Grey70\")+\r\n  geom_text_repel(aes(label=labels), family=\"Roboto\", size=rel(3),\r\n                  box.padding = 0.4, seed=19)+\r\n  scale_x_continuous(name=\"Proportion of population aged 50+ vaccinated\", \r\n                     labels=label_percent(accuracy=1), limits=c(NA, 1))+\r\n  scale_y_continuous(name=\"Index of Multiple Deprivation rank\", breaks=c(-1000, -32000),\r\n                     labels=c(\"Most deprived\", \"Least deprived\"))+\r\n  scale_size_continuous(name=\"Over 50\\npopulation\")+\r\n  theme_classic()+\r\n  theme(axis.ticks.y=element_blank(), text=element_text(family=\"Roboto\"),\r\n        axis.text.y=element_text(size=rel(1.2), colour=\"Black\"),\r\n        plot.title.position=\"plot\", plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        plot.subtitle=element_text(colour=\"Grey50\"), plot.caption.position =\"plot\",\r\n        plot.caption=element_text(colour=\"Grey50\"))+\r\n  ggtitle(\"Vaccine delivery is lowest in a small number of deprived areas in Sheffield\",\r\n          subtitle=\"Proportion of adults aged 50+ who had received at least one dose of COVID-19 vaccine by {closest_state}\")+\r\n  labs(caption=\"Data from NHS England, populations from NIMS\\nPlot by @VictimOfMaths\")+\r\n  transition_states(date, transition_length=2, state_length=1, wrap=FALSE)\r\n\r\nanimate(Sheffanim, units=\"in\", width=8, height=8*4/5, res=500, \r\n        renderer=gifski_renderer(\"Outputs/COVIDVaxSheffScatterAnim.gif\"), \r\n        device=\"ragg_png\", end_pause=5, duration=10, fps=8)\r\n\r\n###############################################\r\n\r\n#Bring in older vaccination data\r\n#18th March\r\ntemp7 <- tempfile()\r\nurl7 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-18-March-2021-revised.xlsx\"\r\ntemp7 <- curl_download(url=url7, destfile=temp7, quiet=FALSE, mode=\"wb\")\r\n\r\ndata7 <- read_excel(temp7, sheet=\"MSOA\", range=\"F16:N6806\", col_names=FALSE) %>% \r\n  mutate(vaccinated=`...3`+`...4`+`...5`+`...6`+`...7`+`...8`+`...9`,\r\n         date=as.Date(\"2021-03-14\")) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  select(msoa11cd, vaccinated, date)\r\n\r\npop7 <- read_excel(temp7, sheet=\"Population estimates (NIMS)\", range=\"N16:X6806\", col_names=FALSE) %>% \r\n  select(`...1`, `...11`) %>% \r\n  rename(msoa11cd=`...1`, pop=`...11`)\r\n\r\ndata7 <- merge(data7, pop7)\r\n\r\n#11th March\r\ntemp8 <- tempfile()\r\nurl8 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-11-March-2021.xlsx\"\r\ntemp8 <- curl_download(url=url8, destfile=temp8, quiet=FALSE, mode=\"wb\")\r\n\r\ndata8 <- read_excel(temp8, sheet=\"MSOA\", range=\"F16:M6806\", col_names=FALSE) %>% \r\n  mutate(vaccinated=`...3`+`...4`+`...5`+`...6`+`...7`+`...8`,\r\n         date=as.Date(\"2021-03-07\")) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  select(msoa11cd, vaccinated, date)\r\n\r\npop8 <- read_excel(temp8, sheet=\"Population estimates (NIMS)\", range=\"M16:V6806\", col_names=FALSE) %>% \r\n  select(`...1`, `...10`) %>% \r\n  rename(msoa11cd=`...1`, pop=`...10`)\r\n\r\ndata8 <- merge(data8, pop8)\r\n\r\n#4th March\r\ntemp9 <- tempfile()\r\nurl9 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-4-March-2021-1.xlsx\"\r\ntemp9 <- curl_download(url=url9, destfile=temp8, quiet=FALSE, mode=\"wb\")\r\n\r\ndata9 <- read_excel(temp9, sheet=\"MSOA\", range=\"F16:L6806\", col_names=FALSE) %>% \r\n  mutate(vaccinated=`...3`+`...4`+`...5`+`...6`+`...7`,\r\n         date=as.Date(\"2021-02-28\")) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  select(msoa11cd, vaccinated, date)\r\n\r\npop9 <- read_excel(temp9, sheet=\"Population estimates (NIMS)\", range=\"L16:T6806\", col_names=FALSE) %>% \r\n  select(`...1`, `...9`) %>% \r\n  rename(msoa11cd=`...1`, pop=`...9`)\r\n\r\ndata9 <- merge(data9, pop9)\r\n\r\n#Extract total vaccinated data by MSOA and date\r\ntotaldata <- data %>% \r\n  group_by(msoa11cd, date) %>% \r\n  summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  bind_rows(totaldata, data7, data8, data9) %>% \r\n  mutate(vaxprop=vaccinated/pop)\r\n\r\n#Merge into cartogram\r\nMSOA2 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(totaldata, by=\"msoa11cd\")\r\n\r\nTotalAnim <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA2, \r\n          aes(geometry=geom, fill=vaxprop), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of\\npopulation\\nvaccinated\", limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  ggtitle(\"Overall adult vaccination rates by {closest_state}\",\r\n          subtitle=\"Proportion of adults (aged 16+) vaccinated in England by MSOA\")+\r\n  labs(caption=\"Data from NHS England and ONS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")+\r\n  transition_states(date, wrap=FALSE)\r\n\r\nanimate(TotalAnim, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/COVIDVaxRatesMSOAAnim.gif\"), \r\n        device=\"ragg_png\", end_pause=60)\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaccinationInequalityGB.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(readxl)\r\nlibrary(curl)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(paletteer)\r\nlibrary(ragg)\r\n\r\n#Read in Scottish and Welsh data, compiled from sources only available in pdf table (thanks folks)\r\n#Scotland: https://beta.isdscotland.org/find-publications-and-data/population-health/covid-19/covid-19-statistical-report/\r\n#Wales: http://www2.nphs.wales.nhs.uk:8080/CommunitySurveillanceDocs.nsf/3dc04669c9e1eaa880257062003b246b/e61c928e715ece3180258680003449c3/$FILE/Wales%20COVID-19%20vaccination%20enhanced%20surveillance%20-%20equality%20report.pdf\r\nswdata <- read_excel(\"Data/COVIDUKVaxIneq.xlsx\", range=\"A1:G201\")\r\n\r\n#Read in English data\r\n#MSOA data 1st reported in 25th Feb file\r\ntemp <- tempfile()\r\nurl1 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-February-2021-revised.xlsx\"\r\ntemp <- curl_download(url=url1, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata1 <- read_excel(temp, sheet=\"Vaccinations by MSOA\", range=\"F16:K6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u70=`...3`, `70-74`=`...4`, `75-79`=`...5`, `80+`=...6) %>% \r\n  gather(Age, Vax, c(3:6)) %>% \r\n  mutate(Date=as.Date(\"2021-02-21\"))\r\n\r\n#4th March file\r\nurl2 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-4-March-2021-1.xlsx\"\r\ntemp <- curl_download(url=url2, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata2 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:L6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u65=`...3`, `65-69`=`...4`, `70-74`=`...5`, \r\n         `75-79`=`...6`, `80+`=...7) %>% \r\n  gather(Age, Vax, c(3:7)) %>% \r\n  mutate(Date=as.Date(\"2021-02-28\"))\r\n\r\n#4th March file is the first time NIMS population denominators are available, \r\n#use these for the 25th Feb data\r\npop2 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"L16:S6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u65`=`...4`, `65-69`=`...5`, `70-74`=`...6`, \r\n         `75-79`=`...7`, `80+`=...8) %>% \r\n  gather(Age, Pop, c(3:8)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\npop1 <- pop2 %>% \r\n  mutate(Age=case_when(\r\n    Age %in% c(\"u65\", \"65-69\") ~ \"u70\",\r\n    TRUE ~ Age)) %>% \r\n  group_by(msoa11cd, Age) %>% \r\n  summarise(Pop=sum(Pop)) %>% \r\n  ungroup()\r\n\r\nedata1 <- merge(edata1, pop1)\r\nedata2 <- merge(edata2, pop2)\r\n\r\n#11th March file\r\nurl3 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-11-March-2021.xlsx\"\r\ntemp <- curl_download(url=url3, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata3 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:M6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u60=`...3`, `60-64`=`...4`, `65-69`=`...5`, \r\n         `70-74`=`...6`, `75-79`=`...7`, `80+`=`...8`) %>% \r\n  gather(Age, Vax, c(3:8)) %>% \r\n  mutate(Date=as.Date(\"2021-03-07\"))\r\n\r\npop3 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"M16:U6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u60`=`...4`, `60-64`=`...5`, `65-69`=`...6`, \r\n         `70-74`=`...7`, `75-79`=`...8`, `80+`=`...9`) %>% \r\n  gather(Age, Pop, c(3:9)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata3 <- merge(edata3, pop3)\r\n\r\n#18th March file\r\nurl4 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-18-March-2021-revised.xlsx\"\r\ntemp <- curl_download(url=url4, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata4 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:N6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u55=`...3`, `55-59`=`...4`, `60-64`=`...5`, \r\n         `65-69`=`...6`, `70-74`=`...7`, `75-79`=`...8`, `80+`=`...9`) %>% \r\n  gather(Age, Vax, c(3:9)) %>% \r\n  mutate(Date=as.Date(\"2021-03-14\"))\r\n\r\npop4 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"N16:W6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u55`=`...4`, `55-59`=`...5`, `60-64`=`...6`, \r\n         `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(Age, Pop, c(3:10)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata4 <- merge(edata4, pop4)\r\n\r\n#25th March file\r\nurl5 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx\"\r\ntemp <- curl_download(url=url5, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata5 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(Age, Vax, c(3:10)) %>% \r\n  mutate(Date=as.Date(\"2021-03-21\"))\r\n\r\npop5 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`, \r\n         `60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(Age, Pop, c(3:11)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata5 <- merge(edata5, pop5)\r\n\r\n#1st April file\r\nurl6 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx\"\r\ntemp <- curl_download(url=url6, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata6 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(Age, Vax, c(3:10)) %>% \r\n  mutate(Date=as.Date(\"2021-03-28\"))\r\n\r\npop6 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`, \r\n         `60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(Age, Pop, c(3:11)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata6 <- merge(edata6, pop6)\r\n\r\n#8th April file\r\nurl7 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/03/COVID-19-weekly-announced-vaccinations-25-March-2021-revised.xlsx\"\r\ntemp <- curl_download(url=url7, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata7 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(Age, Vax, c(3:10)) %>% \r\n  mutate(Date=as.Date(\"2021-04-04\"))\r\n\r\npop7 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`, \r\n         `60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(Age, Pop, c(3:11)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata7 <- merge(edata7, pop7)\r\n\r\n#15th April file\r\nurl8 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-15-April-2021.xlsx\"\r\ntemp <- curl_download(url=url8, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata8 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:O6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u50=`...3`, `50-54`=`...4`, `55-59`=`...5`, \r\n         `60-64`=`...6`, `65-69`=`...7`, `70-74`=`...8`, `75-79`=`...9`, `80+`=`...10`) %>% \r\n  gather(Age, Vax, c(3:10)) %>% \r\n  mutate(Date=as.Date(\"2021-04-11\"))\r\n\r\npop8 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"O16:Y6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u50`=`...4`, `50-54`=`...5`, `55-59`=`...6`, \r\n         `60-64`=`...7`, `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(Age, Pop, c(3:11)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata8 <- merge(edata8, pop8)\r\n\r\n#22nd April file\r\nurl9 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-22-April-2021.xlsx\"\r\ntemp <- curl_download(url=url9, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata9 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:P6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`,  `45-49`=`...4`, `50-54`=`...5`, \r\n         `55-59`=`...6`, `60-64`=`...7`, \r\n         `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(Age, Vax, c(3:11)) %>% \r\n  mutate(Date=as.Date(\"2021-04-18\"))\r\n\r\npop9 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"R16:AC6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u45`=`...4`, `45-49`=`...5`, `50-54`=`...6`, \r\n         `55-59`=`...7`, `60-64`=`...8`, `65-69`=`...9`, `70-74`=`...10`, `75-79`=`...11`,\r\n         `80+`=`...12`) %>% \r\n  gather(Age, Pop, c(3:12)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata9 <- merge(edata9, pop9)\r\n\r\n#29th April file\r\nurl10 <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-29-April-2021-.xlsx\"\r\ntemp <- curl_download(url=url10, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nedata10 <- read_excel(temp, sheet=\"MSOA\", range=\"F16:P6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, `<45`=`...3`,  `45-49`=`...4`, `50-54`=`...5`, \r\n         `55-59`=`...6`, `60-64`=`...7`, \r\n         `65-69`=`...8`, `70-74`=`...9`, `75-79`=`...10`, `80+`=`...11`) %>% \r\n  gather(Age, Vax, c(3:11)) %>% \r\n  mutate(Date=as.Date(\"2021-04-25\"))\r\n\r\npop10 <- read_excel(temp, sheet=\"Population estimates (NIMS)\", range=\"R16:AC6806\", col_names=FALSE) %>% \r\n  rename(msoa11cd=`...1`, msoa11nm=`...2`, u16=`...3`, `u45`=`...4`, `45-49`=`...5`, `50-54`=`...6`, \r\n         `55-59`=`...7`, `60-64`=`...8`, `65-69`=`...9`, `70-74`=`...10`, `75-79`=`...11`,\r\n         `80+`=`...12`) %>% \r\n  gather(Age, Pop, c(3:12)) %>% \r\n  select(-\"msoa11nm\")\r\n\r\nedata10 <- merge(edata10, pop10)\r\n\r\n#Calculate MSOA-level IMD decile\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE)[,c(1,2,5,6)]\r\ncolnames(IMD) <- c(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\ntemp <- tempfile()\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, RGN11NM) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\npop <- read_excel(file.path(temp2, \"SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx\"),\r\n                  sheet=\"Mid-2019 Persons\", range=\"A6:G34758\", col_names=FALSE)[,c(1,7)]\r\ncolnames(pop) <- c(\"LSOA11CD\", \"pop\")\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup()  %>% \r\n  arrange(-IMDrank) %>% \r\n  #Calculate weighted deciles (there must be a function to do this elegantly)\r\n  mutate(rank=1:nrow(.), cumsum=cumsum(pop), prop=cumsum/max(cumsum),\r\n         IMD=case_when(\r\n           prop<0.1 ~ 1,\r\n           prop<0.2 ~ 2,\r\n           prop<0.3 ~ 3,\r\n           prop<0.4 ~ 4,\r\n           prop<0.5 ~ 5,\r\n           prop<0.6 ~ 6,\r\n           prop<0.7 ~ 7,\r\n           prop<0.8 ~ 8,\r\n           prop<0.9 ~ 9,\r\n           TRUE ~ 10)) %>% \r\n  select(MSOA11CD, IMD)\r\n\r\n#Bring together\r\nedata <- bind_rows(edata1, edata2, edata3, edata4, edata5, edata6, edata7, edata8, edata9, edata10) %>% \r\n  merge(IMD_MSOA, by.x=\"msoa11cd\", by.y=\"MSOA11CD\") %>% \r\n  group_by(Age, Date, IMD) %>% \r\n  summarise(Vax=sum(Vax), Pop=sum(Pop)) %>% \r\n  ungroup() %>% \r\n  mutate(Vaxprop=Vax/Pop, Country=\"England\")\r\n\r\ndata <- bind_rows(edata, swdata) %>% \r\n  mutate(IMD=case_when(\r\n    Country==\"Wales\" ~ IMD*2-0.5,\r\n    TRUE ~ IMD),\r\n    Age=factor(Age, levels=c(\"u45\", \"45-49\", \"u50\", \"50-54\", \"u55\", \"55-59\", \"u60\", \"60-64\", \"u65\", \r\n                             \"65-69\", \"u70\", \"70-74\", \"75-79\", \"80+\")))\r\n\r\n#Full dataset\r\nagg_tiff(\"Outputs/COVIDVaxIneqGB.tiff\", units=\"in\", width=11, height=7, res=800)\r\ndata %>% filter(!Age %in% c(\"u45\", \"u50\", \"u55\", \"u60\", \"u65\", \"u70\")) %>% \r\nggplot(aes(x=IMD, y=Vaxprop, group=Date, colour=as.Date(Date)))+\r\n  geom_line()+\r\n  scale_x_continuous(breaks=c(2,9), labels=c(\"Least\\ndeprived\", \"Most\\ndeprived\"),\r\n                     name=\"Deprivation\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), name=\"Proportion of adults vaccinated\",\r\n                     limits=c(0,1))+\r\n  scale_colour_paletteer_c(\"viridis::magma\", name=\"Date\", direction=-1, trans=\"date\")+\r\n  facet_grid(Country~Age)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        axis.text.x=element_text(size=rel(0.8)), plot.title=element_text(face=\"bold\", size=rel(1.4)))+\r\n  labs(title=\"Shifting patterns in vaccination inequality over time\",\r\n       subtitle=\"Vaccine delivery rates in England, Scotland and Wales by age and deprivation\",\r\n       caption=\"Data from NHS England, PHS & PHW | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Compare countries at ~mid-March\r\nagg_tiff(\"Outputs/COVIDVaxIneqMarch.tiff\", units=\"in\", width=8, height=7, res=800)\r\ndata %>% filter(!Age %in% c(\"u55\", \"u60\", \"u65\", \"u70\")) %>% \r\n  filter(Country==\"Wales\" & Date==as.Date(\"2021-03-15\") | \r\n           Country==\"Scotland\" & Date==as.Date(\"2021-03-17\")|\r\n           Country==\"England\" & Date==as.Date(\"2021-03-14\")) %>% \r\n  ggplot(aes(x=IMD, y=Vaxprop, group=Country, colour=Country))+\r\n  geom_line()+\r\n  scale_x_continuous(breaks=c(2,9), labels=c(\"Least\\ndeprived\", \"Most\\ndeprived\"),\r\n                     name=\"Deprivation\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), name=\"Proportion of adults vaccinated\",\r\n                     limits=c(0,1))+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\")+\r\n  facet_wrap(~Age)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        axis.text.x=element_text(size=rel(1)), text=element_text(family=\"Roboto\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)))+\r\n  labs(title=\"Scotland vaccinated more deprived groups first...\",\r\n       subtitle=\"Vaccine delivery rates by age and deprivation. Data from mid-March.\",\r\n       caption=\"Data from NHS England, PHS & PHW | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Compare countries at ~mid-March\r\nagg_tiff(\"Outputs/COVIDVaxIneqApril.tiff\", units=\"in\", width=8, height=7, res=800)\r\ndata %>% filter(!Age %in% c(\"45-49\", \"u55\", \"u60\", \"u65\", \"u70\")) %>% \r\n  filter(Country==\"Wales\" & Date==as.Date(\"2021-04-15\") | \r\n           Country==\"Scotland\" & Date==as.Date(\"2021-04-21\")|\r\n           Country==\"England\" & Date==as.Date(\"2021-04-18\")) %>% \r\n  ggplot(aes(x=IMD, y=Vaxprop, group=Country, colour=Country))+\r\n  geom_line()+\r\n  scale_x_continuous(breaks=c(2,9), labels=c(\"Least\\ndeprived\", \"Most\\ndeprived\"),\r\n                     name=\"Deprivation\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), name=\"Proportion of adults vaccinated\",\r\n                     limits=c(0,1))+\r\n  scale_colour_paletteer_d(\"wesanderson::Darjeeling1\")+\r\n  facet_wrap(~Age)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        axis.text.x=element_text(size=rel(1)), text=element_text(family=\"Roboto\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)))+\r\n  labs(title=\"...but inequality reasserted itself as vaccination coverage increased\",\r\n       subtitle=\"Vaccine delivery rates by age and deprivation. Data from mid-April\",\r\n       caption=\"Data from NHS England, PHS & PHW | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#England only\r\nagg_tiff(\"Outputs/COVIDVaxIneqEng.tiff\", units=\"in\", width=8, height=7, res=800)\r\ndata %>% filter(Country==\"England\" & !Age %in% c(\"u50\", \"u55\", \"u60\", \"u65\", \"u70\")) %>% \r\n  ggplot(aes(x=IMD, y=Vaxprop, group=Date, colour=as.Date(Date)))+\r\n  geom_line()+\r\n  facet_wrap(~Age)+\r\n  scale_x_continuous(breaks=c(2,9), labels=c(\"Least\\ndeprived\", \"Most\\ndeprived\"),\r\n                     name=\"Deprivation\")+\r\n  scale_y_continuous(labels=label_percent(accuracy=1), name=\"Proportion of adults vaccinated\",\r\n                     limits=c(0,1))+\r\n  scale_colour_paletteer_c(\"viridis::magma\", name=\"Date\", direction=-1, trans=\"date\")+\r\n  facet_wrap(~Age)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        axis.text.x=element_text(size=rel(1)), text=element_text(family=\"Roboto\"),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        legend.text=element_text())+\r\n  labs(title=\"Vaccination rates in more deprived areas remain lower\",\r\n       subtitle=\"Vaccine delivery rates in England by age and deprivation based on MSOA-level data\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaccinationMSOACartogram.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(curl)\r\nlibrary(tidyverse)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(sf)\r\nlibrary(scales)\r\nlibrary(ragg)\r\nlibrary(gtools)\r\nlibrary(ggridges)\r\nlibrary(patchwork)\r\nlibrary(extrafont)\r\nlibrary(ggrepel)\r\nlibrary(cowplot)\r\nlibrary(ggtext)\r\n\r\n#Download vaccination data by MSOA\r\n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/\r\nmaxdate <- \"18th July\"\r\n\r\nvax <- tempfile()\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/07/COVID-19-weekly-announced-vaccinations-22-July-2021.xlsx\"\r\nvax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read_excel(vax, sheet=\"MSOA\", range=\"F15:AK6805\", col_names=FALSE) %>% \r\n  set_names(\"msoa11cd\", \"msoa11nm\", \"<18_1st\", \"18-24_1st\", \"25-29_1st\", \"30-34_1st\", \"35-39_1st\", \"40-44_1st\", \r\n            \"45-49_1st\", \"50-54_1st\", \"55-59_1st\", \"60-64_1st\", \"65-69_1st\", \"70-74_1st\", \r\n            \"75-79_1st\", \"80+_1st\", \"blank\", \"<25_2nd\", \"25-29_2nd\", \"30-34_2nd\", \"35-39_2nd\", \"40-44_2nd\", \r\n            \"45-49_2nd\", \"50-54_2nd\", \"55-59_2nd\", \"60-64_2nd\", \"65-69_2nd\", \"70-74_2nd\", \r\n            \"75-79_2nd\", \"80+_2nd\", \"blank2\", \"Total\") %>% \r\n  mutate(`<18_1st`=as.numeric(`<18_1st`),\r\n         `18-24_1st`=as.numeric(`18-24_1st`),\r\n    `<25_1st`=case_when(\r\n    is.na(`<18_1st`) ~ Total-`25-29_1st`-`30-34_1st`-`35-39_1st`-`40-44_1st`-`45-49_1st`-`50-54_1st`-\r\n      `55-59_1st`-`60-64_1st`-`65-69_1st`-`70-74_1st`-`75-79_1st`-`80+_1st`-`<25_2nd`-`25-29_2nd`-\r\n      `30-34_2nd`-`35-39_2nd`-`40-44_2nd`-`45-49_2nd`-`50-54_2nd`-\r\n      `55-59_2nd`-`60-64_2nd`-`65-69_2nd`-`70-74_2nd`-`75-79_2nd`-`80+_2nd`,\r\n    TRUE ~ `<18_1st`+`18-24_1st`)) %>% \r\n  select(-c(blank, blank2, `<18_1st`, `18-24_1st`, Total)) %>% \r\n  pivot_longer(c(3:28), names_to=c(\"age\", \"dose\"), names_sep=\"_\", values_to=\"vaccinated\")\r\n    \r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE)[,c(1,2,5,6)]\r\ncolnames(IMD) <- c(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\ntemp <- tempfile()\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, RGN11NM) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\npop <- read_excel(file.path(temp2, \"SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx\"),\r\n                  sheet=\"Mid-2019 Persons\", range=\"A6:G34758\", col_names=FALSE)[,c(1,7)]\r\ncolnames(pop) <- c(\"LSOA11CD\", \"pop\")\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() \r\n\r\npop2 <- read_excel(vax, sheet=\"Population estimates (NIMS)\", range=\"W16:AL6806\", col_names=FALSE) %>% \r\n  select(-c(2,3)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:14)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...4\" ~ \"<25\",\r\n    age==\"...5\" ~ \"25-29\", \r\n    age==\"...6\" ~ \"30-34\",\r\n    age==\"...7\" ~ \"35-39\",\r\n    age==\"...8\" ~ \"40-44\",\r\n    age==\"...9\" ~ \"45-49\",\r\n    age==\"...10\" ~ \"50-54\",\r\n    age==\"...11\" ~ \"55-59\",\r\n    age==\"...12\" ~ \"60-64\",\r\n    age==\"...13\" ~ \"65-69\",\r\n    age==\"...14\" ~ \"70-74\",\r\n    age==\"...15\" ~ \"75-79\",\r\n    TRUE ~ \"80+\")) %>% \r\n  group_by(msoa11cd, age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\n#COMBINE\r\nvaxdata <- merge(vaxdata, pop2) %>% \r\n  merge(IMD_MSOA %>% select(-pop), by.x=\"msoa11cd\", by.y=\"MSOA11CD\") %>% \r\n  mutate(vaxprop=vaccinated/pop)\r\n\r\n#Add totals\r\nvaxdata <- vaxdata %>% \r\n  group_by(msoa11cd, msoa11nm, IMDrank, dose) %>% \r\n  summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>% \r\n  mutate(vaxprop=vaccinated/pop, age=\"Total\") %>% \r\n  ungroup() %>% \r\n  bind_rows(vaxdata)\r\n\r\n#Download Carl Baker's lovely cartogram\r\nmsoa <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\nmsoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode=\"wb\")\r\n\r\nBackgroundMSOA <- st_read(msoa, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(vaxdata, by=\"msoa11cd\")\r\n\r\nGroupsMSOA <- st_read(msoa, layer=\"2 Groups\")\r\n\r\nGroup_labelsMSOA <- st_read(msoa, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAsMSOA <- st_read(msoa, layer=\"3 Local authority outlines (2019)\")\r\n\r\nplottotal1 <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA %>% filter(age==\"Total\" & dose==\"1st\"), \r\n          aes(geometry=geom, fill=vaxprop), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of adult population vaccinated\", limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\",\r\n        plot.title.position=\"plot\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Overall adult 1st dose vaccination rates\",\r\n       subtitle=paste0(\"People vaccinated with at least one dose in England by Middle Super Output Area.\\nData up to \", maxdate, \"\\n \"),       \r\n       caption=\"Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogramDose1.tiff\", units=\"in\", width=10, height=8, res=800)\r\nplottotal1\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDVaxMSOACartogramDose1.png\", units=\"in\", width=10, height=8, res=800)\r\nplottotal1\r\ndev.off()\r\n\r\nplottotal2 <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA %>% filter(age==\"Total\" & dose==\"2nd\"), \r\n          aes(geometry=geom, fill=vaxprop), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of adult population vaccinated\", limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Overall adult 2nd dose vaccination rates\",\r\n       subtitle=paste0(\"People vaccinated with two doses in England by Middle Super Output Area.\\nData up to \", maxdate, \"\\n \"),       \r\n       caption=\"Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogramDose2.tiff\", units=\"in\", width=10, height=8, res=800)\r\nplottotal2\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDVaxMSOACartogramDose2.png\", units=\"in\", width=10, height=8, res=800)\r\nplottotal2\r\ndev.off()\r\n\r\nplottotal <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA %>% filter(age==\"Total\"), \r\n          aes(geometry=geom, fill=vaxprop), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of adult population vaccinated\", limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  facet_wrap(~dose)+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\",\r\n        strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Overall adult vaccination rates\",\r\n       subtitle=paste0(\"Over 16 year-olds vaccinated with one or two doses in England by Middle Super Output Area.\\nData up to \", maxdate, \"\\n \"),       \r\n       caption=\"Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogram.tiff\", units=\"in\", width=10, height=8, res=800)\r\nplottotal\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDVaxMSOACartogram.png\", units=\"in\", width=10, height=8, res=800)\r\nplottotal\r\ndev.off()\r\n\r\nplot10 <- ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=MSOA %>% filter(age==\"Total\") %>% mutate(flag=if_else(vaxprop>=0.5, 1, 0)), \r\n          aes(geometry=geom, fill=as.factor(flag)), colour=NA, show.legend=FALSE)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_d(\"wesanderson::Darjeeling1\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n        text=element_text(family=\"Roboto\"), plot.subtitle=element_markdown())+\r\n  labs(title=\"Who is half way there?\",\r\n       subtitle=\"Neighbourhoods in England where <span style='color:#00A08A;'>over 50% of adults </span>have received at least one dose of COVID vaccine\",       \r\n       caption=\"Data from NHS England, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOACartogramHalfWay.tiff\", units=\"in\", width=10, height=8, res=800)\r\nplot10\r\ndev.off()\r\n\r\n#Calculate deprivation gradients within IMD deciles\r\n#Allocate to deciles\r\nvaxdeciles <- vaxdata %>% \r\n  mutate(decile=quantcut(-IMDrank, 10, labels=FALSE)) %>% \r\n  group_by(age, decile, dose) %>% \r\n  mutate(decilemean=sum(vaccinated)/sum(pop)) %>% \r\n  ungroup() %>% \r\n  group_by(age) %>% \r\n  mutate(popmean=sum(vaccinated)/sum(pop)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOASxIMDScatter.tiff\", units=\"in\", width=12, height=8, res=800)\r\nggplot(vaxdeciles %>% filter(age==\"Total\", dose==\"1st\"), \r\n       aes(x=vaxprop, y=as.factor(decile), colour=vaxprop))+\r\n  geom_jitter(shape=21, alpha=0.6, show.legend=FALSE)+\r\n  geom_segment(aes(x=popmean, xend=popmean, y=Inf, yend=-Inf), colour=\"Grey20\")+\r\n  geom_point(aes(x=decilemean, y=as.factor(decile)), colour=\"Grey20\", fill=\"Cyan\", shape=23, size=2)+\r\n  scale_colour_paletteer_c(\"viridis::magma\", direction=-1)+\r\n  scale_x_continuous(name=\"Proportion of adult population vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"Index of Multiple Deprivation\", labels=c(\"1 - least deprived\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \r\n                                                                    \"8\", \"9\", \"10 - most deprived\"))+  \r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"COVID 1st dose vaccination rates are lower in more deprived areas in England\",\r\n       subtitle=\"Number of adults vaccinated by MSOA compared compared to the estimated 80+ population in 2019.\",\r\n       caption=\"Vaccination data from NHS England, Population data from ONS\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=0.7, y=9.9, label=\"Each circle = 1 MSOA\", size=3, family=\"Roboto\")+\r\n  annotate(\"text\", x=0.54, y=6.5, label=\"Population average\", size=3, family=\"Roboto\")+\r\n  annotate(\"text\", x=0.59, y=3.5, label=\"Decile average\", size=3, family=\"Roboto\")+\r\n  geom_segment(aes(x=0.434, y=6.5,  xend=0.5, yend=6.5), colour=\"Grey20\")+\r\n  geom_segment(aes(x=0.56, y=3.55,  xend=0.49, yend=3.95), colour=\"Grey20\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOASxIMDRidges.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(vaxdeciles %>% filter(age==\"Total\"),\r\n       aes(x=vaxprop, y=as.factor(decile), fill=dose))+\r\n  geom_density_ridges(rel_min_height=0.01, show.legend=FALSE, alpha=0.7)+\r\n  scale_y_discrete(name=\"Index of Multiple Deprivation\", labels=c(\"1 - least deprived\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \r\n                                                                  \"8\", \"9\", \"10 - most deprived\"))+ \r\n  scale_x_continuous(name=\"Proportion of adult population vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"rcartocolor::Safe\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.caption.position=\"plot\", plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccination rates in England are lower in more deprived areas\",\r\n       subtitle=\"Distribution of MSOA-level <span style='color:#88CCEE;'>first</span> and <span style='color:#CC6677;'>second</span> dose vaccination rates for adults (aged 16+) in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOASxIMDxAgeRidges.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot(vaxdeciles %>% filter(age!=\"Total\"),\r\n       aes(x=vaxprop, y=as.factor(decile), fill=dose))+\r\n  geom_density_ridges(rel_min_height=0.01, show.legend=FALSE, alpha=0.7)+\r\n  scale_y_discrete(name=\"Index of Multiple Deprivation\", labels=c(\"1 - least deprived\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \r\n                                                                  \"8\", \"9\", \"10 - most deprived\"))+ \r\n  scale_x_continuous(name=\"Proportion of population vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"rcartocolor::Safe\")+\r\n  facet_wrap(~age)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.caption.position=\"plot\", plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"Vaccination rates in England are lower in more deprived areas\",\r\n       subtitle=\"Distribution of MSOA-level <span style='color:#88CCEE;'>first</span> and <span style='color:#CC6677;'>second</span> dose vaccination rates for adults (aged 16+) in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOASxIMDScatterxAge.tiff\", units=\"in\", width=12, height=8, res=800)\r\nggplot(vaxdata %>% filter(age!=\"Total\"), aes(x=vaxprop, y=-IMDrank, colour=dose))+\r\n  geom_point(shape=21, alpha=0.6, show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Proportion of population vaccinated\", labels=label_percent(accuracy=1))+\r\n  scale_y_continuous(name=\"Index of Multiple Deprivation\", breaks=c(0, -32507),\r\n                     labels=c(\"Most deprived\", \"Least deprived\"))+\r\n  scale_colour_paletteer_d(\"rcartocolor::Safe\")+\r\n  facet_wrap(~age)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.caption.position=\"plot\", plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"Vaccination rates in England are lower in more deprived areas\",\r\n       subtitle=\"Distribution of MSOA-level <span style='color:#88CCEE;'>first</span> and <span style='color:#CC6677;'>second</span> dose vaccination rates for adults (aged 16+) in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOASxIMDScatter.tiff\", units=\"in\", width=12, height=8, res=800)\r\nggplot(vaxdata %>% filter(age==\"Total\"), aes(x=vaxprop, y=-IMDrank, colour=dose))+\r\n  geom_point(shape=21, alpha=0.6, show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Proportion of population vaccinated\", labels=label_percent(accuracy=1))+\r\n  scale_y_continuous(name=\"Index of Multiple Deprivation\", breaks=c(0, -32507),\r\n                     labels=c(\"Most deprived\", \"Least deprived\"))+\r\n  scale_colour_paletteer_d(\"rcartocolor::Safe\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"), plot.title.position=\"plot\",\r\n        plot.caption.position=\"plot\", plot.subtitle=element_markdown(),\r\n        strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"Vaccination rates in England are lower in more deprived areas\",\r\n       subtitle=\"Distribution of MSOA-level <span style='color:#88CCEE;'>first</span> and <span style='color:#CC6677;'>second</span> dose vaccination rates for adults (aged 16+) in England\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#############################\r\n#Local analysis\r\n#Download MSOA map\r\n#Download shapefile of LA boundaries\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\r\nname <- list.files(temp2, pattern=\".shp\")\r\nshapefile <- st_read(file.path(temp2, name))\r\n\r\n\r\nmap <- full_join(shapefile, MSOA %>% \r\n                   select(Laname, msoa11cd, IMDrank, vaxprop, pop, age, dose) %>% \r\n                   as.data.frame(), \r\n                 by=\"msoa11cd\", all.y=TRUE)\r\n\r\nSheffIMD <- map %>% filter(age==\"Total\" & Laname==\"Sheffield\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(geometry=geometry, fill=IMDrank), show.legend=FALSE, colour=NA)+\r\n  scale_fill_paletteer_c(\"pals::ocean.matter\")+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)), text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Index of Multiple deprivation\",\r\n       subtitle=\"Darker colours = more deprived\")\r\n\r\nSheffvax <- map %>% filter(age!=\"Total\" & Laname==\"Sheffield\" & dose==\"1st\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(geometry=geometry, fill=vaxprop), colour=NA)+\r\n  facet_wrap(~age)+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of\\npopulation\\nvaccinated\", limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)), text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"COVID-19 first dose vaccination rates\",\r\n       caption=\"Data from NHS England and ONS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOASSheffield.tiff\", units=\"in\", width=12, height=8, res=800)\r\nSheffIMD+Sheffvax\r\ndev.off()\r\n\r\n#Scatterplot of vax rates by MSOA in Sheffield\r\nscatterdata <- MSOA %>% \r\n  filter(Laname==\"Sheffield\" & age %in% c(\"80+\", \"75-79\", \"70-74\", \"65-69\", \"60-64\",\r\n                                                 \"55-59\", \"50-54\", \"45-49\", \"40-44\")) %>%\r\n  group_by(msoa11cd, MSOA.name.HCL, IMDrank, dose) %>% \r\n  summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(vaxprop=vaccinated/pop,\r\n         labels=if_else(vaxprop<0.75, MSOA.name.HCL, \"\")) \r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOASheffieldScatter.tiff\", units=\"in\", width=12, height=6, res=800)\r\nggplot(scatterdata, aes(x=vaxprop, y=-IMDrank))+\r\n  geom_point(aes(size=pop), shape=21, colour=\"DarkRed\", fill=\"tomato\", alpha=0.8)+\r\n  geom_segment(aes(x=1, xend=1, y=-1000, yend=-32000), colour=\"Grey70\")+\r\n  geom_text_repel(aes(label=labels), family=\"Roboto\", size=rel(3),\r\n                  box.padding = 0.4)+\r\n  scale_x_continuous(name=\"Proportion of population aged 40+ vaccinated\", \r\n                     labels=label_percent(accuracy=1), limits=c(NA, 1))+\r\n  scale_y_continuous(name=\"Index of Multiple Deprivation rank\", breaks=c(-1000, -32000),\r\n                     labels=c(\"Most deprived\", \"Least deprived\"))+\r\n  scale_size_continuous(name=\"Population\\nover 40\")+\r\n  facet_wrap(~dose)+\r\n  theme_classic()+\r\n  theme(axis.ticks.y=element_blank(), text=element_text(family=\"Roboto\"),\r\n        axis.text.y=element_text(size=rel(1.2), colour=\"Black\"),\r\n        plot.title.position=\"plot\", plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        plot.subtitle=element_text(colour=\"Grey50\"), plot.caption.position =\"plot\",\r\n        plot.caption=element_text(colour=\"Grey50\"), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n  labs(title=\"Vaccine delivery is lowest in a small number of deprived areas in Sheffield\",\r\n       subtitle=\"COVID-19 vaccination rates in adults aged 40+ by dose\",\r\n       caption=\"Data from NHS England, populations from NIMS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Regional version for Yorkshire\r\nscatterdata2 <- MSOA %>% \r\n  filter(RegionNation==\"Yorkshire and The Humber\" & age %in% c(\"80+\", \"75-79\", \"70-74\", \"65-69\", \r\n                                                               \"60-64\", \"55-59\", \"50-54\", \"45-49\", \r\n                                                               \"40-44\")) %>%\r\n  group_by(msoa11cd, MSOA.name.HCL, IMDrank, dose) %>% \r\n  summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(vaxprop=vaccinated/pop,\r\n         labels=if_else(vaxprop<0.6, MSOA.name.HCL, \"\")) \r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOAYorksScatter.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(scatterdata2 %>% filter(dose==\"1st\"), aes(x=vaxprop, y=-IMDrank))+\r\n  geom_point(aes(size=pop), shape=21, colour=\"DarkRed\", fill=\"tomato\", alpha=0.8)+\r\n  geom_segment(aes(x=1, xend=1, y=-1000, yend=-32000), colour=\"Grey70\")+\r\n  geom_text_repel(aes(label=labels), family=\"Roboto\", size=rel(2.2),\r\n                  box.padding = 0.5, min.segment.length=0)+\r\n  scale_x_continuous(name=\"Proportion of population aged 40+ vaccinated\", \r\n                     labels=label_percent(accuracy=1), limits=c(NA, 1))+\r\n  scale_y_continuous(name=\"Index of Multiple Deprivation rank\", breaks=c(-1000, -32000),\r\n                     labels=c(\"Most deprived\", \"Least deprived\"), limits=c(NA, 2000))+\r\n  scale_size_continuous(name=\"Over 40\\npopulation\")+\r\n  theme_classic()+\r\n  theme(axis.ticks.y=element_blank(), text=element_text(family=\"Roboto\"),\r\n        axis.text.y=element_text(size=rel(1.2), colour=\"Black\"),\r\n        plot.title.position=\"plot\", plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        plot.subtitle=element_text(colour=\"Grey50\"), plot.caption.position =\"plot\",\r\n        plot.caption=element_text(colour=\"Grey50\"))+\r\n  labs(title=\"Vaccine delivery is lowest in a small number of deprived areas in Yorkshire\",\r\n       subtitle=\"Proportion of adults aged 40+ who have received at least one dose of COVID-19 vaccine\",\r\n       caption=\"Data from NHS England, populations from NIMS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Calculate age-standardised vaccination rates\r\nasvax <- vaxdata %>% \r\n  filter(age!=\"Total\") %>% \r\n  select(-c(vaccinated, pop)) %>% \r\n  pivot_wider(names_from=c(\"age\", \"dose\"), names_sep=\"_\", values_from=vaxprop) %>% \r\n  mutate(asrate_1st=(`<25_1st`*(0.8*5500+6000)+`25-29_1st`*(6000)+`30-34_1st`*6500+\r\n         `35-39_1st`*7000+`40-44_1st`*7000+`45-49_1st`*7000+`50-54_1st`*7000+`55-59_1st`*6500+\r\n         `60-64_1st`*6000+`65-69_1st`*5500+`70-74_1st`*5000+`75-79_1st`*4000+\r\n         `80+_1st`*5000)/82900,\r\n         asrate_2nd=(`<25_2nd`*(0.8*5500+6000)+`25-29_2nd`*(6000)+`30-34_2nd`*6500+\r\n                     `35-39_2nd`*7000+`40-44_2nd`*7000+`45-49_2nd`*7000+`50-54_2nd`*7000+\r\n                     `55-59_2nd`*6500+ `60-64_2nd`*6000+`65-69_2nd`*5500+`70-74_2nd`*5000+\r\n                     `75-79_2nd`*4000+ `80+_2nd`*5000)/82900)\r\n  \r\n\r\nMSOA2 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(asvax, by=\"msoa11cd\") %>% \r\n  filter(RegionNation!=\"Wales\")\r\n\r\n  plot10 <- ggplot()+\r\n    geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n    geom_sf(data=MSOA2, \r\n            aes(geometry=geom, fill=asrate_1st), colour=NA)+\r\n    geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n            aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n    geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n            aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n    geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n                 aes(geometry=geom, label=Group.labe,\r\n                     hjust=just), size=rel(2.4), colour=\"Black\")+\r\n    scale_fill_paletteer_c(\"pals::ocean.dense\", direction=-1, \r\n                           name=\"Proportion of adults vaccinated with at least one dose\\n(age-standardised)\", limits=c(0,NA),\r\n                           labels=label_percent(accuracy=1))+\r\n    theme_void()+\r\n    theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n          text=element_text(family=\"Roboto\"), legend.position=\"top\",\r\n          plot.title.position=\"plot\", plot.caption.position=\"plot\")+\r\n    guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                 barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n    labs(title=\"Vaccination rates are lowest in urban areas even after accounting\\nfor the fact that they tend to have younger populations\\n \\n \",\r\n         caption=\"Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n  \r\n  agg_tiff(\"Outputs/COVIDVaxMSOAAgeStdCartogram1st.tiff\", units=\"in\", width=9, height=10, res=800)\r\n  plot10\r\n  dev.off()\r\n  \r\n  agg_png(\"Outputs/COVIDVaxMSOAAgeStdCartogram1st.png\", units=\"in\", width=9, height=10, res=800)\r\n  plot10\r\n  dev.off()\r\n  \r\n  plot11 <- ggplot()+\r\n    geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n    geom_sf(data=MSOA2, \r\n            aes(geometry=geom, fill=asrate_2nd), colour=NA)+\r\n    geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n            aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n    geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n            aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n    geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n                 aes(geometry=geom, label=Group.labe,\r\n                     hjust=just), size=rel(2.4), colour=\"Black\")+\r\n    scale_fill_paletteer_c(\"pals::ocean.dense\", direction=-1, \r\n                           name=\"Proportion of adults vaccinated with two doses\\n(age-standardised)\", limits=c(0,NA),\r\n                           labels=label_percent(accuracy=1))+\r\n    theme_void()+\r\n    theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n          text=element_text(family=\"Roboto\"), legend.position=\"top\",\r\n          plot.title.position=\"plot\", plot.caption.position=\"plot\")+\r\n    guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                 barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n    labs(title=\"Vaccination rates are lowest in urban areas even after accounting\\nfor the fact that they tend to have younger populations\\n \\n \",\r\n         caption=\"Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n  \r\n  agg_tiff(\"Outputs/COVIDVaxMSOAAgeStdCartogram2nd.tiff\", units=\"in\", width=9, height=10, res=800)\r\n  plot11\r\n  dev.off()\r\n  \r\n  agg_png(\"Outputs/COVIDVaxMSOAAgeStdCartogram2nd.png\", units=\"in\", width=9, height=10, res=800)\r\n  plot11\r\n  dev.off()\r\n  \r\ntempdata <- MSOA2 %>% \r\n  gather(dose, vaxprop, c(\"asrate_1st\", \"asrate_2nd\")) %>% \r\n  mutate(dose=substr(dose, 8,11))\r\n  \r\n  plot12 <- ggplot()+\r\n    geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n    geom_sf(data=tempdata, \r\n            aes(geometry=geom, fill=vaxprop), colour=NA)+\r\n    geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n            aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n    geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n            aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n    geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n                 aes(geometry=geom, label=Group.labe,\r\n                     hjust=just), size=rel(2.4), colour=\"Black\")+\r\n    scale_fill_paletteer_c(\"pals::ocean.dense\", direction=-1, \r\n                           name=\"Proportion of adults vaccinated with two doses\\n(age-standardised)\", limits=c(0,NA),\r\n                           labels=label_percent(accuracy=1))+\r\n    facet_wrap(~dose)+\r\n    theme_void()+\r\n    theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n          text=element_text(family=\"Roboto\"), legend.position=\"top\",\r\n          plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n    guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                 barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n    labs(title=\"Vaccination rates are lowest in urban areas even after accounting\\nfor the fact that they tend to have younger populations\\n \\n \",\r\n         caption=\"Data from NHS England, populations from NIMS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n  \r\n  agg_tiff(\"Outputs/COVIDVaxMSOAAgeStdCartogram.tiff\", units=\"in\", width=9, height=8, res=800)\r\n  plot12\r\n  dev.off()\r\n  \r\n  agg_png(\"Outputs/COVIDVaxMSOAAgeStdCartogram.png\", units=\"in\", width=9, height=8, res=800)\r\n  plot12\r\n  dev.off()\r\n  \r\n#Bivariate maps of age-standardised 1st dose vax rate against deprivation\r\n  BVmapdata <- MSOA2 %>% \r\n    filter(RegionNation!=\"Wales\") %>% \r\n    mutate(IMDtert=quantcut(-IMDrank, q=3, labels=FALSE),\r\n           vaxtert=quantcut(asrate_1st, q=3, labels=FALSE))\r\n  \r\n  #Generate key\r\n  keydata <- data.frame(IMDtert=c(1,2,3,1,2,3,1,2,3), \r\n                        vaxtert=c(1,1,1,2,2,2,3,3,3),\r\n                        RGB=c(\"#e8e8e8\", \"#dfb0d6\", \"#be64ac\", \r\n                              \"#ace4e4\", \"#a5add3\", \"#8c62aa\", \r\n                              \"#5ac8c8\", \"#5698b9\", \"#3b4994\"))\r\n  \r\n  \r\n  #Bring colours into main data for plotting\r\n  BVmapdata <- left_join(BVmapdata, keydata, by=c(\"IMDtert\", \"vaxtert\"))\r\n\r\nkey <- ggplot(keydata)+\r\n    geom_tile(aes(x=IMDtert, y=vaxtert, fill=RGB))+\r\n    scale_fill_identity()+\r\n    labs(x = expression(\"Greater deprivation\" %->%  \"\"),\r\n         y = expression(\"Higher vaccination rates\" %->%  \"\")) +\r\n    theme_classic() +\r\n    # make font small enough\r\n    theme(\r\n      axis.title = element_text(size = 9),axis.line=element_blank(), \r\n      axis.ticks=element_blank(), axis.text=element_blank())+\r\n    # quadratic tiles\r\n    coord_fixed()\r\n    \r\nBVmap <-  ggplot()+\r\n  geom_sf(data=BackgroundMSOA, aes(geometry=geom))+\r\n  geom_sf(data=BVmapdata, \r\n          aes(geometry=geom, fill=RGB), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.1)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsMSOA %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n    scale_fill_identity()+\r\n    theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"), plot.title.position = \"panel\")+\r\n  annotate(\"text\", x=56.5, y=14, label=\"Higher deprivation,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=53, y=14, xend=48, yend=14.3), curvature=-0.15)+\r\n  annotate(\"text\", x=45, y=2, label=\"Lower deprivation,\\nfewer vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=44, y=3.2, xend=42, yend=7.55), curvature=0.2)+\r\n  annotate(\"text\", x=51, y=35, label=\"Higher deprivation,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=49, y=34, xend=45.5, yend=31.7), curvature=-0.2)+\r\n  annotate(\"text\", x=19, y=43, label=\"Lower deprivation,\\nmore vaccinations\", size=3,\r\n           fontface=\"bold\", family=\"Lato\")+\r\n  geom_curve(aes(x=19.5, y=41.5, xend=22.2, yend=38.1), curvature=0.1)+\r\n  coord_sf(clip=\"off\")+\r\n  labs(title=\"Comparing deprivation with current vaccine coverage\",\r\n       subtitle=\"Age-standardised rates of delivery of at least one vaccine dose and area-level deprivation\\nmeasured using the Index of Multiple Deprivation\",       \r\n       caption=\"Data from MCHLG and NHS England, cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDBivariateIMDxVaxFull.tiff\", units=\"in\", width=8, height=10, res=800)\r\nggdraw()+\r\n  draw_plot(BVmap, 0,0,1,1)+\r\n  draw_plot(key, 0.66,0.66,0.30,0.30)\r\ndev.off()\r\n\r\n\r\n#Create tidy dataset\r\nYorksdata <- asvax %>% \r\n  select(msoa11cd, msoa11nm, IMDrank, asrate_1st, asrate_2nd) %>% \r\n  merge(vaxdata %>% filter(age==\"Total\") %>% \r\n          select(msoa11cd, dose, vaxprop) %>% \r\n          spread(dose, vaxprop)) %>% \r\n  mutate(natdecile=quantcut(-IMDrank, 10, labels=FALSE)) \r\n\r\nMSOA2 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(Yorksdata, by=\"msoa11cd\")\r\n\r\nYorksdata <- MSOA2 %>% \r\n  filter(RegionNation==\"Yorkshire and The Humber\") %>% \r\n  as.data.frame() %>% \r\n  select(msoa11cd, msoa11nm.y, Laname, `1st`, `2nd`, asrate_1st, asrate_2nd, \r\n         natdecile, IMDrank) %>% \r\n  mutate(Yorksdecile=quantcut(-IMDrank, 10, labels=FALSE))\r\n\r\nwrite.csv(Yorksdata, \"Data/YorkshireVaxData.csv\")\r\n\r\n\r\n#########################\r\nworking <- vaxdata %>% filter(age==\"Total\")\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaccinationPopAndIMD.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(scales)\r\nlibrary(ggtext)\r\nlibrary(gtools)\r\n\r\noptions(scipen=999999)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Have to download these two metrics separately for some reason?\r\ntemp <- tempfile()\r\nsourcevax <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&areaCode=E92000001&metric=vaccinationsAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=sourcevax, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read.csv(temp) %>% \r\n  select(date, age, newPeopleVaccinatedFirstDoseByVaccinationDate,\r\n         newPeopleVaccinatedSecondDoseByVaccinationDate,\r\n         newPeopleVaccinatedThirdInjectionByVaccinationDate) %>% \r\n  set_names(\"date\", \"age\", \"dose1\", \"dose2\", \"dose3\") %>% \r\n  mutate(date=as.Date(date)) \r\n\r\n#Bring in populations \r\nurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nONSpop <- read_excel(temp, sheet=\"MYE2 - Persons\", range=\"E8:CQ12\") %>% \r\n  slice_tail() %>% \r\n  gather(age, pop, c(1:ncol(.))) %>% \r\n  mutate(age=as.numeric(substr(age, 1, 2)),\r\n         age=case_when(\r\n           age<12 ~ \"00_11\",\r\n           age<16 ~ \"12_15\",\r\n           age<18 ~ \"16_17\",\r\n           age<25 ~ \"18_24\",\r\n           age<30 ~ \"25_29\",\r\n           age<35 ~ \"30_34\",\r\n           age<40 ~ \"35_39\",\r\n           age<45 ~ \"40_44\",\r\n           age<50 ~ \"45_49\",\r\n           age<55 ~ \"50_54\",\r\n           age<60 ~ \"55_59\",\r\n           age<65 ~ \"60_64\",\r\n           age<70 ~ \"65_69\",\r\n           age<75 ~ \"70_74\",\r\n           age<80 ~ \"75_79\",\r\n           age<85 ~ \"80_84\",\r\n           age<90 ~ \"85_89\",\r\n           TRUE ~ \"90+\")) %>% \r\n  group_by(age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\ndata <- merge(vaxdata, ONSpop, all=TRUE) %>% \r\n  mutate(dose1=if_else(is.na(dose1), 0, dose1),\r\n         dose2=if_else(is.na(dose2), 0, dose2),\r\n         dose3=if_else(is.na(dose3), 0, dose3),\r\n         date=if_else(is.na(date), max(date, na.rm=TRUE), date)) %>% \r\n  group_by(age) %>% \r\n  summarise(dose1=sum(dose1), dose2=sum(dose2), dose3=sum(dose3), pop=unique(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(dose2only=dose2-dose3,\r\n         dose1only=dose1-dose2,\r\n         unvaccinated=pop-dose1,\r\n         minage=as.numeric(substr(age, 1, 2)),\r\n         maxage=as.numeric(substr(age, 4, 5))+1,\r\n         maxage=if_else(is.na(maxage), 100, maxage),\r\n         age=gsub(\"_\", \"-\", age),\r\n         unvaccinated=if_else(unvaccinated<0, 0, unvaccinated)) \r\n\r\nagg_png(\"Outputs/COVIDVaxPyramidWithBoostersEngProp.png\", units=\"in\", res=800, width=9, height=7)\r\ndata %>% \r\n  gather(dose, no, c(dose1only, dose2only, dose3, unvaccinated)) %>% \r\n  mutate(dose=factor(dose, levels=c(\"dose3\", \"dose2only\",\"dose1only\",\"unvaccinated\"))) %>% \r\nggplot(aes(x=no, y=age, fill=dose))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_continuous(name=\"Proportion of the population\", labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_manual(values=c(\"#2BAA92FF\", \"#2F191BFF\",\"#D32934FF\",\"Grey70\"), name=\"\",\r\n                    guide=guide_legend(reverse=TRUE), \r\n                    labels=c(\"3 doses/booster\", \"2 doses\", \"1 dose\", \"Unvaccinated\"))+\r\n  theme_custom()+\r\n  labs(title=\"Many adults in England still haven't received a COVID booster jab\",\r\n       subtitle=paste0(\"Proportion of the population by vaccination status in England as of \", max(vaxdata$date)),\r\n       caption=\"Data from coronavirus.data.gov.uk | Population data from ONS | Plot by Colin Angus\")\r\n\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDVaxPyramidWithBoostersEng.png\", units=\"in\", res=800, width=10, height=8)\r\ndata %>% mutate(agewidth=maxage-minage,\r\n                unvaccinated=unvaccinated/agewidth,\r\n                dose1only=dose1only/agewidth,\r\n                dose2only=dose2only/agewidth,\r\n                dose3=dose3/agewidth) %>% \r\nggplot()+\r\n  geom_rect(aes(xmin=0, xmax=unvaccinated, ymin=minage, ymax=maxage), fill=\"Grey70\")+\r\n  geom_rect(aes(xmin=unvaccinated, xmax=unvaccinated+dose1only, ymin=minage, ymax=maxage), \r\n            fill=\"#D32934FF\")+\r\n  geom_rect(aes(xmin=unvaccinated+dose1only, xmax=unvaccinated+dose1only+dose2only, \r\n                ymin=minage, ymax=maxage), \r\n            fill=\"#2F191BFF\")+\r\n  geom_rect(aes(xmin=unvaccinated+dose1only+dose2only, \r\n                xmax=unvaccinated+dose1only+dose2only+dose3, \r\n                ymin=minage, ymax=maxage), \r\n            fill=\"#2BAA92FF\")+\r\n  scale_x_continuous(name=\"People at each single year of age\")+\r\n  scale_y_continuous(name=\"Age\", breaks=c(0,20,40,60,80,100))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown(colour=\"Grey30\"))+\r\n  labs(title=\"Many adults in England still haven't received a COVID booster jab\",\r\n       subtitle=\"Number of people who have received <span style='color:#D32934FF;'>one</span>, <span style='color:#2F191BFF;'>two</span> or <span style='color:#2BAA92FF;'>three</span> vaccine doses or <span style='color:Grey70;'>remain unvaccinated\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Population data from ONS | Plot by Colin Angus\")\r\n\r\ndev.off()\r\n\r\n###################################################\r\n#Deprivation analysis of vaccination rates\r\n#Start by calculating IMD at MSOA level\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE) %>% \r\n  select(c(1,2,5,6)) %>% \r\n  set_names(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, LAD17CD) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimates%2fmid2020sape23dt2/sape23dt2mid2020lsoasyoaestimatesunformatted.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\npop <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:G34758\", col_names=FALSE) %>% \r\n  select(-c(2:6)) %>% \r\n  set_names(\"LSOA11CD\", \"pop\")\r\n\r\npop_full <- read_excel(temp, sheet=\"Mid-2020 Persons\", range=\"A6:CT34758\", col_names=FALSE) %>% \r\n  select(-c(2:7)) %>% \r\n  set_names(\"LSOA11CD\", c(0:90))\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at LTLA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD, LAD17CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))\r\n\r\nIMD_LTLA <- IMD %>% \r\n  group_by(LAD17CD)%>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(decile=quantcut(IMDrank, q=10, labels=FALSE))\r\n\r\n#######################\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2022/01/COVID-19-weekly-announced-vaccinations-13-January-2022.xlsx\"\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nMSOAvax <- read_excel(temp, sheet=\"MSOA\", range=\"F15:AZ6803\", col_names=FALSE) %>% \r\n  select(c(1, 34:47)) %>% \r\n  set_names(\"MSOA11CD\", \"Under18\", \"18-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\", \"45-49\", \r\n            \"50-54\", \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \"80+\") %>% \r\n  merge(IMD_MSOA) %>% \r\n  select(-pop) %>% \r\n  mutate(Under18=as.numeric(if_else(Under18==\"*\", \"0\", Under18))) %>% \r\n  gather(age, boosted, c(2:15)) %>% \r\n  merge(pop_full %>% \r\n          gather(age, pop, c(2:92)) %>% \r\n          mutate(age=case_when(\r\n            age<18 ~ \"Under18\", age<25 ~ \"18-24\", age<30 ~ \"25-29\", age<35 ~ \"30-34\",\r\n            age<40 ~ \"35-39\", age<45 ~ \"40-44\", age<50 ~ \"45-49\",\r\n            age<55 ~ \"50-54\", age<60 ~ \"55-59\", age<65 ~ \"60-64\",\r\n            age<70 ~ \"65-69\", age<75 ~ \"70-74\", age<80 ~ \"75-79\", TRUE ~ \"80+\")) %>% \r\n          merge(lookup) %>% \r\n          group_by(MSOA11CD, age) %>% \r\n          summarise(pop=sum(pop)) %>% \r\n          ungroup()) %>% \r\n  group_by(age, decile) %>% \r\n  summarise(boosted=sum(boosted), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(boostpop=boosted/pop,\r\n         age=factor(age, levels=c(\"Under18\", \"18-24\", \"25-29\", \"30-34\", \"35-39\", \"40-44\", \"45-49\", \r\n                                  \"50-54\", \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \"80+\")))\r\n\r\nagg_png(\"Outputs/COVIDBoostersxIMDxAgev2.png\", units=\"in\", res=800, width=10, height=8)\r\n  ggplot(MSOAvax, aes(x=boosted/pop, y=as.factor(decile), fill=as.factor(decile)))+\r\n  geom_col(show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Proportion of population who have received a booster/3rd dose\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"Deprivation decile\", labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                                       \"10 - least deprived\"))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\")+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"Younger populations cannot explain lower boster coverage in deprived areas\",\r\n       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\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by Colin Angus\")\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDBoostersxIMDv2.png\", units=\"in\", res=800, width=10, height=8)\r\nMSOAvax %>% \r\n  group_by(decile) %>% \r\n  summarise(boosted=sum(boosted), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(boostprop=boosted/pop) %>% \r\n  ggplot(aes(x=boostprop, y=as.factor(decile), fill=as.factor(decile)))+\r\n  geom_col(show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Proportion of population who have received a booster/3rd dose\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"Deprivation decile\", labels=c(\"1 - Most deprived\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\r\n                                                       \"10 - least deprived\"))+\r\n  scale_fill_paletteer_d(\"dichromat::BrowntoBlue_10\")+\r\n  theme_custom()+\r\n  theme(plot.title=element_text(size=rel(2)))+\r\n  labs(title=\"More deprived areas have received fewer boosters\",\r\n       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\",\r\n       caption=\"Data from coronavirus.data.gov.uk & ONS | Plot by Colin Angus\")\r\n\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaccinationStaffCartogram.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(curl)\r\nlibrary(tidyverse)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(sf)\r\nlibrary(scales)\r\nlibrary(ragg)\r\nlibrary(patchwork)\r\nlibrary(extrafont)\r\n\r\n#Download vaccination data for social care staff by UTLA\r\n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/\r\nvax <- tempfile()\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/05/COVID-19-weekly-announced-vaccinations-20-May-2021.xlsx\"\r\nvax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode=\"wb\")\r\n\r\ncarehome <- read_excel(vax, sheet=\"Older Adult Care Homes by UTLA\", range=\"B21:P170\", col_names=FALSE) %>% \r\n  rename(cua.name=`...1`, CHresdose1=`...6`, CHresdose2=`...8`, CHstaffdose1=`...13`,\r\n         CHstaffdose2=`...15`) %>% \r\n  select(cua.name, CHresdose1, CHresdose2, CHstaffdose1, CHstaffdose2) %>% \r\n  mutate(CHresdose1=if_else(CHresdose1==\"-\",0,as.numeric(CHresdose1)),\r\n         CHresdose2=if_else(CHresdose2==\"-\",0,as.numeric(CHresdose2)),\r\n         CHstaffdose1=if_else(CHstaffdose1==\"-\",0,as.numeric(CHstaffdose1)),\r\n         CHstaffdose2=if_else(CHstaffdose2==\"-\",0,as.numeric(CHstaffdose2)))\r\n  \r\nsoccare <- read_excel(vax, sheet=\"Social Care Staff by UTLA\", range=\"B22:T170\", col_names=FALSE) %>% \r\n  rename(cua.name=`...1`, YAstaffdose1=`...5`, YAstaffdose2=`...7`, Domstaffdose1=`...11`, \r\n         Domstaffdose2=`...13`, Othstaffdose1=`...17`, Othstaffdose2=`...19`) %>% \r\n  select(cua.name, YAstaffdose1, YAstaffdose2, Domstaffdose1, Domstaffdose2,\r\n         Othstaffdose1, Othstaffdose2) %>% \r\n  mutate(YAstaffdose1=if_else(YAstaffdose1 %in% c(\"-\", \"tbc\"), 0, as.numeric(YAstaffdose1)),\r\n         YAstaffdose2=if_else(YAstaffdose2 %in% c(\"-\", \"tbc\"), 0, as.numeric(YAstaffdose2)),\r\n         Domstaffdose1=if_else(Domstaffdose1 %in% c(\"-\", \"tbc\"), 0, as.numeric(Domstaffdose1)),\r\n         Domstaffdose1=if_else(Domstaffdose2 %in% c(\"-\", \"tbc\"), 0, as.numeric(Domstaffdose1)),\r\n         Othstaffdose1=if_else(Othstaffdose1 %in% c(\"-\", \"tbc\"), 0, as.numeric(Othstaffdose1)),\r\n         Othstaffdose2=if_else(Othstaffdose2 %in% c(\"-\", \"tbc\"), 0, as.numeric(Othstaffdose2)))\r\n\r\ndata <- merge(carehome, soccare, all=TRUE) %>% \r\n  mutate(cua.name=case_when(\r\n    cua.name==\"Bournemouth, Christchurch and Poole\" ~ \"Bournemouth, Christchurch & Poole\",\r\n    TRUE ~ cua.name))\r\n\r\n#Download Carl Baker's lovely cartogram\r\nutla <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-uppertier.gpkg\")\r\nutla <- curl_download(url=source, destfile=utla, quiet=FALSE, mode=\"wb\")\r\n\r\nBackgroundUTLA <- st_read(utla, layer=\"7 Background\")\r\n\r\nUTLA <- st_read(utla, layer=\"5 UTLA-2020\") %>% \r\n  left_join(data, by=\"cua.name\", all=TRUE) %>% \r\n  filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\"))\r\n\r\nGroupsUTLA <- st_read(utla, layer=\"2 Group\")\r\n\r\nGroup_labelsUTLA <- st_read(utla, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nplot <- ggplot()+\r\n  geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+\r\n  geom_sf(data=UTLA, \r\n          aes(geometry=geom, fill=CHresdose1), colour=NA)+\r\n  geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of older adult care home residents\\nwho have received at least one dose of COVID vaccine\", \r\n                         limits=c(0.7,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in care home residents\\n \",\r\n       caption=\"Grey areas reflect Local Authorities with missing data\\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxCHResCartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot\r\ndev.off()\r\n\r\nplot2 <- ggplot()+\r\n  geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+\r\n  geom_sf(data=UTLA, \r\n          aes(geometry=geom, fill=CHstaffdose1), colour=NA)+\r\n  geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of older adult care home staff\\nwho have received at least one dose of COVID vaccine\", \r\n                         limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in care home staff\\n \",\r\n       caption=\"Grey areas reflect Local Authorities with missing data\\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxCHStaffCartogram.tiff\", units=\"in\", width=9, height=10, res=800)\r\nplot2\r\ndev.off()\r\n\r\nplot3 <- ggplot()+\r\n  geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+\r\n  geom_sf(data=UTLA, \r\n          aes(geometry=geom, fill=YAstaffdose1), colour=NA)+\r\n  geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of younger adult care home staff\\nwho have received at least one dose of COVID vaccine\", \r\n                         limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in staff from younger adult care homes\\n \",\r\n       caption=\"Grey areas reflect Local Authorities with missing data\\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxYAStaffCartogram.tiff\", units=\"in\", width=9, height=10, res=800)\r\nplot3\r\ndev.off()\r\n\r\nplot4 <- ggplot()+\r\n  geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+\r\n  geom_sf(data=UTLA, \r\n          aes(geometry=geom, fill=Domstaffdose1), colour=NA)+\r\n  geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of CQC-registered domicilliary care providers\\nwho have received at least one dose of COVID vaccine\", \r\n                         limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in domicilliary care providers\\n \",\r\n       caption=\"Grey areas reflect Local Authorities with missing data\\nData from NHS England, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxDomStaffCartogram.tiff\", units=\"in\", width=9, height=10, res=800)\r\nplot4\r\ndev.off()\r\n\r\nplot5 <- ggplot()+\r\n  geom_sf(data=BackgroundUTLA %>% filter(id==45), aes(geometry=geom))+\r\n  geom_sf(data=UTLA, \r\n          aes(geometry=geom, fill=Othstaffdose1), colour=NA)+\r\n  geom_sf(data=GroupsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labelsUTLA %>% filter(!RegionNati %in% c(\"Wales\", \"Scotland\", \"Northern Ireland\")), \r\n               aes(geometry=geom, label=Group.labe,\r\n                   hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of other social care staff\\nwho have received at least one dose of COVID vaccine\", \r\n                         limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in other social care staff\\n \",\r\n       caption=\"Data from NHS England, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxOthStaffCartogram.tiff\", units=\"in\", width=9, height=10, res=500)\r\nplot5\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaccinations.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(ukcovid19)\r\nlibrary(paletteer)\r\nlibrary(ggtext)\r\nlibrary(RcppRoll)\r\nlibrary(ragg)\r\nlibrary(extrafont)\r\nlibrary(scales)\r\n\r\n#Bring in daily data\r\ntemp <- tempfile()\r\nsource=\"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumPeopleVaccinatedFirstDoseByPublishDate&metric=cumPeopleVaccinatedSecondDoseByPublishDate&metric=newPeopleVaccinatedFirstDoseByPublishDate&metric=newPeopleVaccinatedSecondDoseByPublishDate&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nAPIdata2 <- read.csv(temp)\r\ncolnames(APIdata2) <- c(\"code\", \"name\", \"type\", \"date\", \"cumdose1\", \"cumdose2\", \"dose1\", \"dose2\")\r\n\r\n#Generate totals\r\nAPIdata2 <- APIdata2 %>% \r\n  group_by(date) %>% \r\n  summarise(cumdose1=sum(cumdose1), cumdose2=sum(cumdose2),\r\n            dose1=sum(dose1), dose2=sum(dose2)) %>% \r\n  mutate(name=\"UK\") %>% \r\n  bind_rows(APIdata2) %>% \r\n  mutate(pop=case_when(name==\"England\" ~ 56286961,\r\n                       name==\"Wales\" ~ 3152879,\r\n                       name==\"Scotland\" ~ 5463300,\r\n                       name==\"Northern Ireland\" ~ 1893667,\r\n                       name==\"UK\" ~ 56286961+3152879+546330+1893667),\r\n         dose1rate=dose1*1000000/pop,\r\n         dose2rate=dose2*1000000/pop,\r\n         cumpropdose1=cumdose1/pop,\r\n         cumpropdose2=cumdose2/pop,\r\n         date=as.Date(date)) %>% \r\n  ungroup() %>% \r\n  group_by(name) %>% \r\n  arrange(name, date) %>% \r\n  mutate(dose1rateroll=roll_mean(dose1rate, 7, align=\"center\", fill=NA)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDVaccinationRateDaily.tiff\", units=\"in\", width=9, height=6, res=500)\r\nAPIdata2 %>% \r\n  filter(name!=\"UK\") %>% \r\nggplot()+\r\n  geom_line(aes(x=date, y=dose1rateroll, colour=name))+\r\n  scale_x_date(name=\"Week ending\")+\r\n  scale_y_continuous(name=\"First doses delivered per 1m population\", limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Rates of delivery of 1st vaccine doses are currently much lower in England\",\r\n       subtitle=\"Rolling 7-day average rates of delivery of 1st COVID-19 vaccine doses by country by publication date\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaccinationTotalsDaily.tiff\", units=\"in\", width=9, height=6, res=500)\r\nAPIdata2 %>% \r\n  filter(name!=\"UK\") %>% \r\n  select(date, name, cumpropdose1, cumpropdose2) %>% \r\n  gather(dose, rate, c(3,4)) %>% \r\n  ggplot()+\r\n  geom_line(aes(x=date, y=rate, colour=name, linetype=dose))+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of the population vaccinated\", \r\n                     labels=scales::label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"Nation\")+\r\n  scale_linetype_discrete(name=\"Dose\", labels=c(\"1st\", \"2nd\"))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"The four UK nations are pursuing different vaccination strategies\",\r\n       subtitle=\"Rates of delivery of COVID-19 vaccines by country by publication date\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaccinationTargetDaily.tiff\", units=\"in\", width=8, height=6, res=500)\r\nAPIdata2 %>% \r\n  filter(name==\"UK\") %>% \r\n  select(date, name, cumdose1, cumdose2) %>% \r\n  gather(dose, count, c(3,4)) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  ggplot()+\r\n  geom_line(aes(x=date, y=count/1000000, linetype=dose), colour=\"Darkred\")+\r\n  geom_hline(yintercept=14.6, colour=\"SkyBlue\")+\r\n  scale_x_date(name=\"\", limits=c(as.Date(\"2021-01-10\"), as.Date(\"2021-02-14\")))+\r\n  scale_y_continuous(name=\"Total vaccine doses delivered (millions)\")+\r\n  scale_linetype_discrete(name=\"Dose\", labels=c(\"1st\", \"2nd\"))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccine delivery in the UK has now surpassed the Mid-February target\",\r\n       subtitle=\"<span style='color:DarkRed;'>Total COVID-19 vaccinations delivered</span>, by dose, in the UK compared to <span style='color:SkyBlue2;'>Boris Johnson's mid-February target</span><br>Data by publication date\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#UK level map using dashboard data\r\nsource=\"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=cumVaccinationFirstDoseUptakeByVaccinationDatePercentage&metric=cumVaccinationSecondDoseUptakeByVaccinationDatePercentage&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read.csv(temp) %>% \r\n  set_names(c(\"Lacode\", \"areaName\", \"areaType\", \"date\", \"First dose\", \"Second dose\")) %>% \r\n  gather(dose, prop, c(5,6)) %>% \r\n  mutate(date=as.Date(date))\r\n\r\nmaxdate=max(vaxdata$date)\r\n\r\n#Read in Carl Baker's lovely cartogram\r\nltla <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/LocalAuthorities-lowertier.gpkg\")\r\nltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode=\"wb\")\r\n\r\nBackground <- st_read(ltla, layer=\"7 Background\")\r\n\r\nltlavax <- st_read(ltla, layer=\"4 LTLA-2019\") %>% \r\n  left_join(vaxdata, by=\"Lacode\")\r\n\r\nGroups <- st_read(ltla, layer=\"2 Groups\")\r\n\r\nGroup_labels <- st_read(ltla, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nplot1 <- ggplot()+\r\n  geom_sf(data=Background %>% filter(Name!=\"Ireland\"), aes(geometry=geom))+\r\n  geom_sf(data=ltlavax %>% filter(date==maxdate), \r\n          aes(geometry=geom, fill=prop/100), colour=\"Black\", size=0.1)+\r\n  geom_sf(data=Groups %>% filter(!RegionNation %in% c(\"Wales\", \"Northern Ireland\")), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  geom_sf_text(data=Group_labels %>% filter(RegionNation!=\"Wales\"), \r\n               aes(geometry=geom, label=Group.labe,\r\n                                      hjust=just), size=rel(2.4), colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, limits=c(0,1),\r\n                         name=\"Proportion of adults vaccinated\", labels=label_percent(accuracy=1))+\r\n  facet_wrap(~dose)+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2.5)),\r\n        text=element_text(family=\"Lato\"), legend.position=\"top\",\r\n        strip.text=element_text(face=\"bold\", size=rel(1), hjust=0))+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"London is lagging behind in the vaccine drive\",\r\n       subtitle=\"\",\r\n       caption=paste0(\"Data from coronavirus.data.gov.uk, Cartogram from @carlbaker/House of Commons Library\\nData up to \",\r\n       maxdate, \"\\nPlot by @VictimOfMaths\"))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxLTLACartogramEngSco.tiff\", units=\"in\", width=9, height=10, res=800)\r\nplot1\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaxHeatmap.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(RcppRoll)\r\nlibrary(lubridate)\r\nlibrary(sf)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(cowplot)\r\nlibrary(scales)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Download LA-level vaccine coverage from the dashboard\r\ntemp <- tempfile()\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=ltla&metric=newPeopleVaccinatedFirstDoseByVaccinationDate&metric=newPeopleVaccinatedSecondDoseByVaccinationDate&metric=VaccineRegisterPopulationByVaccinationDate&format=csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read.csv(temp) %>% \r\n  mutate(date=as.Date(date),\r\n         vaxprop1st=newPeopleVaccinatedFirstDoseByVaccinationDate/VaccineRegisterPopulationByVaccinationDate,\r\n         vaxprop2nd=newPeopleVaccinatedSecondDoseByVaccinationDate/VaccineRegisterPopulationByVaccinationDate,\r\n         totalvaxed=newPeopleVaccinatedFirstDoseByVaccinationDate+newPeopleVaccinatedSecondDoseByVaccinationDate,\r\n         vaxpropall=totalvaxed/VaccineRegisterPopulationByVaccinationDate,\r\n         totalvaxrate=totalvaxed/VaccineRegisterPopulationByVaccinationDate) %>% \r\n  group_by(areaName, areaCode) %>% \r\n  arrange(date) %>% \r\n  mutate(vax1_roll=roll_mean(vaxprop1st, 7, align=\"center\", fill=NA),\r\n         vax2_roll=roll_mean(vaxprop2nd, 7, align=\"center\", fill=NA),\r\n         vaxall_roll=roll_mean(vaxpropall, 7, align=\"center\", fill=NA),\r\n         totalvaxrate_roll=roll_mean(totalvaxrate, 7, align=\"center\", fill=NA),\r\n         maxvaxrate=max(vaxall_roll, na.rm=TRUE),\r\n         maxvaxday=date[which(vaxall_roll==maxvaxrate)][1],\r\n         maxvaxprop=vaxall_roll/maxvaxrate) %>% \r\n  ungroup()\r\n\r\nplotfrom <- \"2021-01-01\"\r\nplotto <- max(vaxdata$date)-days(4)\r\n\r\ntotals <- vaxdata %>% \r\n  group_by(areaName, areaCode, maxvaxday) %>% \r\n  summarise(vaxed1dose=sum(newPeopleVaccinatedFirstDoseByVaccinationDate, na.rm=TRUE)/\r\n              unique(VaccineRegisterPopulationByVaccinationDate),\r\n            vaxed2dose=sum(newPeopleVaccinatedSecondDoseByVaccinationDate, na.rm=TRUE)/\r\n              unique(VaccineRegisterPopulationByVaccinationDate)) %>% \r\n  ungroup()\r\n\r\nvaxtiles <- ggplot(vaxdata %>% filter(date>=plotfrom & date<=plotto), \r\n                   aes(x=date, y=fct_reorder(areaName, maxvaxday), fill=maxvaxprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"Date\", expand=c(0,0), \r\n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  labs(title=\"Timelines for COVID-19 vaccinations in Local Authorities/Council Areas in England & Scotland\",\r\n       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),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")+\r\n  theme_custom()+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), \r\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(size=rel(1.8)))\r\n\r\nvaxbars <- ggplot(totals, \r\naes(x=vaxed2dose, y=fct_reorder(areaName, maxvaxday), fill=vaxed2dose))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Proportion of adults\\nfully vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxHeatmap.tiff\", units=\"in\", width=16, height=32, res=800)\r\nplot_grid(vaxtiles, vaxbars, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDVaxHeatmap.png\", units=\"in\", width=16, height=32, res=800)\r\nplot_grid(vaxtiles, vaxbars, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\n#Alternative version ordered from North>South\r\n#Get map\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\n#The actual shapefile has a different name each time you download it, \r\n#so need to fish the name out of the unzipped file\r\nname <- list.files(temp2, pattern=\".shp\")\r\n\r\nshapefile <- st_read(file.path(temp2, name)) %>% \r\n  rename(areaCode=lad19cd) \r\n\r\nlatdata <- shapefile %>% \r\n  select(areaCode, lat) %>% \r\n  as.data.frame() %>% \r\n  select(areaCode, lat) %>% \r\n  distinct() %>% \r\n  filter(!is.na(areaCode) & !areaCode %in% c(\"E06000062\", \"E06000061\")) %>% \r\n  #Fix Northamptonshire LA changes (use Northampton and Kettering as the latitudes for the new counties)\r\n  bind_rows(shapefile %>% filter(areaCode %in% c(\"E07000154\", \"E07000153\")) %>% \r\n              as.data.frame() %>% \r\n              select(areaCode, lat) %>% \r\n              mutate(areaCode=if_else(areaCode==\"E07000154\", \"E06000062\", \"E06000061\")))\r\n\r\nvaxdata2 <- merge(vaxdata, latdata)\r\n\r\ntotals2 <- vaxdata2 %>% \r\n  group_by(areaName, areaCode, maxvaxday, lat) %>% \r\n  summarise(vaxed1dose=sum(newPeopleVaccinatedFirstDoseByVaccinationDate, na.rm=TRUE)/\r\n              unique(VaccineRegisterPopulationByVaccinationDate),\r\n            vaxed2dose=sum(newPeopleVaccinatedSecondDoseByVaccinationDate, na.rm=TRUE)/\r\n              unique(VaccineRegisterPopulationByVaccinationDate)) %>% \r\n  ungroup()\r\n\r\nvaxtiles2 <- ggplot(vaxdata2 %>% filter(date>=plotfrom & date<=plotto), \r\n                   aes(x=date, y=fct_reorder(areaName, lat), fill=maxvaxprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"Date\", expand=c(0,0), \r\n               breaks=pretty_breaks(n=interval(as.Date(plotfrom), plotto)%/% months(1)))+\r\n  labs(title=\"Timelines for COVID-19 vaccinations in Local Authorities/Council Areas in England & Scotland\",\r\n       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),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")+\r\n  theme_custom()+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), \r\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(size=rel(1.8)))\r\n\r\nvaxbars2 <- ggplot(totals2, \r\n                  aes(x=vaxed2dose, y=fct_reorder(areaName, lat), fill=vaxed2dose))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Proportion of adults\\nfully vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  theme_custom()+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxHeatmapOrdered.tiff\", units=\"in\", width=16, height=32, res=800)\r\nplot_grid(vaxtiles2, vaxbars2, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\nagg_png(\"Outputs/COVIDVaxHeatmapOrdered.png\", units=\"in\", width=16, height=32, res=800)\r\nplot_grid(vaxtiles2, vaxbars2, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()"
  },
  {
    "path": "Heatmaps/COVIDVaxPyramidxRegion.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(showtext)\r\n\r\noptions(scipen=9999)\r\n\r\n#Download Vaccination data\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/04/COVID-19-weekly-announced-vaccinations-22-April-2021.xlsx\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdata <- as.data.frame(t(read_excel(temp, sheet=\"Gender, Age & Region\", range=\"C17:AN23\", col_names=F)))\r\n\r\ncolnames(rawdata) <- c(\"East of England\", \"London\", \"Midlands\", \"North East & Yorkshire\", \"North West\",\r\n                    \"South East\", \"South West\")\r\n\r\ndata <- rawdata %>% \r\n  filter(!is.na(London)) %>% \r\n  mutate(Dose=rep(c(\"1st\", \"2nd\"), each=18), Sex=rep(c(\"Male\", \"Female\"), times=18),\r\n         Age=rep(c(\"16-45\", \"45-49\", \"50-54\", \"55-59\", \"60-64\", \"65-69\", \"70-74\", \"75-79\", \"80+\"),\r\n         each=2, times=2)) %>% \r\n  gather(Region, Vax, c(1:7)) %>% \r\n  spread(Dose, Vax)\r\n\r\n#Bring in population data (based on ONS as NIMS is linked to lower level geographies only)\r\nurl <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland/mid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nmalepop <- read_excel(temp, sheet=\"MYE2 - Males\", range=\"B5:CQ431\") %>% \r\n  filter(Geography1==\"Region\") %>% \r\n  gather(Age, Pop, c(4:94)) %>% \r\n  mutate(Region=case_when(\r\n    Name==\"NORTH WEST\" ~ \"North West\",\r\n    Name %in% c(\"EAST MIDLANDS\", \"WEST MIDLANDS\") ~ \"Midlands\",\r\n    Name==\"EAST\" ~ \"East of England\",\r\n    Name==\"LONDON\" ~ \"London\",\r\n    Name==\"SOUTH EAST\" ~ \"South East\",\r\n    Name==\"SOUTH WEST\" ~ \"South West\",\r\n    TRUE ~ \"North East & Yorkshire\"),\r\n    Age=as.numeric(if_else(Age==\"90+\", \"90\", Age)),\r\n    Age=case_when(\r\n      Age<16~ \"<16\", Age<45 ~ \"16-45\", Age<50 ~ \"45-49\", Age<55 ~ \"50-54\", Age<60 ~ \"55-59\", Age<65 ~ \"60-64\",\r\n      Age<70 ~ \"65-69\", Age<75 ~ \"70-74\", Age<80 ~ \"75-79\", TRUE ~ \"80+\")) %>% \r\n  group_by(Region, Age) %>% \r\n  summarise(Pop=sum(Pop)) %>% \r\n  ungroup() %>% \r\n  mutate(Sex=\"Male\")\r\n\r\nfemalepop <- read_excel(temp, sheet=\"MYE2 - Females\", range=\"B5:CQ431\") %>% \r\n  filter(Geography1==\"Region\") %>% \r\n  gather(Age, Pop, c(4:94)) %>% \r\n  mutate(Region=case_when(\r\n    Name==\"NORTH WEST\" ~ \"North West\",\r\n    Name %in% c(\"EAST MIDLANDS\", \"WEST MIDLANDS\") ~ \"Midlands\",\r\n    Name==\"EAST\" ~ \"East of England\",\r\n    Name==\"LONDON\" ~ \"London\",\r\n    Name==\"SOUTH EAST\" ~ \"South East\",\r\n    Name==\"SOUTH WEST\" ~ \"South West\",\r\n    TRUE ~ \"North East & Yorkshire\"),\r\n    Age=as.numeric(if_else(Age==\"90+\", \"90\", Age)),\r\n    Age=case_when(\r\n      Age<16~ \"<16\", Age<45 ~ \"16-45\", Age<50 ~ \"45-49\", Age<55 ~ \"50-54\", Age<60 ~ \"55-59\", Age<65 ~ \"60-64\",\r\n      Age<70 ~ \"65-69\", Age<75 ~ \"70-74\", Age<80 ~ \"75-79\", TRUE ~ \"80+\")) %>% \r\n  group_by(Region, Age) %>% \r\n  summarise(Pop=sum(Pop)) %>% \r\n  ungroup() %>% \r\n  mutate(Sex=\"Female\")\r\n\r\nplotdata <- data %>% \r\n  merge(bind_rows(malepop, femalepop), by=c(\"Region\", \"Age\", \"Sex\")) %>% \r\n  rowwise() %>% \r\n  mutate(Unvax=Pop-`1st`, Vax1Only=`1st`-`2nd`) %>% \r\n  ungroup() %>% \r\n  select(-c(\"1st\", \"Pop\")) %>% \r\n  gather(Measure, Value, c(\"Unvax\", \"Vax1Only\", \"2nd\")) %>% \r\n  mutate(SexMeasure=paste0(Sex, Measure),\r\n         Value=if_else(Value<0,0,Value),\r\n         Value=if_else(Sex==\"Male\", -Value, Value),\r\n         Age=factor(Age, levels=c(\"<16\", \"16-45\", \"45-49\", \"50-54\", \"55-59\", \"60-64\",\r\n                                \"65-69\", \"70-74\", \"75-79\", \"80+\")),\r\n         SexMeasure=factor(SexMeasure, levels=c(\"MaleUnvax\", \"MaleVax1Only\", \"Male2nd\",\r\n                                                \"FemaleUnvax\", \"FemaleVax1Only\", \"Female2nd\")))\r\n         \r\nagg_tiff(\"Outputs/COVIDVaxxAgexSexxRegion.tiff\", units=\"in\", width=9, height=7, res=800)\r\n   ggplot(plotdata, aes(x=Value, y=Age, fill=SexMeasure))+\r\n      geom_col(position=\"stack\", show.legend=FALSE)+\r\n      scale_x_continuous(name=\"\", limits=c(-2100000, 2100000),\r\n                         breaks=c(-2e06, -1e06, 0, 1e06, 2e06),\r\n                         labels=c(\"2m\", \"1m\", \"0\", \"1m\", \"2m\"))+\r\n      scale_y_discrete(name=\"Age group\")+\r\n      scale_fill_manual(values=c(\"Grey80\", \"#be7dff\", \"#6600cc\", \"Grey80\", \"#7dffdd\", \"#00cc99\"))+\r\n      facet_wrap(~Region)+ \r\n      theme_classic()+\r\n      theme(axis.line.y=element_blank(), text=element_text(family=\"Roboto\"), \r\n            plot.title=element_text(face=\"bold\", size=rel(1.4)), plot.subtitle=element_markdown(),\r\n            strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))+\r\n      labs(title=\"Regional COVID-19 vaccine delivery in England by age and sex\",\r\n           subtitle=\"The number of people who are <span style='color:Grey60;'>unvaccinated</span>, men with <span style='color:#be7dff;'>one</span> or <span style='color:#6600cc;'>two</span> doses and women with <span style='color:#7dffdd;'>one</span> or <span style='color:#00cc99;'>two</span> doses\",\r\n          caption=\"Data from PHE, population figures from ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()           \r\n         \r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaxUptakexAge.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(readxl)\r\n\r\noptions(scipen=10000)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Download vaccination data from the dashboard\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=vaccinationsAgeDemographics&format=csv\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read.csv(temp) %>% \r\n  select(date, age, areaName, cumVaccinationFirstDoseUptakeByVaccinationDatePercentage,\r\n         cumVaccinationSecondDoseUptakeByVaccinationDatePercentage,\r\n         VaccineRegisterPopulationByVaccinationDate,\r\n         cumPeopleVaccinatedFirstDoseByVaccinationDate,\r\n         cumPeopleVaccinatedSecondDoseByVaccinationDate) %>% \r\n  set_names(c(\"date\", \"age\", \"country\", \"First dose_NIMS\", \"Second dose_NIMS\", \"pop_NIMS\", \r\n              \"Total1stDoses\", \"Total2ndDoses\")) %>% \r\n  mutate(age=gsub(\"_\", \"-\", age), date=as.Date(date))\r\n\r\n#Add in ONS population estimates (mid-2020 figures)\r\nurl <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2020/ukpopestimatesmid2020on2021geography.xls\"\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nONSpop_2020 <- as.data.frame(t(read_excel(temp, sheet=\"MYE2 - Persons\", range=\"E8:CQ384\",\r\n                                          col_names=FALSE))) %>% \r\n  select(V1, V5, V377) %>% \r\n  set_names(c(\"age\", \"England\", \"Scotland\")) %>% \r\n  gather(country, pop_ONS2020, c(2,3)) %>% \r\n  mutate(age=as.numeric(if_else(age==\"90+\", \"90\", age)),\r\n         pop_ONS2020=as.numeric(pop_ONS2020),\r\n         age=case_when(\r\n           age<12 ~ \"u12\", age<16 ~ \"12-15\", age<18 ~ \"16-17\", \r\n           age<25 & country==\"England\" ~ \"18-24\", age<30 & country==\"England\" ~ \"25-29\",\r\n           age<30 ~ \"18-29\",\r\n           age<35 & country==\"England\" ~ \"30-34\", age<40 & country==\"England\" ~ \"35-39\", \r\n           age<40 ~ \"30-39\",\r\n           age<45 & country==\"England\" ~ \"40-44\", age<50 & country==\"England\" ~ \"45-49\", \r\n           age<50 ~ \"40-49\", age<55 ~ \"50-54\", age<60 ~ \"55-59\",\r\n           age<65 ~ \"60-64\", age<70 ~ \"65-69\", age<75 ~ \"70-74\",\r\n           age<80 ~ \"75-79\", age<85 & country==\"England\" ~ \"80-84\", age<90 & country==\"England\" ~ \"85-89\",\r\n           country==\"England\" ~ \"90+\",\r\n           TRUE ~ \"80+\")) %>% \r\n  group_by(age, country) %>%\r\n  summarise(pop_ONS2020=sum(pop_ONS2020)) %>% \r\n  ungroup()\r\n\r\n#Merge populations into data\r\ndatafull <- data %>% \r\n  merge(ONSpop_2020) %>% \r\n  mutate(`First dose_ONS2020`=Total1stDoses*100/pop_ONS2020,\r\n         `Second dose_ONS2020`=Total2ndDoses*100/pop_ONS2020)\r\n\r\n#Separate out dataset for England only and for comparison with Scotland \r\n#(with broader Scottish age bands)\r\n\r\ndatafull_e <- datafull %>% \r\n  filter(country==\"England\") %>%  \r\n  group_by(date) %>% \r\n  summarise(pop_NIMS=sum(pop_NIMS), Total1stDoses=sum(Total1stDoses),\r\n            Total2ndDoses=sum(Total2ndDoses),\r\n            pop_ONS2020=sum(pop_ONS2020)) %>% \r\n  mutate(age=\"Total\", `First dose_NIMS`=Total1stDoses*100/pop_NIMS,\r\n         `Second dose_NIMS`=Total2ndDoses*100/pop_NIMS,\r\n         `First dose_ONS2020`=Total1stDoses*100/pop_ONS2020,\r\n         `Second dose_ONS2020`=Total2ndDoses*100/pop_ONS2020) %>% \r\n  bind_rows(datafull %>% \r\n              filter(country==\"England\")) %>% \r\n  #Tidy up\r\n  pivot_longer(c(`First dose_NIMS`, `Second dose_NIMS`,\r\n                 `First dose_ONS2020`, `Second dose_ONS2020`),\r\n               names_to=c(\"dose\", \"source\"), names_sep=\"_\",\r\n               values_to=\"prop\") %>% \r\n  mutate(prop=prop/100, date=as.Date(date)) %>% \r\n  ungroup()\r\n\r\ndatafull_se <- datafull %>% \r\n  mutate(age=case_when(\r\n    age %in% c(\"18-24\", \"25-29\") ~ \"18-29\",\r\n    age %in% c(\"30-34\", \"35-39\") ~ \"30-39\",\r\n    age %in% c(\"40-44\", \"45-49\") ~ \"40-49\",\r\n    age %in% c(\"80-84\", \"85-89\", \"90+\") ~ \"80+\",\r\n    TRUE ~ age)) %>% \r\n  group_by(date, country, age) %>% \r\n  summarise(Total1stDoses=sum(Total1stDoses),\r\n            Total2ndDoses=sum(Total2ndDoses),\r\n            pop_ONS2020=sum(pop_ONS2020)) %>% \r\n  ungroup() %>% \r\n  mutate(`First dose`=Total1stDoses*100/pop_ONS2020,\r\n         `Second dose`=Total2ndDoses*100/pop_ONS2020) %>% \r\n  gather(dose, prop, c(`First dose`, `Second dose`))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxUptakexAge.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot()+\r\n  geom_line(data=datafull_e %>% filter(age!=\"Total\" & source==\"NIMS\"), \r\n            aes(x=date, y=prop, colour=age, group=age))+\r\n  geom_line(data=datafull_e %>% filter(age==\"Total\" & source==\"NIMS\"),\r\n            aes(x=date, y=prop), colour=\"Black\", linetype=3)+\r\n  geom_hline(yintercept=1, colour=\"Grey80\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of age group vaccinated\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"pals::stepped\", guide=guide_legend(reverse=TRUE),\r\n                           name=\"Age\")+\r\n  facet_wrap(~dose)+\r\n  theme_custom()+\r\n  theme(panel.grid.major.y=element_line(colour=\"Grey90\"))+\r\n  labs(title=\"Vaccine uptake is lower in younger age groups\",\r\n       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\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Population estimates from NIMS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxUptakexAgeONS2020.tiff\", units=\"in\", width=9, height=6, res=800)\r\nggplot()+\r\n  geom_line(data=datafull_e %>% filter(age!=\"Total\" & source==\"ONS2020\"), \r\n            aes(x=date, y=prop, colour=age, group=age))+\r\n  geom_line(data=datafull_e %>% filter(age==\"Total\" & source==\"ONS2020\"),\r\n            aes(x=date, y=prop), colour=\"Black\", linetype=3)+\r\n  geom_hline(yintercept=1, colour=\"Grey80\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of age group vaccinated\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"pals::stepped\", guide=guide_legend(reverse=TRUE),\r\n                           name=\"Age\")+\r\n  facet_wrap(~dose)+\r\n  theme_custom()+\r\n  theme(panel.grid.major.y=element_line(colour=\"Grey90\"))+\r\n  labs(title=\"Vaccine uptake is lower in younger age groups\",\r\n       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\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Population data from ONS 2020 estimates | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Faceted plot showing both estimates\r\nagg_tiff(\"Outputs/COVIDVaxUptakexAgeComparisons.tiff\", units=\"in\", \r\n         width=8, height=8, res=800)\r\nggplot(datafull_e %>% filter(dose==\"First dose\"), \r\n       aes(x=date, y=prop, colour=source, group=source))+\r\n  geom_line()+\r\n  geom_hline(yintercept=1, colour=\"Grey80\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of age group vaccinated\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"rcartocolor::Safe\", name=\"Population\\nsource:\",\r\n                           labels=c(\"NIMS\", \"ONS 2020\\nestimates\",\r\n                                    \"ONS 2021\\nprojections\"))+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"NIMS gives a different picture of vaccine uptake to ONS population estimates\",\r\n       subtitle=\"Cumulative proportion of English population vaccinated against COVID with at least one dose,\\nusing alternative population estimates.\",\r\n       caption=\"Data from coronavirus.data.gov.uk, NIMS & ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#Just the populations\r\npopdata <- datafull_e %>% \r\n  filter(date==max(date) & dose==\"First dose\" & source==\"NIMS\") %>% \r\n  select(age, pop_NIMS, pop_ONS2020) %>% \r\n  gather(source, pop, c(2:3))\r\n\r\nagg_tiff(\"Outputs/EngPopEstimates.tiff\", units=\"in\", width=8, height=8, res=800)\r\nggplot(popdata %>% filter(age!=\"Total\"), aes(x=pop/1000000, y=age, fill=source))+\r\n  geom_col(position=\"dodge\")+\r\n  scale_x_continuous(name=\"Estimated population (millions)\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_paletteer_d(\"rcartocolor::Safe\", name=\"Population\\nsource:\",\r\n                         labels=c(\"NIMS\", \"ONS 2020\\nestimates\",\r\n                                  \"ONS 2021\\nprojections\"))+\r\n  theme_custom()+\r\n  theme(legend.position=\"top\")+\r\n  labs(title=\"Population estimates for younger age groups vary a lot between sources\",\r\n       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.\",\r\n       caption=\"data from NIMS & ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Comparing England & Scotland\r\nagg_tiff(\"Outputs/COVIDVaxEngvsScotxAge.tiff\", units=\"in\", width=9, height=7, res=800)\r\nggplot(datafull_se %>% mutate(dosecountry=paste(dose, country)), \r\n       aes(x=date, y=prop/100, colour=country, linetype=dose, group=dosecountry))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of the population vaccinated\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_manual(values=c(\"#F44B4B\", \"#0076BB\"), name=\"Country\")+\r\n  scale_linetype_discrete(name=\"Dose\")+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"Scotland is vaccinating under 18s faster than England\",\r\n       subtitle=\"Vaccination coverage in England and Scotland by age\",\r\n       caption=\"Vaccination data from coronavirus.gov.uk | Population estimates from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxEngvsScotxAgeu18.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(datafull_se %>% filter(age %in% c(\"12-15\", \"16-17\")) %>% \r\n         mutate(dosecountry=paste(dose, country)), \r\n       aes(x=date, y=prop/100, colour=country, linetype=dose, group=dosecountry))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Proportion of the population vaccinated\", \r\n                     labels=label_percent(accuracy=1))+\r\n  scale_colour_manual(values=c(\"#F44B4B\", \"#0076BB\"), name=\"Country\")+\r\n  scale_linetype_discrete(name=\"Dose\")+\r\n  facet_wrap(~age)+\r\n  theme_custom()+\r\n  labs(title=\"Scotland is vaccinating under 18s faster than England\",\r\n       subtitle=\"Vaccination coverage in England and Scotland by age\",\r\n       caption=\"Vaccination data from coronavirus.gov.uk | Population estimates from ONS | Plot by @VictimOfMaths\")\r\n\r\ndev.off()\r\n\r\n#########################\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/10/COVID-19-daily-announced-vaccinations-29-October-2021.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nBoosters <- read_excel(temp, sheet=\"Total Vaccinations by Age\", range=\"B15:F29\") %>% \r\n  select(-2) %>% \r\n  set_names(\"age\", \"1 doses\", \"2 doses\", \"3 dose\") %>% \r\n  mutate(`1 dose`=`1 doses`-`2 doses`,\r\n         `2 dose`=`2 doses`-`3 dose`) %>% \r\n  merge(popdata %>% filter(source==\"pop_ONS2020\") %>% \r\n          mutate(age=case_when(\r\n    age %in% c(\"80-84\", \"85-89\", \"90+\") ~ \"80+\",\r\n    age %in% c(\"12-15\", \"17-18\") ~ \"Under 18\",\r\n    age==\"Total\" ~ \"Total\",\r\n    TRUE ~ age)) %>% \r\n      group_by(age) %>% \r\n      summarise(pop=sum(pop))) %>% \r\n  mutate(`Unvaccinated`=pop-`1 doses`,\r\n         age=if_else(age==\"Under 18\", \"12-17\", age)) %>% \r\n  gather(Doses, Vaccinated, c(Unvaccinated, `1 dose`, `2 dose`, `3 dose`)) %>% \r\n  mutate(Vaccinated=if_else(Vaccinated<0, 0, Vaccinated),\r\n         Doses=factor(Doses, levels=c(\"Unvaccinated\", \"1 dose\", \"2 dose\", \"3 dose\")))\r\n\r\ntotal <- Boosters %>% group_by(Doses) %>% \r\n  summarise(Vaccinated=sum(Vaccinated))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxBooster Pyramix.tiff\", units=\"in\", width=9, height=8, res=500)\r\nggplot(Boosters, aes(x=Vaccinated/1000000, y=age, fill=Doses))+\r\n  geom_col()+\r\n  scale_x_continuous(name=\"Number of people (millions)\")+\r\n  scale_y_discrete(name=\"Age\")+\r\n  scale_fill_manual(values=c(\"#01000E\", \"#FBA724\", \"#EE7E24\", \"#D42D24\"), name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"13% of people in England aged 12+ have now received a 3rd COVID jab\",\r\n       subtitle=\"Number of vaccine doses delivered by age group in England. 3 doses includes both boosters and 3rd primary doses\",\r\n       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\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaxUptakexReg.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(paletteer)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\ntemp <- tempfile()\r\nurl <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=vaccinationsAgeDemographics&format=csv\"\r\ntemp <- curl_download(url=url, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read.csv(temp) %>% \r\n  select(areaName, date, age, cumVaccinationFirstDoseUptakeByVaccinationDatePercentage) %>% \r\n  rename(\"uptake\"=\"cumVaccinationFirstDoseUptakeByVaccinationDatePercentage\") %>% \r\n  filter(age==\"12_15\" & date>as.Date(\"2021-08-01\")) %>% \r\n  mutate(date=as.Date(date))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxUptake1215xReg.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(data, aes(x=date, y=uptake/100, colour=areaName))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"First dose coverage\", labels=label_percent(accuracy=1))+\r\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  theme_custom()+\r\n  labs(title=\"There is big regional variation in 12-15 COVID vaccination rates\",\r\n       subtitle=\"Vaccine uptake among 12-15 year-olds in England by region\",\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n  "
  },
  {
    "path": "Heatmaps/COVIDVaxxAgeUKUSA.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(extrafont)\r\nlibrary(ggtext)\r\nlibrary(scales)\r\nlibrary(readxl)\r\n\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#US data from https://covid.cdc.gov/covid-data-tracker/#vaccination-demographic\r\n#Hard coded because I can't work out how to extract the download url from the PowerBI dashboard\r\nUSpop <- 331449281\r\n\r\nUSdata <- data.frame(age=c(\"<12\", \"12-15\", \"16-17\", \"18-24\", \"25-39\", \"40-49\", \"50-64\",\r\n                              \"65-74\", \"75+\"), \r\n                        dose1=c(198609, 6388261, 3931936, 15268822, 36501123, 25352681, 45542907, \r\n                                27423936, 18823020),\r\n                        dose2=c(122769, 4607456, 3122352, 12411413, 30610887, 21683574, 39865850,\r\n                                24394904, 16744576),\r\n                        popperc=c(0.144, 0.05, 0.025, 0.092, 0.205, 0.122, 0.194, 0.098, 0.07)) %>% \r\n  mutate(pop=USpop*popperc,\r\n         unvax=pop-dose1,\r\n         dose1only=dose1-dose2,\r\n         agemin=case_when(\r\n           age==\"<12\" ~ 0,\r\n           TRUE ~ as.numeric(substr(age, 1, 2))),\r\n         agemax=case_when(\r\n           age==\"<12\" ~ 12,\r\n           age==\"75+\" ~ 100,\r\n           TRUE ~ as.numeric(substr(age, 4,5))+1),\r\n         agewidth=agemax-agemin,\r\n         dose2plot=dose2/agewidth,\r\n         dose1plot=dose1/agewidth,\r\n         unvaxplot=pop/agewidth)\r\n\r\n#UK data from NHS vaccination spreadsheet\r\ntemp <- tempfile()\r\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/08/COVID-19-weekly-announced-vaccinations-05-August-2021.xlsx\"\r\nUKvax <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nUKpop <- read_excel(UKvax, sheet=\"Population estimates (ONS 2020)\", range=\"B16:D29\", col_names=FALSE) %>% \r\n  select(-`...2`) %>% \r\n  set_names(c(\"age\", \"pop\"))\r\n\r\nUKdata <- as.data.frame(t(read_excel(UKvax, sheet=\"NHS Region\", range=\"D12:AH13\", col_names=FALSE))) %>% \r\n  filter(!is.na(V1)) %>% \r\n  mutate(dose=rep(c(\"dose1\", \"dose2\"), each=14),\r\n         V2=as.numeric(V2)) %>% \r\n  spread(dose, V2) %>% \r\n  rename(age=V1) %>% \r\n  merge(UKpop) %>% \r\n  mutate(unvax=pop-dose1,\r\n         dose1only=dose1-dose2,\r\n         agemin=case_when(\r\n           age==\"Under 18\" ~ 0,\r\n           TRUE ~ as.numeric(substr(age, 1, 2))),\r\n         agemax=case_when(\r\n           age==\"Under 18\" ~ 18,\r\n           age==\"80+\" ~ 100,\r\n           TRUE ~ as.numeric(substr(age, 4,5))+1),\r\n         agewidth=agemax-agemin,\r\n         dose2plot=dose2/agewidth,\r\n         dose1plot=dose1/agewidth,\r\n         unvaxplot=pop/agewidth)\r\n\r\ntiff(\"Outputs/COVIDVaxxAgeUKUSA.tiff\", units=\"in\", width=9, height=6.6, res=500)\r\nggplot()+\r\n  geom_rect(data=UKdata, aes(xmin=0, xmax=dose2plot, ymin=agemin, ymax=agemax), fill=\"darkred\")+\r\n  geom_rect(data=UKdata, aes(xmin=dose2plot, xmax=dose1plot, ymin=agemin, ymax=agemax), fill=\"tomato\")+\r\n  geom_rect(data=UKdata, aes(xmin=dose1plot, xmax=unvaxplot, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_rect(data=USdata, aes(xmax=0, xmin=-dose2plot, ymin=agemin, ymax=agemax), fill=\"navyblue\")+\r\n  geom_rect(data=USdata, aes(xmax=-dose2plot, xmin=-dose1plot, ymin=agemin, ymax=agemax), fill=\"royalblue\")+\r\n  geom_rect(data=USdata, aes(xmax=-dose1plot, xmin=-unvaxplot, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_segment(aes(x=0, xend=0, y=0, yend=100), colour=\"White\")+\r\n  scale_x_continuous(name=\"Number of people at each single year of age\", labels=abs)+\r\n  scale_y_continuous(name=\"Age\", limits=c(0,100))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+\r\n  labs(title=\"<span style='color:navyblue;'>The US</span> has vaccinated fewer of its older population against COVID than <span style='color:darkred;'>England\",\r\n       subtitle=\"The number of people in each country who are <span style='color:Grey70;'>unvaccinated</span>, have received <span style='color:royalblue;'>one </span><span style='color:tomato;'>dose </span>or are <span style='color:navyblue;'>fully </span><span style='color:darkred;'>vaccinated</span>.\",\r\n       caption=\"Data from CDC, NHS England and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDVaxxAgeUKUSANorm.tiff\", units=\"in\", width=9, height=6.6, res=500)\r\nggplot()+\r\n  geom_rect(data=UKdata, aes(xmin=0, xmax=dose2plot, ymin=agemin, ymax=agemax), fill=\"darkred\")+\r\n  geom_rect(data=UKdata, aes(xmin=dose2plot, xmax=dose1plot, ymin=agemin, ymax=agemax), fill=\"tomato\")+\r\n  geom_rect(data=UKdata, aes(xmin=dose1plot, xmax=unvaxplot, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_rect(data=USdata, aes(xmax=0, xmin=-dose2plot/5.9, ymin=agemin, ymax=agemax), fill=\"navyblue\")+\r\n  geom_rect(data=USdata, aes(xmax=-dose2plot/5.9, xmin=-dose1plot/5.9, ymin=agemin, ymax=agemax), fill=\"royalblue\")+\r\n  geom_rect(data=USdata, aes(xmax=-dose1plot/5.9, xmin=-unvaxplot/5.9, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_segment(aes(x=0, xend=0, y=0, yend=100), colour=\"White\")+\r\n  scale_x_continuous(name=\"Number of people at each single year of age\",\r\n                     breaks=c(-508474.6, 0, 500000), labels=c(\"3,000,000\", \"0\", \"500,000\"))+\r\n  scale_y_continuous(name=\"Age\", limits=c(0,100))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+\r\n  labs(title=\"<span style='color:navyblue;'>The US</span> has vaccinated fewer of its older population against COVID than <span style='color:darkred;'>England\",\r\n       subtitle=\"The number of people in each country who are <span style='color:Grey70;'>unvaccinated</span>, have received <span style='color:royalblue;'>one </span><span style='color:tomato;'>dose </span>or are <span style='color:navyblue;'>fully </span><span style='color:darkred;'>vaccinated</span>.<br>Areas are scaled to imply equal populations, so the x-axis scales on the left- and right- of the centre are different.\",\r\n       caption=\"Data from CDC, NHS England and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDVaxxAgeUKUSANormUnvax.tiff\", units=\"in\", width=9, height=6.6, res=500)\r\nggplot()+\r\n  geom_rect(data=UKdata, aes(xmin=0, xmax=unvax/agewidth, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_rect(data=USdata, aes(xmax=0, xmin=-unvax/(agewidth*5.9), ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_segment(aes(x=0, xend=0, y=0, yend=100), colour=\"White\")+\r\n  annotate(\"text\", x=-500000, y=80, label=\"USA\", colour=\"navyblue\", family=\"Lato\", size=rel(6),\r\n           fontface=\"bold\")+\r\n  annotate(\"text\", x=500000, y=80, label=\"England\", colour=\"darkred\", family=\"Lato\", size=rel(6),\r\n           fontface=\"bold\")+\r\n  scale_x_continuous(name=\"Number of people at each single year of age\",\r\n                     breaks=c(-508474.6, 0, 500000), labels=c(\"3,000,000\", \"0\", \"500,000\"))+\r\n  scale_y_continuous(name=\"Age\", limits=c(0,100))+\r\n  theme_custom()+\r\n  labs(title=\"The US has vaccinated fewer of its older population against COVID than England\",\r\n       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.\",\r\n       caption=\"Data from CDC, NHS England and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDVaxxAgeUKUSAPerc.tiff\", units=\"in\", width=9, height=6.6, res=500)\r\nggplot()+\r\n  geom_rect(data=UKdata, aes(xmin=0, xmax=dose2/pop, ymin=agemin, ymax=agemax), fill=\"darkred\")+\r\n  geom_rect(data=UKdata, aes(xmin=dose2/pop, xmax=dose1/pop, ymin=agemin, ymax=agemax), fill=\"tomato\")+\r\n  geom_rect(data=UKdata, aes(xmin=dose1/pop, xmax=1, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_rect(data=USdata, aes(xmax=0, xmin=-dose2/pop, ymin=agemin, ymax=agemax), fill=\"navyblue\")+\r\n  geom_rect(data=USdata, aes(xmax=-dose2/pop, xmin=-dose1/pop, ymin=agemin, ymax=agemax), fill=\"royalblue\")+\r\n  geom_rect(data=USdata, aes(xmax=-dose1/pop, xmin=-1, ymin=agemin, ymax=agemax), fill=\"Grey70\")+\r\n  geom_segment(aes(x=0, xend=0, y=0, yend=100), colour=\"White\")+\r\n  scale_x_continuous(name=\"Proportion of population\", breaks=c(-1, -0.5, 0, 0.5, 1), \r\n                     labels=c(\"100%\", \"50%\", \"0%\", \"50%\", \"100%\"))+\r\n  scale_y_continuous(name=\"Age\", limits=c(0,100))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+\r\n  labs(title=\"<span style='color:navyblue;'>The US</span> has vaccinated fewer of its older population against COVID than <span style='color:darkred;'>England\",\r\n       subtitle=\"The proportion of people at each age in each country who are <span style='color:Grey70;'>unvaccinated</span>, have received <span style='color:royalblue;'>one </span><span style='color:tomato;'>dose </span>or are <span style='color:navyblue;'>fully </span><span style='color:darkred;'>vaccinated</span>.\",\r\n       caption=\"Data from CDC, NHS England and ONS\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#CHRs from Dan Howdon\r\nCHR2534 <- 0.015435\r\nCHR3544 <- 0.022447\r\nCHR4554 <- 0.02882\r\nCHR5564 <- 0.0491\r\nCHR6574 <- 0.115683\r\nCHR7584 <- 0.270174\r\nCHR85plus <- 0.419715\r\n\r\n#Merge together\r\ndata <- UKdata %>% mutate(country=\"England\") %>% \r\n  bind_rows(USdata %>% mutate(country=\"USA\")) %>% \r\n  select(age, dose1only, dose2, unvax, pop, agemin, agemax, agewidth, country) %>% \r\n  gather(dose, number, c(dose1only, dose2, unvax)) %>% \r\n  #Calculate hospitalisation risk reduction from vaccinations using effectiveness data from\r\n  #https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1008919/Vaccine_surveillance_report_-_week_31.pdf\r\n  mutate(risk=case_when(\r\n    dose==\"dose1only\" ~ number*(1-0.8),\r\n    dose==\"dose2\" ~ number*(1-0.96),\r\n    TRUE ~ number)) %>% \r\n  group_by(age, pop, agemin, agemax, agewidth, country) %>% \r\n  summarise(risk=sum(risk)) %>% \r\n  ungroup() %>% \r\n  mutate(riskreduction=risk/pop) %>% \r\n  arrange(fct_rev(country), age) %>% \r\n  #Merge in CHRs calculated by Dan Howdon\r\n  #Weighted averages informed by pop data from https://data.census.gov/cedsci/table?q=United%20States&g=0100000US&y=2019&tid=ACSST1Y2019.S0101\r\n  #and ONS\r\n  mutate(CHR=case_when(\r\n    age %in% c(\"25-29\", \"30-34\") ~ CHR2534,\r\n    age %in% c(\"35-39\", \"40-44\") ~ CHR3544,\r\n    age %in% c(\"45-49\", \"50-54\") ~ CHR4554,\r\n    age %in% c(\"55-59\", \"60-64\") ~ CHR5564,\r\n    age %in% c(\"65-69\", \"70-74\", \"65-74\") ~ CHR6574,\r\n    age %in% c(\"75-79\") ~ CHR7584,\r\n    age==\"25-39\" ~ ((23.2+22.3)*CHR2534+21.7*CHR3544)/(23.2+22.3+21.7),\r\n    age==\"40-49\" ~ (20.2*CHR3544+20.4*CHR4554)/(20.2+20.4),\r\n    age==\"50-64\" ~ (20.5*CHR4554+(21.5+21.0)*CHR5564)/(20.5+21.5+21.0),\r\n    age==\"75+\" ~ ((9.8+6.3)*CHR7584+6.4*CHR85plus)/(9.8+6.3+6.4),\r\n    age==\"80+\" ~ (1.4*CHR7584+1.4*CHR85plus)/(1.4+1.4),\r\n    TRUE ~ 0),\r\n    hosp=risk*CHR, hosp_avert=pop*CHR-hosp)\r\n\r\n#Visualise risk reduction\r\ntiff(\"Outputs/COVIDVaxxAgeUKUSARiskRed.tiff\", units=\"in\", width=10, height=6.6, res=500)\r\nggplot(data)+\r\n  geom_rect(aes(xmin=agemin, xmax=agemax, ymin=0, ymax=riskreduction, fill=country), alpha=0.6,\r\n            show.legend=FALSE)+\r\n  geom_segment(aes(x=0, xend=100, y=1, yend=1))+\r\n  scale_x_continuous(name=\"Age\")+\r\n  scale_y_continuous(name=\"Proportion of risk without vaccination\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"tomato\", \"royalblue\"))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown())+\r\n  labs(title=\"<span style='color:tomato;'>England's</span> vaccine programme has reduced hospitalisation risk much more than <span style='color:royalblue;'>the USA's\",\r\n       subtitle=\"Shaded areas represent risk of hospitalisation from COVID as a proportion of the risk in an entirely unvaccinated population, by age.\",\r\n       caption=\"Vaccination data from CDC and NHS England | Population data from US Census Bureau and ONS | Vaccine effectiveness data from PHE\\nPlot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Visualise hospitalisations averted\r\ntiff(\"Outputs/COVIDVaxxAgeUKUSARiskAdj.tiff\", units=\"in\", width=9, height=6.6, res=500)\r\nggplot()+\r\n  geom_rect(data=data %>% filter(country==\"England\"), aes(xmin=0, xmax=hosp/agewidth, ymin=agemin, ymax=agemax),\r\n            fill=\"tomato\")+\r\n  geom_rect(data=data %>% filter(country==\"England\"), aes(xmin=hosp/agewidth, xmax=(hosp+hosp_avert)/agewidth, ymin=agemin, ymax=agemax),\r\n            fill=\"Grey70\")+\r\n  geom_rect(data=data %>% filter(country==\"USA\"), aes(xmax=0, xmin=-hosp/agewidth, ymin=agemin, ymax=agemax),\r\n            fill=\"royalblue\")+\r\n  geom_rect(data=data %>% filter(country==\"USA\"), aes(xmax=-hosp/agewidth, xmin=-(hosp+hosp_avert)/agewidth, ymin=agemin, ymax=agemax),\r\n            fill=\"Grey70\")+\r\n  geom_segment(aes(x=0, xend=0, y=25, yend=100), colour=\"White\")+\r\n  scale_x_continuous(name=\"Total hospitalisations for each single year of age\",\r\n                     labels=abs)+\r\n  scale_y_continuous(name=\"Age\", limits=c(25,100))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccination has reduced COVID hospitalisation risks more <span style='color:tomato;'>in England</span> than <span style='color:royalblue;'>in the US\",\r\n       subtitle=\"<span style='color:royalblue;'>Coloured </span><span style='color:tomato;'>areas</span> represent the total number of hospital admissions we would expect in each country if everyone developed COVID,<br>based on current vaccination levels.<span style='color:Grey60;'>Grey areas</span> represent hospital admissions averted as a result of vaccination.\",\r\n       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\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDVaxxAgeUKUSARiskAdjNorm.tiff\", units=\"in\", width=9, height=6.6, res=500)\r\nggplot()+\r\n  geom_rect(data=data %>% filter(country==\"England\"), aes(xmin=0, xmax=hosp/agewidth, ymin=agemin, ymax=agemax),\r\n            fill=\"tomato\")+\r\n  geom_rect(data=data %>% filter(country==\"England\"), aes(xmin=hosp/agewidth, xmax=(hosp+hosp_avert)/agewidth, ymin=agemin, \r\n                                                          ymax=agemax),\r\n            fill=\"Grey70\")+\r\n  geom_rect(data=data %>% filter(country==\"USA\"), aes(xmax=0, xmin=-hosp/(agewidth*5.9), ymin=agemin, ymax=agemax),\r\n            fill=\"royalblue\")+\r\n  geom_rect(data=data %>% filter(country==\"USA\"), aes(xmax=-hosp/(agewidth*5.9), xmin=-hosp/(agewidth*5.9)-hosp_avert/(agewidth*5.9), \r\n                                                      ymin=agemin, ymax=agemax),\r\n            fill=\"Grey70\")+\r\n  geom_segment(aes(x=0, xend=0, y=25, yend=100), colour=\"White\")+\r\n  scale_x_continuous(name=\"Total hospitalisations for each single year of age\",\r\n                     breaks=c(-50847.46, 0, 50000), \r\n                     labels=c(\"300,000\", \"0\", \"50,000\"),\r\n                     limits=c(-110000, 110000))+\r\n  scale_y_continuous(name=\"Age\", limits=c(25,100))+\r\n  theme_custom()+\r\n  theme(plot.title=element_markdown(), plot.subtitle=element_markdown())+\r\n  labs(title=\"Vaccination has reduced COVID hospitalisation risks more <span style='color:tomato;'>in England</span> than <span style='color:royalblue;'>in the US\",\r\n       subtitle=\"<span style='color:royalblue;'>Coloured </span><span style='color:tomato;'>areas</span> represent the total number of hospital admissions we would expect in each country if everyone developed COVID,<br>based on current vaccination levels.<span style='color:Grey60;'>Grey areas</span> represent hospital admissions averted as a result of vaccination.<br>Areas are scaled to imply equal populations, so the x-axis scales on the left- and right- of the centre are different.\",\r\n       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\")+\r\n  annotate(\"text\", x=-60000, y=50, label=\"USA\", colour=\"royalblue\", family=\"Lato\", size=rel(6),\r\n           fontface=\"bold\")+\r\n  annotate(\"text\", x=60000, y=50, label=\"England\", colour=\"tomato\", family=\"Lato\", size=rel(6),\r\n           fontface=\"bold\")+\r\n  annotate(\"text\", x=-85000, y=90, label=\"Hospital admissions\\nbased on current vaccinations\", colour=\"Black\", \r\n           family=\"Lato\", size=rel(4))+\r\n  annotate(\"text\", x=75000, y=90, label=\"Admissions averted\\nby vaccinations\", colour=\"Black\", family=\"Lato\", size=rel(4))+\r\n  geom_curve(aes(x=-58000, y=90, xend=-5000, yend=85), \r\n             colour=\"Black\", curvature=-0.25, arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), \r\n             lineend=\"round\")+\r\n  geom_curve(aes(x=58000, y=90, xend=35000, yend=85), \r\n             colour=\"Black\", curvature=-0.15, arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), \r\n             lineend=\"round\")\r\ndev.off()\r\n\r\n#Calculate actual numbers\r\ndata %>% group_by(country) %>% \r\n  summarise(hosp=sum(hosp), hosp_avert=sum(hosp_avert)) %>% \r\n  mutate(percchange=hosp_avert/(hosp+hosp_avert))\r\n\r\n"
  },
  {
    "path": "Heatmaps/COVIDVaxxEthnicityEngScot.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(ggtext)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(paletteer)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\n#Scottish data doesn't appear to be machine readable, sadface.\r\n#https://www.scotlandscensus.gov.uk/webapi/jsf/tableView/tableView.xhtml\r\nScotdata <- data.frame(age=c(\"0-15\", \"16-24\", \"25-34\", \"35-49\", \"50-64\", \"65+\"),\r\n                       White=c(836005, 593489, 617472, 1101772, 1025729, 882940),\r\n                       `Asian/Asian Scottish/Asian British`=c(31449, 28356, 33048, 29106, 12925, 5794),\r\n                       `Black/African/Caribbean/Black British`=\r\n                         c(7774+1499, 3915+924, 9081+1236, 7126+1847,1374+740, 368+294),\r\n                       `Mixed/Other`=c(9097+3507, 3597+2207, 2945+3545, 2602+3230, 1080+1392, \r\n                                       494+444),\r\n                       Country=\"Scotland\") %>% \r\n  set_names(c(\"age\", \"White\", \"Asian/Asian Scottish/Asian British\",\r\n              \"Black/African/Caribbean/Black British\", \"Mixed/Other\", \"Country\")) %>% \r\n  gather(Ethnicity, pop, c(2:5))\r\n\r\nEngurl <- \"https://www.ons.gov.uk/file?uri=/aboutus/transparencyandgovernance/freedomofinformationfoi/ethnicgroupsbysexandagefromthe2011census/dc2101ewethnicgroupbysexbyage.xlsx\"\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=Engurl, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nEngdata <- read_excel(temp, sheet=\"All persons\", range=\"A11:Y33\") %>% \r\n  select(Age, `White: Total`, `Mixed/multiple ethnic group: Total`,\r\n         `Asian/Asian British: Total`, `Black/African/Caribbean/Black British: Total`,\r\n         `Other ethnic group: Total`) %>% \r\n  set_names(c(\"age\", \"White\", \"Mixed\", \"Asian/Asian Scottish/Asian British\",\r\n              \"Black/African/Caribbean/Black British\", \"Other\")) %>% \r\n  rowwise() %>% \r\n  mutate(`Mixed/Other`=Mixed+Other) %>% \r\n  select(-c(\"Mixed\", \"Other\")) %>% \r\n  gather(Ethnicity, pop, c(2:5)) %>% \r\n  mutate(age=case_when(\r\n           age %in% c(\"Age 0 to 4\", \"Age 5 to 7\", \"Age 8 to 9\", \"Age 10 to 14\", \"Age 15\") ~ \"0-15\",\r\n           age %in% c(\"Age 16 to 17\", \"Age 18 to 19\", \"Age 20 to 24\") ~ \"16-24\",\r\n           age %in% c(\"Age 25 to 29\", \"Age 30 to 34\") ~ \"25-34\",\r\n           age %in% c(\"Age 35 to 39\", \"Age 40 to 44\", \"Age 45 to 49\") ~ \"35-49\",\r\n           age %in% c(\"Age 50 to 54\", \"Age 55 to 59\", \"Age 60 to 64\") ~ \"50-64\",\r\n           TRUE ~ \"65+\")) %>% \r\n  group_by(Ethnicity, age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(Country=\"England\")\r\n\r\ndata <- bind_rows(Engdata, Scotdata)\r\n\r\nagg_tiff(\"Outputs/EthnicityxAgeEngScot.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(data, aes(x=age, y=pop, fill=Ethnicity))+\r\n  geom_col(position=\"fill\")+\r\n  scale_x_discrete(name=\"Age\")+\r\n  scale_y_continuous(name=\"Proportion of population\", labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_d(\"rcartocolor::Safe\")+\r\n  facet_wrap(~Country)+\r\n  theme_custom()+\r\n  labs(title=\"England has a much larger non-white population than Scotland\",\r\n       subtitle=\"Population by age and self-reported ethnicity in the 2011 census\",\r\n       caption=\"Data from ONS and NRS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Estimate uptake if all that mattered was ethnicity, using uptake by ethnicity\r\n#approximated from PHE surveillance reports\r\ncalcs <- data %>% \r\n  group_by(Country, age) %>% \r\n  mutate(total=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(popprop=pop/total,\r\n         uptake=case_when(\r\n           Ethnicity==\"White\" ~ 0.929,\r\n           Ethnicity==\"Asian/Asian Scottish/Asian British\" ~ 0.83,\r\n           Ethnicity==\"Black/African/Caribbean/Black British\" ~ 0.67,\r\n           TRUE ~ 0.76),\r\n         vaxxed=popprop*uptake) %>% \r\n  group_by(Country, age) %>% \r\n  summarise(vaxxed=sum(vaxxed))\r\n\r\nagg_tiff(\"Outputs/COVIDVaxxEthnicityModelledEngScot.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(calcs, aes(x=age, y=vaxxed, fill=Country))+\r\n  geom_col(position=\"dodge\")+\r\n  scale_y_continuous(name=\"Proportion of population\", labels=label_percent(accuracy=1))+\r\n  scale_fill_manual(values=c(\"#F44B4B\", \"#0076BB\"), name=\"Country\")+\r\n  theme_custom()+\r\n  labs(title=\"Ethnic differences mean you'd expect higher vaccine uptake in Scotland\",\r\n       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\",\r\n       caption=\"Data from UKHSA, ONS and NRS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/COVIDWaveComparisons.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(ggrepel)\r\nlibrary(extrafont)\r\nlibrary(ragg)\r\nlibrary(ggtext)\r\nlibrary(patchwork)\r\n\r\ntheme_custom <- function() {\r\n  theme_classic() %+replace%\r\n    theme(plot.title.position=\"plot\", plot.caption.position=\"plot\",\r\n          strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n          plot.title=element_text(face=\"bold\", size=rel(1.5), hjust=0,\r\n                                  margin=margin(0,0,5.5,0)),\r\n          text=element_text(family=\"Lato\"))\r\n}\r\n\r\nsource <- \"https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=newAdmissionsRollingRate&metric=newCasesBySpecimenDateRollingRate&metric=newDeaths28DaysByDeathDateRollingRate&format=csv\"\r\n\r\nthreshold <- 100\r\n\r\ntemp <- tempfile()\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nrawdata <- read.csv(temp) %>% \r\n  mutate(date=as.Date(date)) %>% \r\n  set_names(c(\"code\", \"name\", \"type\", \"date\", \"admissions\", \"cases\", \"deaths\"))\r\n\r\nggplot(rawdata, aes(x=date, y=cases, group=name))+\r\n  geom_line()+\r\n  geom_hline(yintercept=threshold)\r\n\r\n#Pick out date cases first exceeded 100/100,000 in 7-day period since 1st May\r\ndata <- rawdata %>%\r\n  merge(rawdata %>% \r\n          group_by(name, code) %>% \r\n          filter(date>as.Date(\"2021-05-01\") & cases>threshold) %>% \r\n          summarise(startdatew4=min(date)) %>% \r\n          ungroup() %>% \r\n          select(code, startdatew4), by=\"code\", all.x=TRUE) %>% \r\n  merge(rawdata %>% \r\n          group_by(name, code) %>% \r\n          filter(date>as.Date(\"2020-09-01\") & cases>threshold) %>% \r\n          summarise(startdatew2=min(date)) %>% \r\n          ungroup() %>% \r\n          select(code, startdatew2), by=\"code\", all.x=TRUE) %>% \r\n  mutate(dayssincew2=as.integer(if_else(date-startdatew2>=0, date-startdatew2, NA_real_)),\r\n         dayssincew4=as.integer(if_else(date-startdatew4>=0, date-startdatew4, NA_real_))) %>% \r\n  arrange(date)\r\n\r\ncases <- ggplot()+\r\n  geom_line(data=data %>% filter(dayssincew2<threshold),\r\n            aes(x=dayssincew2, y=cases), colour=\"Grey70\")+\r\n  geom_line(data=data %>% filter(!is.na(dayssincew4)),\r\n            aes(x=dayssincew4, y=cases), colour=\"#FF4E86\")+\r\n  scale_x_continuous(name=\"\", limits=c(0,50))+\r\n  scale_y_continuous(name=\"Weekly cases per 100,000\", limits=c(0,NA))+\r\n  facet_wrap(~name, ncol=1)+\r\n  theme_custom()+\r\n  theme(plot.title=element_text(face=\"plain\"))+\r\n  labs(title=\"Cases\")\r\n\r\nadmissions <- ggplot()+\r\n  geom_line(data=data %>% filter(dayssincew2<threshold),\r\n            aes(x=dayssincew2, y=admissions), colour=\"Grey70\")+\r\n  geom_line(data=data %>% filter(!is.na(dayssincew4)),\r\n            aes(x=dayssincew4, y=admissions), colour=\"#FF4E86\")+\r\n  scale_x_continuous(name=\"Days since start of wave\", \r\n                     limits=c(0,50))+\r\n  scale_y_continuous(name=\"Weekly admissions per 100,000\", limits=c(0,NA))+\r\n  facet_wrap(~name, ncol=1)+\r\n  theme_custom()+\r\n  theme(plot.title=element_text(face=\"plain\"))+\r\n  labs(title=\"Admissions\")\r\n\r\ndeaths <- ggplot()+\r\n  geom_line(data=data %>% filter(dayssincew2<threshold),\r\n            aes(x=dayssincew2, y=deaths), colour=\"Grey70\")+\r\n  geom_line(data=data %>% filter(!is.na(dayssincew4)),\r\n            aes(x=dayssincew4, y=deaths), colour=\"#FF4E86\")+\r\n  scale_x_continuous(name=\"\", limits=c(0,50))+\r\n  scale_y_continuous(name=\"Weekly deaths per 100,000\", limits=c(0,NA))+\r\n  facet_wrap(~name, ncol=1)+\r\n  theme_custom()+\r\n  theme(plot.title=element_text(face=\"plain\"))+\r\n  labs(title=\"Deaths\")\r\n\r\nplot <- cases+admissions+deaths+\r\n  plot_annotation(\r\n    title=\"COVID admissions and deaths are lower in this wave than in the Autumn\",\r\n    subtitle=paste0(\"Trajectories of cases, admissions and deaths in <span style='color:#FF4E86;'>the current wave</span> compared to <span style='color:Grey70;'>the second, autumn wave</span>.<br>The start of each wave in each country is defined as the point at which cases first exceeded \", \r\n                    threshold, \" per 100,000 people per week.\"),\r\n    caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\",\r\n    theme=theme(plot.title=element_text(face=\"bold\", size=rel(1.8)),\r\n                plot.subtitle=element_markdown(),\r\n                text=element_text(family=\"Lato\")))\r\n\r\nagg_tiff(\"Outputs/COVIDWaveComparisons.tiff\", units=\"in\", width=10, height=7, res=800)\r\nplot\r\ndev.off()\r\n\r\n\r\nagg_tiff(\"Outputs/COVIDWaveComparisonsPathScotland.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot()+\r\n  geom_path(data=data %>% filter(dayssincew2<threshold & name==\"Scotland\"),\r\n            aes(x=cases, y=admissions), colour=\"Grey70\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=data %>% filter(!is.na(dayssincew4) & name==\"Scotland\"),\r\n            aes(x=cases, y=admissions), colour=\"#FF4E86\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  scale_x_continuous(name=\"Cases per 100,000 people per week\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Admissions per 100,000 people per week\", limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The relationship between COVID cases and admissions in Scotland has changed significantly\",\r\n       subtitle=paste0(\"Trajectories of cases, admissions and deaths in <span style='color:#FF4E86;'>the current wave</span> compared to the first 100 days of <span style='color:Grey70;'>the second, autumn wave</span>.<br>The start of each wave is defined as the point at which cases first exceeded \", \r\n                       threshold, \" per 100,000 people per week.\"),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDWaveComparisonsPathEngland.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot()+\r\n  geom_path(data=data %>% filter(dayssincew2<threshold & name==\"England\"),\r\n            aes(x=cases, y=admissions), colour=\"Grey70\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=data %>% filter(!is.na(dayssincew4) & name==\"England\"),\r\n            aes(x=cases, y=admissions), colour=\"#FF4E86\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  scale_x_continuous(name=\"Cases per 100,000 people per week\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Admissions per 100,000 people per week\", limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The relationship between COVID cases and admissions in England has changed significantly\",\r\n       subtitle=paste0(\"Trajectories of cases, admissions and deaths in <span style='color:#FF4E86;'>the current wave</span> compared to the first 100 days of <span style='color:Grey70;'>the second, autumn wave</span>.<br>The start of each wave is defined as the point at which cases first exceeded \", \r\n                       threshold, \" per 100,000 people per week.\"),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDWaveComparisonsPathNI.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot()+\r\n  geom_path(data=data %>% filter(dayssincew2<threshold & name==\"Northern Ireland\"),\r\n            aes(x=cases, y=admissions), colour=\"Grey70\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=data %>% filter(!is.na(dayssincew4) & name==\"Northern Ireland\"),\r\n            aes(x=cases, y=admissions), colour=\"#FF4E86\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  scale_x_continuous(name=\"Cases per 100,000 people per week\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Admissions per 100,000 people per week\", limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The relationship between COVID cases and admissions in Northern Ireland has changed\",\r\n       subtitle=paste0(\"Trajectories of cases, admissions and deaths in <span style='color:#FF4E86;'>the current wave</span> compared to the first 100 days of <span style='color:Grey70;'>the second, autumn wave</span>.<br>The start of each wave is defined as the point at which cases first exceeded \", \r\n                       threshold, \" per 100,000 people per week.\"),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDWaveComparisonsPathWales.tiff\", units=\"in\", width=10, height=7, res=800)\r\nggplot()+\r\n  geom_path(data=data %>% filter(dayssincew2<threshold & name==\"Wales\"),\r\n            aes(x=cases, y=admissions), colour=\"Grey70\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  geom_path(data=data %>% filter(!is.na(dayssincew4) & name==\"Wales\"),\r\n            aes(x=cases, y=admissions), colour=\"#FF4E86\", show.legend=FALSE,\r\n            arrow = arrow(type = \"closed\", angle = 30, length = unit(0.05, \"inches\")))+\r\n  scale_x_continuous(name=\"Cases per 100,000 people per week\", limits=c(0,NA))+\r\n  scale_y_continuous(name=\"Admissions per 100,000 people per week\", limits=c(0,NA))+\r\n  theme_custom()+\r\n  theme(plot.subtitle=element_markdown())+\r\n  labs(title=\"The relationship between COVID cases and admissions in Wales has changed substantially\",\r\n       subtitle=paste0(\"Trajectories of cases, admissions and deaths in <span style='color:#FF4E86;'>the current wave</span> compared to the first 100 days of <span style='color:Grey70;'>the second, autumn wave</span>.<br>The start of each wave is defined as the point at which cases first exceeded \", \r\n                       threshold, \" per 100,000 people per week.\"),\r\n       caption=\"Data from coronavirus.data.gov.uk | Plot by @VictimOfMaths\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/English LA Heatmaps.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(forcats)\nlibrary(RcppRoll)\nlibrary(data.table)\nlibrary(readxl)\nlibrary(cowplot)\nlibrary(sf)\nlibrary(rmapshaper)\nlibrary(gganimate)\nlibrary(paletteer)\nlibrary(ggtext)\n\noptions(scipen = 999)\n\n#Read in COVID case data\ntemp <- tempfile()\nsource <- \"https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata <- fread(temp)[,c(1:6)]\ncolnames(data) <- c(\"name\", \"code\", \"type\", \"date\", \"cases\", \"cumul_cases\")\ndata$date <- as.Date(data$date)\ndata <- subset(data, type==\"utla\")\n\n#Set up skeleton dataframe with dates\nLAcodes <- unique(data$code)\nmin <- min(data$date)\nmax <- max(data$date)\n\nskeleton <- 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)))\n\n#Map data onto skeleton\nfulldata <- merge(skeleton, data[,-c(1,3)], by=c(\"code\", \"date\"), all.x=TRUE, all.y=TRUE)\n\n#Bring in LA names\ntemp <- data %>%\n  group_by(code) %>%\n  slice(1L)\nfulldata <- merge(fulldata, temp[,c(1,2)], by=\"code\")\n\n#Fill in blank days\nfulldata$cases <- ifelse(is.na(fulldata$cases), 0, fulldata$cases)\n\n#Calculate cumulative sums so far\nfulldata <- fulldata %>%\n  group_by(code) %>%\n  mutate(cumul_cases=cumsum(cases))\n\n#this is the deaths for each NHS trust (only deaths in hospital) - we dont have daily deaths by LA yet \n#so need to map this to LA. Approach to do this developed by and code adapted from @Benj_barr.\n\n#Need to manually update the link to the latest total announced deaths file here: \n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-daily-deaths/\n#and extend the final number value in rows 78 & 80 by 1 to capture additional days (67=1st May announcement date)\n\ntemp <- tempfile()\nsource <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/01/COVID-19-total-announced-deaths-8-January-2021-1.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\ndeaths<-as.data.table(read_excel(temp, sheet=9, col_names = F))\n\ndeaths<-deaths[18:.N, c(1:318)]\n\ndeaths<- melt.data.table(deaths, id=1:4, measure.vars = 5:318)\n\ndeaths[, 2:=NULL]\nnames(deaths)<-c(\"region\", \"procode3\",\"trust\",\"variable\",\"deaths\")\ndeaths$procode3 <- substr(deaths$procode3, 1, 3)\n\ndeaths[order(variable), date:=1:.N, by=.(procode3)]\n\ndeaths[, date:=as.Date(\"2020-02-29\")+as.numeric(substr(variable, 4, 6))-5]\n\ndeaths[, variable:=NULL]\n\ndeaths$deaths <- as.numeric(deaths$deaths)\n#deaths<-deaths[, list(deaths=sum(as.numeric(deaths),na.rm = T)), by=.(procode3,trust)]\nsum(deaths$deaths)\n\n# this is the number of all emergency admissions in 2018-2019 for each trust split by LA\ndt1<-fread(\"Data/la_trust_lk.csv\")\n\ndt1<-dt1[is.na(areacode)==F]\nlength(unique(dt1$areacode))  #150\nsum(deaths$deaths)\ndeaths<-merge(deaths, dt1, by=\"procode3\", all.x = T, allow.cartesian = TRUE)\ndeaths[, fraction:=CountAdm/sum(CountAdm,na.rm = T),by=.(procode3, date)]\n# 66 deaths not allocated to LA, trust is not in look up\nsum(deaths[is.na(fraction)==T]$deaths)\ndeaths<-deaths[is.na(fraction)==F]\n\n#we then assume that deaths from each Trust were distributed between LAs based on the historical share of admissions from that LA\ndeaths[, deaths:=deaths*fraction]\n\n# 2019 LA boundary changes  \n#deaths[areaname==\"Bournemouth\"|areaname==\"Poole\",`:=` (areacode=\"E10000009\",areaname=\"Dorset CC\")]\ndeaths[areaname==\"Isles of Scilly\",`:=` (areacode=\"E06000052\",areaname=\"Cornwall\")]\ndeaths[areacode==\"E10000009\",`:=` (areacode=\"E06000059\")]\ndeaths[areacode==\"E06000029\",`:=` (areacode=\"E06000058\")]\n\ndeaths <- deaths %>%\n  group_by(areacode, date) %>%\n  summarise(deaths=sum(deaths, na.rm=TRUE))\n\nlength(unique(deaths$areacode))  #147\nsum(deaths$deaths)\n\ncolnames(deaths) <- c(\"code\", \"date\", \"deaths\")\n\nfulldata <- merge(fulldata, deaths, by=c(\"code\", \"date\"), all.x=TRUE)\n\nheatmap <- fulldata %>%\n  group_by(code) %>%\n  mutate(casesroll_avg=roll_mean(cases, 7, align=\"right\", fill=0), deathsroll_avg=roll_mean(deaths, 7, align=\"right\", fill=0)) %>%\n  mutate(totalcases=max(cumul_cases), maxcaserate=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcaserate)][1],\n         cumul_deaths=sum(deaths, na.rm=TRUE), totaldeaths=max(cumul_deaths, na.rm=TRUE), maxdeathrate=max(deathsroll_avg, na.rm=TRUE),\n         maxdeathsday=date[which(deathsroll_avg==maxdeathrate)][1])\n\nheatmap$maxcaseprop <- heatmap$casesroll_avg/heatmap$maxcaserate\nheatmap$maxdeathprop <- heatmap$deathsroll_avg/heatmap$maxdeathrate\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-03\"\nplotto <- max(heatmap$date)\n\n#Plot case trajectories\ncasetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  #scale_fill_viridis_c()+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 cases in English Local Authorities\",\n       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.\"),\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(size=rel(2.3)))\n\ncasebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  #scale_fill_viridis_c()+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDLACasesHeatmap.tiff\", units=\"in\", width=16, height=16, res=500)\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\npng(\"Outputs/COVIDLACasesHeatmap.png\", units=\"in\", width=16, height=16, res=500)\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#Plot death trajectories\n\ndeathtiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxdeathsday), fill=maxdeathprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(\"2020-03-06\", plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 deaths in hospital in English Local Authorities\",\n       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.\"),\n       caption=\"Data from NHS England & Ben Barr | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"Black\"), plot.title=element_text(size=rel(2.3)))\n\ndeathbars <- ggplot(subset(heatmap, date==maxdeathsday), aes(x=totaldeaths, y=fct_reorder(name, maxdeathsday), fill=totaldeaths))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed deaths\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDLADeathHeatmap.tiff\", units=\"in\", width=16, height=16, res=500)\nplot_grid(deathtiles, deathbars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\npng(\"Outputs/COVIDLADeathHeatmap.png\", units=\"in\", width=16, height=16, res=500)\nplot_grid(deathtiles, deathbars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n##################################\n#Absolute version of the heatmaps#\n##################################\n\n#Bring in population data \ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D367\", col_names=TRUE)\ncolnames(LApop) <- c(\"code\", \"name\", \"geography\", \"pop\")\n\nheatmap <- merge(heatmap, LApop[,c(1,4)], by=\"code\")\n\nheatmap$cumul_caserate <- heatmap$totalcases*100000/heatmap$pop\nheatmap$cumul_deathrate <- heatmap$totaldeaths*100000/heatmap$pop\nheatmap$avgcaserates <- heatmap$casesroll_avg*100000/heatmap$pop\n\n#Plot absolute case trajectories\nabscasetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxcaseday), fill=casesroll_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 cases in English Local Authorities\",\n       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.\"),\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"Black\"))\n\nabscasebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=cumul_caserate, y=fct_reorder(name, maxcaseday), fill=cumul_caserate))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\\nper 100,000 population\", breaks=c(0,500,1000,1500))+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDLACasesHeatmapAbs.tiff\", units=\"in\", width=16, height=16, res=500)\nplot_grid(abscasetiles, abscasebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\npng(\"Outputs/COVIDLACasesHeatmapAbs.png\", units=\"in\", width=16, height=16, res=500)\nplot_grid(abscasetiles, abscasebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#Plot absolute case rate trajectories\nratetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxcaseday), fill=avgcaserates))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 case rates in English Local Authorities\",\n       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.\"),\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(1.2)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"Black\"), plot.title=element_text(size=rel(2.3)))\n\nratebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=pop, y=fct_reorder(name, maxcaseday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDLARateHeatmap.tiff\", units=\"in\", width=16, height=16, res=500)\nplot_grid(ratetiles, ratebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\npng(\"Outputs/COVIDLARateHeatmap.png\", units=\"in\", width=16, height=16, res=500)\nplot_grid(ratetiles, ratebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n\n#Plot absolute death trajectories\ndeath <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxdeathsday), fill=deathsroll_avg))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(\"2020-03-06\", plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 deaths in hospital in English Local Authorities\",\n       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.\"),\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"Black\"), plot.title=element_text(size=rel(2.3)))\n\ndeathbars <- ggplot(subset(heatmap, date==maxdeathsday), aes(x=cumul_deathrate, y=fct_reorder(name, maxdeathsday), fill=cumul_deathrate))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed deaths\\nper 100,000 population\", breaks=c(0,50,100))+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDLADeathsHeatmapAbs.tiff\", units=\"in\", width=16, height=16, res=500)\nplot_grid(death, deathbars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\npng(\"Outputs/COVIDLADeathsHeatmapAbs.png\", units=\"in\", width=16, height=16, res=500)\nplot_grid(death, deathbars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#Plot death rate trajectories\ndeathrate <- ggplot(heatmap, aes(x=date, y=fct_reorder(name, maxdeathsday), fill=deathsroll_avg*100000/pop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(\"2020-03-06\", plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 death rates in hospitals in English Local Authorities\",\n       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.\"),\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"Black\"), plot.title=element_text(size=rel(2.3)))\n\ndeathratebars <- ggplot(subset(heatmap, date==maxdeathsday), aes(x=pop, y=fct_reorder(name, maxdeathsday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDLADeathsRateHeatmap.tiff\", units=\"in\", width=16, height=16, res=500)\nplot_grid(deathrate, deathratebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\npng(\"Outputs/COVIDLADeathsRateHeatmap.png\", units=\"in\", width=16, height=16, res=500)\nplot_grid(deathrate, deathratebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n##########################\n#Map of case trajectories#\n##########################\n\n#Download shapefile of LA boundaries\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/6638c31a8e9842f98a037748f72258ed_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile <- st_read(file.path(temp2, name))\n\nnames(shapefile)[names(shapefile) == \"ctyua17cd\"] <- \"code\"\n\nsimplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)\n\n#Duplicate data to account for shapefile using pre-2019 codes\nint1 <- filter(heatmap, name==\"Bournemouth, Christchurch and Poole\")\nint1$code <- \"E06000028\"\nint2 <- filter(heatmap, name==\"Bournemouth, Christchurch and Poole\")\nint2$code <- \"E06000029\"\nint3 <- filter(heatmap, name==\"Bournemouth, Christchurch and Poole\")\nint3$code <- \"E10000009\"\n\ntemp <- rbind(heatmap, int1, int2, int3)\n\n#Calculate change in cases in the past week\nchange <- temp %>%\n  mutate(change=casesroll_avg-lag(casesroll_avg,7))\n\n#Exclude most recent day as reporting is usually very incomplete\nchange <- subset(change, date==max-3)\n\nmap.change <- full_join(simplemap, change, by=\"code\", all.y=TRUE)\nmap.change <- map.change %>% drop_na(\"maxcaseprop\")\n\n#Map of past week changes\n\nchangemap <- ggplot()+\n  geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA)+\n  geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill=\"#41ab5d\", colour=NA)+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  theme_classic()+\n  scale_fill_paletteer_c(\"scico::roma\", limit=c(-1,1)*max(abs(map.change$change)), \n                         name=\"Change in case numbers\\nin the past week\", breaks=c(-60,-30, 0,30,60),\n                         labels=c(\"-60\", \"-30\", \"0\", \"+30\", \"+60\"),direction=-1)+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.subtitle=element_markdown())+\n  labs(title=\"Recent changes in COVID-19 case numbers across England\",\n       subtitle=\"<span style='color:Grey50;'>Has the 7-day rolling average of case numbers <span style='color:#854B01FF;'>risen<span style='color:Grey50;'> or <span style='color:#014380FF;'>fallen<span style='color:Grey50;'> in the past week?<br>Areas with 0 cases shown in <span style='color:#41ab5d;'>green\",\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\n  geom_rect(aes(xmin=500000, xmax=560000, ymin=156000, ymax=200000), fill=\"transparent\",\n            colour=\"gray50\")+\n  geom_rect(aes(xmin=310000, xmax=405000, ymin=370000, ymax=430000), fill=\"transparent\",\n            colour=\"gray50\")+\n  geom_rect(aes(xmin=405000, xmax=490000, ymin=505000, ymax=580000), fill=\"transparent\",\n            colour=\"gray50\")\n#Add zoomed in areas\n#London\nLondon <- ggplot()+\n  geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA, show.legend=FALSE)+\n  geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill=\"#41ab5d\", colour=NA)+\n  scale_x_continuous(limits=c(500000,560000), expand=c(0,0))+\n  scale_y_continuous(limits=c(156000,200000), expand=c(0,0))+\n  theme_classic()+\n  scale_fill_paletteer_c(\"scico::roma\", limit=c(-1,1)*max(abs(map.change$change)), direction=-1)+\n  labs(title=\"Greater London\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(size=rel(0.9)))\n\n#North-West England\nNWEng <-ggplot()+\n  geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA, show.legend=FALSE)+\n  geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill=\"#41ab5d\", colour=NA)+\n  scale_x_continuous(limits=c(310000,405000), expand=c(0,0))+\n  scale_y_continuous(limits=c(370000,430000), expand=c(0,0))+\n  theme_classic()+\n  scale_fill_paletteer_c(\"scico::roma\", limit=c(-1,1)*max(abs(map.change$change)), direction=-1)+\n  labs(title=\"The North West\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(size=rel(0.9)))\n\n#Tyne/Tees  \nNEEng <- ggplot()+\n  geom_sf(data=map.change, aes(geometry=geometry, fill=change), colour=NA, show.legend=FALSE)+\n  geom_sf(data=subset(map.change, casesroll_avg==0), aes(geometry=geometry), fill=\"#41ab5d\", colour=NA)+\n  scale_x_continuous(limits=c(405000,490000), expand=c(0,0))+\n  scale_y_continuous(limits=c(505000,580000), expand=c(0,0))+\n  theme_classic()+\n  scale_fill_paletteer_c(\"scico::roma\", limit=c(-1,1)*max(abs(map.change$change)), direction=-1)+\n  labs(title=\"The North East\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(size=rel(0.9)))\n\ntiff(\"Outputs/COVIDChangesmapEng.tiff\", units=\"in\", width=9, height=11, res=500)\nggdraw()+\n  draw_plot(changemap)+\n  draw_plot(London, 0.01,0.34,0.32,0.21)+\n  draw_plot(NWEng, 0.01,0.57, 0.32, 0.24)+\n  draw_plot(NEEng, 0.57, 0.62, 0.22, 0.22)\ndev.off()\n\n#For animation\nmap.data <- full_join(simplemap, temp, by=\"code\", all.y=TRUE)\n\n#remove areas with no HLE data (i.e. Scotland, Wales & NI)\nmap.data <- map.data %>% drop_na(\"maxcaseprop\")\n\n#Animation of case trajectories\nCaseAnim <- ggplot(subset(map.data, date>as.Date(\"2020-02-25\")), aes(geometry=geometry, fill=maxcaseprop))+\n  geom_sf(colour=NA)+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases as a %\\nof peak cases\", breaks=c(0,0.25,0.5,0.75,1),\n                       labels=c(\"0%\", \"25%\", \"50%\", \"75%\", \"100%\"))+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of the pandemic across England\",\n       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}\",\n       caption=\"Data from Public Health England | Visualisation by @VictimOfMaths\")\n\nanimate(CaseAnim, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/CaseAnim.gif\"), end_pause=60)\n\n#Animation of death trajectories\nDeathAnim <- ggplot(subset(map.data, date>as.Date(\"2020-03-03\")), aes(geometry=geometry, fill=maxdeathprop))+\n  geom_sf(colour=NA)+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily deaths as a %\\nof peak deaths\", breaks=c(0,0.25,0.5,0.75,1),\n                       labels=c(\"0%\", \"25%\", \"50%\", \"75%\", \"100%\"))+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of the pandemic across England\",\n       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}\",\n       caption=\"Data from NHS England | Visualisation by @VictimOfMaths\")\n\nanimate(DeathAnim, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/DeathAnim.gif\"), end_pause=60)\n\n#Animation of absolute case numbers\nCaseAnimAbs <- ggplot(subset(map.data, date>as.Date(\"2020-02-25\")), aes(geometry=geometry, fill=casesroll_avg))+\n  geom_sf(colour=NA)+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily confirmed cases\", na.value=\"white\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of the pandemic across England\",\n       subtitle=\"Rolling 7-day average number of new confirmed cases.\\nDate: {frame_time}\",\n       caption=\"Data from Public Health England | Visualisation by @VictimOfMaths\")\n\nanimate(CaseAnimAbs, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/CaseAnimAbs.gif\"), end_pause=60)\n\n#Animation of death rates\nDeathRateAnim <- ggplot(subset(map.data, date>as.Date(\"2020-03-03\")), aes(geometry=geometry, fill=deathsroll_avg*100000/pop))+\n  geom_sf(colour=NA)+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily deaths\\nper 100,000\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of the pandemic across England\",\n       subtitle=\"Rolling 7-day average number of new confirmed COVID-19 deaths in hospitals per 100,000\\nDate: {frame_time}\",\n       caption=\"Data from NHS England | Visualisation by @VictimOfMaths\")\n\nanimate(DeathRateAnim, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/DeathRateAnim.gif\"), end_pause=60)\n\n#Quick analysis of potential COVID 'bumps'\n\ntemp1 <- subset(heatmap, name %in% c(\"Dorset\", \"Cornwall and Isles of Scilly\", \"Devon\", \"Bournemouth, Christchurch and Poole\",\n                                     \"West Sussex\", \"East Sussex\", \"Brighton and Hove\"))\n\ntiff(\"Outputs/COVIDSouthCoast.tiff\", units=\"in\", width=8, height=4, res=500)\nggplot(subset(temp1, date>\"2020-05-01\"), aes(x=date, y=name, fill=avgcaserates))+\n  geom_tile(colour=\"white\")+\n  scale_fill_distiller(palette=\"Spectral\", name=\"New cases\\nper 100,000\")+\n  scale_x_date(name=\"Date\")+\n  scale_y_discrete(name=\"\")+\n  theme_classic()+\n  labs(title=\"No clear signs of a rise in cases after the sunny May weather\",\n       subtitle=\"7-day rolling average of new confirmed COVID-19 cases\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\ntemp2 <- subset(heatmap, name %in% c(\"Islington\", \"Camden\", \"Hackney\", \"Southwark\", \"Tower Hamlets\",\n                                     \"Lambeth\", \"Lewisham\", \"Haringey\", \"Westminster\", \"Kensington and Chelsea\",\n                                     \"Hammersmith and Fulham\", \"Wandsworth\", \"Lewisham\", \"Newham\"))\n\ntiff(\"Outputs/COVIDLondon.tiff\", units=\"in\", width=8, height=5, res=500)\nggplot(subset(temp2, date>\"2020-05-01\"), aes(x=date, y=name, fill=avgcaserates))+\n  geom_tile(colour=\"white\")+\n  scale_fill_distiller(palette=\"Spectral\", name=\"New cases\\nper 100,000\")+\n  scale_x_date(name=\"Date\")+\n  scale_y_discrete(name=\"\")+\n  theme_classic()+\n  labs(title=\"No clear evidence of a rise in cases after the protests in Central London\",\n       subtitle=\"7-day rolling average of new confirmed COVID-19 cases\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\ntemp3 <- subset(heatmap, name %in% c(\"Leicester\", \"Bedford\", \"Barnsley\", \"Rotherham\",\n                                     \"Kirklees\", \"Bradford\", \"Rochdale\", \"Oldham\",\n                                     \"Tameside\", \"Blackburn with Darwen\"))\n\ntiff(\"Outputs/COVIDPillarsHeatmap.tiff\", units=\"in\", width=10, height=5, res=500)\nggplot(subset(temp3, date>\"2020-05-01\"), aes(x=date, y=name, fill=avgcaserates))+\n  geom_tile(colour=\"white\")+\n  scale_fill_distiller(palette=\"Spectral\", name=\"New cases\\nper 100,000\")+\n  scale_x_date(name=\"Date\")+\n  scale_y_discrete(name=\"\")+\n  theme_classic()+\n  labs(title=\"Mixed Pillar 1 trajectories in areas with high combined Pillar 1 and 2 tests in week 25\",\n       subtitle=\"7-day rolling average of new confirmed COVID-19 cases\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\n#Graph of pillar 1 tests in any LA you like\nLA <- \"Bradford\"\ntiff(paste0(\"Outputs/COVIDNewCases\", LA, \".tiff\"), units=\"in\", width=8, height=6, res=500)\nggplot()+\n  geom_col(data=subset(heatmap, name==LA), aes(x=date, y=cases), fill=\"skyblue2\")+\n  geom_line(data=subset(heatmap, name==LA & date<max-1), aes(x=date, y=casesroll_avg), colour=\"red\")+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(\"New COVID-19 cases\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=paste0(\"Confirmed new COVID cases in \",LA),\n       subtitle=\"Confirmed new COVID-19 cases identified through combined pillar 1 & 2 testing and the <span style='color:Red;'>7-day rolling average\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\n#New lockdown areas\nLA <- c(\"Calderdale\", \"Blackburn with Darwen\", \"Leicester\", \"Bury\", \"Oldham\", \"Manchester\",\n        \"Salford\", \"Rochdale\", \"Stockport\", \"Tameside\", \"Trafford\", \"Wigan\", \"Bolton\",\n        \"Kirklees\", \"Lancashire\")\n\ntiff(\"Outputs/COVIDNewLockdown.tiff\", units=\"in\", width=10, height=5, res=500)\nggplot(subset(heatmap, name %in% LA), aes(x=date, y=name, fill=avgcaserates))+\n  geom_tile(colour=\"white\")+\n  geom_segment(aes(x=as.Date(\"2020-06-29\"), xend=as.Date(\"2020-06-29\"), y=0, yend=16), colour=\"NavyBlue\", linetype=2)+\n  geom_segment(aes(x=as.Date(\"2020-07-31\"), xend=as.Date(\"2020-07-31\"), y=0, yend=16), colour=\"Red\", linetype=2)+\n  scale_fill_distiller(palette=\"Spectral\", name=\"New cases\\nper 100,000\")+\n  scale_x_date(name=\"Date\")+\n  scale_y_discrete(name=\"\")+\n  theme_classic()+\n  labs(title=\"Trajectories of COVID cases in areas with second lockdown restrictions\",\n       subtitle=\"7-day rolling average of new confirmed COVID-19 cases per 100,000 inhabitants\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Heatmaps/German State Heatmaps.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(forcats)\nlibrary(readxl)\nlibrary(RcppRoll)\nlibrary(zoo)\nlibrary(cowplot)\nlibrary(extrafont)\n\noptions(scipen=999999)\n\n#Read in data\ntemp <- tempfile()\nsource <- \"https://raw.githubusercontent.com/jgehrcke/covid-19-germany-gae/master/data.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\ndata <- read.csv(temp)\n\ndata_long <- pivot_longer(data, c(3:34), names_to=c(\"State\", \"measure\"), names_sep=\"_\", values_to=\"count\")[,-c(2:4)]\n\ndata_long$date <- as.Date(substr(data_long$time_iso8601, 1, 10))\n\n#Tidy up state names\ndata_long$State <- case_when(\n  data_long$State==\"DE.BW\" ~ \"Baden-Württemberg\",\n  data_long$State==\"DE.BY\" ~ \"Bayern\",\n  data_long$State==\"DE.BB\" ~ \"Brandenburg\",\n  data_long$State==\"DE.BE\" ~ \"Berlin\",\n  data_long$State==\"DE.HB\" ~ \"Bremen\",\n  data_long$State==\"DE.HH\" ~ \"Hamburg\",\n  data_long$State==\"DE.HE\" ~ \"Hessen\",\n  data_long$State==\"DE.MV\" ~ \"Mecklenburg-Vorpommern\",\n  data_long$State==\"DE.NI\" ~ \"Niedersachsen\",\n  data_long$State==\"DE.NW\" ~ \"Nordrhein-Westfalen\",\n  data_long$State==\"DE.RP\" ~ \"Rheinland-Pfalz\",\n  data_long$State==\"DE.SL\" ~ \"Saarland\",\n  data_long$State==\"DE.ST\" ~ \"Sachsen-Anhalt\",\n  data_long$State==\"DE.SN\" ~ \"Sachsen\",\n  data_long$State==\"DE.SH\" ~ \"Schleswig-Holstein\",\n  data_long$State==\"DE.TH\" ~ \"Thüringen\")\n\n\n#There appear to be weird errors in the data for Bayern (cases) and Hamburg (cases & deaths) \n#from 1st September so remove these data points for now\ndata_long <- data_long %>% \n  filter(!(date==as.Date(\"2020-09-01\") & State==\"Bayern\" & measure==\"cases\")) %>% \n  filter(!(date==as.Date(\"2020-09-01\") & State==\"Hamburg\"))\n\n#Some dates are missing, so set up skeleton dataset with all dates\n#Set up skeleton dataframe with dates\nStates <- unique(data_long$State)\nmin <- min(data_long$date)\nmax <- max(data_long$date)\n\nskeleton <- data.frame(State=rep(States, each=(max-min+1), times=2), \n                       date=rep(seq.Date(from=min, to=max, by=\"day\"), each=1, times=length(States)*2),\n                       measure=rep(c(\"cases\", \"deaths\"), each=length(States)*(max-min+1)))\n\n#Map data onto skeleton\nfulldata <- merge(skeleton, data_long[,-c(1)], by=c(\"State\", \"date\", \"measure\"), all.x=TRUE, all.y=TRUE)\n\n#Interpolate missing dates\nfulldata <- fulldata %>%\n  group_by(State, measure) %>%\n  mutate(count=na.spline(count))\n\n#Add in populations\nfulldata <- fulldata %>% \n  mutate(pop=case_when(\n    State==\"Baden-Württemberg\" ~ 11069533,\n    State==\"Bayern\" ~ 13076721,\n    State==\"Brandenburg\" ~ 2511917,\n    State==\"Berlin\" ~ 2644826,\n    State==\"Bremen\" ~ 682986,\n    State==\"Hamburg\" ~ 1841179,\n    State==\"Hessen\" ~ 6265809,\n    State==\"Mecklenburg-Vorpommern\" ~ 1609675,\n    State==\"Niedersachsen\" ~ 7982448,\n    State==\"Nordrhein-Westfalen\" ~ 17932651,\n    State==\"Rheinland-Pfalz\" ~ 4084844,\n    State==\"Saarland\" ~ 990509,\n    State==\"Sachsen-Anhalt\" ~ 2208321,\n    State==\"Sachsen\" ~ 4077937,\n    State==\"Schleswig-Holstein\" ~ 2896712,\n    State==\"Thüringen\" ~ 2143145))\n\n#Calculate daily figures\nfulldata <- fulldata %>%\n  arrange(measure, State, date) %>%\n  group_by(State, measure) %>%\n  mutate(daycount=count-lag(count,1))\n\n#Ignore days when cases go *down*, probably due to reallocation\nfulldata$daycount <- ifelse(is.na(fulldata$daycount), 0, fulldata$daycount)\nfulldata$daycount <- ifelse(fulldata$daycount<0, 0, fulldata$daycount)\n\nheatmap <- fulldata %>%\n  group_by(State, measure) %>%\n  mutate(casesroll_avg=roll_mean(daycount, 7, align=\"right\", fill=0)) %>%\n  mutate(maxcases=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcases)][1],\n         totalcases=max(count), maxcaseprop=casesroll_avg/maxcases,\n         caserate=daycount*100000/pop, caserate_avg=casesroll_avg*100000/pop)\n\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-21\"\nplotto <- max\n\n#Plot case trajectories\ncasetiles <- ggplot(subset(heatmap, measure==\"cases\"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 cases in German Bundesländer\",\n       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.\"),\n       caption=\"Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), \n        plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), plot.title=element_text(face=\"bold\", size=rel(1.5)),\n        text=element_text(family=\"Lato\"))\n\ncasebars <- ggplot(subset(heatmap, date==maxcaseday & measure==\"cases\"), \n                   aes(x=totalcases/1000, y=fct_reorder(State, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\\n(1000s)\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"),\n        text=element_text(family=\"Lato\"))\n\ntiff(\"Outputs/COVIDGermanStateCasesHeatmap.tiff\", units=\"in\", width=11, height=6, res=500)\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#Plot case rate version\ncaseratetiles <- ggplot(subset(heatmap, measure==\"cases\"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=caserate_avg))+\n  geom_tile(colour=\"White\")+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily Cases\\nper 100,000\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 case rates in German Bundesländer\",\n       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.\"),\n       caption=\"Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"),\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.5)))\n\ncaselegend <- get_legend(\n  caseratetiles + theme(legend.box.margin = margin(0, 0, 0, 12))\n)\n\ncaseratebars <- ggplot(subset(heatmap, date==maxcaseday & measure==\"cases\"), \n                   aes(x=pop/1000000, y=fct_reorder(State, maxcaseday), fill=pop))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Population\\n(millions)\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"),\n        text=element_text(family=\"Lato\"))\n\ntiff(\"Outputs/COVIDGermanStateCaseRateHeatmap.tiff\", units=\"in\", width=13, height=6, res=500)\nplot <- plot_grid(caseratetiles+theme(legend.position=\"none\"), caseratebars, align=\"h\", rel_widths=c(1,0.2))\nplot_grid(plot, caselegend, rel_widths=c(1,0.1))\ndev.off()\n\n#Plot death trajectories\ndeathtiles <- ggplot(subset(heatmap, measure==\"deaths\"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 deaths in German Bundesländer\",\n       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.\"),\n       caption=\"Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"),\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.5)))\n\ndeathbars <- ggplot(subset(heatmap, date==maxcaseday & measure==\"deaths\"), \n                    aes(x=totalcases, y=fct_reorder(State, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed deaths\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"),\n        text=element_text(family=\"Lato\"))\n\ntiff(\"Outputs/COVIDGermanStateDeathsHeatmap.tiff\", units=\"in\", width=11, height=6, res=500)\nplot_grid(deathtiles, deathbars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n#Death rates\ndeatratetiles <- ggplot(subset(heatmap, measure==\"deaths\"), aes(x=date, y=fct_reorder(State, maxcaseday), fill=caserate_avg))+\n  geom_tile(colour=\"White\")+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily deaths\\nper 100,000\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 death rates in German Bundesländer\",\n       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.\"),\n       caption=\"Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"),\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.5)))\n\ndeathlegend <- get_legend(\n  deatratetiles + theme(legend.box.margin = margin(0, 0, 0, 12))\n)\n\ntiff(\"Outputs/COVIDGermanStateDeathRateHeatmap.tiff\", units=\"in\", width=11, height=6, res=500)\nplot <- plot_grid(deatratetiles+theme(legend.position=\"none\"), caseratebars, align=\"h\", rel_widths=c(1,0.2))\nplot_grid(plot, deathlegend, rel_widths=c(1,0.1))\ndev.off()\n\n#Try them as ridgeplots\nlibrary(ggridges)\n\ntiff(\"Outputs/COVIDGermanStateCaseRidges.tiff\", units=\"in\", width=11, height=6, res=500)\nggplot(subset(heatmap, measure==\"cases\"), aes(x=date, y=fct_reorder(State, totalcases), height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\", rel_min_height=0.01)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 cases in German Bundesländer\",\n       caption=\"Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDGermanStateDeathsRidges.tiff\", units=\"in\", width=11, height=6, res=500)\nggplot(subset(heatmap, measure==\"deaths\"), aes(x=date, y=fct_reorder(State, totalcases), height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\", rel_min_height=0.01)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Deaths per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 deaths in German Bundesländer\",\n       caption=\"Data from Jan-Philip Gehrcke (https://covid19-germany.appspot.com/) | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Heatmaps/Irish County Heatmaps.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(forcats)\nlibrary(readxl)\nlibrary(RcppRoll)\nlibrary(cowplot)\nlibrary(sf)\nlibrary(paletteer)\n\n#Read in data\ntemp <- tempfile()\n#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\"\nsource <- \"https://opendata.arcgis.com/datasets/d9be85b30d7748b5b7c09450b8aede63_0.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata <- read_csv(temp)\n\n#Strip out geographical information\ndata <- data[,c(5,3,4,11,12)]\n\ncolnames(data) <- c(\"TimeStamp\", \"county\", \"pop\", \"cumul_cases\", \"caseprop\")\n\n#Convert timestamp to date\ndata$date <- as.Date(substr(data$TimeStamp, 1, 10))\n\n#Calculate daily cases\ndata <- data %>%\n  arrange(county, date) %>%\n  group_by(county) %>%\n  mutate(cases=cumul_cases-lag(cumul_cases,1))\n\n#Add in missing data for 30th June - assume no new cases\ntemp <- data.frame(date=as.Date(\"2020-06-30\"),\n                   county=unique(data$county),\n                   cases=0)\n\ndata <- bind_rows(data, temp)\n\n#For 3 counties (Leitrim, Limerick and Sligo) the case count goes *down* in early May. Ignore these for now\ndata$cases <- ifelse(is.na(data$cases), 0, data$cases)\ndata$cases <- ifelse(data$cases<0, 0, data$cases)\ndata$cumul_cases <- ifelse(is.na(data$cumul_cases), 0, data$cumul_cases)\n\nheatmap <- data %>%\n  group_by(county) %>%\n  arrange(date) %>% \n  mutate(casesroll_avg=roll_mean(cases, 7, align=\"right\", fill=0)) %>%\n  mutate(maxcaserate=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcaserate)][1],\n         totalcases=max(cumul_cases))\n\nheatmap$maxcaseprop <- heatmap$casesroll_avg/heatmap$maxcaserate\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-21\"\nplotto <- max(heatmap$date)\n\n#Plot case trajectories\ncasetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(county, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 cases in Irish Counties\",\n       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.\"),\n       caption=\"Data from data.gov.ie | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"))\n\ncasebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=totalcases, y=fct_reorder(county, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDIrishLACasesHeatmap.tiff\", units=\"in\", width=11, height=6, res=500)\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nlibrary(ggridges)\n\ntiff(\"Outputs/COVIDIrishCountyCaseRidges.tiff\", units=\"in\", width=11, height=6, res=500)\nggplot(heatmap, aes(x=date, y=fct_reorder(county, totalcases), height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\", rel_min_height=0.007)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 cases in Irish counties\",\n       caption=\"Data from data.gov.ie | Plot by @VictimOfMaths\")\ndev.off()\n\n#Download shapefile\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/0d5984f732c54246bd087768223c92eb_0.zip?outSR=%7B%22latestWkid%22%3A2157%2C%22wkid%22%3A2157%7D\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile <- st_read(file.path(temp2, name))\n\n#Tidy up country names\nshapefile$county <- paste0(substr(shapefile$COUNTY,1,1), tolower(substr(shapefile$COUNTY,2,99)))\n\nmapdata <- heatmap %>% \n  filter(date==as.Date(plotto)) %>% \n  full_join(shapefile, by=\"county\")\n\n#Bring in NI data\nNIdata <- read.csv(\"COVID_LA_Plots/LACases.csv\")[,c(2,3,4,5,16)] %>% \n  filter(country==\"Northern Ireland\" & name!=\"Northern Ireland\") %>% \n  mutate(date=as.Date(date))\n\n#Align end dates\nplotto <- min(plotto, max(NIdata$date[!is.na(NIdata$caserate_avg)]))\n\nNIdata <- subset(NIdata, date==as.Date(plotto))\n\n#NI shapefile\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile.NI <- st_read(file.path(temp2, name))\n\nnames(shapefile.NI)[names(shapefile.NI) == \"lad19cd\"] <- \"code\"\n\nmapdata.NI <- full_join(shapefile.NI, NIdata, by=\"code\")\nmapdata.NI <- subset(mapdata.NI, !is.na(country))\n\n#Transform to common projection (Irish Transverse Mercator)\nmapdata.NI <- st_transform(mapdata.NI, 2157)\n\noutline <- mapdata.NI %>% \n  summarise()\n\ntiff(\"Outputs/COVIDIrelandRatesMap.tiff\", units=\"in\", width=8, height=8, res=500)\nggplot()+\n  geom_sf(data=mapdata, aes(geometry=geometry, fill=casesroll_avg*100000/pop), colour=NA)+\n  geom_sf(data=mapdata.NI, aes(geometry=geometry, fill=caserate_avg), colour=NA)+\n  geom_sf(data=outline, aes(geometry=geometry), fill=NA, colour=\"White\")+\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Daily cases\\nper 100,000\")+\n  theme_classic()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\", size=rel(1.5)))+\n  labs(title=\"COVID-19 cases across Ireland\",\n       subtitle=paste(\"Daily rates of confirmed new COVID-19 cases in the Republic of Ireland and Northern Ireland\\nData from\",plotto),\n       caption=\"Data from data.gov.ie and DoHNI | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Heatmaps/Misc Case Analysis.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(paletteer)\nlibrary(lubridate)\nlibrary(gt)\nlibrary(sf)\nlibrary(rmapshaper)\n\ndaydata <- read.csv(\"COVID_LA_Plots/LACases.csv\")[,-c(1)]\n\ndaydata$date <- as.Date(daydata$date)\n\n#New tiered system\n\ntiers <- daydata %>% filter(country==\"England\" & name!=\"England\")\n\ntiers$tier <- case_when(\n  tiers$name %in% c(\"Barking and Dagenham\", \"Barnet\", \"Bexley\", \"Brent\", \"Bromley\", \"Camden\",\n                      \"Croydon\", \"Ealing\", \"Enfield\", \"Greenwich\", \"Hackney and City of London\",\n                      \"Haringey\", \"Havering\", \"Hillingdon\", \"Hounslow\", \"Islington\", \n                      \"Kensington and Chelsea\", \"Kingston upon Thames\", \"Lambeth\", \"Lewisham\",\n                      \"Merton\", \"Newham\", \"Redbridge\", \"Richmond upon Thames\", \"Southwark\",\n                      \"Sutton\", \"Tower Hamlets\", \"Waltham Forest\", \"Wandsworth\", \"Westminster\",\n                      \"Barrow-in-Furness\", \"Chesterfield\", \"Erewash\", \"North East Derbyshire\",\n                      \"Basildon\", \"Braintree\", \"Brentwood\", \"Castle Point\", \"Chelmsford\", \n                      \"Colchester\", \"Epping Forest\", \"Harlow\", \"Maldon\", \"Rochford\", \"Tendring\",\n                      \"Uttlesford\", \"Elmbridge\", \"York\") ~ \"New Tier 2\",\n  tiers$name %in% c(\"Cheshire West and Chester\", \"Cheshire East\", \"Warrington\", \"Manchester\",\n                      \"Bolton\", \"Bury\", \"Stockport\", \"Tameside\", \"Trafford\", \"Wigan\", \"Salford\",\n                      \"Rochdale\", \"Oldham\", \n                      \"Leeds\", \"Bradford\", \"Kirklees\", \"Calderdale\", \"Wakefield\", \"Barnsley\", \n                      \"Rotherham\", \"Doncaster\", \"Sheffield\", \"County Durham\", \"Northumberland\", \n                      \"Newcastle upon Tyne\",\n                      \"South Tyneside\", \"North Tyneside\", \"Gateshead\", \"Sunderland\", \"Middlesbrough\",\n                      \"Redcar and Cleveland\", \"Stockton-on-Tees\", \"Darlington\", \"Hartlepool\",\n                      \"Birmingham\", \"Sandwell\", \"Solihull\", \"Wolverhampton\", \"Walsall\", \"Leicester\",\n                      \"Oadby and Wigston\", \"Ashfield\", \"Bassetlaw\", \"Broxtowe\", \"Gedling\", \n                      \"Mansfield\", \"Newark and Sherwood\", \"Nottingham\", \"Rushcliffe\") ~ \"Tier 2\",\n  tiers$name==\"High Peak\" ~ \"Partial Tier 2\",\n  tiers$name %in% c(\"Blackpool\", \"Blackburn with Darwen\", \"Burnley\", \"Chorley\", \"Fylde\", \"Hyndburn\", \n                    \"Lancaster\", \"Pendle\", \"Preston\", \"Ribble Valley\", \"Rossendale\", \"South Ribble\", \n                    \"West Lancashire\", \"Wyre\") ~ \"New Tier 3\",\n  tiers$name %in% c(\"Liverpool\", \"Knowsley\", \"Wirral\", \"St. Helens\", \"Sefton\", \"Halton\") ~ \"Tier 3\",\n  TRUE ~ \"Tier 1\"\n)\n\nggplot(tiers)+\n  geom_line(aes(x=date, y=caserate_avg, group=name, colour=tier))+\n  scale_x_date(name=\"\", limits=c(as.Date(\"2020-09-01\"), as.Date(max(tiers$date)-days(4))))+\n  theme_classic()\n\n#Sort out Buckinghamshire to match shapefile\ntemp <- subset(tiers, code==\"E06000060\")\n\ntiers$code <- if_else(tiers$code==\"E06000060\", \"E07000004\", as.character(tiers$code))\ntiers$name <- if_else(tiers$name==\"Buckinghamshire\", \"Aylesbury Vale\", as.character(tiers$name))\n\ntemp1 <- temp\ntemp1$code <- \"E07000005\"\ntemp1$name <- \"Chiltern\"\n\ntemp2 <- temp\ntemp2$code <- \"E07000006\"\ntemp2$name <- \"South Bucks\"\n\ntemp$code <- \"E07000007\"\ntemp$name <- \"Wycombe\"\n\ntiers <- bind_rows(tiers, temp, temp1, temp2)\n\n#Bring in map\ntemp <- tempfile()\ntemp2 <- tempfile()\nsource <- \"https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nunzip(zipfile=temp, exdir=temp2)\n\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\nname <- list.files(temp2, pattern=\".shp\")\nshapefile <- st_read(file.path(temp2, name))\n\nnames(shapefile)[names(shapefile) == \"lad19cd\"] <- \"code\"\n\nsimplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)\n\nmap.tiers <- full_join(simplemap, tiers, by=\"code\", all.y=TRUE)\nmap.tiers$date <- as.Date(map.tiers$date)\n\nmap.tiers$tier <- factor(map.tiers$tier, levels=c(\"Tier 1\", \"Partial Tier 2\", \"New Tier 2\",  \n                                                  \"Tier 2\", \"New Tier 3\", \"Tier 3\"))\n\n#Map of current cases and tiers\ntiff(\"Outputs/COVIDTiersMap.tiff\", units=\"in\", width=8, height=9, res=500)\nmap.tiers %>% \n  filter(date==as.Date(max(tiers$date)-days(4))) %>% \n  ggplot()+\n  geom_sf(aes(geometry=geometry, fill=caserate_avg, colour=tier))+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\nPer 100,000\")+\n  scale_colour_paletteer_d(\"LaCroixColoR::Apricot\", direction=-1, name=\"Restriction level\")+\n  theme_classic()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\"))+\n  labs(title=\"COVID restriction levels and rates of new cases in England\",\n       subtitle=\"Government COVID alert levels and rolling 7-day average of confirmed new cases in Local Authorities\\nData up to 11th October\",\n       caption=\"Data from DHSC & PHE | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDTiersBars.tiff\", units=\"in\", width=8, height=16, res=500)\nmap.tiers %>% \n  filter(date==as.Date(max(tiers$date)-days(4))) %>% \n  ggplot()+\n  geom_col(aes(x=caserate_avg, y=fct_reorder(name, caserate_avg), fill=tier))+\n  scale_fill_paletteer_d(\"LaCroixColoR::Apricot\", direction=-1, name=\"Restriction level\")+\n  scale_x_continuous(name=\"New COVID-19 cases per day per 100,000\")+\n  scale_y_discrete(name=\"\")+\n  theme_classic()+\n  theme(axis.text.y=element_text(size=rel(0.5)))\ndev.off()\n\n#Additional analysis of local lockdown restrictions\ndaydata$flag <- case_when(\n  daydata$name %in% c(\"Bolton\", \"Bury\", \"Manchester\", \"Oldham\", \"Rochdale\", \"Salford\", \n                      \"Stockport\", \"Tameside\", \"Trafford\", \"Wigan\")~ 1,\n  TRUE ~ 0)\n\ntiff(\"Outputs/COVIDManchesterLAs.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot()+\n  #geom_line(data=subset(daydata, date>as.Date(\"2020-07-01\")), \n  #           aes(x=date, y=caserate_avg, group=name), colour=\"Grey80\")+\n  geom_line(data=subset(daydata, flag==1 & date>as.Date(\"2020-07-01\")), \n            aes(x=date, y=caserate_avg, colour=name))+\n  geom_segment(aes(x=as.Date(\"2020-08-01\"), xend=as.Date(\"2020-08-01\"), y=0, yend=20), \n               colour=\"Red\", linetype=2)+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"New cases per 100,000 population per day\")+\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\n  theme_classic()+\n  labs(title=\"The case for wider relaxation of local restrictions in Manchester looks weak\",\n       subtitle=\"Rolling 7-day average rates of new confirmed COVID-19 cases\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\nup_arrow <- \"<span style=\\\"color:red\\\">&#9650;</span>\"\ndown_arrow <- \"<span style=\\\"color:green\\\">&#9660;</span>\"\n\ndaydata %>% \n  filter(date %in% c(as.Date(\"2020-08-01\"), as.Date(\"2020-09-01\")) & flag==1) %>% \n  select(name, date, casesroll_avg) %>% \n  spread(date, casesroll_avg) %>% \n  mutate(change=`2020-09-01`-`2020-08-01`, changeperc=change*100/`2020-08-01`) %>% \n  gt() %>%\n  tab_spanner(label=\"7-day average new cases\",columns=vars(`2020-08-01`, `2020-09-01`)) %>% \n  tab_spanner(label=\"Change from start of restrictions\", columns=vars(change, changeperc)) %>% \n  cols_label(name=\"\", `2020-08-01`=\"1st August\", `2020-09-01`=\"1st September\",\n             change=\"Absolute\", changeperc=\"Relative\") %>% \n  fmt_number(columns=vars(`2020-08-01`, `2020-09-01`, change), decimals=1) %>% \n  fmt_number(columns=vars(changeperc), decimals=0) %>% \n  text_transform(locations=cells_body(columns=\"change\", rows=change<0),\n                 fn = function(x) paste(x, down_arrow)) %>% \n  text_transform(locations=cells_body(columns=\"change\", rows=change>0),\n                 fn = function(x) paste(x, up_arrow)) %>% \n  text_transform(locations=cells_body(columns=\"changeperc\"),\n                 fn = function(x) paste0(x, \"%\"))\n\ndaydata$flag2 <- case_when(\n  daydata$name %in% c(\"Manchester\", \"Bury\", \"Tameside\", \"Rochdale\",\n                      \"Salford\", \"Oldham\", \"Preston\", \"Blackburn with Darwen\",\n                      \"Pendle\", \"Bradford\", \"Calderdale\", \"Kirklees\",\n                      \"Glasgow City\", \"West Dunbartonshire\",\n                      \"East Renfrewshire\", \"Leicester\",\n                      \"Bolton\", \"Trafford\") ~ \"Restrictions in place\",\n  daydata$name %in% c(\"Stockport\", \"Burnley\", \"Hyndburn\", \"Wigan\",\n                      \"Rossendale\") ~ \"Restrictions relaxed\",\n  TRUE ~ \"No Local Restrictions\")\n\ntiff(\"Outputs/COVIDRestrictions.tiff\", units=\"in\", width=10, height=10, res=500)\ndaydata %>% \n  group_by(name) %>% \n  mutate(max=max(date)) %>% \n  filter(date==max & caserate_avg>1.97 & !name %in% c(\"England\", \"Scotland\",\n                                                      \"Wales\", \"Northern Ireland\")) %>% \n  ggplot()+\n  geom_col(aes(x=caserate_avg*7, y=fct_reorder(name, caserate_avg), fill=flag2),\n           show.legend = FALSE)+\n  scale_x_continuous(name=\"New COVID-19 cases per 100,000 in the last 7 days\")+\n  scale_y_discrete(name=\"\")+\n  scale_fill_manual(values=c(\"Grey70\", \"#E41A1C\", \"#4DAF4A\"))+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"Local COVID-related restrictions are being applied inconsistently\",\n       subtitle=\"Local Authorities with restrictions <span style='color:#E41A1C;'>in place </span>or that have been <span style='color:#4DAF4A;'>relaxed in the past week\",\n       caption=\"Data from ONS, NRS, DoHNI, PHE, PHW & PHS | Plot by @VictimOfMaths\")\ndev.off()\n\ndaydata$restrictions <- case_when(\n  daydata$name==\"Leicester\" & daydata$date>=as.Date(\"2020-06-29\") ~ \"Leicester\",\n  daydata$name %in% c(\"Manchester\", \"Trafford\", \"Bury\", \"Tameside\", \"Rochdale\", \"Salford\", \"Bolton\",\n                      \"Oldham\", \"Preston\", \"Blackburn with Darwen\", \"Pendle\", \"Bradford\",\n                      \"Calderdale\", \"Kirklees\") & daydata$date>=as.Date(\"2020-07-31\") ~ \"Northern England\",\n  daydata$name %in% c(\"Wigan\", \"Rossendale\") & daydata$date>=as.Date(\"2020-07-31\") & \n    daydata$date<as.Date(\"2020-08-26\") ~ \"Wigan & Rossendale\",\n  daydata$name %in% c(\"Stockport\", \"Burnley\", \"Hyndburn\") & daydata$date>=as.Date(\"2020-07-31\") & \n    daydata$date<as.Date(\"2020-09-02\") ~ \"Stockport, Burnley & Hyndburn\",\n  daydata$name==\"Aberdeen City\" & daydata$date>=as.Date(\"2020-08-05\") & \n    daydata$date<as.Date(\"2020-08-24\") ~ \"Aberdeen\",\n  daydata$name %in% c(\"Glasgow City\", \"East Renfrewshire\", \"West Dunbartonshire\") & \n    daydata$date>=as.Date(\"2020-09-01\") ~ \"Glasgow\")\n\ndaydata$restrictions <- factor(daydata$restrictions, levels=c(\"Leicester\", \n                                                              \"Wigan & Rossendale\",\n                                                              \"Stockport, Burnley & Hyndburn\", \n                                                              \"Northern England\",\n                                                              \"Aberdeen\",\n                                                              \"Glasgow\"))\n\ntemp <- daydata %>% \n  filter(!is.na(restrictions))\n\nrestrictedareas <- unique(temp$name)\n\ntiff(\"Outputs/COVIDRestrictionsLeeds.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot()+\n  geom_line(data=daydata,\n            aes(x=date, y=caserate_avg, group=name), colour=\"grey75\")+\n  geom_line(data=subset(daydata, !is.na(restrictions)), \n            aes(x=date, y=caserate_avg, group=name), colour=\"Tomato\")+\n  geom_line(data=subset(daydata, name==\"Leeds\"),\n            aes(x=date, y=caserate_avg), colour=\"RoyalBlue\")+\n  scale_x_date(limits=c(as.Date(\"2020-06-20\"), as.Date(\"2020-09-04\")), name=\"\")+\n  scale_y_continuous(name=\"Daily confirmed new cases per 100,000\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"Leeds is under threat of new lockdown restrictions\",\n       subtitle=\"Daily rates of new confirmed COVID-19 cases in <span style='color:royalblue;'>Leeds </span>compared to <span style='color:tomato;'>areas with local restrictions</span>\",\n       caption=\"Date from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDRestrictionsLeeds2.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot()+\n  geom_line(data=daydata,\n            aes(x=date, y=caserate_avg, group=name), colour=\"grey75\")+\n  geom_line(data=subset(daydata, name==\"Leeds\"),\n            aes(x=date, y=caserate_avg), colour=\"RoyalBlue\")+\n  geom_line(data=subset(daydata, name==\"Rossendale\"),\n            aes(x=date, y=caserate_avg), colour=\"ForestGreen\")+\n  geom_line(data=subset(daydata, name==\"South Tyneside\"),\n            aes(x=date, y=caserate_avg), colour=\"Purple\")+\n  scale_x_date(limits=c(as.Date(\"2020-08-01\"), as.Date(\"2020-09-04\")), name=\"\")+\n  scale_y_continuous(name=\"Daily confirmed new cases per 100,000\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"Is Leeds the only area under threat of new restrictions?\",\n       subtitle=\"Daily rates of new confirmed COVID-19 cases in <span style='color:royalblue;'>Leeds </span>compared to <span style='color:ForestGreen;'>Rossendale</span> and <span style='color:Purple;'>South Tyneside</span>\",\n       caption=\"Date from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")\ndev.off()\n\n#National-level case figures\ntiff(\"Outputs/COVIDCaserateUK.tiff\", units=\"in\", width=8, height=6, res=500)\ndaydata %>% \n  filter(name %in% c(\"England\", \"Wales\", \"Scotland\", \"Northern Ireland\")) %>% \n  filter(date>=as.Date(\"2020-07-14\") & date<=as.Date(\"2020-09-10\")) %>% \n  ggplot()+\n  geom_line(aes(x=date, y=caserate_avg, colour=name))+\n  scale_colour_paletteer_d(\"fishualize::Scarus_quoyi\", name=\"\")+\n  scale_x_date(name=\"\", date_breaks=\"1 week\", date_labels=\"%d %b\")+\n  scale_y_continuous(name=\"Daily new confirmed COVID-19 cases per 100,000\")+\n  theme_classic()+\n  labs(title=\"The rise in new confirmed COVID-19 cases has slowed across the UK\",\n       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\",\n       caption=\"Data from PHE, PHW, PHS, DoHNI | Plot by @VictimOfMaths\")\ndev.off()  \n\n#Comparisons of local restrictions vs. everywhere else\ndaydata$flag3 <- case_when(\n  daydata$name %in% c(\"East Renfrewshire\", \"Glasgow City\", \"West Dunbartonshire\") ~ \"Greater Glasgow phase 1\",\n  daydata$name %in% c(\"East Dunbartonshire\", \"Renfrewshire\") ~ \"Greater Glasgow phase 2\",\n  daydata$name %in% c(\"North Lanarkshire\",\"South Lanarkshire\") ~ \"Lanarkshire\",\n  daydata$name==\"Caerphilly\" ~ \"Caerphilly\",\n  daydata$name==\"Rhondda Cynon Taf\" ~ \"Rhondda Cynon Taf\",\n  daydata$name==\"Leicester\" ~ \"Leicester\",\n  daydata$name %in% c(\"Manchester\", \"Trafford\", \"Bury\", \"Tameside\", \"Rochdale\", \"Salford\", \"Bolton\",\n                      \"Oldham\", \"Preston\", \"Blackburn with Darwen\", \"Pendle\", \"Bradford\",\n                      \"Calderdale\", \"Kirklees\") ~ \"Northern England\",\n  daydata$name %in% c(\"Wigan\", \"Rossendale\") ~ \"Wigan & Rossendale\",\n  daydata$name %in% c(\"Stockport\", \"Burnley\", \"Hyndburn\")  ~ \"Stockport, Burnley & Hyndburn\",\n  daydata$name %in% c()\n)\n\ndaydata$flag4 <- case_when(\n  daydata$name==\"Leicester\" ~ \"Leicester\",\n  daydata$name %in% c(\"Manchester\", \"Trafford\", \"Bury\", \"Tameside\", \"Rochdale\", \"Salford\", \"Oldham\") ~ \"Greater Manchester\",\n  daydata$name ==\"Bolton\" ~ \"Bolton\",\n  TRUE ~ as.character(daydata$country)\n)\n\ntiff(\"Outputs/COVIDLocalRestrictions1.tiff\", units=\"in\", width=10, height=7, res=500)\ndaydata %>% \n  group_by(flag4, date) %>% \n  filter(country==\"England\" & !flag4 %in% c(\"Bolton\", \"Greater Manchester\")) %>% \n  summarise(casesroll_avg=sum(casesroll_avg), pop=sum(pop)) %>% \n  mutate(caserate_avg=casesroll_avg*100000/pop) %>% \n  ggplot()+\n  geom_line(aes(x=date, y=caserate_avg, colour=flag4), show.legend = FALSE)+\n  geom_segment(aes(x=as.Date(\"2020-06-29\"), xend=as.Date(\"2020-06-29\"), y=0, yend=25),\n               colour=\"#F89088FF\", linetype=2)+\n  annotate(\"text\", x=as.Date(\"2020-07-01\"), y=23, label=\"Local restrictions introduced\", hjust=0)+\n  scale_x_date(name=\"\")+\n  scale_y_continuous(name=\"Daily new cases per 100,000\")+\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"Local Restrictions in Leicester *might* have had a short-term effect\",\n       subtitle=\"Rolling 7-day average of new COVID-19 case rates in <span style='color:#F89088FF;'>Leicester </span>compared to <span style='color:#40A0D8FF;'>the rest of England </span>(excluding Greater Manchester)\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDLocalRestrictions2.tiff\", units=\"in\", width=10, height=7, res=500)\ndaydata %>% \n  group_by(flag4, date) %>% \n  filter(country==\"England\" & flag4!=\"Leicester\") %>% \n  summarise(casesroll_avg=sum(casesroll_avg), pop=sum(pop)) %>% \n  mutate(caserate_avg=casesroll_avg*100000/pop) %>% \n  ggplot()+\n  geom_line(aes(x=date, y=caserate_avg, colour=flag4), show.legend = FALSE)+\n  geom_segment(aes(x=as.Date(\"2020-07-31\"), xend=as.Date(\"2020-07-31\"), y=0, yend=35),\n               colour=\"#017A4AFF\", linetype=2)+\n  annotate(\"text\", x=as.Date(\"2020-06-30\"), y=32, label=\"Local restrictions introduced\")+\n  scale_x_date(name=\"\")+\n  scale_y_continuous(name=\"Daily new cases per 100,000\")+\n  scale_colour_paletteer_d(\"awtools::mpalette\")+\n  theme_classic()+\n  theme(plot.subtitle=element_markdown())+\n  labs(title=\"Little evidence that local restrictions in Greater Manchester had much impact\",\n       subtitle=\"Rolling 7-day average of new COVID-19 case rates in <span style='color:#017A4AFF;'>Bolton</span> and the rest of <span style='color:#3D98D3FF;'>Greater Manchester </span><br>compared to <span style='color:#FFCE4EFF;'>the rest of England </span>(excluding Leicester)\",\n       caption=\"Data from PHE | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Heatmaps/ONSInfectionSurvey.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(scales)\r\nlibrary(ragg)\r\nlibrary(extrafont)\r\n\r\n#Read in data\r\ntemp <- tempfile()\r\n#source <- \"https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata\"\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/coronaviruscovid19infectionsurveydata/2021/covid19infectionsurveydatasets20210618england1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nrawdata <- read_excel(temp, sheet=\"1h\", range=\"A7:V48\", col_names=FALSE)\r\n\r\ndata <- rawdata %>% \r\n  select(c(1,2,5,8,11,14,17,20)) %>% \r\n  gather(age, prevalence, c(2:8)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...2\" ~ \"Age 2 - Year 6\",\r\n    age==\"...5\" ~ \"Year 7 - Year 11\",\r\n    age==\"...8\" ~ \"Year 12 - Age 24\",\r\n    age==\"...11\" ~ \"Ages 25 - 34\",\r\n    age==\"...14\" ~ \"Ages 35 - 49\",\r\n    age==\"...17\" ~ \"Ages 50 - 69\",\r\n    age==\"...20\" ~ \"Ages 70+\"\r\n         ),\r\n    date=as.Date(`...1`),\r\n    age=factor(age, levels=c(\"Age 2 - Year 6\",\"Year 7 - Year 11\",\"Year 12 - Age 24\",\r\n                             \"Ages 25 - 34\",\"Ages 35 - 49\",\"Ages 50 - 69\",\"Ages 70+\")))\r\n\r\nagg_tiff(\"Outputs/ONSInfSurveyxAge.tiff\", units=\"in\", width=11, height=4, res=500)\r\nggplot(data, aes(x=date, y=age, fill=prevalence))+\r\n         geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"\")+\r\n  scale_fill_paletteer_c(\"viridis::inferno\", name=\"Prevalence\", labels=scales::label_percent(),\r\n                         limits=c(0,NA))+\r\n  labs(title=\"The ONS infection survey shows a sharp rise in COVID prevalence in 25-34 year olds\",\r\n       subtitle=\"Age-specific COVID-19 prevalence estimates from the latest ONS Infection Survey\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)), \r\n        text=element_text(family=\"Lato\"), plot.title.position=\"plot\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/ONSInfSurveyxAgeLine.tiff\", units=\"in\", width=11, height=4, res=500)\r\nggplot(data, aes(x=date, y=prevalence, colour=age))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"\", label=label_percent(accuracy=0.1), limits=c(0,NA))+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  labs(title=\"The ONS infection survey shows a sharp rise in COVID prevalence in 25-34 year olds\",\r\n       subtitle=\"Age-specific COVID-19 prevalence estimates from the latest ONS Infection Survey\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)), \r\n        text=element_text(family=\"Lato\"), plot.title.position=\"plot\")\r\ndev.off()\r\n"
  },
  {
    "path": "Heatmaps/ScotlandCOVIDCasesxAge.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(ggtext)\r\nlibrary(ggridges)\r\nlibrary(paletteer)\r\nlibrary(ggstream)\r\nlibrary(RcppRoll)\r\nlibrary(extrafont)\r\n\r\n#Scottish age data\r\n#https://www.opendata.nhs.scot/dataset/covid-19-in-scotland\r\ntemp <- tempfile()\r\nsource <- \"https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/9393bd66-5012-4f01-9bc5-e7a10accacf4/download/trend_agesex_20210831.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata <- read.csv(temp)\r\n\r\ndata <- data %>% \r\n  filter(!AgeGroup %in% c(\"Total\", \"0 to 59\", \"60+\")) %>% \r\n  mutate(date=as.Date(as.character(Date), format=\"%Y%m%d\"))\r\n\r\n#Bring in populations\r\n#Bring in LA populations\r\ntemp2 <- tempfile()\r\nsource2 <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid2019april2020localauthoritydistrictcodes/ukmidyearestimates20192020ladcodes.xls\"\r\ntemp2 <- curl_download(url=source2, destfile=temp2, quiet=FALSE, mode=\"wb\")\r\npop.m <- as.data.frame(t(read_excel(temp2, sheet=\"MYE2 - Males\", range=\"E387:CQ387\", col_names=FALSE)))\r\npop.m$age <- c(0:90)\r\npop.m$Sex <- \"Male\"\r\npop.f <- as.data.frame(t(read_excel(temp2, sheet=\"MYE2 - Females\", range=\"E387:CQ387\", col_names=FALSE)))\r\npop.f$age <- c(0:90)\r\npop.f$Sex <- \"Female\"\r\npop <- bind_rows(pop.m, pop.f)\r\n\r\npop$age <- c(0:90)\r\npop$AgeGroup <- case_when(\r\n  pop$age<15 ~ \"0 to 14\",\r\n  pop$age<20 ~ \"15 to 19\",\r\n  pop$age<25 ~ \"20 to 24\",\r\n  pop$age<45 ~ \"25 to 44\",\r\n  pop$age<65 ~ \"45 to 64\",\r\n  pop$age<75 ~ \"65 to 74\",\r\n  pop$age<85 ~ \"75 to 84\",\r\n  TRUE ~ \"85plus\"\r\n)\r\n\r\npop1 <- pop %>% \r\n  group_by(AgeGroup, Sex) %>% \r\n  summarise(pop=sum(V1))\r\n\r\npop2 <- pop %>% \r\n  group_by(AgeGroup) %>%\r\n  summarise(pop=sum(V1)) %>% \r\n  mutate(Sex=\"Total\")\r\n\r\npop <- bind_rows(pop1, pop2)\r\n\r\ndata <- merge(data, pop, by=c(\"Sex\", \"AgeGroup\"), all.x=TRUE)\r\n\r\ndata$posrate <- data$DailyPositive*100000/data$pop\r\n\r\n#Take rolling 7-day averages\r\ndata <- data %>% \r\n  group_by(Sex, AgeGroup) %>% \r\n  arrange(date) %>% \r\n  mutate(cases_avg=roll_mean(DailyPositive, 7, align=\"right\", fill=0),\r\n         posrate_avg=roll_mean(posrate, 7, align=\"right\", fill=0))\r\n\r\ntiff(\"Outputs/COVIDCasesStreamgraphScotlandxSex.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(subset(data, Sex!=\"Total\"), aes(x=date, y=cases_avg, fill=AgeGroup))+\r\n  geom_stream(bw=0.2)+\r\n  scale_fill_paletteer_d(\"awtools::a_palette\", name=\"Age\",\r\n                         labels=c(\"Under 15\", \"15-19\", \"20-24\", \"25-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"))+\r\n  scale_y_continuous(name=\"New cases per day\", labels=abs)+\r\n  scale_x_date(name=\"\")+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Lato\"), plot.title=element_text(face=\"bold\", size=rel(1.6)))+\r\n  labs(title=\"Cases in Scotland are rising in the under 45s\",\r\n       subtitle=\"Confirmed new COVID-19 cases in Scotland by sex and age\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDCasesStreamgraphScotland.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(subset(data, Sex==\"Total\"), aes(x=date, y=cases_avg, fill=AgeGroup))+\r\n  geom_stream(bw=0.2)+\r\n  scale_fill_paletteer_d(\"awtools::a_palette\", name=\"Age\",\r\n                         labels=c(\"Under 15\", \"15-19\", \"20-24\", \"25-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"))+\r\n  scale_y_continuous(name=\"New cases per day\", labels=abs)+\r\n  scale_x_date(name=\"\")+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 cases in Scotland have risen across all age groups\",\r\n       subtitle=\"Confirmed new cases in Scotland by age\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Heatmap\r\ntiff(\"Outputs/COVIDCasesHeatmapScotland.tiff\", units=\"in\", width=10, height=3, res=500)\r\nggplot(subset(data, Sex==\"Total\" & date>=as.Date(\"2020-07-01\") & date<max(data$date)), \r\n       aes(x=date, y=AgeGroup, fill=cases_avg))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\",\r\n                   labels=c(\"Under 15\", \"15-19\", \"20-24\", \"25-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"))+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"New cases\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.2)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"There are more COVID cases in adults than children in Scotland\",\r\n       subtitle=\"Rolling 7-day average of daily confirmed new cases in Scotland by age\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nCaseratexAge <- ggplot(subset(data, Sex==\"Total\" & date>=as.Date(\"2020-07-01\") & date<max(data$date)), \r\n       aes(x=date, y=AgeGroup, fill=posrate_avg))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Age group\",\r\n                   labels=c(\"Under 15\", \"15-19\", \"20-24\", \"25-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"))+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"New cases\\nper 100,000\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 case rates are only rising in the under 45s\",\r\n       subtitle=\"Confirmed daily new COVID-19 case rates per 100,000 in Scotland by age\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\n\r\ntiff(\"Outputs/COVIDCasesHeatmapScotlandRate.tiff\", units=\"in\", width=10, height=3, res=500)\r\nCaseratexAge\r\ndev.off()\r\n\r\n#Line graph version\r\ntiff(\"Outputs/COVIDCasesLineScotlandRate.tiff\", units=\"in\", width=8, height=6, res=500)\r\nggplot(subset(data, Sex==\"Total\" & date>=as.Date(\"2021-01-01\") & date<max(data$date)), \r\n       aes(x=date, y=posrate_avg, colour=AgeGroup))+\r\n  geom_line()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Daily new cases per 100,000\")+\r\n  scale_colour_paletteer_d(\"awtools::a_palette\", name=\"Age\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.5)),\r\n        text=element_text(family=\"Lato\"))+\r\n  labs(title=\"COVID-19 case rates are highest in 15-24 year olds\",\r\n       subtitle=\"Confirmed daily new COVID-19 case rates per 100,000 in Scotland by age\",\r\n       caption=\"Data from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#By deprivation\r\ntemp <- tempfile()\r\nsource <- \"https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/a38a4c21-7c75-4ecd-a511-3f83e0e8f0c3/download/trend_simd_20210831.csv\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\ndata.simd <- read.csv(temp)\r\n\r\ndata.simd <- data.simd %>% mutate(date=as.Date(as.character(Date), format=\"%Y%m%d\"))\r\n\r\n#Take rolling 7-day averages\r\ndata.simd <- data.simd %>% \r\n  group_by(SIMDQuintile) %>% \r\n  arrange(date) %>% \r\n  mutate(cases_avg=roll_mean(DailyPositive, 7, align=\"right\", fill=0),\r\n         deaths_avg=roll_mean(DailyDeaths, 7, align=\"right\", fill=0))\r\n\r\n\r\ntiff(\"Outputs/COVIDCasesHeatmapScotlandxIMD.tiff\", units=\"in\", width=10, height=3, res=500)\r\nggplot(subset(data.simd, date>=as.Date(\"2020-07-01\") & date<max(data$date)), \r\n       aes(x=date, y=as.factor(SIMDQuintile), fill=cases_avg))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Deprivation quintile\",\r\n                   labels=c(\"1 - most deprived\", \"2\", \"3\", \"4\", \"5 - least deprived\"))+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Daily new cases\", limits=c(0,NA))+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"), plot.title.position = \"plot\",\r\n        plot.caption.position = \"plot\" , legend.position = \"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                barwidth = unit(20, 'lines'), \r\n                                barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID cases are highest in the most deprived areas in Scotland\",\r\n       subtitle=\"Rolling 7-day average of confirmed daily new cases in Scotland by quintiles of the Scottish Index of Multiple Deprivation\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nCOVIDDeathsHeatmapScotlandxIMD <- ggplot(data.simd, aes(x=date, y=as.factor(SIMDQuintile), fill=deaths_avg))+\r\n  geom_tile()+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_discrete(name=\"Deprivation quintile\",\r\n                   labels=c(\"1 - most deprived\", \"2\", \"3\", \"4\", \"5 - least deprived\"))+\r\n  scale_fill_paletteer_c(\"viridis::magma\", name=\"Deaths per day\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Lato\"), plot.title.position = \"plot\",\r\n        plot.caption.position = \"plot\" , legend.position = \"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), \r\n                               barheight = unit(.5, 'lines')))+\r\n  labs(title=\"COVID deaths in both 'waves' have come disproportionately from the most deprived areas\",\r\n       subtitle=\"Rolling 7-day average of confirmed daily deaths in Scotland by quintiles of the Scottish Index of Multiple Deprivation\",\r\n       caption=\"Date from Public Health Scotland | Plot by @VictimOfMaths\")\r\n\r\ntiff(\"Outputs/COVIDDeathsHeatmapScotlandxIMD.tiff\", units=\"in\", width=10, height=3, res=500)\r\nCOVIDDeathsHeatmapScotlandxIMD\r\ndev.off()\r\n\r\n#Save jpeg for SIPHER blog\r\nggsave(\"Outputs/JPEGs/MortIneqBlog6.jpeg\", plot=COVIDDeathsHeatmapScotlandxIMD, \r\n       units=\"in\", width=10, height=3)\r\n\r\n#Rayshader version\r\nlibrary(rayshader)\r\nlibrary(rayrender)\r\n\r\nplot_gg(CaseratexAge, width=10, height=3, multicore = TRUE, windowsize = c(1000, 600), \r\n        zoom = 0.65, phi = 35, theta = 40, sunangle = 225, soliddepth = -100) \r\n\r\n"
  },
  {
    "path": "Heatmaps/ScotlandCOVIDHouseParties.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(googlesheets4)\r\nlibrary(lubridate)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(sf)\r\n\r\ndata <- read_sheet(\"https://docs.google.com/spreadsheets/d/1Cr6aBG656gUcpWDed7uyqsX1SMTLpiTjZgrfoZFl24o/edit#gid=0\")\r\n\r\n#Tidy up division data\r\ndata <- data %>% \r\n  mutate(division=case_when(\r\n    `Division Letter`==\"A\" ~ \"North East\",\r\n    `Division Letter`==\"D\" ~ \"Tayside\",\r\n    `Division Letter`==\"N\" ~ \"Highlands and Islands\",\r\n    `Division Letter`==\"C\" ~ \"Forth Valley\",\r\n    `Division Letter`==\"E\" ~ \"Edinburgh\",\r\n    `Division Letter`==\"J\" ~ \"The Lothians & Scottish Borders\",\r\n    `Division Letter`==\"P\" ~ \"Fife\",\r\n    `Division Letter`==\"G\" ~ \"Glasgow\",\r\n    `Division Letter`==\"U\" ~ \"Ayrshire\",\r\n    `Division Letter`==\"Q\" ~ \"Lanarkshire\",\r\n    `Division Letter`==\"L\" ~ \"Argyll and West Dunbartonshire\",\r\n    `Division Letter`==\"K\" ~ \"Renfreshire and Inverclyde\",\r\n    `Division Letter`==\"V\" ~ \"Dumfries & Galloway\",\r\n    TRUE ~ NA_character_))\r\n\r\n#Faff about with dates (probably a much cleverer way to do this)\r\n#For a reason I cannot fathom, dates in the first half of the month are parsed \r\n#As character strings that look like dates, while those in the second half are\r\n#converted to the number of seconds since 01/01/1970, only with the days and weeks\r\n#transposed. BECAUSE OF REASONS.\r\ndata <- data %>% \r\n  mutate(temp=as.numeric(Date),\r\n         date=coalesce(as.Date(as.character(as.Date(\"1970-01-01\")+seconds(as.numeric(Date))),\r\n                               format=\"%Y-%d-%m\"), \r\n                       as.Date(if_else(is.na(temp), as.character(Date), NA_character_), \r\n                               format=\"%d/%m/%Y\")))\r\n\r\n#Set missing dates to have 0 incidents\r\ndata <- data %>%\r\n  complete(date, nesting(`SD Letter`, division, `Division Letter`, `Area Commands`)) %>% \r\n  mutate(incidents=if_else(is.na(`House Gatherings Attended`), 0, \r\n                           `House Gatherings Attended`),\r\n         breaches=if_else(is.na(`House Gatherings in Breach of Restrictions`), 0,\r\n                          `House Gatherings in Breach of Restrictions`),\r\n         FPNS=if_else(is.na(FPNS), 0, FPNS),\r\n         arrests=if_else(is.na(Arrests), 0, Arrests),\r\n         students=if_else(is.na(`House Gatherings involving Students`), 0,\r\n                          `House Gatherings involving Students`)) %>% \r\n  select(date, `SD Letter`, division, `Area Commands`, incidents, breaches, FPNS,\r\n         arrests, students)\r\n\r\n#Collapse to Division-level dataset\r\ndata.div <- data %>% \r\n  group_by(date, division) %>% \r\n  summarise(incidents=sum(incidents),\r\n            breaches=sum(breaches),\r\n            FPNS=sum(FPNS), arrests=sum(arrests),\r\n            students=sum(students))\r\n\r\n#Map to Council areas - download population data\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/population-estimates/mid-19/mid-year-pop-est-19-data.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\npop <- read_excel(temp, sheet=\"Table 4\", range=\"A8:C39\", col_names = FALSE)\r\ncolnames(pop) <- c(\"code\", \"council\", \"pop\")\r\n\r\n#Match areas\r\npop <- pop %>% \r\n  mutate(division=case_when(\r\n    council %in% c(\"Argyll and Bute\", \"West Dunbartonshire\") ~ \"Argyll and West Dunbartonshire\",\r\n    council %in% c(\"East Ayrshire\", \"North Ayrshire\", \"South Ayrshire\") ~ \"Ayrshire\",\r\n    council==\"Dumfries and Galloway\" ~ \"Dumfries & Galloway\",\r\n    council==\"City of Edinburgh\" ~ \"Edinburgh\",\r\n    council==\"Fife\" ~ \"Fife\",\r\n    council %in% c(\"Clackmannanshire\", \"Falkirk\", \"Stirling\") ~ \"Forth Valley\",\r\n    council %in% c(\"East Dunbartonshire\", \"East Renfrewshire\", \"Glasgow City\") ~ \"Glasgow\",\r\n    council %in% c(\"Highland\", \"Na h-Eileanan Siar\", \"Orkney Islands\", \"Shetland Islands\") ~ \"Highlands and Islands\",\r\n    council %in% c(\"North Lanarkshire\", \"South Lanarkshire\") ~ \"Lanarkshire\",\r\n    council %in% c(\"Aberdeen City\", \"Aberdeenshire\", \"Moray\") ~ \"North East\",\r\n    council %in% c(\"Inverclyde\", \"Renfrewshire\") ~ \"Renfreshire and Inverclyde\",\r\n    council %in% c(\"Dundee City\", \"Angus\", \"Perth and Kinross\") ~ \"Tayside\",\r\n    council %in% c(\"East Lothian\", \"Midlothian\", \"West Lothian\", \"Scottish Borders\") ~ \"The Lothians & Scottish Borders\"\r\n    ))\r\n\r\ndiv.pop <- pop %>% \r\n  group_by(division) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\ndata.div <- merge(data.div, div.pop) %>% \r\n  mutate(non_students=incidents-students) %>% \r\n  gather(measure, incidents, c(3:7, 9)) %>% \r\n  mutate(incident_rate=incidents*100000/pop)\r\n\r\ntiff(\"Outputs/HousePartyStudent.tiff\", units=\"in\", width=8, height=6, res=500)\r\ndata.div %>% \r\n  group_by(date, measure) %>% \r\n  summarise(incidents=sum(incidents)) %>% \r\n  filter(measure %in% c(\"students\", \"non_students\")) %>% \r\n  ggplot()+\r\n  geom_area(aes(x=date, y=incidents, fill=measure), show.legend=FALSE)+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"House gatherings attended\")+\r\n  scale_fill_paletteer_d(\"NineteenEightyR::electronic_night\", direction=-1)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\"), plot.subtitle=element_markdown())+\r\n  labs(title=\"Students haven't been driving police callouts to illegal parties in Scotland\",\r\n       subtitle=\"Police callouts to reported illegal house gatherings involving <span style='color:#362F78FF;'>students</span> and <span style='color:#57B4AEFF;'>non-students\",\r\n       caption=\"Data from BBC FoI request to Police Scotland | Plot by @VictimofMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/HousePartyCouncil.tiff\", units=\"in\", width=10, height=7, res=500)\r\ndata.div %>% \r\n  filter(measure==\"breaches\") %>% \r\n  ggplot()+\r\n  geom_line(aes(x=date, y=incident_rate), colour=\"tomato\")+\r\n  scale_x_date(name=\"\")+\r\n  scale_y_continuous(name=\"Breaches per 100,000 population\")+\r\n  geom_vline(xintercept=as.Date(\"2020-09-23\"), linetype=2)+\r\n  facet_wrap(~division)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(0.8)),\r\n        plot.title=element_text(face=\"bold\"))+\r\n  labs(title=\"Illegal house parties have continued since the new restrictions\",\r\n       subtitle=\"Police recorded breaches of household gathering legislation in Scotland\",\r\n       caption=\"Data from BBC FoI request to Police Scotland | Plot by @VictimofMaths\")\r\ndev.off()\r\n\r\ndata.sum <- data.div %>% \r\n  group_by(measure, division) %>% \r\n  summarise(incident_rate=sum(incident_rate))\r\n\r\n#Download shapefile\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/910f48f3c4b3400aa9eb0af9f8989bbe_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\r\nname <- list.files(temp2, pattern=\".shp\")\r\nshapefile <- st_read(file.path(temp2, name))\r\n\r\nnames(shapefile)[names(shapefile) == \"LAD20CD\"] <- \"code\"\r\n\r\nmap.data <- pop %>% \r\n  merge(data.sum, by=\"division\") \r\n  \r\nmap.data <- full_join(map.data, shapefile, by=\"code\")\r\n\r\ntiff(\"Outputs/HousePartyMap.tiff\", units=\"in\", width=7, height=7, res=500)\r\nmap.data %>% \r\n  filter(measure==\"breaches\") %>% \r\nggplot()+\r\n  geom_sf(aes(geometry=geometry, fill=incident_rate), colour=NA)+\r\n  theme_classic()+\r\n  scale_fill_paletteer_c(\"viridis::viridis\", name=\"Breaches per 100,000\")+\r\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n        axis.title=element_blank(), plot.title=element_text(face=\"bold\"))+\r\n  labs(title=\"Glasgow has been Scotland's illegal house party capital\",\r\n       subtitle=\"Rates of household gatherings found to breach restrictions\",\r\n       caption=\"Data from BBC FoI request to Police Scotland | Plot by @VictimofMaths\")\r\ndev.off()\r\n\r\n"
  },
  {
    "path": "Heatmaps/Scottish HB Heatmaps.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(forcats)\nlibrary(readxl)\nlibrary(RcppRoll)\nlibrary(cowplot)\nlibrary(ggtext)\nlibrary(extrafont)\nlibrary(ggridges)\n\n#Read in data\ntemp <- tempfile()\nsource <- \"https://www.opendata.nhs.scot/dataset/b318bddf-a4dc-4262-971f-0ba329e09b87/resource/2dd8534b-0a6f-4744-9253-9565d62f96c2/download/trend_hb_20211006.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\ndata <- read.csv(temp) %>% \n  mutate(date=as.Date(as.character(Date), format=\"%Y%m%d\")) %>% \n  group_by(HB, HBName) %>% \n  arrange(date) %>% \n  mutate(casesroll_avg=roll_mean(DailyPositive, 7, align=\"right\", fill=NA),\n         maxcaserate=max(casesroll_avg, na.rm=TRUE), \n         maxcaseday=Date[which(casesroll_avg==maxcaserate)][1],\n         totalcases=max(CumulativePositive, na.rm=TRUE),\n         maxcaseprop=casesroll_avg/maxcaserate) %>% \n  ungroup() %>% \n  mutate(HBName=gsub(\"NHS \", \"\", HBName))\n\nheatmap <- data %>% filter(HBName!=\"Scotland\")\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-04\"\nplotto <- max(heatmap$date)\n\n#Plot case trajectories\ncasetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(HBName, maxcaseday), \n                              fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  geom_segment(aes(x=as.Date(\"2020-06-15\"), xend=as.Date(\"2020-06-15\"), y=0.5, yend=14.5),\n               colour=\"grey20\")+\n  annotate(\"text\", x=as.Date(\"2020-06-15\"), y=14.6, label=\"*\", size=5)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  coord_cartesian(clip = 'off')+\n  labs(title=\"Timelines for COVID-19 cases in Scottish Health Boards\",\n       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.\"),\n       caption=\"Data from Scottish Government | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), \n        plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), \n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\n        text=element_text(family=\"Lato\"))\n\ncasebars <- ggplot(subset(heatmap, Date==maxcaseday), \n                   aes(x=totalcases, y=fct_reorder(HB, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\")+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), \n        axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"),\n        text=element_text(family=\"Lato\"))\n\ntiff(\"Outputs/COVIDScottishLACasesHeatmap.tiff\", units=\"in\", width=12, height=5, res=500)\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\n\ntiff(\"Outputs/COVIDScottishHBCaseRidges.tiff\", units=\"in\", width=9, height=6, res=500)\nggplot(heatmap, aes(x=date, y=fct_reorder(HBName, totalcases), \n                 height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\", rel_min_height=0.001)+\n  theme_classic()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.6)),\n        text=element_text(family=\"Lato\"), plot.caption.position=\"plot\", \n        plot.title.position=\"plot\", legend.position=\"top\")+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 cases in Scottish Health Boards\",\n       caption=\"Data from Scottish Government | Plot by @VictimOfMaths\")+\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\n                                barwidth = unit(20, 'lines'), \n                               barheight = unit(.5, 'lines')))\ndev.off()\n\nggplot(heatmap)+\n  geom_col(aes(x=date , y=DailyPositive, fill=DailyPositive))+\n  facet_wrap(~HBName)+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  theme_classic()\n\n#Download ICU data from https://www.gov.scot/publications/coronavirus-covid-19-trends-in-daily-data/\ntemp <- tempfile()\nsource <- \"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\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\n#Historic ICU data (using a slightly different definition)\nICUdata.hist <- read_excel(temp, sheet=6, range=\"A12:Q180\", col_names=FALSE)\ncolnames(ICUdata.hist) <- c(\"Date\", \"Ayrshire & Arran\", \"Borders\", \"Dumfries & Galloway\",\n                            \"Fife\", \"Forth Valley\", \"Grampian\", \"Greater Glasgow & Clyde\",\n                            \"Highland\", \"Lanarkshire\", \"Lothian\", \"Orkney\", \"Shetland\",\n                            \"Tayside\", \"Western Isles\", \"Golden Jubilee National Hospital\",\n                            \"Scotland\")\nICUdata.hist_long <- gather(ICUdata.hist, HB, cases, c(2:17))\nICUdata.hist_long$cases <- as.numeric(ifelse(ICUdata.hist_long$cases==\"*\", NA, ICUdata.hist_long$cases))\nICUdata.hist_long$Date <- as.Date(ICUdata.hist_long$Date)\n\n#Recent ICU data\n#Need to manually increment the numbers at the end of this range: 24 = 1st October\nICUdata <- read_excel(temp, sheet=4, range=\"A3:Q378\")\n\nICUdata_long <- gather(ICUdata, HB, cases, c(2:17))\nICUdata_long$cases <- as.numeric(ifelse(ICUdata_long$cases==\"*\", NA, ICUdata_long$cases))\nICUdata_long$Date <- as.Date(ICUdata_long$`Reporting date`)\nICUdata_long$HB <- if_else(substr(ICUdata_long$HB, 1,3)==\"NHS\", substr(ICUdata_long$HB, 5, 100),\n                           ICUdata_long$HB)\nICUdata_long$HB <- if_else(ICUdata_long$HB==\"Scotland total\", \"Scotland\", ICUdata_long$HB)\n\n#need to use a custom max function as some HBs are all 0s\nmy.max <- function(x) ifelse( !all(is.na(x)), max(x, na.rm=T), NA)\n\nICUheatmap <- ICUdata_long %>%\n  bind_rows(., ICUdata.hist_long) %>% \n  arrange(HB, Date) %>%\n  group_by(HB) %>%\n  mutate(maxcases=my.max(cases), maxcaseday=Date[which(cases==maxcases)][1],\n         totalcases=sum(cases))\n\n#Enter dates to plot from and to\nICUplotfrom <- \"2020-03-26\"\nICUplotto <- max(ICUheatmap$Date)\n\n#Plot case trajectories\nICUcasetiles <- ggplot(subset(ICUheatmap, HB!=\"Scotland\" & !is.na(maxcases)), \n                       aes(x=Date, y=fct_reorder(HB, maxcaseday), fill=cases))+\n  geom_tile(colour=\"White\")+\n  geom_vline(aes(xintercept=as.Date(\"2020-09-10\")))+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", na.value=\"White\", name=\"Total patients\",\n                       limits=c(0,NA))+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(ICUplotfrom, ICUplotto)), expand=c(0,0))+\n  labs(title=\"We haven't (yet) seen a rise in COVID patients in Scottish Intensive Care Units this wave\",\n       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.\"),\n       caption=\"Data from Scottish Government | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), \n        plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), \n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\n        text=element_text(family=\"Lato\"), plot.caption.position=\"plot\")\n\n\ntiff(\"Outputs/COVIDScottishHBICUHeatmap.tiff\", units=\"in\", width=12, height=5, res=500)\nICUcasetiles\ndev.off()\n\n#Repeat for all hospital patients\nHospdata.hist <- read_excel(temp, sheet=7, range=\"A3:Q172\")\nHospdata.hist_long <- gather(Hospdata.hist, HB, cases, c(2:17))\nHospdata.hist_long$cases <- as.numeric(ifelse(Hospdata.hist_long$cases==\"*\", NA, Hospdata.hist_long$cases))\nHospdata.hist_long$Date <- as.Date(Hospdata.hist_long$Date)\nHospdata.hist_long$HB <- if_else(substr(Hospdata.hist_long$HB, 1,3)==\"NHS\", substr(Hospdata.hist_long$HB, 5, 100),\n                                 Hospdata.hist_long$HB)\n\n#Recent ICU data\n#Need to manually increment the numbers at the end of this range: 24 = 1st October\nHospdata <- read_excel(temp, sheet=5, range=\"A3:Q375\")\n\nHospdata_long <- gather(Hospdata, HB, cases, c(2:17))\nHospdata_long$cases <- as.numeric(ifelse(Hospdata_long$cases==\"*\", NA, Hospdata_long$cases))\nHospdata_long$Date <- as.Date(Hospdata_long$`Reporting date`)\nHospdata_long$HB <- if_else(substr(Hospdata_long$HB, 1,3)==\"NHS\", substr(Hospdata_long$HB, 5, 100),\n                            Hospdata_long$HB)\n\n\nHospheatmap <- Hospdata_long %>%\n  bind_rows(., Hospdata.hist_long) %>% \n  arrange(HB, Date) %>%\n  group_by(HB) %>%\n  mutate(maxcases=my.max(cases), maxcaseday=Date[which(cases==maxcases)][1],\n         totalcases=sum(cases))\n\n#Enter dates to plot from and to\nHospplotfrom <- \"2020-03-26\"\nHospplotto <- max(Hospheatmap$Date)\n\n#Plot case trajectories\nHospcasetiles <- ggplot(subset(Hospheatmap, HB!=\"Scotland\" & !is.na(maxcases)), \n                       aes(x=Date, y=fct_reorder(HB, maxcaseday), fill=cases))+\n  geom_tile(colour=\"White\")+\n  geom_vline(aes(xintercept=as.Date(\"2020-09-10\")))+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", na.value=\"White\", name=\"Total patients\",\n                       limits=c(0,NA))+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(ICUplotfrom, ICUplotto)), expand=c(0,0))+\n  labs(title=\"The number of COVID-19 patients in Scottish hospitals is still low\",\n       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.\"),\n       caption=\"Data from Scottish Government | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), \n        plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"), \n        plot.title=element_text(face=\"bold\", size=rel(1.6)),\n        text=element_text(family=\"Lato\"), plot.caption.position=\"plot\")\n\n\ntiff(\"Outputs/COVIDScottishHBHospHeatmap.tiff\", units=\"in\", width=12, height=5, res=500)\nHospcasetiles\ndev.off()\n\n#Plot cases, admissions and ICU occupancy for the whole country\nnatdata <- data %>% \n  filter(HBName==\"Scotland\") %>% \n  merge(., subset(Hospheatmap, HB==\"Scotland\"), by.x=\"date\", by.y=\"Date\") %>% \n  merge(., subset(ICUheatmap, HB==\"Scotland\"), by.x=\"date\", by.y=\"Date\") %>% \n  select(date, DailyPositive, cases.x, cases.y) \n\ncolnames(natdata) <- c(\"Date\", \"New cases\", \"Hospital patients\", \"ICU patients\")\n\n#Remove case data from 15th June as that's when the Pillar 2 data is added\nnatdata$`New cases` <- if_else(natdata$date==as.Date(\"2020-06-15\"), 0, natdata$`New cases`)\n\n#Calculate rolling averages\nnatdata <- natdata %>% \n  mutate(casesroll=roll_mean(`New cases`, 7, align=\"center\", fill=NA),\n         hosproll=roll_mean(`Hospital patients`, 7, align=\"center\", fill=NA),\n         ICUroll=roll_mean(`ICU patients`, 7, align=\"center\", fill=NA))\n\nlimit <- abs(max(c(natdata$`New cases`, natdata$`Hospital patients`, natdata$`ICU patients`)))\n\ntiff(\"Outputs/COVIDScottishHospBars.tiff\", units=\"in\", width=9, height=6, res=500)\nggplot(subset(natdata,Date>=as.Date(\"2020-09-11\")))+\n  geom_col(aes(x=Date, y=`New cases`), fill=\"#47d4ae\")+\n  geom_col(aes(x=Date, y=-`Hospital patients`), fill=\"#ff9f55\")+\n  geom_col(aes(x=Date, y=-`ICU patients`), fill=\"#ff1437\")+\n  geom_line(aes(x=Date, y=casesroll), colour=\"#09614a\")+\n  geom_hline(yintercept=0)+\n  scale_x_date(name=\"\")+\n  scale_y_continuous(name=\"\", limits=c(-limit, limit), labels=abs,\n                     position = \"right\")+\n  theme_classic()+\n  annotate(geom=\"text\", x=as.Date(\"2020-09-12\"), y=2800, \n           label=\"New cases in the population\", hjust=0, family=\"Lato\")+\n  annotate(geom=\"text\", x=as.Date(\"2020-09-12\"), y=-2600, \n           label=\"Total patients in hospital\", hjust=0, family=\"Lato\")+\n  #annotate(geom=\"text\", x=as.Date(\"2020-10-06\"), y=-70, label=\"Patients in ICU\", colour=\"#a80b20\")+  \n  labs(title=\"Scottish COVID hospital numbers appear to have peaked\",\n       subtitle=\"Daily confirmed <span style='color:#47d4ae;'>new COVID-19 cases</span> and patients with recently confirmed COVID-19<br>in <span style='color:#ff9f55;'>Scottish hospitals </span>and <span style='color:#ff1437;'>Intensive Care Units\",\n       caption=\"Data from Scottish Government | Plot by @VictimOfMaths\")+\n  theme(plot.subtitle=element_markdown(), \n        plot.title=element_text(face=\"bold\", size=rel(1.5)),\n        plot.caption.position = \"plot\",\n        text=element_text(family=\"Lato\"))\n\ndev.off()\n\ntiff(\"Outputs/COVIDScottishICUBars.tiff\", units=\"in\", width=10, height=8, res=500)\nggplot(natdata)+\n  geom_col(aes(x=Date, y=`ICU patients`, fill=`ICU patients`), show.legend = FALSE)+\n  geom_vline(xintercept=as.Date(\"2020-09-10\"))+\n  scale_x_date(name=\"\")+\n  scale_y_continuous(name=\"Total patients in ICU\")+\n  scale_fill_distiller(palette=\"Spectral\")+\n  theme_classic()+\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\n        plot.title.position = \"plot\",\n        text=element_text(family=\"Lato\"))+\n  labs(title=\"The number of COVID-19 patients in Intensive Care in Scotland is rising\",\n       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.\"),\n       caption=\"Data from Scottish Government | Plot by @VictimOfMaths\")\n\ndev.off()\n  \n"
  },
  {
    "path": "Heatmaps/UK Hex Animations.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(geojsonio)\nlibrary(broom)\nlibrary(zoo)\nlibrary(gganimate)\n\n#Get English UTLA-level case trajectories\n#Prepared by COVID_LA_Plots/Underlying_Code.R\ndata <- read.csv(\"COVID_LA_Plots/LACases.csv\")[,-c(1)]\n\n#Sort out Buckinghamshire\ntemp <- subset(data, code==\"E06000060\")\n\ndata$code <- if_else(data$code==\"E06000060\", \"E07000004\", as.character(data$code))\ndata$name <- if_else(data$name==\"Buckinghamshire\", \"Aylesbury Vale\", as.character(data$name))\n\ntemp1 <- temp\ntemp1$code <- \"E07000005\"\ntemp1$name <- \"Chiltern\"\n\ntemp2 <- temp\ntemp2$code <- \"E07000006\"\ntemp2$name <- \"South Bucks\"\n\ntemp$code <- \"E07000007\"\ntemp$name <- \"Wycombe\"\n\ndata <- bind_rows(data, temp, temp1, temp2)\n\n#Bring in hexmap\n#Read in hex boundaries (adapted from from https://olihawkins.com/2018/02/1 and ODI Leeds)\nhex <- geojson_read(\"Data/UKLA.geojson\", what=\"sp\")\n\n# Fortify into a data frame format to be shown with ggplot2\nhexes <- tidy(hex, region=\"id\")\n\nhexes$id <- if_else(hexes$id==\"E09000001\", \"E09000012\", hexes$id)\n\ndata <- left_join(hexes, data, by=c(\"id\"=\"code\"), all.y=TRUE)\ndata$date <- as.Date(data$date)\n\n#Remove Isles of Scilly which are too small to have their own data\ndata <- subset(data, id!=\"E06000053\")\n\n#extract latest date with full UK data\ndata <- data %>%\n  group_by(country) %>%\n  mutate(min=min(date), max=max(date))\n\ncompletefrom <- max(data$min, na.rm=TRUE)\ncompleteto <- min(data$max, na.rm=TRUE)\n\nHexAnimUK <- ggplot()+\n  geom_polygon(data=subset(data, date>as.Date(\"2020-03-06\") & date<=completeto & country!=\"Republic of Ireland\"), \n               aes(x=long, y=lat, group=id, fill=casesroll_avg))+\n  coord_fixed()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily confirmed\\ncases (7-day\\nrolling avg.)\", na.value=\"white\")+\n  theme_classic()+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  transition_time(date)+\n  labs(title=\"Visualising the spread of COVID-19 across the UK\",\n       subtitle=\"Rolling 7-day average number of new confirmed cases.\\nDate: {frame_time}\",\n       caption=\"Data from PHE, PHW, PHS & DoHNI\\nVisualisation by @VictimOfMaths\")\n\nanimate(HexAnimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/HexAnimUK.gif\"), \n        end_pause=60)\n"
  },
  {
    "path": "Heatmaps/UKIRELA.geojson",
    "content": "{\"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]]]}}]}"
  },
  {
    "path": "Heatmaps/UKLA.geojson",
    "content": "{\"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]]]}}]}"
  },
  {
    "path": "Heatmaps/Welsh LA Heatmaps.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(forcats)\nlibrary(readxl)\nlibrary(RcppRoll)\nlibrary(cowplot)\n\n#Read in data\ntemp <- tempfile()\nsource <- \"http://www2.nphs.wales.nhs.uk:8080/CommunitySurveillanceDocs.nsf/3dc04669c9e1eaa880257062003b246b/77fdb9a33544aee88025855100300cab/$FILE/Rapid%20COVID-19%20surveillance%20data.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata <- read_excel(temp, sheet=3)\n\ncolnames(data) <- c(\"LA\", \"date\", \"cases\", \"totalcases\", \"totalcaserate\", \"tests\", \"totaltests\")\ndata$date <- as.Date(data$date)\n\nheatmap <- data %>%\n  group_by(LA) %>%\n  mutate(casesroll_avg=roll_mean(cases, 7, align=\"left\", fill=0)) %>%\n  mutate(maxcaserate=max(casesroll_avg), maxcaseday=date[which(casesroll_avg==maxcaserate)][1])\n\nheatmap$maxcaseprop <- heatmap$casesroll_avg/heatmap$maxcaserate\n\n#Enter dates to plot from and to\nplotfrom <- \"2020-03-01\"\nplotto <- max(heatmap$date)\n\n#Plot case trajectories\ncasetiles <- ggplot(heatmap, aes(x=date, y=fct_reorder(LA, maxcaseday), fill=maxcaseprop))+\n  geom_tile(colour=\"White\", show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_y_discrete(name=\"\", expand=c(0,0))+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  labs(title=\"Timelines for COVID-19 cases in Welsh Local Authorities\",\n       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.\"),\n       caption=\"Data from Public Health Wales | Plot by @VictimOfMaths\")+\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\n        axis.text.y=element_text(colour=\"Black\"))\n\ncasebars <- ggplot(subset(heatmap, date==maxcaseday), aes(x=totalcases, y=fct_reorder(LA, maxcaseday), fill=totalcases))+\n  geom_col(show.legend=FALSE)+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\")+\n  scale_x_continuous(name=\"Total confirmed cases\", breaks=c(0,500,1000))+\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\n\ntiff(\"Outputs/COVIDWelshLACasesHeatmap.tiff\", units=\"in\", width=10, height=6, res=500)\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\ndev.off()\n\nlibrary(ggridges)\n\ntiff(\"Outputs/COVIDWelshLACaseRidges.tiff\", units=\"in\", width=10, height=6, res=500)\nggplot(heatmap, aes(x=date, y=fct_reorder(LA, totalcases), height=casesroll_avg, fill=casesroll_avg))+\n  geom_density_ridges_gradient(stat=\"identity\")+\n  theme_classic()+\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\n  scale_y_discrete(name=\"\")+\n  labs(title=\"Timelines of confirmed COVID-19 cases in Welsh Local Authorities\",\n       caption=\"Data from Public Health Wales | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Heatmaps/WelshLAHeatmap.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(forcats)\r\nlibrary(cowplot)\r\nlibrary(ggridges)\r\nlibrary(geojsonio)\r\nlibrary(broom)\r\nlibrary(sf)\r\nlibrary(curl)\r\nlibrary(rmapshaper)\r\nlibrary(gganimate)\r\n\r\n#Read in data created by COVID_LA_Plots/UnderlyingCode.R, which lives here:\r\n#https://github.com/VictimOfMaths/COVID_LA_Plots/blob/master/UnderlyingCode.R\r\n\r\ndata <- read.csv(\"COVID_LA_Plots/LACases.csv\")[,-c(1,7,8,9)]\r\n\r\n#########\r\n#ENGLAND#\r\n#########\r\ndata.e <- data %>% \r\n  group_by(name) %>% \r\n  filter(country==\"England\" & name!=\"England\") %>% \r\n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\r\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\r\n         maxcaseprop=caserate_avg/maxcaserate,\r\n         totalcases=sum(cases))\r\n\r\n#Enter dates to plot from and to\r\nplotfrom <- \"2020-03-01\"\r\nplotto <- max(data.e$date)\r\n\r\n#Plot case trajectories\r\ncasetiles <- ggplot(data.e, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\r\n  labs(title=\"Timelines for COVID-19 cases in English Local Authorities\",\r\n       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.\"),\r\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"Black\"))\r\n\r\ncasebars <- ggplot(subset(data.e, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Total confirmed cases\")+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\r\n\r\ntiff(\"Outputs/COVIDLTLACasesHeatmap.tiff\", units=\"in\", width=16, height=30, res=500)\r\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\n\r\n#######\r\n#WALES#\r\n#######\r\ndata.w <- data %>% \r\n  group_by(name) %>% \r\n  filter(country==\"Wales\" & name!=\"Wales\") %>% \r\n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\r\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\r\n         maxcaseprop=caserate_avg/maxcaserate,\r\n         totalcases=sum(cases))\r\n\r\n#Enter dates to plot from and to\r\nplotfrom <- \"2020-03-01\"\r\nplotto <- max(data.w$date)\r\n\r\n#Plot case trajectories\r\ncasetiles <- ggplot(data.w, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\r\n  labs(title=\"Timelines for COVID-19 cases in Welsh Local Authorities\",\r\n       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.\"),\r\n       caption=\"Data from Public Health Wales | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"Black\"))\r\n\r\ncasebars <- ggplot(subset(data.w, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Total confirmed cases\", breaks=c(0,1000,2000))+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\r\n\r\ntiff(\"Outputs/COVIDWelshLACasesHeatmap.tiff\", units=\"in\", width=12, height=6, res=500)\r\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDWelshLACaseRidges.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(data.w, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+\r\n  geom_density_ridges_gradient(stat=\"identity\")+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\r\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\r\n  scale_y_discrete(name=\"\")+\r\n  labs(title=\"Timelines of confirmed COVID-19 cases in Welsh Local Authorities\",\r\n       caption=\"Data from Public Health Wales | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n##########\r\n#Scotland#\r\n##########\r\ndata.s <- data %>% \r\n  group_by(name) %>% \r\n  filter(country==\"Scotland\" & name!=\"Scotland\") %>% \r\n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\r\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\r\n         maxcaseprop=caserate_avg/maxcaserate,\r\n         totalcases=sum(cases))\r\n\r\n#Enter dates to plot from and to\r\nplotfrom <- \"2020-03-01\"\r\nplotto <- max(data.s$date)\r\n\r\n#Plot case trajectories\r\ncasetiles <- ggplot(data.s, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\r\n  labs(title=\"Timelines for COVID-19 cases in Scottish Coucils\",\r\n       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.\"),\r\n       caption=\"Data from Public Health Scotland | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"Black\"))\r\n\r\ncasebars <- ggplot(subset(data.s, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Total confirmed cases\", breaks=c(0,1000,2000,3000))+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\r\n\r\ntiff(\"Outputs/COVIDScottishCouncilCasesHeatmap.tiff\", units=\"in\", width=12, height=6, res=500)\r\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDScottishCouncilCaseRidges.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(data.s, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+\r\n  geom_density_ridges_gradient(stat=\"identity\")+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\r\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\r\n  scale_y_discrete(name=\"\")+\r\n  labs(title=\"Timelines of confirmed COVID-19 cases in Scottish Council areas\",\r\n       caption=\"Data from Public Health Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n##########\r\n#Northern Ireland#\r\n##########\r\ndata.ni <- data %>% \r\n  group_by(name) %>% \r\n  filter(country==\"Northern Ireland\" & name!=\"Northern Ireland\") %>% \r\n  mutate(date=as.Date(date), maxcaserate=max(caserate_avg),\r\n         maxcaseday=date[which(caserate_avg==maxcaserate)][1],\r\n         maxcaseprop=caserate_avg/maxcaserate,\r\n         totalcases=sum(cases))\r\n\r\n#Enter dates to plot from and to\r\nplotfrom <- \"2020-03-01\"\r\nplotto <- max(data.ni$date)\r\n\r\n#Plot case trajectories\r\ncasetiles <- ggplot(data.ni, aes(x=date, y=fct_reorder(name, maxcaseday), fill=maxcaseprop))+\r\n  geom_tile(colour=\"White\", show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_y_discrete(name=\"\", expand=c(0,0))+\r\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\r\n  labs(title=\"Timelines for COVID-19 cases in Northern Irish Local Authoritiess\",\r\n       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.\"),\r\n       caption=\"Data from Department of Health NI | Plot by @VictimOfMaths\")+\r\n  theme(axis.line.y=element_blank(), plot.subtitle=element_text(size=rel(0.78)), plot.title.position=\"plot\",\r\n        axis.text.y=element_text(colour=\"Black\"))\r\n\r\ncasebars <- ggplot(subset(data.ni, date==maxcaseday), aes(x=totalcases, y=fct_reorder(name, maxcaseday), fill=totalcases))+\r\n  geom_col(show.legend=FALSE)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\")+\r\n  scale_x_continuous(name=\"Total confirmed cases\", breaks=c(0,1000,2000))+\r\n  theme(axis.title.y=element_blank(), axis.line.y=element_blank(), axis.text.y=element_blank(),\r\n        axis.ticks.y=element_blank(), axis.text.x=element_text(colour=\"Black\"))\r\n\r\ntiff(\"Outputs/COVIDNILACasesHeatmap.tiff\", units=\"in\", width=12, height=6, res=500)\r\nplot_grid(casetiles, casebars, align=\"h\", rel_widths=c(1,0.2))\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDNILACaseRidges.tiff\", units=\"in\", width=10, height=6, res=500)\r\nggplot(data.ni, aes(x=date, y=fct_reorder(name, totalcases), height=casesroll_avg, fill=casesroll_avg))+\r\n  geom_density_ridges_gradient(stat=\"identity\")+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Cases per day\\n7-day rolling avg.\")+\r\n  scale_x_date(name=\"Date\", limits=as.Date(c(plotfrom, plotto)), expand=c(0,0))+\r\n  scale_y_discrete(name=\"\")+\r\n  labs(title=\"Timelines of confirmed COVID-19 cases in Northern Irish Local Authorities\",\r\n       caption=\"Data from Department of Health NI | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n############\r\n#Animations#\r\n############\r\n\r\n#Hex map\r\ndata.hex <- data\r\n\r\n#Sort out Buckinghamshire to match hex template\r\ntemp <- subset(data, code==\"E06000060\")\r\n\r\ndata.hex$code <- if_else(data$code==\"E06000060\", \"E07000004\", as.character(data$code))\r\ndata.hex$name <- if_else(data$name==\"Buckinghamshire\", \"Aylesbury Vale\", as.character(data$name))\r\n\r\ntemp1 <- temp\r\ntemp1$code <- \"E07000005\"\r\ntemp1$name <- \"Chiltern\"\r\n\r\ntemp2 <- temp\r\ntemp2$code <- \"E07000006\"\r\ntemp2$name <- \"South Bucks\"\r\n\r\ntemp$code <- \"E07000007\"\r\ntemp$name <- \"Wycombe\"\r\n\r\ndata.hex <- bind_rows(data.hex, temp, temp1, temp2)\r\n\r\n#Bring in hexmap\r\n#Read in hex boundaries (adapted from from https://olihawkins.com/2018/02/1 and ODI Leeds)\r\nhex <- geojson_read(\"Data/UKLA.geojson\", what=\"sp\")\r\n\r\n# Fortify into a data frame format to be shown with ggplot2\r\nhexes <- tidy(hex, region=\"id\")\r\n\r\nhexes$id <- if_else(hexes$id==\"E09000001\", \"E09000012\", hexes$id)\r\n\r\ndata.hex <- left_join(hexes, data.hex, by=c(\"id\"=\"code\"), all.y=TRUE)\r\ndata.hex$date <- as.Date(data.hex$date)\r\n\r\n#Remove Isles of Scilly which are too small to have their own data\r\ndata.hex <- subset(data.hex, id!=\"E06000053\")\r\n\r\n#extract latest date with full UK data\r\ndata.hex <- data.hex %>%\r\n  group_by(country) %>%\r\n  filter(country!=\"Republic of Ireland\") %>% \r\n  mutate(min=min(date), max=max(date))\r\n\r\ncompletefrom <- max(data.hex$min, na.rm=TRUE)\r\ncompleteto <- min(data.hex$max, na.rm=TRUE)\r\n\r\nHexAnimUK <- ggplot()+\r\n  geom_polygon(data=subset(data.hex, date>as.Date(\"2020-03-06\") & date<=completeto), \r\n               aes(x=long, y=lat, group=id, fill=casesroll_avg))+\r\n  coord_fixed()+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily confirmed\\ncases (7-day\\nrolling avg.)\", na.value=\"white\")+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\r\n  transition_time(date)+\r\n  labs(title=\"Visualising the spread of COVID-19 across the UK\",\r\n       subtitle=\"Rolling 7-day average number of new confirmed cases.\\nDate: {frame_time}\",\r\n       caption=\"Data from PHE, PHW, PHS & DoHNI\\nVisualisation by @VictimOfMaths\")\r\n\r\nanimate(HexAnimUK, duration=18, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/HexAnimUK.gif\"), \r\n        end_pause=60)\r\n\r\n#Rates version\r\nHexAnimUKrate <- ggplot()+\r\n  geom_polygon(data=subset(data.hex, date>as.Date(\"2020-03-06\") & date<=completeto), \r\n               aes(x=long, y=lat, group=id, fill=caserate_avg))+\r\n  coord_fixed()+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily confirmed\\ncases/100,000\\n(7-day rolling avg.)\", na.value=\"white\")+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\r\n  transition_time(date)+\r\n  labs(title=\"Visualising the spread of COVID-19 across the UK\",\r\n       subtitle=\"Rolling 7-day average number of new confirmed cases per 100,000.\\nDate: {frame_time}\",\r\n       caption=\"Data from PHE, PHW, PHS & DoHNI\\nVisualisation by @VictimOfMaths\")\r\n\r\nanimate(HexAnimUKrate, duration=18, fps=10, width=2000, height=3000, res=300, \r\n        renderer=gifski_renderer(\"Outputs/HexAnimUKrate.gif\"), \r\n        end_pause=60)\r\n\r\n#Chloropeth map\r\ndata.map <- data\r\n\r\n#Sort out Buckinghamshire to match hex template\r\ntemp <- subset(data.map, code==\"E06000060\")\r\n\r\ndata.map$code <- if_else(data.map$code==\"E06000060\", \"E07000004\", as.character(data.map$code))\r\ndata.map$name <- if_else(data.map$name==\"Buckinghamshire\", \"Aylesbury Vale\", as.character(data.map$name))\r\n\r\ntemp1 <- temp\r\ntemp1$code <- \"E07000005\"\r\ntemp1$name <- \"Chiltern\"\r\n\r\ntemp2 <- temp\r\ntemp2$code <- \"E07000006\"\r\ntemp2$name <- \"South Bucks\"\r\n\r\ntemp$code <- \"E07000007\"\r\ntemp$name <- \"Wycombe\"\r\n\r\ndata.map <- bind_rows(data.map, temp, temp1, temp2)\r\n\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/1d78d47c87df4212b79fe2323aae8e08_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\r\nname <- list.files(temp2, pattern=\".shp\")\r\nshapefile <- st_read(file.path(temp2, name))\r\n\r\nnames(shapefile)[names(shapefile) == \"lad19cd\"] <- \"code\"\r\n\r\nsimplemap <- ms_simplify(shapefile, keep=0.2, keep_shapes = TRUE)\r\n\r\nmap.cases <- full_join(simplemap, data.map, by=\"code\", all.y=TRUE)\r\nmap.cases$date <- as.Date(map.cases$date)\r\n\r\n#Map of current cases\r\ntiff(\"Outputs/COVIDCaseMapUK.tiff\", units=\"in\", width=8, height=12, res=500)\r\nmap.cases %>% \r\nfilter(date==completeto & !name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\")) %>% \r\n  ggplot()+\r\n  geom_sf(aes(geometry=geometry, fill=casesroll_avg), colour=NA)+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\n(rolling 7-day avg.)\")+\r\n  theme_classic()+\r\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n        axis.title=element_blank())+\r\n  labs(title=\"Confirmed new COVID-19 cases in the UK\",\r\n       subtitle=paste0(\"Rolling 7-day average of confirmed new cases at Local Authority/Council Area level\\nData up to \", completeto),\r\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")\r\ndev.off()\r\n  \r\ntiff(\"Outputs/COVIDCaserateMapUK.tiff\", units=\"in\", width=8, height=12, res=500)\r\nmap.cases %>% \r\n  filter(date==completeto & !name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\")) %>% \r\n  ggplot()+\r\n  geom_sf(aes(geometry=geometry, fill=caserate_avg), colour=NA)+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\nper 100,000\\n(rolling 7-day avg.)\")+\r\n  theme_classic()+\r\n    theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n          axis.title=element_blank())+\r\n  labs(title=\"Rates of confirmed new COVID-19 cases in the UK\",\r\n       subtitle=paste0(\"Rolling 7-day average of confirmed new cases per 100,000 at Local Authority/Council Area level\\nData up to \", completeto),\r\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#These last 2 animations require a more powerful computer/more patience than I have, so I'm\r\n#not 100% certain they actually work...\r\n\r\nCaseAnimAbs <- map.cases %>% \r\n  filter(!name %in% c(\"England\", \"Wales\", \"Northern Ireland\", \"Scotland\") & date>as.Date(\"2020-02-25\")) %>% \r\n  ggplot(aes(geometry=geometry, fill=casesroll_avg))+\r\n  geom_sf(colour=NA)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\n(rolling 7-day avg.)\")+\r\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\r\n  transition_time(date)+\r\n  labs(title=\"Visualising the spread of the pandemic across England\",\r\n       subtitle=\"Rolling 7-day average number of new confirmed cases in each Local Authority/Council area\\nDate: {frame_time}\",\r\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths\")\r\n\r\nanimate(CaseAnimAbs, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/CaseAnimAbs.gif\"), end_pause=60)\r\n\r\nCaseAnimRate <- ggplot(subset(map.cases, date>as.Date(\"2020-02-25\")), aes(geometry=geometry, fill=caserate_avg))+\r\n  geom_sf(colour=NA)+\r\n  theme_classic()+\r\n  scale_fill_distiller(palette=\"Spectral\", name=\"Daily cases\\nper 100,000\\n(rolling 7-day avg.)\")+\r\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\r\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\r\n  transition_time(date)+\r\n  labs(title=\"Visualising the spread of the pandemic across England\",\r\n       subtitle=\"Rolling 7-day average rate of new confirmed cases per 100,000 in each Local Authority/Council area\\nDate: {frame_time}\",\r\n       caption=\"Data from PHE, PHW, PHS & DoHNI | Visualisation by @VictimOfMaths\")\r\n\r\nanimate(CaseAnimRate, duration=25, fps=10, width=2000, height=3000, res=300, renderer=gifski_renderer(\"Outputs/CaseAnimRate.gif\"), end_pause=60)\r\n"
  },
  {
    "path": "Heatmaps/YorkshireVaxCartogram.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(curl)\r\nlibrary(tidyverse)\r\nlibrary(readxl)\r\nlibrary(paletteer)\r\nlibrary(sf)\r\nlibrary(scales)\r\nlibrary(ragg)\r\nlibrary(gtools)\r\nlibrary(ggridges)\r\nlibrary(patchwork)\r\nlibrary(extrafont)\r\nlibrary(ggrepel)\r\nlibrary(cowplot)\r\n\r\n#Download vaccination data by MSOA\r\n#https://www.england.nhs.uk/statistics/statistical-work-areas/covid-19-vaccinations/\r\nmaxdate <- \"13th June\"\r\n\r\nvax <- tempfile()\r\nurl <- \"https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2021/06/COVID-19-weekly-announced-vaccinations-17-June-2021.xlsx\"\r\nvax <- curl_download(url=url, destfile=vax, quiet=FALSE, mode=\"wb\")\r\n\r\nvaxdata <- read_excel(vax, sheet=\"MSOA\", range=\"F16:AH6806\", col_names=FALSE) %>% \r\n  set_names(\"msoa11cd\", \"msoa11nm\", \"<25_1st\", \"25-29_1st\", \"30-34_1st\", \"35-39_1st\", \"40-44_1st\", \r\n            \"45-49_1st\", \"50-54_1st\", \"55-59_1st\", \"60-64_1st\", \"65-69_1st\", \"70-74_1st\", \r\n            \"75-79_1st\", \"80+_1st\", \"blank\", \"<25_2nd\", \"25-29_2nd\", \"30-34_2nd\", \"35-39_2nd\", \"40-44_2nd\", \r\n            \"45-49_2nd\", \"50-54_2nd\", \"55-59_2nd\", \"60-64_2nd\", \"65-69_2nd\", \"70-74_2nd\", \r\n            \"75-79_2nd\", \"80+_2nd\") %>% \r\n  select(-blank) %>% \r\n  pivot_longer(c(3:28), names_to=c(\"age\", \"dose\"), names_sep=\"_\", values_to=\"vaccinated\")\r\n\r\n#Download IMD data\r\ntemp <- tempfile()\r\nsource <- (\"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/833970/File_1_-_IMD2019_Index_of_Multiple_Deprivation.xlsx\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nIMD <- read_excel(temp, sheet=\"IMD2019\", range=\"A2:F32845\", col_names=FALSE)[,c(1,2,5,6)]\r\ncolnames(IMD) <- c(\"LSOA11CD\", \"LSOA11NM\", \"IMDrank\", \"IMDdecile\")\r\n\r\n#Download LSOA to MSOA lookup\r\ntemp <- tempfile()\r\nsource <- (\"https://opendata.arcgis.com/datasets/fe6c55f0924b4734adf1cf7104a0173e_0.csv\")\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\nlookup <- read.csv(temp) %>% \r\n  select(LSOA11CD, MSOA11CD, RGN11NM) %>% \r\n  unique()\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, lookup, by=\"LSOA11CD\")\r\n\r\n#Bring in population data for LSOAs\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2flowersuperoutputareamidyearpopulationestimatesnationalstatistics%2fmid2019sape22dt13/sape22dt13mid2019lsoabroadagesestimatesunformatted.zip\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\npop <- read_excel(file.path(temp2, \"SAPE22DT13-mid-2019-lsoa-Broad_ages-estimates-unformatted.xlsx\"),\r\n                  sheet=\"Mid-2019 Persons\", range=\"A6:G34758\", col_names=FALSE)[,c(1,7)]\r\ncolnames(pop) <- c(\"LSOA11CD\", \"pop\")\r\n\r\n#Merge into IMD data\r\nIMD <- merge(IMD, pop)\r\n\r\n#Calculate IMD rank at MSOA level as weighted average of LSOA level ranks, weight by population\r\nIMD_MSOA <- IMD %>% \r\n  group_by(MSOA11CD) %>% \r\n  summarise(IMDrank=weighted.mean(IMDrank, pop), pop=sum(pop)) %>% \r\n  ungroup() \r\n\r\npop2 <- read_excel(vax, sheet=\"Population estimates (NIMS)\", range=\"V16:AK6806\", col_names=FALSE) %>% \r\n  select(-c(2,3)) %>% \r\n  rename(msoa11cd=`...1`) %>% \r\n  gather(age, pop, c(2:14)) %>% \r\n  mutate(age=case_when(\r\n    age==\"...4\" ~ \"<25\",\r\n    age==\"...5\" ~ \"25-29\", \r\n    age==\"...6\" ~ \"30-34\",\r\n    age==\"...7\" ~ \"35-39\",\r\n    age==\"...8\" ~ \"40-44\",\r\n    age==\"...9\" ~ \"45-49\",\r\n    age==\"...10\" ~ \"50-54\",\r\n    age==\"...11\" ~ \"55-59\",\r\n    age==\"...12\" ~ \"60-64\",\r\n    age==\"...13\" ~ \"65-69\",\r\n    age==\"...14\" ~ \"70-74\",\r\n    age==\"...15\" ~ \"75-79\",\r\n    TRUE ~ \"80+\")) %>% \r\n  group_by(msoa11cd, age) %>% \r\n  summarise(pop=sum(pop)) %>% \r\n  ungroup()\r\n\r\n#COMBINE\r\nvaxdata <- merge(vaxdata, pop2) %>% \r\n  merge(IMD_MSOA %>% select(-pop), by.x=\"msoa11cd\", by.y=\"MSOA11CD\") %>% \r\n  mutate(vaxprop=vaccinated/pop)\r\n\r\n#Download Carl Baker's lovely cartogram\r\nmsoa <- tempfile()\r\nsource <- (\"https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/raw/main/geopackages/MSOA.gpkg\")\r\nmsoa <- curl_download(url=source, destfile=msoa, quiet=FALSE, mode=\"wb\")\r\n\r\nBackgroundMSOA <- st_read(msoa, layer=\"5 Background\")\r\n\r\nMSOA <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(vaxdata, by=\"msoa11cd\") %>% \r\n  mutate(RegionNation=case_when(\r\n    LA.label==\"Hull\" ~ \"Yorkshire and The Humber\", \r\n    TRUE ~ as.character(RegionNation)))\r\n\r\nGroupsMSOA <- st_read(msoa, layer=\"2 Groups\")\r\n\r\nGroup_labelsMSOA <- st_read(msoa, layer=\"1 Group labels\") %>% \r\n  mutate(just=if_else(LabelPosit==\"Left\", 0, 1))\r\n\r\nLAsMSOA <- st_read(msoa, layer=\"3 Local authority outlines (2019)\")\r\n\r\nLAlabels <- data.frame(x=c(34.3, 34, 39, 37, 34.2, 44.6, 44.7, 39.3, 42.7), \r\n                       y=c(33.5, 40.5, 40.6, 35.7, 36.2, 34.3, 36.8, 36.4, 40.5), \r\n                       label=c(\"Sheffield\", \"Bradford\", \"Leeds\", \"Barnsley\", \"Kirklees\",\r\n                               \"NE Lincs\", \"Hull\", \"Wakefield\", \"York\"))\r\nArealabels <- data.frame(x=c(41.5, 33.6, 40.3, 44.6), y=c(43, 40, 33.3, 38.3), \r\n                         label=c(\"North Yorks\", \"West Yorks\", \"South Yorks\", \"East Yorks\\n& Humber\"))\r\n\r\nplot <- ggplot()+\r\n  geom_sf(data=MSOA %>% filter(age==\"Total\" & RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom, fill=vaxprop), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.2)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of adults who have received\\nat least one vaccine dose\", limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  geom_text(data=LAlabels, aes(x=x, y=y, label=label))+\r\n  geom_text(data=Arealabels, aes(x=x, y=y, label=label), fontface=\"bold\")+\r\n  theme_void()+\r\n  coord_sf(clip=\"off\")+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Roboto\"), plot.caption.position=\"plot\",\r\n        legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                                barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in Yorkshire\\n \",\r\n       caption=\"Data from NHS England\\nMap by Colin Angus, University of Sheffield\")+\r\n  annotate(\"text\", x=44, y=42.2, label=\"88% of adults in\\n Easingwold & Stillington\\nhave been vaccinated\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  annotate(\"text\", x=36, y=41.6, label=\"10% of adults\\nin Leeds City Centre\\nhave been vaccinated\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  annotate(\"text\", x=44.6, y=39.5, label=\"Each hexagon represents an area\\nof roughly 6,000 people\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  geom_curve(aes(x=42.38, y=42.55, xend=41, yend=41.5), curvature=0.2, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  geom_curve(aes(x=37.3, y=41.5, xend=38.22, yend=39), curvature=-0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  geom_curve(aes(x=43.7, y=39.1, xend=43.18, yend=38.7), curvature=-0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")\r\n  \r\nagg_tiff(\"Outputs/COVIDVaxMSOAYorkshire.tiff\", units=\"in\", width=10, height=8.5, res=800)\r\nplot\r\ndev.off()\r\n\r\n#Replicate for the over 70s only\r\n#Split into under and over 50\r\nvaxdata3 <- vaxdata %>% \r\n  mutate(age2=if_else(age %in% c(\"<40\", \"40-44\", \"45-49\", \"50-54\", \"55-59\", \"60-64\", \"65-69\"), \r\n                      \"<70\", \"70+\")) %>%\r\n  group_by(msoa11cd, msoa11nm, IMDrank, age2) %>% \r\n  summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(vaxprop=vaccinated/pop)\r\n\r\nMSOA2 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(vaxdata3, by=\"msoa11cd\") %>% \r\n  mutate(RegionNation=case_when(\r\n    LA.label==\"Hull\" ~ \"Yorkshire and The Humber\", \r\n    TRUE ~ as.character(RegionNation)))\r\n\r\nplot2 <- ggplot()+\r\n  geom_sf(data=MSOA2 %>% filter(age2==\"70+\" & RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom, fill=vaxprop), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.2)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of adults aged 70+ who have received\\nat least one vaccine dose\", limits=c(0.4,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  geom_text(data=LAlabels, aes(x=x, y=y, label=label))+\r\n  geom_text(data=Arealabels, aes(x=x, y=y, label=label), fontface=\"bold\")+\r\n  theme_void()+\r\n  coord_sf(clip=\"off\")+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Roboto\"), plot.caption.position=\"plot\",\r\n        legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in Yorkshire\\n \",\r\n       caption=\"Data from NHS England and ONS, Cartogram from House of Commons Library\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=44, y=42.2, label=\"97% of people aged 70+\\nin Newby & Scalby\\nhave been vaccinated\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  annotate(\"text\", x=36, y=41.6, label=\"72% of people aged 70+\\nin Leeds Central\\nhave been vaccinated\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  annotate(\"text\", x=44.6, y=39.5, label=\"Each hexagon represents an area\\nof roughly 6,000 people\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  geom_curve(aes(x=42.8, y=42.2, xend=41.7, yend=42.3), curvature=-0.15, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  geom_curve(aes(x=37.3, y=41.5, xend=38.85, yend=39.45), curvature=-0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  geom_curve(aes(x=43.7, y=39.1, xend=43.18, yend=38.7), curvature=-0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOAYorkshirev2.tiff\", units=\"in\", width=10, height=8.5, res=800)\r\nplot2\r\ndev.off()\r\n\r\n#Allocate to deciles\r\nvaxdeciles <- MSOA2 %>% \r\n  filter(RegionNation==\"Yorkshire and The Humber\" & age2==\"70+\") %>% \r\n  mutate(decile=quantcut(-IMDrank, 10, labels=FALSE)) %>% \r\n  group_by(decile) %>% \r\n  mutate(decilemean=sum(vaccinated)/sum(pop)) %>% \r\n  ungroup()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOAYorkshirev3.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(vaxdeciles, aes(x=vaxprop, y=as.factor(decile), fill=vaxprop))+\r\n  geom_density_ridges_gradient(aes(fill=stat(x)), rel_min_height=0.01, show.legend=FALSE)+\r\n  scale_y_discrete(name=\"Index of Multiple Deprivation\", labels=c(\"1 - least deprived\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \r\n                                                                  \"8\", \"9\", \"10 - most deprived\"))+ \r\n  scale_x_continuous(name=\"Proportion of population vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1)+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        text=element_text(family=\"Roboto\"), plot.title.position=\"plot\")+\r\n  labs(title=\"Vaccination rates in Yorkshire are lower in more deprived areas\",\r\n       subtitle=\"Distribution of vaccination rates for adults aged 70+ in neighbourhoods in Yorkshire\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Calculate uptake rates by age and region\r\nreguptake <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(vaxdata, by=\"msoa11cd\") %>% \r\n  group_by(RegionNation, age) %>% \r\n  summarise(vaccinated=sum(vaccinated), pop=sum(pop)) %>% \r\n  ungroup() %>% \r\n  mutate(vaxprop=vaccinated/pop) %>% \r\n  filter(RegionNation!=\"Wales\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxUptakexAgexReg.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(reguptake)+ \r\n  geom_point(aes(x=vaxprop, y=age, colour=RegionNation), alpha=0.8)+\r\n  scale_x_continuous(name=\"Proportion of the population vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"Vaccine uptake is consistently lowest in London\",\r\n       subtitle=\"Proportion of adults who have received at least one dose of COVID vaccine\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nagg_tiff(\"Outputs/COVIDVaxUptakexAgexRegYorkshire.tiff\", units=\"in\", width=8, height=6, res=800)\r\nggplot(reguptake)+ \r\n  geom_point(aes(x=vaxprop, y=age), colour=\"Grey70\", alpha=0.8)+  \r\n  geom_point(data=reguptake %>% filter(RegionNation==\"Yorkshire and The Humber\"),\r\n             aes(x=vaxprop, y=age), colour=\"#FF4E86\", alpha=0.8)+\r\n  scale_x_continuous(name=\"Proportion of the population vaccinated\",\r\n                     labels=label_percent(accuracy=1))+\r\n  scale_y_discrete(name=\"Age group\")+\r\n  scale_colour_paletteer_d(\"LaCroixColoR::paired\", name=\"\")+\r\n  theme_classic()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)),\r\n        text=element_text(family=\"Roboto\"), plot.subtitle=element_markdown())+\r\n  labs(title=\"Yorkshire has done a great job vaccinating the oldest age groups,\\nbut there is work to do in the younger ones\",\r\n       subtitle=\"Proportion of adults who have received at least one dose of COVID vaccine<br>in <span style='color:#FF4E86;'>Yorkshire</span> compared to <span style='color:Grey50;'>other English regions\",\r\n       caption=\"Data from NHS England | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Calculate age-standardised vaccination rate\r\nasvax <- vaxdata %>% \r\n  select(-c(vaccinated, pop)) %>% \r\n  spread(age, vaxprop) %>% \r\n  mutate(asrate=(`<50`*45000+`50-54`*7000+`55-59`*6500+`60-64`*6000+`65-69`*5500+`70-74`*5000+\r\n           `75-79`*4000+`80+`*5000)/84000)\r\n\r\nMSOA3 <- st_read(msoa, layer=\"4 MSOA hex\") %>% \r\n  left_join(asvax, by=\"msoa11cd\") %>% \r\n  mutate(RegionNation=case_when(\r\n    LA.label==\"Hull\" ~ \"Yorkshire and The Humber\", \r\n    TRUE ~ as.character(RegionNation)))\r\n\r\nplot3 <- ggplot()+\r\n  geom_sf(data=MSOA3 %>% filter(RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom, fill=asrate), colour=NA)+\r\n  geom_sf(data=LAsMSOA %>% filter(RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom), fill=NA, colour=\"White\", size=0.2)+\r\n  geom_sf(data=GroupsMSOA %>% filter(RegionNation==\"Yorkshire and The Humber\"), \r\n          aes(geometry=geom), fill=NA, colour=\"Black\")+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Age standardised rates of adults receiving\\nat least one vaccine dose\", limits=c(0,NA),\r\n                         labels=label_percent(accuracy=1))+\r\n  geom_text(data=LAlabels, aes(x=x, y=y, label=label))+\r\n  geom_text(data=Arealabels, aes(x=x, y=y, label=label), fontface=\"bold\")+\r\n  theme_void()+\r\n  coord_sf(clip=\"off\")+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(2)),\r\n        text=element_text(family=\"Roboto\"), plot.caption.position=\"plot\",\r\n        legend.position=\"top\")+\r\n  guides(fill = guide_colorbar(title.position = 'top', title.hjust = .5,\r\n                               barwidth = unit(20, 'lines'), barheight = unit(.5, 'lines')))+\r\n  labs(title=\"Vaccination rates in Yorkshire\\n \",\r\n       caption=\"Data from NHS England and ONS, Cartogram from House of Commons Library\\nPlot by @VictimOfMaths\")+\r\n  annotate(\"text\", x=44.8, y=39.6, label=\"Vaccination rates are highest\\nin Winterton & Winteringham\\nand Newby & Scalby\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  annotate(\"text\", x=36, y=41.6, label=\"Vaccination rates are lowest\\nin Harehills South in the\\ncentre of Leeds\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  annotate(\"text\", x=43.2, y=33.6, label=\"Each hexagon represents an area\\nof roughly 6,000 people\",\r\n           family=\"Roboto\", colour=\"Grey50\")+\r\n  geom_curve(aes(x=44, y=40.2, xend=41.7, yend=42.3), curvature=0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  geom_curve(aes(x=43.6, y=39, xend=42.3, yend=36.1), curvature=0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  geom_curve(aes(x=37.1, y=41.3, xend=38.85, yend=39.45), curvature=-0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")+\r\n  geom_curve(aes(x=42.8, y=33.9, xend=43.45, yend=34.5), curvature=-0.25, colour=\"Grey50\",\r\n             arrow=arrow(length=unit(0.1, \"cm\"), type=\"closed\"), lineend=\"round\")\r\n\r\nagg_tiff(\"Outputs/COVIDVaxMSOAYorkshirev3.tiff\", units=\"in\", width=10, height=8.5, res=800)\r\nplot3\r\ndev.off()\r\n\r\n#Actual Sheffield Map\r\n#Download shapefile of LA boundaries\r\ntemp <- tempfile()\r\ntemp2 <- tempfile()\r\nsource <- \"https://opendata.arcgis.com/datasets/826dc85fb600440889480f4d9dbb1a24_0.zip?outSR=%7B%22latestWkid%22%3A27700%2C%22wkid%22%3A27700%7D\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nunzip(zipfile=temp, exdir=temp2)\r\n\r\n#The actual shapefile has a different name each time you download it, so need to fish the name out of the unzipped file\r\nname <- list.files(temp2, pattern=\".shp\")\r\nshapefile <- st_read(file.path(temp2, name))\r\n\r\n\r\nmap <- full_join(shapefile, MSOA %>% select(Laname, msoa11cd, IMDrank, vaxprop, pop, age2) %>% as.data.frame(), \r\n                 by=\"msoa11cd\", all.y=TRUE)\r\n\r\nmap %>% \r\n  filter(Laname==\"Sheffield\" & age2==\"50+\") %>% \r\n  ggplot()+\r\n  geom_sf(aes(geometry=geometry, fill=vaxprop), colour=NA)+\r\n  scale_fill_paletteer_c(\"pals::ocean.haline\", direction=-1, \r\n                         name=\"Proportion of\\npopulation\\nvaccinated\", limits=c(0,1),\r\n                         labels=label_percent(accuracy=1))+\r\n  theme_void()+\r\n  theme(plot.title=element_text(face=\"bold\", size=rel(1.4)), text=element_text(family=\"Roboto\"))+\r\n  labs(title=\"COVID-19 vaccination rates in Sheffield\",\r\n       subtitle=\"Proportion of adults over 50 who have received at least one vaccine dose\",\r\n       caption=\"Data from NHS England and ONS, Cartogram from @carlbaker/House of Commons Library\\nPlot by @VictimOfMaths\")\r\n\r\nggplot(MSOA %>% filter(age2==\"50+\" & Laname==\"Sheffield\"))+\r\n  geom_point(aes(x=vaxprop, y=IMDrank))\r\n"
  },
  {
    "path": "Heatmaps/la_trust_lk.csv",
    "content": "\"areacode\",\"areaname\",\"procode3\",\"CountAdm\"\r\n\"E06000001\",\"Hartlepool\",\"RVW\",13157\r\n\"E06000001\",\"Hartlepool\",\"RTR\",1000\r\n\"E06000001\",\"Hartlepool\",\"RTD\",172\r\n\"E06000001\",\"Hartlepool\",\"RX3\",153\r\n\"E06000001\",\"Hartlepool\",\"RXP\",43\r\n\"E06000001\",\"Hartlepool\",\"R0B\",69\r\n\"E06000001\",\"Hartlepool\",\"RTF\",15\r\n\"E06000001\",\"Hartlepool\",\"RNL\",10\r\n\"E06000001\",\"Hartlepool\",\"RCB\",9\r\n\"E06000001\",\"Hartlepool\",\"RCD\",6\r\n\"E06000001\",\"Hartlepool\",\"RR8\",5\r\n\"E06000001\",\"Hartlepool\",\"RRV\",5\r\n\"E06000001\",\"Hartlepool\",\"RBA\",4\r\n\"E06000001\",\"Hartlepool\",\"RWY\",4\r\n\"E06000001\",\"Hartlepool\",\"RR7\",4\r\n\"E06000001\",\"Hartlepool\",\"RWA\",3\r\n\"E06000001\",\"Hartlepool\",\"R0A\",3\r\n\"E06000001\",\"Hartlepool\",\"REM\",3\r\n\"E06000001\",\"Hartlepool\",\"RXL\",3\r\n\"E06000001\",\"Hartlepool\",\"R1H\",3\r\n\"E06000001\",\"Hartlepool\",\"RN5\",3\r\n\"E06000001\",\"Hartlepool\",\"RJ1\",3\r\n\"E06000001\",\"Hartlepool\",\"RDU\",2\r\n\"E06000001\",\"Hartlepool\",\"RAE\",2\r\n\"E06000001\",\"Hartlepool\",\"RGT\",2\r\n\"E06000001\",\"Hartlepool\",\"RXR\",2\r\n\"E06000001\",\"Hartlepool\",\"RCX\",2\r\n\"E06000001\",\"Hartlepool\",\"RBL\",2\r\n\"E06000001\",\"Hartlepool\",\"RJL\",2\r\n\"E06000001\",\"Hartlepool\",\"RRK\",3\r\n\"E06000001\",\"Hartlepool\",\"RTX\",2\r\n\"E06000001\",\"Hartlepool\",\"RW1\",2\r\n\"E06000001\",\"Hartlepool\",\"RA2\",1\r\n\"E06000001\",\"Hartlepool\",\"RHQ\",1\r\n\"E06000001\",\"Hartlepool\",\"RAJ\",1\r\n\"E06000001\",\"Hartlepool\",\"RNS\",1\r\n\"E06000001\",\"Hartlepool\",\"RBS\",1\r\n\"E06000001\",\"Hartlepool\",\"RFS\",1\r\n\"E06000001\",\"Hartlepool\",\"RJ2\",1\r\n\"E06000001\",\"Hartlepool\",\"RJR\",1\r\n\"E06000001\",\"Hartlepool\",\"RM3\",1\r\n\"E06000001\",\"Hartlepool\",\"RNQ\",1\r\n\"E06000001\",\"Hartlepool\",\"RXC\",1\r\n\"E06000001\",\"Hartlepool\",\"RXF\",1\r\n\"E06000001\",\"Hartlepool\",\"RXQ\",1\r\n\"E06000001\",\"Hartlepool\",\"RXW\",1\r\n\"E06000001\",\"Hartlepool\",\"REF\",1\r\n\"E06000001\",\"Hartlepool\",\"RW6\",1\r\n\"E06000001\",\"Hartlepool\",\"RA9\",1\r\n\"E06000001\",\"Hartlepool\",\"RAX\",1\r\n\"E06000001\",\"Hartlepool\",\"RMP\",1\r\n\"E06000001\",\"Hartlepool\",\"RX4\",1\r\n\"E06000001\",\"Hartlepool\",\"RNZ\",1\r\n\"E06000001\",\"Hartlepool\",\"RRF\",1\r\n\"E06000001\",\"Hartlepool\",\"R1F\",1\r\n\"E06000001\",\"Hartlepool\",\"RBT\",1\r\n\"E06000001\",\"Hartlepool\",\"RBZ\",1\r\n\"E06000001\",\"Hartlepool\",\"RHM\",1\r\n\"E06000001\",\"Hartlepool\",\"RHW\",1\r\n\"E06000001\",\"Hartlepool\",\"RWD\",1\r\n\"E06000001\",\"Hartlepool\",\"RFR\",1\r\n\"E06000001\",\"Hartlepool\",\"RGN\",1\r\n\"E06000001\",\"Hartlepool\",\"RTE\",1\r\n\"E06000001\",\"Hartlepool\",\"RXH\",1\r\n\"E06000002\",\"Middlesbrough\",\"RTR\",19409\r\n\"E06000002\",\"Middlesbrough\",\"RVW\",518\r\n\"E06000002\",\"Middlesbrough\",\"RX3\",348\r\n\"E06000002\",\"Middlesbrough\",\"RTD\",167\r\n\"E06000002\",\"Middlesbrough\",\"RXP\",31\r\n\"E06000002\",\"Middlesbrough\",\"RCB\",22\r\n\"E06000002\",\"Middlesbrough\",\"R0A\",9\r\n\"E06000002\",\"Middlesbrough\",\"RR8\",9\r\n\"E06000002\",\"Middlesbrough\",\"RR7\",7\r\n\"E06000002\",\"Middlesbrough\",\"RTF\",7\r\n\"E06000002\",\"Middlesbrough\",\"R0B\",7\r\n\"E06000002\",\"Middlesbrough\",\"RNL\",6\r\n\"E06000002\",\"Middlesbrough\",\"RWA\",6\r\n\"E06000002\",\"Middlesbrough\",\"RK5\",5\r\n\"E06000002\",\"Middlesbrough\",\"RTH\",5\r\n\"E06000002\",\"Middlesbrough\",\"R1H\",4\r\n\"E06000002\",\"Middlesbrough\",\"RQM\",4\r\n\"E06000002\",\"Middlesbrough\",\"RD8\",4\r\n\"E06000002\",\"Middlesbrough\",\"RJ1\",4\r\n\"E06000002\",\"Middlesbrough\",\"RWF\",4\r\n\"E06000002\",\"Middlesbrough\",\"RWD\",3\r\n\"E06000002\",\"Middlesbrough\",\"RRK\",3\r\n\"E06000002\",\"Middlesbrough\",\"RJ7\",3\r\n\"E06000002\",\"Middlesbrough\",\"RXL\",3\r\n\"E06000002\",\"Middlesbrough\",\"RTX\",3\r\n\"E06000002\",\"Middlesbrough\",\"RWW\",3\r\n\"E06000002\",\"Middlesbrough\",\"RHM\",3\r\n\"E06000002\",\"Middlesbrough\",\"RBN\",2\r\n\"E06000002\",\"Middlesbrough\",\"RHQ\",2\r\n\"E06000002\",\"Middlesbrough\",\"RRV\",3\r\n\"E06000002\",\"Middlesbrough\",\"RXF\",2\r\n\"E06000002\",\"Middlesbrough\",\"RYR\",2\r\n\"E06000002\",\"Middlesbrough\",\"RBK\",2\r\n\"E06000002\",\"Middlesbrough\",\"RCD\",2\r\n\"E06000002\",\"Middlesbrough\",\"RGT\",2\r\n\"E06000002\",\"Middlesbrough\",\"RX1\",2\r\n\"E06000002\",\"Middlesbrough\",\"RWG\",2\r\n\"E06000002\",\"Middlesbrough\",\"RC9\",2\r\n\"E06000002\",\"Middlesbrough\",\"RTP\",2\r\n\"E06000002\",\"Middlesbrough\",\"RW6\",2\r\n\"E06000002\",\"Middlesbrough\",\"RN5\",2\r\n\"E06000002\",\"Middlesbrough\",\"RX4\",2\r\n\"E06000002\",\"Middlesbrough\",\"RD1\",1\r\n\"E06000002\",\"Middlesbrough\",\"RDD\",1\r\n\"E06000002\",\"Middlesbrough\",\"RFF\",1\r\n\"E06000002\",\"Middlesbrough\",\"RKB\",1\r\n\"E06000002\",\"Middlesbrough\",\"RAX\",1\r\n\"E06000002\",\"Middlesbrough\",\"RBA\",1\r\n\"E06000002\",\"Middlesbrough\",\"RC1\",1\r\n\"E06000002\",\"Middlesbrough\",\"RGN\",1\r\n\"E06000002\",\"Middlesbrough\",\"RNA\",1\r\n\"E06000002\",\"Middlesbrough\",\"RAE\",1\r\n\"E06000002\",\"Middlesbrough\",\"RJL\",1\r\n\"E06000002\",\"Middlesbrough\",\"RQ8\",1\r\n\"E06000002\",\"Middlesbrough\",\"RVJ\",1\r\n\"E06000002\",\"Middlesbrough\",\"RWY\",1\r\n\"E06000002\",\"Middlesbrough\",\"RAP\",1\r\n\"E06000002\",\"Middlesbrough\",\"RP5\",1\r\n\"E06000002\",\"Middlesbrough\",\"REM\",1\r\n\"E06000002\",\"Middlesbrough\",\"RBL\",1\r\n\"E06000002\",\"Middlesbrough\",\"RKE\",1\r\n\"E06000002\",\"Middlesbrough\",\"RM3\",1\r\n\"E06000002\",\"Middlesbrough\",\"RP6\",1\r\n\"E06000002\",\"Middlesbrough\",\"RPC\",1\r\n\"E06000002\",\"Middlesbrough\",\"RQW\",1\r\n\"E06000002\",\"Middlesbrough\",\"RWJ\",1\r\n\"E06000002\",\"Middlesbrough\",\"RAJ\",1\r\n\"E06000002\",\"Middlesbrough\",\"RBS\",1\r\n\"E06000002\",\"Middlesbrough\",\"RJZ\",1\r\n\"E06000002\",\"Middlesbrough\",\"RTK\",1\r\n\"E06000002\",\"Middlesbrough\",\"R1K\",1\r\n\"E06000002\",\"Middlesbrough\",\"RA9\",1\r\n\"E06000002\",\"Middlesbrough\",\"RBZ\",1\r\n\"E06000002\",\"Middlesbrough\",\"RJR\",1\r\n\"E06000002\",\"Middlesbrough\",\"RM1\",1\r\n\"E06000002\",\"Middlesbrough\",\"RVV\",1\r\n\"E06000002\",\"Middlesbrough\",\"RBT\",1\r\n\"E06000002\",\"Middlesbrough\",\"RCX\",1\r\n\"E06000002\",\"Middlesbrough\",\"RDE\",1\r\n\"E06000002\",\"Middlesbrough\",\"RFR\",1\r\n\"E06000002\",\"Middlesbrough\",\"RJ2\",1\r\n\"E06000002\",\"Middlesbrough\",\"RTE\",1\r\n\"E06000002\",\"Middlesbrough\",\"RWE\",1\r\n\"E06000002\",\"Middlesbrough\",\"RXR\",1\r\n\"E06000002\",\"Middlesbrough\",\"RYJ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RTR\",18210\r\n\"E06000003\",\"Redcar and Cleveland\",\"RVW\",235\r\n\"E06000003\",\"Redcar and Cleveland\",\"RX3\",228\r\n\"E06000003\",\"Redcar and Cleveland\",\"RTD\",160\r\n\"E06000003\",\"Redcar and Cleveland\",\"RCB\",31\r\n\"E06000003\",\"Redcar and Cleveland\",\"RXP\",20\r\n\"E06000003\",\"Redcar and Cleveland\",\"RCD\",12\r\n\"E06000003\",\"Redcar and Cleveland\",\"RR8\",12\r\n\"E06000003\",\"Redcar and Cleveland\",\"RXF\",7\r\n\"E06000003\",\"Redcar and Cleveland\",\"RNL\",7\r\n\"E06000003\",\"Redcar and Cleveland\",\"RTF\",7\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJ1\",6\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWA\",5\r\n\"E06000003\",\"Redcar and Cleveland\",\"RX1\",5\r\n\"E06000003\",\"Redcar and Cleveland\",\"RTX\",5\r\n\"E06000003\",\"Redcar and Cleveland\",\"R0B\",6\r\n\"E06000003\",\"Redcar and Cleveland\",\"RBT\",5\r\n\"E06000003\",\"Redcar and Cleveland\",\"RLQ\",5\r\n\"E06000003\",\"Redcar and Cleveland\",\"RD8\",4\r\n\"E06000003\",\"Redcar and Cleveland\",\"RR7\",4\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWE\",4\r\n\"E06000003\",\"Redcar and Cleveland\",\"RXL\",4\r\n\"E06000003\",\"Redcar and Cleveland\",\"RHM\",4\r\n\"E06000003\",\"Redcar and Cleveland\",\"REF\",3\r\n\"E06000003\",\"Redcar and Cleveland\",\"R0A\",3\r\n\"E06000003\",\"Redcar and Cleveland\",\"RYJ\",3\r\n\"E06000003\",\"Redcar and Cleveland\",\"RDE\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RHQ\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RTG\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RVJ\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RCX\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJR\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RM1\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RRK\",3\r\n\"E06000003\",\"Redcar and Cleveland\",\"RTE\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RD3\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWD\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RAE\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RBL\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJE\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"R1H\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RCF\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RRV\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RAL\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RFF\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"REM\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWJ\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RA3\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RAS\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJL\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RW6\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RXR\",2\r\n\"E06000003\",\"Redcar and Cleveland\",\"RQ8\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"R1K\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RAJ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RBZ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJC\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RN5\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RNZ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RPA\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RXH\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RXQ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RDZ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RGT\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWW\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RXN\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RDU\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJN\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RK5\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWF\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWP\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RYR\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RBN\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RBS\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RGM\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJ2\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RM3\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RP5\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RT3\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RNQ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RWG\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RX4\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RBA\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RBD\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RD1\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RN3\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RQX\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RV9\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RA2\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RJZ\",1\r\n\"E06000003\",\"Redcar and Cleveland\",\"RN7\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RVW\",25776\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTR\",2780\r\n\"E06000004\",\"Stockton-on-Tees\",\"RX3\",304\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTD\",301\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXP\",126\r\n\"E06000004\",\"Stockton-on-Tees\",\"RCB\",28\r\n\"E06000004\",\"Stockton-on-Tees\",\"R0B\",35\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTF\",13\r\n\"E06000004\",\"Stockton-on-Tees\",\"R0A\",12\r\n\"E06000004\",\"Stockton-on-Tees\",\"RR8\",9\r\n\"E06000004\",\"Stockton-on-Tees\",\"R1H\",8\r\n\"E06000004\",\"Stockton-on-Tees\",\"REM\",9\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXL\",7\r\n\"E06000004\",\"Stockton-on-Tees\",\"RHQ\",6\r\n\"E06000004\",\"Stockton-on-Tees\",\"RAL\",6\r\n\"E06000004\",\"Stockton-on-Tees\",\"RCD\",6\r\n\"E06000004\",\"Stockton-on-Tees\",\"RFS\",6\r\n\"E06000004\",\"Stockton-on-Tees\",\"RNL\",6\r\n\"E06000004\",\"Stockton-on-Tees\",\"RKB\",5\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTH\",5\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTX\",5\r\n\"E06000004\",\"Stockton-on-Tees\",\"RJR\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RCX\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RFF\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RQM\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RR7\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RWA\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RVJ\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTG\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RWW\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RVV\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RDU\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RJ1\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RNA\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RGT\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RJZ\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RWD\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RRK\",4\r\n\"E06000004\",\"Stockton-on-Tees\",\"RWY\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXN\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RA9\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RVY\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RN5\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RP5\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RX4\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXF\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RCF\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RDZ\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RBA\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RDD\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RHW\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RK5\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RX1\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RBT\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RF4\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RBD\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"REF\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RW6\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RWH\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"R1F\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RAJ\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RJL\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTE\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RJ2\",2\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXW\",3\r\n\"E06000004\",\"Stockton-on-Tees\",\"RBQ\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RL4\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RP6\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RRV\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXK\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RAX\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RHM\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RVR\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXM\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXY\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RA2\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RBS\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RC1\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RD3\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RJE\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RKE\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RQ3\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RQ8\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RTK\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RAE\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RM3\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RMP\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RNQ\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RYJ\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RCU\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RN7\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXR\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"R1K\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RAP\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RJ7\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RNS\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXC\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RA4\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RLT\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RMC\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RWJ\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RXQ\",1\r\n\"E06000004\",\"Stockton-on-Tees\",\"RBN\",1\r\n\"E06000005\",\"Darlington\",\"RXP\",12341\r\n\"E06000005\",\"Darlington\",\"RTR\",613\r\n\"E06000005\",\"Darlington\",\"RX3\",229\r\n\"E06000005\",\"Darlington\",\"RTD\",193\r\n\"E06000005\",\"Darlington\",\"RVW\",180\r\n\"E06000005\",\"Darlington\",\"RCB\",18\r\n\"E06000005\",\"Darlington\",\"RTF\",14\r\n\"E06000005\",\"Darlington\",\"RR8\",10\r\n\"E06000005\",\"Darlington\",\"RNL\",10\r\n\"E06000005\",\"Darlington\",\"R0B\",17\r\n\"E06000005\",\"Darlington\",\"RTX\",7\r\n\"E06000005\",\"Darlington\",\"RWD\",6\r\n\"E06000005\",\"Darlington\",\"RFF\",5\r\n\"E06000005\",\"Darlington\",\"R0A\",4\r\n\"E06000005\",\"Darlington\",\"REF\",4\r\n\"E06000005\",\"Darlington\",\"RDU\",3\r\n\"E06000005\",\"Darlington\",\"RMY\",3\r\n\"E06000005\",\"Darlington\",\"RP5\",4\r\n\"E06000005\",\"Darlington\",\"RVR\",3\r\n\"E06000005\",\"Darlington\",\"RCD\",3\r\n\"E06000005\",\"Darlington\",\"RA7\",3\r\n\"E06000005\",\"Darlington\",\"RXN\",3\r\n\"E06000005\",\"Darlington\",\"RCF\",2\r\n\"E06000005\",\"Darlington\",\"RGN\",2\r\n\"E06000005\",\"Darlington\",\"RJC\",2\r\n\"E06000005\",\"Darlington\",\"RKB\",2\r\n\"E06000005\",\"Darlington\",\"RNZ\",2\r\n\"E06000005\",\"Darlington\",\"RWA\",2\r\n\"E06000005\",\"Darlington\",\"RD8\",2\r\n\"E06000005\",\"Darlington\",\"RGM\",2\r\n\"E06000005\",\"Darlington\",\"RL4\",2\r\n\"E06000005\",\"Darlington\",\"RR7\",2\r\n\"E06000005\",\"Darlington\",\"R1K\",2\r\n\"E06000005\",\"Darlington\",\"RAE\",2\r\n\"E06000005\",\"Darlington\",\"RCX\",2\r\n\"E06000005\",\"Darlington\",\"RH8\",2\r\n\"E06000005\",\"Darlington\",\"RHW\",2\r\n\"E06000005\",\"Darlington\",\"RQM\",2\r\n\"E06000005\",\"Darlington\",\"RX4\",2\r\n\"E06000005\",\"Darlington\",\"RA9\",2\r\n\"E06000005\",\"Darlington\",\"RNS\",2\r\n\"E06000005\",\"Darlington\",\"RWJ\",2\r\n\"E06000005\",\"Darlington\",\"REM\",3\r\n\"E06000005\",\"Darlington\",\"RXK\",2\r\n\"E06000005\",\"Darlington\",\"RBZ\",1\r\n\"E06000005\",\"Darlington\",\"RFR\",1\r\n\"E06000005\",\"Darlington\",\"RJZ\",1\r\n\"E06000005\",\"Darlington\",\"RVJ\",1\r\n\"E06000005\",\"Darlington\",\"RXQ\",1\r\n\"E06000005\",\"Darlington\",\"RD1\",1\r\n\"E06000005\",\"Darlington\",\"RFS\",1\r\n\"E06000005\",\"Darlington\",\"RM3\",1\r\n\"E06000005\",\"Darlington\",\"RRF\",1\r\n\"E06000005\",\"Darlington\",\"RRK\",2\r\n\"E06000005\",\"Darlington\",\"RWP\",1\r\n\"E06000005\",\"Darlington\",\"RXF\",1\r\n\"E06000005\",\"Darlington\",\"RAL\",1\r\n\"E06000005\",\"Darlington\",\"RV9\",1\r\n\"E06000005\",\"Darlington\",\"RVY\",1\r\n\"E06000005\",\"Darlington\",\"R1F\",1\r\n\"E06000005\",\"Darlington\",\"RAJ\",1\r\n\"E06000005\",\"Darlington\",\"RJ1\",1\r\n\"E06000005\",\"Darlington\",\"RTE\",1\r\n\"E06000005\",\"Darlington\",\"RWW\",1\r\n\"E06000005\",\"Darlington\",\"RBN\",1\r\n\"E06000005\",\"Darlington\",\"RJL\",1\r\n\"E06000005\",\"Darlington\",\"RBT\",1\r\n\"E06000005\",\"Darlington\",\"RLQ\",1\r\n\"E06000005\",\"Darlington\",\"RT5\",1\r\n\"E06000005\",\"Darlington\",\"RA4\",1\r\n\"E06000005\",\"Darlington\",\"RD3\",1\r\n\"E06000005\",\"Darlington\",\"RGT\",1\r\n\"E06000005\",\"Darlington\",\"RHM\",1\r\n\"E06000005\",\"Darlington\",\"RHU\",1\r\n\"E06000005\",\"Darlington\",\"RJR\",1\r\n\"E06000005\",\"Darlington\",\"RQ8\",1\r\n\"E06000005\",\"Darlington\",\"RXA\",1\r\n\"E06000005\",\"Darlington\",\"RXW\",1\r\n\"E06000005\",\"Darlington\",\"RQW\",1\r\n\"E06000006\",\"Halton\",\"RBN\",9944\r\n\"E06000006\",\"Halton\",\"RWW\",7071\r\n\"E06000006\",\"Halton\",\"RBS\",403\r\n\"E06000006\",\"Halton\",\"REM\",540\r\n\"E06000006\",\"Halton\",\"RTV\",229\r\n\"E06000006\",\"Halton\",\"RBQ\",187\r\n\"E06000006\",\"Halton\",\"RJR\",131\r\n\"E06000006\",\"Halton\",\"REN\",77\r\n\"E06000006\",\"Halton\",\"RET\",71\r\n\"E06000006\",\"Halton\",\"R0A\",51\r\n\"E06000006\",\"Halton\",\"RM3\",30\r\n\"E06000006\",\"Halton\",\"RBL\",28\r\n\"E06000006\",\"Halton\",\"RBT\",18\r\n\"E06000006\",\"Halton\",\"RBV\",15\r\n\"E06000006\",\"Halton\",\"REP\",15\r\n\"E06000006\",\"Halton\",\"RRF\",13\r\n\"E06000006\",\"Halton\",\"RJE\",9\r\n\"E06000006\",\"Halton\",\"RWJ\",8\r\n\"E06000006\",\"Halton\",\"RVY\",8\r\n\"E06000006\",\"Halton\",\"RW6\",7\r\n\"E06000006\",\"Halton\",\"RXL\",7\r\n\"E06000006\",\"Halton\",\"RJN\",6\r\n\"E06000006\",\"Halton\",\"RR8\",5\r\n\"E06000006\",\"Halton\",\"RRK\",4\r\n\"E06000006\",\"Halton\",\"RW4\",4\r\n\"E06000006\",\"Halton\",\"RAL\",3\r\n\"E06000006\",\"Halton\",\"RKB\",3\r\n\"E06000006\",\"Halton\",\"RTX\",3\r\n\"E06000006\",\"Halton\",\"RMC\",3\r\n\"E06000006\",\"Halton\",\"R1K\",3\r\n\"E06000006\",\"Halton\",\"RXR\",3\r\n\"E06000006\",\"Halton\",\"RDZ\",2\r\n\"E06000006\",\"Halton\",\"RXA\",2\r\n\"E06000006\",\"Halton\",\"RFS\",2\r\n\"E06000006\",\"Halton\",\"RN5\",2\r\n\"E06000006\",\"Halton\",\"RNL\",2\r\n\"E06000006\",\"Halton\",\"RXH\",2\r\n\"E06000006\",\"Halton\",\"RD3\",2\r\n\"E06000006\",\"Halton\",\"RHM\",2\r\n\"E06000006\",\"Halton\",\"RXN\",2\r\n\"E06000006\",\"Halton\",\"RHQ\",2\r\n\"E06000006\",\"Halton\",\"RBD\",2\r\n\"E06000006\",\"Halton\",\"RDD\",2\r\n\"E06000006\",\"Halton\",\"RXW\",3\r\n\"E06000006\",\"Halton\",\"RC1\",1\r\n\"E06000006\",\"Halton\",\"RD8\",1\r\n\"E06000006\",\"Halton\",\"RDE\",1\r\n\"E06000006\",\"Halton\",\"RDU\",1\r\n\"E06000006\",\"Halton\",\"RJL\",1\r\n\"E06000006\",\"Halton\",\"RLQ\",1\r\n\"E06000006\",\"Halton\",\"RQ3\",1\r\n\"E06000006\",\"Halton\",\"RNZ\",1\r\n\"E06000006\",\"Halton\",\"RTG\",1\r\n\"E06000006\",\"Halton\",\"RWF\",1\r\n\"E06000006\",\"Halton\",\"RXQ\",1\r\n\"E06000006\",\"Halton\",\"R1H\",1\r\n\"E06000006\",\"Halton\",\"RA2\",1\r\n\"E06000006\",\"Halton\",\"RNA\",1\r\n\"E06000006\",\"Halton\",\"RWA\",1\r\n\"E06000006\",\"Halton\",\"RXP\",1\r\n\"E06000006\",\"Halton\",\"RA9\",1\r\n\"E06000006\",\"Halton\",\"RTF\",1\r\n\"E06000006\",\"Halton\",\"RX1\",1\r\n\"E06000006\",\"Halton\",\"RAS\",1\r\n\"E06000006\",\"Halton\",\"RFR\",1\r\n\"E06000006\",\"Halton\",\"RTE\",1\r\n\"E06000006\",\"Halton\",\"RHW\",1\r\n\"E06000006\",\"Halton\",\"RTH\",1\r\n\"E06000006\",\"Halton\",\"RTR\",1\r\n\"E06000006\",\"Halton\",\"RWY\",1\r\n\"E06000006\",\"Halton\",\"RCB\",1\r\n\"E06000006\",\"Halton\",\"RCD\",1\r\n\"E06000006\",\"Halton\",\"REF\",1\r\n\"E06000006\",\"Halton\",\"RP5\",1\r\n\"E06000006\",\"Halton\",\"RTD\",1\r\n\"E06000007\",\"Warrington\",\"RWW\",22145\r\n\"E06000007\",\"Warrington\",\"RBN\",1151\r\n\"E06000007\",\"Warrington\",\"RBS\",419\r\n\"E06000007\",\"Warrington\",\"RTV\",349\r\n\"E06000007\",\"Warrington\",\"R0A\",336\r\n\"E06000007\",\"Warrington\",\"REM\",506\r\n\"E06000007\",\"Warrington\",\"RBQ\",211\r\n\"E06000007\",\"Warrington\",\"RM3\",196\r\n\"E06000007\",\"Warrington\",\"RET\",141\r\n\"E06000007\",\"Warrington\",\"RJR\",118\r\n\"E06000007\",\"Warrington\",\"RRF\",111\r\n\"E06000007\",\"Warrington\",\"REN\",104\r\n\"E06000007\",\"Warrington\",\"RBV\",52\r\n\"E06000007\",\"Warrington\",\"RBT\",36\r\n\"E06000007\",\"Warrington\",\"RBL\",35\r\n\"E06000007\",\"Warrington\",\"REP\",20\r\n\"E06000007\",\"Warrington\",\"RTX\",20\r\n\"E06000007\",\"Warrington\",\"RWJ\",18\r\n\"E06000007\",\"Warrington\",\"RXN\",17\r\n\"E06000007\",\"Warrington\",\"RJE\",14\r\n\"E06000007\",\"Warrington\",\"RW6\",13\r\n\"E06000007\",\"Warrington\",\"RMC\",11\r\n\"E06000007\",\"Warrington\",\"RXL\",11\r\n\"E06000007\",\"Warrington\",\"RNL\",10\r\n\"E06000007\",\"Warrington\",\"RJN\",8\r\n\"E06000007\",\"Warrington\",\"RCB\",7\r\n\"E06000007\",\"Warrington\",\"RR8\",7\r\n\"E06000007\",\"Warrington\",\"R1H\",7\r\n\"E06000007\",\"Warrington\",\"RVY\",10\r\n\"E06000007\",\"Warrington\",\"RQM\",7\r\n\"E06000007\",\"Warrington\",\"RMP\",7\r\n\"E06000007\",\"Warrington\",\"RAP\",6\r\n\"E06000007\",\"Warrington\",\"REF\",6\r\n\"E06000007\",\"Warrington\",\"RGT\",6\r\n\"E06000007\",\"Warrington\",\"RTD\",6\r\n\"E06000007\",\"Warrington\",\"RXR\",5\r\n\"E06000007\",\"Warrington\",\"RRK\",8\r\n\"E06000007\",\"Warrington\",\"RRV\",5\r\n\"E06000007\",\"Warrington\",\"R1K\",5\r\n\"E06000007\",\"Warrington\",\"RDU\",4\r\n\"E06000007\",\"Warrington\",\"RK9\",4\r\n\"E06000007\",\"Warrington\",\"RWD\",4\r\n\"E06000007\",\"Warrington\",\"RXW\",5\r\n\"E06000007\",\"Warrington\",\"RJ1\",4\r\n\"E06000007\",\"Warrington\",\"RNS\",3\r\n\"E06000007\",\"Warrington\",\"RTR\",3\r\n\"E06000007\",\"Warrington\",\"RAS\",3\r\n\"E06000007\",\"Warrington\",\"RA4\",3\r\n\"E06000007\",\"Warrington\",\"RHQ\",3\r\n\"E06000007\",\"Warrington\",\"RGN\",3\r\n\"E06000007\",\"Warrington\",\"RA9\",3\r\n\"E06000007\",\"Warrington\",\"RFS\",3\r\n\"E06000007\",\"Warrington\",\"RVV\",3\r\n\"E06000007\",\"Warrington\",\"RHW\",2\r\n\"E06000007\",\"Warrington\",\"RDE\",2\r\n\"E06000007\",\"Warrington\",\"RH8\",2\r\n\"E06000007\",\"Warrington\",\"RTH\",2\r\n\"E06000007\",\"Warrington\",\"RWF\",2\r\n\"E06000007\",\"Warrington\",\"RJ6\",2\r\n\"E06000007\",\"Warrington\",\"RW4\",2\r\n\"E06000007\",\"Warrington\",\"RWA\",2\r\n\"E06000007\",\"Warrington\",\"RXA\",2\r\n\"E06000007\",\"Warrington\",\"RM1\",2\r\n\"E06000007\",\"Warrington\",\"RYJ\",2\r\n\"E06000007\",\"Warrington\",\"RD8\",2\r\n\"E06000007\",\"Warrington\",\"RL4\",2\r\n\"E06000007\",\"Warrington\",\"RJC\",2\r\n\"E06000007\",\"Warrington\",\"RVJ\",2\r\n\"E06000007\",\"Warrington\",\"RJZ\",2\r\n\"E06000007\",\"Warrington\",\"R1F\",2\r\n\"E06000007\",\"Warrington\",\"RTF\",2\r\n\"E06000007\",\"Warrington\",\"RTG\",3\r\n\"E06000007\",\"Warrington\",\"RWY\",2\r\n\"E06000007\",\"Warrington\",\"RD1\",1\r\n\"E06000007\",\"Warrington\",\"RP5\",1\r\n\"E06000007\",\"Warrington\",\"RPA\",1\r\n\"E06000007\",\"Warrington\",\"RQW\",1\r\n\"E06000007\",\"Warrington\",\"RHU\",1\r\n\"E06000007\",\"Warrington\",\"RKB\",1\r\n\"E06000007\",\"Warrington\",\"RLY\",1\r\n\"E06000007\",\"Warrington\",\"RN7\",1\r\n\"E06000007\",\"Warrington\",\"RX3\",1\r\n\"E06000007\",\"Warrington\",\"RXE\",1\r\n\"E06000007\",\"Warrington\",\"RYR\",1\r\n\"E06000007\",\"Warrington\",\"RBD\",1\r\n\"E06000007\",\"Warrington\",\"RJ7\",1\r\n\"E06000007\",\"Warrington\",\"RWH\",1\r\n\"E06000007\",\"Warrington\",\"RC1\",1\r\n\"E06000007\",\"Warrington\",\"RFF\",1\r\n\"E06000007\",\"Warrington\",\"RK5\",1\r\n\"E06000007\",\"Warrington\",\"RWG\",1\r\n\"E06000007\",\"Warrington\",\"RXK\",2\r\n\"E06000007\",\"Warrington\",\"RA3\",1\r\n\"E06000007\",\"Warrington\",\"RBK\",1\r\n\"E06000007\",\"Warrington\",\"RCD\",1\r\n\"E06000007\",\"Warrington\",\"RLQ\",1\r\n\"E06000007\",\"Warrington\",\"RX1\",1\r\n\"E06000007\",\"Warrington\",\"RNQ\",1\r\n\"E06000007\",\"Warrington\",\"RXG\",1\r\n\"E06000007\",\"Warrington\",\"RBZ\",1\r\n\"E06000007\",\"Warrington\",\"RDD\",1\r\n\"E06000007\",\"Warrington\",\"RGP\",1\r\n\"E06000007\",\"Warrington\",\"RKE\",1\r\n\"E06000007\",\"Warrington\",\"RTE\",1\r\n\"E06000007\",\"Warrington\",\"RVR\",1\r\n\"E06000007\",\"Warrington\",\"RXQ\",1\r\n\"E06000007\",\"Warrington\",\"RC9\",1\r\n\"E06000007\",\"Warrington\",\"RCF\",1\r\n\"E06000007\",\"Warrington\",\"RF4\",1\r\n\"E06000007\",\"Warrington\",\"RMY\",1\r\n\"E06000007\",\"Warrington\",\"RQX\",1\r\n\"E06000007\",\"Warrington\",\"RW5\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXR\",18496\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXN\",410\r\n\"E06000008\",\"Blackburn with Darwen\",\"R0A\",260\r\n\"E06000008\",\"Blackburn with Darwen\",\"RW5\",226\r\n\"E06000008\",\"Blackburn with Darwen\",\"RMC\",204\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXL\",160\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBV\",39\r\n\"E06000008\",\"Blackburn with Darwen\",\"RW6\",32\r\n\"E06000008\",\"Blackburn with Darwen\",\"RM3\",29\r\n\"E06000008\",\"Blackburn with Darwen\",\"RTX\",20\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBS\",19\r\n\"E06000008\",\"Blackburn with Darwen\",\"RVY\",11\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJE\",9\r\n\"E06000008\",\"Blackburn with Darwen\",\"RRF\",8\r\n\"E06000008\",\"Blackburn with Darwen\",\"RR8\",7\r\n\"E06000008\",\"Blackburn with Darwen\",\"RTH\",7\r\n\"E06000008\",\"Blackburn with Darwen\",\"R1H\",7\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWY\",6\r\n\"E06000008\",\"Blackburn with Darwen\",\"RCB\",6\r\n\"E06000008\",\"Blackburn with Darwen\",\"RDU\",5\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWJ\",5\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBN\",5\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWE\",5\r\n\"E06000008\",\"Blackburn with Darwen\",\"RHW\",5\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBT\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"RK9\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"RQM\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"RCF\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"REM\",8\r\n\"E06000008\",\"Blackburn with Darwen\",\"RA9\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWW\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXF\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"RHQ\",4\r\n\"E06000008\",\"Blackburn with Darwen\",\"RNL\",3\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXQ\",3\r\n\"E06000008\",\"Blackburn with Darwen\",\"REF\",3\r\n\"E06000008\",\"Blackburn with Darwen\",\"RFS\",3\r\n\"E06000008\",\"Blackburn with Darwen\",\"RF4\",3\r\n\"E06000008\",\"Blackburn with Darwen\",\"RRK\",5\r\n\"E06000008\",\"Blackburn with Darwen\",\"RET\",3\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJL\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJR\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RYJ\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RVW\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWK\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RN5\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RRV\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXW\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RNQ\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RPA\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RAE\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RMP\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RQX\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RAS\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWA\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWD\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJ1\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RAX\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RC9\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RCX\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RD8\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RNS\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RTF\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"TAD\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RA7\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RAT\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBZ\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RDD\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RQ3\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RTR\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RVJ\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXP\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJ6\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RQW\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RTV\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBL\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJC\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RVV\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RX3\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXE\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RAP\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBA\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RGR\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RGT\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RHM\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RLQ\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RTE\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RVR\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWF\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RBK\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RL4\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RR7\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWP\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXA\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RD1\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJ7\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RJN\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RM1\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RTG\",2\r\n\"E06000008\",\"Blackburn with Darwen\",\"RWH\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RX1\",1\r\n\"E06000008\",\"Blackburn with Darwen\",\"RXK\",1\r\n\"E06000009\",\"Blackpool\",\"RXL\",18888\r\n\"E06000009\",\"Blackpool\",\"RXN\",588\r\n\"E06000009\",\"Blackpool\",\"RW5\",290\r\n\"E06000009\",\"Blackpool\",\"R0A\",130\r\n\"E06000009\",\"Blackpool\",\"RXR\",48\r\n\"E06000009\",\"Blackpool\",\"RBS\",44\r\n\"E06000009\",\"Blackpool\",\"RTX\",32\r\n\"E06000009\",\"Blackpool\",\"RW6\",22\r\n\"E06000009\",\"Blackpool\",\"RM3\",17\r\n\"E06000009\",\"Blackpool\",\"RAE\",11\r\n\"E06000009\",\"Blackpool\",\"REM\",14\r\n\"E06000009\",\"Blackpool\",\"RMC\",10\r\n\"E06000009\",\"Blackpool\",\"RVY\",13\r\n\"E06000009\",\"Blackpool\",\"RR8\",9\r\n\"E06000009\",\"Blackpool\",\"RNL\",7\r\n\"E06000009\",\"Blackpool\",\"RRF\",7\r\n\"E06000009\",\"Blackpool\",\"RHQ\",7\r\n\"E06000009\",\"Blackpool\",\"RJE\",7\r\n\"E06000009\",\"Blackpool\",\"RBV\",6\r\n\"E06000009\",\"Blackpool\",\"RBN\",6\r\n\"E06000009\",\"Blackpool\",\"RQM\",6\r\n\"E06000009\",\"Blackpool\",\"RWW\",6\r\n\"E06000009\",\"Blackpool\",\"RCB\",6\r\n\"E06000009\",\"Blackpool\",\"RRV\",7\r\n\"E06000009\",\"Blackpool\",\"RWJ\",6\r\n\"E06000009\",\"Blackpool\",\"RJZ\",5\r\n\"E06000009\",\"Blackpool\",\"RBL\",5\r\n\"E06000009\",\"Blackpool\",\"RKB\",5\r\n\"E06000009\",\"Blackpool\",\"RVV\",4\r\n\"E06000009\",\"Blackpool\",\"RXQ\",4\r\n\"E06000009\",\"Blackpool\",\"RBT\",4\r\n\"E06000009\",\"Blackpool\",\"RWP\",4\r\n\"E06000009\",\"Blackpool\",\"RDU\",4\r\n\"E06000009\",\"Blackpool\",\"RXC\",4\r\n\"E06000009\",\"Blackpool\",\"RNS\",4\r\n\"E06000009\",\"Blackpool\",\"RTF\",3\r\n\"E06000009\",\"Blackpool\",\"RVJ\",3\r\n\"E06000009\",\"Blackpool\",\"RWY\",3\r\n\"E06000009\",\"Blackpool\",\"RX1\",3\r\n\"E06000009\",\"Blackpool\",\"RJ2\",3\r\n\"E06000009\",\"Blackpool\",\"RJN\",3\r\n\"E06000009\",\"Blackpool\",\"RXP\",3\r\n\"E06000009\",\"Blackpool\",\"RYJ\",3\r\n\"E06000009\",\"Blackpool\",\"REF\",3\r\n\"E06000009\",\"Blackpool\",\"RJC\",3\r\n\"E06000009\",\"Blackpool\",\"RBZ\",3\r\n\"E06000009\",\"Blackpool\",\"RNZ\",3\r\n\"E06000009\",\"Blackpool\",\"RTP\",3\r\n\"E06000009\",\"Blackpool\",\"RTV\",3\r\n\"E06000009\",\"Blackpool\",\"RXF\",3\r\n\"E06000009\",\"Blackpool\",\"RRK\",4\r\n\"E06000009\",\"Blackpool\",\"RJ7\",2\r\n\"E06000009\",\"Blackpool\",\"RK5\",2\r\n\"E06000009\",\"Blackpool\",\"RMP\",2\r\n\"E06000009\",\"Blackpool\",\"RXH\",2\r\n\"E06000009\",\"Blackpool\",\"RXT\",2\r\n\"E06000009\",\"Blackpool\",\"RTD\",2\r\n\"E06000009\",\"Blackpool\",\"RA9\",2\r\n\"E06000009\",\"Blackpool\",\"RBQ\",2\r\n\"E06000009\",\"Blackpool\",\"RXK\",4\r\n\"E06000009\",\"Blackpool\",\"RWD\",2\r\n\"E06000009\",\"Blackpool\",\"RJL\",2\r\n\"E06000009\",\"Blackpool\",\"RAL\",2\r\n\"E06000009\",\"Blackpool\",\"RN3\",2\r\n\"E06000009\",\"Blackpool\",\"RTH\",2\r\n\"E06000009\",\"Blackpool\",\"RVR\",2\r\n\"E06000009\",\"Blackpool\",\"RAT\",1\r\n\"E06000009\",\"Blackpool\",\"RQX\",1\r\n\"E06000009\",\"Blackpool\",\"RQW\",1\r\n\"E06000009\",\"Blackpool\",\"RTE\",1\r\n\"E06000009\",\"Blackpool\",\"RV3\",1\r\n\"E06000009\",\"Blackpool\",\"RAS\",1\r\n\"E06000009\",\"Blackpool\",\"RGP\",1\r\n\"E06000009\",\"Blackpool\",\"RK9\",1\r\n\"E06000009\",\"Blackpool\",\"RX4\",1\r\n\"E06000009\",\"Blackpool\",\"RXW\",1\r\n\"E06000009\",\"Blackpool\",\"RD3\",1\r\n\"E06000009\",\"Blackpool\",\"RDY\",1\r\n\"E06000009\",\"Blackpool\",\"RDZ\",1\r\n\"E06000009\",\"Blackpool\",\"RFF\",1\r\n\"E06000009\",\"Blackpool\",\"RFS\",1\r\n\"E06000009\",\"Blackpool\",\"RJR\",1\r\n\"E06000009\",\"Blackpool\",\"RL4\",1\r\n\"E06000009\",\"Blackpool\",\"RTR\",2\r\n\"E06000009\",\"Blackpool\",\"RWF\",1\r\n\"E06000009\",\"Blackpool\",\"RA7\",1\r\n\"E06000009\",\"Blackpool\",\"REP\",1\r\n\"E06000009\",\"Blackpool\",\"RLQ\",1\r\n\"E06000009\",\"Blackpool\",\"RNA\",1\r\n\"E06000009\",\"Blackpool\",\"RCF\",1\r\n\"E06000009\",\"Blackpool\",\"RTG\",2\r\n\"E06000009\",\"Blackpool\",\"R1H\",1\r\n\"E06000009\",\"Blackpool\",\"R1K\",1\r\n\"E06000009\",\"Blackpool\",\"RCX\",1\r\n\"E06000009\",\"Blackpool\",\"RMY\",1\r\n\"E06000009\",\"Blackpool\",\"RWA\",1\r\n\"E06000009\",\"Blackpool\",\"RWH\",1\r\n\"E06000009\",\"Blackpool\",\"R0B\",1\r\n\"E06000009\",\"Blackpool\",\"RF4\",1\r\n\"E06000009\",\"Blackpool\",\"RHM\",1\r\n\"E06000009\",\"Blackpool\",\"RHU\",1\r\n\"E06000009\",\"Blackpool\",\"RJ1\",1\r\n\"E06000009\",\"Blackpool\",\"RPC\",1\r\n\"E06000009\",\"Blackpool\",\"RVW\",1\r\n\"E06000009\",\"Blackpool\",\"RXA\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWA\",27857\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RV9\",628\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RR8\",96\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RCB\",68\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJL\",38\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXF\",25\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"R0A\",17\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RTD\",16\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RHQ\",15\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWD\",14\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RP5\",11\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RAE\",9\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RRV\",8\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RHM\",7\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXP\",6\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RTR\",7\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RTG\",6\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RM3\",6\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXL\",6\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RX3\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RCU\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RGT\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RTF\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RNL\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"REM\",7\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWW\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"R1K\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXE\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RFF\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RA9\",5\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RM1\",4\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RRK\",7\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXK\",4\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJ1\",4\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWE\",4\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJE\",4\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RVV\",4\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RX1\",4\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RBT\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"REF\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWP\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RMC\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RW6\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RQM\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWY\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RD8\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RCX\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RQX\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RYJ\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RGD\",3\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJ2\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJZ\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RMP\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RDZ\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RTH\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RVW\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RAS\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RAX\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RBK\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXN\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RBN\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RFS\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RK5\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RVY\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXR\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWG\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RH8\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJC\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJR\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RNZ\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RCD\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RL4\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RPY\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJ7\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RN7\",2\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RDE\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RHW\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RJN\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RA3\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RCF\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RD1\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RGP\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RK9\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RNS\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RT3\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXH\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"R1F\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RH5\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXW\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"R1H\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RBL\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RC1\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RF4\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"R0B\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RPA\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWH\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWJ\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RXG\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RBZ\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RA7\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RLQ\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RWF\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RAP\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RBS\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RN3\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RQ8\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RTX\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RAL\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RAT\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RGN\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RQW\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RW5\",1\r\n\"E06000010\",\"Kingston upon Hull, City of\",\"RYR\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWA\",20765\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RCB\",10087\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJL\",1898\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RP5\",507\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RV9\",386\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RR8\",189\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXF\",127\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RX3\",36\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RHQ\",36\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RAE\",23\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RCU\",22\r\n\"E06000011\",\"East Riding of Yorkshire\",\"R0A\",21\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWD\",20\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RFF\",18\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTR\",19\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTF\",16\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTD\",14\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RCD\",14\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RYJ\",12\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWY\",12\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTG\",11\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RNL\",11\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTH\",11\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXP\",11\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWE\",11\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RGD\",10\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RX1\",9\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXE\",9\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTX\",9\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBV\",8\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RFR\",10\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RCF\",8\r\n\"E06000011\",\"East Riding of Yorkshire\",\"REF\",8\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RAL\",7\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RW6\",7\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJE\",7\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RFS\",7\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RRV\",9\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBN\",6\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RK5\",6\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RM1\",6\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RGP\",6\r\n\"E06000011\",\"East Riding of Yorkshire\",\"R1H\",6\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RM3\",5\r\n\"E06000011\",\"East Riding of Yorkshire\",\"REM\",8\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RDU\",5\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RN5\",5\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RRK\",6\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJ1\",5\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RNZ\",5\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RGN\",5\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXW\",6\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWF\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RC1\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWJ\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWG\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXL\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RNS\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RAX\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RHM\",4\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RAS\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RHW\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RA7\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RVJ\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXQ\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RH8\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWW\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBA\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBK\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXN\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXR\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RVY\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBL\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RDD\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RCX\",3\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RD3\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJR\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RKE\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RMP\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RQW\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RR7\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBT\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"R0B\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBS\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RN3\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RQM\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RA9\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJC\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RRF\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"R1K\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RDE\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RGM\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RK9\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RL4\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RLT\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTE\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RHU\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RNQ\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RGR\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJ7\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJN\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RLQ\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXA\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJ2\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJZ\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWP\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXC\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RF4\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RRJ\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"R1F\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBZ\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RMC\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RBD\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RC9\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RD1\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RD8\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RP7\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RVR\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RVV\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RJ6\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RP1\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RTP\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RXK\",2\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RA3\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RN7\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWH\",1\r\n\"E06000011\",\"East Riding of Yorkshire\",\"RWK\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RJL\",15229\r\n\"E06000012\",\"North East Lincolnshire\",\"RWA\",1013\r\n\"E06000012\",\"North East Lincolnshire\",\"RCU\",105\r\n\"E06000012\",\"North East Lincolnshire\",\"RHQ\",60\r\n\"E06000012\",\"North East Lincolnshire\",\"RR8\",36\r\n\"E06000012\",\"North East Lincolnshire\",\"RWD\",35\r\n\"E06000012\",\"North East Lincolnshire\",\"RP5\",13\r\n\"E06000012\",\"North East Lincolnshire\",\"RXF\",12\r\n\"E06000012\",\"North East Lincolnshire\",\"RCB\",12\r\n\"E06000012\",\"North East Lincolnshire\",\"RJ7\",10\r\n\"E06000012\",\"North East Lincolnshire\",\"RX1\",10\r\n\"E06000012\",\"North East Lincolnshire\",\"RP7\",6\r\n\"E06000012\",\"North East Lincolnshire\",\"RJZ\",6\r\n\"E06000012\",\"North East Lincolnshire\",\"RKB\",5\r\n\"E06000012\",\"North East Lincolnshire\",\"RM1\",5\r\n\"E06000012\",\"North East Lincolnshire\",\"RWE\",5\r\n\"E06000012\",\"North East Lincolnshire\",\"RDU\",5\r\n\"E06000012\",\"North East Lincolnshire\",\"RGN\",5\r\n\"E06000012\",\"North East Lincolnshire\",\"R0A\",5\r\n\"E06000012\",\"North East Lincolnshire\",\"RW6\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RFS\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RTX\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RGT\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RK5\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RTD\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RBA\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"REF\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RXE\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"R1H\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RFF\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RNS\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RDE\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RXP\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"R1K\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"REM\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RQM\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RWY\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RXN\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RRV\",3\r\n\"E06000012\",\"North East Lincolnshire\",\"RTE\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RVV\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RVY\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RXK\",4\r\n\"E06000012\",\"North East Lincolnshire\",\"RYJ\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RM3\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RRF\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RHW\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"R1F\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RD1\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RH8\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RPA\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RV9\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RAL\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RJR\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RA9\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RPY\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RF4\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RTR\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RWW\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RAE\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RCX\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RGP\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RK9\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RN5\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RTG\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RXW\",2\r\n\"E06000012\",\"North East Lincolnshire\",\"RBS\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RL1\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RLQ\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RQ8\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RBD\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RD3\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RJ1\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RL4\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RTP\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RVR\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RBV\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RA7\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RFR\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RHM\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RVJ\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RXQ\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RAX\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RC1\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RGR\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RJE\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RN3\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RWG\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RWJ\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RBL\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RC9\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RMC\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RQX\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RR7\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RT5\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RX3\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RYR\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RBK\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RTF\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RTH\",1\r\n\"E06000012\",\"North East Lincolnshire\",\"RXH\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RJL\",17088\r\n\"E06000013\",\"North Lincolnshire\",\"RWA\",1788\r\n\"E06000013\",\"North Lincolnshire\",\"RP5\",406\r\n\"E06000013\",\"North Lincolnshire\",\"RXE\",260\r\n\"E06000013\",\"North Lincolnshire\",\"RCU\",87\r\n\"E06000013\",\"North Lincolnshire\",\"RHQ\",82\r\n\"E06000013\",\"North Lincolnshire\",\"RR8\",58\r\n\"E06000013\",\"North Lincolnshire\",\"RWD\",57\r\n\"E06000013\",\"North Lincolnshire\",\"RCB\",29\r\n\"E06000013\",\"North Lincolnshire\",\"RXF\",16\r\n\"E06000013\",\"North Lincolnshire\",\"REF\",11\r\n\"E06000013\",\"North Lincolnshire\",\"RWE\",8\r\n\"E06000013\",\"North Lincolnshire\",\"RFR\",11\r\n\"E06000013\",\"North Lincolnshire\",\"RX1\",7\r\n\"E06000013\",\"North Lincolnshire\",\"RTG\",6\r\n\"E06000013\",\"North Lincolnshire\",\"R1H\",5\r\n\"E06000013\",\"North Lincolnshire\",\"RNL\",5\r\n\"E06000013\",\"North Lincolnshire\",\"RKB\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RXN\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RFF\",4\r\n\"E06000013\",\"North Lincolnshire\",\"REM\",7\r\n\"E06000013\",\"North Lincolnshire\",\"RK5\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RA9\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RGN\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RVV\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RHM\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RTR\",4\r\n\"E06000013\",\"North Lincolnshire\",\"RCF\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RJ1\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RAE\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RGP\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RQM\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RGT\",3\r\n\"E06000013\",\"North Lincolnshire\",\"R0A\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RTD\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RV9\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RNS\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RWF\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RFS\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RM3\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RTF\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RD1\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RA7\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RJ2\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RRV\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RT3\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RVW\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RJC\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RN5\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RRK\",3\r\n\"E06000013\",\"North Lincolnshire\",\"RYJ\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RAL\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RCD\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RHW\",2\r\n\"E06000013\",\"North Lincolnshire\",\"R1K\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RXL\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RM1\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RP7\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RXP\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RGM\",2\r\n\"E06000013\",\"North Lincolnshire\",\"RJ7\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RWG\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RAP\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RBK\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RBL\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RJR\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RBA\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RF4\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RJ6\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RQ3\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RC1\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RV3\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RW1\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RBN\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RBQ\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RBZ\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RDU\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RHU\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RJE\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RWY\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RXW\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RA3\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RBT\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RC9\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RH8\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RN3\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RN7\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RXQ\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RCX\",1\r\n\"E06000013\",\"North Lincolnshire\",\"REP\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RWJ\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RWP\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RXK\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RD8\",1\r\n\"E06000013\",\"North Lincolnshire\",\"R0B\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RQ8\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RT5\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RTE\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RVR\",1\r\n\"E06000013\",\"North Lincolnshire\",\"RVY\",1\r\n\"E06000014\",\"York\",\"RCB\",23251\r\n\"E06000014\",\"York\",\"RR8\",342\r\n\"E06000014\",\"York\",\"RX3\",338\r\n\"E06000014\",\"York\",\"RWA\",327\r\n\"E06000014\",\"York\",\"RCD\",44\r\n\"E06000014\",\"York\",\"RXF\",33\r\n\"E06000014\",\"York\",\"RTR\",27\r\n\"E06000014\",\"York\",\"R0A\",18\r\n\"E06000014\",\"York\",\"RAE\",15\r\n\"E06000014\",\"York\",\"RTF\",15\r\n\"E06000014\",\"York\",\"RXP\",14\r\n\"E06000014\",\"York\",\"RHQ\",11\r\n\"E06000014\",\"York\",\"RJL\",10\r\n\"E06000014\",\"York\",\"RJ1\",10\r\n\"E06000014\",\"York\",\"RP5\",10\r\n\"E06000014\",\"York\",\"RWY\",9\r\n\"E06000014\",\"York\",\"RWE\",8\r\n\"E06000014\",\"York\",\"R1H\",8\r\n\"E06000014\",\"York\",\"RTD\",8\r\n\"E06000014\",\"York\",\"RTX\",8\r\n\"E06000014\",\"York\",\"REM\",10\r\n\"E06000014\",\"York\",\"RVW\",7\r\n\"E06000014\",\"York\",\"REF\",7\r\n\"E06000014\",\"York\",\"RGT\",7\r\n\"E06000014\",\"York\",\"RM1\",7\r\n\"E06000014\",\"York\",\"RDE\",6\r\n\"E06000014\",\"York\",\"RRK\",7\r\n\"E06000014\",\"York\",\"RCU\",5\r\n\"E06000014\",\"York\",\"RDU\",5\r\n\"E06000014\",\"York\",\"RFF\",5\r\n\"E06000014\",\"York\",\"RRV\",5\r\n\"E06000014\",\"York\",\"RXQ\",5\r\n\"E06000014\",\"York\",\"RM3\",4\r\n\"E06000014\",\"York\",\"RWD\",4\r\n\"E06000014\",\"York\",\"RCF\",4\r\n\"E06000014\",\"York\",\"RGN\",4\r\n\"E06000014\",\"York\",\"RK5\",4\r\n\"E06000014\",\"York\",\"RJ7\",4\r\n\"E06000014\",\"York\",\"RTG\",5\r\n\"E06000014\",\"York\",\"RWG\",3\r\n\"E06000014\",\"York\",\"RW6\",3\r\n\"E06000014\",\"York\",\"RKB\",3\r\n\"E06000014\",\"York\",\"R0B\",3\r\n\"E06000014\",\"York\",\"RHW\",3\r\n\"E06000014\",\"York\",\"RTH\",3\r\n\"E06000014\",\"York\",\"RXL\",3\r\n\"E06000014\",\"York\",\"RX4\",3\r\n\"E06000014\",\"York\",\"RC9\",3\r\n\"E06000014\",\"York\",\"RH8\",3\r\n\"E06000014\",\"York\",\"RJC\",3\r\n\"E06000014\",\"York\",\"RXC\",3\r\n\"E06000014\",\"York\",\"RLQ\",3\r\n\"E06000014\",\"York\",\"RN3\",3\r\n\"E06000014\",\"York\",\"RNL\",3\r\n\"E06000014\",\"York\",\"RHM\",3\r\n\"E06000014\",\"York\",\"RTE\",3\r\n\"E06000014\",\"York\",\"RWH\",3\r\n\"E06000014\",\"York\",\"RTP\",2\r\n\"E06000014\",\"York\",\"RBA\",2\r\n\"E06000014\",\"York\",\"RD8\",2\r\n\"E06000014\",\"York\",\"RQ8\",2\r\n\"E06000014\",\"York\",\"RQM\",2\r\n\"E06000014\",\"York\",\"RXR\",2\r\n\"E06000014\",\"York\",\"RAL\",2\r\n\"E06000014\",\"York\",\"RWJ\",2\r\n\"E06000014\",\"York\",\"RA7\",2\r\n\"E06000014\",\"York\",\"RBV\",2\r\n\"E06000014\",\"York\",\"RVR\",2\r\n\"E06000014\",\"York\",\"RWW\",2\r\n\"E06000014\",\"York\",\"RQW\",2\r\n\"E06000014\",\"York\",\"R1K\",2\r\n\"E06000014\",\"York\",\"RBN\",2\r\n\"E06000014\",\"York\",\"RGD\",2\r\n\"E06000014\",\"York\",\"RJ2\",3\r\n\"E06000014\",\"York\",\"RJN\",2\r\n\"E06000014\",\"York\",\"RX1\",2\r\n\"E06000014\",\"York\",\"RJE\",1\r\n\"E06000014\",\"York\",\"RRF\",1\r\n\"E06000014\",\"York\",\"RTK\",1\r\n\"E06000014\",\"York\",\"RW5\",1\r\n\"E06000014\",\"York\",\"RA3\",1\r\n\"E06000014\",\"York\",\"RBD\",1\r\n\"E06000014\",\"York\",\"RC1\",1\r\n\"E06000014\",\"York\",\"RFS\",1\r\n\"E06000014\",\"York\",\"RJ6\",1\r\n\"E06000014\",\"York\",\"RMP\",1\r\n\"E06000014\",\"York\",\"RWF\",1\r\n\"E06000014\",\"York\",\"RNS\",1\r\n\"E06000014\",\"York\",\"RXA\",1\r\n\"E06000014\",\"York\",\"RA2\",1\r\n\"E06000014\",\"York\",\"RAX\",1\r\n\"E06000014\",\"York\",\"RBK\",1\r\n\"E06000014\",\"York\",\"RHU\",1\r\n\"E06000014\",\"York\",\"RNZ\",1\r\n\"E06000014\",\"York\",\"RXW\",1\r\n\"E06000014\",\"York\",\"RWP\",1\r\n\"E06000014\",\"York\",\"RYR\",1\r\n\"E06000014\",\"York\",\"RA4\",1\r\n\"E06000014\",\"York\",\"RAS\",1\r\n\"E06000014\",\"York\",\"RD1\",1\r\n\"E06000014\",\"York\",\"RGP\",1\r\n\"E06000014\",\"York\",\"RL4\",1\r\n\"E06000014\",\"York\",\"RLT\",1\r\n\"E06000014\",\"York\",\"RNA\",1\r\n\"E06000014\",\"York\",\"RP6\",1\r\n\"E06000014\",\"York\",\"RD3\",1\r\n\"E06000014\",\"York\",\"RDY\",1\r\n\"E06000014\",\"York\",\"RQ3\",1\r\n\"E06000014\",\"York\",\"RYJ\",1\r\n\"E06000015\",\"Derby\",\"RTG\",25295\r\n\"E06000015\",\"Derby\",\"RX1\",501\r\n\"E06000015\",\"Derby\",\"RXM\",399\r\n\"E06000015\",\"Derby\",\"RWE\",56\r\n\"E06000015\",\"Derby\",\"RWD\",24\r\n\"E06000015\",\"Derby\",\"RFS\",23\r\n\"E06000015\",\"Derby\",\"RGT\",21\r\n\"E06000015\",\"Derby\",\"RRK\",32\r\n\"E06000015\",\"Derby\",\"R0A\",16\r\n\"E06000015\",\"Derby\",\"RHQ\",15\r\n\"E06000015\",\"Derby\",\"R1H\",12\r\n\"E06000015\",\"Derby\",\"RJC\",11\r\n\"E06000015\",\"Derby\",\"RCU\",11\r\n\"E06000015\",\"Derby\",\"RKB\",11\r\n\"E06000015\",\"Derby\",\"RK5\",11\r\n\"E06000015\",\"Derby\",\"RBK\",10\r\n\"E06000015\",\"Derby\",\"RJE\",10\r\n\"E06000015\",\"Derby\",\"RNQ\",9\r\n\"E06000015\",\"Derby\",\"RA9\",8\r\n\"E06000015\",\"Derby\",\"RR8\",8\r\n\"E06000015\",\"Derby\",\"RXK\",13\r\n\"E06000015\",\"Derby\",\"REF\",7\r\n\"E06000015\",\"Derby\",\"RAX\",7\r\n\"E06000015\",\"Derby\",\"RRV\",7\r\n\"E06000015\",\"Derby\",\"RCB\",7\r\n\"E06000015\",\"Derby\",\"RTH\",7\r\n\"E06000015\",\"Derby\",\"RC9\",7\r\n\"E06000015\",\"Derby\",\"RWA\",6\r\n\"E06000015\",\"Derby\",\"RCD\",6\r\n\"E06000015\",\"Derby\",\"RD8\",6\r\n\"E06000015\",\"Derby\",\"RBT\",5\r\n\"E06000015\",\"Derby\",\"RP5\",7\r\n\"E06000015\",\"Derby\",\"RWJ\",5\r\n\"E06000015\",\"Derby\",\"RXH\",5\r\n\"E06000015\",\"Derby\",\"RTR\",6\r\n\"E06000015\",\"Derby\",\"RH8\",5\r\n\"E06000015\",\"Derby\",\"RBD\",5\r\n\"E06000015\",\"Derby\",\"RAE\",4\r\n\"E06000015\",\"Derby\",\"RQM\",4\r\n\"E06000015\",\"Derby\",\"RBL\",4\r\n\"E06000015\",\"Derby\",\"RBV\",4\r\n\"E06000015\",\"Derby\",\"RBN\",4\r\n\"E06000015\",\"Derby\",\"RHA\",4\r\n\"E06000015\",\"Derby\",\"RW6\",4\r\n\"E06000015\",\"Derby\",\"RJ1\",4\r\n\"E06000015\",\"Derby\",\"RDE\",4\r\n\"E06000015\",\"Derby\",\"RGP\",4\r\n\"E06000015\",\"Derby\",\"RJL\",4\r\n\"E06000015\",\"Derby\",\"RN7\",4\r\n\"E06000015\",\"Derby\",\"RJ7\",4\r\n\"E06000015\",\"Derby\",\"RQ3\",4\r\n\"E06000015\",\"Derby\",\"RVJ\",3\r\n\"E06000015\",\"Derby\",\"RC1\",3\r\n\"E06000015\",\"Derby\",\"RMP\",3\r\n\"E06000015\",\"Derby\",\"RN3\",3\r\n\"E06000015\",\"Derby\",\"RYJ\",3\r\n\"E06000015\",\"Derby\",\"RL4\",3\r\n\"E06000015\",\"Derby\",\"RT5\",3\r\n\"E06000015\",\"Derby\",\"RTE\",3\r\n\"E06000015\",\"Derby\",\"RTX\",3\r\n\"E06000015\",\"Derby\",\"RWG\",3\r\n\"E06000015\",\"Derby\",\"RGN\",3\r\n\"E06000015\",\"Derby\",\"RAL\",3\r\n\"E06000015\",\"Derby\",\"RTF\",3\r\n\"E06000015\",\"Derby\",\"RXW\",4\r\n\"E06000015\",\"Derby\",\"RDU\",3\r\n\"E06000015\",\"Derby\",\"RHU\",3\r\n\"E06000015\",\"Derby\",\"RNS\",3\r\n\"E06000015\",\"Derby\",\"RNA\",3\r\n\"E06000015\",\"Derby\",\"RWH\",3\r\n\"E06000015\",\"Derby\",\"RWP\",3\r\n\"E06000015\",\"Derby\",\"RFF\",2\r\n\"E06000015\",\"Derby\",\"RFR\",3\r\n\"E06000015\",\"Derby\",\"RJN\",2\r\n\"E06000015\",\"Derby\",\"RK9\",2\r\n\"E06000015\",\"Derby\",\"RNL\",2\r\n\"E06000015\",\"Derby\",\"RXL\",2\r\n\"E06000015\",\"Derby\",\"REM\",3\r\n\"E06000015\",\"Derby\",\"RJ2\",4\r\n\"E06000015\",\"Derby\",\"RN5\",2\r\n\"E06000015\",\"Derby\",\"RBA\",2\r\n\"E06000015\",\"Derby\",\"RF4\",2\r\n\"E06000015\",\"Derby\",\"RLT\",2\r\n\"E06000015\",\"Derby\",\"RQX\",2\r\n\"E06000015\",\"Derby\",\"RVW\",2\r\n\"E06000015\",\"Derby\",\"RXP\",2\r\n\"E06000015\",\"Derby\",\"RQW\",2\r\n\"E06000015\",\"Derby\",\"RVY\",2\r\n\"E06000015\",\"Derby\",\"RAS\",2\r\n\"E06000015\",\"Derby\",\"RCF\",2\r\n\"E06000015\",\"Derby\",\"RJZ\",2\r\n\"E06000015\",\"Derby\",\"RLQ\",2\r\n\"E06000015\",\"Derby\",\"RYR\",2\r\n\"E06000015\",\"Derby\",\"TAJ\",2\r\n\"E06000015\",\"Derby\",\"R1K\",2\r\n\"E06000015\",\"Derby\",\"RM1\",2\r\n\"E06000015\",\"Derby\",\"RTK\",2\r\n\"E06000015\",\"Derby\",\"RVV\",2\r\n\"E06000015\",\"Derby\",\"RD3\",1\r\n\"E06000015\",\"Derby\",\"RHW\",1\r\n\"E06000015\",\"Derby\",\"RMC\",1\r\n\"E06000015\",\"Derby\",\"RRF\",1\r\n\"E06000015\",\"Derby\",\"RA3\",1\r\n\"E06000015\",\"Derby\",\"RWK\",1\r\n\"E06000015\",\"Derby\",\"R1F\",1\r\n\"E06000015\",\"Derby\",\"RGR\",1\r\n\"E06000015\",\"Derby\",\"RP4\",1\r\n\"E06000015\",\"Derby\",\"RR7\",1\r\n\"E06000015\",\"Derby\",\"RVR\",1\r\n\"E06000015\",\"Derby\",\"RXN\",1\r\n\"E06000015\",\"Derby\",\"RY8\",1\r\n\"E06000015\",\"Derby\",\"RCX\",1\r\n\"E06000015\",\"Derby\",\"RWW\",1\r\n\"E06000015\",\"Derby\",\"RJ6\",1\r\n\"E06000015\",\"Derby\",\"RTP\",1\r\n\"E06000015\",\"Derby\",\"RXR\",1\r\n\"E06000015\",\"Derby\",\"RA4\",1\r\n\"E06000015\",\"Derby\",\"RA7\",1\r\n\"E06000015\",\"Derby\",\"RBQ\",1\r\n\"E06000015\",\"Derby\",\"RD1\",1\r\n\"E06000015\",\"Derby\",\"RDZ\",1\r\n\"E06000015\",\"Derby\",\"RP7\",1\r\n\"E06000015\",\"Derby\",\"RXC\",1\r\n\"E06000015\",\"Derby\",\"RXF\",1\r\n\"E06000016\",\"Leicester\",\"RWE\",38178\r\n\"E06000016\",\"Leicester\",\"RT5\",1582\r\n\"E06000016\",\"Leicester\",\"RX1\",215\r\n\"E06000016\",\"Leicester\",\"RKB\",72\r\n\"E06000016\",\"Leicester\",\"RTG\",42\r\n\"E06000016\",\"Leicester\",\"RWD\",41\r\n\"E06000016\",\"Leicester\",\"RNQ\",36\r\n\"E06000016\",\"Leicester\",\"RRK\",49\r\n\"E06000016\",\"Leicester\",\"R1H\",23\r\n\"E06000016\",\"Leicester\",\"RQM\",20\r\n\"E06000016\",\"Leicester\",\"R1K\",20\r\n\"E06000016\",\"Leicester\",\"RLT\",19\r\n\"E06000016\",\"Leicester\",\"RAL\",18\r\n\"E06000016\",\"Leicester\",\"RJC\",17\r\n\"E06000016\",\"Leicester\",\"RTH\",14\r\n\"E06000016\",\"Leicester\",\"RDU\",14\r\n\"E06000016\",\"Leicester\",\"RHQ\",13\r\n\"E06000016\",\"Leicester\",\"RGN\",12\r\n\"E06000016\",\"Leicester\",\"RNS\",12\r\n\"E06000016\",\"Leicester\",\"RQ3\",11\r\n\"E06000016\",\"Leicester\",\"RYJ\",10\r\n\"E06000016\",\"Leicester\",\"RD8\",9\r\n\"E06000016\",\"Leicester\",\"RAE\",9\r\n\"E06000016\",\"Leicester\",\"RAS\",9\r\n\"E06000016\",\"Leicester\",\"RC9\",9\r\n\"E06000016\",\"Leicester\",\"RJ7\",9\r\n\"E06000016\",\"Leicester\",\"RRV\",8\r\n\"E06000016\",\"Leicester\",\"RGT\",8\r\n\"E06000016\",\"Leicester\",\"RJZ\",8\r\n\"E06000016\",\"Leicester\",\"RHM\",8\r\n\"E06000016\",\"Leicester\",\"RWH\",8\r\n\"E06000016\",\"Leicester\",\"RXF\",8\r\n\"E06000016\",\"Leicester\",\"RJE\",7\r\n\"E06000016\",\"Leicester\",\"RCX\",7\r\n\"E06000016\",\"Leicester\",\"RGP\",7\r\n\"E06000016\",\"Leicester\",\"R0A\",7\r\n\"E06000016\",\"Leicester\",\"REF\",7\r\n\"E06000016\",\"Leicester\",\"RHW\",7\r\n\"E06000016\",\"Leicester\",\"RCB\",7\r\n\"E06000016\",\"Leicester\",\"RF4\",7\r\n\"E06000016\",\"Leicester\",\"RXK\",15\r\n\"E06000016\",\"Leicester\",\"RP6\",7\r\n\"E06000016\",\"Leicester\",\"RJ2\",8\r\n\"E06000016\",\"Leicester\",\"RC1\",6\r\n\"E06000016\",\"Leicester\",\"RMC\",6\r\n\"E06000016\",\"Leicester\",\"RTE\",6\r\n\"E06000016\",\"Leicester\",\"RBK\",6\r\n\"E06000016\",\"Leicester\",\"RAP\",6\r\n\"E06000016\",\"Leicester\",\"RXL\",6\r\n\"E06000016\",\"Leicester\",\"RJ1\",6\r\n\"E06000016\",\"Leicester\",\"RFS\",5\r\n\"E06000016\",\"Leicester\",\"RR8\",5\r\n\"E06000016\",\"Leicester\",\"RM3\",5\r\n\"E06000016\",\"Leicester\",\"RVJ\",5\r\n\"E06000016\",\"Leicester\",\"RL4\",5\r\n\"E06000016\",\"Leicester\",\"RW6\",5\r\n\"E06000016\",\"Leicester\",\"RXH\",5\r\n\"E06000016\",\"Leicester\",\"RM1\",5\r\n\"E06000016\",\"Leicester\",\"RWA\",5\r\n\"E06000016\",\"Leicester\",\"RXQ\",5\r\n\"E06000016\",\"Leicester\",\"RTP\",5\r\n\"E06000016\",\"Leicester\",\"RA2\",5\r\n\"E06000016\",\"Leicester\",\"RQX\",4\r\n\"E06000016\",\"Leicester\",\"RXW\",4\r\n\"E06000016\",\"Leicester\",\"RT3\",4\r\n\"E06000016\",\"Leicester\",\"RA7\",3\r\n\"E06000016\",\"Leicester\",\"RK5\",3\r\n\"E06000016\",\"Leicester\",\"REM\",3\r\n\"E06000016\",\"Leicester\",\"RTX\",3\r\n\"E06000016\",\"Leicester\",\"RVV\",3\r\n\"E06000016\",\"Leicester\",\"RVW\",3\r\n\"E06000016\",\"Leicester\",\"RXP\",3\r\n\"E06000016\",\"Leicester\",\"RWW\",3\r\n\"E06000016\",\"Leicester\",\"RDE\",3\r\n\"E06000016\",\"Leicester\",\"RH8\",3\r\n\"E06000016\",\"Leicester\",\"RWY\",3\r\n\"E06000016\",\"Leicester\",\"R1F\",3\r\n\"E06000016\",\"Leicester\",\"RJL\",3\r\n\"E06000016\",\"Leicester\",\"RWG\",3\r\n\"E06000016\",\"Leicester\",\"RXN\",3\r\n\"E06000016\",\"Leicester\",\"RVR\",3\r\n\"E06000016\",\"Leicester\",\"RBA\",2\r\n\"E06000016\",\"Leicester\",\"RCF\",2\r\n\"E06000016\",\"Leicester\",\"RD3\",2\r\n\"E06000016\",\"Leicester\",\"RD1\",2\r\n\"E06000016\",\"Leicester\",\"RQW\",2\r\n\"E06000016\",\"Leicester\",\"RW1\",2\r\n\"E06000016\",\"Leicester\",\"RAX\",2\r\n\"E06000016\",\"Leicester\",\"R0B\",3\r\n\"E06000016\",\"Leicester\",\"RP5\",4\r\n\"E06000016\",\"Leicester\",\"RTR\",2\r\n\"E06000016\",\"Leicester\",\"RYR\",2\r\n\"E06000016\",\"Leicester\",\"RFR\",3\r\n\"E06000016\",\"Leicester\",\"RHA\",2\r\n\"E06000016\",\"Leicester\",\"RJ6\",2\r\n\"E06000016\",\"Leicester\",\"RP7\",2\r\n\"E06000016\",\"Leicester\",\"RQ8\",2\r\n\"E06000016\",\"Leicester\",\"RA4\",2\r\n\"E06000016\",\"Leicester\",\"RN7\",2\r\n\"E06000016\",\"Leicester\",\"RDZ\",2\r\n\"E06000016\",\"Leicester\",\"RGM\",2\r\n\"E06000016\",\"Leicester\",\"RNA\",2\r\n\"E06000016\",\"Leicester\",\"RA9\",2\r\n\"E06000016\",\"Leicester\",\"RTK\",2\r\n\"E06000016\",\"Leicester\",\"RGR\",1\r\n\"E06000016\",\"Leicester\",\"RNL\",1\r\n\"E06000016\",\"Leicester\",\"RR7\",1\r\n\"E06000016\",\"Leicester\",\"RV3\",1\r\n\"E06000016\",\"Leicester\",\"RXR\",1\r\n\"E06000016\",\"Leicester\",\"RA3\",1\r\n\"E06000016\",\"Leicester\",\"RBS\",1\r\n\"E06000016\",\"Leicester\",\"RWJ\",1\r\n\"E06000016\",\"Leicester\",\"RBZ\",1\r\n\"E06000016\",\"Leicester\",\"RKE\",1\r\n\"E06000016\",\"Leicester\",\"RLQ\",1\r\n\"E06000016\",\"Leicester\",\"RN5\",1\r\n\"E06000016\",\"Leicester\",\"RJR\",1\r\n\"E06000016\",\"Leicester\",\"RP4\",1\r\n\"E06000016\",\"Leicester\",\"RTD\",1\r\n\"E06000016\",\"Leicester\",\"RWK\",1\r\n\"E06000016\",\"Leicester\",\"RXM\",1\r\n\"E06000016\",\"Leicester\",\"RYG\",1\r\n\"E06000016\",\"Leicester\",\"RAN\",1\r\n\"E06000016\",\"Leicester\",\"RBL\",1\r\n\"E06000016\",\"Leicester\",\"RMP\",1\r\n\"E06000016\",\"Leicester\",\"RWP\",1\r\n\"E06000016\",\"Leicester\",\"RXE\",1\r\n\"E06000016\",\"Leicester\",\"RBQ\",1\r\n\"E06000016\",\"Leicester\",\"RTF\",1\r\n\"E06000016\",\"Leicester\",\"RN3\",1\r\n\"E06000016\",\"Leicester\",\"RNZ\",1\r\n\"E06000016\",\"Leicester\",\"RPA\",1\r\n\"E06000016\",\"Leicester\",\"RVY\",1\r\n\"E06000016\",\"Leicester\",\"RXC\",1\r\n\"E06000016\",\"Leicester\",\"RXT\",1\r\n\"E06000017\",\"Rutland\",\"RGN\",2068\r\n\"E06000017\",\"Rutland\",\"RWE\",852\r\n\"E06000017\",\"Rutland\",\"RNQ\",180\r\n\"E06000017\",\"Rutland\",\"RT5\",135\r\n\"E06000017\",\"Rutland\",\"RX1\",30\r\n\"E06000017\",\"Rutland\",\"RGT\",30\r\n\"E06000017\",\"Rutland\",\"RWD\",13\r\n\"E06000017\",\"Rutland\",\"RNS\",12\r\n\"E06000017\",\"Rutland\",\"RKB\",8\r\n\"E06000017\",\"Rutland\",\"RJL\",4\r\n\"E06000017\",\"Rutland\",\"RTG\",4\r\n\"E06000017\",\"Rutland\",\"RGP\",3\r\n\"E06000017\",\"Rutland\",\"RRK\",4\r\n\"E06000017\",\"Rutland\",\"RTH\",3\r\n\"E06000017\",\"Rutland\",\"RD1\",3\r\n\"E06000017\",\"Rutland\",\"RYJ\",3\r\n\"E06000017\",\"Rutland\",\"RGM\",3\r\n\"E06000017\",\"Rutland\",\"RK5\",3\r\n\"E06000017\",\"Rutland\",\"RP7\",3\r\n\"E06000017\",\"Rutland\",\"RQW\",3\r\n\"E06000017\",\"Rutland\",\"RYR\",3\r\n\"E06000017\",\"Rutland\",\"RNZ\",3\r\n\"E06000017\",\"Rutland\",\"RGR\",3\r\n\"E06000017\",\"Rutland\",\"RAL\",3\r\n\"E06000017\",\"Rutland\",\"RM1\",3\r\n\"E06000017\",\"Rutland\",\"RQM\",3\r\n\"E06000017\",\"Rutland\",\"RXL\",2\r\n\"E06000017\",\"Rutland\",\"RHM\",2\r\n\"E06000017\",\"Rutland\",\"RTE\",2\r\n\"E06000017\",\"Rutland\",\"RXP\",2\r\n\"E06000017\",\"Rutland\",\"R1H\",2\r\n\"E06000017\",\"Rutland\",\"RHW\",2\r\n\"E06000017\",\"Rutland\",\"RN5\",2\r\n\"E06000017\",\"Rutland\",\"RA2\",2\r\n\"E06000017\",\"Rutland\",\"RCX\",2\r\n\"E06000017\",\"Rutland\",\"RDZ\",2\r\n\"E06000017\",\"Rutland\",\"RRV\",2\r\n\"E06000017\",\"Rutland\",\"RTF\",2\r\n\"E06000017\",\"Rutland\",\"RC1\",2\r\n\"E06000017\",\"Rutland\",\"RCD\",2\r\n\"E06000017\",\"Rutland\",\"REF\",2\r\n\"E06000017\",\"Rutland\",\"RJ1\",2\r\n\"E06000017\",\"Rutland\",\"RTX\",2\r\n\"E06000017\",\"Rutland\",\"RWA\",2\r\n\"E06000017\",\"Rutland\",\"RXC\",2\r\n\"E06000017\",\"Rutland\",\"RXW\",2\r\n\"E06000017\",\"Rutland\",\"R0A\",2\r\n\"E06000017\",\"Rutland\",\"RP1\",2\r\n\"E06000017\",\"Rutland\",\"RD3\",1\r\n\"E06000017\",\"Rutland\",\"RDU\",1\r\n\"E06000017\",\"Rutland\",\"RP5\",1\r\n\"E06000017\",\"Rutland\",\"RQ3\",1\r\n\"E06000017\",\"Rutland\",\"RWH\",1\r\n\"E06000017\",\"Rutland\",\"RAS\",1\r\n\"E06000017\",\"Rutland\",\"RBD\",1\r\n\"E06000017\",\"Rutland\",\"RCU\",1\r\n\"E06000017\",\"Rutland\",\"RQ8\",1\r\n\"E06000017\",\"Rutland\",\"RTR\",1\r\n\"E06000017\",\"Rutland\",\"RBA\",1\r\n\"E06000017\",\"Rutland\",\"RBN\",1\r\n\"E06000017\",\"Rutland\",\"RT3\",1\r\n\"E06000017\",\"Rutland\",\"RD8\",1\r\n\"E06000017\",\"Rutland\",\"RDE\",1\r\n\"E06000017\",\"Rutland\",\"RF4\",1\r\n\"E06000017\",\"Rutland\",\"RHQ\",1\r\n\"E06000017\",\"Rutland\",\"RJZ\",1\r\n\"E06000017\",\"Rutland\",\"RNL\",1\r\n\"E06000017\",\"Rutland\",\"REM\",1\r\n\"E06000017\",\"Rutland\",\"RVR\",1\r\n\"E06000017\",\"Rutland\",\"RJ2\",1\r\n\"E06000017\",\"Rutland\",\"RJ7\",1\r\n\"E06000017\",\"Rutland\",\"RL4\",1\r\n\"E06000017\",\"Rutland\",\"RP6\",1\r\n\"E06000017\",\"Rutland\",\"RRJ\",1\r\n\"E06000017\",\"Rutland\",\"R1K\",1\r\n\"E06000017\",\"Rutland\",\"RC9\",1\r\n\"E06000017\",\"Rutland\",\"RCB\",1\r\n\"E06000017\",\"Rutland\",\"RHU\",1\r\n\"E06000017\",\"Rutland\",\"RRF\",1\r\n\"E06000017\",\"Rutland\",\"RWG\",1\r\n\"E06000017\",\"Rutland\",\"RYV\",1\r\n\"E06000018\",\"Nottingham\",\"RX1\",32217\r\n\"E06000018\",\"Nottingham\",\"RHA\",326\r\n\"E06000018\",\"Nottingham\",\"RK5\",126\r\n\"E06000018\",\"Nottingham\",\"RTG\",100\r\n\"E06000018\",\"Nottingham\",\"RWD\",55\r\n\"E06000018\",\"Nottingham\",\"RWE\",54\r\n\"E06000018\",\"Nottingham\",\"RGT\",20\r\n\"E06000018\",\"Nottingham\",\"R1H\",19\r\n\"E06000018\",\"Nottingham\",\"RHQ\",18\r\n\"E06000018\",\"Nottingham\",\"RRK\",25\r\n\"E06000018\",\"Nottingham\",\"RP5\",21\r\n\"E06000018\",\"Nottingham\",\"RJ7\",13\r\n\"E06000018\",\"Nottingham\",\"RR8\",13\r\n\"E06000018\",\"Nottingham\",\"RKB\",12\r\n\"E06000018\",\"Nottingham\",\"RXK\",15\r\n\"E06000018\",\"Nottingham\",\"RTH\",12\r\n\"E06000018\",\"Nottingham\",\"RJ2\",15\r\n\"E06000018\",\"Nottingham\",\"RAL\",11\r\n\"E06000018\",\"Nottingham\",\"RJ1\",11\r\n\"E06000018\",\"Nottingham\",\"RGN\",11\r\n\"E06000018\",\"Nottingham\",\"RFS\",10\r\n\"E06000018\",\"Nottingham\",\"RWA\",10\r\n\"E06000018\",\"Nottingham\",\"RD8\",9\r\n\"E06000018\",\"Nottingham\",\"RJL\",9\r\n\"E06000018\",\"Nottingham\",\"RVJ\",9\r\n\"E06000018\",\"Nottingham\",\"R1K\",9\r\n\"E06000018\",\"Nottingham\",\"RM1\",9\r\n\"E06000018\",\"Nottingham\",\"RGP\",8\r\n\"E06000018\",\"Nottingham\",\"REF\",8\r\n\"E06000018\",\"Nottingham\",\"RCB\",8\r\n\"E06000018\",\"Nottingham\",\"RDU\",7\r\n\"E06000018\",\"Nottingham\",\"R0A\",7\r\n\"E06000018\",\"Nottingham\",\"RQM\",7\r\n\"E06000018\",\"Nottingham\",\"RWH\",7\r\n\"E06000018\",\"Nottingham\",\"RBK\",7\r\n\"E06000018\",\"Nottingham\",\"RAE\",6\r\n\"E06000018\",\"Nottingham\",\"RYJ\",6\r\n\"E06000018\",\"Nottingham\",\"RA9\",6\r\n\"E06000018\",\"Nottingham\",\"RHM\",6\r\n\"E06000018\",\"Nottingham\",\"RL4\",6\r\n\"E06000018\",\"Nottingham\",\"RF4\",5\r\n\"E06000018\",\"Nottingham\",\"RCU\",5\r\n\"E06000018\",\"Nottingham\",\"RXQ\",5\r\n\"E06000018\",\"Nottingham\",\"RWG\",5\r\n\"E06000018\",\"Nottingham\",\"RLT\",5\r\n\"E06000018\",\"Nottingham\",\"RQX\",5\r\n\"E06000018\",\"Nottingham\",\"RDE\",4\r\n\"E06000018\",\"Nottingham\",\"RC1\",4\r\n\"E06000018\",\"Nottingham\",\"RJC\",4\r\n\"E06000018\",\"Nottingham\",\"RJE\",4\r\n\"E06000018\",\"Nottingham\",\"RT5\",4\r\n\"E06000018\",\"Nottingham\",\"RH8\",4\r\n\"E06000018\",\"Nottingham\",\"RHU\",4\r\n\"E06000018\",\"Nottingham\",\"RXP\",4\r\n\"E06000018\",\"Nottingham\",\"RC9\",4\r\n\"E06000018\",\"Nottingham\",\"RNQ\",4\r\n\"E06000018\",\"Nottingham\",\"RA2\",4\r\n\"E06000018\",\"Nottingham\",\"RA7\",4\r\n\"E06000018\",\"Nottingham\",\"RQ3\",5\r\n\"E06000018\",\"Nottingham\",\"RRV\",4\r\n\"E06000018\",\"Nottingham\",\"RFR\",3\r\n\"E06000018\",\"Nottingham\",\"RJ6\",3\r\n\"E06000018\",\"Nottingham\",\"REM\",4\r\n\"E06000018\",\"Nottingham\",\"RQW\",3\r\n\"E06000018\",\"Nottingham\",\"RHW\",3\r\n\"E06000018\",\"Nottingham\",\"RTP\",3\r\n\"E06000018\",\"Nottingham\",\"RAP\",3\r\n\"E06000018\",\"Nottingham\",\"RBD\",3\r\n\"E06000018\",\"Nottingham\",\"RDZ\",3\r\n\"E06000018\",\"Nottingham\",\"RXF\",3\r\n\"E06000018\",\"Nottingham\",\"RXC\",3\r\n\"E06000018\",\"Nottingham\",\"RCF\",3\r\n\"E06000018\",\"Nottingham\",\"RTD\",3\r\n\"E06000018\",\"Nottingham\",\"RXH\",3\r\n\"E06000018\",\"Nottingham\",\"RBZ\",3\r\n\"E06000018\",\"Nottingham\",\"RMP\",3\r\n\"E06000018\",\"Nottingham\",\"RQ8\",3\r\n\"E06000018\",\"Nottingham\",\"RTR\",4\r\n\"E06000018\",\"Nottingham\",\"RTX\",3\r\n\"E06000018\",\"Nottingham\",\"RWF\",3\r\n\"E06000018\",\"Nottingham\",\"RGR\",2\r\n\"E06000018\",\"Nottingham\",\"RVV\",2\r\n\"E06000018\",\"Nottingham\",\"RW5\",2\r\n\"E06000018\",\"Nottingham\",\"RW6\",2\r\n\"E06000018\",\"Nottingham\",\"RXN\",2\r\n\"E06000018\",\"Nottingham\",\"RTE\",2\r\n\"E06000018\",\"Nottingham\",\"RAS\",2\r\n\"E06000018\",\"Nottingham\",\"RGM\",2\r\n\"E06000018\",\"Nottingham\",\"RNA\",2\r\n\"E06000018\",\"Nottingham\",\"RVW\",2\r\n\"E06000018\",\"Nottingham\",\"RCX\",2\r\n\"E06000018\",\"Nottingham\",\"RDD\",2\r\n\"E06000018\",\"Nottingham\",\"RWJ\",2\r\n\"E06000018\",\"Nottingham\",\"RXL\",2\r\n\"E06000018\",\"Nottingham\",\"RAX\",2\r\n\"E06000018\",\"Nottingham\",\"RNZ\",2\r\n\"E06000018\",\"Nottingham\",\"RTK\",2\r\n\"E06000018\",\"Nottingham\",\"RWP\",2\r\n\"E06000018\",\"Nottingham\",\"R1F\",2\r\n\"E06000018\",\"Nottingham\",\"RFF\",2\r\n\"E06000018\",\"Nottingham\",\"RD1\",2\r\n\"E06000018\",\"Nottingham\",\"RM3\",2\r\n\"E06000018\",\"Nottingham\",\"RN5\",2\r\n\"E06000018\",\"Nottingham\",\"RD3\",1\r\n\"E06000018\",\"Nottingham\",\"R0B\",1\r\n\"E06000018\",\"Nottingham\",\"RMC\",1\r\n\"E06000018\",\"Nottingham\",\"RP4\",1\r\n\"E06000018\",\"Nottingham\",\"RVR\",1\r\n\"E06000018\",\"Nottingham\",\"RXE\",1\r\n\"E06000018\",\"Nottingham\",\"RCD\",1\r\n\"E06000018\",\"Nottingham\",\"RN3\",1\r\n\"E06000018\",\"Nottingham\",\"RXW\",2\r\n\"E06000018\",\"Nottingham\",\"RNS\",1\r\n\"E06000018\",\"Nottingham\",\"RXT\",1\r\n\"E06000018\",\"Nottingham\",\"RYR\",1\r\n\"E06000018\",\"Nottingham\",\"RBV\",1\r\n\"E06000018\",\"Nottingham\",\"RK9\",1\r\n\"E06000018\",\"Nottingham\",\"RNL\",1\r\n\"E06000018\",\"Nottingham\",\"RVY\",1\r\n\"E06000018\",\"Nottingham\",\"RBA\",1\r\n\"E06000018\",\"Nottingham\",\"RP6\",1\r\n\"E06000018\",\"Nottingham\",\"RXR\",1\r\n\"E06000018\",\"Nottingham\",\"RBL\",1\r\n\"E06000018\",\"Nottingham\",\"RBN\",1\r\n\"E06000018\",\"Nottingham\",\"RJZ\",1\r\n\"E06000018\",\"Nottingham\",\"RXM\",1\r\n\"E06000018\",\"Nottingham\",\"RWK\",1\r\n\"E06000018\",\"Nottingham\",\"RWY\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RLQ\",17010\r\n\"E06000019\",\"Herefordshire, County of\",\"RWP\",718\r\n\"E06000019\",\"Herefordshire, County of\",\"RTE\",439\r\n\"E06000019\",\"Herefordshire, County of\",\"RTQ\",282\r\n\"E06000019\",\"Herefordshire, County of\",\"RRK\",265\r\n\"E06000019\",\"Herefordshire, County of\",\"RVJ\",56\r\n\"E06000019\",\"Herefordshire, County of\",\"RQ3\",61\r\n\"E06000019\",\"Herefordshire, County of\",\"RXW\",46\r\n\"E06000019\",\"Herefordshire, County of\",\"RA7\",30\r\n\"E06000019\",\"Herefordshire, County of\",\"REF\",17\r\n\"E06000019\",\"Herefordshire, County of\",\"RTH\",13\r\n\"E06000019\",\"Herefordshire, County of\",\"RJE\",12\r\n\"E06000019\",\"Herefordshire, County of\",\"RKB\",12\r\n\"E06000019\",\"Herefordshire, County of\",\"RL1\",11\r\n\"E06000019\",\"Herefordshire, County of\",\"RA9\",10\r\n\"E06000019\",\"Herefordshire, County of\",\"RH8\",10\r\n\"E06000019\",\"Herefordshire, County of\",\"RD1\",9\r\n\"E06000019\",\"Herefordshire, County of\",\"RRV\",10\r\n\"E06000019\",\"Herefordshire, County of\",\"RJC\",7\r\n\"E06000019\",\"Herefordshire, County of\",\"RJ7\",7\r\n\"E06000019\",\"Herefordshire, County of\",\"RXK\",14\r\n\"E06000019\",\"Herefordshire, County of\",\"RBA\",7\r\n\"E06000019\",\"Herefordshire, County of\",\"RDU\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RYJ\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RA3\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RL4\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RCB\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RNA\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RQM\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RBT\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"RN3\",6\r\n\"E06000019\",\"Herefordshire, County of\",\"R1A\",5\r\n\"E06000019\",\"Herefordshire, County of\",\"RX1\",5\r\n\"E06000019\",\"Herefordshire, County of\",\"RBZ\",4\r\n\"E06000019\",\"Herefordshire, County of\",\"RHW\",4\r\n\"E06000019\",\"Herefordshire, County of\",\"RA2\",4\r\n\"E06000019\",\"Herefordshire, County of\",\"RDE\",4\r\n\"E06000019\",\"Herefordshire, County of\",\"RBD\",4\r\n\"E06000019\",\"Herefordshire, County of\",\"RPY\",4\r\n\"E06000019\",\"Herefordshire, County of\",\"RGR\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RWW\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RHM\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RNQ\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RRJ\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"R1K\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RK9\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"R1H\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RJZ\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RTG\",4\r\n\"E06000019\",\"Herefordshire, County of\",\"R0A\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RXC\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RYR\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RA4\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RWF\",3\r\n\"E06000019\",\"Herefordshire, County of\",\"RAX\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RJ8\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RRE\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RTR\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RTP\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RDZ\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RGT\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RKE\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RCF\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RVR\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RVV\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RXH\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RAL\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RAP\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RNZ\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RHU\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RWE\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RFS\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RXQ\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RD3\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"REM\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RP1\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RP6\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RBV\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RPA\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RR7\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"R1J\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RAE\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RJN\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RN5\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RP5\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RWD\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RC1\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RJ1\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RJ2\",2\r\n\"E06000019\",\"Herefordshire, County of\",\"RJL\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RQW\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RR8\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RWG\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RWJ\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RBL\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RD8\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RFF\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RHQ\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RNS\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RVN\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RWH\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RXR\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RM1\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RNL\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RTF\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RW6\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RXT\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"R1D\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RJ6\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RLT\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RQX\",1\r\n\"E06000019\",\"Herefordshire, County of\",\"RT3\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RXW\",20507\r\n\"E06000020\",\"Telford and Wrekin\",\"RRE\",244\r\n\"E06000020\",\"Telford and Wrekin\",\"RJE\",242\r\n\"E06000020\",\"Telford and Wrekin\",\"RL4\",159\r\n\"E06000020\",\"Telford and Wrekin\",\"R1D\",98\r\n\"E06000020\",\"Telford and Wrekin\",\"RRK\",106\r\n\"E06000020\",\"Telford and Wrekin\",\"RQ3\",51\r\n\"E06000020\",\"Telford and Wrekin\",\"RBS\",22\r\n\"E06000020\",\"Telford and Wrekin\",\"RL1\",18\r\n\"E06000020\",\"Telford and Wrekin\",\"RBK\",17\r\n\"E06000020\",\"Telford and Wrekin\",\"RNA\",14\r\n\"E06000020\",\"Telford and Wrekin\",\"RWP\",11\r\n\"E06000020\",\"Telford and Wrekin\",\"RXK\",19\r\n\"E06000020\",\"Telford and Wrekin\",\"RX1\",11\r\n\"E06000020\",\"Telford and Wrekin\",\"REF\",10\r\n\"E06000020\",\"Telford and Wrekin\",\"RLQ\",8\r\n\"E06000020\",\"Telford and Wrekin\",\"RJR\",8\r\n\"E06000020\",\"Telford and Wrekin\",\"R0A\",7\r\n\"E06000020\",\"Telford and Wrekin\",\"RH8\",6\r\n\"E06000020\",\"Telford and Wrekin\",\"RBT\",6\r\n\"E06000020\",\"Telford and Wrekin\",\"RKB\",6\r\n\"E06000020\",\"Telford and Wrekin\",\"RWD\",5\r\n\"E06000020\",\"Telford and Wrekin\",\"RA9\",5\r\n\"E06000020\",\"Telford and Wrekin\",\"RLY\",5\r\n\"E06000020\",\"Telford and Wrekin\",\"RWE\",5\r\n\"E06000020\",\"Telford and Wrekin\",\"RBL\",4\r\n\"E06000020\",\"Telford and Wrekin\",\"RHM\",4\r\n\"E06000020\",\"Telford and Wrekin\",\"RNL\",4\r\n\"E06000020\",\"Telford and Wrekin\",\"RXF\",4\r\n\"E06000020\",\"Telford and Wrekin\",\"RXP\",4\r\n\"E06000020\",\"Telford and Wrekin\",\"RYJ\",4\r\n\"E06000020\",\"Telford and Wrekin\",\"RVV\",4\r\n\"E06000020\",\"Telford and Wrekin\",\"REM\",5\r\n\"E06000020\",\"Telford and Wrekin\",\"RBA\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RTX\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RXH\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"TAJ\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RHU\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RTF\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RTG\",5\r\n\"E06000020\",\"Telford and Wrekin\",\"R1H\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RAJ\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RVJ\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RBZ\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RDU\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RN5\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RD8\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RR8\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RTD\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RTH\",3\r\n\"E06000020\",\"Telford and Wrekin\",\"RCF\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RQM\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RFS\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RVY\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RXL\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RCB\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RGT\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RVW\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RJZ\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RWG\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RDZ\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RJC\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RWA\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RWF\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RAS\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RBD\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RM1\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RM3\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RNS\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RTE\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RXN\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RBV\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RCX\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RXQ\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RFR\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RN3\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RT3\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RAX\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RCU\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RDD\",2\r\n\"E06000020\",\"Telford and Wrekin\",\"RK9\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RQX\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RHW\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RWW\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RA7\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RCD\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RJ1\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RRV\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"R1K\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RDE\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RQW\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RRF\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RAL\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RGR\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RJ6\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RJN\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RK5\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RBN\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RET\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RQ8\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RYR\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RA3\",1\r\n\"E06000020\",\"Telford and Wrekin\",\"RJ7\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJE\",43043\r\n\"E06000021\",\"Stoke-on-Trent\",\"RLY\",714\r\n\"E06000021\",\"Stoke-on-Trent\",\"RRE\",283\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBT\",92\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBS\",64\r\n\"E06000021\",\"Stoke-on-Trent\",\"RRK\",57\r\n\"E06000021\",\"Stoke-on-Trent\",\"RQ3\",39\r\n\"E06000021\",\"Stoke-on-Trent\",\"R0A\",29\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTG\",27\r\n\"E06000021\",\"Stoke-on-Trent\",\"RKB\",15\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJN\",15\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXL\",13\r\n\"E06000021\",\"Stoke-on-Trent\",\"RL4\",13\r\n\"E06000021\",\"Stoke-on-Trent\",\"REF\",12\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXW\",19\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBV\",12\r\n\"E06000021\",\"Stoke-on-Trent\",\"RHQ\",12\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWJ\",11\r\n\"E06000021\",\"Stoke-on-Trent\",\"RW6\",8\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJR\",8\r\n\"E06000021\",\"Stoke-on-Trent\",\"RM3\",8\r\n\"E06000021\",\"Stoke-on-Trent\",\"RX1\",8\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWE\",7\r\n\"E06000021\",\"Stoke-on-Trent\",\"RC9\",7\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTH\",6\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWD\",6\r\n\"E06000021\",\"Stoke-on-Trent\",\"R1H\",6\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXK\",16\r\n\"E06000021\",\"Stoke-on-Trent\",\"RK5\",5\r\n\"E06000021\",\"Stoke-on-Trent\",\"RLQ\",5\r\n\"E06000021\",\"Stoke-on-Trent\",\"REM\",6\r\n\"E06000021\",\"Stoke-on-Trent\",\"RQM\",5\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXC\",5\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJC\",5\r\n\"E06000021\",\"Stoke-on-Trent\",\"RA9\",5\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWW\",5\r\n\"E06000021\",\"Stoke-on-Trent\",\"RRV\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBA\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RCB\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RD1\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RGM\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBN\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RGN\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXN\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RAE\",4\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBZ\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RVR\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWP\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXQ\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"REP\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTF\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXT\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBK\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RLT\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RN3\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RR8\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RAX\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJ1\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTR\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RYJ\",3\r\n\"E06000021\",\"Stoke-on-Trent\",\"RGR\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RVN\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RNL\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RNS\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RVV\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBL\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RCX\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RDE\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTX\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RVY\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RA7\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RD3\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RF4\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RGP\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RKE\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RN7\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXA\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBQ\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RDU\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RDZ\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RXF\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RAL\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJL\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RK9\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RMP\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RNA\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RH8\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RNQ\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTE\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTV\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWG\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RP5\",2\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTP\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"R1K\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RA3\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RCU\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RM1\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RMC\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RT3\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWH\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RAS\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RGT\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RTD\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RYR\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"TAJ\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RAJ\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RD8\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RHU\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWK\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RCF\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RDD\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RFS\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJ7\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RQ8\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RVJ\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"R1A\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"R0B\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RHW\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJ2\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RJZ\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RN5\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RQW\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RWA\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RBD\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RFR\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RQX\",1\r\n\"E06000021\",\"Stoke-on-Trent\",\"RR7\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RD1\",16208\r\n\"E06000022\",\"Bath and North East Somerset\",\"RA7\",1018\r\n\"E06000022\",\"Bath and North East Somerset\",\"RVJ\",545\r\n\"E06000022\",\"Bath and North East Somerset\",\"RVN\",116\r\n\"E06000022\",\"Bath and North East Somerset\",\"RBA\",26\r\n\"E06000022\",\"Bath and North East Somerset\",\"REF\",21\r\n\"E06000022\",\"Bath and North East Somerset\",\"RYJ\",21\r\n\"E06000022\",\"Bath and North East Somerset\",\"RNZ\",21\r\n\"E06000022\",\"Bath and North East Somerset\",\"RA3\",21\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTE\",20\r\n\"E06000022\",\"Bath and North East Somerset\",\"NQT\",22\r\n\"E06000022\",\"Bath and North East Somerset\",\"RN3\",16\r\n\"E06000022\",\"Bath and North East Somerset\",\"RA4\",15\r\n\"E06000022\",\"Bath and North East Somerset\",\"RH8\",15\r\n\"E06000022\",\"Bath and North East Somerset\",\"RBD\",13\r\n\"E06000022\",\"Bath and North East Somerset\",\"RA9\",13\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTH\",9\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJ1\",9\r\n\"E06000022\",\"Bath and North East Somerset\",\"RBZ\",8\r\n\"E06000022\",\"Bath and North East Somerset\",\"R0A\",8\r\n\"E06000022\",\"Bath and North East Somerset\",\"RQM\",7\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJC\",7\r\n\"E06000022\",\"Bath and North East Somerset\",\"RHW\",7\r\n\"E06000022\",\"Bath and North East Somerset\",\"RK9\",7\r\n\"E06000022\",\"Bath and North East Somerset\",\"RRK\",13\r\n\"E06000022\",\"Bath and North East Somerset\",\"RDZ\",7\r\n\"E06000022\",\"Bath and North East Somerset\",\"RDU\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"RNU\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"RD3\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"RHM\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJ7\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"RH5\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"RN5\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"R1H\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"RAX\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJZ\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"RAL\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"REM\",5\r\n\"E06000022\",\"Bath and North East Somerset\",\"RT3\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"RVR\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTP\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"RXQ\",4\r\n\"E06000022\",\"Bath and North East Somerset\",\"RNL\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RXL\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"R1K\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RA2\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RWH\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RGN\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RHU\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RYR\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTX\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RP4\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTK\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RKB\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RXP\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RCD\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RLQ\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RWP\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RXW\",3\r\n\"E06000022\",\"Bath and North East Somerset\",\"RRV\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RD8\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RDY\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RGT\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RAP\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJ2\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RPY\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RQX\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RAS\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RQW\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RRE\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RWW\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RBK\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RC1\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RGP\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RXH\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RBL\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RBT\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"R0B\",2\r\n\"E06000022\",\"Bath and North East Somerset\",\"RP6\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTG\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RWG\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RWY\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RX1\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RYV\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJN\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RM1\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RP5\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RWD\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RXN\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RC9\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RDE\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJE\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RJR\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RNS\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RQ8\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RVY\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RWK\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RXK\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RL4\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RLT\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RQ3\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTD\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RTF\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RAJ\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RCB\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RNA\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RR8\",1\r\n\"E06000022\",\"Bath and North East Somerset\",\"RVV\",1\r\n\"E06000023\",\"Bristol, City of\",\"RA7\",27633\r\n\"E06000023\",\"Bristol, City of\",\"RVJ\",21182\r\n\"E06000023\",\"Bristol, City of\",\"RVN\",344\r\n\"E06000023\",\"Bristol, City of\",\"RD1\",223\r\n\"E06000023\",\"Bristol, City of\",\"RA3\",78\r\n\"E06000023\",\"Bristol, City of\",\"RTE\",62\r\n\"E06000023\",\"Bristol, City of\",\"RBA\",62\r\n\"E06000023\",\"Bristol, City of\",\"REF\",52\r\n\"E06000023\",\"Bristol, City of\",\"RA9\",35\r\n\"E06000023\",\"Bristol, City of\",\"RTH\",34\r\n\"E06000023\",\"Bristol, City of\",\"RH8\",32\r\n\"E06000023\",\"Bristol, City of\",\"RN3\",30\r\n\"E06000023\",\"Bristol, City of\",\"RA4\",29\r\n\"E06000023\",\"Bristol, City of\",\"R1H\",28\r\n\"E06000023\",\"Bristol, City of\",\"RK9\",26\r\n\"E06000023\",\"Bristol, City of\",\"RBZ\",23\r\n\"E06000023\",\"Bristol, City of\",\"RBD\",21\r\n\"E06000023\",\"Bristol, City of\",\"RJ7\",19\r\n\"E06000023\",\"Bristol, City of\",\"RYJ\",16\r\n\"E06000023\",\"Bristol, City of\",\"RQM\",16\r\n\"E06000023\",\"Bristol, City of\",\"RHW\",14\r\n\"E06000023\",\"Bristol, City of\",\"RJ1\",13\r\n\"E06000023\",\"Bristol, City of\",\"RT3\",12\r\n\"E06000023\",\"Bristol, City of\",\"RRK\",17\r\n\"E06000023\",\"Bristol, City of\",\"RD3\",12\r\n\"E06000023\",\"Bristol, City of\",\"RRV\",12\r\n\"E06000023\",\"Bristol, City of\",\"RDU\",11\r\n\"E06000023\",\"Bristol, City of\",\"RNZ\",10\r\n\"E06000023\",\"Bristol, City of\",\"R1K\",9\r\n\"E06000023\",\"Bristol, City of\",\"RHU\",9\r\n\"E06000023\",\"Bristol, City of\",\"RGT\",9\r\n\"E06000023\",\"Bristol, City of\",\"RLQ\",9\r\n\"E06000023\",\"Bristol, City of\",\"R0A\",9\r\n\"E06000023\",\"Bristol, City of\",\"RTP\",9\r\n\"E06000023\",\"Bristol, City of\",\"RDZ\",9\r\n\"E06000023\",\"Bristol, City of\",\"RJC\",9\r\n\"E06000023\",\"Bristol, City of\",\"RJZ\",8\r\n\"E06000023\",\"Bristol, City of\",\"RX1\",8\r\n\"E06000023\",\"Bristol, City of\",\"RVV\",7\r\n\"E06000023\",\"Bristol, City of\",\"RWH\",7\r\n\"E06000023\",\"Bristol, City of\",\"RHM\",7\r\n\"E06000023\",\"Bristol, City of\",\"RXQ\",7\r\n\"E06000023\",\"Bristol, City of\",\"RKB\",7\r\n\"E06000023\",\"Bristol, City of\",\"RN5\",7\r\n\"E06000023\",\"Bristol, City of\",\"RAL\",7\r\n\"E06000023\",\"Bristol, City of\",\"REM\",9\r\n\"E06000023\",\"Bristol, City of\",\"RWP\",6\r\n\"E06000023\",\"Bristol, City of\",\"RJ2\",9\r\n\"E06000023\",\"Bristol, City of\",\"RYR\",6\r\n\"E06000023\",\"Bristol, City of\",\"RAX\",6\r\n\"E06000023\",\"Bristol, City of\",\"RTX\",6\r\n\"E06000023\",\"Bristol, City of\",\"RXL\",5\r\n\"E06000023\",\"Bristol, City of\",\"RDE\",5\r\n\"E06000023\",\"Bristol, City of\",\"RWE\",5\r\n\"E06000023\",\"Bristol, City of\",\"RXK\",6\r\n\"E06000023\",\"Bristol, City of\",\"RD8\",5\r\n\"E06000023\",\"Bristol, City of\",\"RHQ\",5\r\n\"E06000023\",\"Bristol, City of\",\"RA2\",5\r\n\"E06000023\",\"Bristol, City of\",\"RCD\",5\r\n\"E06000023\",\"Bristol, City of\",\"RWG\",5\r\n\"E06000023\",\"Bristol, City of\",\"RJE\",5\r\n\"E06000023\",\"Bristol, City of\",\"RM1\",5\r\n\"E06000023\",\"Bristol, City of\",\"RTG\",6\r\n\"E06000023\",\"Bristol, City of\",\"RAP\",4\r\n\"E06000023\",\"Bristol, City of\",\"RBL\",4\r\n\"E06000023\",\"Bristol, City of\",\"RXR\",5\r\n\"E06000023\",\"Bristol, City of\",\"RQ8\",4\r\n\"E06000023\",\"Bristol, City of\",\"RQX\",4\r\n\"E06000023\",\"Bristol, City of\",\"RAS\",4\r\n\"E06000023\",\"Bristol, City of\",\"RQW\",4\r\n\"E06000023\",\"Bristol, City of\",\"RGN\",3\r\n\"E06000023\",\"Bristol, City of\",\"RAE\",3\r\n\"E06000023\",\"Bristol, City of\",\"RKE\",3\r\n\"E06000023\",\"Bristol, City of\",\"RC9\",3\r\n\"E06000023\",\"Bristol, City of\",\"RCF\",3\r\n\"E06000023\",\"Bristol, City of\",\"RW6\",3\r\n\"E06000023\",\"Bristol, City of\",\"R1F\",3\r\n\"E06000023\",\"Bristol, City of\",\"RBT\",3\r\n\"E06000023\",\"Bristol, City of\",\"RXH\",3\r\n\"E06000023\",\"Bristol, City of\",\"RNL\",3\r\n\"E06000023\",\"Bristol, City of\",\"RVR\",3\r\n\"E06000023\",\"Bristol, City of\",\"RXW\",3\r\n\"E06000023\",\"Bristol, City of\",\"RBK\",3\r\n\"E06000023\",\"Bristol, City of\",\"RTF\",3\r\n\"E06000023\",\"Bristol, City of\",\"RCB\",2\r\n\"E06000023\",\"Bristol, City of\",\"RFS\",2\r\n\"E06000023\",\"Bristol, City of\",\"RH5\",2\r\n\"E06000023\",\"Bristol, City of\",\"RJ6\",2\r\n\"E06000023\",\"Bristol, City of\",\"RP6\",2\r\n\"E06000023\",\"Bristol, City of\",\"RWX\",2\r\n\"E06000023\",\"Bristol, City of\",\"RDD\",2\r\n\"E06000023\",\"Bristol, City of\",\"RW5\",2\r\n\"E06000023\",\"Bristol, City of\",\"RWD\",2\r\n\"E06000023\",\"Bristol, City of\",\"RWF\",2\r\n\"E06000023\",\"Bristol, City of\",\"RF4\",2\r\n\"E06000023\",\"Bristol, City of\",\"RNA\",2\r\n\"E06000023\",\"Bristol, City of\",\"RNU\",2\r\n\"E06000023\",\"Bristol, City of\",\"RTQ\",2\r\n\"E06000023\",\"Bristol, City of\",\"RXC\",2\r\n\"E06000023\",\"Bristol, City of\",\"RGP\",2\r\n\"E06000023\",\"Bristol, City of\",\"RCX\",2\r\n\"E06000023\",\"Bristol, City of\",\"R0B\",4\r\n\"E06000023\",\"Bristol, City of\",\"RK5\",2\r\n\"E06000023\",\"Bristol, City of\",\"RM3\",2\r\n\"E06000023\",\"Bristol, City of\",\"RTK\",2\r\n\"E06000023\",\"Bristol, City of\",\"RVY\",2\r\n\"E06000023\",\"Bristol, City of\",\"RWA\",2\r\n\"E06000023\",\"Bristol, City of\",\"RXF\",2\r\n\"E06000023\",\"Bristol, City of\",\"RXN\",2\r\n\"E06000023\",\"Bristol, City of\",\"RBS\",1\r\n\"E06000023\",\"Bristol, City of\",\"RC1\",1\r\n\"E06000023\",\"Bristol, City of\",\"RL4\",1\r\n\"E06000023\",\"Bristol, City of\",\"RTD\",1\r\n\"E06000023\",\"Bristol, City of\",\"RGR\",1\r\n\"E06000023\",\"Bristol, City of\",\"RNQ\",1\r\n\"E06000023\",\"Bristol, City of\",\"RR8\",1\r\n\"E06000023\",\"Bristol, City of\",\"RDY\",1\r\n\"E06000023\",\"Bristol, City of\",\"RPA\",1\r\n\"E06000023\",\"Bristol, City of\",\"RW4\",1\r\n\"E06000023\",\"Bristol, City of\",\"RJR\",1\r\n\"E06000023\",\"Bristol, City of\",\"RXP\",1\r\n\"E06000023\",\"Bristol, City of\",\"RN7\",1\r\n\"E06000023\",\"Bristol, City of\",\"RNS\",1\r\n\"E06000023\",\"Bristol, City of\",\"RP5\",1\r\n\"E06000023\",\"Bristol, City of\",\"RTR\",1\r\n\"E06000023\",\"Bristol, City of\",\"RWJ\",1\r\n\"E06000023\",\"Bristol, City of\",\"RBN\",1\r\n\"E06000023\",\"Bristol, City of\",\"R1A\",1\r\n\"E06000023\",\"Bristol, City of\",\"RJL\",1\r\n\"E06000023\",\"Bristol, City of\",\"RJN\",1\r\n\"E06000023\",\"Bristol, City of\",\"RR7\",1\r\n\"E06000023\",\"Bristol, City of\",\"RWK\",1\r\n\"E06000023\",\"Bristol, City of\",\"RPC\",1\r\n\"E06000023\",\"Bristol, City of\",\"RQ3\",1\r\n\"E06000023\",\"Bristol, City of\",\"RW1\",1\r\n\"E06000024\",\"North Somerset\",\"RA3\",11057\r\n\"E06000024\",\"North Somerset\",\"RA7\",7296\r\n\"E06000024\",\"North Somerset\",\"RVJ\",5219\r\n\"E06000024\",\"North Somerset\",\"RBA\",265\r\n\"E06000024\",\"North Somerset\",\"RVN\",185\r\n\"E06000024\",\"North Somerset\",\"RD1\",94\r\n\"E06000024\",\"North Somerset\",\"RTE\",28\r\n\"E06000024\",\"North Somerset\",\"REF\",28\r\n\"E06000024\",\"North Somerset\",\"RA4\",22\r\n\"E06000024\",\"North Somerset\",\"RK9\",19\r\n\"E06000024\",\"North Somerset\",\"RH8\",19\r\n\"E06000024\",\"North Somerset\",\"RBZ\",12\r\n\"E06000024\",\"North Somerset\",\"RYJ\",12\r\n\"E06000024\",\"North Somerset\",\"RDU\",10\r\n\"E06000024\",\"North Somerset\",\"RN3\",10\r\n\"E06000024\",\"North Somerset\",\"RA9\",9\r\n\"E06000024\",\"North Somerset\",\"RBD\",7\r\n\"E06000024\",\"North Somerset\",\"RTH\",6\r\n\"E06000024\",\"North Somerset\",\"RD3\",6\r\n\"E06000024\",\"North Somerset\",\"RJ1\",6\r\n\"E06000024\",\"North Somerset\",\"RWE\",6\r\n\"E06000024\",\"North Somerset\",\"RWH\",6\r\n\"E06000024\",\"North Somerset\",\"RAL\",6\r\n\"E06000024\",\"North Somerset\",\"RLQ\",5\r\n\"E06000024\",\"North Somerset\",\"RJE\",5\r\n\"E06000024\",\"North Somerset\",\"RQM\",5\r\n\"E06000024\",\"North Somerset\",\"RGT\",5\r\n\"E06000024\",\"North Somerset\",\"RAS\",5\r\n\"E06000024\",\"North Somerset\",\"RNZ\",5\r\n\"E06000024\",\"North Somerset\",\"RCB\",4\r\n\"E06000024\",\"North Somerset\",\"RR8\",4\r\n\"E06000024\",\"North Somerset\",\"RHU\",4\r\n\"E06000024\",\"North Somerset\",\"RHM\",4\r\n\"E06000024\",\"North Somerset\",\"RRK\",7\r\n\"E06000024\",\"North Somerset\",\"RTG\",5\r\n\"E06000024\",\"North Somerset\",\"RXC\",4\r\n\"E06000024\",\"North Somerset\",\"R1H\",4\r\n\"E06000024\",\"North Somerset\",\"RCX\",3\r\n\"E06000024\",\"North Somerset\",\"RBN\",3\r\n\"E06000024\",\"North Somerset\",\"RD8\",3\r\n\"E06000024\",\"North Somerset\",\"RH5\",3\r\n\"E06000024\",\"North Somerset\",\"RWF\",3\r\n\"E06000024\",\"North Somerset\",\"RJZ\",3\r\n\"E06000024\",\"North Somerset\",\"R1F\",3\r\n\"E06000024\",\"North Somerset\",\"RFS\",2\r\n\"E06000024\",\"North Somerset\",\"REM\",4\r\n\"E06000024\",\"North Somerset\",\"RT3\",2\r\n\"E06000024\",\"North Somerset\",\"RDZ\",2\r\n\"E06000024\",\"North Somerset\",\"RNQ\",2\r\n\"E06000024\",\"North Somerset\",\"RTX\",2\r\n\"E06000024\",\"North Somerset\",\"RTK\",2\r\n\"E06000024\",\"North Somerset\",\"RTP\",2\r\n\"E06000024\",\"North Somerset\",\"R1K\",2\r\n\"E06000024\",\"North Somerset\",\"RKB\",2\r\n\"E06000024\",\"North Somerset\",\"RN5\",2\r\n\"E06000024\",\"North Somerset\",\"RNS\",2\r\n\"E06000024\",\"North Somerset\",\"RXQ\",2\r\n\"E06000024\",\"North Somerset\",\"RHW\",2\r\n\"E06000024\",\"North Somerset\",\"RNA\",2\r\n\"E06000024\",\"North Somerset\",\"RJC\",2\r\n\"E06000024\",\"North Somerset\",\"RM1\",2\r\n\"E06000024\",\"North Somerset\",\"RQ3\",2\r\n\"E06000024\",\"North Somerset\",\"RWY\",2\r\n\"E06000024\",\"North Somerset\",\"RVV\",2\r\n\"E06000024\",\"North Somerset\",\"RXP\",2\r\n\"E06000024\",\"North Somerset\",\"RMC\",1\r\n\"E06000024\",\"North Somerset\",\"RXW\",2\r\n\"E06000024\",\"North Somerset\",\"R1A\",1\r\n\"E06000024\",\"North Somerset\",\"RQW\",1\r\n\"E06000024\",\"North Somerset\",\"RAX\",1\r\n\"E06000024\",\"North Somerset\",\"RBK\",1\r\n\"E06000024\",\"North Somerset\",\"RPY\",1\r\n\"E06000024\",\"North Somerset\",\"RTF\",1\r\n\"E06000024\",\"North Somerset\",\"RJ8\",1\r\n\"E06000024\",\"North Somerset\",\"RXL\",1\r\n\"E06000024\",\"North Somerset\",\"RAE\",1\r\n\"E06000024\",\"North Somerset\",\"RBL\",1\r\n\"E06000024\",\"North Somerset\",\"R0B\",1\r\n\"E06000024\",\"North Somerset\",\"RGN\",1\r\n\"E06000024\",\"North Somerset\",\"RN7\",1\r\n\"E06000024\",\"North Somerset\",\"RPC\",1\r\n\"E06000024\",\"North Somerset\",\"RVW\",1\r\n\"E06000024\",\"North Somerset\",\"RXH\",1\r\n\"E06000024\",\"North Somerset\",\"RBT\",1\r\n\"E06000024\",\"North Somerset\",\"RDD\",1\r\n\"E06000024\",\"North Somerset\",\"RJ2\",1\r\n\"E06000024\",\"North Somerset\",\"NQT\",1\r\n\"E06000024\",\"North Somerset\",\"RDY\",1\r\n\"E06000024\",\"North Somerset\",\"RFR\",1\r\n\"E06000024\",\"North Somerset\",\"RGP\",1\r\n\"E06000024\",\"North Somerset\",\"RNL\",1\r\n\"E06000024\",\"North Somerset\",\"RQ8\",1\r\n\"E06000024\",\"North Somerset\",\"RWG\",1\r\n\"E06000024\",\"North Somerset\",\"RWP\",1\r\n\"E06000024\",\"North Somerset\",\"TAJ\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RVJ\",24137\r\n\"E06000025\",\"South Gloucestershire\",\"RA7\",5073\r\n\"E06000025\",\"South Gloucestershire\",\"RD1\",1574\r\n\"E06000025\",\"South Gloucestershire\",\"RTE\",225\r\n\"E06000025\",\"South Gloucestershire\",\"RVN\",101\r\n\"E06000025\",\"South Gloucestershire\",\"REF\",39\r\n\"E06000025\",\"South Gloucestershire\",\"RA3\",31\r\n\"E06000025\",\"South Gloucestershire\",\"RBA\",26\r\n\"E06000025\",\"South Gloucestershire\",\"RN3\",26\r\n\"E06000025\",\"South Gloucestershire\",\"RTH\",23\r\n\"E06000025\",\"South Gloucestershire\",\"RH8\",22\r\n\"E06000025\",\"South Gloucestershire\",\"RA9\",20\r\n\"E06000025\",\"South Gloucestershire\",\"RBZ\",20\r\n\"E06000025\",\"South Gloucestershire\",\"NLX\",12\r\n\"E06000025\",\"South Gloucestershire\",\"RBD\",11\r\n\"E06000025\",\"South Gloucestershire\",\"RD3\",10\r\n\"E06000025\",\"South Gloucestershire\",\"RNZ\",9\r\n\"E06000025\",\"South Gloucestershire\",\"RK9\",9\r\n\"E06000025\",\"South Gloucestershire\",\"RA4\",9\r\n\"E06000025\",\"South Gloucestershire\",\"RRK\",14\r\n\"E06000025\",\"South Gloucestershire\",\"RJZ\",7\r\n\"E06000025\",\"South Gloucestershire\",\"RQM\",7\r\n\"E06000025\",\"South Gloucestershire\",\"RWP\",7\r\n\"E06000025\",\"South Gloucestershire\",\"RAX\",6\r\n\"E06000025\",\"South Gloucestershire\",\"R1H\",5\r\n\"E06000025\",\"South Gloucestershire\",\"RJ1\",5\r\n\"E06000025\",\"South Gloucestershire\",\"RHU\",5\r\n\"E06000025\",\"South Gloucestershire\",\"RLQ\",5\r\n\"E06000025\",\"South Gloucestershire\",\"RHW\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RN5\",4\r\n\"E06000025\",\"South Gloucestershire\",\"R1F\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RXK\",4\r\n\"E06000025\",\"South Gloucestershire\",\"R0B\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RVR\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RTX\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RHM\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RRV\",5\r\n\"E06000025\",\"South Gloucestershire\",\"RJC\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RYJ\",4\r\n\"E06000025\",\"South Gloucestershire\",\"RM3\",3\r\n\"E06000025\",\"South Gloucestershire\",\"R0A\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RBL\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RT3\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RXH\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RXQ\",3\r\n\"E06000025\",\"South Gloucestershire\",\"R1K\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RGT\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RKB\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RD8\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RNA\",3\r\n\"E06000025\",\"South Gloucestershire\",\"REM\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RYR\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RAS\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RDE\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RNL\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RTD\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RX1\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RWG\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RDD\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RGP\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RTG\",3\r\n\"E06000025\",\"South Gloucestershire\",\"RAE\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RXL\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RH5\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RXP\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RA2\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RDU\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RN7\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RDZ\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RTK\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RTP\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RXC\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RBT\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RXW\",2\r\n\"E06000025\",\"South Gloucestershire\",\"R1J\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RCB\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RGN\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RQW\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RRF\",2\r\n\"E06000025\",\"South Gloucestershire\",\"RCX\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RDY\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RF4\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RMY\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RNU\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RVW\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RWJ\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RWX\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RAL\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RCF\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RJ6\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RL4\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RQ3\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RWA\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RC1\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RJ2\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RMC\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RQ8\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RJR\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RTF\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RVV\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RJE\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RWD\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RXR\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RPY\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RWF\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RNS\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RPA\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RR8\",1\r\n\"E06000025\",\"South Gloucestershire\",\"RWH\",1\r\n\"E06000026\",\"Plymouth\",\"RK9\",28512\r\n\"E06000026\",\"Plymouth\",\"RA7\",91\r\n\"E06000026\",\"Plymouth\",\"REF\",67\r\n\"E06000026\",\"Plymouth\",\"RA9\",59\r\n\"E06000026\",\"Plymouth\",\"RH8\",54\r\n\"E06000026\",\"Plymouth\",\"RBA\",35\r\n\"E06000026\",\"Plymouth\",\"RVJ\",23\r\n\"E06000026\",\"Plymouth\",\"RTE\",17\r\n\"E06000026\",\"Plymouth\",\"RBZ\",13\r\n\"E06000026\",\"Plymouth\",\"RHM\",12\r\n\"E06000026\",\"Plymouth\",\"RHU\",11\r\n\"E06000026\",\"Plymouth\",\"RRK\",22\r\n\"E06000026\",\"Plymouth\",\"RA4\",11\r\n\"E06000026\",\"Plymouth\",\"RXQ\",11\r\n\"E06000026\",\"Plymouth\",\"RD1\",11\r\n\"E06000026\",\"Plymouth\",\"RH5\",10\r\n\"E06000026\",\"Plymouth\",\"RTH\",9\r\n\"E06000026\",\"Plymouth\",\"RYJ\",8\r\n\"E06000026\",\"Plymouth\",\"R1K\",7\r\n\"E06000026\",\"Plymouth\",\"RDU\",7\r\n\"E06000026\",\"Plymouth\",\"RBD\",7\r\n\"E06000026\",\"Plymouth\",\"NR5\",8\r\n\"E06000026\",\"Plymouth\",\"RRV\",6\r\n\"E06000026\",\"Plymouth\",\"RT3\",6\r\n\"E06000026\",\"Plymouth\",\"RA2\",6\r\n\"E06000026\",\"Plymouth\",\"RDE\",6\r\n\"E06000026\",\"Plymouth\",\"RN3\",6\r\n\"E06000026\",\"Plymouth\",\"RLT\",5\r\n\"E06000026\",\"Plymouth\",\"RXL\",5\r\n\"E06000026\",\"Plymouth\",\"RAX\",5\r\n\"E06000026\",\"Plymouth\",\"RHW\",5\r\n\"E06000026\",\"Plymouth\",\"RDZ\",5\r\n\"E06000026\",\"Plymouth\",\"REM\",6\r\n\"E06000026\",\"Plymouth\",\"RVV\",5\r\n\"E06000026\",\"Plymouth\",\"RKB\",4\r\n\"E06000026\",\"Plymouth\",\"RTX\",4\r\n\"E06000026\",\"Plymouth\",\"RCB\",4\r\n\"E06000026\",\"Plymouth\",\"RQM\",4\r\n\"E06000026\",\"Plymouth\",\"RW6\",4\r\n\"E06000026\",\"Plymouth\",\"RXW\",4\r\n\"E06000026\",\"Plymouth\",\"RD3\",4\r\n\"E06000026\",\"Plymouth\",\"RN5\",4\r\n\"E06000026\",\"Plymouth\",\"RAJ\",3\r\n\"E06000026\",\"Plymouth\",\"RQX\",3\r\n\"E06000026\",\"Plymouth\",\"RWA\",3\r\n\"E06000026\",\"Plymouth\",\"R1H\",3\r\n\"E06000026\",\"Plymouth\",\"RA3\",3\r\n\"E06000026\",\"Plymouth\",\"RNQ\",3\r\n\"E06000026\",\"Plymouth\",\"RF4\",3\r\n\"E06000026\",\"Plymouth\",\"RJE\",3\r\n\"E06000026\",\"Plymouth\",\"RJZ\",3\r\n\"E06000026\",\"Plymouth\",\"RWE\",3\r\n\"E06000026\",\"Plymouth\",\"RJ7\",3\r\n\"E06000026\",\"Plymouth\",\"RJC\",3\r\n\"E06000026\",\"Plymouth\",\"RNZ\",3\r\n\"E06000026\",\"Plymouth\",\"RD8\",3\r\n\"E06000026\",\"Plymouth\",\"RX1\",3\r\n\"E06000026\",\"Plymouth\",\"RM1\",2\r\n\"E06000026\",\"Plymouth\",\"RRE\",2\r\n\"E06000026\",\"Plymouth\",\"R0A\",2\r\n\"E06000026\",\"Plymouth\",\"RWW\",2\r\n\"E06000026\",\"Plymouth\",\"RBT\",2\r\n\"E06000026\",\"Plymouth\",\"RJ1\",2\r\n\"E06000026\",\"Plymouth\",\"RVY\",2\r\n\"E06000026\",\"Plymouth\",\"RXC\",2\r\n\"E06000026\",\"Plymouth\",\"RHQ\",2\r\n\"E06000026\",\"Plymouth\",\"RJ6\",2\r\n\"E06000026\",\"Plymouth\",\"RTF\",2\r\n\"E06000026\",\"Plymouth\",\"RWF\",2\r\n\"E06000026\",\"Plymouth\",\"RWH\",2\r\n\"E06000026\",\"Plymouth\",\"RAE\",2\r\n\"E06000026\",\"Plymouth\",\"RPC\",2\r\n\"E06000026\",\"Plymouth\",\"RTP\",2\r\n\"E06000026\",\"Plymouth\",\"RXN\",2\r\n\"E06000026\",\"Plymouth\",\"RAS\",2\r\n\"E06000026\",\"Plymouth\",\"RGP\",2\r\n\"E06000026\",\"Plymouth\",\"RNS\",2\r\n\"E06000026\",\"Plymouth\",\"RTG\",3\r\n\"E06000026\",\"Plymouth\",\"RTK\",2\r\n\"E06000026\",\"Plymouth\",\"RGR\",2\r\n\"E06000026\",\"Plymouth\",\"RGT\",2\r\n\"E06000026\",\"Plymouth\",\"RJR\",2\r\n\"E06000026\",\"Plymouth\",\"RXH\",2\r\n\"E06000026\",\"Plymouth\",\"RCF\",1\r\n\"E06000026\",\"Plymouth\",\"RL4\",1\r\n\"E06000026\",\"Plymouth\",\"RLQ\",1\r\n\"E06000026\",\"Plymouth\",\"RQ8\",1\r\n\"E06000026\",\"Plymouth\",\"RXK\",1\r\n\"E06000026\",\"Plymouth\",\"RBN\",1\r\n\"E06000026\",\"Plymouth\",\"RC1\",1\r\n\"E06000026\",\"Plymouth\",\"RKE\",1\r\n\"E06000026\",\"Plymouth\",\"RXR\",1\r\n\"E06000026\",\"Plymouth\",\"RBK\",1\r\n\"E06000026\",\"Plymouth\",\"RFS\",1\r\n\"E06000026\",\"Plymouth\",\"RJL\",1\r\n\"E06000026\",\"Plymouth\",\"RPA\",1\r\n\"E06000026\",\"Plymouth\",\"RXF\",1\r\n\"E06000026\",\"Plymouth\",\"RWG\",1\r\n\"E06000026\",\"Plymouth\",\"R1F\",1\r\n\"E06000026\",\"Plymouth\",\"RFF\",1\r\n\"E06000026\",\"Plymouth\",\"RGM\",1\r\n\"E06000026\",\"Plymouth\",\"RGN\",1\r\n\"E06000026\",\"Plymouth\",\"RJN\",1\r\n\"E06000026\",\"Plymouth\",\"RQW\",1\r\n\"E06000026\",\"Plymouth\",\"RR7\",1\r\n\"E06000026\",\"Plymouth\",\"RTD\",1\r\n\"E06000026\",\"Plymouth\",\"RVN\",1\r\n\"E06000026\",\"Plymouth\",\"RXT\",1\r\n\"E06000026\",\"Plymouth\",\"RDD\",1\r\n\"E06000026\",\"Plymouth\",\"RJ8\",1\r\n\"E06000026\",\"Plymouth\",\"RTQ\",1\r\n\"E06000026\",\"Plymouth\",\"RAL\",1\r\n\"E06000026\",\"Plymouth\",\"RAP\",1\r\n\"E06000026\",\"Plymouth\",\"RBQ\",1\r\n\"E06000026\",\"Plymouth\",\"RBS\",1\r\n\"E06000026\",\"Plymouth\",\"RC9\",1\r\n\"E06000026\",\"Plymouth\",\"RFR\",1\r\n\"E06000026\",\"Plymouth\",\"RJ2\",1\r\n\"E06000026\",\"Plymouth\",\"RV3\",1\r\n\"E06000026\",\"Plymouth\",\"RWY\",1\r\n\"E06000026\",\"Plymouth\",\"RYR\",1\r\n\"E06000026\",\"Plymouth\",\"RYV\",1\r\n\"E06000027\",\"Torbay\",\"RA9\",19129\r\n\"E06000027\",\"Torbay\",\"RH8\",388\r\n\"E06000027\",\"Torbay\",\"RK9\",220\r\n\"E06000027\",\"Torbay\",\"RA7\",66\r\n\"E06000027\",\"Torbay\",\"RBA\",28\r\n\"E06000027\",\"Torbay\",\"RVJ\",23\r\n\"E06000027\",\"Torbay\",\"REF\",23\r\n\"E06000027\",\"Torbay\",\"RBZ\",14\r\n\"E06000027\",\"Torbay\",\"RD1\",11\r\n\"E06000027\",\"Torbay\",\"RJE\",8\r\n\"E06000027\",\"Torbay\",\"RAS\",8\r\n\"E06000027\",\"Torbay\",\"RTE\",8\r\n\"E06000027\",\"Torbay\",\"RJ1\",7\r\n\"E06000027\",\"Torbay\",\"RYR\",7\r\n\"E06000027\",\"Torbay\",\"RDU\",7\r\n\"E06000027\",\"Torbay\",\"RT3\",7\r\n\"E06000027\",\"Torbay\",\"RN5\",7\r\n\"E06000027\",\"Torbay\",\"RA3\",6\r\n\"E06000027\",\"Torbay\",\"RRK\",9\r\n\"E06000027\",\"Torbay\",\"RA4\",6\r\n\"E06000027\",\"Torbay\",\"RJZ\",6\r\n\"E06000027\",\"Torbay\",\"RHM\",6\r\n\"E06000027\",\"Torbay\",\"RN3\",6\r\n\"E06000027\",\"Torbay\",\"RGT\",5\r\n\"E06000027\",\"Torbay\",\"RHW\",5\r\n\"E06000027\",\"Torbay\",\"RBD\",5\r\n\"E06000027\",\"Torbay\",\"RRV\",6\r\n\"E06000027\",\"Torbay\",\"RXH\",5\r\n\"E06000027\",\"Torbay\",\"RAX\",5\r\n\"E06000027\",\"Torbay\",\"RWF\",5\r\n\"E06000027\",\"Torbay\",\"R1K\",4\r\n\"E06000027\",\"Torbay\",\"RHU\",4\r\n\"E06000027\",\"Torbay\",\"R1F\",4\r\n\"E06000027\",\"Torbay\",\"RW6\",4\r\n\"E06000027\",\"Torbay\",\"RD3\",4\r\n\"E06000027\",\"Torbay\",\"R1H\",3\r\n\"E06000027\",\"Torbay\",\"RQ8\",3\r\n\"E06000027\",\"Torbay\",\"RXK\",5\r\n\"E06000027\",\"Torbay\",\"RJ2\",4\r\n\"E06000027\",\"Torbay\",\"RYJ\",3\r\n\"E06000027\",\"Torbay\",\"RNQ\",3\r\n\"E06000027\",\"Torbay\",\"RLQ\",3\r\n\"E06000027\",\"Torbay\",\"RXQ\",3\r\n\"E06000027\",\"Torbay\",\"RC9\",3\r\n\"E06000027\",\"Torbay\",\"RTH\",3\r\n\"E06000027\",\"Torbay\",\"RWP\",3\r\n\"E06000027\",\"Torbay\",\"RBT\",3\r\n\"E06000027\",\"Torbay\",\"RDZ\",3\r\n\"E06000027\",\"Torbay\",\"RQM\",2\r\n\"E06000027\",\"Torbay\",\"RAL\",2\r\n\"E06000027\",\"Torbay\",\"RVV\",2\r\n\"E06000027\",\"Torbay\",\"RBS\",2\r\n\"E06000027\",\"Torbay\",\"RH5\",2\r\n\"E06000027\",\"Torbay\",\"RNZ\",2\r\n\"E06000027\",\"Torbay\",\"RVR\",2\r\n\"E06000027\",\"Torbay\",\"RBN\",2\r\n\"E06000027\",\"Torbay\",\"RM1\",2\r\n\"E06000027\",\"Torbay\",\"RM3\",2\r\n\"E06000027\",\"Torbay\",\"RA2\",2\r\n\"E06000027\",\"Torbay\",\"RF4\",2\r\n\"E06000027\",\"Torbay\",\"RJC\",2\r\n\"E06000027\",\"Torbay\",\"RNA\",2\r\n\"E06000027\",\"Torbay\",\"RWV\",2\r\n\"E06000027\",\"Torbay\",\"RJR\",2\r\n\"E06000027\",\"Torbay\",\"RWW\",2\r\n\"E06000027\",\"Torbay\",\"RXC\",2\r\n\"E06000027\",\"Torbay\",\"RXW\",3\r\n\"E06000027\",\"Torbay\",\"R0A\",2\r\n\"E06000027\",\"Torbay\",\"RGN\",2\r\n\"E06000027\",\"Torbay\",\"RPA\",2\r\n\"E06000027\",\"Torbay\",\"RTK\",2\r\n\"E06000027\",\"Torbay\",\"RNS\",2\r\n\"E06000027\",\"Torbay\",\"RTG\",3\r\n\"E06000027\",\"Torbay\",\"RVW\",2\r\n\"E06000027\",\"Torbay\",\"RWA\",2\r\n\"E06000027\",\"Torbay\",\"RQX\",1\r\n\"E06000027\",\"Torbay\",\"RVY\",1\r\n\"E06000027\",\"Torbay\",\"RAP\",1\r\n\"E06000027\",\"Torbay\",\"RD8\",1\r\n\"E06000027\",\"Torbay\",\"RP6\",1\r\n\"E06000027\",\"Torbay\",\"RTP\",1\r\n\"E06000027\",\"Torbay\",\"RWJ\",1\r\n\"E06000027\",\"Torbay\",\"RXE\",1\r\n\"E06000027\",\"Torbay\",\"RXP\",1\r\n\"E06000027\",\"Torbay\",\"RDD\",1\r\n\"E06000027\",\"Torbay\",\"RFR\",1\r\n\"E06000027\",\"Torbay\",\"RMP\",1\r\n\"E06000027\",\"Torbay\",\"RRJ\",1\r\n\"E06000027\",\"Torbay\",\"RGM\",1\r\n\"E06000027\",\"Torbay\",\"RK5\",1\r\n\"E06000027\",\"Torbay\",\"RKB\",1\r\n\"E06000027\",\"Torbay\",\"RR7\",1\r\n\"E06000027\",\"Torbay\",\"RWG\",1\r\n\"E06000027\",\"Torbay\",\"RBK\",1\r\n\"E06000027\",\"Torbay\",\"RBQ\",1\r\n\"E06000027\",\"Torbay\",\"RDE\",1\r\n\"E06000027\",\"Torbay\",\"RWE\",1\r\n\"E06000027\",\"Torbay\",\"RWH\",1\r\n\"E06000027\",\"Torbay\",\"RCX\",1\r\n\"E06000027\",\"Torbay\",\"RX1\",1\r\n\"E06000027\",\"Torbay\",\"RJ7\",1\r\n\"E06000027\",\"Torbay\",\"RJL\",1\r\n\"E06000027\",\"Torbay\",\"RN7\",1\r\n\"E06000027\",\"Torbay\",\"RP5\",1\r\n\"E06000027\",\"Torbay\",\"RWD\",1\r\n\"E06000028\",\"Bournemouth\",\"RDZ\",18188\r\n\"E06000028\",\"Bournemouth\",\"RD3\",7312\r\n\"E06000028\",\"Bournemouth\",\"RDY\",242\r\n\"E06000028\",\"Bournemouth\",\"RHM\",239\r\n\"E06000028\",\"Bournemouth\",\"RNZ\",109\r\n\"E06000028\",\"Bournemouth\",\"RBD\",68\r\n\"E06000028\",\"Bournemouth\",\"RVJ\",27\r\n\"E06000028\",\"Bournemouth\",\"RTH\",16\r\n\"E06000028\",\"Bournemouth\",\"RHU\",16\r\n\"E06000028\",\"Bournemouth\",\"RYJ\",15\r\n\"E06000028\",\"Bournemouth\",\"RDU\",14\r\n\"E06000028\",\"Bournemouth\",\"RJ1\",14\r\n\"E06000028\",\"Bournemouth\",\"REF\",12\r\n\"E06000028\",\"Bournemouth\",\"RQM\",12\r\n\"E06000028\",\"Bournemouth\",\"RYR\",11\r\n\"E06000028\",\"Bournemouth\",\"RJ7\",10\r\n\"E06000028\",\"Bournemouth\",\"RHW\",9\r\n\"E06000028\",\"Bournemouth\",\"RN5\",9\r\n\"E06000028\",\"Bournemouth\",\"RXH\",9\r\n\"E06000028\",\"Bournemouth\",\"RAX\",9\r\n\"E06000028\",\"Bournemouth\",\"RAL\",9\r\n\"E06000028\",\"Bournemouth\",\"RRV\",10\r\n\"E06000028\",\"Bournemouth\",\"RD1\",8\r\n\"E06000028\",\"Bournemouth\",\"R1H\",8\r\n\"E06000028\",\"Bournemouth\",\"RVR\",8\r\n\"E06000028\",\"Bournemouth\",\"RBA\",8\r\n\"E06000028\",\"Bournemouth\",\"RA9\",8\r\n\"E06000028\",\"Bournemouth\",\"RJZ\",8\r\n\"E06000028\",\"Bournemouth\",\"RA7\",8\r\n\"E06000028\",\"Bournemouth\",\"RA4\",7\r\n\"E06000028\",\"Bournemouth\",\"R1K\",6\r\n\"E06000028\",\"Bournemouth\",\"RH8\",6\r\n\"E06000028\",\"Bournemouth\",\"RTP\",6\r\n\"E06000028\",\"Bournemouth\",\"RJC\",6\r\n\"E06000028\",\"Bournemouth\",\"RD8\",5\r\n\"E06000028\",\"Bournemouth\",\"RTE\",5\r\n\"E06000028\",\"Bournemouth\",\"RWG\",5\r\n\"E06000028\",\"Bournemouth\",\"RN3\",5\r\n\"E06000028\",\"Bournemouth\",\"RVV\",4\r\n\"E06000028\",\"Bournemouth\",\"RP4\",4\r\n\"E06000028\",\"Bournemouth\",\"RP6\",4\r\n\"E06000028\",\"Bournemouth\",\"RN7\",4\r\n\"E06000028\",\"Bournemouth\",\"RNA\",4\r\n\"E06000028\",\"Bournemouth\",\"RTK\",4\r\n\"E06000028\",\"Bournemouth\",\"RWF\",4\r\n\"E06000028\",\"Bournemouth\",\"RWH\",4\r\n\"E06000028\",\"Bournemouth\",\"RAN\",4\r\n\"E06000028\",\"Bournemouth\",\"RGT\",4\r\n\"E06000028\",\"Bournemouth\",\"RQX\",4\r\n\"E06000028\",\"Bournemouth\",\"RW1\",3\r\n\"E06000028\",\"Bournemouth\",\"RXC\",3\r\n\"E06000028\",\"Bournemouth\",\"RA2\",3\r\n\"E06000028\",\"Bournemouth\",\"RJ2\",6\r\n\"E06000028\",\"Bournemouth\",\"RJR\",3\r\n\"E06000028\",\"Bournemouth\",\"RLQ\",3\r\n\"E06000028\",\"Bournemouth\",\"RXQ\",3\r\n\"E06000028\",\"Bournemouth\",\"RM1\",3\r\n\"E06000028\",\"Bournemouth\",\"RNL\",3\r\n\"E06000028\",\"Bournemouth\",\"RF4\",3\r\n\"E06000028\",\"Bournemouth\",\"RGN\",3\r\n\"E06000028\",\"Bournemouth\",\"RC9\",3\r\n\"E06000028\",\"Bournemouth\",\"RC1\",2\r\n\"E06000028\",\"Bournemouth\",\"RK9\",2\r\n\"E06000028\",\"Bournemouth\",\"RKB\",2\r\n\"E06000028\",\"Bournemouth\",\"RWW\",2\r\n\"E06000028\",\"Bournemouth\",\"RA3\",2\r\n\"E06000028\",\"Bournemouth\",\"RAE\",2\r\n\"E06000028\",\"Bournemouth\",\"RHQ\",2\r\n\"E06000028\",\"Bournemouth\",\"RLT\",2\r\n\"E06000028\",\"Bournemouth\",\"RDD\",3\r\n\"E06000028\",\"Bournemouth\",\"RGP\",2\r\n\"E06000028\",\"Bournemouth\",\"RWD\",2\r\n\"E06000028\",\"Bournemouth\",\"RCD\",2\r\n\"E06000028\",\"Bournemouth\",\"RNS\",2\r\n\"E06000028\",\"Bournemouth\",\"RWE\",2\r\n\"E06000028\",\"Bournemouth\",\"R1F\",2\r\n\"E06000028\",\"Bournemouth\",\"RRK\",4\r\n\"E06000028\",\"Bournemouth\",\"RJE\",2\r\n\"E06000028\",\"Bournemouth\",\"RP5\",2\r\n\"E06000028\",\"Bournemouth\",\"RQW\",2\r\n\"E06000028\",\"Bournemouth\",\"RBZ\",2\r\n\"E06000028\",\"Bournemouth\",\"RCB\",2\r\n\"E06000028\",\"Bournemouth\",\"RTG\",2\r\n\"E06000028\",\"Bournemouth\",\"RXK\",3\r\n\"E06000028\",\"Bournemouth\",\"RAS\",1\r\n\"E06000028\",\"Bournemouth\",\"RBS\",1\r\n\"E06000028\",\"Bournemouth\",\"RBT\",1\r\n\"E06000028\",\"Bournemouth\",\"RR8\",1\r\n\"E06000028\",\"Bournemouth\",\"RTV\",1\r\n\"E06000028\",\"Bournemouth\",\"RWA\",1\r\n\"E06000028\",\"Bournemouth\",\"RPC\",1\r\n\"E06000028\",\"Bournemouth\",\"REM\",1\r\n\"E06000028\",\"Bournemouth\",\"RT3\",1\r\n\"E06000028\",\"Bournemouth\",\"RXW\",1\r\n\"E06000028\",\"Bournemouth\",\"RQ8\",1\r\n\"E06000028\",\"Bournemouth\",\"RAP\",1\r\n\"E06000028\",\"Bournemouth\",\"RT5\",1\r\n\"E06000028\",\"Bournemouth\",\"RTF\",1\r\n\"E06000028\",\"Bournemouth\",\"RW6\",1\r\n\"E06000028\",\"Bournemouth\",\"R0A\",1\r\n\"E06000028\",\"Bournemouth\",\"RFS\",1\r\n\"E06000028\",\"Bournemouth\",\"RAT\",1\r\n\"E06000028\",\"Bournemouth\",\"RCU\",1\r\n\"E06000028\",\"Bournemouth\",\"RJ6\",1\r\n\"E06000028\",\"Bournemouth\",\"RMY\",1\r\n\"E06000028\",\"Bournemouth\",\"RXR\",1\r\n\"E06000028\",\"Bournemouth\",\"RXX\",1\r\n\"E06000028\",\"Bournemouth\",\"RMC\",1\r\n\"E06000028\",\"Bournemouth\",\"RTR\",1\r\n\"E06000028\",\"Bournemouth\",\"RX2\",1\r\n\"E06000028\",\"Bournemouth\",\"RXL\",1\r\n\"E06000029\",\"Poole\",\"RD3\",17655\r\n\"E06000029\",\"Poole\",\"RDZ\",2107\r\n\"E06000029\",\"Poole\",\"RDY\",207\r\n\"E06000029\",\"Poole\",\"RHM\",188\r\n\"E06000029\",\"Poole\",\"RNZ\",87\r\n\"E06000029\",\"Poole\",\"RBD\",70\r\n\"E06000029\",\"Poole\",\"RVJ\",16\r\n\"E06000029\",\"Poole\",\"RHU\",13\r\n\"E06000029\",\"Poole\",\"RT3\",9\r\n\"E06000029\",\"Poole\",\"RA4\",9\r\n\"E06000029\",\"Poole\",\"RBA\",8\r\n\"E06000029\",\"Poole\",\"RYR\",8\r\n\"E06000029\",\"Poole\",\"RN5\",8\r\n\"E06000029\",\"Poole\",\"RD1\",7\r\n\"E06000029\",\"Poole\",\"RTH\",7\r\n\"E06000029\",\"Poole\",\"RYJ\",6\r\n\"E06000029\",\"Poole\",\"REF\",6\r\n\"E06000029\",\"Poole\",\"RJC\",6\r\n\"E06000029\",\"Poole\",\"RAL\",5\r\n\"E06000029\",\"Poole\",\"RBZ\",5\r\n\"E06000029\",\"Poole\",\"RRK\",9\r\n\"E06000029\",\"Poole\",\"RJ1\",5\r\n\"E06000029\",\"Poole\",\"RJ7\",5\r\n\"E06000029\",\"Poole\",\"RRV\",5\r\n\"E06000029\",\"Poole\",\"RHW\",5\r\n\"E06000029\",\"Poole\",\"RNS\",5\r\n\"E06000029\",\"Poole\",\"RXH\",4\r\n\"E06000029\",\"Poole\",\"RQM\",4\r\n\"E06000029\",\"Poole\",\"RH8\",4\r\n\"E06000029\",\"Poole\",\"RK9\",4\r\n\"E06000029\",\"Poole\",\"RWE\",3\r\n\"E06000029\",\"Poole\",\"R0A\",3\r\n\"E06000029\",\"Poole\",\"RVR\",3\r\n\"E06000029\",\"Poole\",\"RWH\",3\r\n\"E06000029\",\"Poole\",\"R1H\",3\r\n\"E06000029\",\"Poole\",\"R1F\",3\r\n\"E06000029\",\"Poole\",\"RQX\",3\r\n\"E06000029\",\"Poole\",\"RTE\",3\r\n\"E06000029\",\"Poole\",\"RN3\",3\r\n\"E06000029\",\"Poole\",\"RTK\",3\r\n\"E06000029\",\"Poole\",\"RWF\",3\r\n\"E06000029\",\"Poole\",\"RAS\",2\r\n\"E06000029\",\"Poole\",\"R1K\",2\r\n\"E06000029\",\"Poole\",\"RJZ\",2\r\n\"E06000029\",\"Poole\",\"RWP\",2\r\n\"E06000029\",\"Poole\",\"RX1\",2\r\n\"E06000029\",\"Poole\",\"RXQ\",2\r\n\"E06000029\",\"Poole\",\"RA3\",2\r\n\"E06000029\",\"Poole\",\"RA7\",2\r\n\"E06000029\",\"Poole\",\"RA2\",2\r\n\"E06000029\",\"Poole\",\"RCB\",2\r\n\"E06000029\",\"Poole\",\"RDD\",2\r\n\"E06000029\",\"Poole\",\"RDU\",2\r\n\"E06000029\",\"Poole\",\"RF4\",2\r\n\"E06000029\",\"Poole\",\"RGR\",2\r\n\"E06000029\",\"Poole\",\"RA9\",2\r\n\"E06000029\",\"Poole\",\"RC9\",2\r\n\"E06000029\",\"Poole\",\"REM\",3\r\n\"E06000029\",\"Poole\",\"RNQ\",2\r\n\"E06000029\",\"Poole\",\"RWG\",2\r\n\"E06000029\",\"Poole\",\"RAP\",1\r\n\"E06000029\",\"Poole\",\"RJ6\",1\r\n\"E06000029\",\"Poole\",\"RTP\",1\r\n\"E06000029\",\"Poole\",\"RBS\",1\r\n\"E06000029\",\"Poole\",\"RFR\",1\r\n\"E06000029\",\"Poole\",\"RJR\",1\r\n\"E06000029\",\"Poole\",\"RW1\",1\r\n\"E06000029\",\"Poole\",\"RXL\",1\r\n\"E06000029\",\"Poole\",\"RBL\",1\r\n\"E06000029\",\"Poole\",\"RLT\",1\r\n\"E06000029\",\"Poole\",\"RNL\",1\r\n\"E06000029\",\"Poole\",\"RLQ\",1\r\n\"E06000029\",\"Poole\",\"RXW\",1\r\n\"E06000029\",\"Poole\",\"R0B\",1\r\n\"E06000029\",\"Poole\",\"RR8\",1\r\n\"E06000029\",\"Poole\",\"RTF\",1\r\n\"E06000029\",\"Poole\",\"RVV\",1\r\n\"E06000029\",\"Poole\",\"RJ2\",1\r\n\"E06000029\",\"Poole\",\"RXK\",2\r\n\"E06000029\",\"Poole\",\"RD8\",1\r\n\"E06000029\",\"Poole\",\"RFF\",1\r\n\"E06000029\",\"Poole\",\"RGT\",1\r\n\"E06000029\",\"Poole\",\"RM1\",1\r\n\"E06000029\",\"Poole\",\"RXR\",1\r\n\"E06000029\",\"Poole\",\"RXY\",1\r\n\"E06000029\",\"Poole\",\"RQ3\",1\r\n\"E06000029\",\"Poole\",\"RQW\",1\r\n\"E06000029\",\"Poole\",\"RRF\",1\r\n\"E06000030\",\"Swindon\",\"RN3\",27878\r\n\"E06000030\",\"Swindon\",\"RTH\",448\r\n\"E06000030\",\"Swindon\",\"RA7\",227\r\n\"E06000030\",\"Swindon\",\"RTE\",151\r\n\"E06000030\",\"Swindon\",\"RVJ\",111\r\n\"E06000030\",\"Swindon\",\"RVN\",102\r\n\"E06000030\",\"Swindon\",\"RD1\",30\r\n\"E06000030\",\"Swindon\",\"RHW\",22\r\n\"E06000030\",\"Swindon\",\"RDU\",16\r\n\"E06000030\",\"Swindon\",\"RD3\",15\r\n\"E06000030\",\"Swindon\",\"RNZ\",13\r\n\"E06000030\",\"Swindon\",\"RA9\",13\r\n\"E06000030\",\"Swindon\",\"REF\",12\r\n\"E06000030\",\"Swindon\",\"RBD\",12\r\n\"E06000030\",\"Swindon\",\"RNU\",11\r\n\"E06000030\",\"Swindon\",\"RDZ\",11\r\n\"E06000030\",\"Swindon\",\"RHM\",11\r\n\"E06000030\",\"Swindon\",\"RH8\",10\r\n\"E06000030\",\"Swindon\",\"RBA\",9\r\n\"E06000030\",\"Swindon\",\"RQM\",9\r\n\"E06000030\",\"Swindon\",\"RN5\",9\r\n\"E06000030\",\"Swindon\",\"R1K\",8\r\n\"E06000030\",\"Swindon\",\"RD8\",8\r\n\"E06000030\",\"Swindon\",\"RWP\",8\r\n\"E06000030\",\"Swindon\",\"RTK\",8\r\n\"E06000030\",\"Swindon\",\"R1F\",8\r\n\"E06000030\",\"Swindon\",\"RHU\",8\r\n\"E06000030\",\"Swindon\",\"RXC\",7\r\n\"E06000030\",\"Swindon\",\"RT3\",7\r\n\"E06000030\",\"Swindon\",\"R1H\",6\r\n\"E06000030\",\"Swindon\",\"RK9\",6\r\n\"E06000030\",\"Swindon\",\"RAL\",6\r\n\"E06000030\",\"Swindon\",\"RJ1\",6\r\n\"E06000030\",\"Swindon\",\"RRK\",10\r\n\"E06000030\",\"Swindon\",\"RA4\",5\r\n\"E06000030\",\"Swindon\",\"RAE\",4\r\n\"E06000030\",\"Swindon\",\"RAS\",4\r\n\"E06000030\",\"Swindon\",\"RJZ\",4\r\n\"E06000030\",\"Swindon\",\"RYJ\",4\r\n\"E06000030\",\"Swindon\",\"RJE\",4\r\n\"E06000030\",\"Swindon\",\"RR8\",4\r\n\"E06000030\",\"Swindon\",\"AXG\",4\r\n\"E06000030\",\"Swindon\",\"RA3\",4\r\n\"E06000030\",\"Swindon\",\"RJ7\",4\r\n\"E06000030\",\"Swindon\",\"RDD\",4\r\n\"E06000030\",\"Swindon\",\"RVR\",4\r\n\"E06000030\",\"Swindon\",\"RWG\",3\r\n\"E06000030\",\"Swindon\",\"RXH\",3\r\n\"E06000030\",\"Swindon\",\"RXQ\",3\r\n\"E06000030\",\"Swindon\",\"RYR\",3\r\n\"E06000030\",\"Swindon\",\"RBZ\",3\r\n\"E06000030\",\"Swindon\",\"RRV\",3\r\n\"E06000030\",\"Swindon\",\"RCB\",3\r\n\"E06000030\",\"Swindon\",\"RJ2\",4\r\n\"E06000030\",\"Swindon\",\"RWD\",3\r\n\"E06000030\",\"Swindon\",\"RAP\",2\r\n\"E06000030\",\"Swindon\",\"RXP\",2\r\n\"E06000030\",\"Swindon\",\"RBN\",2\r\n\"E06000030\",\"Swindon\",\"RLQ\",2\r\n\"E06000030\",\"Swindon\",\"RXK\",3\r\n\"E06000030\",\"Swindon\",\"R0B\",2\r\n\"E06000030\",\"Swindon\",\"RA2\",2\r\n\"E06000030\",\"Swindon\",\"RVV\",2\r\n\"E06000030\",\"Swindon\",\"RX1\",2\r\n\"E06000030\",\"Swindon\",\"RJC\",2\r\n\"E06000030\",\"Swindon\",\"RK5\",2\r\n\"E06000030\",\"Swindon\",\"RGN\",2\r\n\"E06000030\",\"Swindon\",\"RJ6\",2\r\n\"E06000030\",\"Swindon\",\"R0A\",1\r\n\"E06000030\",\"Swindon\",\"RBS\",1\r\n\"E06000030\",\"Swindon\",\"REM\",1\r\n\"E06000030\",\"Swindon\",\"RFS\",1\r\n\"E06000030\",\"Swindon\",\"RPY\",1\r\n\"E06000030\",\"Swindon\",\"RQ3\",1\r\n\"E06000030\",\"Swindon\",\"RTD\",1\r\n\"E06000030\",\"Swindon\",\"RWH\",1\r\n\"E06000030\",\"Swindon\",\"RXW\",2\r\n\"E06000030\",\"Swindon\",\"RP4\",1\r\n\"E06000030\",\"Swindon\",\"RWE\",1\r\n\"E06000030\",\"Swindon\",\"RBK\",1\r\n\"E06000030\",\"Swindon\",\"RC9\",1\r\n\"E06000030\",\"Swindon\",\"RFF\",1\r\n\"E06000030\",\"Swindon\",\"RHQ\",1\r\n\"E06000030\",\"Swindon\",\"RLT\",1\r\n\"E06000030\",\"Swindon\",\"RNL\",1\r\n\"E06000030\",\"Swindon\",\"RQX\",1\r\n\"E06000030\",\"Swindon\",\"RWA\",1\r\n\"E06000030\",\"Swindon\",\"RX3\",1\r\n\"E06000030\",\"Swindon\",\"RXN\",1\r\n\"E06000030\",\"Swindon\",\"RXR\",1\r\n\"E06000030\",\"Swindon\",\"RKB\",1\r\n\"E06000030\",\"Swindon\",\"RM1\",1\r\n\"E06000030\",\"Swindon\",\"RP5\",1\r\n\"E06000030\",\"Swindon\",\"RP7\",1\r\n\"E06000030\",\"Swindon\",\"RXF\",1\r\n\"E06000030\",\"Swindon\",\"RTQ\",1\r\n\"E06000030\",\"Swindon\",\"RTR\",1\r\n\"E06000030\",\"Swindon\",\"RCF\",1\r\n\"E06000030\",\"Swindon\",\"RNQ\",1\r\n\"E06000030\",\"Swindon\",\"RTP\",1\r\n\"E06000030\",\"Swindon\",\"RDY\",1\r\n\"E06000030\",\"Swindon\",\"RF4\",1\r\n\"E06000030\",\"Swindon\",\"RH5\",1\r\n\"E06000030\",\"Swindon\",\"RTF\",1\r\n\"E06000030\",\"Swindon\",\"RV3\",1\r\n\"E06000030\",\"Swindon\",\"RAJ\",1\r\n\"E06000030\",\"Swindon\",\"RJR\",1\r\n\"E06000030\",\"Swindon\",\"RTG\",1\r\n\"E06000030\",\"Swindon\",\"RTX\",1\r\n\"E06000031\",\"Peterborough\",\"RGN\",19162\r\n\"E06000031\",\"Peterborough\",\"RGT\",484\r\n\"E06000031\",\"Peterborough\",\"RGM\",161\r\n\"E06000031\",\"Peterborough\",\"RWE\",127\r\n\"E06000031\",\"Peterborough\",\"RT1\",55\r\n\"E06000031\",\"Peterborough\",\"RCX\",39\r\n\"E06000031\",\"Peterborough\",\"RWD\",31\r\n\"E06000031\",\"Peterborough\",\"RX1\",19\r\n\"E06000031\",\"Peterborough\",\"RNQ\",18\r\n\"E06000031\",\"Peterborough\",\"RAE\",17\r\n\"E06000031\",\"Peterborough\",\"RYJ\",13\r\n\"E06000031\",\"Peterborough\",\"RM1\",13\r\n\"E06000031\",\"Peterborough\",\"RTG\",13\r\n\"E06000031\",\"Peterborough\",\"R1H\",13\r\n\"E06000031\",\"Peterborough\",\"RRK\",16\r\n\"E06000031\",\"Peterborough\",\"RQ8\",11\r\n\"E06000031\",\"Peterborough\",\"RC9\",10\r\n\"E06000031\",\"Peterborough\",\"RJ1\",10\r\n\"E06000031\",\"Peterborough\",\"RRV\",12\r\n\"E06000031\",\"Peterborough\",\"RKB\",9\r\n\"E06000031\",\"Peterborough\",\"REF\",9\r\n\"E06000031\",\"Peterborough\",\"RGP\",9\r\n\"E06000031\",\"Peterborough\",\"RQW\",8\r\n\"E06000031\",\"Peterborough\",\"RYV\",8\r\n\"E06000031\",\"Peterborough\",\"RNS\",8\r\n\"E06000031\",\"Peterborough\",\"RQM\",7\r\n\"E06000031\",\"Peterborough\",\"RWH\",7\r\n\"E06000031\",\"Peterborough\",\"RDU\",7\r\n\"E06000031\",\"Peterborough\",\"RHQ\",7\r\n\"E06000031\",\"Peterborough\",\"R1K\",6\r\n\"E06000031\",\"Peterborough\",\"RTE\",6\r\n\"E06000031\",\"Peterborough\",\"RC1\",6\r\n\"E06000031\",\"Peterborough\",\"RTH\",6\r\n\"E06000031\",\"Peterborough\",\"RWF\",5\r\n\"E06000031\",\"Peterborough\",\"RHW\",5\r\n\"E06000031\",\"Peterborough\",\"RDE\",5\r\n\"E06000031\",\"Peterborough\",\"RP7\",5\r\n\"E06000031\",\"Peterborough\",\"RGR\",4\r\n\"E06000031\",\"Peterborough\",\"RWA\",4\r\n\"E06000031\",\"Peterborough\",\"RXK\",6\r\n\"E06000031\",\"Peterborough\",\"RJL\",4\r\n\"E06000031\",\"Peterborough\",\"RAJ\",4\r\n\"E06000031\",\"Peterborough\",\"RJZ\",4\r\n\"E06000031\",\"Peterborough\",\"RTP\",4\r\n\"E06000031\",\"Peterborough\",\"RP6\",4\r\n\"E06000031\",\"Peterborough\",\"RWW\",4\r\n\"E06000031\",\"Peterborough\",\"RWG\",4\r\n\"E06000031\",\"Peterborough\",\"RD3\",4\r\n\"E06000031\",\"Peterborough\",\"RM3\",3\r\n\"E06000031\",\"Peterborough\",\"RP1\",3\r\n\"E06000031\",\"Peterborough\",\"RXC\",3\r\n\"E06000031\",\"Peterborough\",\"RK5\",3\r\n\"E06000031\",\"Peterborough\",\"RN5\",3\r\n\"E06000031\",\"Peterborough\",\"RAS\",3\r\n\"E06000031\",\"Peterborough\",\"RH8\",3\r\n\"E06000031\",\"Peterborough\",\"RAL\",3\r\n\"E06000031\",\"Peterborough\",\"RR8\",3\r\n\"E06000031\",\"Peterborough\",\"R1L\",3\r\n\"E06000031\",\"Peterborough\",\"R0A\",3\r\n\"E06000031\",\"Peterborough\",\"RBA\",3\r\n\"E06000031\",\"Peterborough\",\"RCB\",3\r\n\"E06000031\",\"Peterborough\",\"RJ2\",2\r\n\"E06000031\",\"Peterborough\",\"RMP\",2\r\n\"E06000031\",\"Peterborough\",\"RW6\",2\r\n\"E06000031\",\"Peterborough\",\"RK9\",2\r\n\"E06000031\",\"Peterborough\",\"RP5\",2\r\n\"E06000031\",\"Peterborough\",\"RTD\",2\r\n\"E06000031\",\"Peterborough\",\"RVJ\",2\r\n\"E06000031\",\"Peterborough\",\"RWJ\",2\r\n\"E06000031\",\"Peterborough\",\"RXF\",2\r\n\"E06000031\",\"Peterborough\",\"RA2\",2\r\n\"E06000031\",\"Peterborough\",\"RFS\",2\r\n\"E06000031\",\"Peterborough\",\"RN7\",2\r\n\"E06000031\",\"Peterborough\",\"RP4\",2\r\n\"E06000031\",\"Peterborough\",\"RBN\",2\r\n\"E06000031\",\"Peterborough\",\"RJ7\",2\r\n\"E06000031\",\"Peterborough\",\"RNL\",2\r\n\"E06000031\",\"Peterborough\",\"RXW\",3\r\n\"E06000031\",\"Peterborough\",\"RDZ\",2\r\n\"E06000031\",\"Peterborough\",\"RXP\",2\r\n\"E06000031\",\"Peterborough\",\"RYR\",2\r\n\"E06000031\",\"Peterborough\",\"RLQ\",2\r\n\"E06000031\",\"Peterborough\",\"RTX\",2\r\n\"E06000031\",\"Peterborough\",\"RAP\",1\r\n\"E06000031\",\"Peterborough\",\"RAT\",1\r\n\"E06000031\",\"Peterborough\",\"RDD\",1\r\n\"E06000031\",\"Peterborough\",\"REM\",2\r\n\"E06000031\",\"Peterborough\",\"RJ6\",1\r\n\"E06000031\",\"Peterborough\",\"R1F\",1\r\n\"E06000031\",\"Peterborough\",\"RA7\",1\r\n\"E06000031\",\"Peterborough\",\"RAX\",1\r\n\"E06000031\",\"Peterborough\",\"RCD\",1\r\n\"E06000031\",\"Peterborough\",\"RJE\",1\r\n\"E06000031\",\"Peterborough\",\"RX4\",1\r\n\"E06000031\",\"Peterborough\",\"RGD\",1\r\n\"E06000031\",\"Peterborough\",\"RNA\",1\r\n\"E06000031\",\"Peterborough\",\"RBD\",1\r\n\"E06000031\",\"Peterborough\",\"RTK\",1\r\n\"E06000031\",\"Peterborough\",\"RTR\",2\r\n\"E06000031\",\"Peterborough\",\"RVV\",1\r\n\"E06000031\",\"Peterborough\",\"RWY\",1\r\n\"E06000031\",\"Peterborough\",\"RXL\",1\r\n\"E06000031\",\"Peterborough\",\"RA9\",1\r\n\"E06000031\",\"Peterborough\",\"RJR\",1\r\n\"E06000031\",\"Peterborough\",\"RKE\",1\r\n\"E06000031\",\"Peterborough\",\"RW1\",1\r\n\"E06000031\",\"Peterborough\",\"RXQ\",1\r\n\"E06000031\",\"Peterborough\",\"RD8\",1\r\n\"E06000031\",\"Peterborough\",\"RF4\",1\r\n\"E06000031\",\"Peterborough\",\"RQ3\",1\r\n\"E06000031\",\"Peterborough\",\"RVR\",1\r\n\"E06000031\",\"Peterborough\",\"RCF\",1\r\n\"E06000031\",\"Peterborough\",\"RJC\",1\r\n\"E06000031\",\"Peterborough\",\"RWP\",1\r\n\"E06000031\",\"Peterborough\",\"RQX\",1\r\n\"E06000031\",\"Peterborough\",\"RTF\",1\r\n\"E06000031\",\"Peterborough\",\"RVW\",1\r\n\"E06000031\",\"Peterborough\",\"RXN\",1\r\n\"E06000032\",\"Luton\",\"RC9\",27151\r\n\"E06000032\",\"Luton\",\"RWH\",569\r\n\"E06000032\",\"Luton\",\"RWK\",511\r\n\"E06000032\",\"Luton\",\"RGT\",191\r\n\"E06000032\",\"Luton\",\"RT3\",147\r\n\"E06000032\",\"Luton\",\"RC1\",121\r\n\"E06000032\",\"Luton\",\"RWG\",85\r\n\"E06000032\",\"Luton\",\"RAL\",73\r\n\"E06000032\",\"Luton\",\"RYJ\",68\r\n\"E06000032\",\"Luton\",\"RD8\",65\r\n\"E06000032\",\"Luton\",\"R1H\",53\r\n\"E06000032\",\"Luton\",\"R1K\",48\r\n\"E06000032\",\"Luton\",\"RRV\",66\r\n\"E06000032\",\"Luton\",\"RXQ\",23\r\n\"E06000032\",\"Luton\",\"RJ1\",21\r\n\"E06000032\",\"Luton\",\"RQ8\",20\r\n\"E06000032\",\"Luton\",\"RDU\",17\r\n\"E06000032\",\"Luton\",\"RTH\",15\r\n\"E06000032\",\"Luton\",\"RJ7\",13\r\n\"E06000032\",\"Luton\",\"RNS\",12\r\n\"E06000032\",\"Luton\",\"RRK\",18\r\n\"E06000032\",\"Luton\",\"RF4\",10\r\n\"E06000032\",\"Luton\",\"RQM\",10\r\n\"E06000032\",\"Luton\",\"RAP\",10\r\n\"E06000032\",\"Luton\",\"RDE\",9\r\n\"E06000032\",\"Luton\",\"RAS\",9\r\n\"E06000032\",\"Luton\",\"RP6\",9\r\n\"E06000032\",\"Luton\",\"RGP\",9\r\n\"E06000032\",\"Luton\",\"RAE\",9\r\n\"E06000032\",\"Luton\",\"RJZ\",9\r\n\"E06000032\",\"Luton\",\"RQW\",8\r\n\"E06000032\",\"Luton\",\"RP4\",8\r\n\"E06000032\",\"Luton\",\"RQX\",8\r\n\"E06000032\",\"Luton\",\"REF\",8\r\n\"E06000032\",\"Luton\",\"RGM\",7\r\n\"E06000032\",\"Luton\",\"RA9\",7\r\n\"E06000032\",\"Luton\",\"RL4\",6\r\n\"E06000032\",\"Luton\",\"RWF\",6\r\n\"E06000032\",\"Luton\",\"RWE\",6\r\n\"E06000032\",\"Luton\",\"R1F\",6\r\n\"E06000032\",\"Luton\",\"RXC\",6\r\n\"E06000032\",\"Luton\",\"R0A\",6\r\n\"E06000032\",\"Luton\",\"RX1\",6\r\n\"E06000032\",\"Luton\",\"RJE\",6\r\n\"E06000032\",\"Luton\",\"RFF\",5\r\n\"E06000032\",\"Luton\",\"RVV\",5\r\n\"E06000032\",\"Luton\",\"RGN\",5\r\n\"E06000032\",\"Luton\",\"RKB\",5\r\n\"E06000032\",\"Luton\",\"RNQ\",5\r\n\"E06000032\",\"Luton\",\"RTK\",5\r\n\"E06000032\",\"Luton\",\"RDZ\",5\r\n\"E06000032\",\"Luton\",\"RJ2\",6\r\n\"E06000032\",\"Luton\",\"RWA\",4\r\n\"E06000032\",\"Luton\",\"RQ3\",4\r\n\"E06000032\",\"Luton\",\"RHU\",4\r\n\"E06000032\",\"Luton\",\"RM1\",4\r\n\"E06000032\",\"Luton\",\"RAN\",4\r\n\"E06000032\",\"Luton\",\"RD1\",4\r\n\"E06000032\",\"Luton\",\"RTE\",4\r\n\"E06000032\",\"Luton\",\"RWD\",4\r\n\"E06000032\",\"Luton\",\"RHQ\",4\r\n\"E06000032\",\"Luton\",\"RJ6\",3\r\n\"E06000032\",\"Luton\",\"RNZ\",3\r\n\"E06000032\",\"Luton\",\"RJC\",3\r\n\"E06000032\",\"Luton\",\"RXW\",3\r\n\"E06000032\",\"Luton\",\"R1L\",3\r\n\"E06000032\",\"Luton\",\"RVR\",3\r\n\"E06000032\",\"Luton\",\"REM\",3\r\n\"E06000032\",\"Luton\",\"RCX\",3\r\n\"E06000032\",\"Luton\",\"RFS\",3\r\n\"E06000032\",\"Luton\",\"RTP\",3\r\n\"E06000032\",\"Luton\",\"RH8\",3\r\n\"E06000032\",\"Luton\",\"RDD\",4\r\n\"E06000032\",\"Luton\",\"RMC\",3\r\n\"E06000032\",\"Luton\",\"RXK\",6\r\n\"E06000032\",\"Luton\",\"RKE\",2\r\n\"E06000032\",\"Luton\",\"RLT\",2\r\n\"E06000032\",\"Luton\",\"RN7\",2\r\n\"E06000032\",\"Luton\",\"RV3\",2\r\n\"E06000032\",\"Luton\",\"RXH\",2\r\n\"E06000032\",\"Luton\",\"RXL\",2\r\n\"E06000032\",\"Luton\",\"RWY\",2\r\n\"E06000032\",\"Luton\",\"RXR\",2\r\n\"E06000032\",\"Luton\",\"RHM\",2\r\n\"E06000032\",\"Luton\",\"RAJ\",2\r\n\"E06000032\",\"Luton\",\"RBK\",2\r\n\"E06000032\",\"Luton\",\"RN5\",2\r\n\"E06000032\",\"Luton\",\"RR8\",2\r\n\"E06000032\",\"Luton\",\"RNU\",1\r\n\"E06000032\",\"Luton\",\"RTR\",1\r\n\"E06000032\",\"Luton\",\"RBT\",1\r\n\"E06000032\",\"Luton\",\"RHW\",1\r\n\"E06000032\",\"Luton\",\"RAX\",1\r\n\"E06000032\",\"Luton\",\"RV9\",1\r\n\"E06000032\",\"Luton\",\"RYR\",1\r\n\"E06000032\",\"Luton\",\"RBN\",1\r\n\"E06000032\",\"Luton\",\"RP1\",1\r\n\"E06000032\",\"Luton\",\"RCB\",1\r\n\"E06000032\",\"Luton\",\"RW6\",1\r\n\"E06000032\",\"Luton\",\"RXN\",1\r\n\"E06000032\",\"Luton\",\"RGR\",1\r\n\"E06000032\",\"Luton\",\"RK5\",1\r\n\"E06000032\",\"Luton\",\"RN3\",1\r\n\"E06000032\",\"Luton\",\"RNA\",1\r\n\"E06000032\",\"Luton\",\"RP5\",1\r\n\"E06000032\",\"Luton\",\"RXF\",1\r\n\"E06000032\",\"Luton\",\"RBZ\",1\r\n\"E06000032\",\"Luton\",\"RCD\",1\r\n\"E06000032\",\"Luton\",\"RTD\",1\r\n\"E06000032\",\"Luton\",\"RA4\",1\r\n\"E06000032\",\"Luton\",\"RBA\",1\r\n\"E06000032\",\"Luton\",\"RD3\",1\r\n\"E06000032\",\"Luton\",\"RVJ\",1\r\n\"E06000032\",\"Luton\",\"RWP\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RAJ\",22069\r\n\"E06000033\",\"Southend-on-Sea\",\"R1L\",567\r\n\"E06000033\",\"Southend-on-Sea\",\"RQ8\",464\r\n\"E06000033\",\"Southend-on-Sea\",\"RDD\",439\r\n\"E06000033\",\"Southend-on-Sea\",\"R1H\",207\r\n\"E06000033\",\"Southend-on-Sea\",\"RJ1\",47\r\n\"E06000033\",\"Southend-on-Sea\",\"RF4\",42\r\n\"E06000033\",\"Southend-on-Sea\",\"RGT\",39\r\n\"E06000033\",\"Southend-on-Sea\",\"RRV\",31\r\n\"E06000033\",\"Southend-on-Sea\",\"RDE\",23\r\n\"E06000033\",\"Southend-on-Sea\",\"RYJ\",17\r\n\"E06000033\",\"Southend-on-Sea\",\"RQX\",14\r\n\"E06000033\",\"Southend-on-Sea\",\"RQW\",13\r\n\"E06000033\",\"Southend-on-Sea\",\"RWF\",12\r\n\"E06000033\",\"Southend-on-Sea\",\"RJZ\",12\r\n\"E06000033\",\"Southend-on-Sea\",\"RVV\",12\r\n\"E06000033\",\"Southend-on-Sea\",\"RAL\",11\r\n\"E06000033\",\"Southend-on-Sea\",\"RT3\",10\r\n\"E06000033\",\"Southend-on-Sea\",\"RYR\",9\r\n\"E06000033\",\"Southend-on-Sea\",\"RXC\",7\r\n\"E06000033\",\"Southend-on-Sea\",\"RAP\",7\r\n\"E06000033\",\"Southend-on-Sea\",\"R1K\",7\r\n\"E06000033\",\"Southend-on-Sea\",\"RP4\",6\r\n\"E06000033\",\"Southend-on-Sea\",\"RWK\",6\r\n\"E06000033\",\"Southend-on-Sea\",\"RGM\",6\r\n\"E06000033\",\"Southend-on-Sea\",\"RM1\",6\r\n\"E06000033\",\"Southend-on-Sea\",\"REF\",6\r\n\"E06000033\",\"Southend-on-Sea\",\"RXP\",6\r\n\"E06000033\",\"Southend-on-Sea\",\"RJ7\",6\r\n\"E06000033\",\"Southend-on-Sea\",\"RA9\",5\r\n\"E06000033\",\"Southend-on-Sea\",\"RDU\",5\r\n\"E06000033\",\"Southend-on-Sea\",\"RAN\",5\r\n\"E06000033\",\"Southend-on-Sea\",\"RN7\",5\r\n\"E06000033\",\"Southend-on-Sea\",\"RGP\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RTX\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RTH\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RX1\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RJ2\",5\r\n\"E06000033\",\"Southend-on-Sea\",\"RGR\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RHM\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RPA\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RPY\",4\r\n\"E06000033\",\"Southend-on-Sea\",\"RTP\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RAX\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RN5\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RWG\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RWH\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RA3\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RN3\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"R1F\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RQM\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RXH\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"RA7\",3\r\n\"E06000033\",\"Southend-on-Sea\",\"R0A\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RBZ\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RHW\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RA2\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RBD\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RH8\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RM3\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RVR\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RXL\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RD8\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RNZ\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RWD\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RBN\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RCB\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RD3\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RP6\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RAT\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RBT\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RHU\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RK9\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RJL\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RNL\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RNS\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RVJ\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RXQ\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RTG\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RGN\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RHQ\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RMY\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RNA\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RTF\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RXW\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RFS\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RLQ\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RTR\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RCD\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RKB\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RKE\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RRK\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RTE\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RVY\",2\r\n\"E06000033\",\"Southend-on-Sea\",\"RWW\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RVW\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RC9\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RJ6\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RRE\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RWP\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RD1\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"REM\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RJR\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RL4\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RPG\",1\r\n\"E06000033\",\"Southend-on-Sea\",\"RWR\",1\r\n\"E06000034\",\"Thurrock\",\"RDD\",17245\r\n\"E06000034\",\"Thurrock\",\"RQ8\",477\r\n\"E06000034\",\"Thurrock\",\"RF4\",463\r\n\"E06000034\",\"Thurrock\",\"R1H\",419\r\n\"E06000034\",\"Thurrock\",\"R1L\",309\r\n\"E06000034\",\"Thurrock\",\"RN7\",244\r\n\"E06000034\",\"Thurrock\",\"RAJ\",185\r\n\"E06000034\",\"Thurrock\",\"RJ1\",53\r\n\"E06000034\",\"Thurrock\",\"RRV\",54\r\n\"E06000034\",\"Thurrock\",\"RDE\",31\r\n\"E06000034\",\"Thurrock\",\"RYJ\",31\r\n\"E06000034\",\"Thurrock\",\"RQX\",26\r\n\"E06000034\",\"Thurrock\",\"RJZ\",24\r\n\"E06000034\",\"Thurrock\",\"RAL\",20\r\n\"E06000034\",\"Thurrock\",\"RGT\",20\r\n\"E06000034\",\"Thurrock\",\"RPA\",19\r\n\"E06000034\",\"Thurrock\",\"RP6\",14\r\n\"E06000034\",\"Thurrock\",\"RQW\",13\r\n\"E06000034\",\"Thurrock\",\"RAP\",10\r\n\"E06000034\",\"Thurrock\",\"RVV\",10\r\n\"E06000034\",\"Thurrock\",\"RT3\",9\r\n\"E06000034\",\"Thurrock\",\"RJ7\",9\r\n\"E06000034\",\"Thurrock\",\"RJ2\",14\r\n\"E06000034\",\"Thurrock\",\"R1K\",8\r\n\"E06000034\",\"Thurrock\",\"RGP\",7\r\n\"E06000034\",\"Thurrock\",\"RM1\",7\r\n\"E06000034\",\"Thurrock\",\"RP4\",7\r\n\"E06000034\",\"Thurrock\",\"RDU\",7\r\n\"E06000034\",\"Thurrock\",\"RTH\",7\r\n\"E06000034\",\"Thurrock\",\"RQM\",7\r\n\"E06000034\",\"Thurrock\",\"RWF\",7\r\n\"E06000034\",\"Thurrock\",\"RC9\",6\r\n\"E06000034\",\"Thurrock\",\"RPY\",6\r\n\"E06000034\",\"Thurrock\",\"RAS\",5\r\n\"E06000034\",\"Thurrock\",\"RGR\",5\r\n\"E06000034\",\"Thurrock\",\"RWH\",4\r\n\"E06000034\",\"Thurrock\",\"RGM\",4\r\n\"E06000034\",\"Thurrock\",\"RVJ\",4\r\n\"E06000034\",\"Thurrock\",\"RXC\",4\r\n\"E06000034\",\"Thurrock\",\"R0A\",4\r\n\"E06000034\",\"Thurrock\",\"RXH\",4\r\n\"E06000034\",\"Thurrock\",\"RX1\",4\r\n\"E06000034\",\"Thurrock\",\"RDZ\",4\r\n\"E06000034\",\"Thurrock\",\"RAT\",3\r\n\"E06000034\",\"Thurrock\",\"RFS\",3\r\n\"E06000034\",\"Thurrock\",\"RAN\",3\r\n\"E06000034\",\"Thurrock\",\"RD8\",3\r\n\"E06000034\",\"Thurrock\",\"RBD\",3\r\n\"E06000034\",\"Thurrock\",\"RCX\",3\r\n\"E06000034\",\"Thurrock\",\"RWG\",3\r\n\"E06000034\",\"Thurrock\",\"RRK\",3\r\n\"E06000034\",\"Thurrock\",\"RD3\",3\r\n\"E06000034\",\"Thurrock\",\"RHQ\",2\r\n\"E06000034\",\"Thurrock\",\"RXQ\",2\r\n\"E06000034\",\"Thurrock\",\"RXR\",2\r\n\"E06000034\",\"Thurrock\",\"RA4\",2\r\n\"E06000034\",\"Thurrock\",\"RK9\",2\r\n\"E06000034\",\"Thurrock\",\"RPC\",2\r\n\"E06000034\",\"Thurrock\",\"RXP\",2\r\n\"E06000034\",\"Thurrock\",\"REF\",2\r\n\"E06000034\",\"Thurrock\",\"RHW\",2\r\n\"E06000034\",\"Thurrock\",\"RN5\",2\r\n\"E06000034\",\"Thurrock\",\"RC1\",2\r\n\"E06000034\",\"Thurrock\",\"RTK\",2\r\n\"E06000034\",\"Thurrock\",\"RVR\",2\r\n\"E06000034\",\"Thurrock\",\"RWE\",2\r\n\"E06000034\",\"Thurrock\",\"RJN\",2\r\n\"E06000034\",\"Thurrock\",\"RVW\",2\r\n\"E06000034\",\"Thurrock\",\"RYR\",2\r\n\"E06000034\",\"Thurrock\",\"RD1\",2\r\n\"E06000034\",\"Thurrock\",\"RN3\",2\r\n\"E06000034\",\"Thurrock\",\"RA2\",1\r\n\"E06000034\",\"Thurrock\",\"RAX\",1\r\n\"E06000034\",\"Thurrock\",\"RJ6\",1\r\n\"E06000034\",\"Thurrock\",\"RJC\",1\r\n\"E06000034\",\"Thurrock\",\"RKB\",1\r\n\"E06000034\",\"Thurrock\",\"RNL\",1\r\n\"E06000034\",\"Thurrock\",\"RTE\",1\r\n\"E06000034\",\"Thurrock\",\"RBZ\",1\r\n\"E06000034\",\"Thurrock\",\"RCD\",1\r\n\"E06000034\",\"Thurrock\",\"RHM\",1\r\n\"E06000034\",\"Thurrock\",\"RKE\",1\r\n\"E06000034\",\"Thurrock\",\"RNA\",1\r\n\"E06000034\",\"Thurrock\",\"RWA\",1\r\n\"E06000034\",\"Thurrock\",\"RXK\",1\r\n\"E06000034\",\"Thurrock\",\"RFF\",1\r\n\"E06000034\",\"Thurrock\",\"RHU\",1\r\n\"E06000034\",\"Thurrock\",\"RPG\",1\r\n\"E06000034\",\"Thurrock\",\"RWK\",1\r\n\"E06000034\",\"Thurrock\",\"RXN\",1\r\n\"E06000034\",\"Thurrock\",\"RTP\",1\r\n\"E06000034\",\"Thurrock\",\"RTR\",1\r\n\"E06000034\",\"Thurrock\",\"RW6\",1\r\n\"E06000034\",\"Thurrock\",\"R1F\",1\r\n\"E06000034\",\"Thurrock\",\"RCB\",1\r\n\"E06000034\",\"Thurrock\",\"R0B\",1\r\n\"E06000034\",\"Thurrock\",\"RNS\",1\r\n\"E06000034\",\"Thurrock\",\"RL4\",1\r\n\"E06000034\",\"Thurrock\",\"RTF\",1\r\n\"E06000034\",\"Thurrock\",\"RTG\",1\r\n\"E06000034\",\"Thurrock\",\"RJE\",1\r\n\"E06000034\",\"Thurrock\",\"RQ3\",1\r\n\"E06000034\",\"Thurrock\",\"RR7\",1\r\n\"E06000034\",\"Thurrock\",\"RXW\",1\r\n\"E06000035\",\"Medway\",\"RPA\",25743\r\n\"E06000035\",\"Medway\",\"RWF\",955\r\n\"E06000035\",\"Medway\",\"RN7\",456\r\n\"E06000035\",\"Medway\",\"RPC\",421\r\n\"E06000035\",\"Medway\",\"RVV\",383\r\n\"E06000035\",\"Medway\",\"RXY\",345\r\n\"E06000035\",\"Medway\",\"RJZ\",220\r\n\"E06000035\",\"Medway\",\"RJ1\",206\r\n\"E06000035\",\"Medway\",\"R1H\",54\r\n\"E06000035\",\"Medway\",\"RRV\",50\r\n\"E06000035\",\"Medway\",\"RJ7\",34\r\n\"E06000035\",\"Medway\",\"RJ2\",47\r\n\"E06000035\",\"Medway\",\"RYJ\",22\r\n\"E06000035\",\"Medway\",\"RXC\",21\r\n\"E06000035\",\"Medway\",\"RQM\",19\r\n\"E06000035\",\"Medway\",\"RT3\",16\r\n\"E06000035\",\"Medway\",\"RPY\",15\r\n\"E06000035\",\"Medway\",\"NQ7\",15\r\n\"E06000035\",\"Medway\",\"RDD\",14\r\n\"E06000035\",\"Medway\",\"RTP\",11\r\n\"E06000035\",\"Medway\",\"RDU\",11\r\n\"E06000035\",\"Medway\",\"RYR\",11\r\n\"E06000035\",\"Medway\",\"RXH\",10\r\n\"E06000035\",\"Medway\",\"RTK\",9\r\n\"E06000035\",\"Medway\",\"RP6\",9\r\n\"E06000035\",\"Medway\",\"RGP\",8\r\n\"E06000035\",\"Medway\",\"RHU\",8\r\n\"E06000035\",\"Medway\",\"RQX\",8\r\n\"E06000035\",\"Medway\",\"RTH\",8\r\n\"E06000035\",\"Medway\",\"RVR\",7\r\n\"E06000035\",\"Medway\",\"RDE\",7\r\n\"E06000035\",\"Medway\",\"RJ6\",7\r\n\"E06000035\",\"Medway\",\"RHM\",7\r\n\"E06000035\",\"Medway\",\"RF4\",7\r\n\"E06000035\",\"Medway\",\"R1K\",6\r\n\"E06000035\",\"Medway\",\"RHQ\",6\r\n\"E06000035\",\"Medway\",\"RK9\",6\r\n\"E06000035\",\"Medway\",\"RXQ\",6\r\n\"E06000035\",\"Medway\",\"RCB\",6\r\n\"E06000035\",\"Medway\",\"RKB\",6\r\n\"E06000035\",\"Medway\",\"RBD\",6\r\n\"E06000035\",\"Medway\",\"R0A\",5\r\n\"E06000035\",\"Medway\",\"RA7\",5\r\n\"E06000035\",\"Medway\",\"RX2\",5\r\n\"E06000035\",\"Medway\",\"REF\",5\r\n\"E06000035\",\"Medway\",\"RAJ\",5\r\n\"E06000035\",\"Medway\",\"RAP\",4\r\n\"E06000035\",\"Medway\",\"RN5\",4\r\n\"E06000035\",\"Medway\",\"RBZ\",4\r\n\"E06000035\",\"Medway\",\"RM1\",4\r\n\"E06000035\",\"Medway\",\"RRK\",6\r\n\"E06000035\",\"Medway\",\"RTE\",4\r\n\"E06000035\",\"Medway\",\"RAL\",4\r\n\"E06000035\",\"Medway\",\"RA9\",4\r\n\"E06000035\",\"Medway\",\"RJE\",4\r\n\"E06000035\",\"Medway\",\"RQ8\",4\r\n\"E06000035\",\"Medway\",\"R1F\",4\r\n\"E06000035\",\"Medway\",\"RWK\",4\r\n\"E06000035\",\"Medway\",\"RBA\",3\r\n\"E06000035\",\"Medway\",\"RNA\",3\r\n\"E06000035\",\"Medway\",\"RLQ\",3\r\n\"E06000035\",\"Medway\",\"RPG\",3\r\n\"E06000035\",\"Medway\",\"RVJ\",3\r\n\"E06000035\",\"Medway\",\"RD3\",3\r\n\"E06000035\",\"Medway\",\"RGN\",3\r\n\"E06000035\",\"Medway\",\"RA2\",3\r\n\"E06000035\",\"Medway\",\"RH8\",3\r\n\"E06000035\",\"Medway\",\"RWD\",3\r\n\"E06000035\",\"Medway\",\"RNL\",3\r\n\"E06000035\",\"Medway\",\"RWH\",3\r\n\"E06000035\",\"Medway\",\"RGT\",3\r\n\"E06000035\",\"Medway\",\"RAN\",3\r\n\"E06000035\",\"Medway\",\"RGR\",3\r\n\"E06000035\",\"Medway\",\"RWW\",3\r\n\"E06000035\",\"Medway\",\"RHW\",2\r\n\"E06000035\",\"Medway\",\"RQW\",2\r\n\"E06000035\",\"Medway\",\"RWP\",2\r\n\"E06000035\",\"Medway\",\"RNQ\",2\r\n\"E06000035\",\"Medway\",\"RNZ\",2\r\n\"E06000035\",\"Medway\",\"RXN\",2\r\n\"E06000035\",\"Medway\",\"RA4\",2\r\n\"E06000035\",\"Medway\",\"RC9\",2\r\n\"E06000035\",\"Medway\",\"RL4\",2\r\n\"E06000035\",\"Medway\",\"RTD\",2\r\n\"E06000035\",\"Medway\",\"RWG\",2\r\n\"E06000035\",\"Medway\",\"RAX\",2\r\n\"E06000035\",\"Medway\",\"RJN\",2\r\n\"E06000035\",\"Medway\",\"RM3\",2\r\n\"E06000035\",\"Medway\",\"RWY\",2\r\n\"E06000035\",\"Medway\",\"RD1\",2\r\n\"E06000035\",\"Medway\",\"RXP\",2\r\n\"E06000035\",\"Medway\",\"RAE\",2\r\n\"E06000035\",\"Medway\",\"RP4\",2\r\n\"E06000035\",\"Medway\",\"RDZ\",2\r\n\"E06000035\",\"Medway\",\"RVY\",2\r\n\"E06000035\",\"Medway\",\"RC1\",1\r\n\"E06000035\",\"Medway\",\"RD8\",1\r\n\"E06000035\",\"Medway\",\"RCD\",1\r\n\"E06000035\",\"Medway\",\"RJR\",1\r\n\"E06000035\",\"Medway\",\"RKE\",1\r\n\"E06000035\",\"Medway\",\"RN3\",1\r\n\"E06000035\",\"Medway\",\"RP5\",2\r\n\"E06000035\",\"Medway\",\"RTG\",2\r\n\"E06000035\",\"Medway\",\"RWA\",1\r\n\"E06000035\",\"Medway\",\"REM\",2\r\n\"E06000035\",\"Medway\",\"RJC\",1\r\n\"E06000035\",\"Medway\",\"RTF\",1\r\n\"E06000035\",\"Medway\",\"RAS\",1\r\n\"E06000035\",\"Medway\",\"RBK\",1\r\n\"E06000035\",\"Medway\",\"RBN\",1\r\n\"E06000035\",\"Medway\",\"RW1\",1\r\n\"E06000035\",\"Medway\",\"RXF\",1\r\n\"E06000035\",\"Medway\",\"RFF\",1\r\n\"E06000035\",\"Medway\",\"RMC\",1\r\n\"E06000035\",\"Medway\",\"RBL\",1\r\n\"E06000035\",\"Medway\",\"RGM\",1\r\n\"E06000035\",\"Medway\",\"RR8\",1\r\n\"E06000035\",\"Medway\",\"RTR\",1\r\n\"E06000035\",\"Medway\",\"RW6\",1\r\n\"E06000035\",\"Medway\",\"RWE\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RDU\",8498\r\n\"E06000036\",\"Bracknell Forest\",\"RHW\",2126\r\n\"E06000036\",\"Bracknell Forest\",\"RA2\",122\r\n\"E06000036\",\"Bracknell Forest\",\"RWX\",88\r\n\"E06000036\",\"Bracknell Forest\",\"RTH\",84\r\n\"E06000036\",\"Bracknell Forest\",\"RJ7\",40\r\n\"E06000036\",\"Bracknell Forest\",\"RHM\",39\r\n\"E06000036\",\"Bracknell Forest\",\"RTK\",35\r\n\"E06000036\",\"Bracknell Forest\",\"RJ1\",25\r\n\"E06000036\",\"Bracknell Forest\",\"RN5\",23\r\n\"E06000036\",\"Bracknell Forest\",\"RYJ\",20\r\n\"E06000036\",\"Bracknell Forest\",\"RXQ\",19\r\n\"E06000036\",\"Bracknell Forest\",\"RQM\",19\r\n\"E06000036\",\"Bracknell Forest\",\"RPY\",13\r\n\"E06000036\",\"Bracknell Forest\",\"RAS\",9\r\n\"E06000036\",\"Bracknell Forest\",\"RN3\",9\r\n\"E06000036\",\"Bracknell Forest\",\"RHU\",8\r\n\"E06000036\",\"Bracknell Forest\",\"REF\",8\r\n\"E06000036\",\"Bracknell Forest\",\"RXH\",7\r\n\"E06000036\",\"Bracknell Forest\",\"RDZ\",7\r\n\"E06000036\",\"Bracknell Forest\",\"RT3\",7\r\n\"E06000036\",\"Bracknell Forest\",\"RH8\",7\r\n\"E06000036\",\"Bracknell Forest\",\"R1K\",7\r\n\"E06000036\",\"Bracknell Forest\",\"RA9\",6\r\n\"E06000036\",\"Bracknell Forest\",\"R1H\",6\r\n\"E06000036\",\"Bracknell Forest\",\"RP6\",6\r\n\"E06000036\",\"Bracknell Forest\",\"RYR\",5\r\n\"E06000036\",\"Bracknell Forest\",\"RA7\",5\r\n\"E06000036\",\"Bracknell Forest\",\"RA4\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RGT\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RTD\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RAX\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RBZ\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RK9\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RRV\",5\r\n\"E06000036\",\"Bracknell Forest\",\"RGN\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RLQ\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RXC\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RXW\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RD1\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RD3\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RJ2\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RTP\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RNZ\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RWG\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RC9\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RCB\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RRK\",4\r\n\"E06000036\",\"Bracknell Forest\",\"RAL\",2\r\n\"E06000036\",\"Bracknell Forest\",\"REM\",3\r\n\"E06000036\",\"Bracknell Forest\",\"RK5\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RWE\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RWP\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RXP\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RM1\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RDD\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RX1\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RXX\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RBD\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RFF\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RJZ\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RL4\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RWH\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RKB\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RVV\",2\r\n\"E06000036\",\"Bracknell Forest\",\"RPC\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RCX\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RJC\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RP1\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RP4\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RPA\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RQX\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RTE\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RTR\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RVJ\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RVR\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RWK\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RBK\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RDY\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RET\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RXL\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RA3\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RCF\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RJR\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RAJ\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RD8\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RGR\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RJ8\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RXF\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RJ6\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RMC\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RTF\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RWF\",1\r\n\"E06000036\",\"Bracknell Forest\",\"R1F\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RNS\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RQ8\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RXN\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RJE\",1\r\n\"E06000036\",\"Bracknell Forest\",\"RNL\",1\r\n\"E06000037\",\"West Berkshire\",\"RHW\",8421\r\n\"E06000037\",\"West Berkshire\",\"RN5\",2682\r\n\"E06000037\",\"West Berkshire\",\"RN3\",1485\r\n\"E06000037\",\"West Berkshire\",\"RTH\",610\r\n\"E06000037\",\"West Berkshire\",\"RWX\",172\r\n\"E06000037\",\"West Berkshire\",\"RDU\",100\r\n\"E06000037\",\"West Berkshire\",\"RHM\",56\r\n\"E06000037\",\"West Berkshire\",\"RA2\",25\r\n\"E06000037\",\"West Berkshire\",\"RYJ\",24\r\n\"E06000037\",\"West Berkshire\",\"RNZ\",20\r\n\"E06000037\",\"West Berkshire\",\"RT3\",18\r\n\"E06000037\",\"West Berkshire\",\"R1H\",16\r\n\"E06000037\",\"West Berkshire\",\"RVJ\",15\r\n\"E06000037\",\"West Berkshire\",\"RQM\",14\r\n\"E06000037\",\"West Berkshire\",\"RA7\",12\r\n\"E06000037\",\"West Berkshire\",\"RHU\",12\r\n\"E06000037\",\"West Berkshire\",\"RA9\",12\r\n\"E06000037\",\"West Berkshire\",\"RJ1\",11\r\n\"E06000037\",\"West Berkshire\",\"RXQ\",11\r\n\"E06000037\",\"West Berkshire\",\"REF\",10\r\n\"E06000037\",\"West Berkshire\",\"RRV\",10\r\n\"E06000037\",\"West Berkshire\",\"RDZ\",9\r\n\"E06000037\",\"West Berkshire\",\"RRK\",11\r\n\"E06000037\",\"West Berkshire\",\"RBD\",7\r\n\"E06000037\",\"West Berkshire\",\"RD1\",7\r\n\"E06000037\",\"West Berkshire\",\"RK9\",7\r\n\"E06000037\",\"West Berkshire\",\"RJC\",7\r\n\"E06000037\",\"West Berkshire\",\"RH8\",7\r\n\"E06000037\",\"West Berkshire\",\"RTE\",7\r\n\"E06000037\",\"West Berkshire\",\"RW1\",7\r\n\"E06000037\",\"West Berkshire\",\"R1K\",7\r\n\"E06000037\",\"West Berkshire\",\"RYR\",7\r\n\"E06000037\",\"West Berkshire\",\"RD3\",6\r\n\"E06000037\",\"West Berkshire\",\"RJ7\",6\r\n\"E06000037\",\"West Berkshire\",\"RJ2\",6\r\n\"E06000037\",\"West Berkshire\",\"RLQ\",5\r\n\"E06000037\",\"West Berkshire\",\"RPY\",5\r\n\"E06000037\",\"West Berkshire\",\"RKB\",5\r\n\"E06000037\",\"West Berkshire\",\"RAL\",5\r\n\"E06000037\",\"West Berkshire\",\"RM1\",5\r\n\"E06000037\",\"West Berkshire\",\"RVR\",5\r\n\"E06000037\",\"West Berkshire\",\"RA3\",4\r\n\"E06000037\",\"West Berkshire\",\"RD8\",4\r\n\"E06000037\",\"West Berkshire\",\"RTD\",4\r\n\"E06000037\",\"West Berkshire\",\"RVV\",4\r\n\"E06000037\",\"West Berkshire\",\"RC9\",4\r\n\"E06000037\",\"West Berkshire\",\"RCB\",4\r\n\"E06000037\",\"West Berkshire\",\"RBA\",4\r\n\"E06000037\",\"West Berkshire\",\"RAX\",3\r\n\"E06000037\",\"West Berkshire\",\"RP6\",3\r\n\"E06000037\",\"West Berkshire\",\"RWD\",3\r\n\"E06000037\",\"West Berkshire\",\"RBZ\",3\r\n\"E06000037\",\"West Berkshire\",\"RGR\",3\r\n\"E06000037\",\"West Berkshire\",\"RGT\",3\r\n\"E06000037\",\"West Berkshire\",\"R0A\",2\r\n\"E06000037\",\"West Berkshire\",\"RTF\",2\r\n\"E06000037\",\"West Berkshire\",\"RQW\",2\r\n\"E06000037\",\"West Berkshire\",\"RTP\",2\r\n\"E06000037\",\"West Berkshire\",\"RDE\",2\r\n\"E06000037\",\"West Berkshire\",\"RFR\",2\r\n\"E06000037\",\"West Berkshire\",\"RXC\",2\r\n\"E06000037\",\"West Berkshire\",\"RC1\",2\r\n\"E06000037\",\"West Berkshire\",\"RJ8\",2\r\n\"E06000037\",\"West Berkshire\",\"REM\",2\r\n\"E06000037\",\"West Berkshire\",\"RTX\",2\r\n\"E06000037\",\"West Berkshire\",\"RXW\",3\r\n\"E06000037\",\"West Berkshire\",\"RNS\",2\r\n\"E06000037\",\"West Berkshire\",\"RWW\",2\r\n\"E06000037\",\"West Berkshire\",\"RWH\",2\r\n\"E06000037\",\"West Berkshire\",\"RFF\",2\r\n\"E06000037\",\"West Berkshire\",\"RGN\",2\r\n\"E06000037\",\"West Berkshire\",\"RWP\",2\r\n\"E06000037\",\"West Berkshire\",\"RDD\",1\r\n\"E06000037\",\"West Berkshire\",\"RFS\",1\r\n\"E06000037\",\"West Berkshire\",\"RGP\",1\r\n\"E06000037\",\"West Berkshire\",\"RP4\",1\r\n\"E06000037\",\"West Berkshire\",\"RAE\",1\r\n\"E06000037\",\"West Berkshire\",\"RBT\",1\r\n\"E06000037\",\"West Berkshire\",\"RJE\",1\r\n\"E06000037\",\"West Berkshire\",\"RVY\",1\r\n\"E06000037\",\"West Berkshire\",\"RBN\",1\r\n\"E06000037\",\"West Berkshire\",\"RBS\",1\r\n\"E06000037\",\"West Berkshire\",\"RAP\",1\r\n\"E06000037\",\"West Berkshire\",\"RK5\",1\r\n\"E06000037\",\"West Berkshire\",\"RTK\",1\r\n\"E06000037\",\"West Berkshire\",\"RWE\",1\r\n\"E06000037\",\"West Berkshire\",\"RXH\",1\r\n\"E06000037\",\"West Berkshire\",\"RV5\",1\r\n\"E06000037\",\"West Berkshire\",\"RWG\",1\r\n\"E06000037\",\"West Berkshire\",\"R1F\",1\r\n\"E06000037\",\"West Berkshire\",\"RAN\",1\r\n\"E06000037\",\"West Berkshire\",\"RCX\",1\r\n\"E06000037\",\"West Berkshire\",\"RET\",1\r\n\"E06000037\",\"West Berkshire\",\"RNQ\",1\r\n\"E06000037\",\"West Berkshire\",\"RX1\",1\r\n\"E06000037\",\"West Berkshire\",\"RGM\",1\r\n\"E06000037\",\"West Berkshire\",\"RJZ\",1\r\n\"E06000037\",\"West Berkshire\",\"RNU\",1\r\n\"E06000037\",\"West Berkshire\",\"RP5\",1\r\n\"E06000037\",\"West Berkshire\",\"RQ8\",1\r\n\"E06000037\",\"West Berkshire\",\"RTG\",1\r\n\"E06000037\",\"West Berkshire\",\"RXK\",1\r\n\"E06000038\",\"Reading\",\"RHW\",14750\r\n\"E06000038\",\"Reading\",\"RTH\",362\r\n\"E06000038\",\"Reading\",\"RWX\",249\r\n\"E06000038\",\"Reading\",\"RDU\",122\r\n\"E06000038\",\"Reading\",\"RN5\",36\r\n\"E06000038\",\"Reading\",\"RXQ\",27\r\n\"E06000038\",\"Reading\",\"RHM\",23\r\n\"E06000038\",\"Reading\",\"RYJ\",20\r\n\"E06000038\",\"Reading\",\"RQM\",14\r\n\"E06000038\",\"Reading\",\"RJ1\",14\r\n\"E06000038\",\"Reading\",\"RJ7\",14\r\n\"E06000038\",\"Reading\",\"R1K\",13\r\n\"E06000038\",\"Reading\",\"RA2\",13\r\n\"E06000038\",\"Reading\",\"RRV\",11\r\n\"E06000038\",\"Reading\",\"R1H\",10\r\n\"E06000038\",\"Reading\",\"RYR\",9\r\n\"E06000038\",\"Reading\",\"RT3\",9\r\n\"E06000038\",\"Reading\",\"RBZ\",8\r\n\"E06000038\",\"Reading\",\"RAS\",8\r\n\"E06000038\",\"Reading\",\"RD3\",8\r\n\"E06000038\",\"Reading\",\"RN3\",8\r\n\"E06000038\",\"Reading\",\"REF\",7\r\n\"E06000038\",\"Reading\",\"RAL\",7\r\n\"E06000038\",\"Reading\",\"RPY\",6\r\n\"E06000038\",\"Reading\",\"RTE\",6\r\n\"E06000038\",\"Reading\",\"RJZ\",5\r\n\"E06000038\",\"Reading\",\"RBD\",5\r\n\"E06000038\",\"Reading\",\"RD8\",5\r\n\"E06000038\",\"Reading\",\"RA7\",5\r\n\"E06000038\",\"Reading\",\"RBA\",5\r\n\"E06000038\",\"Reading\",\"RK9\",5\r\n\"E06000038\",\"Reading\",\"RDZ\",5\r\n\"E06000038\",\"Reading\",\"RXC\",5\r\n\"E06000038\",\"Reading\",\"RBK\",4\r\n\"E06000038\",\"Reading\",\"RNZ\",4\r\n\"E06000038\",\"Reading\",\"RDD\",4\r\n\"E06000038\",\"Reading\",\"RNS\",4\r\n\"E06000038\",\"Reading\",\"RAE\",4\r\n\"E06000038\",\"Reading\",\"RD1\",4\r\n\"E06000038\",\"Reading\",\"RTK\",4\r\n\"E06000038\",\"Reading\",\"RRK\",6\r\n\"E06000038\",\"Reading\",\"RWE\",4\r\n\"E06000038\",\"Reading\",\"RA3\",3\r\n\"E06000038\",\"Reading\",\"RAX\",3\r\n\"E06000038\",\"Reading\",\"RXK\",3\r\n\"E06000038\",\"Reading\",\"RLQ\",3\r\n\"E06000038\",\"Reading\",\"RA9\",3\r\n\"E06000038\",\"Reading\",\"RWF\",3\r\n\"E06000038\",\"Reading\",\"RQX\",3\r\n\"E06000038\",\"Reading\",\"RXH\",3\r\n\"E06000038\",\"Reading\",\"RA4\",2\r\n\"E06000038\",\"Reading\",\"RGP\",2\r\n\"E06000038\",\"Reading\",\"RF4\",2\r\n\"E06000038\",\"Reading\",\"RGR\",2\r\n\"E06000038\",\"Reading\",\"RH8\",2\r\n\"E06000038\",\"Reading\",\"RHU\",2\r\n\"E06000038\",\"Reading\",\"RM1\",2\r\n\"E06000038\",\"Reading\",\"RNU\",2\r\n\"E06000038\",\"Reading\",\"RTD\",2\r\n\"E06000038\",\"Reading\",\"RGN\",2\r\n\"E06000038\",\"Reading\",\"R1F\",2\r\n\"E06000038\",\"Reading\",\"RJ6\",2\r\n\"E06000038\",\"Reading\",\"RJC\",2\r\n\"E06000038\",\"Reading\",\"RQ8\",2\r\n\"E06000038\",\"Reading\",\"RVJ\",2\r\n\"E06000038\",\"Reading\",\"RCX\",2\r\n\"E06000038\",\"Reading\",\"RK5\",2\r\n\"E06000038\",\"Reading\",\"RKE\",2\r\n\"E06000038\",\"Reading\",\"RTP\",2\r\n\"E06000038\",\"Reading\",\"RAP\",2\r\n\"E06000038\",\"Reading\",\"RWH\",2\r\n\"E06000038\",\"Reading\",\"RXW\",2\r\n\"E06000038\",\"Reading\",\"RHQ\",2\r\n\"E06000038\",\"Reading\",\"RQ3\",2\r\n\"E06000038\",\"Reading\",\"RKB\",1\r\n\"E06000038\",\"Reading\",\"RNA\",1\r\n\"E06000038\",\"Reading\",\"RWA\",1\r\n\"E06000038\",\"Reading\",\"RAJ\",1\r\n\"E06000038\",\"Reading\",\"RDE\",1\r\n\"E06000038\",\"Reading\",\"RRF\",1\r\n\"E06000038\",\"Reading\",\"RTG\",2\r\n\"E06000038\",\"Reading\",\"RVR\",1\r\n\"E06000038\",\"Reading\",\"RWK\",1\r\n\"E06000038\",\"Reading\",\"RDY\",1\r\n\"E06000038\",\"Reading\",\"RWY\",1\r\n\"E06000038\",\"Reading\",\"RGT\",1\r\n\"E06000038\",\"Reading\",\"RMP\",1\r\n\"E06000038\",\"Reading\",\"RMY\",1\r\n\"E06000038\",\"Reading\",\"RPC\",1\r\n\"E06000038\",\"Reading\",\"RTF\",1\r\n\"E06000038\",\"Reading\",\"RTX\",1\r\n\"E06000038\",\"Reading\",\"RV3\",1\r\n\"E06000038\",\"Reading\",\"RWD\",1\r\n\"E06000038\",\"Reading\",\"RLT\",1\r\n\"E06000038\",\"Reading\",\"RFR\",1\r\n\"E06000038\",\"Reading\",\"RFS\",1\r\n\"E06000038\",\"Reading\",\"RL4\",1\r\n\"E06000038\",\"Reading\",\"RW6\",1\r\n\"E06000038\",\"Reading\",\"RWP\",1\r\n\"E06000038\",\"Reading\",\"RX1\",1\r\n\"E06000038\",\"Reading\",\"RCB\",1\r\n\"E06000038\",\"Reading\",\"RJ2\",1\r\n\"E06000038\",\"Reading\",\"RXF\",1\r\n\"E06000038\",\"Reading\",\"R0A\",1\r\n\"E06000038\",\"Reading\",\"REM\",1\r\n\"E06000039\",\"Slough\",\"RDU\",18231\r\n\"E06000039\",\"Slough\",\"RTH\",252\r\n\"E06000039\",\"Slough\",\"RXQ\",244\r\n\"E06000039\",\"Slough\",\"RHW\",216\r\n\"E06000039\",\"Slough\",\"RWX\",149\r\n\"E06000039\",\"Slough\",\"R1K\",146\r\n\"E06000039\",\"Slough\",\"RAS\",94\r\n\"E06000039\",\"Slough\",\"RQM\",90\r\n\"E06000039\",\"Slough\",\"RYJ\",69\r\n\"E06000039\",\"Slough\",\"RTK\",22\r\n\"E06000039\",\"Slough\",\"RWH\",19\r\n\"E06000039\",\"Slough\",\"RRV\",23\r\n\"E06000039\",\"Slough\",\"RJ1\",16\r\n\"E06000039\",\"Slough\",\"RHM\",14\r\n\"E06000039\",\"Slough\",\"RJ7\",14\r\n\"E06000039\",\"Slough\",\"RT3\",14\r\n\"E06000039\",\"Slough\",\"R1H\",13\r\n\"E06000039\",\"Slough\",\"RAL\",13\r\n\"E06000039\",\"Slough\",\"RWG\",13\r\n\"E06000039\",\"Slough\",\"RYR\",11\r\n\"E06000039\",\"Slough\",\"RF4\",10\r\n\"E06000039\",\"Slough\",\"RAX\",9\r\n\"E06000039\",\"Slough\",\"RP6\",9\r\n\"E06000039\",\"Slough\",\"RDZ\",8\r\n\"E06000039\",\"Slough\",\"RPA\",8\r\n\"E06000039\",\"Slough\",\"RC9\",7\r\n\"E06000039\",\"Slough\",\"RRK\",8\r\n\"E06000039\",\"Slough\",\"RA2\",7\r\n\"E06000039\",\"Slough\",\"RJZ\",6\r\n\"E06000039\",\"Slough\",\"RVR\",6\r\n\"E06000039\",\"Slough\",\"RW6\",6\r\n\"E06000039\",\"Slough\",\"R1F\",5\r\n\"E06000039\",\"Slough\",\"RD8\",5\r\n\"E06000039\",\"Slough\",\"RHU\",5\r\n\"E06000039\",\"Slough\",\"RXK\",8\r\n\"E06000039\",\"Slough\",\"RLQ\",5\r\n\"E06000039\",\"Slough\",\"RDE\",5\r\n\"E06000039\",\"Slough\",\"RN3\",5\r\n\"E06000039\",\"Slough\",\"RN5\",5\r\n\"E06000039\",\"Slough\",\"RQX\",4\r\n\"E06000039\",\"Slough\",\"RNZ\",4\r\n\"E06000039\",\"Slough\",\"RGP\",4\r\n\"E06000039\",\"Slough\",\"RNS\",4\r\n\"E06000039\",\"Slough\",\"RTP\",4\r\n\"E06000039\",\"Slough\",\"RR8\",3\r\n\"E06000039\",\"Slough\",\"RP4\",3\r\n\"E06000039\",\"Slough\",\"RA9\",3\r\n\"E06000039\",\"Slough\",\"RA7\",3\r\n\"E06000039\",\"Slough\",\"RVV\",3\r\n\"E06000039\",\"Slough\",\"RJE\",3\r\n\"E06000039\",\"Slough\",\"RVJ\",3\r\n\"E06000039\",\"Slough\",\"RAP\",3\r\n\"E06000039\",\"Slough\",\"RKB\",3\r\n\"E06000039\",\"Slough\",\"RL4\",3\r\n\"E06000039\",\"Slough\",\"R0A\",2\r\n\"E06000039\",\"Slough\",\"REM\",2\r\n\"E06000039\",\"Slough\",\"RWW\",2\r\n\"E06000039\",\"Slough\",\"RC1\",2\r\n\"E06000039\",\"Slough\",\"REF\",2\r\n\"E06000039\",\"Slough\",\"RMC\",2\r\n\"E06000039\",\"Slough\",\"RX1\",2\r\n\"E06000039\",\"Slough\",\"RXX\",2\r\n\"E06000039\",\"Slough\",\"RWF\",1\r\n\"E06000039\",\"Slough\",\"RAT\",1\r\n\"E06000039\",\"Slough\",\"RGT\",1\r\n\"E06000039\",\"Slough\",\"RQ8\",1\r\n\"E06000039\",\"Slough\",\"RX3\",1\r\n\"E06000039\",\"Slough\",\"RXH\",1\r\n\"E06000039\",\"Slough\",\"RBZ\",1\r\n\"E06000039\",\"Slough\",\"RFF\",1\r\n\"E06000039\",\"Slough\",\"RK9\",1\r\n\"E06000039\",\"Slough\",\"RN7\",1\r\n\"E06000039\",\"Slough\",\"RNU\",1\r\n\"E06000039\",\"Slough\",\"RXG\",1\r\n\"E06000039\",\"Slough\",\"RAN\",1\r\n\"E06000039\",\"Slough\",\"RTF\",1\r\n\"E06000039\",\"Slough\",\"RWE\",1\r\n\"E06000039\",\"Slough\",\"RAE\",1\r\n\"E06000039\",\"Slough\",\"RAJ\",1\r\n\"E06000039\",\"Slough\",\"RTD\",1\r\n\"E06000039\",\"Slough\",\"RTE\",1\r\n\"E06000039\",\"Slough\",\"RXC\",1\r\n\"E06000039\",\"Slough\",\"RBA\",1\r\n\"E06000039\",\"Slough\",\"RBK\",1\r\n\"E06000039\",\"Slough\",\"RBD\",1\r\n\"E06000039\",\"Slough\",\"RCB\",1\r\n\"E06000039\",\"Slough\",\"RJ2\",1\r\n\"E06000039\",\"Slough\",\"RJ6\",1\r\n\"E06000039\",\"Slough\",\"RM1\",1\r\n\"E06000039\",\"Slough\",\"RNQ\",1\r\n\"E06000039\",\"Slough\",\"RA4\",1\r\n\"E06000039\",\"Slough\",\"RD3\",1\r\n\"E06000039\",\"Slough\",\"RTX\",1\r\n\"E06000039\",\"Slough\",\"RWA\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RDU\",15264\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RHW\",628\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXQ\",291\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTH\",257\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTK\",238\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWX\",135\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RYJ\",79\r\n\"E06000040\",\"Windsor and Maidenhead\",\"R1K\",60\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RA2\",50\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RQM\",44\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RAS\",34\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJ7\",26\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RRV\",23\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJ1\",22\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RHM\",20\r\n\"E06000040\",\"Windsor and Maidenhead\",\"R1H\",19\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RT3\",17\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RPY\",16\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWH\",14\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RN5\",12\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RAX\",11\r\n\"E06000040\",\"Windsor and Maidenhead\",\"REF\",11\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RD3\",9\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJZ\",8\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RAL\",8\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWG\",8\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RP6\",7\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RVR\",7\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RK9\",7\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RA7\",6\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RA9\",6\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXC\",6\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RN3\",5\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RD8\",5\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWE\",5\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RDZ\",5\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXH\",5\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RD1\",4\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RM1\",4\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RVJ\",4\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RC1\",4\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RCB\",4\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RYR\",4\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RHU\",4\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RRK\",6\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJC\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RNZ\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RHQ\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RC9\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTX\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RKE\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RAN\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWF\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"R1F\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RR8\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RCX\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"REM\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWJ\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXW\",3\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWY\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTD\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RFS\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RGT\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RH8\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTG\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RBZ\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RGN\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJ2\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RNU\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTE\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RW1\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RAE\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RBK\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXT\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXX\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJN\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RN7\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RP5\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RQX\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJL\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RNL\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTP\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RJE\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RWP\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXK\",2\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RA4\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RP4\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RQW\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTR\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RBD\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RVW\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RBL\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RNS\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RX1\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"R0A\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RBT\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RCU\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RGM\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RGR\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RNA\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RTF\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RVY\",1\r\n\"E06000040\",\"Windsor and Maidenhead\",\"RXR\",1\r\n\"E06000041\",\"Wokingham\",\"RHW\",11742\r\n\"E06000041\",\"Wokingham\",\"RDU\",1067\r\n\"E06000041\",\"Wokingham\",\"RTH\",320\r\n\"E06000041\",\"Wokingham\",\"RWX\",158\r\n\"E06000041\",\"Wokingham\",\"RN5\",40\r\n\"E06000041\",\"Wokingham\",\"RA2\",33\r\n\"E06000041\",\"Wokingham\",\"RXQ\",30\r\n\"E06000041\",\"Wokingham\",\"RYJ\",19\r\n\"E06000041\",\"Wokingham\",\"RJ7\",18\r\n\"E06000041\",\"Wokingham\",\"RHM\",17\r\n\"E06000041\",\"Wokingham\",\"R1H\",17\r\n\"E06000041\",\"Wokingham\",\"RJ1\",14\r\n\"E06000041\",\"Wokingham\",\"RTK\",12\r\n\"E06000041\",\"Wokingham\",\"REF\",12\r\n\"E06000041\",\"Wokingham\",\"RRV\",12\r\n\"E06000041\",\"Wokingham\",\"RDZ\",11\r\n\"E06000041\",\"Wokingham\",\"RAS\",10\r\n\"E06000041\",\"Wokingham\",\"RQM\",9\r\n\"E06000041\",\"Wokingham\",\"R1K\",8\r\n\"E06000041\",\"Wokingham\",\"RP6\",8\r\n\"E06000041\",\"Wokingham\",\"RPY\",8\r\n\"E06000041\",\"Wokingham\",\"RVR\",8\r\n\"E06000041\",\"Wokingham\",\"R0A\",8\r\n\"E06000041\",\"Wokingham\",\"RBD\",7\r\n\"E06000041\",\"Wokingham\",\"RTE\",7\r\n\"E06000041\",\"Wokingham\",\"RRK\",8\r\n\"E06000041\",\"Wokingham\",\"RJZ\",6\r\n\"E06000041\",\"Wokingham\",\"RN3\",6\r\n\"E06000041\",\"Wokingham\",\"RBA\",6\r\n\"E06000041\",\"Wokingham\",\"RJC\",5\r\n\"E06000041\",\"Wokingham\",\"RAL\",5\r\n\"E06000041\",\"Wokingham\",\"RKB\",5\r\n\"E06000041\",\"Wokingham\",\"RYR\",5\r\n\"E06000041\",\"Wokingham\",\"RD8\",4\r\n\"E06000041\",\"Wokingham\",\"RJ6\",4\r\n\"E06000041\",\"Wokingham\",\"RVV\",4\r\n\"E06000041\",\"Wokingham\",\"RA7\",4\r\n\"E06000041\",\"Wokingham\",\"RD3\",4\r\n\"E06000041\",\"Wokingham\",\"RH8\",4\r\n\"E06000041\",\"Wokingham\",\"RWG\",4\r\n\"E06000041\",\"Wokingham\",\"RT3\",4\r\n\"E06000041\",\"Wokingham\",\"R1F\",3\r\n\"E06000041\",\"Wokingham\",\"RAX\",3\r\n\"E06000041\",\"Wokingham\",\"RBZ\",3\r\n\"E06000041\",\"Wokingham\",\"RHU\",3\r\n\"E06000041\",\"Wokingham\",\"RK9\",3\r\n\"E06000041\",\"Wokingham\",\"RNZ\",3\r\n\"E06000041\",\"Wokingham\",\"RA3\",3\r\n\"E06000041\",\"Wokingham\",\"RA9\",3\r\n\"E06000041\",\"Wokingham\",\"RJE\",3\r\n\"E06000041\",\"Wokingham\",\"RVJ\",3\r\n\"E06000041\",\"Wokingham\",\"RXK\",3\r\n\"E06000041\",\"Wokingham\",\"RA4\",3\r\n\"E06000041\",\"Wokingham\",\"RCX\",3\r\n\"E06000041\",\"Wokingham\",\"RBN\",3\r\n\"E06000041\",\"Wokingham\",\"RGP\",2\r\n\"E06000041\",\"Wokingham\",\"RQ8\",2\r\n\"E06000041\",\"Wokingham\",\"RXP\",2\r\n\"E06000041\",\"Wokingham\",\"RTP\",2\r\n\"E06000041\",\"Wokingham\",\"RGT\",2\r\n\"E06000041\",\"Wokingham\",\"RWE\",2\r\n\"E06000041\",\"Wokingham\",\"RWW\",2\r\n\"E06000041\",\"Wokingham\",\"RXW\",2\r\n\"E06000041\",\"Wokingham\",\"RXH\",2\r\n\"E06000041\",\"Wokingham\",\"RCB\",2\r\n\"E06000041\",\"Wokingham\",\"RCF\",2\r\n\"E06000041\",\"Wokingham\",\"RC1\",2\r\n\"E06000041\",\"Wokingham\",\"RFS\",2\r\n\"E06000041\",\"Wokingham\",\"RTX\",2\r\n\"E06000041\",\"Wokingham\",\"RXN\",2\r\n\"E06000041\",\"Wokingham\",\"RJ2\",3\r\n\"E06000041\",\"Wokingham\",\"RAE\",1\r\n\"E06000041\",\"Wokingham\",\"RBK\",1\r\n\"E06000041\",\"Wokingham\",\"RBQ\",1\r\n\"E06000041\",\"Wokingham\",\"RD1\",1\r\n\"E06000041\",\"Wokingham\",\"RJN\",1\r\n\"E06000041\",\"Wokingham\",\"RKE\",1\r\n\"E06000041\",\"Wokingham\",\"RW1\",1\r\n\"E06000041\",\"Wokingham\",\"RWH\",1\r\n\"E06000041\",\"Wokingham\",\"RWK\",1\r\n\"E06000041\",\"Wokingham\",\"RAN\",1\r\n\"E06000041\",\"Wokingham\",\"RTQ\",1\r\n\"E06000041\",\"Wokingham\",\"RTR\",1\r\n\"E06000041\",\"Wokingham\",\"RXC\",1\r\n\"E06000041\",\"Wokingham\",\"RC9\",1\r\n\"E06000041\",\"Wokingham\",\"RDE\",1\r\n\"E06000041\",\"Wokingham\",\"RXF\",1\r\n\"E06000041\",\"Wokingham\",\"RCD\",1\r\n\"E06000041\",\"Wokingham\",\"RNQ\",1\r\n\"E06000041\",\"Wokingham\",\"RPA\",1\r\n\"E06000041\",\"Wokingham\",\"RBL\",1\r\n\"E06000041\",\"Wokingham\",\"RF4\",1\r\n\"E06000041\",\"Wokingham\",\"RGN\",1\r\n\"E06000041\",\"Wokingham\",\"RQW\",1\r\n\"E06000041\",\"Wokingham\",\"RGR\",1\r\n\"E06000041\",\"Wokingham\",\"RJR\",1\r\n\"E06000041\",\"Wokingham\",\"RMP\",1\r\n\"E06000041\",\"Wokingham\",\"RW6\",1\r\n\"E06000041\",\"Wokingham\",\"RDD\",1\r\n\"E06000041\",\"Wokingham\",\"RM1\",1\r\n\"E06000041\",\"Wokingham\",\"RTD\",1\r\n\"E06000041\",\"Wokingham\",\"RWP\",1\r\n\"E06000041\",\"Wokingham\",\"RHQ\",1\r\n\"E06000041\",\"Wokingham\",\"RJL\",1\r\n\"E06000041\",\"Wokingham\",\"RNN\",1\r\n\"E06000041\",\"Wokingham\",\"RQX\",1\r\n\"E06000041\",\"Wokingham\",\"RR8\",1\r\n\"E06000041\",\"Wokingham\",\"RTF\",1\r\n\"E06000041\",\"Wokingham\",\"RW5\",1\r\n\"E06000042\",\"Milton Keynes\",\"RD8\",30803\r\n\"E06000042\",\"Milton Keynes\",\"RTH\",967\r\n\"E06000042\",\"Milton Keynes\",\"RNS\",393\r\n\"E06000042\",\"Milton Keynes\",\"RV3\",316\r\n\"E06000042\",\"Milton Keynes\",\"RXQ\",291\r\n\"E06000042\",\"Milton Keynes\",\"RC1\",245\r\n\"E06000042\",\"Milton Keynes\",\"RC9\",218\r\n\"E06000042\",\"Milton Keynes\",\"RGT\",43\r\n\"E06000042\",\"Milton Keynes\",\"R1H\",36\r\n\"E06000042\",\"Milton Keynes\",\"RNQ\",29\r\n\"E06000042\",\"Milton Keynes\",\"RJ1\",29\r\n\"E06000042\",\"Milton Keynes\",\"RKB\",25\r\n\"E06000042\",\"Milton Keynes\",\"RRV\",28\r\n\"E06000042\",\"Milton Keynes\",\"RYJ\",22\r\n\"E06000042\",\"Milton Keynes\",\"R1K\",22\r\n\"E06000042\",\"Milton Keynes\",\"RQM\",21\r\n\"E06000042\",\"Milton Keynes\",\"RWH\",18\r\n\"E06000042\",\"Milton Keynes\",\"RP1\",16\r\n\"E06000042\",\"Milton Keynes\",\"RWG\",16\r\n\"E06000042\",\"Milton Keynes\",\"RJZ\",15\r\n\"E06000042\",\"Milton Keynes\",\"RAL\",14\r\n\"E06000042\",\"Milton Keynes\",\"RHM\",14\r\n\"E06000042\",\"Milton Keynes\",\"RTE\",13\r\n\"E06000042\",\"Milton Keynes\",\"RK9\",13\r\n\"E06000042\",\"Milton Keynes\",\"RDE\",12\r\n\"E06000042\",\"Milton Keynes\",\"RT3\",12\r\n\"E06000042\",\"Milton Keynes\",\"RWD\",11\r\n\"E06000042\",\"Milton Keynes\",\"RWK\",10\r\n\"E06000042\",\"Milton Keynes\",\"RRK\",18\r\n\"E06000042\",\"Milton Keynes\",\"RCX\",9\r\n\"E06000042\",\"Milton Keynes\",\"RGN\",9\r\n\"E06000042\",\"Milton Keynes\",\"RWE\",9\r\n\"E06000042\",\"Milton Keynes\",\"RDZ\",8\r\n\"E06000042\",\"Milton Keynes\",\"REF\",8\r\n\"E06000042\",\"Milton Keynes\",\"RAS\",8\r\n\"E06000042\",\"Milton Keynes\",\"RVV\",8\r\n\"E06000042\",\"Milton Keynes\",\"RH8\",7\r\n\"E06000042\",\"Milton Keynes\",\"RD3\",7\r\n\"E06000042\",\"Milton Keynes\",\"RP6\",7\r\n\"E06000042\",\"Milton Keynes\",\"RGP\",6\r\n\"E06000042\",\"Milton Keynes\",\"R0A\",6\r\n\"E06000042\",\"Milton Keynes\",\"RXL\",5\r\n\"E06000042\",\"Milton Keynes\",\"RBZ\",5\r\n\"E06000042\",\"Milton Keynes\",\"RGR\",5\r\n\"E06000042\",\"Milton Keynes\",\"RHW\",5\r\n\"E06000042\",\"Milton Keynes\",\"RYR\",5\r\n\"E06000042\",\"Milton Keynes\",\"RX1\",5\r\n\"E06000042\",\"Milton Keynes\",\"RXK\",6\r\n\"E06000042\",\"Milton Keynes\",\"REM\",7\r\n\"E06000042\",\"Milton Keynes\",\"RA9\",5\r\n\"E06000042\",\"Milton Keynes\",\"RCB\",5\r\n\"E06000042\",\"Milton Keynes\",\"RDU\",5\r\n\"E06000042\",\"Milton Keynes\",\"RJ7\",4\r\n\"E06000042\",\"Milton Keynes\",\"RQX\",4\r\n\"E06000042\",\"Milton Keynes\",\"RN7\",4\r\n\"E06000042\",\"Milton Keynes\",\"RBA\",4\r\n\"E06000042\",\"Milton Keynes\",\"RJC\",4\r\n\"E06000042\",\"Milton Keynes\",\"RWF\",4\r\n\"E06000042\",\"Milton Keynes\",\"RF4\",4\r\n\"E06000042\",\"Milton Keynes\",\"RTG\",4\r\n\"E06000042\",\"Milton Keynes\",\"RDD\",4\r\n\"E06000042\",\"Milton Keynes\",\"RN5\",4\r\n\"E06000042\",\"Milton Keynes\",\"RTP\",4\r\n\"E06000042\",\"Milton Keynes\",\"RXH\",4\r\n\"E06000042\",\"Milton Keynes\",\"RXP\",4\r\n\"E06000042\",\"Milton Keynes\",\"RJ2\",3\r\n\"E06000042\",\"Milton Keynes\",\"RKE\",3\r\n\"E06000042\",\"Milton Keynes\",\"RM1\",3\r\n\"E06000042\",\"Milton Keynes\",\"RPA\",3\r\n\"E06000042\",\"Milton Keynes\",\"RXW\",3\r\n\"E06000042\",\"Milton Keynes\",\"RMP\",3\r\n\"E06000042\",\"Milton Keynes\",\"RPY\",3\r\n\"E06000042\",\"Milton Keynes\",\"RTX\",3\r\n\"E06000042\",\"Milton Keynes\",\"RVY\",3\r\n\"E06000042\",\"Milton Keynes\",\"RQW\",3\r\n\"E06000042\",\"Milton Keynes\",\"RAE\",3\r\n\"E06000042\",\"Milton Keynes\",\"RAN\",3\r\n\"E06000042\",\"Milton Keynes\",\"RQ8\",3\r\n\"E06000042\",\"Milton Keynes\",\"RA4\",3\r\n\"E06000042\",\"Milton Keynes\",\"RAP\",3\r\n\"E06000042\",\"Milton Keynes\",\"RAX\",3\r\n\"E06000042\",\"Milton Keynes\",\"RTK\",3\r\n\"E06000042\",\"Milton Keynes\",\"RA7\",3\r\n\"E06000042\",\"Milton Keynes\",\"RHA\",3\r\n\"E06000042\",\"Milton Keynes\",\"RNU\",3\r\n\"E06000042\",\"Milton Keynes\",\"RNZ\",3\r\n\"E06000042\",\"Milton Keynes\",\"RXC\",3\r\n\"E06000042\",\"Milton Keynes\",\"RD1\",2\r\n\"E06000042\",\"Milton Keynes\",\"RHQ\",2\r\n\"E06000042\",\"Milton Keynes\",\"R1F\",2\r\n\"E06000042\",\"Milton Keynes\",\"RBD\",2\r\n\"E06000042\",\"Milton Keynes\",\"RFF\",2\r\n\"E06000042\",\"Milton Keynes\",\"RW6\",2\r\n\"E06000042\",\"Milton Keynes\",\"RLQ\",2\r\n\"E06000042\",\"Milton Keynes\",\"RBN\",2\r\n\"E06000042\",\"Milton Keynes\",\"RJE\",2\r\n\"E06000042\",\"Milton Keynes\",\"RW1\",2\r\n\"E06000042\",\"Milton Keynes\",\"RA2\",2\r\n\"E06000042\",\"Milton Keynes\",\"RWA\",2\r\n\"E06000042\",\"Milton Keynes\",\"RAJ\",2\r\n\"E06000042\",\"Milton Keynes\",\"RFR\",2\r\n\"E06000042\",\"Milton Keynes\",\"RHU\",1\r\n\"E06000042\",\"Milton Keynes\",\"RR7\",1\r\n\"E06000042\",\"Milton Keynes\",\"RT5\",1\r\n\"E06000042\",\"Milton Keynes\",\"RTD\",1\r\n\"E06000042\",\"Milton Keynes\",\"RVJ\",1\r\n\"E06000042\",\"Milton Keynes\",\"RXT\",1\r\n\"E06000042\",\"Milton Keynes\",\"R0B\",1\r\n\"E06000042\",\"Milton Keynes\",\"RJ6\",1\r\n\"E06000042\",\"Milton Keynes\",\"RL4\",1\r\n\"E06000042\",\"Milton Keynes\",\"RGM\",1\r\n\"E06000042\",\"Milton Keynes\",\"RLT\",1\r\n\"E06000042\",\"Milton Keynes\",\"RVN\",1\r\n\"E06000042\",\"Milton Keynes\",\"RJN\",1\r\n\"E06000042\",\"Milton Keynes\",\"RK5\",1\r\n\"E06000042\",\"Milton Keynes\",\"RBK\",1\r\n\"E06000042\",\"Milton Keynes\",\"RBT\",1\r\n\"E06000042\",\"Milton Keynes\",\"RH5\",1\r\n\"E06000042\",\"Milton Keynes\",\"RN3\",1\r\n\"E06000042\",\"Milton Keynes\",\"R1L\",1\r\n\"E06000042\",\"Milton Keynes\",\"RA3\",1\r\n\"E06000042\",\"Milton Keynes\",\"RJR\",1\r\n\"E06000042\",\"Milton Keynes\",\"RNL\",1\r\n\"E06000042\",\"Milton Keynes\",\"RWJ\",1\r\n\"E06000042\",\"Milton Keynes\",\"RWY\",1\r\n\"E06000042\",\"Milton Keynes\",\"RBL\",1\r\n\"E06000042\",\"Milton Keynes\",\"RMC\",1\r\n\"E06000042\",\"Milton Keynes\",\"RXR\",1\r\n\"E06000042\",\"Milton Keynes\",\"RJL\",1\r\n\"E06000042\",\"Milton Keynes\",\"RM3\",1\r\n\"E06000042\",\"Milton Keynes\",\"RP4\",1\r\n\"E06000042\",\"Milton Keynes\",\"RTF\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RXH\",19212\r\n\"E06000043\",\"Brighton and Hove\",\"RYR\",685\r\n\"E06000043\",\"Brighton and Hove\",\"RX2\",295\r\n\"E06000043\",\"Brighton and Hove\",\"RPC\",206\r\n\"E06000043\",\"Brighton and Hove\",\"RXC\",62\r\n\"E06000043\",\"Brighton and Hove\",\"RJ1\",58\r\n\"E06000043\",\"Brighton and Hove\",\"RJ7\",44\r\n\"E06000043\",\"Brighton and Hove\",\"RTP\",42\r\n\"E06000043\",\"Brighton and Hove\",\"RPY\",32\r\n\"E06000043\",\"Brighton and Hove\",\"RJZ\",32\r\n\"E06000043\",\"Brighton and Hove\",\"RA2\",30\r\n\"E06000043\",\"Brighton and Hove\",\"RYJ\",27\r\n\"E06000043\",\"Brighton and Hove\",\"RRV\",28\r\n\"E06000043\",\"Brighton and Hove\",\"R1H\",26\r\n\"E06000043\",\"Brighton and Hove\",\"RWF\",26\r\n\"E06000043\",\"Brighton and Hove\",\"RHU\",20\r\n\"E06000043\",\"Brighton and Hove\",\"RHM\",16\r\n\"E06000043\",\"Brighton and Hove\",\"RQM\",16\r\n\"E06000043\",\"Brighton and Hove\",\"RDZ\",16\r\n\"E06000043\",\"Brighton and Hove\",\"RT3\",16\r\n\"E06000043\",\"Brighton and Hove\",\"R1F\",14\r\n\"E06000043\",\"Brighton and Hove\",\"R1K\",14\r\n\"E06000043\",\"Brighton and Hove\",\"RDU\",13\r\n\"E06000043\",\"Brighton and Hove\",\"RVR\",12\r\n\"E06000043\",\"Brighton and Hove\",\"RD3\",10\r\n\"E06000043\",\"Brighton and Hove\",\"REF\",10\r\n\"E06000043\",\"Brighton and Hove\",\"RTH\",10\r\n\"E06000043\",\"Brighton and Hove\",\"RVV\",10\r\n\"E06000043\",\"Brighton and Hove\",\"R0A\",9\r\n\"E06000043\",\"Brighton and Hove\",\"RAX\",9\r\n\"E06000043\",\"Brighton and Hove\",\"RVJ\",9\r\n\"E06000043\",\"Brighton and Hove\",\"RN7\",8\r\n\"E06000043\",\"Brighton and Hove\",\"RQX\",8\r\n\"E06000043\",\"Brighton and Hove\",\"RAL\",8\r\n\"E06000043\",\"Brighton and Hove\",\"RGT\",7\r\n\"E06000043\",\"Brighton and Hove\",\"RJ2\",12\r\n\"E06000043\",\"Brighton and Hove\",\"RC1\",7\r\n\"E06000043\",\"Brighton and Hove\",\"RWG\",7\r\n\"E06000043\",\"Brighton and Hove\",\"RA4\",6\r\n\"E06000043\",\"Brighton and Hove\",\"RKE\",6\r\n\"E06000043\",\"Brighton and Hove\",\"RGN\",6\r\n\"E06000043\",\"Brighton and Hove\",\"RN5\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RNQ\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RNZ\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RXQ\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RM1\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RTE\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RH8\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RAS\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RWH\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RQ8\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RTK\",5\r\n\"E06000043\",\"Brighton and Hove\",\"RTF\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RWK\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RBD\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RDR\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RBA\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RD8\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RJL\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RNS\",4\r\n\"E06000043\",\"Brighton and Hove\",\"RWY\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RX1\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RDE\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RHW\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RBZ\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RF4\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RLQ\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RA7\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RAP\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RXX\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RQW\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RAE\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RKB\",2\r\n\"E06000043\",\"Brighton and Hove\",\"R0B\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RR7\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RW6\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RDD\",3\r\n\"E06000043\",\"Brighton and Hove\",\"RM3\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RP6\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RTR\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RGP\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RJ6\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RW1\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RA3\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RCB\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RPA\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RPG\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RXK\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RXP\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RXW\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RJ8\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RTD\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RA9\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RBL\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RDY\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RP4\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RR8\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RV3\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RWD\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RWW\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RBT\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RH5\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RD1\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RN3\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RWP\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RCF\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RGR\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RHQ\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RJE\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RK9\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RL4\",1\r\n\"E06000043\",\"Brighton and Hove\",\"REM\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RNL\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RRK\",2\r\n\"E06000043\",\"Brighton and Hove\",\"RVW\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RAN\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RCD\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RK5\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RP5\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RXF\",1\r\n\"E06000043\",\"Brighton and Hove\",\"RXL\",1\r\n\"E06000044\",\"Portsmouth\",\"RHU\",18935\r\n\"E06000044\",\"Portsmouth\",\"RHM\",414\r\n\"E06000044\",\"Portsmouth\",\"RYR\",90\r\n\"E06000044\",\"Portsmouth\",\"RNZ\",31\r\n\"E06000044\",\"Portsmouth\",\"RN5\",25\r\n\"E06000044\",\"Portsmouth\",\"RA2\",24\r\n\"E06000044\",\"Portsmouth\",\"RJ1\",19\r\n\"E06000044\",\"Portsmouth\",\"RW1\",18\r\n\"E06000044\",\"Portsmouth\",\"RDU\",17\r\n\"E06000044\",\"Portsmouth\",\"R1F\",17\r\n\"E06000044\",\"Portsmouth\",\"RDZ\",16\r\n\"E06000044\",\"Portsmouth\",\"RTP\",14\r\n\"E06000044\",\"Portsmouth\",\"RXH\",14\r\n\"E06000044\",\"Portsmouth\",\"RN3\",13\r\n\"E06000044\",\"Portsmouth\",\"RD3\",12\r\n\"E06000044\",\"Portsmouth\",\"RYJ\",11\r\n\"E06000044\",\"Portsmouth\",\"REF\",11\r\n\"E06000044\",\"Portsmouth\",\"RJZ\",11\r\n\"E06000044\",\"Portsmouth\",\"RTH\",10\r\n\"E06000044\",\"Portsmouth\",\"RJ7\",10\r\n\"E06000044\",\"Portsmouth\",\"R1H\",10\r\n\"E06000044\",\"Portsmouth\",\"RRK\",10\r\n\"E06000044\",\"Portsmouth\",\"RVR\",9\r\n\"E06000044\",\"Portsmouth\",\"RVJ\",8\r\n\"E06000044\",\"Portsmouth\",\"RWG\",8\r\n\"E06000044\",\"Portsmouth\",\"RHW\",8\r\n\"E06000044\",\"Portsmouth\",\"RQM\",7\r\n\"E06000044\",\"Portsmouth\",\"RH8\",7\r\n\"E06000044\",\"Portsmouth\",\"RBD\",7\r\n\"E06000044\",\"Portsmouth\",\"RK9\",6\r\n\"E06000044\",\"Portsmouth\",\"RAX\",6\r\n\"E06000044\",\"Portsmouth\",\"RA4\",5\r\n\"E06000044\",\"Portsmouth\",\"RRV\",7\r\n\"E06000044\",\"Portsmouth\",\"RAL\",5\r\n\"E06000044\",\"Portsmouth\",\"RC9\",4\r\n\"E06000044\",\"Portsmouth\",\"RXC\",4\r\n\"E06000044\",\"Portsmouth\",\"RAS\",4\r\n\"E06000044\",\"Portsmouth\",\"RVV\",4\r\n\"E06000044\",\"Portsmouth\",\"RD1\",4\r\n\"E06000044\",\"Portsmouth\",\"RWH\",4\r\n\"E06000044\",\"Portsmouth\",\"RA9\",4\r\n\"E06000044\",\"Portsmouth\",\"RGT\",3\r\n\"E06000044\",\"Portsmouth\",\"RTX\",3\r\n\"E06000044\",\"Portsmouth\",\"RDD\",3\r\n\"E06000044\",\"Portsmouth\",\"RKB\",3\r\n\"E06000044\",\"Portsmouth\",\"RQX\",3\r\n\"E06000044\",\"Portsmouth\",\"RCX\",3\r\n\"E06000044\",\"Portsmouth\",\"RWF\",3\r\n\"E06000044\",\"Portsmouth\",\"RBZ\",3\r\n\"E06000044\",\"Portsmouth\",\"RF4\",3\r\n\"E06000044\",\"Portsmouth\",\"R1K\",3\r\n\"E06000044\",\"Portsmouth\",\"RD8\",3\r\n\"E06000044\",\"Portsmouth\",\"RBA\",2\r\n\"E06000044\",\"Portsmouth\",\"RJC\",2\r\n\"E06000044\",\"Portsmouth\",\"REM\",2\r\n\"E06000044\",\"Portsmouth\",\"RBT\",2\r\n\"E06000044\",\"Portsmouth\",\"RAP\",2\r\n\"E06000044\",\"Portsmouth\",\"RH5\",2\r\n\"E06000044\",\"Portsmouth\",\"RTK\",2\r\n\"E06000044\",\"Portsmouth\",\"RVW\",2\r\n\"E06000044\",\"Portsmouth\",\"RXW\",2\r\n\"E06000044\",\"Portsmouth\",\"RAN\",2\r\n\"E06000044\",\"Portsmouth\",\"RC1\",2\r\n\"E06000044\",\"Portsmouth\",\"RM3\",2\r\n\"E06000044\",\"Portsmouth\",\"RN7\",2\r\n\"E06000044\",\"Portsmouth\",\"RQ8\",2\r\n\"E06000044\",\"Portsmouth\",\"RP4\",2\r\n\"E06000044\",\"Portsmouth\",\"RWD\",2\r\n\"E06000044\",\"Portsmouth\",\"RWE\",2\r\n\"E06000044\",\"Portsmouth\",\"RXQ\",2\r\n\"E06000044\",\"Portsmouth\",\"R0A\",2\r\n\"E06000044\",\"Portsmouth\",\"RJE\",2\r\n\"E06000044\",\"Portsmouth\",\"RT3\",2\r\n\"E06000044\",\"Portsmouth\",\"RWP\",2\r\n\"E06000044\",\"Portsmouth\",\"RP6\",2\r\n\"E06000044\",\"Portsmouth\",\"RCB\",1\r\n\"E06000044\",\"Portsmouth\",\"RGM\",1\r\n\"E06000044\",\"Portsmouth\",\"RGN\",1\r\n\"E06000044\",\"Portsmouth\",\"RGP\",1\r\n\"E06000044\",\"Portsmouth\",\"RHQ\",1\r\n\"E06000044\",\"Portsmouth\",\"RNU\",1\r\n\"E06000044\",\"Portsmouth\",\"RK5\",1\r\n\"E06000044\",\"Portsmouth\",\"RLT\",1\r\n\"E06000044\",\"Portsmouth\",\"RNL\",1\r\n\"E06000044\",\"Portsmouth\",\"RPC\",1\r\n\"E06000044\",\"Portsmouth\",\"RWK\",1\r\n\"E06000044\",\"Portsmouth\",\"R0B\",1\r\n\"E06000044\",\"Portsmouth\",\"RP5\",1\r\n\"E06000044\",\"Portsmouth\",\"RTV\",1\r\n\"E06000044\",\"Portsmouth\",\"RXP\",1\r\n\"E06000044\",\"Portsmouth\",\"RBL\",1\r\n\"E06000044\",\"Portsmouth\",\"RCF\",1\r\n\"E06000044\",\"Portsmouth\",\"RDE\",1\r\n\"E06000044\",\"Portsmouth\",\"RQW\",1\r\n\"E06000044\",\"Portsmouth\",\"RTE\",1\r\n\"E06000044\",\"Portsmouth\",\"RWX\",1\r\n\"E06000044\",\"Portsmouth\",\"RXT\",1\r\n\"E06000044\",\"Portsmouth\",\"RA7\",1\r\n\"E06000044\",\"Portsmouth\",\"RBN\",1\r\n\"E06000044\",\"Portsmouth\",\"RFF\",1\r\n\"E06000044\",\"Portsmouth\",\"RLQ\",1\r\n\"E06000044\",\"Portsmouth\",\"RMP\",1\r\n\"E06000044\",\"Portsmouth\",\"RTD\",1\r\n\"E06000044\",\"Portsmouth\",\"RJ6\",1\r\n\"E06000044\",\"Portsmouth\",\"RX4\",1\r\n\"E06000044\",\"Portsmouth\",\"RXN\",1\r\n\"E06000044\",\"Portsmouth\",\"RKE\",1\r\n\"E06000044\",\"Portsmouth\",\"RNN\",1\r\n\"E06000044\",\"Portsmouth\",\"RA3\",1\r\n\"E06000044\",\"Portsmouth\",\"RGR\",1\r\n\"E06000044\",\"Portsmouth\",\"RJL\",1\r\n\"E06000044\",\"Portsmouth\",\"RM1\",1\r\n\"E06000044\",\"Portsmouth\",\"RTR\",1\r\n\"E06000044\",\"Portsmouth\",\"RVN\",1\r\n\"E06000044\",\"Portsmouth\",\"RWW\",1\r\n\"E06000044\",\"Portsmouth\",\"RX1\",1\r\n\"E06000045\",\"Southampton\",\"RHM\",28729\r\n\"E06000045\",\"Southampton\",\"RHU\",274\r\n\"E06000045\",\"Southampton\",\"RW1\",257\r\n\"E06000045\",\"Southampton\",\"RN5\",167\r\n\"E06000045\",\"Southampton\",\"RNZ\",94\r\n\"E06000045\",\"Southampton\",\"RDZ\",43\r\n\"E06000045\",\"Southampton\",\"RDU\",35\r\n\"E06000045\",\"Southampton\",\"RD3\",34\r\n\"E06000045\",\"Southampton\",\"RYR\",27\r\n\"E06000045\",\"Southampton\",\"R1C\",27\r\n\"E06000045\",\"Southampton\",\"RJ1\",20\r\n\"E06000045\",\"Southampton\",\"RTH\",18\r\n\"E06000045\",\"Southampton\",\"RBD\",16\r\n\"E06000045\",\"Southampton\",\"RA2\",14\r\n\"E06000045\",\"Southampton\",\"RTP\",13\r\n\"E06000045\",\"Southampton\",\"RJ7\",13\r\n\"E06000045\",\"Southampton\",\"REF\",12\r\n\"E06000045\",\"Southampton\",\"RVJ\",12\r\n\"E06000045\",\"Southampton\",\"RA4\",10\r\n\"E06000045\",\"Southampton\",\"RYJ\",10\r\n\"E06000045\",\"Southampton\",\"R1F\",9\r\n\"E06000045\",\"Southampton\",\"RD1\",9\r\n\"E06000045\",\"Southampton\",\"RH8\",9\r\n\"E06000045\",\"Southampton\",\"RXH\",8\r\n\"E06000045\",\"Southampton\",\"RHW\",8\r\n\"E06000045\",\"Southampton\",\"RAX\",8\r\n\"E06000045\",\"Southampton\",\"RQM\",7\r\n\"E06000045\",\"Southampton\",\"R1H\",7\r\n\"E06000045\",\"Southampton\",\"RNS\",7\r\n\"E06000045\",\"Southampton\",\"RBA\",7\r\n\"E06000045\",\"Southampton\",\"RWF\",7\r\n\"E06000045\",\"Southampton\",\"RAL\",6\r\n\"E06000045\",\"Southampton\",\"RWE\",6\r\n\"E06000045\",\"Southampton\",\"RA7\",5\r\n\"E06000045\",\"Southampton\",\"RRV\",8\r\n\"E06000045\",\"Southampton\",\"RRK\",7\r\n\"E06000045\",\"Southampton\",\"RBZ\",5\r\n\"E06000045\",\"Southampton\",\"RJZ\",5\r\n\"E06000045\",\"Southampton\",\"RTX\",5\r\n\"E06000045\",\"Southampton\",\"RXK\",8\r\n\"E06000045\",\"Southampton\",\"RGT\",5\r\n\"E06000045\",\"Southampton\",\"RA9\",5\r\n\"E06000045\",\"Southampton\",\"RWK\",5\r\n\"E06000045\",\"Southampton\",\"RK9\",5\r\n\"E06000045\",\"Southampton\",\"RWH\",4\r\n\"E06000045\",\"Southampton\",\"R1K\",4\r\n\"E06000045\",\"Southampton\",\"RTE\",4\r\n\"E06000045\",\"Southampton\",\"RGM\",4\r\n\"E06000045\",\"Southampton\",\"RJC\",4\r\n\"E06000045\",\"Southampton\",\"RN3\",4\r\n\"E06000045\",\"Southampton\",\"RKB\",4\r\n\"E06000045\",\"Southampton\",\"RM1\",4\r\n\"E06000045\",\"Southampton\",\"RWJ\",4\r\n\"E06000045\",\"Southampton\",\"RJ6\",3\r\n\"E06000045\",\"Southampton\",\"RTK\",3\r\n\"E06000045\",\"Southampton\",\"RWD\",3\r\n\"E06000045\",\"Southampton\",\"RQ8\",3\r\n\"E06000045\",\"Southampton\",\"RA3\",3\r\n\"E06000045\",\"Southampton\",\"RXQ\",3\r\n\"E06000045\",\"Southampton\",\"RP5\",4\r\n\"E06000045\",\"Southampton\",\"RVW\",3\r\n\"E06000045\",\"Southampton\",\"RNU\",3\r\n\"E06000045\",\"Southampton\",\"RXL\",3\r\n\"E06000045\",\"Southampton\",\"RAJ\",3\r\n\"E06000045\",\"Southampton\",\"RAP\",3\r\n\"E06000045\",\"Southampton\",\"RD8\",3\r\n\"E06000045\",\"Southampton\",\"RGN\",2\r\n\"E06000045\",\"Southampton\",\"RN7\",2\r\n\"E06000045\",\"Southampton\",\"RDE\",2\r\n\"E06000045\",\"Southampton\",\"R0A\",2\r\n\"E06000045\",\"Southampton\",\"RBT\",2\r\n\"E06000045\",\"Southampton\",\"RT3\",2\r\n\"E06000045\",\"Southampton\",\"RWA\",2\r\n\"E06000045\",\"Southampton\",\"RAN\",2\r\n\"E06000045\",\"Southampton\",\"RPY\",2\r\n\"E06000045\",\"Southampton\",\"RAS\",2\r\n\"E06000045\",\"Southampton\",\"RDY\",2\r\n\"E06000045\",\"Southampton\",\"RXC\",2\r\n\"E06000045\",\"Southampton\",\"RBL\",2\r\n\"E06000045\",\"Southampton\",\"RJR\",2\r\n\"E06000045\",\"Southampton\",\"RR8\",2\r\n\"E06000045\",\"Southampton\",\"RVR\",2\r\n\"E06000045\",\"Southampton\",\"RJE\",2\r\n\"E06000045\",\"Southampton\",\"RTG\",2\r\n\"E06000045\",\"Southampton\",\"RWG\",2\r\n\"E06000045\",\"Southampton\",\"RKE\",1\r\n\"E06000045\",\"Southampton\",\"RQ3\",1\r\n\"E06000045\",\"Southampton\",\"RX1\",1\r\n\"E06000045\",\"Southampton\",\"RXE\",1\r\n\"E06000045\",\"Southampton\",\"RQX\",1\r\n\"E06000045\",\"Southampton\",\"RWW\",1\r\n\"E06000045\",\"Southampton\",\"RX4\",1\r\n\"E06000045\",\"Southampton\",\"RC9\",1\r\n\"E06000045\",\"Southampton\",\"RPA\",1\r\n\"E06000045\",\"Southampton\",\"REM\",2\r\n\"E06000045\",\"Southampton\",\"RTD\",1\r\n\"E06000045\",\"Southampton\",\"RXF\",1\r\n\"E06000045\",\"Southampton\",\"RXN\",1\r\n\"E06000045\",\"Southampton\",\"RH5\",1\r\n\"E06000045\",\"Southampton\",\"RP4\",1\r\n\"E06000045\",\"Southampton\",\"RNL\",1\r\n\"E06000045\",\"Southampton\",\"RJ2\",1\r\n\"E06000045\",\"Southampton\",\"RLQ\",1\r\n\"E06000045\",\"Southampton\",\"RMP\",1\r\n\"E06000045\",\"Southampton\",\"RXR\",1\r\n\"E06000045\",\"Southampton\",\"RBK\",1\r\n\"E06000045\",\"Southampton\",\"RF4\",1\r\n\"E06000045\",\"Southampton\",\"RMY\",1\r\n\"E06000045\",\"Southampton\",\"RAE\",1\r\n\"E06000045\",\"Southampton\",\"RXX\",1\r\n\"E06000046\",\"Isle of Wight\",\"R1F\",12544\r\n\"E06000046\",\"Isle of Wight\",\"RHM\",438\r\n\"E06000046\",\"Isle of Wight\",\"RHU\",233\r\n\"E06000046\",\"Isle of Wight\",\"RNZ\",46\r\n\"E06000046\",\"Isle of Wight\",\"RDU\",19\r\n\"E06000046\",\"Isle of Wight\",\"RJ1\",13\r\n\"E06000046\",\"Isle of Wight\",\"RYR\",12\r\n\"E06000046\",\"Isle of Wight\",\"RTH\",9\r\n\"E06000046\",\"Isle of Wight\",\"RVR\",8\r\n\"E06000046\",\"Isle of Wight\",\"RQM\",8\r\n\"E06000046\",\"Isle of Wight\",\"RAX\",8\r\n\"E06000046\",\"Isle of Wight\",\"RJ7\",8\r\n\"E06000046\",\"Isle of Wight\",\"RN5\",7\r\n\"E06000046\",\"Isle of Wight\",\"RD3\",7\r\n\"E06000046\",\"Isle of Wight\",\"RTP\",7\r\n\"E06000046\",\"Isle of Wight\",\"RXH\",7\r\n\"E06000046\",\"Isle of Wight\",\"RRK\",10\r\n\"E06000046\",\"Isle of Wight\",\"REF\",6\r\n\"E06000046\",\"Isle of Wight\",\"RGT\",6\r\n\"E06000046\",\"Isle of Wight\",\"RXQ\",6\r\n\"E06000046\",\"Isle of Wight\",\"R1K\",6\r\n\"E06000046\",\"Isle of Wight\",\"RT3\",6\r\n\"E06000046\",\"Isle of Wight\",\"R1H\",5\r\n\"E06000046\",\"Isle of Wight\",\"RXC\",5\r\n\"E06000046\",\"Isle of Wight\",\"RA2\",5\r\n\"E06000046\",\"Isle of Wight\",\"RHW\",5\r\n\"E06000046\",\"Isle of Wight\",\"RD1\",5\r\n\"E06000046\",\"Isle of Wight\",\"RRV\",5\r\n\"E06000046\",\"Isle of Wight\",\"RCB\",5\r\n\"E06000046\",\"Isle of Wight\",\"RWH\",5\r\n\"E06000046\",\"Isle of Wight\",\"RA9\",5\r\n\"E06000046\",\"Isle of Wight\",\"RDZ\",5\r\n\"E06000046\",\"Isle of Wight\",\"RBA\",5\r\n\"E06000046\",\"Isle of Wight\",\"RJ2\",4\r\n\"E06000046\",\"Isle of Wight\",\"RYJ\",4\r\n\"E06000046\",\"Isle of Wight\",\"RWF\",4\r\n\"E06000046\",\"Isle of Wight\",\"RLQ\",4\r\n\"E06000046\",\"Isle of Wight\",\"RA4\",4\r\n\"E06000046\",\"Isle of Wight\",\"RM1\",3\r\n\"E06000046\",\"Isle of Wight\",\"RKE\",3\r\n\"E06000046\",\"Isle of Wight\",\"RM3\",3\r\n\"E06000046\",\"Isle of Wight\",\"RPY\",3\r\n\"E06000046\",\"Isle of Wight\",\"RN7\",3\r\n\"E06000046\",\"Isle of Wight\",\"RNL\",2\r\n\"E06000046\",\"Isle of Wight\",\"RC9\",2\r\n\"E06000046\",\"Isle of Wight\",\"RGM\",2\r\n\"E06000046\",\"Isle of Wight\",\"RK9\",2\r\n\"E06000046\",\"Isle of Wight\",\"RR8\",2\r\n\"E06000046\",\"Isle of Wight\",\"RTE\",2\r\n\"E06000046\",\"Isle of Wight\",\"RJC\",2\r\n\"E06000046\",\"Isle of Wight\",\"RWE\",2\r\n\"E06000046\",\"Isle of Wight\",\"RXN\",2\r\n\"E06000046\",\"Isle of Wight\",\"RA7\",2\r\n\"E06000046\",\"Isle of Wight\",\"RAP\",2\r\n\"E06000046\",\"Isle of Wight\",\"RJN\",2\r\n\"E06000046\",\"Isle of Wight\",\"RQX\",2\r\n\"E06000046\",\"Isle of Wight\",\"RVJ\",2\r\n\"E06000046\",\"Isle of Wight\",\"RVV\",2\r\n\"E06000046\",\"Isle of Wight\",\"RAL\",2\r\n\"E06000046\",\"Isle of Wight\",\"RTF\",2\r\n\"E06000046\",\"Isle of Wight\",\"RDD\",1\r\n\"E06000046\",\"Isle of Wight\",\"RH5\",1\r\n\"E06000046\",\"Isle of Wight\",\"RH8\",1\r\n\"E06000046\",\"Isle of Wight\",\"REM\",2\r\n\"E06000046\",\"Isle of Wight\",\"RTX\",1\r\n\"E06000046\",\"Isle of Wight\",\"RX1\",1\r\n\"E06000046\",\"Isle of Wight\",\"RXK\",1\r\n\"E06000046\",\"Isle of Wight\",\"RDE\",1\r\n\"E06000046\",\"Isle of Wight\",\"RP6\",1\r\n\"E06000046\",\"Isle of Wight\",\"RTK\",1\r\n\"E06000046\",\"Isle of Wight\",\"RW1\",1\r\n\"E06000046\",\"Isle of Wight\",\"RP4\",1\r\n\"E06000046\",\"Isle of Wight\",\"RR7\",1\r\n\"E06000046\",\"Isle of Wight\",\"RTG\",1\r\n\"E06000046\",\"Isle of Wight\",\"RK5\",1\r\n\"E06000046\",\"Isle of Wight\",\"RL4\",1\r\n\"E06000046\",\"Isle of Wight\",\"RTD\",1\r\n\"E06000046\",\"Isle of Wight\",\"RXF\",1\r\n\"E06000046\",\"Isle of Wight\",\"RXL\",1\r\n\"E06000046\",\"Isle of Wight\",\"RXW\",1\r\n\"E06000046\",\"Isle of Wight\",\"RBZ\",1\r\n\"E06000046\",\"Isle of Wight\",\"RF4\",1\r\n\"E06000046\",\"Isle of Wight\",\"RQ8\",1\r\n\"E06000046\",\"Isle of Wight\",\"RJ6\",1\r\n\"E06000046\",\"Isle of Wight\",\"RJZ\",1\r\n\"E06000046\",\"Isle of Wight\",\"RNQ\",1\r\n\"E06000046\",\"Isle of Wight\",\"RXP\",1\r\n\"E06000046\",\"Isle of Wight\",\"RCD\",1\r\n\"E06000046\",\"Isle of Wight\",\"RWG\",1\r\n\"E06000046\",\"Isle of Wight\",\"RBD\",1\r\n\"E06000046\",\"Isle of Wight\",\"RBL\",1\r\n\"E06000046\",\"Isle of Wight\",\"RKB\",1\r\n\"E06000047\",\"County Durham\",\"RXP\",47301\r\n\"E06000047\",\"County Durham\",\"R0B\",6818\r\n\"E06000047\",\"County Durham\",\"RVW\",6185\r\n\"E06000047\",\"County Durham\",\"RTD\",2248\r\n\"E06000047\",\"County Durham\",\"RTR\",1642\r\n\"E06000047\",\"County Durham\",\"RR7\",900\r\n\"E06000047\",\"County Durham\",\"RX3\",792\r\n\"E06000047\",\"County Durham\",\"RTF\",146\r\n\"E06000047\",\"County Durham\",\"RCB\",57\r\n\"E06000047\",\"County Durham\",\"RNL\",41\r\n\"E06000047\",\"County Durham\",\"R0A\",25\r\n\"E06000047\",\"County Durham\",\"RR8\",17\r\n\"E06000047\",\"County Durham\",\"RX4\",15\r\n\"E06000047\",\"County Durham\",\"RXL\",15\r\n\"E06000047\",\"County Durham\",\"RWD\",15\r\n\"E06000047\",\"County Durham\",\"RCD\",14\r\n\"E06000047\",\"County Durham\",\"RX1\",12\r\n\"E06000047\",\"County Durham\",\"RRV\",12\r\n\"E06000047\",\"County Durham\",\"RM1\",10\r\n\"E06000047\",\"County Durham\",\"RDU\",9\r\n\"E06000047\",\"County Durham\",\"RTX\",9\r\n\"E06000047\",\"County Durham\",\"RWY\",8\r\n\"E06000047\",\"County Durham\",\"RHQ\",8\r\n\"E06000047\",\"County Durham\",\"RW6\",8\r\n\"E06000047\",\"County Durham\",\"RJL\",8\r\n\"E06000047\",\"County Durham\",\"RQM\",8\r\n\"E06000047\",\"County Durham\",\"RAL\",8\r\n\"E06000047\",\"County Durham\",\"RJ7\",8\r\n\"E06000047\",\"County Durham\",\"RJE\",8\r\n\"E06000047\",\"County Durham\",\"RWA\",8\r\n\"E06000047\",\"County Durham\",\"RXF\",7\r\n\"E06000047\",\"County Durham\",\"RTH\",6\r\n\"E06000047\",\"County Durham\",\"RCX\",6\r\n\"E06000047\",\"County Durham\",\"RJC\",6\r\n\"E06000047\",\"County Durham\",\"RTG\",7\r\n\"E06000047\",\"County Durham\",\"RTE\",6\r\n\"E06000047\",\"County Durham\",\"RFS\",6\r\n\"E06000047\",\"County Durham\",\"RD8\",5\r\n\"E06000047\",\"County Durham\",\"RGT\",5\r\n\"E06000047\",\"County Durham\",\"RYR\",5\r\n\"E06000047\",\"County Durham\",\"RDZ\",5\r\n\"E06000047\",\"County Durham\",\"R1H\",5\r\n\"E06000047\",\"County Durham\",\"RDE\",5\r\n\"E06000047\",\"County Durham\",\"RJR\",5\r\n\"E06000047\",\"County Durham\",\"RAE\",5\r\n\"E06000047\",\"County Durham\",\"RM3\",5\r\n\"E06000047\",\"County Durham\",\"RXQ\",5\r\n\"E06000047\",\"County Durham\",\"RVV\",5\r\n\"E06000047\",\"County Durham\",\"RGP\",5\r\n\"E06000047\",\"County Durham\",\"RJ1\",5\r\n\"E06000047\",\"County Durham\",\"RWJ\",5\r\n\"E06000047\",\"County Durham\",\"RKB\",5\r\n\"E06000047\",\"County Durham\",\"RP5\",7\r\n\"E06000047\",\"County Durham\",\"REM\",9\r\n\"E06000047\",\"County Durham\",\"RHM\",4\r\n\"E06000047\",\"County Durham\",\"RWP\",4\r\n\"E06000047\",\"County Durham\",\"R1K\",4\r\n\"E06000047\",\"County Durham\",\"RA2\",4\r\n\"E06000047\",\"County Durham\",\"RBD\",4\r\n\"E06000047\",\"County Durham\",\"RBL\",4\r\n\"E06000047\",\"County Durham\",\"RXN\",4\r\n\"E06000047\",\"County Durham\",\"RWW\",4\r\n\"E06000047\",\"County Durham\",\"RAS\",4\r\n\"E06000047\",\"County Durham\",\"RBA\",4\r\n\"E06000047\",\"County Durham\",\"RQ8\",4\r\n\"E06000047\",\"County Durham\",\"RCF\",4\r\n\"E06000047\",\"County Durham\",\"RK9\",4\r\n\"E06000047\",\"County Durham\",\"RBN\",4\r\n\"E06000047\",\"County Durham\",\"RFF\",4\r\n\"E06000047\",\"County Durham\",\"RRK\",6\r\n\"E06000047\",\"County Durham\",\"RWE\",4\r\n\"E06000047\",\"County Durham\",\"RTK\",3\r\n\"E06000047\",\"County Durham\",\"RNS\",3\r\n\"E06000047\",\"County Durham\",\"RXH\",3\r\n\"E06000047\",\"County Durham\",\"RFR\",3\r\n\"E06000047\",\"County Durham\",\"RWH\",3\r\n\"E06000047\",\"County Durham\",\"RNZ\",3\r\n\"E06000047\",\"County Durham\",\"RC1\",3\r\n\"E06000047\",\"County Durham\",\"RJ2\",5\r\n\"E06000047\",\"County Durham\",\"RGN\",3\r\n\"E06000047\",\"County Durham\",\"RHW\",3\r\n\"E06000047\",\"County Durham\",\"RA7\",2\r\n\"E06000047\",\"County Durham\",\"RK5\",2\r\n\"E06000047\",\"County Durham\",\"RA4\",2\r\n\"E06000047\",\"County Durham\",\"RC9\",2\r\n\"E06000047\",\"County Durham\",\"RQX\",2\r\n\"E06000047\",\"County Durham\",\"RTP\",2\r\n\"E06000047\",\"County Durham\",\"RBZ\",2\r\n\"E06000047\",\"County Durham\",\"RN5\",2\r\n\"E06000047\",\"County Durham\",\"RXR\",2\r\n\"E06000047\",\"County Durham\",\"RW5\",2\r\n\"E06000047\",\"County Durham\",\"RWF\",2\r\n\"E06000047\",\"County Durham\",\"RXW\",2\r\n\"E06000047\",\"County Durham\",\"RQW\",2\r\n\"E06000047\",\"County Durham\",\"RJZ\",2\r\n\"E06000047\",\"County Durham\",\"RMP\",2\r\n\"E06000047\",\"County Durham\",\"RNQ\",2\r\n\"E06000047\",\"County Durham\",\"RHU\",2\r\n\"E06000047\",\"County Durham\",\"RMC\",2\r\n\"E06000047\",\"County Durham\",\"RVY\",2\r\n\"E06000047\",\"County Durham\",\"RL4\",2\r\n\"E06000047\",\"County Durham\",\"RT5\",1\r\n\"E06000047\",\"County Durham\",\"RXC\",1\r\n\"E06000047\",\"County Durham\",\"RXK\",2\r\n\"E06000047\",\"County Durham\",\"RYV\",1\r\n\"E06000047\",\"County Durham\",\"RAP\",1\r\n\"E06000047\",\"County Durham\",\"RAT\",1\r\n\"E06000047\",\"County Durham\",\"RLT\",1\r\n\"E06000047\",\"County Durham\",\"RNA\",1\r\n\"E06000047\",\"County Durham\",\"RRF\",1\r\n\"E06000047\",\"County Durham\",\"RWG\",1\r\n\"E06000047\",\"County Durham\",\"RYJ\",1\r\n\"E06000047\",\"County Durham\",\"RAX\",1\r\n\"E06000047\",\"County Durham\",\"RD1\",1\r\n\"E06000047\",\"County Durham\",\"RGD\",1\r\n\"E06000047\",\"County Durham\",\"RGR\",1\r\n\"E06000047\",\"County Durham\",\"RPY\",1\r\n\"E06000047\",\"County Durham\",\"RXE\",1\r\n\"E06000047\",\"County Durham\",\"RAJ\",1\r\n\"E06000047\",\"County Durham\",\"RLQ\",1\r\n\"E06000047\",\"County Durham\",\"RN3\",1\r\n\"E06000047\",\"County Durham\",\"RA9\",1\r\n\"E06000047\",\"County Durham\",\"RNN\",1\r\n\"E06000047\",\"County Durham\",\"R1F\",1\r\n\"E06000047\",\"County Durham\",\"RDD\",1\r\n\"E06000047\",\"County Durham\",\"REF\",1\r\n\"E06000047\",\"County Durham\",\"RF4\",1\r\n\"E06000047\",\"County Durham\",\"RP7\",1\r\n\"E06000047\",\"County Durham\",\"RCU\",1\r\n\"E06000049\",\"Cheshire East\",\"RBT\",23340\r\n\"E06000049\",\"Cheshire East\",\"RJN\",12825\r\n\"E06000049\",\"Cheshire East\",\"R0A\",2687\r\n\"E06000049\",\"Cheshire East\",\"RJE\",2176\r\n\"E06000049\",\"Cheshire East\",\"RWJ\",1835\r\n\"E06000049\",\"Cheshire East\",\"RBV\",450\r\n\"E06000049\",\"Cheshire East\",\"RXA\",408\r\n\"E06000049\",\"Cheshire East\",\"RM3\",315\r\n\"E06000049\",\"Cheshire East\",\"RJR\",158\r\n\"E06000049\",\"Cheshire East\",\"RBN\",140\r\n\"E06000049\",\"Cheshire East\",\"RBS\",139\r\n\"E06000049\",\"Cheshire East\",\"RWW\",137\r\n\"E06000049\",\"Cheshire East\",\"REM\",108\r\n\"E06000049\",\"Cheshire East\",\"RTX\",26\r\n\"E06000049\",\"Cheshire East\",\"RW6\",23\r\n\"E06000049\",\"Cheshire East\",\"RBL\",23\r\n\"E06000049\",\"Cheshire East\",\"RXW\",29\r\n\"E06000049\",\"Cheshire East\",\"RRK\",25\r\n\"E06000049\",\"Cheshire East\",\"RET\",14\r\n\"E06000049\",\"Cheshire East\",\"REF\",14\r\n\"E06000049\",\"Cheshire East\",\"REP\",14\r\n\"E06000049\",\"Cheshire East\",\"RHQ\",14\r\n\"E06000049\",\"Cheshire East\",\"RXL\",13\r\n\"E06000049\",\"Cheshire East\",\"RXR\",13\r\n\"E06000049\",\"Cheshire East\",\"RCB\",13\r\n\"E06000049\",\"Cheshire East\",\"RR8\",12\r\n\"E06000049\",\"Cheshire East\",\"RMP\",12\r\n\"E06000049\",\"Cheshire East\",\"RTH\",11\r\n\"E06000049\",\"Cheshire East\",\"RBQ\",11\r\n\"E06000049\",\"Cheshire East\",\"RNL\",11\r\n\"E06000049\",\"Cheshire East\",\"REN\",10\r\n\"E06000049\",\"Cheshire East\",\"RRF\",9\r\n\"E06000049\",\"Cheshire East\",\"RVY\",9\r\n\"E06000049\",\"Cheshire East\",\"RRV\",9\r\n\"E06000049\",\"Cheshire East\",\"RJ1\",8\r\n\"E06000049\",\"Cheshire East\",\"RGT\",8\r\n\"E06000049\",\"Cheshire East\",\"RTG\",12\r\n\"E06000049\",\"Cheshire East\",\"RNS\",8\r\n\"E06000049\",\"Cheshire East\",\"RTF\",8\r\n\"E06000049\",\"Cheshire East\",\"RWP\",7\r\n\"E06000049\",\"Cheshire East\",\"RDU\",6\r\n\"E06000049\",\"Cheshire East\",\"RX1\",6\r\n\"E06000049\",\"Cheshire East\",\"RLQ\",6\r\n\"E06000049\",\"Cheshire East\",\"RLY\",6\r\n\"E06000049\",\"Cheshire East\",\"RQ3\",6\r\n\"E06000049\",\"Cheshire East\",\"RBD\",6\r\n\"E06000049\",\"Cheshire East\",\"RWE\",6\r\n\"E06000049\",\"Cheshire East\",\"RFS\",6\r\n\"E06000049\",\"Cheshire East\",\"RH8\",6\r\n\"E06000049\",\"Cheshire East\",\"RCD\",5\r\n\"E06000049\",\"Cheshire East\",\"RHM\",5\r\n\"E06000049\",\"Cheshire East\",\"RJZ\",5\r\n\"E06000049\",\"Cheshire East\",\"RXH\",5\r\n\"E06000049\",\"Cheshire East\",\"RAL\",5\r\n\"E06000049\",\"Cheshire East\",\"RL1\",5\r\n\"E06000049\",\"Cheshire East\",\"RWD\",5\r\n\"E06000049\",\"Cheshire East\",\"RQM\",5\r\n\"E06000049\",\"Cheshire East\",\"R1H\",5\r\n\"E06000049\",\"Cheshire East\",\"RVV\",5\r\n\"E06000049\",\"Cheshire East\",\"R1F\",5\r\n\"E06000049\",\"Cheshire East\",\"RXN\",5\r\n\"E06000049\",\"Cheshire East\",\"RA9\",5\r\n\"E06000049\",\"Cheshire East\",\"RYR\",5\r\n\"E06000049\",\"Cheshire East\",\"RTE\",4\r\n\"E06000049\",\"Cheshire East\",\"RWY\",4\r\n\"E06000049\",\"Cheshire East\",\"RBZ\",4\r\n\"E06000049\",\"Cheshire East\",\"RYJ\",4\r\n\"E06000049\",\"Cheshire East\",\"RJC\",4\r\n\"E06000049\",\"Cheshire East\",\"RWG\",4\r\n\"E06000049\",\"Cheshire East\",\"RC9\",4\r\n\"E06000049\",\"Cheshire East\",\"RBA\",4\r\n\"E06000049\",\"Cheshire East\",\"RD3\",4\r\n\"E06000049\",\"Cheshire East\",\"RGR\",3\r\n\"E06000049\",\"Cheshire East\",\"RN3\",3\r\n\"E06000049\",\"Cheshire East\",\"RRE\",3\r\n\"E06000049\",\"Cheshire East\",\"RA7\",3\r\n\"E06000049\",\"Cheshire East\",\"RDZ\",3\r\n\"E06000049\",\"Cheshire East\",\"RNZ\",3\r\n\"E06000049\",\"Cheshire East\",\"RTD\",3\r\n\"E06000049\",\"Cheshire East\",\"RWF\",3\r\n\"E06000049\",\"Cheshire East\",\"RL4\",3\r\n\"E06000049\",\"Cheshire East\",\"RD8\",3\r\n\"E06000049\",\"Cheshire East\",\"RM1\",3\r\n\"E06000049\",\"Cheshire East\",\"RTV\",3\r\n\"E06000049\",\"Cheshire East\",\"RXK\",5\r\n\"E06000049\",\"Cheshire East\",\"RAS\",3\r\n\"E06000049\",\"Cheshire East\",\"RP5\",3\r\n\"E06000049\",\"Cheshire East\",\"RXP\",3\r\n\"E06000049\",\"Cheshire East\",\"RAE\",3\r\n\"E06000049\",\"Cheshire East\",\"RNA\",3\r\n\"E06000049\",\"Cheshire East\",\"RCF\",2\r\n\"E06000049\",\"Cheshire East\",\"RK9\",2\r\n\"E06000049\",\"Cheshire East\",\"RA2\",2\r\n\"E06000049\",\"Cheshire East\",\"RKB\",2\r\n\"E06000049\",\"Cheshire East\",\"RVR\",2\r\n\"E06000049\",\"Cheshire East\",\"RLT\",2\r\n\"E06000049\",\"Cheshire East\",\"RMC\",2\r\n\"E06000049\",\"Cheshire East\",\"RGP\",2\r\n\"E06000049\",\"Cheshire East\",\"RVW\",2\r\n\"E06000049\",\"Cheshire East\",\"R1K\",2\r\n\"E06000049\",\"Cheshire East\",\"RBK\",2\r\n\"E06000049\",\"Cheshire East\",\"RQ8\",2\r\n\"E06000049\",\"Cheshire East\",\"RQW\",2\r\n\"E06000049\",\"Cheshire East\",\"RXF\",2\r\n\"E06000049\",\"Cheshire East\",\"RGN\",2\r\n\"E06000049\",\"Cheshire East\",\"RHW\",2\r\n\"E06000049\",\"Cheshire East\",\"RJ7\",2\r\n\"E06000049\",\"Cheshire East\",\"RTR\",3\r\n\"E06000049\",\"Cheshire East\",\"RWH\",2\r\n\"E06000049\",\"Cheshire East\",\"RXC\",2\r\n\"E06000049\",\"Cheshire East\",\"RVJ\",2\r\n\"E06000049\",\"Cheshire East\",\"R1L\",1\r\n\"E06000049\",\"Cheshire East\",\"RA3\",1\r\n\"E06000049\",\"Cheshire East\",\"RA4\",1\r\n\"E06000049\",\"Cheshire East\",\"RDE\",1\r\n\"E06000049\",\"Cheshire East\",\"RF4\",1\r\n\"E06000049\",\"Cheshire East\",\"RN5\",1\r\n\"E06000049\",\"Cheshire East\",\"RW5\",1\r\n\"E06000049\",\"Cheshire East\",\"RFF\",1\r\n\"E06000049\",\"Cheshire East\",\"RAJ\",1\r\n\"E06000049\",\"Cheshire East\",\"RD1\",1\r\n\"E06000049\",\"Cheshire East\",\"RN7\",1\r\n\"E06000049\",\"Cheshire East\",\"RW4\",1\r\n\"E06000049\",\"Cheshire East\",\"RCX\",1\r\n\"E06000049\",\"Cheshire East\",\"RKE\",1\r\n\"E06000049\",\"Cheshire East\",\"RTK\",1\r\n\"E06000049\",\"Cheshire East\",\"RFR\",1\r\n\"E06000049\",\"Cheshire East\",\"RJL\",1\r\n\"E06000049\",\"Cheshire East\",\"RX4\",1\r\n\"E06000049\",\"Cheshire East\",\"R0B\",1\r\n\"E06000049\",\"Cheshire East\",\"RXT\",1\r\n\"E06000049\",\"Cheshire East\",\"RDD\",1\r\n\"E06000049\",\"Cheshire East\",\"RXQ\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJR\",22851\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBT\",12822\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBL\",2367\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWW\",610\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJE\",497\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBS\",314\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXA\",304\r\n\"E06000050\",\"Cheshire West and Chester\",\"R0A\",286\r\n\"E06000050\",\"Cheshire West and Chester\",\"REM\",431\r\n\"E06000050\",\"Cheshire West and Chester\",\"REN\",243\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBQ\",230\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBN\",211\r\n\"E06000050\",\"Cheshire West and Chester\",\"RET\",135\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBV\",122\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJN\",101\r\n\"E06000050\",\"Cheshire West and Chester\",\"RM3\",56\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTX\",23\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWJ\",21\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXW\",29\r\n\"E06000050\",\"Cheshire West and Chester\",\"RW6\",16\r\n\"E06000050\",\"Cheshire West and Chester\",\"REP\",15\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJ1\",15\r\n\"E06000050\",\"Cheshire West and Chester\",\"REF\",14\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXL\",14\r\n\"E06000050\",\"Cheshire West and Chester\",\"RCB\",11\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTG\",10\r\n\"E06000050\",\"Cheshire West and Chester\",\"RVY\",14\r\n\"E06000050\",\"Cheshire West and Chester\",\"RL1\",10\r\n\"E06000050\",\"Cheshire West and Chester\",\"RR8\",9\r\n\"E06000050\",\"Cheshire West and Chester\",\"RRF\",9\r\n\"E06000050\",\"Cheshire West and Chester\",\"RRV\",9\r\n\"E06000050\",\"Cheshire West and Chester\",\"RQM\",8\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTE\",8\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTH\",7\r\n\"E06000050\",\"Cheshire West and Chester\",\"RNL\",7\r\n\"E06000050\",\"Cheshire West and Chester\",\"RAL\",7\r\n\"E06000050\",\"Cheshire West and Chester\",\"RH8\",7\r\n\"E06000050\",\"Cheshire West and Chester\",\"RRK\",12\r\n\"E06000050\",\"Cheshire West and Chester\",\"RYJ\",7\r\n\"E06000050\",\"Cheshire West and Chester\",\"RA7\",6\r\n\"E06000050\",\"Cheshire West and Chester\",\"RA9\",6\r\n\"E06000050\",\"Cheshire West and Chester\",\"RHQ\",6\r\n\"E06000050\",\"Cheshire West and Chester\",\"RKB\",6\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTF\",6\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXN\",6\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJ7\",5\r\n\"E06000050\",\"Cheshire West and Chester\",\"R1H\",5\r\n\"E06000050\",\"Cheshire West and Chester\",\"RD1\",5\r\n\"E06000050\",\"Cheshire West and Chester\",\"RGN\",5\r\n\"E06000050\",\"Cheshire West and Chester\",\"RHU\",5\r\n\"E06000050\",\"Cheshire West and Chester\",\"RLQ\",4\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJC\",4\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWP\",4\r\n\"E06000050\",\"Cheshire West and Chester\",\"RGT\",4\r\n\"E06000050\",\"Cheshire West and Chester\",\"RVW\",4\r\n\"E06000050\",\"Cheshire West and Chester\",\"RNQ\",4\r\n\"E06000050\",\"Cheshire West and Chester\",\"R1F\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RD8\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RLT\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWG\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RX1\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RC9\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RN5\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RVJ\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RHM\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTD\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RDD\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RP5\",4\r\n\"E06000050\",\"Cheshire West and Chester\",\"RDE\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RK9\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTV\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWD\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXK\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RD3\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RN3\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RQX\",3\r\n\"E06000050\",\"Cheshire West and Chester\",\"RAE\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXR\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RFS\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RK5\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RCD\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RCF\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RHW\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"R1K\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RC1\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJ6\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RN7\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTR\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXP\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJZ\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RVR\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWY\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RDU\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RW4\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RA4\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBZ\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RL4\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RMP\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RNA\",2\r\n\"E06000050\",\"Cheshire West and Chester\",\"RA2\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBD\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RMC\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RPA\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTP\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWE\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"R1D\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBA\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RGP\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RQ3\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RRE\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RTK\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RBK\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RDZ\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RH5\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWA\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXQ\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJL\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RQW\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RAP\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RAX\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RCX\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RJ2\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXC\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RYR\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RCU\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RT3\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RWF\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RXE\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RP7\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RVV\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RAJ\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RAS\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RF4\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RGM\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RGR\",1\r\n\"E06000050\",\"Cheshire West and Chester\",\"RW1\",1\r\n\"E06000051\",\"Shropshire\",\"RXW\",29590\r\n\"E06000051\",\"Shropshire\",\"RLQ\",973\r\n\"E06000051\",\"Shropshire\",\"RJE\",785\r\n\"E06000051\",\"Shropshire\",\"RWP\",567\r\n\"E06000051\",\"Shropshire\",\"RL4\",505\r\n\"E06000051\",\"Shropshire\",\"R1D\",399\r\n\"E06000051\",\"Shropshire\",\"RRE\",366\r\n\"E06000051\",\"Shropshire\",\"RBT\",146\r\n\"E06000051\",\"Shropshire\",\"RNA\",140\r\n\"E06000051\",\"Shropshire\",\"RRK\",166\r\n\"E06000051\",\"Shropshire\",\"RL1\",93\r\n\"E06000051\",\"Shropshire\",\"RJR\",58\r\n\"E06000051\",\"Shropshire\",\"RQ3\",56\r\n\"E06000051\",\"Shropshire\",\"R0A\",30\r\n\"E06000051\",\"Shropshire\",\"RBS\",24\r\n\"E06000051\",\"Shropshire\",\"RQM\",16\r\n\"E06000051\",\"Shropshire\",\"RBQ\",14\r\n\"E06000051\",\"Shropshire\",\"REF\",14\r\n\"E06000051\",\"Shropshire\",\"RTH\",13\r\n\"E06000051\",\"Shropshire\",\"REM\",18\r\n\"E06000051\",\"Shropshire\",\"RET\",11\r\n\"E06000051\",\"Shropshire\",\"RTE\",11\r\n\"E06000051\",\"Shropshire\",\"RBV\",10\r\n\"E06000051\",\"Shropshire\",\"RXK\",23\r\n\"E06000051\",\"Shropshire\",\"RYJ\",9\r\n\"E06000051\",\"Shropshire\",\"RBA\",9\r\n\"E06000051\",\"Shropshire\",\"RBL\",9\r\n\"E06000051\",\"Shropshire\",\"RA9\",8\r\n\"E06000051\",\"Shropshire\",\"RBN\",8\r\n\"E06000051\",\"Shropshire\",\"RTR\",8\r\n\"E06000051\",\"Shropshire\",\"RTX\",8\r\n\"E06000051\",\"Shropshire\",\"RDU\",8\r\n\"E06000051\",\"Shropshire\",\"RKB\",7\r\n\"E06000051\",\"Shropshire\",\"RDZ\",7\r\n\"E06000051\",\"Shropshire\",\"RHM\",7\r\n\"E06000051\",\"Shropshire\",\"RBK\",7\r\n\"E06000051\",\"Shropshire\",\"RCB\",7\r\n\"E06000051\",\"Shropshire\",\"RVJ\",6\r\n\"E06000051\",\"Shropshire\",\"RXN\",6\r\n\"E06000051\",\"Shropshire\",\"R1H\",6\r\n\"E06000051\",\"Shropshire\",\"RC1\",6\r\n\"E06000051\",\"Shropshire\",\"RJC\",6\r\n\"E06000051\",\"Shropshire\",\"RH8\",6\r\n\"E06000051\",\"Shropshire\",\"RD1\",5\r\n\"E06000051\",\"Shropshire\",\"RRV\",6\r\n\"E06000051\",\"Shropshire\",\"RWE\",5\r\n\"E06000051\",\"Shropshire\",\"RBZ\",5\r\n\"E06000051\",\"Shropshire\",\"RVY\",6\r\n\"E06000051\",\"Shropshire\",\"RA4\",5\r\n\"E06000051\",\"Shropshire\",\"RHU\",5\r\n\"E06000051\",\"Shropshire\",\"RGT\",5\r\n\"E06000051\",\"Shropshire\",\"RHQ\",5\r\n\"E06000051\",\"Shropshire\",\"RXQ\",5\r\n\"E06000051\",\"Shropshire\",\"RJ1\",4\r\n\"E06000051\",\"Shropshire\",\"RR8\",4\r\n\"E06000051\",\"Shropshire\",\"RTG\",8\r\n\"E06000051\",\"Shropshire\",\"RXP\",4\r\n\"E06000051\",\"Shropshire\",\"RGM\",4\r\n\"E06000051\",\"Shropshire\",\"RGN\",4\r\n\"E06000051\",\"Shropshire\",\"RHW\",4\r\n\"E06000051\",\"Shropshire\",\"R1K\",4\r\n\"E06000051\",\"Shropshire\",\"RFS\",4\r\n\"E06000051\",\"Shropshire\",\"RX1\",4\r\n\"E06000051\",\"Shropshire\",\"RJL\",4\r\n\"E06000051\",\"Shropshire\",\"RM3\",4\r\n\"E06000051\",\"Shropshire\",\"RTF\",4\r\n\"E06000051\",\"Shropshire\",\"RXL\",4\r\n\"E06000051\",\"Shropshire\",\"RK9\",4\r\n\"E06000051\",\"Shropshire\",\"RTP\",4\r\n\"E06000051\",\"Shropshire\",\"RN3\",3\r\n\"E06000051\",\"Shropshire\",\"RTK\",3\r\n\"E06000051\",\"Shropshire\",\"RXR\",3\r\n\"E06000051\",\"Shropshire\",\"RK5\",3\r\n\"E06000051\",\"Shropshire\",\"RWF\",3\r\n\"E06000051\",\"Shropshire\",\"RD8\",3\r\n\"E06000051\",\"Shropshire\",\"R1A\",3\r\n\"E06000051\",\"Shropshire\",\"RTD\",3\r\n\"E06000051\",\"Shropshire\",\"TAJ\",3\r\n\"E06000051\",\"Shropshire\",\"RA7\",3\r\n\"E06000051\",\"Shropshire\",\"RR7\",3\r\n\"E06000051\",\"Shropshire\",\"RCF\",3\r\n\"E06000051\",\"Shropshire\",\"RWW\",3\r\n\"E06000051\",\"Shropshire\",\"RJN\",2\r\n\"E06000051\",\"Shropshire\",\"RN7\",2\r\n\"E06000051\",\"Shropshire\",\"RVR\",2\r\n\"E06000051\",\"Shropshire\",\"RW6\",2\r\n\"E06000051\",\"Shropshire\",\"RWA\",2\r\n\"E06000051\",\"Shropshire\",\"RF4\",2\r\n\"E06000051\",\"Shropshire\",\"RN5\",2\r\n\"E06000051\",\"Shropshire\",\"RXC\",2\r\n\"E06000051\",\"Shropshire\",\"RA3\",2\r\n\"E06000051\",\"Shropshire\",\"R0B\",2\r\n\"E06000051\",\"Shropshire\",\"RXF\",2\r\n\"E06000051\",\"Shropshire\",\"RC9\",2\r\n\"E06000051\",\"Shropshire\",\"RLY\",2\r\n\"E06000051\",\"Shropshire\",\"RP5\",2\r\n\"E06000051\",\"Shropshire\",\"RRJ\",2\r\n\"E06000051\",\"Shropshire\",\"RCU\",2\r\n\"E06000051\",\"Shropshire\",\"RD3\",2\r\n\"E06000051\",\"Shropshire\",\"RGP\",2\r\n\"E06000051\",\"Shropshire\",\"RJZ\",2\r\n\"E06000051\",\"Shropshire\",\"RNL\",2\r\n\"E06000051\",\"Shropshire\",\"RAE\",2\r\n\"E06000051\",\"Shropshire\",\"RBD\",2\r\n\"E06000051\",\"Shropshire\",\"RCD\",2\r\n\"E06000051\",\"Shropshire\",\"RDE\",2\r\n\"E06000051\",\"Shropshire\",\"RYR\",2\r\n\"E06000051\",\"Shropshire\",\"RQ8\",1\r\n\"E06000051\",\"Shropshire\",\"RQW\",1\r\n\"E06000051\",\"Shropshire\",\"RWG\",1\r\n\"E06000051\",\"Shropshire\",\"RXA\",1\r\n\"E06000051\",\"Shropshire\",\"RWD\",1\r\n\"E06000051\",\"Shropshire\",\"RAX\",1\r\n\"E06000051\",\"Shropshire\",\"RFF\",1\r\n\"E06000051\",\"Shropshire\",\"RJ7\",1\r\n\"E06000051\",\"Shropshire\",\"RP6\",1\r\n\"E06000051\",\"Shropshire\",\"RAJ\",1\r\n\"E06000051\",\"Shropshire\",\"RAL\",1\r\n\"E06000051\",\"Shropshire\",\"RCX\",1\r\n\"E06000051\",\"Shropshire\",\"REN\",1\r\n\"E06000051\",\"Shropshire\",\"RJ2\",1\r\n\"E06000051\",\"Shropshire\",\"RNS\",1\r\n\"E06000051\",\"Shropshire\",\"RPC\",1\r\n\"E06000051\",\"Shropshire\",\"RA2\",1\r\n\"E06000051\",\"Shropshire\",\"RM1\",1\r\n\"E06000051\",\"Shropshire\",\"RWH\",1\r\n\"E06000051\",\"Shropshire\",\"RWJ\",1\r\n\"E06000051\",\"Shropshire\",\"R1F\",1\r\n\"E06000051\",\"Shropshire\",\"RPY\",1\r\n\"E06000051\",\"Shropshire\",\"RGR\",1\r\n\"E06000051\",\"Shropshire\",\"RP7\",1\r\n\"E06000051\",\"Shropshire\",\"RVV\",1\r\n\"E06000051\",\"Shropshire\",\"RXH\",1\r\n\"E06000052\",\"Cornwall\",\"REF\",44725\r\n\"E06000052\",\"Cornwall\",\"RK9\",11986\r\n\"E06000052\",\"Cornwall\",\"RBZ\",1552\r\n\"E06000052\",\"Cornwall\",\"RJ8\",550\r\n\"E06000052\",\"Cornwall\",\"RH8\",248\r\n\"E06000052\",\"Cornwall\",\"RA7\",239\r\n\"E06000052\",\"Cornwall\",\"RBA\",59\r\n\"E06000052\",\"Cornwall\",\"RA9\",55\r\n\"E06000052\",\"Cornwall\",\"RVJ\",52\r\n\"E06000052\",\"Cornwall\",\"RTH\",34\r\n\"E06000052\",\"Cornwall\",\"RTE\",32\r\n\"E06000052\",\"Cornwall\",\"RDU\",22\r\n\"E06000052\",\"Cornwall\",\"RJ1\",21\r\n\"E06000052\",\"Cornwall\",\"RD1\",21\r\n\"E06000052\",\"Cornwall\",\"RJZ\",18\r\n\"E06000052\",\"Cornwall\",\"RHM\",18\r\n\"E06000052\",\"Cornwall\",\"R1H\",16\r\n\"E06000052\",\"Cornwall\",\"RA4\",15\r\n\"E06000052\",\"Cornwall\",\"RBD\",15\r\n\"E06000052\",\"Cornwall\",\"RYJ\",15\r\n\"E06000052\",\"Cornwall\",\"RDZ\",14\r\n\"E06000052\",\"Cornwall\",\"RHW\",14\r\n\"E06000052\",\"Cornwall\",\"RRV\",17\r\n\"E06000052\",\"Cornwall\",\"RYR\",14\r\n\"E06000052\",\"Cornwall\",\"RHU\",13\r\n\"E06000052\",\"Cornwall\",\"RNZ\",12\r\n\"E06000052\",\"Cornwall\",\"RN5\",11\r\n\"E06000052\",\"Cornwall\",\"RRK\",18\r\n\"E06000052\",\"Cornwall\",\"RDE\",11\r\n\"E06000052\",\"Cornwall\",\"RLQ\",10\r\n\"E06000052\",\"Cornwall\",\"RQM\",10\r\n\"E06000052\",\"Cornwall\",\"RA3\",10\r\n\"E06000052\",\"Cornwall\",\"R0A\",10\r\n\"E06000052\",\"Cornwall\",\"RT3\",10\r\n\"E06000052\",\"Cornwall\",\"RQ8\",10\r\n\"E06000052\",\"Cornwall\",\"RXQ\",10\r\n\"E06000052\",\"Cornwall\",\"RA2\",9\r\n\"E06000052\",\"Cornwall\",\"RC9\",9\r\n\"E06000052\",\"Cornwall\",\"RJ7\",9\r\n\"E06000052\",\"Cornwall\",\"RKB\",9\r\n\"E06000052\",\"Cornwall\",\"RH5\",9\r\n\"E06000052\",\"Cornwall\",\"RWP\",9\r\n\"E06000052\",\"Cornwall\",\"RW6\",9\r\n\"E06000052\",\"Cornwall\",\"RVV\",9\r\n\"E06000052\",\"Cornwall\",\"RN3\",9\r\n\"E06000052\",\"Cornwall\",\"RD3\",9\r\n\"E06000052\",\"Cornwall\",\"RWE\",9\r\n\"E06000052\",\"Cornwall\",\"RTG\",11\r\n\"E06000052\",\"Cornwall\",\"RTP\",8\r\n\"E06000052\",\"Cornwall\",\"RJC\",8\r\n\"E06000052\",\"Cornwall\",\"RWF\",8\r\n\"E06000052\",\"Cornwall\",\"RTX\",8\r\n\"E06000052\",\"Cornwall\",\"RJE\",8\r\n\"E06000052\",\"Cornwall\",\"RM1\",7\r\n\"E06000052\",\"Cornwall\",\"RAX\",7\r\n\"E06000052\",\"Cornwall\",\"RNS\",7\r\n\"E06000052\",\"Cornwall\",\"RWG\",7\r\n\"E06000052\",\"Cornwall\",\"RDD\",6\r\n\"E06000052\",\"Cornwall\",\"RXC\",6\r\n\"E06000052\",\"Cornwall\",\"RXH\",6\r\n\"E06000052\",\"Cornwall\",\"R1K\",6\r\n\"E06000052\",\"Cornwall\",\"RVR\",6\r\n\"E06000052\",\"Cornwall\",\"RWD\",5\r\n\"E06000052\",\"Cornwall\",\"RX1\",5\r\n\"E06000052\",\"Cornwall\",\"RCF\",5\r\n\"E06000052\",\"Cornwall\",\"RPA\",5\r\n\"E06000052\",\"Cornwall\",\"RXL\",5\r\n\"E06000052\",\"Cornwall\",\"REM\",9\r\n\"E06000052\",\"Cornwall\",\"RWW\",5\r\n\"E06000052\",\"Cornwall\",\"RCB\",5\r\n\"E06000052\",\"Cornwall\",\"RQ3\",5\r\n\"E06000052\",\"Cornwall\",\"RGN\",4\r\n\"E06000052\",\"Cornwall\",\"RGR\",4\r\n\"E06000052\",\"Cornwall\",\"R1F\",4\r\n\"E06000052\",\"Cornwall\",\"RAS\",4\r\n\"E06000052\",\"Cornwall\",\"RR8\",4\r\n\"E06000052\",\"Cornwall\",\"RGT\",4\r\n\"E06000052\",\"Cornwall\",\"RAL\",4\r\n\"E06000052\",\"Cornwall\",\"RFF\",4\r\n\"E06000052\",\"Cornwall\",\"RJL\",4\r\n\"E06000052\",\"Cornwall\",\"RWA\",4\r\n\"E06000052\",\"Cornwall\",\"RTK\",4\r\n\"E06000052\",\"Cornwall\",\"RBL\",3\r\n\"E06000052\",\"Cornwall\",\"RXN\",3\r\n\"E06000052\",\"Cornwall\",\"RBT\",3\r\n\"E06000052\",\"Cornwall\",\"RD8\",3\r\n\"E06000052\",\"Cornwall\",\"RL4\",3\r\n\"E06000052\",\"Cornwall\",\"RNQ\",3\r\n\"E06000052\",\"Cornwall\",\"RJ2\",5\r\n\"E06000052\",\"Cornwall\",\"RLT\",3\r\n\"E06000052\",\"Cornwall\",\"RFS\",3\r\n\"E06000052\",\"Cornwall\",\"RXW\",6\r\n\"E06000052\",\"Cornwall\",\"RAP\",3\r\n\"E06000052\",\"Cornwall\",\"RC1\",3\r\n\"E06000052\",\"Cornwall\",\"RVY\",3\r\n\"E06000052\",\"Cornwall\",\"RHQ\",3\r\n\"E06000052\",\"Cornwall\",\"RQW\",3\r\n\"E06000052\",\"Cornwall\",\"RBK\",2\r\n\"E06000052\",\"Cornwall\",\"RPC\",2\r\n\"E06000052\",\"Cornwall\",\"RXR\",2\r\n\"E06000052\",\"Cornwall\",\"RAJ\",2\r\n\"E06000052\",\"Cornwall\",\"RT5\",2\r\n\"E06000052\",\"Cornwall\",\"RTF\",2\r\n\"E06000052\",\"Cornwall\",\"RXF\",2\r\n\"E06000052\",\"Cornwall\",\"RAN\",2\r\n\"E06000052\",\"Cornwall\",\"RGM\",2\r\n\"E06000052\",\"Cornwall\",\"RTR\",4\r\n\"E06000052\",\"Cornwall\",\"RDY\",2\r\n\"E06000052\",\"Cornwall\",\"RM3\",2\r\n\"E06000052\",\"Cornwall\",\"RWH\",2\r\n\"E06000052\",\"Cornwall\",\"R1L\",2\r\n\"E06000052\",\"Cornwall\",\"RNA\",2\r\n\"E06000052\",\"Cornwall\",\"RP5\",2\r\n\"E06000052\",\"Cornwall\",\"RN7\",1\r\n\"E06000052\",\"Cornwall\",\"RP4\",1\r\n\"E06000052\",\"Cornwall\",\"RRF\",1\r\n\"E06000052\",\"Cornwall\",\"RCX\",1\r\n\"E06000052\",\"Cornwall\",\"RP6\",1\r\n\"E06000052\",\"Cornwall\",\"RXK\",2\r\n\"E06000052\",\"Cornwall\",\"R0B\",1\r\n\"E06000052\",\"Cornwall\",\"RJ6\",1\r\n\"E06000052\",\"Cornwall\",\"RJR\",1\r\n\"E06000052\",\"Cornwall\",\"RMC\",1\r\n\"E06000052\",\"Cornwall\",\"RMP\",1\r\n\"E06000052\",\"Cornwall\",\"RAE\",1\r\n\"E06000052\",\"Cornwall\",\"RBS\",1\r\n\"E06000052\",\"Cornwall\",\"RET\",1\r\n\"E06000052\",\"Cornwall\",\"RGP\",1\r\n\"E06000052\",\"Cornwall\",\"RPY\",1\r\n\"E06000052\",\"Cornwall\",\"RWJ\",1\r\n\"E06000052\",\"Cornwall\",\"RKE\",1\r\n\"E06000052\",\"Cornwall\",\"RVW\",1\r\n\"E06000052\",\"Cornwall\",\"RW5\",1\r\n\"E06000052\",\"Cornwall\",\"RXE\",1\r\n\"E06000052\",\"Cornwall\",\"RXP\",1\r\n\"E06000052\",\"Cornwall\",\"RBQ\",1\r\n\"E06000052\",\"Cornwall\",\"RXX\",1\r\n\"E06000052\",\"Cornwall\",\"RAT\",1\r\n\"E06000052\",\"Cornwall\",\"RNL\",1\r\n\"E06000052\",\"Cornwall\",\"RR7\",1\r\n\"E06000052\",\"Cornwall\",\"RW1\",1\r\n\"E06000053\",\"Isles of Scilly\",\"REF\",133\r\n\"E06000053\",\"Isles of Scilly\",\"RJ8\",89\r\n\"E06000053\",\"Isles of Scilly\",\"RK9\",4\r\n\"E06000053\",\"Isles of Scilly\",\"RA9\",3\r\n\"E06000053\",\"Isles of Scilly\",\"R1H\",1\r\n\"E06000053\",\"Isles of Scilly\",\"RJ1\",1\r\n\"E06000053\",\"Isles of Scilly\",\"RA3\",1\r\n\"E06000054\",\"Wiltshire\",\"RD1\",18764\r\n\"E06000054\",\"Wiltshire\",\"RNZ\",15993\r\n\"E06000054\",\"Wiltshire\",\"RN3\",12194\r\n\"E06000054\",\"Wiltshire\",\"RVJ\",619\r\n\"E06000054\",\"Wiltshire\",\"RHM\",582\r\n\"E06000054\",\"Wiltshire\",\"RA7\",532\r\n\"E06000054\",\"Wiltshire\",\"RTH\",238\r\n\"E06000054\",\"Wiltshire\",\"RVN\",201\r\n\"E06000054\",\"Wiltshire\",\"RN5\",186\r\n\"E06000054\",\"Wiltshire\",\"RDZ\",151\r\n\"E06000054\",\"Wiltshire\",\"RTE\",141\r\n\"E06000054\",\"Wiltshire\",\"AXG\",202\r\n\"E06000054\",\"Wiltshire\",\"RA4\",86\r\n\"E06000054\",\"Wiltshire\",\"RHU\",85\r\n\"E06000054\",\"Wiltshire\",\"RD3\",55\r\n\"E06000054\",\"Wiltshire\",\"RDU\",51\r\n\"E06000054\",\"Wiltshire\",\"RBA\",48\r\n\"E06000054\",\"Wiltshire\",\"REF\",46\r\n\"E06000054\",\"Wiltshire\",\"RBD\",45\r\n\"E06000054\",\"Wiltshire\",\"RJ1\",32\r\n\"E06000054\",\"Wiltshire\",\"RH8\",31\r\n\"E06000054\",\"Wiltshire\",\"RYJ\",27\r\n\"E06000054\",\"Wiltshire\",\"RA9\",26\r\n\"E06000054\",\"Wiltshire\",\"RBZ\",24\r\n\"E06000054\",\"Wiltshire\",\"RRK\",34\r\n\"E06000054\",\"Wiltshire\",\"RT3\",23\r\n\"E06000054\",\"Wiltshire\",\"RHW\",23\r\n\"E06000054\",\"Wiltshire\",\"RQM\",22\r\n\"E06000054\",\"Wiltshire\",\"R1H\",19\r\n\"E06000054\",\"Wiltshire\",\"RA2\",17\r\n\"E06000054\",\"Wiltshire\",\"RJ7\",17\r\n\"E06000054\",\"Wiltshire\",\"RK9\",17\r\n\"E06000054\",\"Wiltshire\",\"RWP\",17\r\n\"E06000054\",\"Wiltshire\",\"RNU\",16\r\n\"E06000054\",\"Wiltshire\",\"RRV\",17\r\n\"E06000054\",\"Wiltshire\",\"RA3\",15\r\n\"E06000054\",\"Wiltshire\",\"RTP\",14\r\n\"E06000054\",\"Wiltshire\",\"RYR\",13\r\n\"E06000054\",\"Wiltshire\",\"RH5\",13\r\n\"E06000054\",\"Wiltshire\",\"RAL\",12\r\n\"E06000054\",\"Wiltshire\",\"RLQ\",10\r\n\"E06000054\",\"Wiltshire\",\"RXC\",10\r\n\"E06000054\",\"Wiltshire\",\"RJE\",10\r\n\"E06000054\",\"Wiltshire\",\"RGR\",10\r\n\"E06000054\",\"Wiltshire\",\"R1K\",9\r\n\"E06000054\",\"Wiltshire\",\"RAX\",9\r\n\"E06000054\",\"Wiltshire\",\"RJZ\",9\r\n\"E06000054\",\"Wiltshire\",\"RXQ\",8\r\n\"E06000054\",\"Wiltshire\",\"RCB\",8\r\n\"E06000054\",\"Wiltshire\",\"RTX\",8\r\n\"E06000054\",\"Wiltshire\",\"RVV\",8\r\n\"E06000054\",\"Wiltshire\",\"RGT\",7\r\n\"E06000054\",\"Wiltshire\",\"RN7\",7\r\n\"E06000054\",\"Wiltshire\",\"RWD\",7\r\n\"E06000054\",\"Wiltshire\",\"RDE\",7\r\n\"E06000054\",\"Wiltshire\",\"RD8\",7\r\n\"E06000054\",\"Wiltshire\",\"RDY\",7\r\n\"E06000054\",\"Wiltshire\",\"RTG\",10\r\n\"E06000054\",\"Wiltshire\",\"RJC\",6\r\n\"E06000054\",\"Wiltshire\",\"RTF\",6\r\n\"E06000054\",\"Wiltshire\",\"RTK\",6\r\n\"E06000054\",\"Wiltshire\",\"RWG\",6\r\n\"E06000054\",\"Wiltshire\",\"RWF\",6\r\n\"E06000054\",\"Wiltshire\",\"RKB\",6\r\n\"E06000054\",\"Wiltshire\",\"RNL\",6\r\n\"E06000054\",\"Wiltshire\",\"RNS\",6\r\n\"E06000054\",\"Wiltshire\",\"RAS\",6\r\n\"E06000054\",\"Wiltshire\",\"RL4\",5\r\n\"E06000054\",\"Wiltshire\",\"R0A\",5\r\n\"E06000054\",\"Wiltshire\",\"RBT\",5\r\n\"E06000054\",\"Wiltshire\",\"RXL\",5\r\n\"E06000054\",\"Wiltshire\",\"RJ6\",5\r\n\"E06000054\",\"Wiltshire\",\"RXW\",8\r\n\"E06000054\",\"Wiltshire\",\"RGN\",5\r\n\"E06000054\",\"Wiltshire\",\"RX1\",5\r\n\"E06000054\",\"Wiltshire\",\"RXP\",5\r\n\"E06000054\",\"Wiltshire\",\"RXR\",4\r\n\"E06000054\",\"Wiltshire\",\"RJ2\",7\r\n\"E06000054\",\"Wiltshire\",\"RQ8\",4\r\n\"E06000054\",\"Wiltshire\",\"RXK\",7\r\n\"E06000054\",\"Wiltshire\",\"R1F\",4\r\n\"E06000054\",\"Wiltshire\",\"RCX\",4\r\n\"E06000054\",\"Wiltshire\",\"RRE\",4\r\n\"E06000054\",\"Wiltshire\",\"RTD\",4\r\n\"E06000054\",\"Wiltshire\",\"RF4\",4\r\n\"E06000054\",\"Wiltshire\",\"RHQ\",4\r\n\"E06000054\",\"Wiltshire\",\"RVR\",4\r\n\"E06000054\",\"Wiltshire\",\"RW1\",4\r\n\"E06000054\",\"Wiltshire\",\"RW6\",4\r\n\"E06000054\",\"Wiltshire\",\"RWE\",4\r\n\"E06000054\",\"Wiltshire\",\"RPY\",4\r\n\"E06000054\",\"Wiltshire\",\"RVY\",4\r\n\"E06000054\",\"Wiltshire\",\"RBN\",3\r\n\"E06000054\",\"Wiltshire\",\"REM\",4\r\n\"E06000054\",\"Wiltshire\",\"RR8\",3\r\n\"E06000054\",\"Wiltshire\",\"RM1\",3\r\n\"E06000054\",\"Wiltshire\",\"RNA\",3\r\n\"E06000054\",\"Wiltshire\",\"RQX\",3\r\n\"E06000054\",\"Wiltshire\",\"RWH\",3\r\n\"E06000054\",\"Wiltshire\",\"RXF\",3\r\n\"E06000054\",\"Wiltshire\",\"RBL\",3\r\n\"E06000054\",\"Wiltshire\",\"RXH\",3\r\n\"E06000054\",\"Wiltshire\",\"RAP\",2\r\n\"E06000054\",\"Wiltshire\",\"RCF\",2\r\n\"E06000054\",\"Wiltshire\",\"RJL\",2\r\n\"E06000054\",\"Wiltshire\",\"RXN\",2\r\n\"E06000054\",\"Wiltshire\",\"RWX\",2\r\n\"E06000054\",\"Wiltshire\",\"RFS\",2\r\n\"E06000054\",\"Wiltshire\",\"RNQ\",2\r\n\"E06000054\",\"Wiltshire\",\"RP6\",2\r\n\"E06000054\",\"Wiltshire\",\"RQ3\",4\r\n\"E06000054\",\"Wiltshire\",\"RC9\",2\r\n\"E06000054\",\"Wiltshire\",\"RP4\",2\r\n\"E06000054\",\"Wiltshire\",\"RWJ\",2\r\n\"E06000054\",\"Wiltshire\",\"RWA\",2\r\n\"E06000054\",\"Wiltshire\",\"RC1\",2\r\n\"E06000054\",\"Wiltshire\",\"RJR\",2\r\n\"E06000054\",\"Wiltshire\",\"RPA\",2\r\n\"E06000054\",\"Wiltshire\",\"RTR\",3\r\n\"E06000054\",\"Wiltshire\",\"RBK\",2\r\n\"E06000054\",\"Wiltshire\",\"RJN\",2\r\n\"E06000054\",\"Wiltshire\",\"RAT\",1\r\n\"E06000054\",\"Wiltshire\",\"RCD\",1\r\n\"E06000054\",\"Wiltshire\",\"RJ8\",1\r\n\"E06000054\",\"Wiltshire\",\"RVW\",1\r\n\"E06000054\",\"Wiltshire\",\"R0B\",1\r\n\"E06000054\",\"Wiltshire\",\"RFF\",1\r\n\"E06000054\",\"Wiltshire\",\"RAJ\",1\r\n\"E06000054\",\"Wiltshire\",\"RGM\",1\r\n\"E06000054\",\"Wiltshire\",\"RMY\",1\r\n\"E06000054\",\"Wiltshire\",\"RRJ\",1\r\n\"E06000054\",\"Wiltshire\",\"RWK\",1\r\n\"E06000054\",\"Wiltshire\",\"RAE\",1\r\n\"E06000054\",\"Wiltshire\",\"RFR\",1\r\n\"E06000054\",\"Wiltshire\",\"RPC\",1\r\n\"E06000054\",\"Wiltshire\",\"RGP\",1\r\n\"E06000054\",\"Wiltshire\",\"RP5\",2\r\n\"E06000054\",\"Wiltshire\",\"RQW\",1\r\n\"E06000054\",\"Wiltshire\",\"RXG\",1\r\n\"E06000054\",\"Wiltshire\",\"RDD\",1\r\n\"E06000054\",\"Wiltshire\",\"R1J\",1\r\n\"E06000054\",\"Wiltshire\",\"RKE\",1\r\n\"E06000054\",\"Wiltshire\",\"RLT\",1\r\n\"E06000054\",\"Wiltshire\",\"RRF\",1\r\n\"E06000054\",\"Wiltshire\",\"RWW\",1\r\n\"E06000054\",\"Wiltshire\",\"RXY\",1\r\n\"E06000055\",\"Bedford\",\"RC1\",17249\r\n\"E06000055\",\"Bedford\",\"RC9\",505\r\n\"E06000055\",\"Bedford\",\"RGT\",488\r\n\"E06000055\",\"Bedford\",\"RWK\",301\r\n\"E06000055\",\"Bedford\",\"RWH\",291\r\n\"E06000055\",\"Bedford\",\"RGN\",217\r\n\"E06000055\",\"Bedford\",\"RD8\",120\r\n\"E06000055\",\"Bedford\",\"RNQ\",95\r\n\"E06000055\",\"Bedford\",\"RNS\",90\r\n\"E06000055\",\"Bedford\",\"RGM\",79\r\n\"E06000055\",\"Bedford\",\"RP6\",35\r\n\"E06000055\",\"Bedford\",\"R1H\",34\r\n\"E06000055\",\"Bedford\",\"RYV\",31\r\n\"E06000055\",\"Bedford\",\"RXQ\",28\r\n\"E06000055\",\"Bedford\",\"RRV\",26\r\n\"E06000055\",\"Bedford\",\"RYJ\",22\r\n\"E06000055\",\"Bedford\",\"RJ1\",18\r\n\"E06000055\",\"Bedford\",\"RTH\",14\r\n\"E06000055\",\"Bedford\",\"RGP\",14\r\n\"E06000055\",\"Bedford\",\"RWE\",11\r\n\"E06000055\",\"Bedford\",\"RWG\",11\r\n\"E06000055\",\"Bedford\",\"RAL\",10\r\n\"E06000055\",\"Bedford\",\"RKB\",10\r\n\"E06000055\",\"Bedford\",\"RJC\",9\r\n\"E06000055\",\"Bedford\",\"RCX\",8\r\n\"E06000055\",\"Bedford\",\"R1K\",8\r\n\"E06000055\",\"Bedford\",\"RX1\",8\r\n\"E06000055\",\"Bedford\",\"RYR\",8\r\n\"E06000055\",\"Bedford\",\"R1L\",7\r\n\"E06000055\",\"Bedford\",\"RP4\",7\r\n\"E06000055\",\"Bedford\",\"RQM\",7\r\n\"E06000055\",\"Bedford\",\"RL4\",7\r\n\"E06000055\",\"Bedford\",\"RM1\",6\r\n\"E06000055\",\"Bedford\",\"RAS\",5\r\n\"E06000055\",\"Bedford\",\"RBD\",5\r\n\"E06000055\",\"Bedford\",\"RXC\",5\r\n\"E06000055\",\"Bedford\",\"REF\",5\r\n\"E06000055\",\"Bedford\",\"RA9\",5\r\n\"E06000055\",\"Bedford\",\"RAN\",4\r\n\"E06000055\",\"Bedford\",\"RDZ\",4\r\n\"E06000055\",\"Bedford\",\"RK5\",4\r\n\"E06000055\",\"Bedford\",\"RQX\",4\r\n\"E06000055\",\"Bedford\",\"RCB\",4\r\n\"E06000055\",\"Bedford\",\"RTE\",4\r\n\"E06000055\",\"Bedford\",\"RW6\",4\r\n\"E06000055\",\"Bedford\",\"RP1\",4\r\n\"E06000055\",\"Bedford\",\"RN3\",4\r\n\"E06000055\",\"Bedford\",\"RT3\",4\r\n\"E06000055\",\"Bedford\",\"RD1\",4\r\n\"E06000055\",\"Bedford\",\"RWD\",4\r\n\"E06000055\",\"Bedford\",\"RXH\",4\r\n\"E06000055\",\"Bedford\",\"RJ7\",3\r\n\"E06000055\",\"Bedford\",\"RHW\",3\r\n\"E06000055\",\"Bedford\",\"RAP\",3\r\n\"E06000055\",\"Bedford\",\"RJZ\",3\r\n\"E06000055\",\"Bedford\",\"RK9\",3\r\n\"E06000055\",\"Bedford\",\"RQ8\",3\r\n\"E06000055\",\"Bedford\",\"RQW\",3\r\n\"E06000055\",\"Bedford\",\"RXW\",4\r\n\"E06000055\",\"Bedford\",\"RLT\",3\r\n\"E06000055\",\"Bedford\",\"RT1\",3\r\n\"E06000055\",\"Bedford\",\"RXN\",3\r\n\"E06000055\",\"Bedford\",\"RDU\",3\r\n\"E06000055\",\"Bedford\",\"RTF\",3\r\n\"E06000055\",\"Bedford\",\"RHQ\",2\r\n\"E06000055\",\"Bedford\",\"RM3\",2\r\n\"E06000055\",\"Bedford\",\"RP5\",3\r\n\"E06000055\",\"Bedford\",\"RVR\",2\r\n\"E06000055\",\"Bedford\",\"RVW\",2\r\n\"E06000055\",\"Bedford\",\"RA7\",2\r\n\"E06000055\",\"Bedford\",\"RBT\",2\r\n\"E06000055\",\"Bedford\",\"RD3\",2\r\n\"E06000055\",\"Bedford\",\"RDE\",2\r\n\"E06000055\",\"Bedford\",\"RF4\",2\r\n\"E06000055\",\"Bedford\",\"RFS\",2\r\n\"E06000055\",\"Bedford\",\"RH8\",2\r\n\"E06000055\",\"Bedford\",\"RHM\",2\r\n\"E06000055\",\"Bedford\",\"RPA\",2\r\n\"E06000055\",\"Bedford\",\"RWA\",2\r\n\"E06000055\",\"Bedford\",\"RQ3\",2\r\n\"E06000055\",\"Bedford\",\"RRK\",3\r\n\"E06000055\",\"Bedford\",\"RN5\",2\r\n\"E06000055\",\"Bedford\",\"RCD\",2\r\n\"E06000055\",\"Bedford\",\"RDD\",2\r\n\"E06000055\",\"Bedford\",\"R0B\",2\r\n\"E06000055\",\"Bedford\",\"RXK\",2\r\n\"E06000055\",\"Bedford\",\"RJR\",2\r\n\"E06000055\",\"Bedford\",\"RVY\",3\r\n\"E06000055\",\"Bedford\",\"RAX\",1\r\n\"E06000055\",\"Bedford\",\"RBK\",1\r\n\"E06000055\",\"Bedford\",\"RET\",1\r\n\"E06000055\",\"Bedford\",\"RA2\",1\r\n\"E06000055\",\"Bedford\",\"RBS\",1\r\n\"E06000055\",\"Bedford\",\"RJ2\",1\r\n\"E06000055\",\"Bedford\",\"RTG\",1\r\n\"E06000055\",\"Bedford\",\"RXT\",1\r\n\"E06000055\",\"Bedford\",\"RN7\",1\r\n\"E06000055\",\"Bedford\",\"RTD\",1\r\n\"E06000055\",\"Bedford\",\"RBN\",1\r\n\"E06000055\",\"Bedford\",\"RNZ\",1\r\n\"E06000055\",\"Bedford\",\"RGR\",1\r\n\"E06000055\",\"Bedford\",\"RWP\",1\r\n\"E06000055\",\"Bedford\",\"RNL\",1\r\n\"E06000055\",\"Bedford\",\"RR8\",1\r\n\"E06000055\",\"Bedford\",\"RTP\",1\r\n\"E06000055\",\"Bedford\",\"RWF\",1\r\n\"E06000055\",\"Bedford\",\"RWJ\",1\r\n\"E06000055\",\"Bedford\",\"RWW\",1\r\n\"E06000055\",\"Bedford\",\"R1F\",1\r\n\"E06000055\",\"Bedford\",\"RA4\",1\r\n\"E06000055\",\"Bedford\",\"RJL\",1\r\n\"E06000055\",\"Bedford\",\"RVV\",1\r\n\"E06000055\",\"Bedford\",\"RXL\",1\r\n\"E06000055\",\"Bedford\",\"RVJ\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RC9\",13887\r\n\"E06000056\",\"Central Bedfordshire\",\"RC1\",7886\r\n\"E06000056\",\"Central Bedfordshire\",\"RWH\",4549\r\n\"E06000056\",\"Central Bedfordshire\",\"RD8\",1836\r\n\"E06000056\",\"Central Bedfordshire\",\"RXQ\",652\r\n\"E06000056\",\"Central Bedfordshire\",\"RGT\",569\r\n\"E06000056\",\"Central Bedfordshire\",\"RWK\",383\r\n\"E06000056\",\"Central Bedfordshire\",\"RT3\",115\r\n\"E06000056\",\"Central Bedfordshire\",\"RTH\",95\r\n\"E06000056\",\"Central Bedfordshire\",\"RWG\",73\r\n\"E06000056\",\"Central Bedfordshire\",\"RRV\",86\r\n\"E06000056\",\"Central Bedfordshire\",\"RAL\",54\r\n\"E06000056\",\"Central Bedfordshire\",\"RYJ\",47\r\n\"E06000056\",\"Central Bedfordshire\",\"RGM\",43\r\n\"E06000056\",\"Central Bedfordshire\",\"RGN\",43\r\n\"E06000056\",\"Central Bedfordshire\",\"RNS\",42\r\n\"E06000056\",\"Central Bedfordshire\",\"R1H\",38\r\n\"E06000056\",\"Central Bedfordshire\",\"RP6\",33\r\n\"E06000056\",\"Central Bedfordshire\",\"RJ1\",32\r\n\"E06000056\",\"Central Bedfordshire\",\"R1K\",30\r\n\"E06000056\",\"Central Bedfordshire\",\"RGP\",16\r\n\"E06000056\",\"Central Bedfordshire\",\"RM1\",15\r\n\"E06000056\",\"Central Bedfordshire\",\"RDU\",13\r\n\"E06000056\",\"Central Bedfordshire\",\"RJ7\",13\r\n\"E06000056\",\"Central Bedfordshire\",\"REF\",12\r\n\"E06000056\",\"Central Bedfordshire\",\"RQ8\",11\r\n\"E06000056\",\"Central Bedfordshire\",\"RQM\",11\r\n\"E06000056\",\"Central Bedfordshire\",\"RP4\",11\r\n\"E06000056\",\"Central Bedfordshire\",\"RYV\",11\r\n\"E06000056\",\"Central Bedfordshire\",\"RCX\",10\r\n\"E06000056\",\"Central Bedfordshire\",\"RNQ\",10\r\n\"E06000056\",\"Central Bedfordshire\",\"RAS\",10\r\n\"E06000056\",\"Central Bedfordshire\",\"RDE\",9\r\n\"E06000056\",\"Central Bedfordshire\",\"RD3\",8\r\n\"E06000056\",\"Central Bedfordshire\",\"RJZ\",8\r\n\"E06000056\",\"Central Bedfordshire\",\"RWE\",8\r\n\"E06000056\",\"Central Bedfordshire\",\"RRK\",10\r\n\"E06000056\",\"Central Bedfordshire\",\"RYR\",7\r\n\"E06000056\",\"Central Bedfordshire\",\"RAJ\",7\r\n\"E06000056\",\"Central Bedfordshire\",\"RHW\",7\r\n\"E06000056\",\"Central Bedfordshire\",\"RA2\",6\r\n\"E06000056\",\"Central Bedfordshire\",\"RX1\",6\r\n\"E06000056\",\"Central Bedfordshire\",\"RXH\",6\r\n\"E06000056\",\"Central Bedfordshire\",\"RPA\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RBD\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RPY\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RBZ\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RBA\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RDZ\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RH8\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RNL\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RXC\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RHU\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RAP\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RKB\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RTE\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RKE\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RVV\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RA7\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RTG\",5\r\n\"E06000056\",\"Central Bedfordshire\",\"RBT\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RHQ\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RK9\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RTX\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RVR\",4\r\n\"E06000056\",\"Central Bedfordshire\",\"RGR\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RHM\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RN3\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RWA\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"R1F\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RF4\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RQX\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"R1L\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"REM\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RD1\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RJR\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RK5\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RNZ\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RQW\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RR7\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RWD\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RXP\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RA3\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RN5\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RVJ\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RV3\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"R0A\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RAX\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RJE\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RTF\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RTP\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RCF\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RW6\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RAE\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RJ2\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RJC\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RP5\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RWP\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RXL\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RP1\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RVW\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RXN\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RAN\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RFS\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RTR\",2\r\n\"E06000056\",\"Central Bedfordshire\",\"RVY\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RXK\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RXW\",3\r\n\"E06000056\",\"Central Bedfordshire\",\"RA9\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RL1\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RN7\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RBN\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RDD\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RMP\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RMY\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RCB\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RCU\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RL4\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RWY\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RAT\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RBK\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RBL\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RLT\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RM3\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RTQ\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RWF\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RWX\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"R0B\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RMC\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RR8\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RW1\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RFF\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RJL\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RLQ\",1\r\n\"E06000056\",\"Central Bedfordshire\",\"RXF\",1\r\n\"E06000057\",\"Northumberland\",\"RTF\",36176\r\n\"E06000057\",\"Northumberland\",\"RTD\",5931\r\n\"E06000057\",\"Northumberland\",\"RX4\",376\r\n\"E06000057\",\"Northumberland\",\"RNL\",266\r\n\"E06000057\",\"Northumberland\",\"RR7\",124\r\n\"E06000057\",\"Northumberland\",\"RXP\",84\r\n\"E06000057\",\"Northumberland\",\"R0B\",81\r\n\"E06000057\",\"Northumberland\",\"RCB\",19\r\n\"E06000057\",\"Northumberland\",\"RTX\",14\r\n\"E06000057\",\"Northumberland\",\"RVW\",13\r\n\"E06000057\",\"Northumberland\",\"RTR\",12\r\n\"E06000057\",\"Northumberland\",\"RXL\",9\r\n\"E06000057\",\"Northumberland\",\"RR8\",8\r\n\"E06000057\",\"Northumberland\",\"RX1\",8\r\n\"E06000057\",\"Northumberland\",\"RWA\",7\r\n\"E06000057\",\"Northumberland\",\"RRK\",8\r\n\"E06000057\",\"Northumberland\",\"RWG\",7\r\n\"E06000057\",\"Northumberland\",\"RAS\",6\r\n\"E06000057\",\"Northumberland\",\"RTH\",6\r\n\"E06000057\",\"Northumberland\",\"RWD\",6\r\n\"E06000057\",\"Northumberland\",\"RDE\",6\r\n\"E06000057\",\"Northumberland\",\"RRV\",6\r\n\"E06000057\",\"Northumberland\",\"RD1\",5\r\n\"E06000057\",\"Northumberland\",\"RM1\",5\r\n\"E06000057\",\"Northumberland\",\"RTE\",5\r\n\"E06000057\",\"Northumberland\",\"RJ1\",5\r\n\"E06000057\",\"Northumberland\",\"RJR\",5\r\n\"E06000057\",\"Northumberland\",\"R0A\",5\r\n\"E06000057\",\"Northumberland\",\"RFS\",4\r\n\"E06000057\",\"Northumberland\",\"RAL\",4\r\n\"E06000057\",\"Northumberland\",\"RCF\",4\r\n\"E06000057\",\"Northumberland\",\"RCD\",4\r\n\"E06000057\",\"Northumberland\",\"RVV\",4\r\n\"E06000057\",\"Northumberland\",\"RHW\",4\r\n\"E06000057\",\"Northumberland\",\"RJC\",4\r\n\"E06000057\",\"Northumberland\",\"RGN\",4\r\n\"E06000057\",\"Northumberland\",\"RHU\",4\r\n\"E06000057\",\"Northumberland\",\"RK5\",4\r\n\"E06000057\",\"Northumberland\",\"RWH\",4\r\n\"E06000057\",\"Northumberland\",\"RBT\",4\r\n\"E06000057\",\"Northumberland\",\"R1H\",4\r\n\"E06000057\",\"Northumberland\",\"RXK\",3\r\n\"E06000057\",\"Northumberland\",\"RA2\",3\r\n\"E06000057\",\"Northumberland\",\"RCX\",3\r\n\"E06000057\",\"Northumberland\",\"RGT\",3\r\n\"E06000057\",\"Northumberland\",\"RPA\",3\r\n\"E06000057\",\"Northumberland\",\"RTG\",5\r\n\"E06000057\",\"Northumberland\",\"RHQ\",3\r\n\"E06000057\",\"Northumberland\",\"RF4\",3\r\n\"E06000057\",\"Northumberland\",\"RKB\",3\r\n\"E06000057\",\"Northumberland\",\"RGP\",3\r\n\"E06000057\",\"Northumberland\",\"RH8\",3\r\n\"E06000057\",\"Northumberland\",\"RJL\",3\r\n\"E06000057\",\"Northumberland\",\"RBA\",3\r\n\"E06000057\",\"Northumberland\",\"RBZ\",3\r\n\"E06000057\",\"Northumberland\",\"REF\",3\r\n\"E06000057\",\"Northumberland\",\"RWP\",3\r\n\"E06000057\",\"Northumberland\",\"RJE\",3\r\n\"E06000057\",\"Northumberland\",\"RQM\",3\r\n\"E06000057\",\"Northumberland\",\"RX3\",3\r\n\"E06000057\",\"Northumberland\",\"RA7\",2\r\n\"E06000057\",\"Northumberland\",\"RK9\",2\r\n\"E06000057\",\"Northumberland\",\"REM\",4\r\n\"E06000057\",\"Northumberland\",\"RWE\",2\r\n\"E06000057\",\"Northumberland\",\"RXR\",2\r\n\"E06000057\",\"Northumberland\",\"R1K\",2\r\n\"E06000057\",\"Northumberland\",\"RAE\",2\r\n\"E06000057\",\"Northumberland\",\"RXH\",2\r\n\"E06000057\",\"Northumberland\",\"RJ2\",2\r\n\"E06000057\",\"Northumberland\",\"RJN\",2\r\n\"E06000057\",\"Northumberland\",\"RQW\",2\r\n\"E06000057\",\"Northumberland\",\"RFF\",2\r\n\"E06000057\",\"Northumberland\",\"RYJ\",2\r\n\"E06000057\",\"Northumberland\",\"RFR\",3\r\n\"E06000057\",\"Northumberland\",\"RJ7\",2\r\n\"E06000057\",\"Northumberland\",\"RVY\",2\r\n\"E06000057\",\"Northumberland\",\"RVR\",2\r\n\"E06000057\",\"Northumberland\",\"RW6\",2\r\n\"E06000057\",\"Northumberland\",\"RAJ\",1\r\n\"E06000057\",\"Northumberland\",\"RD3\",1\r\n\"E06000057\",\"Northumberland\",\"RGM\",1\r\n\"E06000057\",\"Northumberland\",\"RJZ\",1\r\n\"E06000057\",\"Northumberland\",\"RXW\",2\r\n\"E06000057\",\"Northumberland\",\"RYR\",1\r\n\"E06000057\",\"Northumberland\",\"RNA\",1\r\n\"E06000057\",\"Northumberland\",\"RNN\",1\r\n\"E06000057\",\"Northumberland\",\"RRF\",1\r\n\"E06000057\",\"Northumberland\",\"RT3\",1\r\n\"E06000057\",\"Northumberland\",\"RW1\",1\r\n\"E06000057\",\"Northumberland\",\"RWY\",1\r\n\"E06000057\",\"Northumberland\",\"RBD\",1\r\n\"E06000057\",\"Northumberland\",\"RWJ\",1\r\n\"E06000057\",\"Northumberland\",\"R1F\",1\r\n\"E06000057\",\"Northumberland\",\"RHM\",1\r\n\"E06000057\",\"Northumberland\",\"RN5\",1\r\n\"E06000057\",\"Northumberland\",\"RP5\",1\r\n\"E06000057\",\"Northumberland\",\"RTK\",1\r\n\"E06000057\",\"Northumberland\",\"RXN\",1\r\n\"E06000057\",\"Northumberland\",\"RDD\",1\r\n\"E06000057\",\"Northumberland\",\"RNZ\",1\r\n\"E06000057\",\"Northumberland\",\"RWF\",1\r\n\"E06000057\",\"Northumberland\",\"RWW\",1\r\n\"E06000057\",\"Northumberland\",\"RA4\",1\r\n\"E06000057\",\"Northumberland\",\"RA9\",1\r\n\"E06000057\",\"Northumberland\",\"RMC\",1\r\n\"E06000057\",\"Northumberland\",\"RN3\",1\r\n\"E06000057\",\"Northumberland\",\"RC1\",1\r\n\"E06000057\",\"Northumberland\",\"RL4\",1\r\n\"E06000057\",\"Northumberland\",\"RMP\",1\r\n\"E06000057\",\"Northumberland\",\"RNS\",1\r\n\"E06000057\",\"Northumberland\",\"RC9\",1\r\n\"E06000057\",\"Northumberland\",\"RDU\",1\r\n\"E06000057\",\"Northumberland\",\"RDZ\",1\r\n\"E06000057\",\"Northumberland\",\"RLQ\",1\r\nNA,NA,\"RDZ\",2\r\nNA,NA,\"RD3\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RXQ\",36430\r\n\"E10000002\",\"Buckinghamshire\",\"RD8\",3132\r\n\"E10000002\",\"Buckinghamshire\",\"RTH\",2849\r\n\"E10000002\",\"Buckinghamshire\",\"RC9\",414\r\n\"E10000002\",\"Buckinghamshire\",\"RNU\",389\r\n\"E10000002\",\"Buckinghamshire\",\"RT3\",235\r\n\"E10000002\",\"Buckinghamshire\",\"RNS\",71\r\n\"E10000002\",\"Buckinghamshire\",\"RWG\",226\r\n\"E10000002\",\"Buckinghamshire\",\"RYJ\",257\r\n\"E10000002\",\"Buckinghamshire\",\"RDU\",13882\r\n\"E10000002\",\"Buckinghamshire\",\"RQM\",92\r\n\"E10000002\",\"Buckinghamshire\",\"RC1\",30\r\n\"E10000002\",\"Buckinghamshire\",\"RRV\",138\r\n\"E10000002\",\"Buckinghamshire\",\"RAS\",432\r\n\"E10000002\",\"Buckinghamshire\",\"R1K\",193\r\n\"E10000002\",\"Buckinghamshire\",\"R1H\",57\r\n\"E10000002\",\"Buckinghamshire\",\"RHW\",262\r\n\"E10000002\",\"Buckinghamshire\",\"RJ1\",71\r\n\"E10000002\",\"Buckinghamshire\",\"RWH\",81\r\n\"E10000002\",\"Buckinghamshire\",\"REF\",34\r\n\"E10000002\",\"Buckinghamshire\",\"RAL\",62\r\n\"E10000002\",\"Buckinghamshire\",\"RKB\",20\r\n\"E10000002\",\"Buckinghamshire\",\"RA9\",23\r\n\"E10000002\",\"Buckinghamshire\",\"RDZ\",24\r\n\"E10000002\",\"Buckinghamshire\",\"RJC\",13\r\n\"E10000002\",\"Buckinghamshire\",\"RQW\",11\r\n\"E10000002\",\"Buckinghamshire\",\"RGN\",10\r\n\"E10000002\",\"Buckinghamshire\",\"RHM\",32\r\n\"E10000002\",\"Buckinghamshire\",\"RTE\",16\r\n\"E10000002\",\"Buckinghamshire\",\"RA2\",20\r\n\"E10000002\",\"Buckinghamshire\",\"RH8\",17\r\n\"E10000002\",\"Buckinghamshire\",\"RN5\",18\r\n\"E10000002\",\"Buckinghamshire\",\"RQX\",8\r\n\"E10000002\",\"Buckinghamshire\",\"RWF\",11\r\n\"E10000002\",\"Buckinghamshire\",\"RWE\",13\r\n\"E10000002\",\"Buckinghamshire\",\"RN3\",15\r\n\"E10000002\",\"Buckinghamshire\",\"RBD\",11\r\n\"E10000002\",\"Buckinghamshire\",\"RGT\",13\r\n\"E10000002\",\"Buckinghamshire\",\"RX1\",10\r\n\"E10000002\",\"Buckinghamshire\",\"RYR\",24\r\n\"E10000002\",\"Buckinghamshire\",\"RHU\",9\r\n\"E10000002\",\"Buckinghamshire\",\"RV3\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RA4\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RRK\",30\r\n\"E10000002\",\"Buckinghamshire\",\"RJZ\",14\r\n\"E10000002\",\"Buckinghamshire\",\"RM1\",8\r\n\"E10000002\",\"Buckinghamshire\",\"RWK\",5\r\n\"E10000002\",\"Buckinghamshire\",\"R1F\",8\r\n\"E10000002\",\"Buckinghamshire\",\"RJ7\",28\r\n\"E10000002\",\"Buckinghamshire\",\"R0B\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RNZ\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RWD\",5\r\n\"E10000002\",\"Buckinghamshire\",\"RD1\",10\r\n\"E10000002\",\"Buckinghamshire\",\"RD3\",17\r\n\"E10000002\",\"Buckinghamshire\",\"RBA\",8\r\n\"E10000002\",\"Buckinghamshire\",\"RCX\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RTG\",10\r\n\"E10000002\",\"Buckinghamshire\",\"RTR\",9\r\n\"E10000002\",\"Buckinghamshire\",\"RWA\",4\r\n\"E10000002\",\"Buckinghamshire\",\"RP1\",8\r\n\"E10000002\",\"Buckinghamshire\",\"RBZ\",10\r\n\"E10000002\",\"Buckinghamshire\",\"RGM\",4\r\n\"E10000002\",\"Buckinghamshire\",\"RXW\",5\r\n\"E10000002\",\"Buckinghamshire\",\"RBK\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RGR\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RVJ\",11\r\n\"E10000002\",\"Buckinghamshire\",\"RA7\",8\r\n\"E10000002\",\"Buckinghamshire\",\"RDD\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RJE\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RP6\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RTF\",4\r\n\"E10000002\",\"Buckinghamshire\",\"RVN\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RA3\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RGP\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RNQ\",4\r\n\"E10000002\",\"Buckinghamshire\",\"RW6\",5\r\n\"E10000002\",\"Buckinghamshire\",\"RK9\",12\r\n\"E10000002\",\"Buckinghamshire\",\"RWP\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RXH\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RXK\",10\r\n\"E10000002\",\"Buckinghamshire\",\"RXL\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RK5\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RR8\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RTP\",5\r\n\"E10000002\",\"Buckinghamshire\",\"RBT\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RDE\",11\r\n\"E10000002\",\"Buckinghamshire\",\"RJ2\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RLQ\",7\r\n\"E10000002\",\"Buckinghamshire\",\"RPY\",15\r\n\"E10000002\",\"Buckinghamshire\",\"REM\",4\r\n\"E10000002\",\"Buckinghamshire\",\"RCB\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RVR\",5\r\n\"E10000002\",\"Buckinghamshire\",\"RXF\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RAX\",8\r\n\"E10000002\",\"Buckinghamshire\",\"RET\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RVV\",9\r\n\"E10000002\",\"Buckinghamshire\",\"RXC\",4\r\n\"E10000002\",\"Buckinghamshire\",\"RKE\",9\r\n\"E10000002\",\"Buckinghamshire\",\"RNA\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RQ8\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RWW\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RXP\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RHQ\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RAN\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RFS\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RN7\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RTK\",21\r\n\"E10000002\",\"Buckinghamshire\",\"RAP\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RF4\",4\r\n\"E10000002\",\"Buckinghamshire\",\"RP4\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RTQ\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RTX\",10\r\n\"E10000002\",\"Buckinghamshire\",\"R0A\",11\r\n\"E10000002\",\"Buckinghamshire\",\"RCF\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RXR\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RJR\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RTD\",5\r\n\"E10000002\",\"Buckinghamshire\",\"RNL\",6\r\n\"E10000002\",\"Buckinghamshire\",\"RJ6\",5\r\n\"E10000002\",\"Buckinghamshire\",\"RBV\",1\r\n\"E10000002\",\"Buckinghamshire\",\"R1L\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RFF\",1\r\n\"E10000002\",\"Buckinghamshire\",\"NR5\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RRJ\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RAE\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RBS\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RM3\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RWX\",11\r\n\"E10000002\",\"Buckinghamshire\",\"RW1\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RT5\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RVW\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RVY\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RBL\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RP5\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RWJ\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RQ3\",3\r\n\"E10000002\",\"Buckinghamshire\",\"RFR\",2\r\n\"E10000002\",\"Buckinghamshire\",\"RRF\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RXN\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RWY\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RPC\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RQY\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RL4\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RAJ\",1\r\n\"E10000002\",\"Buckinghamshire\",\"RPA\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RGT\",31501\r\n\"E10000003\",\"Cambridgeshire\",\"RT1\",250\r\n\"E10000003\",\"Cambridgeshire\",\"RGM\",531\r\n\"E10000003\",\"Cambridgeshire\",\"RGN\",21917\r\n\"E10000003\",\"Cambridgeshire\",\"RGR\",886\r\n\"E10000003\",\"Cambridgeshire\",\"RM1\",182\r\n\"E10000003\",\"Cambridgeshire\",\"RYJ\",45\r\n\"E10000003\",\"Cambridgeshire\",\"R1H\",54\r\n\"E10000003\",\"Cambridgeshire\",\"RRV\",43\r\n\"E10000003\",\"Cambridgeshire\",\"RTH\",31\r\n\"E10000003\",\"Cambridgeshire\",\"RWH\",253\r\n\"E10000003\",\"Cambridgeshire\",\"RA2\",13\r\n\"E10000003\",\"Cambridgeshire\",\"RDE\",40\r\n\"E10000003\",\"Cambridgeshire\",\"RCX\",5810\r\n\"E10000003\",\"Cambridgeshire\",\"RYV\",3619\r\n\"E10000003\",\"Cambridgeshire\",\"RWD\",38\r\n\"E10000003\",\"Cambridgeshire\",\"R0A\",12\r\n\"E10000003\",\"Cambridgeshire\",\"RXH\",15\r\n\"E10000003\",\"Cambridgeshire\",\"RDU\",17\r\n\"E10000003\",\"Cambridgeshire\",\"R1K\",14\r\n\"E10000003\",\"Cambridgeshire\",\"RQM\",17\r\n\"E10000003\",\"Cambridgeshire\",\"RC1\",215\r\n\"E10000003\",\"Cambridgeshire\",\"RWF\",13\r\n\"E10000003\",\"Cambridgeshire\",\"RD1\",10\r\n\"E10000003\",\"Cambridgeshire\",\"RAL\",22\r\n\"E10000003\",\"Cambridgeshire\",\"RKB\",14\r\n\"E10000003\",\"Cambridgeshire\",\"RQX\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RWE\",49\r\n\"E10000003\",\"Cambridgeshire\",\"RNL\",11\r\n\"E10000003\",\"Cambridgeshire\",\"RQ8\",36\r\n\"E10000003\",\"Cambridgeshire\",\"RJ1\",26\r\n\"E10000003\",\"Cambridgeshire\",\"RQW\",24\r\n\"E10000003\",\"Cambridgeshire\",\"RJ2\",10\r\n\"E10000003\",\"Cambridgeshire\",\"RJL\",9\r\n\"E10000003\",\"Cambridgeshire\",\"RN7\",9\r\n\"E10000003\",\"Cambridgeshire\",\"RNS\",17\r\n\"E10000003\",\"Cambridgeshire\",\"RTF\",8\r\n\"E10000003\",\"Cambridgeshire\",\"RVR\",10\r\n\"E10000003\",\"Cambridgeshire\",\"RCB\",12\r\n\"E10000003\",\"Cambridgeshire\",\"RVJ\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RTD\",10\r\n\"E10000003\",\"Cambridgeshire\",\"RXQ\",16\r\n\"E10000003\",\"Cambridgeshire\",\"RC9\",36\r\n\"E10000003\",\"Cambridgeshire\",\"REF\",20\r\n\"E10000003\",\"Cambridgeshire\",\"RMY\",15\r\n\"E10000003\",\"Cambridgeshire\",\"RA9\",16\r\n\"E10000003\",\"Cambridgeshire\",\"RHQ\",8\r\n\"E10000003\",\"Cambridgeshire\",\"RPY\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RTE\",15\r\n\"E10000003\",\"Cambridgeshire\",\"RWJ\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RDZ\",11\r\n\"E10000003\",\"Cambridgeshire\",\"RXK\",6\r\n\"E10000003\",\"Cambridgeshire\",\"RBL\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RBN\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RVV\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RHM\",11\r\n\"E10000003\",\"Cambridgeshire\",\"RT3\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RX1\",16\r\n\"E10000003\",\"Cambridgeshire\",\"RAJ\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RAN\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RAX\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RNQ\",25\r\n\"E10000003\",\"Cambridgeshire\",\"REM\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RTP\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RYR\",15\r\n\"E10000003\",\"Cambridgeshire\",\"RAP\",9\r\n\"E10000003\",\"Cambridgeshire\",\"RP6\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RWG\",14\r\n\"E10000003\",\"Cambridgeshire\",\"RFF\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RJZ\",17\r\n\"E10000003\",\"Cambridgeshire\",\"RXW\",8\r\n\"E10000003\",\"Cambridgeshire\",\"RD8\",15\r\n\"E10000003\",\"Cambridgeshire\",\"RF4\",8\r\n\"E10000003\",\"Cambridgeshire\",\"RFS\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RK9\",9\r\n\"E10000003\",\"Cambridgeshire\",\"RLT\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RR8\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RRK\",19\r\n\"E10000003\",\"Cambridgeshire\",\"RXC\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RBS\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RJ7\",9\r\n\"E10000003\",\"Cambridgeshire\",\"RWK\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RWY\",2\r\n\"E10000003\",\"Cambridgeshire\",\"R0B\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RLQ\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RTG\",13\r\n\"E10000003\",\"Cambridgeshire\",\"R1L\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RBD\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RBK\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RCD\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RGP\",25\r\n\"E10000003\",\"Cambridgeshire\",\"RJC\",10\r\n\"E10000003\",\"Cambridgeshire\",\"RPA\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RA4\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RK5\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RQ3\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RTK\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RTX\",6\r\n\"E10000003\",\"Cambridgeshire\",\"RA7\",10\r\n\"E10000003\",\"Cambridgeshire\",\"R1F\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RCF\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RXN\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RN3\",6\r\n\"E10000003\",\"Cambridgeshire\",\"RL4\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RBZ\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RH8\",12\r\n\"E10000003\",\"Cambridgeshire\",\"RV5\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RJ6\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RD3\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RHW\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RXR\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RMC\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RBA\",6\r\n\"E10000003\",\"Cambridgeshire\",\"RWP\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RAS\",10\r\n\"E10000003\",\"Cambridgeshire\",\"RJE\",7\r\n\"E10000003\",\"Cambridgeshire\",\"RNZ\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RDD\",12\r\n\"E10000003\",\"Cambridgeshire\",\"RW6\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RAE\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RJR\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RXY\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RHU\",6\r\n\"E10000003\",\"Cambridgeshire\",\"RT5\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RP5\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RXL\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RXP\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RN5\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RWW\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RYG\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RFR\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RXM\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RTR\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RKE\",5\r\n\"E10000003\",\"Cambridgeshire\",\"RWA\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RBT\",4\r\n\"E10000003\",\"Cambridgeshire\",\"RVY\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RP4\",3\r\n\"E10000003\",\"Cambridgeshire\",\"RNU\",2\r\n\"E10000003\",\"Cambridgeshire\",\"RRF\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RXE\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RXF\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RY3\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RMP\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RM3\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RR7\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RJ8\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RWR\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RNA\",1\r\n\"E10000003\",\"Cambridgeshire\",\"RPC\",1\r\n\"E10000006\",\"Cumbria\",\"RNL\",33406\r\n\"E10000006\",\"Cumbria\",\"RNN\",795\r\n\"E10000006\",\"Cumbria\",\"RTD\",976\r\n\"E10000006\",\"Cumbria\",\"RTR\",82\r\n\"E10000006\",\"Cumbria\",\"RTF\",94\r\n\"E10000006\",\"Cumbria\",\"RTX\",19469\r\n\"E10000006\",\"Cumbria\",\"RXP\",31\r\n\"E10000006\",\"Cumbria\",\"RXN\",460\r\n\"E10000006\",\"Cumbria\",\"RCB\",30\r\n\"E10000006\",\"Cumbria\",\"RXL\",276\r\n\"E10000006\",\"Cumbria\",\"R0B\",40\r\n\"E10000006\",\"Cumbria\",\"RR8\",22\r\n\"E10000006\",\"Cumbria\",\"R0A\",148\r\n\"E10000006\",\"Cumbria\",\"RVY\",14\r\n\"E10000006\",\"Cumbria\",\"RR7\",10\r\n\"E10000006\",\"Cumbria\",\"RGT\",8\r\n\"E10000006\",\"Cumbria\",\"RX4\",24\r\n\"E10000006\",\"Cumbria\",\"REM\",44\r\n\"E10000006\",\"Cumbria\",\"RJ1\",12\r\n\"E10000006\",\"Cumbria\",\"RN5\",6\r\n\"E10000006\",\"Cumbria\",\"RBT\",13\r\n\"E10000006\",\"Cumbria\",\"RHQ\",12\r\n\"E10000006\",\"Cumbria\",\"RM3\",23\r\n\"E10000006\",\"Cumbria\",\"RRV\",15\r\n\"E10000006\",\"Cumbria\",\"RW6\",19\r\n\"E10000006\",\"Cumbria\",\"REF\",7\r\n\"E10000006\",\"Cumbria\",\"RET\",4\r\n\"E10000006\",\"Cumbria\",\"RTK\",4\r\n\"E10000006\",\"Cumbria\",\"RBN\",10\r\n\"E10000006\",\"Cumbria\",\"RHU\",3\r\n\"E10000006\",\"Cumbria\",\"RVJ\",5\r\n\"E10000006\",\"Cumbria\",\"RJ2\",2\r\n\"E10000006\",\"Cumbria\",\"RBS\",58\r\n\"E10000006\",\"Cumbria\",\"RXW\",7\r\n\"E10000006\",\"Cumbria\",\"RX1\",9\r\n\"E10000006\",\"Cumbria\",\"RXK\",5\r\n\"E10000006\",\"Cumbria\",\"RDU\",9\r\n\"E10000006\",\"Cumbria\",\"RJE\",9\r\n\"E10000006\",\"Cumbria\",\"RNQ\",1\r\n\"E10000006\",\"Cumbria\",\"RQM\",3\r\n\"E10000006\",\"Cumbria\",\"RTG\",11\r\n\"E10000006\",\"Cumbria\",\"RWA\",6\r\n\"E10000006\",\"Cumbria\",\"RYR\",5\r\n\"E10000006\",\"Cumbria\",\"RAE\",4\r\n\"E10000006\",\"Cumbria\",\"RJR\",6\r\n\"E10000006\",\"Cumbria\",\"RXC\",2\r\n\"E10000006\",\"Cumbria\",\"RAS\",1\r\n\"E10000006\",\"Cumbria\",\"RC1\",4\r\n\"E10000006\",\"Cumbria\",\"RD3\",5\r\n\"E10000006\",\"Cumbria\",\"RTE\",5\r\n\"E10000006\",\"Cumbria\",\"RAX\",3\r\n\"E10000006\",\"Cumbria\",\"RBL\",4\r\n\"E10000006\",\"Cumbria\",\"RCF\",11\r\n\"E10000006\",\"Cumbria\",\"RJN\",3\r\n\"E10000006\",\"Cumbria\",\"RQW\",2\r\n\"E10000006\",\"Cumbria\",\"RWG\",3\r\n\"E10000006\",\"Cumbria\",\"RWP\",5\r\n\"E10000006\",\"Cumbria\",\"RXR\",26\r\n\"E10000006\",\"Cumbria\",\"R1K\",7\r\n\"E10000006\",\"Cumbria\",\"RJ7\",2\r\n\"E10000006\",\"Cumbria\",\"RNZ\",2\r\n\"E10000006\",\"Cumbria\",\"RP5\",10\r\n\"E10000006\",\"Cumbria\",\"RRK\",13\r\n\"E10000006\",\"Cumbria\",\"RWJ\",10\r\n\"E10000006\",\"Cumbria\",\"RWY\",5\r\n\"E10000006\",\"Cumbria\",\"RF4\",1\r\n\"E10000006\",\"Cumbria\",\"RKB\",6\r\n\"E10000006\",\"Cumbria\",\"RVW\",20\r\n\"E10000006\",\"Cumbria\",\"RNA\",2\r\n\"E10000006\",\"Cumbria\",\"RL4\",3\r\n\"E10000006\",\"Cumbria\",\"RWD\",2\r\n\"E10000006\",\"Cumbria\",\"RW5\",9\r\n\"E10000006\",\"Cumbria\",\"RWW\",10\r\n\"E10000006\",\"Cumbria\",\"RBV\",11\r\n\"E10000006\",\"Cumbria\",\"RCU\",2\r\n\"E10000006\",\"Cumbria\",\"RK9\",7\r\n\"E10000006\",\"Cumbria\",\"RA2\",2\r\n\"E10000006\",\"Cumbria\",\"RBA\",8\r\n\"E10000006\",\"Cumbria\",\"RPA\",3\r\n\"E10000006\",\"Cumbria\",\"RBD\",2\r\n\"E10000006\",\"Cumbria\",\"RRF\",12\r\n\"E10000006\",\"Cumbria\",\"RXF\",5\r\n\"E10000006\",\"Cumbria\",\"REP\",1\r\n\"E10000006\",\"Cumbria\",\"RA9\",3\r\n\"E10000006\",\"Cumbria\",\"RD1\",1\r\n\"E10000006\",\"Cumbria\",\"RWF\",2\r\n\"E10000006\",\"Cumbria\",\"RCD\",7\r\n\"E10000006\",\"Cumbria\",\"RTH\",7\r\n\"E10000006\",\"Cumbria\",\"R1F\",3\r\n\"E10000006\",\"Cumbria\",\"RA4\",4\r\n\"E10000006\",\"Cumbria\",\"RAL\",5\r\n\"E10000006\",\"Cumbria\",\"RGN\",2\r\n\"E10000006\",\"Cumbria\",\"RHW\",3\r\n\"E10000006\",\"Cumbria\",\"RWH\",5\r\n\"E10000006\",\"Cumbria\",\"RN3\",3\r\n\"E10000006\",\"Cumbria\",\"R1H\",5\r\n\"E10000006\",\"Cumbria\",\"RH8\",5\r\n\"E10000006\",\"Cumbria\",\"RVV\",2\r\n\"E10000006\",\"Cumbria\",\"RJ6\",2\r\n\"E10000006\",\"Cumbria\",\"RPC\",1\r\n\"E10000006\",\"Cumbria\",\"RQX\",1\r\n\"E10000006\",\"Cumbria\",\"RCX\",3\r\n\"E10000006\",\"Cumbria\",\"RDZ\",2\r\n\"E10000006\",\"Cumbria\",\"RJL\",3\r\n\"E10000006\",\"Cumbria\",\"RHM\",5\r\n\"E10000006\",\"Cumbria\",\"RJC\",6\r\n\"E10000006\",\"Cumbria\",\"RJZ\",2\r\n\"E10000006\",\"Cumbria\",\"RNS\",5\r\n\"E10000006\",\"Cumbria\",\"RBK\",2\r\n\"E10000006\",\"Cumbria\",\"RGR\",3\r\n\"E10000006\",\"Cumbria\",\"RMC\",4\r\n\"E10000006\",\"Cumbria\",\"RX3\",3\r\n\"E10000006\",\"Cumbria\",\"RKE\",2\r\n\"E10000006\",\"Cumbria\",\"RM1\",4\r\n\"E10000006\",\"Cumbria\",\"RVR\",2\r\n\"E10000006\",\"Cumbria\",\"RYJ\",7\r\n\"E10000006\",\"Cumbria\",\"RWE\",4\r\n\"E10000006\",\"Cumbria\",\"RC9\",3\r\n\"E10000006\",\"Cumbria\",\"RXQ\",2\r\n\"E10000006\",\"Cumbria\",\"RFS\",4\r\n\"E10000006\",\"Cumbria\",\"RLQ\",2\r\n\"E10000006\",\"Cumbria\",\"RK5\",2\r\n\"E10000006\",\"Cumbria\",\"RTP\",1\r\n\"E10000006\",\"Cumbria\",\"RWK\",1\r\n\"E10000006\",\"Cumbria\",\"RGM\",1\r\n\"E10000006\",\"Cumbria\",\"RBZ\",1\r\n\"E10000006\",\"Cumbria\",\"RDE\",1\r\n\"E10000006\",\"Cumbria\",\"RFF\",1\r\n\"E10000006\",\"Cumbria\",\"RXH\",1\r\n\"E10000006\",\"Cumbria\",\"RA7\",1\r\n\"E10000006\",\"Cumbria\",\"RN7\",1\r\n\"E10000007\",\"Derbyshire\",\"RTG\",28912\r\n\"E10000007\",\"Derbyshire\",\"RK5\",4605\r\n\"E10000007\",\"Derbyshire\",\"RX1\",5949\r\n\"E10000007\",\"Derbyshire\",\"RFS\",34614\r\n\"E10000007\",\"Derbyshire\",\"RXM\",769\r\n\"E10000007\",\"Derbyshire\",\"RHQ\",3246\r\n\"E10000007\",\"Derbyshire\",\"RWE\",128\r\n\"E10000007\",\"Derbyshire\",\"RY8\",239\r\n\"E10000007\",\"Derbyshire\",\"RWD\",98\r\n\"E10000007\",\"Derbyshire\",\"RRK\",77\r\n\"E10000007\",\"Derbyshire\",\"RCB\",61\r\n\"E10000007\",\"Derbyshire\",\"RA9\",26\r\n\"E10000007\",\"Derbyshire\",\"RR8\",47\r\n\"E10000007\",\"Derbyshire\",\"RWA\",16\r\n\"E10000007\",\"Derbyshire\",\"REF\",49\r\n\"E10000007\",\"Derbyshire\",\"RJE\",124\r\n\"E10000007\",\"Derbyshire\",\"RJR\",7\r\n\"E10000007\",\"Derbyshire\",\"RNQ\",8\r\n\"E10000007\",\"Derbyshire\",\"RCU\",358\r\n\"E10000007\",\"Derbyshire\",\"RNL\",11\r\n\"E10000007\",\"Derbyshire\",\"RTH\",16\r\n\"E10000007\",\"Derbyshire\",\"REM\",18\r\n\"E10000007\",\"Derbyshire\",\"RDE\",13\r\n\"E10000007\",\"Derbyshire\",\"RP5\",741\r\n\"E10000007\",\"Derbyshire\",\"R1F\",9\r\n\"E10000007\",\"Derbyshire\",\"RTE\",26\r\n\"E10000007\",\"Derbyshire\",\"RYR\",14\r\n\"E10000007\",\"Derbyshire\",\"RCX\",10\r\n\"E10000007\",\"Derbyshire\",\"RFF\",18\r\n\"E10000007\",\"Derbyshire\",\"RKB\",31\r\n\"E10000007\",\"Derbyshire\",\"RN5\",6\r\n\"E10000007\",\"Derbyshire\",\"RBV\",167\r\n\"E10000007\",\"Derbyshire\",\"RGP\",12\r\n\"E10000007\",\"Derbyshire\",\"RBD\",8\r\n\"E10000007\",\"Derbyshire\",\"RJZ\",8\r\n\"E10000007\",\"Derbyshire\",\"RXH\",7\r\n\"E10000007\",\"Derbyshire\",\"RGT\",26\r\n\"E10000007\",\"Derbyshire\",\"RJ1\",10\r\n\"E10000007\",\"Derbyshire\",\"RXL\",25\r\n\"E10000007\",\"Derbyshire\",\"R0A\",659\r\n\"E10000007\",\"Derbyshire\",\"RQM\",7\r\n\"E10000007\",\"Derbyshire\",\"RXP\",11\r\n\"E10000007\",\"Derbyshire\",\"RHA\",22\r\n\"E10000007\",\"Derbyshire\",\"RK9\",13\r\n\"E10000007\",\"Derbyshire\",\"RM1\",12\r\n\"E10000007\",\"Derbyshire\",\"RWG\",5\r\n\"E10000007\",\"Derbyshire\",\"RBZ\",11\r\n\"E10000007\",\"Derbyshire\",\"RNS\",10\r\n\"E10000007\",\"Derbyshire\",\"RTR\",8\r\n\"E10000007\",\"Derbyshire\",\"RXW\",9\r\n\"E10000007\",\"Derbyshire\",\"RC9\",5\r\n\"E10000007\",\"Derbyshire\",\"RD3\",11\r\n\"E10000007\",\"Derbyshire\",\"RJL\",20\r\n\"E10000007\",\"Derbyshire\",\"RQ3\",14\r\n\"E10000007\",\"Derbyshire\",\"RTX\",17\r\n\"E10000007\",\"Derbyshire\",\"RX3\",4\r\n\"E10000007\",\"Derbyshire\",\"RBK\",9\r\n\"E10000007\",\"Derbyshire\",\"RBT\",17\r\n\"E10000007\",\"Derbyshire\",\"RJ2\",4\r\n\"E10000007\",\"Derbyshire\",\"RJ6\",2\r\n\"E10000007\",\"Derbyshire\",\"RTF\",21\r\n\"E10000007\",\"Derbyshire\",\"RXC\",3\r\n\"E10000007\",\"Derbyshire\",\"TAJ\",3\r\n\"E10000007\",\"Derbyshire\",\"RA3\",7\r\n\"E10000007\",\"Derbyshire\",\"RA4\",7\r\n\"E10000007\",\"Derbyshire\",\"RAX\",3\r\n\"E10000007\",\"Derbyshire\",\"RCF\",2\r\n\"E10000007\",\"Derbyshire\",\"RJ7\",9\r\n\"E10000007\",\"Derbyshire\",\"R1H\",13\r\n\"E10000007\",\"Derbyshire\",\"R1K\",6\r\n\"E10000007\",\"Derbyshire\",\"RLT\",3\r\n\"E10000007\",\"Derbyshire\",\"RTP\",4\r\n\"E10000007\",\"Derbyshire\",\"RM3\",151\r\n\"E10000007\",\"Derbyshire\",\"RTD\",8\r\n\"E10000007\",\"Derbyshire\",\"RVV\",8\r\n\"E10000007\",\"Derbyshire\",\"RWP\",6\r\n\"E10000007\",\"Derbyshire\",\"RXK\",22\r\n\"E10000007\",\"Derbyshire\",\"RAE\",5\r\n\"E10000007\",\"Derbyshire\",\"RDZ\",10\r\n\"E10000007\",\"Derbyshire\",\"RH8\",15\r\n\"E10000007\",\"Derbyshire\",\"RJC\",9\r\n\"E10000007\",\"Derbyshire\",\"RJN\",848\r\n\"E10000007\",\"Derbyshire\",\"RLQ\",4\r\n\"E10000007\",\"Derbyshire\",\"RAL\",9\r\n\"E10000007\",\"Derbyshire\",\"RR7\",4\r\n\"E10000007\",\"Derbyshire\",\"RRE\",5\r\n\"E10000007\",\"Derbyshire\",\"RVY\",5\r\n\"E10000007\",\"Derbyshire\",\"RBA\",8\r\n\"E10000007\",\"Derbyshire\",\"RCD\",7\r\n\"E10000007\",\"Derbyshire\",\"RD1\",10\r\n\"E10000007\",\"Derbyshire\",\"RMC\",3\r\n\"E10000007\",\"Derbyshire\",\"RN3\",3\r\n\"E10000007\",\"Derbyshire\",\"RNZ\",7\r\n\"E10000007\",\"Derbyshire\",\"RQW\",4\r\n\"E10000007\",\"Derbyshire\",\"RRV\",10\r\n\"E10000007\",\"Derbyshire\",\"RWF\",10\r\n\"E10000007\",\"Derbyshire\",\"RFR\",65\r\n\"E10000007\",\"Derbyshire\",\"RMY\",3\r\n\"E10000007\",\"Derbyshire\",\"RGN\",6\r\n\"E10000007\",\"Derbyshire\",\"RWJ\",4933\r\n\"E10000007\",\"Derbyshire\",\"RHU\",7\r\n\"E10000007\",\"Derbyshire\",\"RNA\",2\r\n\"E10000007\",\"Derbyshire\",\"RVR\",2\r\n\"E10000007\",\"Derbyshire\",\"RBL\",4\r\n\"E10000007\",\"Derbyshire\",\"RQ8\",2\r\n\"E10000007\",\"Derbyshire\",\"RXG\",1\r\n\"E10000007\",\"Derbyshire\",\"RBQ\",3\r\n\"E10000007\",\"Derbyshire\",\"RW6\",38\r\n\"E10000007\",\"Derbyshire\",\"RYJ\",7\r\n\"E10000007\",\"Derbyshire\",\"RWY\",6\r\n\"E10000007\",\"Derbyshire\",\"RW5\",2\r\n\"E10000007\",\"Derbyshire\",\"RXN\",3\r\n\"E10000007\",\"Derbyshire\",\"RDD\",3\r\n\"E10000007\",\"Derbyshire\",\"RXF\",8\r\n\"E10000007\",\"Derbyshire\",\"RDU\",12\r\n\"E10000007\",\"Derbyshire\",\"RGM\",5\r\n\"E10000007\",\"Derbyshire\",\"RA2\",8\r\n\"E10000007\",\"Derbyshire\",\"RWW\",12\r\n\"E10000007\",\"Derbyshire\",\"RHM\",5\r\n\"E10000007\",\"Derbyshire\",\"RT5\",12\r\n\"E10000007\",\"Derbyshire\",\"RV9\",2\r\n\"E10000007\",\"Derbyshire\",\"RTV\",1\r\n\"E10000007\",\"Derbyshire\",\"RL4\",8\r\n\"E10000007\",\"Derbyshire\",\"RWH\",3\r\n\"E10000007\",\"Derbyshire\",\"RD8\",3\r\n\"E10000007\",\"Derbyshire\",\"RVJ\",7\r\n\"E10000007\",\"Derbyshire\",\"RXX\",1\r\n\"E10000007\",\"Derbyshire\",\"RP7\",1\r\n\"E10000007\",\"Derbyshire\",\"RPA\",3\r\n\"E10000007\",\"Derbyshire\",\"RT3\",1\r\n\"E10000007\",\"Derbyshire\",\"RBS\",6\r\n\"E10000007\",\"Derbyshire\",\"RHW\",4\r\n\"E10000007\",\"Derbyshire\",\"R0B\",5\r\n\"E10000007\",\"Derbyshire\",\"RA7\",6\r\n\"E10000007\",\"Derbyshire\",\"RMP\",2496\r\n\"E10000007\",\"Derbyshire\",\"RLY\",5\r\n\"E10000007\",\"Derbyshire\",\"RQX\",1\r\n\"E10000007\",\"Derbyshire\",\"RTK\",2\r\n\"E10000007\",\"Derbyshire\",\"RRF\",4\r\n\"E10000007\",\"Derbyshire\",\"NTX\",1\r\n\"E10000007\",\"Derbyshire\",\"RBN\",4\r\n\"E10000007\",\"Derbyshire\",\"RGR\",2\r\n\"E10000007\",\"Derbyshire\",\"RPY\",1\r\n\"E10000007\",\"Derbyshire\",\"RP1\",2\r\n\"E10000007\",\"Derbyshire\",\"RXQ\",7\r\n\"E10000007\",\"Derbyshire\",\"RC1\",4\r\n\"E10000007\",\"Derbyshire\",\"RVW\",1\r\n\"E10000007\",\"Derbyshire\",\"RAS\",1\r\n\"E10000007\",\"Derbyshire\",\"RP6\",1\r\n\"E10000007\",\"Derbyshire\",\"RPC\",2\r\n\"E10000007\",\"Derbyshire\",\"RRJ\",2\r\n\"E10000007\",\"Derbyshire\",\"RXA\",3\r\n\"E10000007\",\"Derbyshire\",\"RW4\",2\r\n\"E10000007\",\"Derbyshire\",\"RL1\",1\r\n\"E10000007\",\"Derbyshire\",\"RET\",1\r\n\"E10000007\",\"Derbyshire\",\"RXR\",1\r\n\"E10000007\",\"Derbyshire\",\"RX4\",1\r\n\"E10000008\",\"Devon\",\"RH8\",39576\r\n\"E10000008\",\"Devon\",\"RBA\",1324\r\n\"E10000008\",\"Devon\",\"RBD\",168\r\n\"E10000008\",\"Devon\",\"RK9\",8447\r\n\"E10000008\",\"Devon\",\"RA7\",325\r\n\"E10000008\",\"Devon\",\"RA9\",16347\r\n\"E10000008\",\"Devon\",\"RBZ\",18265\r\n\"E10000008\",\"Devon\",\"RVJ\",136\r\n\"E10000008\",\"Devon\",\"REF\",179\r\n\"E10000008\",\"Devon\",\"RA4\",59\r\n\"E10000008\",\"Devon\",\"RDU\",36\r\n\"E10000008\",\"Devon\",\"R1H\",35\r\n\"E10000008\",\"Devon\",\"RD3\",30\r\n\"E10000008\",\"Devon\",\"RHM\",34\r\n\"E10000008\",\"Devon\",\"RYR\",20\r\n\"E10000008\",\"Devon\",\"RTH\",43\r\n\"E10000008\",\"Devon\",\"RWF\",20\r\n\"E10000008\",\"Devon\",\"R0A\",14\r\n\"E10000008\",\"Devon\",\"RAL\",11\r\n\"E10000008\",\"Devon\",\"RGN\",8\r\n\"E10000008\",\"Devon\",\"RRK\",34\r\n\"E10000008\",\"Devon\",\"RNZ\",18\r\n\"E10000008\",\"Devon\",\"RYJ\",30\r\n\"E10000008\",\"Devon\",\"RD1\",41\r\n\"E10000008\",\"Devon\",\"RAX\",14\r\n\"E10000008\",\"Devon\",\"RHW\",23\r\n\"E10000008\",\"Devon\",\"RT3\",35\r\n\"E10000008\",\"Devon\",\"RHU\",19\r\n\"E10000008\",\"Devon\",\"RTE\",33\r\n\"E10000008\",\"Devon\",\"RWH\",9\r\n\"E10000008\",\"Devon\",\"RJC\",16\r\n\"E10000008\",\"Devon\",\"RWP\",13\r\n\"E10000008\",\"Devon\",\"RRV\",26\r\n\"E10000008\",\"Devon\",\"RJ7\",20\r\n\"E10000008\",\"Devon\",\"RX1\",8\r\n\"E10000008\",\"Devon\",\"RJZ\",17\r\n\"E10000008\",\"Devon\",\"RN3\",33\r\n\"E10000008\",\"Devon\",\"RDZ\",20\r\n\"E10000008\",\"Devon\",\"RTP\",10\r\n\"E10000008\",\"Devon\",\"RAS\",11\r\n\"E10000008\",\"Devon\",\"RCF\",4\r\n\"E10000008\",\"Devon\",\"RDY\",5\r\n\"E10000008\",\"Devon\",\"RQW\",13\r\n\"E10000008\",\"Devon\",\"R1K\",16\r\n\"E10000008\",\"Devon\",\"RTF\",5\r\n\"E10000008\",\"Devon\",\"RTX\",9\r\n\"E10000008\",\"Devon\",\"RA3\",29\r\n\"E10000008\",\"Devon\",\"RLQ\",17\r\n\"E10000008\",\"Devon\",\"RXK\",10\r\n\"E10000008\",\"Devon\",\"RGT\",10\r\n\"E10000008\",\"Devon\",\"RJE\",11\r\n\"E10000008\",\"Devon\",\"RTG\",13\r\n\"E10000008\",\"Devon\",\"RXW\",6\r\n\"E10000008\",\"Devon\",\"RJ6\",7\r\n\"E10000008\",\"Devon\",\"RWV\",13\r\n\"E10000008\",\"Devon\",\"RDE\",12\r\n\"E10000008\",\"Devon\",\"RH5\",10\r\n\"E10000008\",\"Devon\",\"RN5\",19\r\n\"E10000008\",\"Devon\",\"RVV\",10\r\n\"E10000008\",\"Devon\",\"RXC\",7\r\n\"E10000008\",\"Devon\",\"RNS\",10\r\n\"E10000008\",\"Devon\",\"RTK\",6\r\n\"E10000008\",\"Devon\",\"RNQ\",6\r\n\"E10000008\",\"Devon\",\"RPY\",5\r\n\"E10000008\",\"Devon\",\"RBT\",6\r\n\"E10000008\",\"Devon\",\"RCB\",9\r\n\"E10000008\",\"Devon\",\"REM\",13\r\n\"E10000008\",\"Devon\",\"RGP\",4\r\n\"E10000008\",\"Devon\",\"RHQ\",10\r\n\"E10000008\",\"Devon\",\"RJ1\",24\r\n\"E10000008\",\"Devon\",\"RM3\",4\r\n\"E10000008\",\"Devon\",\"RCD\",3\r\n\"E10000008\",\"Devon\",\"RD8\",9\r\n\"E10000008\",\"Devon\",\"RKB\",10\r\n\"E10000008\",\"Devon\",\"RPC\",3\r\n\"E10000008\",\"Devon\",\"RR8\",7\r\n\"E10000008\",\"Devon\",\"RWD\",4\r\n\"E10000008\",\"Devon\",\"RJ8\",4\r\n\"E10000008\",\"Devon\",\"RJL\",6\r\n\"E10000008\",\"Devon\",\"RQX\",2\r\n\"E10000008\",\"Devon\",\"RN7\",3\r\n\"E10000008\",\"Devon\",\"RWY\",2\r\n\"E10000008\",\"Devon\",\"RXQ\",9\r\n\"E10000008\",\"Devon\",\"RFF\",2\r\n\"E10000008\",\"Devon\",\"RXP\",2\r\n\"E10000008\",\"Devon\",\"RKE\",2\r\n\"E10000008\",\"Devon\",\"RW6\",3\r\n\"E10000008\",\"Devon\",\"RXH\",12\r\n\"E10000008\",\"Devon\",\"RFS\",2\r\n\"E10000008\",\"Devon\",\"RM1\",7\r\n\"E10000008\",\"Devon\",\"RPA\",3\r\n\"E10000008\",\"Devon\",\"RQM\",17\r\n\"E10000008\",\"Devon\",\"RVR\",12\r\n\"E10000008\",\"Devon\",\"RWE\",2\r\n\"E10000008\",\"Devon\",\"RBL\",3\r\n\"E10000008\",\"Devon\",\"RC9\",6\r\n\"E10000008\",\"Devon\",\"RGM\",4\r\n\"E10000008\",\"Devon\",\"RQ3\",3\r\n\"E10000008\",\"Devon\",\"RVY\",2\r\n\"E10000008\",\"Devon\",\"RQ8\",5\r\n\"E10000008\",\"Devon\",\"RBN\",8\r\n\"E10000008\",\"Devon\",\"RVW\",2\r\n\"E10000008\",\"Devon\",\"RAJ\",4\r\n\"E10000008\",\"Devon\",\"RBK\",2\r\n\"E10000008\",\"Devon\",\"RJ2\",8\r\n\"E10000008\",\"Devon\",\"RDD\",6\r\n\"E10000008\",\"Devon\",\"RRE\",1\r\n\"E10000008\",\"Devon\",\"RTD\",3\r\n\"E10000008\",\"Devon\",\"RCX\",3\r\n\"E10000008\",\"Devon\",\"R0B\",6\r\n\"E10000008\",\"Devon\",\"RC1\",3\r\n\"E10000008\",\"Devon\",\"RNL\",4\r\n\"E10000008\",\"Devon\",\"RVN\",2\r\n\"E10000008\",\"Devon\",\"RBS\",2\r\n\"E10000008\",\"Devon\",\"RRF\",4\r\n\"E10000008\",\"Devon\",\"RWW\",2\r\n\"E10000008\",\"Devon\",\"REN\",1\r\n\"E10000008\",\"Devon\",\"RNA\",5\r\n\"E10000008\",\"Devon\",\"RK5\",3\r\n\"E10000008\",\"Devon\",\"RP6\",6\r\n\"E10000008\",\"Devon\",\"RLT\",1\r\n\"E10000008\",\"Devon\",\"RWA\",5\r\n\"E10000008\",\"Devon\",\"R1F\",11\r\n\"E10000008\",\"Devon\",\"RR7\",2\r\n\"E10000008\",\"Devon\",\"RXL\",3\r\n\"E10000008\",\"Devon\",\"RBV\",1\r\n\"E10000008\",\"Devon\",\"RJN\",1\r\n\"E10000008\",\"Devon\",\"RF4\",3\r\n\"E10000008\",\"Devon\",\"R1A\",1\r\n\"E10000008\",\"Devon\",\"RA2\",6\r\n\"E10000008\",\"Devon\",\"RXN\",1\r\n\"E10000008\",\"Devon\",\"RXR\",1\r\n\"E10000008\",\"Devon\",\"NR5\",96\r\n\"E10000008\",\"Devon\",\"RDR\",1\r\n\"E10000008\",\"Devon\",\"RLY\",1\r\n\"E10000008\",\"Devon\",\"RMC\",1\r\n\"E10000008\",\"Devon\",\"RL4\",1\r\n\"E10000008\",\"Devon\",\"RFR\",1\r\n\"E10000008\",\"Devon\",\"RXF\",1\r\n\"E10000008\",\"Devon\",\"RWG\",1\r\n\"E10000009\",\"Dorset\",\"RDZ\",11734\r\n\"E10000009\",\"Dorset\",\"RD3\",11842\r\n\"E10000009\",\"Dorset\",\"RHM\",592\r\n\"E10000009\",\"Dorset\",\"RDY\",894\r\n\"E10000009\",\"Dorset\",\"RNZ\",2912\r\n\"E10000009\",\"Dorset\",\"RBD\",19345\r\n\"E10000009\",\"Dorset\",\"RW1\",25\r\n\"E10000009\",\"Dorset\",\"RN3\",17\r\n\"E10000009\",\"Dorset\",\"RVJ\",98\r\n\"E10000009\",\"Dorset\",\"RBA\",194\r\n\"E10000009\",\"Dorset\",\"RH8\",115\r\n\"E10000009\",\"Dorset\",\"REF\",26\r\n\"E10000009\",\"Dorset\",\"RQM\",20\r\n\"E10000009\",\"Dorset\",\"RA9\",19\r\n\"E10000009\",\"Dorset\",\"RJ7\",20\r\n\"E10000009\",\"Dorset\",\"RAS\",9\r\n\"E10000009\",\"Dorset\",\"RAL\",17\r\n\"E10000009\",\"Dorset\",\"RHW\",19\r\n\"E10000009\",\"Dorset\",\"RMP\",2\r\n\"E10000009\",\"Dorset\",\"RYJ\",14\r\n\"E10000009\",\"Dorset\",\"R1H\",19\r\n\"E10000009\",\"Dorset\",\"RHU\",37\r\n\"E10000009\",\"Dorset\",\"RTE\",27\r\n\"E10000009\",\"Dorset\",\"RWF\",12\r\n\"E10000009\",\"Dorset\",\"RJ1\",25\r\n\"E10000009\",\"Dorset\",\"RWH\",5\r\n\"E10000009\",\"Dorset\",\"RD8\",7\r\n\"E10000009\",\"Dorset\",\"RTP\",9\r\n\"E10000009\",\"Dorset\",\"RJ2\",6\r\n\"E10000009\",\"Dorset\",\"RLQ\",5\r\n\"E10000009\",\"Dorset\",\"RN5\",31\r\n\"E10000009\",\"Dorset\",\"RX1\",6\r\n\"E10000009\",\"Dorset\",\"RDU\",24\r\n\"E10000009\",\"Dorset\",\"RJC\",4\r\n\"E10000009\",\"Dorset\",\"RRK\",11\r\n\"E10000009\",\"Dorset\",\"RVR\",9\r\n\"E10000009\",\"Dorset\",\"RCD\",3\r\n\"E10000009\",\"Dorset\",\"RKE\",1\r\n\"E10000009\",\"Dorset\",\"RM1\",5\r\n\"E10000009\",\"Dorset\",\"RTH\",29\r\n\"E10000009\",\"Dorset\",\"RWP\",4\r\n\"E10000009\",\"Dorset\",\"RGT\",10\r\n\"E10000009\",\"Dorset\",\"RTD\",1\r\n\"E10000009\",\"Dorset\",\"RXL\",2\r\n\"E10000009\",\"Dorset\",\"R1F\",7\r\n\"E10000009\",\"Dorset\",\"RBZ\",13\r\n\"E10000009\",\"Dorset\",\"R0B\",3\r\n\"E10000009\",\"Dorset\",\"RPA\",3\r\n\"E10000009\",\"Dorset\",\"R0A\",6\r\n\"E10000009\",\"Dorset\",\"RJZ\",12\r\n\"E10000009\",\"Dorset\",\"RWG\",7\r\n\"E10000009\",\"Dorset\",\"RXC\",10\r\n\"E10000009\",\"Dorset\",\"RYR\",19\r\n\"E10000009\",\"Dorset\",\"RDE\",7\r\n\"E10000009\",\"Dorset\",\"RFS\",2\r\n\"E10000009\",\"Dorset\",\"RTF\",2\r\n\"E10000009\",\"Dorset\",\"RXW\",8\r\n\"E10000009\",\"Dorset\",\"RA7\",42\r\n\"E10000009\",\"Dorset\",\"RM3\",1\r\n\"E10000009\",\"Dorset\",\"RNS\",3\r\n\"E10000009\",\"Dorset\",\"RT3\",10\r\n\"E10000009\",\"Dorset\",\"RW6\",7\r\n\"E10000009\",\"Dorset\",\"R1K\",11\r\n\"E10000009\",\"Dorset\",\"RD1\",33\r\n\"E10000009\",\"Dorset\",\"RK9\",17\r\n\"E10000009\",\"Dorset\",\"RA4\",3249\r\n\"E10000009\",\"Dorset\",\"RAX\",11\r\n\"E10000009\",\"Dorset\",\"RRV\",9\r\n\"E10000009\",\"Dorset\",\"RA2\",13\r\n\"E10000009\",\"Dorset\",\"RJ6\",3\r\n\"E10000009\",\"Dorset\",\"RVY\",2\r\n\"E10000009\",\"Dorset\",\"RNQ\",3\r\n\"E10000009\",\"Dorset\",\"RWK\",3\r\n\"E10000009\",\"Dorset\",\"RA3\",3\r\n\"E10000009\",\"Dorset\",\"RC9\",2\r\n\"E10000009\",\"Dorset\",\"RPY\",9\r\n\"E10000009\",\"Dorset\",\"RQ8\",2\r\n\"E10000009\",\"Dorset\",\"RT5\",1\r\n\"E10000009\",\"Dorset\",\"RTR\",5\r\n\"E10000009\",\"Dorset\",\"RN7\",2\r\n\"E10000009\",\"Dorset\",\"REM\",6\r\n\"E10000009\",\"Dorset\",\"RWE\",2\r\n\"E10000009\",\"Dorset\",\"RXH\",9\r\n\"E10000009\",\"Dorset\",\"RGN\",2\r\n\"E10000009\",\"Dorset\",\"RP4\",1\r\n\"E10000009\",\"Dorset\",\"RWY\",1\r\n\"E10000009\",\"Dorset\",\"RXQ\",8\r\n\"E10000009\",\"Dorset\",\"RAN\",4\r\n\"E10000009\",\"Dorset\",\"RBN\",5\r\n\"E10000009\",\"Dorset\",\"RBT\",2\r\n\"E10000009\",\"Dorset\",\"RK5\",1\r\n\"E10000009\",\"Dorset\",\"RRF\",1\r\n\"E10000009\",\"Dorset\",\"RKB\",9\r\n\"E10000009\",\"Dorset\",\"RMC\",1\r\n\"E10000009\",\"Dorset\",\"RV3\",1\r\n\"E10000009\",\"Dorset\",\"RWJ\",2\r\n\"E10000009\",\"Dorset\",\"RAJ\",2\r\n\"E10000009\",\"Dorset\",\"RP6\",6\r\n\"E10000009\",\"Dorset\",\"RR8\",3\r\n\"E10000009\",\"Dorset\",\"RVN\",3\r\n\"E10000009\",\"Dorset\",\"RVV\",5\r\n\"E10000009\",\"Dorset\",\"RCB\",3\r\n\"E10000009\",\"Dorset\",\"RH5\",8\r\n\"E10000009\",\"Dorset\",\"RWD\",2\r\n\"E10000009\",\"Dorset\",\"RNL\",3\r\n\"E10000009\",\"Dorset\",\"RJL\",3\r\n\"E10000009\",\"Dorset\",\"RWA\",1\r\n\"E10000009\",\"Dorset\",\"RQX\",3\r\n\"E10000009\",\"Dorset\",\"RAE\",2\r\n\"E10000009\",\"Dorset\",\"RFR\",2\r\n\"E10000009\",\"Dorset\",\"RXP\",3\r\n\"E10000009\",\"Dorset\",\"RHQ\",3\r\n\"E10000009\",\"Dorset\",\"RTK\",2\r\n\"E10000009\",\"Dorset\",\"RGP\",3\r\n\"E10000009\",\"Dorset\",\"RX2\",1\r\n\"E10000009\",\"Dorset\",\"RQW\",1\r\n\"E10000009\",\"Dorset\",\"RC1\",2\r\n\"E10000009\",\"Dorset\",\"RF4\",3\r\n\"E10000009\",\"Dorset\",\"RCF\",1\r\n\"E10000009\",\"Dorset\",\"RJR\",1\r\n\"E10000009\",\"Dorset\",\"RJN\",1\r\n\"E10000009\",\"Dorset\",\"RQ3\",1\r\n\"E10000009\",\"Dorset\",\"RTX\",3\r\n\"E10000009\",\"Dorset\",\"RJE\",2\r\n\"E10000009\",\"Dorset\",\"RLT\",1\r\n\"E10000009\",\"Dorset\",\"RWW\",1\r\n\"E10000009\",\"Dorset\",\"RCX\",1\r\n\"E10000009\",\"Dorset\",\"RAP\",1\r\n\"E10000009\",\"Dorset\",\"RTQ\",1\r\n\"E10000009\",\"Dorset\",\"RXR\",1\r\n\"E10000009\",\"Dorset\",\"RNA\",2\r\n\"E10000009\",\"Dorset\",\"RGM\",2\r\n\"E10000009\",\"Dorset\",\"RBQ\",1\r\n\"E10000009\",\"Dorset\",\"RTG\",2\r\n\"E10000009\",\"Dorset\",\"RXY\",1\r\n\"E10000009\",\"Dorset\",\"RGR\",1\r\n\"E10000009\",\"Dorset\",\"RAT\",1\r\n\"E10000011\",\"East Sussex\",\"RXC\",47185\r\n\"E10000011\",\"East Sussex\",\"RXH\",10662\r\n\"E10000011\",\"East Sussex\",\"RX2\",517\r\n\"E10000011\",\"East Sussex\",\"RPC\",683\r\n\"E10000011\",\"East Sussex\",\"RYR\",118\r\n\"E10000011\",\"East Sussex\",\"RWF\",5140\r\n\"E10000011\",\"East Sussex\",\"RTP\",244\r\n\"E10000011\",\"East Sussex\",\"RJZ\",117\r\n\"E10000011\",\"East Sussex\",\"RJ1\",170\r\n\"E10000011\",\"East Sussex\",\"RA2\",54\r\n\"E10000011\",\"East Sussex\",\"RJ7\",80\r\n\"E10000011\",\"East Sussex\",\"R1H\",38\r\n\"E10000011\",\"East Sussex\",\"RHU\",23\r\n\"E10000011\",\"East Sussex\",\"RRV\",44\r\n\"E10000011\",\"East Sussex\",\"RDZ\",14\r\n\"E10000011\",\"East Sussex\",\"RQM\",32\r\n\"E10000011\",\"East Sussex\",\"RVR\",27\r\n\"E10000011\",\"East Sussex\",\"RT3\",26\r\n\"E10000011\",\"East Sussex\",\"RTK\",11\r\n\"E10000011\",\"East Sussex\",\"RD8\",8\r\n\"E10000011\",\"East Sussex\",\"RH8\",12\r\n\"E10000011\",\"East Sussex\",\"RAL\",12\r\n\"E10000011\",\"East Sussex\",\"REF\",21\r\n\"E10000011\",\"East Sussex\",\"RTH\",23\r\n\"E10000011\",\"East Sussex\",\"RWH\",6\r\n\"E10000011\",\"East Sussex\",\"RBA\",14\r\n\"E10000011\",\"East Sussex\",\"RGR\",10\r\n\"E10000011\",\"East Sussex\",\"RHM\",19\r\n\"E10000011\",\"East Sussex\",\"RP6\",11\r\n\"E10000011\",\"East Sussex\",\"RYJ\",29\r\n\"E10000011\",\"East Sussex\",\"RGN\",6\r\n\"E10000011\",\"East Sussex\",\"RRK\",10\r\n\"E10000011\",\"East Sussex\",\"RJ2\",19\r\n\"E10000011\",\"East Sussex\",\"RA7\",5\r\n\"E10000011\",\"East Sussex\",\"RJ6\",14\r\n\"E10000011\",\"East Sussex\",\"R1K\",15\r\n\"E10000011\",\"East Sussex\",\"RDE\",10\r\n\"E10000011\",\"East Sussex\",\"RN5\",8\r\n\"E10000011\",\"East Sussex\",\"RTG\",7\r\n\"E10000011\",\"East Sussex\",\"RVV\",86\r\n\"E10000011\",\"East Sussex\",\"R1F\",11\r\n\"E10000011\",\"East Sussex\",\"RD3\",9\r\n\"E10000011\",\"East Sussex\",\"RDD\",7\r\n\"E10000011\",\"East Sussex\",\"RN7\",13\r\n\"E10000011\",\"East Sussex\",\"RAX\",15\r\n\"E10000011\",\"East Sussex\",\"RNL\",4\r\n\"E10000011\",\"East Sussex\",\"RQX\",9\r\n\"E10000011\",\"East Sussex\",\"RD1\",6\r\n\"E10000011\",\"East Sussex\",\"RPY\",28\r\n\"E10000011\",\"East Sussex\",\"RDU\",24\r\n\"E10000011\",\"East Sussex\",\"RWG\",9\r\n\"E10000011\",\"East Sussex\",\"RA3\",1\r\n\"E10000011\",\"East Sussex\",\"RBT\",2\r\n\"E10000011\",\"East Sussex\",\"RK5\",4\r\n\"E10000011\",\"East Sussex\",\"RLQ\",4\r\n\"E10000011\",\"East Sussex\",\"RM1\",5\r\n\"E10000011\",\"East Sussex\",\"RN3\",6\r\n\"E10000011\",\"East Sussex\",\"RTX\",3\r\n\"E10000011\",\"East Sussex\",\"RC9\",9\r\n\"E10000011\",\"East Sussex\",\"RF4\",3\r\n\"E10000011\",\"East Sussex\",\"RGM\",1\r\n\"E10000011\",\"East Sussex\",\"RNZ\",5\r\n\"E10000011\",\"East Sussex\",\"RR8\",3\r\n\"E10000011\",\"East Sussex\",\"RXN\",5\r\n\"E10000011\",\"East Sussex\",\"RAE\",1\r\n\"E10000011\",\"East Sussex\",\"RCF\",2\r\n\"E10000011\",\"East Sussex\",\"RHQ\",3\r\n\"E10000011\",\"East Sussex\",\"RVY\",2\r\n\"E10000011\",\"East Sussex\",\"RW6\",3\r\n\"E10000011\",\"East Sussex\",\"RA4\",3\r\n\"E10000011\",\"East Sussex\",\"RA9\",12\r\n\"E10000011\",\"East Sussex\",\"RHW\",8\r\n\"E10000011\",\"East Sussex\",\"RMC\",1\r\n\"E10000011\",\"East Sussex\",\"RAS\",8\r\n\"E10000011\",\"East Sussex\",\"RBL\",3\r\n\"E10000011\",\"East Sussex\",\"RJC\",5\r\n\"E10000011\",\"East Sussex\",\"RQW\",6\r\n\"E10000011\",\"East Sussex\",\"RVN\",1\r\n\"E10000011\",\"East Sussex\",\"RXW\",6\r\n\"E10000011\",\"East Sussex\",\"NXM\",2\r\n\"E10000011\",\"East Sussex\",\"RBD\",12\r\n\"E10000011\",\"East Sussex\",\"RBN\",1\r\n\"E10000011\",\"East Sussex\",\"RKB\",4\r\n\"E10000011\",\"East Sussex\",\"RWD\",3\r\n\"E10000011\",\"East Sussex\",\"RTE\",10\r\n\"E10000011\",\"East Sussex\",\"RAN\",2\r\n\"E10000011\",\"East Sussex\",\"RC1\",2\r\n\"E10000011\",\"East Sussex\",\"RCD\",4\r\n\"E10000011\",\"East Sussex\",\"RPA\",18\r\n\"E10000011\",\"East Sussex\",\"RVJ\",2\r\n\"E10000011\",\"East Sussex\",\"RXR\",4\r\n\"E10000011\",\"East Sussex\",\"RKE\",8\r\n\"E10000011\",\"East Sussex\",\"R0A\",7\r\n\"E10000011\",\"East Sussex\",\"RBZ\",5\r\n\"E10000011\",\"East Sussex\",\"RJL\",2\r\n\"E10000011\",\"East Sussex\",\"REM\",1\r\n\"E10000011\",\"East Sussex\",\"RX1\",4\r\n\"E10000011\",\"East Sussex\",\"RCB\",5\r\n\"E10000011\",\"East Sussex\",\"RXL\",5\r\n\"E10000011\",\"East Sussex\",\"RBQ\",1\r\n\"E10000011\",\"East Sussex\",\"RWJ\",2\r\n\"E10000011\",\"East Sussex\",\"RCX\",8\r\n\"E10000011\",\"East Sussex\",\"RK9\",9\r\n\"E10000011\",\"East Sussex\",\"RXQ\",9\r\n\"E10000011\",\"East Sussex\",\"RP4\",2\r\n\"E10000011\",\"East Sussex\",\"RXX\",1\r\n\"E10000011\",\"East Sussex\",\"RBK\",1\r\n\"E10000011\",\"East Sussex\",\"RWK\",1\r\n\"E10000011\",\"East Sussex\",\"RDR\",117\r\n\"E10000011\",\"East Sussex\",\"RQ8\",7\r\n\"E10000011\",\"East Sussex\",\"RXF\",3\r\n\"E10000011\",\"East Sussex\",\"RWP\",4\r\n\"E10000011\",\"East Sussex\",\"R1A\",1\r\n\"E10000011\",\"East Sussex\",\"RJE\",3\r\n\"E10000011\",\"East Sussex\",\"RJN\",2\r\n\"E10000011\",\"East Sussex\",\"RNA\",2\r\n\"E10000011\",\"East Sussex\",\"R0B\",2\r\n\"E10000011\",\"East Sussex\",\"RRE\",1\r\n\"E10000011\",\"East Sussex\",\"RTD\",5\r\n\"E10000011\",\"East Sussex\",\"RX3\",1\r\n\"E10000011\",\"East Sussex\",\"RXP\",3\r\n\"E10000011\",\"East Sussex\",\"RFS\",2\r\n\"E10000011\",\"East Sussex\",\"RGP\",3\r\n\"E10000011\",\"East Sussex\",\"RJR\",1\r\n\"E10000011\",\"East Sussex\",\"RAP\",1\r\n\"E10000011\",\"East Sussex\",\"RL4\",1\r\n\"E10000011\",\"East Sussex\",\"RNQ\",5\r\n\"E10000011\",\"East Sussex\",\"RGT\",5\r\n\"E10000011\",\"East Sussex\",\"RWW\",4\r\n\"E10000011\",\"East Sussex\",\"RXK\",2\r\n\"E10000011\",\"East Sussex\",\"RDY\",2\r\n\"E10000011\",\"East Sussex\",\"RWA\",1\r\n\"E10000011\",\"East Sussex\",\"RH5\",1\r\n\"E10000011\",\"East Sussex\",\"RM3\",1\r\n\"E10000011\",\"East Sussex\",\"RNS\",5\r\n\"E10000011\",\"East Sussex\",\"RV3\",1\r\n\"E10000011\",\"East Sussex\",\"RMY\",1\r\n\"E10000011\",\"East Sussex\",\"RAJ\",2\r\n\"E10000011\",\"East Sussex\",\"RP5\",1\r\n\"E10000011\",\"East Sussex\",\"RQ3\",1\r\n\"E10000011\",\"East Sussex\",\"RW1\",1\r\n\"E10000011\",\"East Sussex\",\"RWY\",1\r\n\"E10000011\",\"East Sussex\",\"RVW\",1\r\n\"E10000012\",\"Essex\",\"RDD\",31830\r\n\"E10000012\",\"Essex\",\"RQ8\",35966\r\n\"E10000012\",\"Essex\",\"R1L\",2571\r\n\"E10000012\",\"Essex\",\"RAJ\",18455\r\n\"E10000012\",\"Essex\",\"R1H\",5564\r\n\"E10000012\",\"Essex\",\"RF4\",3960\r\n\"E10000012\",\"Essex\",\"RDE\",39565\r\n\"E10000012\",\"Essex\",\"RJ1\",217\r\n\"E10000012\",\"Essex\",\"RRV\",361\r\n\"E10000012\",\"Essex\",\"RAL\",266\r\n\"E10000012\",\"Essex\",\"RYJ\",124\r\n\"E10000012\",\"Essex\",\"RGT\",4152\r\n\"E10000012\",\"Essex\",\"RJZ\",65\r\n\"E10000012\",\"Essex\",\"RQM\",55\r\n\"E10000012\",\"Essex\",\"RXC\",37\r\n\"E10000012\",\"Essex\",\"RGR\",382\r\n\"E10000012\",\"Essex\",\"RQW\",20906\r\n\"E10000012\",\"Essex\",\"R1K\",78\r\n\"E10000012\",\"Essex\",\"RN7\",46\r\n\"E10000012\",\"Essex\",\"RGP\",75\r\n\"E10000012\",\"Essex\",\"RQX\",102\r\n\"E10000012\",\"Essex\",\"RP6\",206\r\n\"E10000012\",\"Essex\",\"RM1\",107\r\n\"E10000012\",\"Essex\",\"RYR\",36\r\n\"E10000012\",\"Essex\",\"RP4\",48\r\n\"E10000012\",\"Essex\",\"RAP\",209\r\n\"E10000012\",\"Essex\",\"RDU\",35\r\n\"E10000012\",\"Essex\",\"RAN\",28\r\n\"E10000012\",\"Essex\",\"RTH\",40\r\n\"E10000012\",\"Essex\",\"RA9\",21\r\n\"E10000012\",\"Essex\",\"RT3\",59\r\n\"E10000012\",\"Essex\",\"RDZ\",22\r\n\"E10000012\",\"Essex\",\"RPY\",34\r\n\"E10000012\",\"Essex\",\"RXQ\",22\r\n\"E10000012\",\"Essex\",\"RC9\",29\r\n\"E10000012\",\"Essex\",\"RJ2\",46\r\n\"E10000012\",\"Essex\",\"RVV\",45\r\n\"E10000012\",\"Essex\",\"RJ7\",51\r\n\"E10000012\",\"Essex\",\"RNQ\",13\r\n\"E10000012\",\"Essex\",\"RAX\",16\r\n\"E10000012\",\"Essex\",\"RHU\",13\r\n\"E10000012\",\"Essex\",\"RJE\",15\r\n\"E10000012\",\"Essex\",\"RRK\",36\r\n\"E10000012\",\"Essex\",\"REF\",42\r\n\"E10000012\",\"Essex\",\"RK9\",18\r\n\"E10000012\",\"Essex\",\"RTP\",23\r\n\"E10000012\",\"Essex\",\"RGN\",32\r\n\"E10000012\",\"Essex\",\"RHM\",24\r\n\"E10000012\",\"Essex\",\"RWK\",11\r\n\"E10000012\",\"Essex\",\"RAT\",20\r\n\"E10000012\",\"Essex\",\"RCX\",42\r\n\"E10000012\",\"Essex\",\"RTK\",12\r\n\"E10000012\",\"Essex\",\"RWD\",23\r\n\"E10000012\",\"Essex\",\"RAS\",21\r\n\"E10000012\",\"Essex\",\"RTF\",10\r\n\"E10000012\",\"Essex\",\"RGM\",77\r\n\"E10000012\",\"Essex\",\"RPA\",22\r\n\"E10000012\",\"Essex\",\"RWF\",38\r\n\"E10000012\",\"Essex\",\"RX1\",21\r\n\"E10000012\",\"Essex\",\"RXH\",27\r\n\"E10000012\",\"Essex\",\"RJ6\",10\r\n\"E10000012\",\"Essex\",\"RKE\",25\r\n\"E10000012\",\"Essex\",\"RTD\",7\r\n\"E10000012\",\"Essex\",\"RXW\",9\r\n\"E10000012\",\"Essex\",\"RBZ\",19\r\n\"E10000012\",\"Essex\",\"RN5\",18\r\n\"E10000012\",\"Essex\",\"RWH\",233\r\n\"E10000012\",\"Essex\",\"RCB\",27\r\n\"E10000012\",\"Essex\",\"RNS\",16\r\n\"E10000012\",\"Essex\",\"RN3\",18\r\n\"E10000012\",\"Essex\",\"RA2\",16\r\n\"E10000012\",\"Essex\",\"RBS\",2\r\n\"E10000012\",\"Essex\",\"RTE\",16\r\n\"E10000012\",\"Essex\",\"RXP\",8\r\n\"E10000012\",\"Essex\",\"RBA\",17\r\n\"E10000012\",\"Essex\",\"REM\",14\r\n\"E10000012\",\"Essex\",\"RFS\",12\r\n\"E10000012\",\"Essex\",\"RT5\",1\r\n\"E10000012\",\"Essex\",\"RXL\",9\r\n\"E10000012\",\"Essex\",\"RA4\",10\r\n\"E10000012\",\"Essex\",\"RHW\",18\r\n\"E10000012\",\"Essex\",\"RP5\",6\r\n\"E10000012\",\"Essex\",\"RWE\",15\r\n\"E10000012\",\"Essex\",\"RWG\",35\r\n\"E10000012\",\"Essex\",\"RBD\",13\r\n\"E10000012\",\"Essex\",\"RD1\",20\r\n\"E10000012\",\"Essex\",\"RPC\",3\r\n\"E10000012\",\"Essex\",\"RXF\",3\r\n\"E10000012\",\"Essex\",\"R1F\",9\r\n\"E10000012\",\"Essex\",\"RJC\",10\r\n\"E10000012\",\"Essex\",\"RK5\",7\r\n\"E10000012\",\"Essex\",\"RWJ\",5\r\n\"E10000012\",\"Essex\",\"RX2\",2\r\n\"E10000012\",\"Essex\",\"RXK\",9\r\n\"E10000012\",\"Essex\",\"RD8\",21\r\n\"E10000012\",\"Essex\",\"RKB\",15\r\n\"E10000012\",\"Essex\",\"RVR\",16\r\n\"E10000012\",\"Essex\",\"RYV\",1\r\n\"E10000012\",\"Essex\",\"RH8\",28\r\n\"E10000012\",\"Essex\",\"RXY\",2\r\n\"E10000012\",\"Essex\",\"RWY\",5\r\n\"E10000012\",\"Essex\",\"RMY\",9\r\n\"E10000012\",\"Essex\",\"RD3\",22\r\n\"E10000012\",\"Essex\",\"RW6\",4\r\n\"E10000012\",\"Essex\",\"RNL\",15\r\n\"E10000012\",\"Essex\",\"RR8\",9\r\n\"E10000012\",\"Essex\",\"RVJ\",11\r\n\"E10000012\",\"Essex\",\"RLQ\",12\r\n\"E10000012\",\"Essex\",\"RM3\",6\r\n\"E10000012\",\"Essex\",\"RTG\",21\r\n\"E10000012\",\"Essex\",\"RTX\",12\r\n\"E10000012\",\"Essex\",\"RMP\",1\r\n\"E10000012\",\"Essex\",\"R0A\",18\r\n\"E10000012\",\"Essex\",\"RJR\",2\r\n\"E10000012\",\"Essex\",\"RLT\",1\r\n\"E10000012\",\"Essex\",\"RXN\",4\r\n\"E10000012\",\"Essex\",\"RL4\",3\r\n\"E10000012\",\"Essex\",\"RWP\",5\r\n\"E10000012\",\"Essex\",\"RNA\",3\r\n\"E10000012\",\"Essex\",\"RA7\",19\r\n\"E10000012\",\"Essex\",\"RTR\",8\r\n\"E10000012\",\"Essex\",\"RCD\",4\r\n\"E10000012\",\"Essex\",\"RWA\",6\r\n\"E10000012\",\"Essex\",\"RBV\",1\r\n\"E10000012\",\"Essex\",\"RRE\",1\r\n\"E10000012\",\"Essex\",\"RC1\",14\r\n\"E10000012\",\"Essex\",\"RNZ\",11\r\n\"E10000012\",\"Essex\",\"RJL\",4\r\n\"E10000012\",\"Essex\",\"RW1\",1\r\n\"E10000012\",\"Essex\",\"RBT\",5\r\n\"E10000012\",\"Essex\",\"RCF\",3\r\n\"E10000012\",\"Essex\",\"REN\",1\r\n\"E10000012\",\"Essex\",\"RFF\",2\r\n\"E10000012\",\"Essex\",\"RHQ\",4\r\n\"E10000012\",\"Essex\",\"RDR\",1\r\n\"E10000012\",\"Essex\",\"RJN\",2\r\n\"E10000012\",\"Essex\",\"RVW\",5\r\n\"E10000012\",\"Essex\",\"NQ1\",55\r\n\"E10000012\",\"Essex\",\"RBN\",5\r\n\"E10000012\",\"Essex\",\"RJ8\",1\r\n\"E10000012\",\"Essex\",\"RRF\",1\r\n\"E10000012\",\"Essex\",\"RAE\",2\r\n\"E10000012\",\"Essex\",\"R0B\",2\r\n\"E10000012\",\"Essex\",\"RWW\",2\r\n\"E10000012\",\"Essex\",\"RMC\",2\r\n\"E10000012\",\"Essex\",\"RA3\",4\r\n\"E10000012\",\"Essex\",\"RCU\",1\r\n\"E10000012\",\"Essex\",\"REP\",1\r\n\"E10000012\",\"Essex\",\"RH5\",1\r\n\"E10000012\",\"Essex\",\"RBL\",4\r\n\"E10000012\",\"Essex\",\"RV3\",1\r\n\"E10000012\",\"Essex\",\"RWR\",3\r\n\"E10000012\",\"Essex\",\"RVY\",1\r\n\"E10000012\",\"Essex\",\"RBK\",1\r\n\"E10000012\",\"Essex\",\"RR7\",3\r\n\"E10000012\",\"Essex\",\"RXR\",1\r\n\"E10000012\",\"Essex\",\"RXG\",2\r\n\"E10000012\",\"Essex\",\"RFR\",1\r\n\"E10000012\",\"Essex\",\"TAD\",1\r\n\"E10000012\",\"Essex\",\"RP7\",1\r\n\"E10000013\",\"Gloucestershire\",\"RTE\",52002\r\n\"E10000013\",\"Gloucestershire\",\"RTQ\",643\r\n\"E10000013\",\"Gloucestershire\",\"RA7\",721\r\n\"E10000013\",\"Gloucestershire\",\"RVJ\",953\r\n\"E10000013\",\"Gloucestershire\",\"R1J\",475\r\n\"E10000013\",\"Gloucestershire\",\"RTH\",545\r\n\"E10000013\",\"Gloucestershire\",\"RN3\",2462\r\n\"E10000013\",\"Gloucestershire\",\"RWP\",156\r\n\"E10000013\",\"Gloucestershire\",\"RRK\",111\r\n\"E10000013\",\"Gloucestershire\",\"RA9\",32\r\n\"E10000013\",\"Gloucestershire\",\"REF\",45\r\n\"E10000013\",\"Gloucestershire\",\"RLQ\",148\r\n\"E10000013\",\"Gloucestershire\",\"RRV\",16\r\n\"E10000013\",\"Gloucestershire\",\"RD1\",88\r\n\"E10000013\",\"Gloucestershire\",\"RA3\",26\r\n\"E10000013\",\"Gloucestershire\",\"RDZ\",22\r\n\"E10000013\",\"Gloucestershire\",\"RK9\",24\r\n\"E10000013\",\"Gloucestershire\",\"RDU\",35\r\n\"E10000013\",\"Gloucestershire\",\"RBA\",37\r\n\"E10000013\",\"Gloucestershire\",\"RH8\",31\r\n\"E10000013\",\"Gloucestershire\",\"RJC\",268\r\n\"E10000013\",\"Gloucestershire\",\"RNU\",8\r\n\"E10000013\",\"Gloucestershire\",\"RYR\",11\r\n\"E10000013\",\"Gloucestershire\",\"R0A\",22\r\n\"E10000013\",\"Gloucestershire\",\"RWG\",7\r\n\"E10000013\",\"Gloucestershire\",\"RXC\",9\r\n\"E10000013\",\"Gloucestershire\",\"RKB\",31\r\n\"E10000013\",\"Gloucestershire\",\"RNL\",7\r\n\"E10000013\",\"Gloucestershire\",\"RWF\",9\r\n\"E10000013\",\"Gloucestershire\",\"R1F\",9\r\n\"E10000013\",\"Gloucestershire\",\"RD3\",15\r\n\"E10000013\",\"Gloucestershire\",\"REM\",10\r\n\"E10000013\",\"Gloucestershire\",\"RAX\",9\r\n\"E10000013\",\"Gloucestershire\",\"RXK\",24\r\n\"E10000013\",\"Gloucestershire\",\"RXQ\",20\r\n\"E10000013\",\"Gloucestershire\",\"RBD\",13\r\n\"E10000013\",\"Gloucestershire\",\"RKE\",4\r\n\"E10000013\",\"Gloucestershire\",\"RYJ\",14\r\n\"E10000013\",\"Gloucestershire\",\"RCB\",12\r\n\"E10000013\",\"Gloucestershire\",\"RT3\",9\r\n\"E10000013\",\"Gloucestershire\",\"RVW\",5\r\n\"E10000013\",\"Gloucestershire\",\"RQM\",19\r\n\"E10000013\",\"Gloucestershire\",\"RHM\",11\r\n\"E10000013\",\"Gloucestershire\",\"RN5\",12\r\n\"E10000013\",\"Gloucestershire\",\"RXH\",8\r\n\"E10000013\",\"Gloucestershire\",\"RA4\",7\r\n\"E10000013\",\"Gloucestershire\",\"RCX\",7\r\n\"E10000013\",\"Gloucestershire\",\"RHW\",12\r\n\"E10000013\",\"Gloucestershire\",\"RM1\",8\r\n\"E10000013\",\"Gloucestershire\",\"RDE\",8\r\n\"E10000013\",\"Gloucestershire\",\"RJE\",9\r\n\"E10000013\",\"Gloucestershire\",\"RWE\",15\r\n\"E10000013\",\"Gloucestershire\",\"RAS\",2\r\n\"E10000013\",\"Gloucestershire\",\"RBT\",7\r\n\"E10000013\",\"Gloucestershire\",\"RTX\",10\r\n\"E10000013\",\"Gloucestershire\",\"RGT\",6\r\n\"E10000013\",\"Gloucestershire\",\"RNZ\",12\r\n\"E10000013\",\"Gloucestershire\",\"RVV\",3\r\n\"E10000013\",\"Gloucestershire\",\"RX1\",5\r\n\"E10000013\",\"Gloucestershire\",\"RXN\",5\r\n\"E10000013\",\"Gloucestershire\",\"R1A\",7\r\n\"E10000013\",\"Gloucestershire\",\"RVR\",4\r\n\"E10000013\",\"Gloucestershire\",\"RXR\",5\r\n\"E10000013\",\"Gloucestershire\",\"RXW\",10\r\n\"E10000013\",\"Gloucestershire\",\"R1K\",11\r\n\"E10000013\",\"Gloucestershire\",\"RJ6\",3\r\n\"E10000013\",\"Gloucestershire\",\"RN7\",3\r\n\"E10000013\",\"Gloucestershire\",\"RH5\",3\r\n\"E10000013\",\"Gloucestershire\",\"RJ7\",11\r\n\"E10000013\",\"Gloucestershire\",\"RNQ\",3\r\n\"E10000013\",\"Gloucestershire\",\"RXP\",3\r\n\"E10000013\",\"Gloucestershire\",\"RC1\",3\r\n\"E10000013\",\"Gloucestershire\",\"RD8\",2\r\n\"E10000013\",\"Gloucestershire\",\"RHQ\",3\r\n\"E10000013\",\"Gloucestershire\",\"RM3\",4\r\n\"E10000013\",\"Gloucestershire\",\"RP6\",2\r\n\"E10000013\",\"Gloucestershire\",\"RTG\",6\r\n\"E10000013\",\"Gloucestershire\",\"RXY\",1\r\n\"E10000013\",\"Gloucestershire\",\"R1H\",20\r\n\"E10000013\",\"Gloucestershire\",\"RAL\",6\r\n\"E10000013\",\"Gloucestershire\",\"RJ2\",7\r\n\"E10000013\",\"Gloucestershire\",\"RA2\",8\r\n\"E10000013\",\"Gloucestershire\",\"RBZ\",28\r\n\"E10000013\",\"Gloucestershire\",\"RF4\",2\r\n\"E10000013\",\"Gloucestershire\",\"RJ1\",18\r\n\"E10000013\",\"Gloucestershire\",\"RTD\",4\r\n\"E10000013\",\"Gloucestershire\",\"RWH\",8\r\n\"E10000013\",\"Gloucestershire\",\"RP5\",3\r\n\"E10000013\",\"Gloucestershire\",\"RVN\",7\r\n\"E10000013\",\"Gloucestershire\",\"RX2\",1\r\n\"E10000013\",\"Gloucestershire\",\"RTK\",5\r\n\"E10000013\",\"Gloucestershire\",\"RPY\",7\r\n\"E10000013\",\"Gloucestershire\",\"RFR\",5\r\n\"E10000013\",\"Gloucestershire\",\"RTP\",10\r\n\"E10000013\",\"Gloucestershire\",\"RNS\",5\r\n\"E10000013\",\"Gloucestershire\",\"RYG\",2\r\n\"E10000013\",\"Gloucestershire\",\"RQX\",4\r\n\"E10000013\",\"Gloucestershire\",\"RRJ\",3\r\n\"E10000013\",\"Gloucestershire\",\"RGN\",3\r\n\"E10000013\",\"Gloucestershire\",\"RQ8\",6\r\n\"E10000013\",\"Gloucestershire\",\"RDD\",4\r\n\"E10000013\",\"Gloucestershire\",\"RWW\",1\r\n\"E10000013\",\"Gloucestershire\",\"RHU\",6\r\n\"E10000013\",\"Gloucestershire\",\"RW5\",1\r\n\"E10000013\",\"Gloucestershire\",\"RL4\",7\r\n\"E10000013\",\"Gloucestershire\",\"RPA\",3\r\n\"E10000013\",\"Gloucestershire\",\"RTF\",3\r\n\"E10000013\",\"Gloucestershire\",\"RQ3\",6\r\n\"E10000013\",\"Gloucestershire\",\"RNA\",3\r\n\"E10000013\",\"Gloucestershire\",\"RW6\",1\r\n\"E10000013\",\"Gloucestershire\",\"TAJ\",1\r\n\"E10000013\",\"Gloucestershire\",\"RBN\",1\r\n\"E10000013\",\"Gloucestershire\",\"RDY\",3\r\n\"E10000013\",\"Gloucestershire\",\"RXL\",2\r\n\"E10000013\",\"Gloucestershire\",\"RJN\",1\r\n\"E10000013\",\"Gloucestershire\",\"RR8\",1\r\n\"E10000013\",\"Gloucestershire\",\"RC9\",4\r\n\"E10000013\",\"Gloucestershire\",\"RCF\",1\r\n\"E10000013\",\"Gloucestershire\",\"RJZ\",6\r\n\"E10000013\",\"Gloucestershire\",\"RMC\",2\r\n\"E10000013\",\"Gloucestershire\",\"RMP\",1\r\n\"E10000013\",\"Gloucestershire\",\"RAE\",1\r\n\"E10000013\",\"Gloucestershire\",\"RGM\",1\r\n\"E10000013\",\"Gloucestershire\",\"RWA\",1\r\n\"E10000013\",\"Gloucestershire\",\"RWD\",2\r\n\"E10000013\",\"Gloucestershire\",\"RAP\",1\r\n\"E10000013\",\"Gloucestershire\",\"RJL\",2\r\n\"E10000013\",\"Gloucestershire\",\"RP7\",1\r\n\"E10000013\",\"Gloucestershire\",\"RWK\",3\r\n\"E10000013\",\"Gloucestershire\",\"RK5\",2\r\n\"E10000013\",\"Gloucestershire\",\"RBK\",2\r\n\"E10000013\",\"Gloucestershire\",\"RTR\",2\r\n\"E10000013\",\"Gloucestershire\",\"RAJ\",2\r\n\"E10000013\",\"Gloucestershire\",\"RGP\",3\r\n\"E10000013\",\"Gloucestershire\",\"RCD\",2\r\n\"E10000013\",\"Gloucestershire\",\"RWX\",1\r\n\"E10000013\",\"Gloucestershire\",\"RX3\",1\r\n\"E10000013\",\"Gloucestershire\",\"RCU\",1\r\n\"E10000013\",\"Gloucestershire\",\"RWY\",1\r\n\"E10000013\",\"Gloucestershire\",\"RT5\",1\r\n\"E10000013\",\"Gloucestershire\",\"RFF\",9\r\n\"E10000013\",\"Gloucestershire\",\"RWJ\",3\r\n\"E10000013\",\"Gloucestershire\",\"REN\",2\r\n\"E10000013\",\"Gloucestershire\",\"RVY\",1\r\n\"E10000013\",\"Gloucestershire\",\"R0B\",1\r\n\"E10000013\",\"Gloucestershire\",\"RQW\",1\r\n\"E10000013\",\"Gloucestershire\",\"RL1\",1\r\n\"E10000013\",\"Gloucestershire\",\"RW1\",1\r\n\"E10000013\",\"Gloucestershire\",\"RJR\",1\r\n\"E10000014\",\"Hampshire\",\"RN5\",40968\r\n\"E10000014\",\"Hampshire\",\"RDU\",17478\r\n\"E10000014\",\"Hampshire\",\"RHM\",28748\r\n\"E10000014\",\"Hampshire\",\"RHW\",295\r\n\"E10000014\",\"Hampshire\",\"RW1\",3043\r\n\"E10000014\",\"Hampshire\",\"RA2\",4097\r\n\"E10000014\",\"Hampshire\",\"RHU\",36104\r\n\"E10000014\",\"Hampshire\",\"RTH\",176\r\n\"E10000014\",\"Hampshire\",\"RNZ\",2694\r\n\"E10000014\",\"Hampshire\",\"RJ1\",152\r\n\"E10000014\",\"Hampshire\",\"RJ7\",232\r\n\"E10000014\",\"Hampshire\",\"RN3\",70\r\n\"E10000014\",\"Hampshire\",\"RDZ\",5009\r\n\"E10000014\",\"Hampshire\",\"RT3\",60\r\n\"E10000014\",\"Hampshire\",\"RJZ\",47\r\n\"E10000014\",\"Hampshire\",\"REF\",93\r\n\"E10000014\",\"Hampshire\",\"RYR\",695\r\n\"E10000014\",\"Hampshire\",\"RWG\",22\r\n\"E10000014\",\"Hampshire\",\"RBZ\",37\r\n\"E10000014\",\"Hampshire\",\"RD3\",747\r\n\"E10000014\",\"Hampshire\",\"R1K\",35\r\n\"E10000014\",\"Hampshire\",\"R1F\",68\r\n\"E10000014\",\"Hampshire\",\"RTK\",102\r\n\"E10000014\",\"Hampshire\",\"RYJ\",66\r\n\"E10000014\",\"Hampshire\",\"RRV\",48\r\n\"E10000014\",\"Hampshire\",\"RA7\",27\r\n\"E10000014\",\"Hampshire\",\"RVJ\",35\r\n\"E10000014\",\"Hampshire\",\"RWX\",10\r\n\"E10000014\",\"Hampshire\",\"RBD\",88\r\n\"E10000014\",\"Hampshire\",\"RA9\",46\r\n\"E10000014\",\"Hampshire\",\"RH8\",49\r\n\"E10000014\",\"Hampshire\",\"RA4\",28\r\n\"E10000014\",\"Hampshire\",\"RPY\",36\r\n\"E10000014\",\"Hampshire\",\"RQM\",99\r\n\"E10000014\",\"Hampshire\",\"RP6\",11\r\n\"E10000014\",\"Hampshire\",\"RTG\",20\r\n\"E10000014\",\"Hampshire\",\"RXQ\",28\r\n\"E10000014\",\"Hampshire\",\"R1H\",48\r\n\"E10000014\",\"Hampshire\",\"RK9\",47\r\n\"E10000014\",\"Hampshire\",\"RXH\",54\r\n\"E10000014\",\"Hampshire\",\"RWF\",21\r\n\"E10000014\",\"Hampshire\",\"RRK\",35\r\n\"E10000014\",\"Hampshire\",\"R0A\",13\r\n\"E10000014\",\"Hampshire\",\"RXW\",18\r\n\"E10000014\",\"Hampshire\",\"RAS\",20\r\n\"E10000014\",\"Hampshire\",\"RTP\",39\r\n\"E10000014\",\"Hampshire\",\"RAX\",43\r\n\"E10000014\",\"Hampshire\",\"RXC\",39\r\n\"E10000014\",\"Hampshire\",\"RTX\",13\r\n\"E10000014\",\"Hampshire\",\"RBA\",31\r\n\"E10000014\",\"Hampshire\",\"RTD\",9\r\n\"E10000014\",\"Hampshire\",\"RTE\",34\r\n\"E10000014\",\"Hampshire\",\"RC9\",8\r\n\"E10000014\",\"Hampshire\",\"RGT\",26\r\n\"E10000014\",\"Hampshire\",\"RJC\",11\r\n\"E10000014\",\"Hampshire\",\"RNU\",4\r\n\"E10000014\",\"Hampshire\",\"RVV\",19\r\n\"E10000014\",\"Hampshire\",\"RGN\",10\r\n\"E10000014\",\"Hampshire\",\"RWH\",21\r\n\"E10000014\",\"Hampshire\",\"RX1\",9\r\n\"E10000014\",\"Hampshire\",\"RJ2\",16\r\n\"E10000014\",\"Hampshire\",\"RAL\",30\r\n\"E10000014\",\"Hampshire\",\"RD1\",41\r\n\"E10000014\",\"Hampshire\",\"RDY\",10\r\n\"E10000014\",\"Hampshire\",\"RL4\",4\r\n\"E10000014\",\"Hampshire\",\"RN7\",8\r\n\"E10000014\",\"Hampshire\",\"RR8\",10\r\n\"E10000014\",\"Hampshire\",\"RV5\",2\r\n\"E10000014\",\"Hampshire\",\"RW4\",1\r\n\"E10000014\",\"Hampshire\",\"RWD\",12\r\n\"E10000014\",\"Hampshire\",\"RWE\",12\r\n\"E10000014\",\"Hampshire\",\"RWJ\",9\r\n\"E10000014\",\"Hampshire\",\"RXF\",4\r\n\"E10000014\",\"Hampshire\",\"RXP\",7\r\n\"E10000014\",\"Hampshire\",\"RM1\",14\r\n\"E10000014\",\"Hampshire\",\"RMC\",3\r\n\"E10000014\",\"Hampshire\",\"RQW\",7\r\n\"E10000014\",\"Hampshire\",\"RWA\",10\r\n\"E10000014\",\"Hampshire\",\"RAJ\",4\r\n\"E10000014\",\"Hampshire\",\"RC1\",13\r\n\"E10000014\",\"Hampshire\",\"RDD\",11\r\n\"E10000014\",\"Hampshire\",\"RFS\",7\r\n\"E10000014\",\"Hampshire\",\"RJ6\",12\r\n\"E10000014\",\"Hampshire\",\"RNQ\",11\r\n\"E10000014\",\"Hampshire\",\"REM\",10\r\n\"E10000014\",\"Hampshire\",\"RBK\",2\r\n\"E10000014\",\"Hampshire\",\"RBL\",7\r\n\"E10000014\",\"Hampshire\",\"RJE\",13\r\n\"E10000014\",\"Hampshire\",\"RVW\",8\r\n\"E10000014\",\"Hampshire\",\"RA3\",7\r\n\"E10000014\",\"Hampshire\",\"RP4\",4\r\n\"E10000014\",\"Hampshire\",\"RTF\",7\r\n\"E10000014\",\"Hampshire\",\"RXN\",3\r\n\"E10000014\",\"Hampshire\",\"RKE\",2\r\n\"E10000014\",\"Hampshire\",\"RQX\",12\r\n\"E10000014\",\"Hampshire\",\"RR7\",4\r\n\"E10000014\",\"Hampshire\",\"RWK\",8\r\n\"E10000014\",\"Hampshire\",\"RWY\",3\r\n\"E10000014\",\"Hampshire\",\"RXK\",5\r\n\"E10000014\",\"Hampshire\",\"RXL\",8\r\n\"E10000014\",\"Hampshire\",\"RXX\",156\r\n\"E10000014\",\"Hampshire\",\"RCB\",18\r\n\"E10000014\",\"Hampshire\",\"RDE\",19\r\n\"E10000014\",\"Hampshire\",\"RGP\",6\r\n\"E10000014\",\"Hampshire\",\"RQ8\",7\r\n\"E10000014\",\"Hampshire\",\"RAN\",11\r\n\"E10000014\",\"Hampshire\",\"RGM\",6\r\n\"E10000014\",\"Hampshire\",\"RJ8\",2\r\n\"E10000014\",\"Hampshire\",\"RKB\",19\r\n\"E10000014\",\"Hampshire\",\"RLQ\",5\r\n\"E10000014\",\"Hampshire\",\"RPC\",31\r\n\"E10000014\",\"Hampshire\",\"RVR\",46\r\n\"E10000014\",\"Hampshire\",\"RNL\",12\r\n\"E10000014\",\"Hampshire\",\"RNS\",16\r\n\"E10000014\",\"Hampshire\",\"RCX\",8\r\n\"E10000014\",\"Hampshire\",\"RPA\",10\r\n\"E10000014\",\"Hampshire\",\"RAP\",6\r\n\"E10000014\",\"Hampshire\",\"RNA\",2\r\n\"E10000014\",\"Hampshire\",\"RTR\",7\r\n\"E10000014\",\"Hampshire\",\"RF4\",6\r\n\"E10000014\",\"Hampshire\",\"RX2\",6\r\n\"E10000014\",\"Hampshire\",\"RCD\",5\r\n\"E10000014\",\"Hampshire\",\"RHQ\",7\r\n\"E10000014\",\"Hampshire\",\"RBN\",4\r\n\"E10000014\",\"Hampshire\",\"RQ3\",1\r\n\"E10000014\",\"Hampshire\",\"RGR\",10\r\n\"E10000014\",\"Hampshire\",\"RWP\",9\r\n\"E10000014\",\"Hampshire\",\"RBT\",6\r\n\"E10000014\",\"Hampshire\",\"RAE\",6\r\n\"E10000014\",\"Hampshire\",\"RVN\",6\r\n\"E10000014\",\"Hampshire\",\"NDA\",1\r\n\"E10000014\",\"Hampshire\",\"R1C\",1\r\n\"E10000014\",\"Hampshire\",\"RXR\",6\r\n\"E10000014\",\"Hampshire\",\"RVY\",3\r\n\"E10000014\",\"Hampshire\",\"RFF\",8\r\n\"E10000014\",\"Hampshire\",\"RK5\",2\r\n\"E10000014\",\"Hampshire\",\"RD8\",17\r\n\"E10000014\",\"Hampshire\",\"RCF\",3\r\n\"E10000014\",\"Hampshire\",\"RH5\",7\r\n\"E10000014\",\"Hampshire\",\"RET\",1\r\n\"E10000014\",\"Hampshire\",\"RM3\",2\r\n\"E10000014\",\"Hampshire\",\"RX3\",2\r\n\"E10000014\",\"Hampshire\",\"RJR\",5\r\n\"E10000014\",\"Hampshire\",\"R0B\",4\r\n\"E10000014\",\"Hampshire\",\"RJL\",5\r\n\"E10000014\",\"Hampshire\",\"RYV\",2\r\n\"E10000014\",\"Hampshire\",\"RLT\",1\r\n\"E10000014\",\"Hampshire\",\"RRF\",2\r\n\"E10000014\",\"Hampshire\",\"RDR\",1\r\n\"E10000014\",\"Hampshire\",\"RW6\",2\r\n\"E10000014\",\"Hampshire\",\"RV3\",1\r\n\"E10000014\",\"Hampshire\",\"RWW\",6\r\n\"E10000014\",\"Hampshire\",\"RJN\",1\r\n\"E10000014\",\"Hampshire\",\"R1L\",2\r\n\"E10000014\",\"Hampshire\",\"RCU\",2\r\n\"E10000014\",\"Hampshire\",\"RNN\",1\r\n\"E10000014\",\"Hampshire\",\"RHA\",1\r\n\"E10000014\",\"Hampshire\",\"AXG\",2\r\n\"E10000014\",\"Hampshire\",\"RBS\",1\r\n\"E10000014\",\"Hampshire\",\"RRE\",1\r\n\"E10000015\",\"Hertfordshire\",\"RQW\",11943\r\n\"E10000015\",\"Hertfordshire\",\"RAL\",9677\r\n\"E10000015\",\"Hertfordshire\",\"RAP\",1349\r\n\"E10000015\",\"Hertfordshire\",\"RWH\",39622\r\n\"E10000015\",\"Hertfordshire\",\"R1H\",490\r\n\"E10000015\",\"Hertfordshire\",\"RRV\",905\r\n\"E10000015\",\"Hertfordshire\",\"RQ8\",278\r\n\"E10000015\",\"Hertfordshire\",\"RGT\",2354\r\n\"E10000015\",\"Hertfordshire\",\"RWR\",318\r\n\"E10000015\",\"Hertfordshire\",\"RF4\",81\r\n\"E10000015\",\"Hertfordshire\",\"RDD\",99\r\n\"E10000015\",\"Hertfordshire\",\"RP6\",246\r\n\"E10000015\",\"Hertfordshire\",\"RWG\",39181\r\n\"E10000015\",\"Hertfordshire\",\"RJ1\",219\r\n\"E10000015\",\"Hertfordshire\",\"RC9\",4533\r\n\"E10000015\",\"Hertfordshire\",\"RKE\",54\r\n\"E10000015\",\"Hertfordshire\",\"RYJ\",685\r\n\"E10000015\",\"Hertfordshire\",\"RQX\",47\r\n\"E10000015\",\"Hertfordshire\",\"R1K\",804\r\n\"E10000015\",\"Hertfordshire\",\"RT3\",528\r\n\"E10000015\",\"Hertfordshire\",\"RDE\",87\r\n\"E10000015\",\"Hertfordshire\",\"RQM\",179\r\n\"E10000015\",\"Hertfordshire\",\"RCX\",36\r\n\"E10000015\",\"Hertfordshire\",\"RJ7\",61\r\n\"E10000015\",\"Hertfordshire\",\"RP4\",54\r\n\"E10000015\",\"Hertfordshire\",\"RJC\",17\r\n\"E10000015\",\"Hertfordshire\",\"RXH\",32\r\n\"E10000015\",\"Hertfordshire\",\"RDU\",111\r\n\"E10000015\",\"Hertfordshire\",\"RJZ\",62\r\n\"E10000015\",\"Hertfordshire\",\"RGP\",52\r\n\"E10000015\",\"Hertfordshire\",\"RD8\",79\r\n\"E10000015\",\"Hertfordshire\",\"RM1\",53\r\n\"E10000015\",\"Hertfordshire\",\"RRK\",36\r\n\"E10000015\",\"Hertfordshire\",\"RAN\",43\r\n\"E10000015\",\"Hertfordshire\",\"R1L\",12\r\n\"E10000015\",\"Hertfordshire\",\"RN7\",12\r\n\"E10000015\",\"Hertfordshire\",\"RXR\",9\r\n\"E10000015\",\"Hertfordshire\",\"RAJ\",15\r\n\"E10000015\",\"Hertfordshire\",\"RC1\",103\r\n\"E10000015\",\"Hertfordshire\",\"RGN\",39\r\n\"E10000015\",\"Hertfordshire\",\"RHU\",18\r\n\"E10000015\",\"Hertfordshire\",\"RP5\",11\r\n\"E10000015\",\"Hertfordshire\",\"RTH\",139\r\n\"E10000015\",\"Hertfordshire\",\"RPY\",35\r\n\"E10000015\",\"Hertfordshire\",\"RKB\",13\r\n\"E10000015\",\"Hertfordshire\",\"RA7\",22\r\n\"E10000015\",\"Hertfordshire\",\"RDZ\",37\r\n\"E10000015\",\"Hertfordshire\",\"RGR\",21\r\n\"E10000015\",\"Hertfordshire\",\"RXC\",26\r\n\"E10000015\",\"Hertfordshire\",\"RBD\",31\r\n\"E10000015\",\"Hertfordshire\",\"RK9\",18\r\n\"E10000015\",\"Hertfordshire\",\"RVW\",4\r\n\"E10000015\",\"Hertfordshire\",\"R1F\",18\r\n\"E10000015\",\"Hertfordshire\",\"RH8\",21\r\n\"E10000015\",\"Hertfordshire\",\"RXQ\",1936\r\n\"E10000015\",\"Hertfordshire\",\"RWD\",22\r\n\"E10000015\",\"Hertfordshire\",\"RGM\",27\r\n\"E10000015\",\"Hertfordshire\",\"RNS\",40\r\n\"E10000015\",\"Hertfordshire\",\"RJ2\",22\r\n\"E10000015\",\"Hertfordshire\",\"RAX\",27\r\n\"E10000015\",\"Hertfordshire\",\"RVV\",21\r\n\"E10000015\",\"Hertfordshire\",\"RAS\",168\r\n\"E10000015\",\"Hertfordshire\",\"RCB\",34\r\n\"E10000015\",\"Hertfordshire\",\"RTF\",12\r\n\"E10000015\",\"Hertfordshire\",\"RTP\",10\r\n\"E10000015\",\"Hertfordshire\",\"RVJ\",11\r\n\"E10000015\",\"Hertfordshire\",\"RXL\",5\r\n\"E10000015\",\"Hertfordshire\",\"R0B\",6\r\n\"E10000015\",\"Hertfordshire\",\"RJE\",11\r\n\"E10000015\",\"Hertfordshire\",\"RTK\",21\r\n\"E10000015\",\"Hertfordshire\",\"RYR\",29\r\n\"E10000015\",\"Hertfordshire\",\"RA9\",19\r\n\"E10000015\",\"Hertfordshire\",\"RBT\",9\r\n\"E10000015\",\"Hertfordshire\",\"RXF\",5\r\n\"E10000015\",\"Hertfordshire\",\"RXW\",13\r\n\"E10000015\",\"Hertfordshire\",\"RN5\",17\r\n\"E10000015\",\"Hertfordshire\",\"RPA\",8\r\n\"E10000015\",\"Hertfordshire\",\"RWE\",20\r\n\"E10000015\",\"Hertfordshire\",\"RWF\",16\r\n\"E10000015\",\"Hertfordshire\",\"RYV\",8\r\n\"E10000015\",\"Hertfordshire\",\"RA4\",7\r\n\"E10000015\",\"Hertfordshire\",\"REM\",14\r\n\"E10000015\",\"Hertfordshire\",\"RXK\",6\r\n\"E10000015\",\"Hertfordshire\",\"RXN\",3\r\n\"E10000015\",\"Hertfordshire\",\"RBZ\",10\r\n\"E10000015\",\"Hertfordshire\",\"RD3\",27\r\n\"E10000015\",\"Hertfordshire\",\"RXP\",8\r\n\"E10000015\",\"Hertfordshire\",\"RVY\",2\r\n\"E10000015\",\"Hertfordshire\",\"REF\",39\r\n\"E10000015\",\"Hertfordshire\",\"RHM\",28\r\n\"E10000015\",\"Hertfordshire\",\"RNA\",1\r\n\"E10000015\",\"Hertfordshire\",\"RNL\",10\r\n\"E10000015\",\"Hertfordshire\",\"RTR\",6\r\n\"E10000015\",\"Hertfordshire\",\"RX1\",17\r\n\"E10000015\",\"Hertfordshire\",\"RNQ\",11\r\n\"E10000015\",\"Hertfordshire\",\"RNU\",5\r\n\"E10000015\",\"Hertfordshire\",\"RV3\",7\r\n\"E10000015\",\"Hertfordshire\",\"RTE\",25\r\n\"E10000015\",\"Hertfordshire\",\"RBA\",12\r\n\"E10000015\",\"Hertfordshire\",\"RBK\",3\r\n\"E10000015\",\"Hertfordshire\",\"RHW\",20\r\n\"E10000015\",\"Hertfordshire\",\"RA2\",14\r\n\"E10000015\",\"Hertfordshire\",\"RLQ\",15\r\n\"E10000015\",\"Hertfordshire\",\"RD1\",19\r\n\"E10000015\",\"Hertfordshire\",\"RLT\",5\r\n\"E10000015\",\"Hertfordshire\",\"RVR\",12\r\n\"E10000015\",\"Hertfordshire\",\"RN3\",12\r\n\"E10000015\",\"Hertfordshire\",\"RBS\",2\r\n\"E10000015\",\"Hertfordshire\",\"RR8\",12\r\n\"E10000015\",\"Hertfordshire\",\"RWY\",4\r\n\"E10000015\",\"Hertfordshire\",\"RWA\",6\r\n\"E10000015\",\"Hertfordshire\",\"R0A\",20\r\n\"E10000015\",\"Hertfordshire\",\"RRF\",2\r\n\"E10000015\",\"Hertfordshire\",\"RAE\",6\r\n\"E10000015\",\"Hertfordshire\",\"RNZ\",11\r\n\"E10000015\",\"Hertfordshire\",\"RWK\",14\r\n\"E10000015\",\"Hertfordshire\",\"RCD\",5\r\n\"E10000015\",\"Hertfordshire\",\"RTG\",12\r\n\"E10000015\",\"Hertfordshire\",\"RHQ\",6\r\n\"E10000015\",\"Hertfordshire\",\"RJ8\",1\r\n\"E10000015\",\"Hertfordshire\",\"RTD\",15\r\n\"E10000015\",\"Hertfordshire\",\"RMY\",5\r\n\"E10000015\",\"Hertfordshire\",\"RWP\",6\r\n\"E10000015\",\"Hertfordshire\",\"RJN\",6\r\n\"E10000015\",\"Hertfordshire\",\"RJ6\",5\r\n\"E10000015\",\"Hertfordshire\",\"RK5\",6\r\n\"E10000015\",\"Hertfordshire\",\"RV5\",1\r\n\"E10000015\",\"Hertfordshire\",\"RT1\",17\r\n\"E10000015\",\"Hertfordshire\",\"RJR\",6\r\n\"E10000015\",\"Hertfordshire\",\"RR7\",2\r\n\"E10000015\",\"Hertfordshire\",\"RXY\",1\r\n\"E10000015\",\"Hertfordshire\",\"RFF\",2\r\n\"E10000015\",\"Hertfordshire\",\"RXT\",2\r\n\"E10000015\",\"Hertfordshire\",\"RBL\",3\r\n\"E10000015\",\"Hertfordshire\",\"RW6\",6\r\n\"E10000015\",\"Hertfordshire\",\"RTX\",11\r\n\"E10000015\",\"Hertfordshire\",\"RPC\",3\r\n\"E10000015\",\"Hertfordshire\",\"RCF\",2\r\n\"E10000015\",\"Hertfordshire\",\"RWJ\",4\r\n\"E10000015\",\"Hertfordshire\",\"RM3\",2\r\n\"E10000015\",\"Hertfordshire\",\"RW1\",2\r\n\"E10000015\",\"Hertfordshire\",\"RDY\",1\r\n\"E10000015\",\"Hertfordshire\",\"RCU\",2\r\n\"E10000015\",\"Hertfordshire\",\"RW4\",1\r\n\"E10000015\",\"Hertfordshire\",\"RDR\",1\r\n\"E10000015\",\"Hertfordshire\",\"RMC\",6\r\n\"E10000015\",\"Hertfordshire\",\"RAT\",2\r\n\"E10000015\",\"Hertfordshire\",\"RWW\",3\r\n\"E10000015\",\"Hertfordshire\",\"RL4\",3\r\n\"E10000015\",\"Hertfordshire\",\"RQ3\",2\r\n\"E10000015\",\"Hertfordshire\",\"RA3\",2\r\n\"E10000015\",\"Hertfordshire\",\"RT5\",1\r\n\"E10000016\",\"Kent\",\"RVV\",72500\r\n\"E10000016\",\"Kent\",\"RWF\",48633\r\n\"E10000016\",\"Kent\",\"RXY\",1611\r\n\"E10000016\",\"Kent\",\"RXC\",439\r\n\"E10000016\",\"Kent\",\"RPC\",1674\r\n\"E10000016\",\"Kent\",\"RJ1\",1520\r\n\"E10000016\",\"Kent\",\"RJZ\",1930\r\n\"E10000016\",\"Kent\",\"RPA\",12571\r\n\"E10000016\",\"Kent\",\"RP6\",145\r\n\"E10000016\",\"Kent\",\"R1H\",271\r\n\"E10000016\",\"Kent\",\"RRV\",189\r\n\"E10000016\",\"Kent\",\"RTP\",188\r\n\"E10000016\",\"Kent\",\"RN7\",26614\r\n\"E10000016\",\"Kent\",\"RJ7\",151\r\n\"E10000016\",\"Kent\",\"RAL\",53\r\n\"E10000016\",\"Kent\",\"RJ2\",440\r\n\"E10000016\",\"Kent\",\"RPY\",88\r\n\"E10000016\",\"Kent\",\"RQM\",84\r\n\"E10000016\",\"Kent\",\"RJ6\",45\r\n\"E10000016\",\"Kent\",\"RYJ\",103\r\n\"E10000016\",\"Kent\",\"RDU\",48\r\n\"E10000016\",\"Kent\",\"RXH\",120\r\n\"E10000016\",\"Kent\",\"RVR\",45\r\n\"E10000016\",\"Kent\",\"RA9\",28\r\n\"E10000016\",\"Kent\",\"RT3\",38\r\n\"E10000016\",\"Kent\",\"RYR\",64\r\n\"E10000016\",\"Kent\",\"REF\",57\r\n\"E10000016\",\"Kent\",\"RH8\",39\r\n\"E10000016\",\"Kent\",\"RTH\",36\r\n\"E10000016\",\"Kent\",\"RWD\",25\r\n\"E10000016\",\"Kent\",\"RGR\",31\r\n\"E10000016\",\"Kent\",\"RHM\",40\r\n\"E10000016\",\"Kent\",\"RJE\",15\r\n\"E10000016\",\"Kent\",\"RD3\",31\r\n\"E10000016\",\"Kent\",\"RDD\",97\r\n\"E10000016\",\"Kent\",\"RWH\",25\r\n\"E10000016\",\"Kent\",\"RBZ\",24\r\n\"E10000016\",\"Kent\",\"RDE\",32\r\n\"E10000016\",\"Kent\",\"RGT\",36\r\n\"E10000016\",\"Kent\",\"RBD\",24\r\n\"E10000016\",\"Kent\",\"RTE\",23\r\n\"E10000016\",\"Kent\",\"RNS\",10\r\n\"E10000016\",\"Kent\",\"RHW\",29\r\n\"E10000016\",\"Kent\",\"RAS\",12\r\n\"E10000016\",\"Kent\",\"RGM\",8\r\n\"E10000016\",\"Kent\",\"R0A\",16\r\n\"E10000016\",\"Kent\",\"RA2\",44\r\n\"E10000016\",\"Kent\",\"RC9\",14\r\n\"E10000016\",\"Kent\",\"RNL\",6\r\n\"E10000016\",\"Kent\",\"RK9\",33\r\n\"E10000016\",\"Kent\",\"RQX\",30\r\n\"E10000016\",\"Kent\",\"RWE\",24\r\n\"E10000016\",\"Kent\",\"RWP\",7\r\n\"E10000016\",\"Kent\",\"RNZ\",9\r\n\"E10000016\",\"Kent\",\"RRK\",28\r\n\"E10000016\",\"Kent\",\"RTR\",12\r\n\"E10000016\",\"Kent\",\"RWG\",20\r\n\"E10000016\",\"Kent\",\"RBA\",27\r\n\"E10000016\",\"Kent\",\"RTK\",25\r\n\"E10000016\",\"Kent\",\"RD8\",14\r\n\"E10000016\",\"Kent\",\"RQ8\",46\r\n\"E10000016\",\"Kent\",\"RWY\",5\r\n\"E10000016\",\"Kent\",\"RN5\",43\r\n\"E10000016\",\"Kent\",\"RP4\",10\r\n\"E10000016\",\"Kent\",\"RXP\",11\r\n\"E10000016\",\"Kent\",\"RXQ\",19\r\n\"E10000016\",\"Kent\",\"RAX\",33\r\n\"E10000016\",\"Kent\",\"RC1\",10\r\n\"E10000016\",\"Kent\",\"RCF\",6\r\n\"E10000016\",\"Kent\",\"RGP\",24\r\n\"E10000016\",\"Kent\",\"RW1\",6\r\n\"E10000016\",\"Kent\",\"RXL\",6\r\n\"E10000016\",\"Kent\",\"RTF\",17\r\n\"E10000016\",\"Kent\",\"RTX\",8\r\n\"E10000016\",\"Kent\",\"RA7\",25\r\n\"E10000016\",\"Kent\",\"RBT\",5\r\n\"E10000016\",\"Kent\",\"RM3\",3\r\n\"E10000016\",\"Kent\",\"RXW\",11\r\n\"E10000016\",\"Kent\",\"RBL\",5\r\n\"E10000016\",\"Kent\",\"RM1\",25\r\n\"E10000016\",\"Kent\",\"REM\",14\r\n\"E10000016\",\"Kent\",\"R1K\",51\r\n\"E10000016\",\"Kent\",\"RA4\",10\r\n\"E10000016\",\"Kent\",\"RAP\",15\r\n\"E10000016\",\"Kent\",\"RDZ\",32\r\n\"E10000016\",\"Kent\",\"RN3\",18\r\n\"E10000016\",\"Kent\",\"RW6\",7\r\n\"E10000016\",\"Kent\",\"RX1\",14\r\n\"E10000016\",\"Kent\",\"RJN\",3\r\n\"E10000016\",\"Kent\",\"RK5\",12\r\n\"E10000016\",\"Kent\",\"RKB\",10\r\n\"E10000016\",\"Kent\",\"RTG\",10\r\n\"E10000016\",\"Kent\",\"RF4\",34\r\n\"E10000016\",\"Kent\",\"RGN\",25\r\n\"E10000016\",\"Kent\",\"RCB\",22\r\n\"E10000016\",\"Kent\",\"RHU\",35\r\n\"E10000016\",\"Kent\",\"RD1\",22\r\n\"E10000016\",\"Kent\",\"RLQ\",8\r\n\"E10000016\",\"Kent\",\"RAJ\",24\r\n\"E10000016\",\"Kent\",\"RJL\",7\r\n\"E10000016\",\"Kent\",\"RWK\",4\r\n\"E10000016\",\"Kent\",\"RVJ\",13\r\n\"E10000016\",\"Kent\",\"RCX\",9\r\n\"E10000016\",\"Kent\",\"RVW\",5\r\n\"E10000016\",\"Kent\",\"RA3\",8\r\n\"E10000016\",\"Kent\",\"RAN\",20\r\n\"E10000016\",\"Kent\",\"RMC\",2\r\n\"E10000016\",\"Kent\",\"RQW\",16\r\n\"E10000016\",\"Kent\",\"RKE\",11\r\n\"E10000016\",\"Kent\",\"RBK\",6\r\n\"E10000016\",\"Kent\",\"RFS\",3\r\n\"E10000016\",\"Kent\",\"RNU\",2\r\n\"E10000016\",\"Kent\",\"RTD\",8\r\n\"E10000016\",\"Kent\",\"RWJ\",6\r\n\"E10000016\",\"Kent\",\"RXK\",12\r\n\"E10000016\",\"Kent\",\"RJR\",6\r\n\"E10000016\",\"Kent\",\"RR8\",10\r\n\"E10000016\",\"Kent\",\"RP5\",8\r\n\"E10000016\",\"Kent\",\"RAT\",4\r\n\"E10000016\",\"Kent\",\"R1L\",2\r\n\"E10000016\",\"Kent\",\"RRF\",6\r\n\"E10000016\",\"Kent\",\"RPG\",18\r\n\"E10000016\",\"Kent\",\"NDA\",50\r\n\"E10000016\",\"Kent\",\"R1F\",21\r\n\"E10000016\",\"Kent\",\"RFR\",4\r\n\"E10000016\",\"Kent\",\"RX2\",7\r\n\"E10000016\",\"Kent\",\"RJC\",11\r\n\"E10000016\",\"Kent\",\"RBS\",1\r\n\"E10000016\",\"Kent\",\"RCD\",8\r\n\"E10000016\",\"Kent\",\"RXF\",3\r\n\"E10000016\",\"Kent\",\"RXT\",1\r\n\"E10000016\",\"Kent\",\"RXN\",5\r\n\"E10000016\",\"Kent\",\"RBN\",5\r\n\"E10000016\",\"Kent\",\"RHQ\",4\r\n\"E10000016\",\"Kent\",\"RWA\",7\r\n\"E10000016\",\"Kent\",\"RAE\",6\r\n\"E10000016\",\"Kent\",\"RR7\",5\r\n\"E10000016\",\"Kent\",\"RNA\",4\r\n\"E10000016\",\"Kent\",\"RQ3\",4\r\n\"E10000016\",\"Kent\",\"RXR\",1\r\n\"E10000016\",\"Kent\",\"RNQ\",5\r\n\"E10000016\",\"Kent\",\"RV3\",2\r\n\"E10000016\",\"Kent\",\"RET\",2\r\n\"E10000016\",\"Kent\",\"RCU\",1\r\n\"E10000016\",\"Kent\",\"RWW\",3\r\n\"E10000016\",\"Kent\",\"RYV\",1\r\n\"E10000016\",\"Kent\",\"RDR\",1\r\n\"E10000016\",\"Kent\",\"RBQ\",1\r\n\"E10000016\",\"Kent\",\"R0B\",2\r\n\"E10000016\",\"Kent\",\"RFF\",1\r\n\"E10000016\",\"Kent\",\"NQ7\",3\r\n\"E10000016\",\"Kent\",\"RDY\",1\r\n\"E10000016\",\"Kent\",\"RV5\",3\r\n\"E10000016\",\"Kent\",\"RW4\",2\r\n\"E10000016\",\"Kent\",\"RX3\",1\r\n\"E10000016\",\"Kent\",\"RWX\",1\r\n\"E10000017\",\"Lancashire\",\"RXR\",39504\r\n\"E10000017\",\"Lancashire\",\"RXN\",46508\r\n\"E10000017\",\"Lancashire\",\"R0A\",1473\r\n\"E10000017\",\"Lancashire\",\"RW5\",1429\r\n\"E10000017\",\"Lancashire\",\"RXL\",18847\r\n\"E10000017\",\"Lancashire\",\"RCF\",2865\r\n\"E10000017\",\"Lancashire\",\"RM3\",304\r\n\"E10000017\",\"Lancashire\",\"RBS\",474\r\n\"E10000017\",\"Lancashire\",\"RW6\",1576\r\n\"E10000017\",\"Lancashire\",\"RCB\",66\r\n\"E10000017\",\"Lancashire\",\"RTX\",17149\r\n\"E10000017\",\"Lancashire\",\"REM\",1326\r\n\"E10000017\",\"Lancashire\",\"RAE\",143\r\n\"E10000017\",\"Lancashire\",\"RX1\",25\r\n\"E10000017\",\"Lancashire\",\"RRF\",2382\r\n\"E10000017\",\"Lancashire\",\"RMC\",273\r\n\"E10000017\",\"Lancashire\",\"RJE\",38\r\n\"E10000017\",\"Lancashire\",\"RHQ\",36\r\n\"E10000017\",\"Lancashire\",\"RBN\",375\r\n\"E10000017\",\"Lancashire\",\"RR8\",159\r\n\"E10000017\",\"Lancashire\",\"RFF\",8\r\n\"E10000017\",\"Lancashire\",\"RA9\",20\r\n\"E10000017\",\"Lancashire\",\"RBV\",142\r\n\"E10000017\",\"Lancashire\",\"RWY\",35\r\n\"E10000017\",\"Lancashire\",\"RA2\",16\r\n\"E10000017\",\"Lancashire\",\"RET\",95\r\n\"E10000017\",\"Lancashire\",\"RKB\",18\r\n\"E10000017\",\"Lancashire\",\"RP5\",13\r\n\"E10000017\",\"Lancashire\",\"RTG\",16\r\n\"E10000017\",\"Lancashire\",\"RWJ\",30\r\n\"E10000017\",\"Lancashire\",\"RJC\",8\r\n\"E10000017\",\"Lancashire\",\"RRV\",17\r\n\"E10000017\",\"Lancashire\",\"R1K\",12\r\n\"E10000017\",\"Lancashire\",\"RBT\",29\r\n\"E10000017\",\"Lancashire\",\"RNL\",68\r\n\"E10000017\",\"Lancashire\",\"RDU\",16\r\n\"E10000017\",\"Lancashire\",\"RH8\",12\r\n\"E10000017\",\"Lancashire\",\"RXF\",25\r\n\"E10000017\",\"Lancashire\",\"RWE\",14\r\n\"E10000017\",\"Lancashire\",\"RDE\",8\r\n\"E10000017\",\"Lancashire\",\"RBQ\",157\r\n\"E10000017\",\"Lancashire\",\"RC9\",3\r\n\"E10000017\",\"Lancashire\",\"RTH\",15\r\n\"E10000017\",\"Lancashire\",\"RWD\",21\r\n\"E10000017\",\"Lancashire\",\"RWW\",50\r\n\"E10000017\",\"Lancashire\",\"RTE\",11\r\n\"E10000017\",\"Lancashire\",\"RD3\",11\r\n\"E10000017\",\"Lancashire\",\"RJ1\",25\r\n\"E10000017\",\"Lancashire\",\"RN5\",5\r\n\"E10000017\",\"Lancashire\",\"RTR\",16\r\n\"E10000017\",\"Lancashire\",\"RWP\",9\r\n\"E10000017\",\"Lancashire\",\"RXK\",9\r\n\"E10000017\",\"Lancashire\",\"RYV\",1\r\n\"E10000017\",\"Lancashire\",\"R1H\",29\r\n\"E10000017\",\"Lancashire\",\"RK9\",7\r\n\"E10000017\",\"Lancashire\",\"RMP\",23\r\n\"E10000017\",\"Lancashire\",\"RTK\",4\r\n\"E10000017\",\"Lancashire\",\"RVY\",11198\r\n\"E10000017\",\"Lancashire\",\"RXG\",1\r\n\"E10000017\",\"Lancashire\",\"RBD\",5\r\n\"E10000017\",\"Lancashire\",\"RCD\",13\r\n\"E10000017\",\"Lancashire\",\"REF\",33\r\n\"E10000017\",\"Lancashire\",\"RJ7\",20\r\n\"E10000017\",\"Lancashire\",\"RJN\",14\r\n\"E10000017\",\"Lancashire\",\"RXW\",14\r\n\"E10000017\",\"Lancashire\",\"RBL\",28\r\n\"E10000017\",\"Lancashire\",\"RWA\",16\r\n\"E10000017\",\"Lancashire\",\"RLQ\",6\r\n\"E10000017\",\"Lancashire\",\"RNZ\",6\r\n\"E10000017\",\"Lancashire\",\"RTD\",37\r\n\"E10000017\",\"Lancashire\",\"RRK\",40\r\n\"E10000017\",\"Lancashire\",\"RTV\",20\r\n\"E10000017\",\"Lancashire\",\"RBK\",9\r\n\"E10000017\",\"Lancashire\",\"RHW\",8\r\n\"E10000017\",\"Lancashire\",\"RYR\",6\r\n\"E10000017\",\"Lancashire\",\"RWG\",11\r\n\"E10000017\",\"Lancashire\",\"RBZ\",3\r\n\"E10000017\",\"Lancashire\",\"RCX\",12\r\n\"E10000017\",\"Lancashire\",\"RQM\",15\r\n\"E10000017\",\"Lancashire\",\"RTF\",18\r\n\"E10000017\",\"Lancashire\",\"RD8\",8\r\n\"E10000017\",\"Lancashire\",\"REN\",53\r\n\"E10000017\",\"Lancashire\",\"RGM\",1\r\n\"E10000017\",\"Lancashire\",\"RGT\",15\r\n\"E10000017\",\"Lancashire\",\"RXQ\",8\r\n\"E10000017\",\"Lancashire\",\"RD1\",9\r\n\"E10000017\",\"Lancashire\",\"RF4\",3\r\n\"E10000017\",\"Lancashire\",\"RNQ\",5\r\n\"E10000017\",\"Lancashire\",\"RBA\",5\r\n\"E10000017\",\"Lancashire\",\"R0B\",4\r\n\"E10000017\",\"Lancashire\",\"REP\",13\r\n\"E10000017\",\"Lancashire\",\"RJ2\",6\r\n\"E10000017\",\"Lancashire\",\"RJR\",21\r\n\"E10000017\",\"Lancashire\",\"RJZ\",4\r\n\"E10000017\",\"Lancashire\",\"RL4\",4\r\n\"E10000017\",\"Lancashire\",\"RXP\",15\r\n\"E10000017\",\"Lancashire\",\"RTP\",3\r\n\"E10000017\",\"Lancashire\",\"RVR\",5\r\n\"E10000017\",\"Lancashire\",\"RA7\",6\r\n\"E10000017\",\"Lancashire\",\"RA3\",5\r\n\"E10000017\",\"Lancashire\",\"RGP\",7\r\n\"E10000017\",\"Lancashire\",\"RNS\",13\r\n\"E10000017\",\"Lancashire\",\"RFR\",6\r\n\"E10000017\",\"Lancashire\",\"RGN\",7\r\n\"E10000017\",\"Lancashire\",\"RVV\",11\r\n\"E10000017\",\"Lancashire\",\"RFS\",9\r\n\"E10000017\",\"Lancashire\",\"RLY\",7\r\n\"E10000017\",\"Lancashire\",\"RNN\",2\r\n\"E10000017\",\"Lancashire\",\"RXC\",7\r\n\"E10000017\",\"Lancashire\",\"RHM\",9\r\n\"E10000017\",\"Lancashire\",\"RWF\",7\r\n\"E10000017\",\"Lancashire\",\"RAL\",12\r\n\"E10000017\",\"Lancashire\",\"RQ8\",7\r\n\"E10000017\",\"Lancashire\",\"RVW\",6\r\n\"E10000017\",\"Lancashire\",\"RXA\",6\r\n\"E10000017\",\"Lancashire\",\"RAP\",5\r\n\"E10000017\",\"Lancashire\",\"RQW\",4\r\n\"E10000017\",\"Lancashire\",\"RRE\",5\r\n\"E10000017\",\"Lancashire\",\"RR7\",5\r\n\"E10000017\",\"Lancashire\",\"RXH\",2\r\n\"E10000017\",\"Lancashire\",\"RN3\",6\r\n\"E10000017\",\"Lancashire\",\"RN7\",6\r\n\"E10000017\",\"Lancashire\",\"RYW\",1\r\n\"E10000017\",\"Lancashire\",\"RAX\",4\r\n\"E10000017\",\"Lancashire\",\"RGR\",2\r\n\"E10000017\",\"Lancashire\",\"RLT\",5\r\n\"E10000017\",\"Lancashire\",\"RX4\",1\r\n\"E10000017\",\"Lancashire\",\"RDZ\",6\r\n\"E10000017\",\"Lancashire\",\"RYJ\",10\r\n\"E10000017\",\"Lancashire\",\"RAJ\",2\r\n\"E10000017\",\"Lancashire\",\"RJL\",4\r\n\"E10000017\",\"Lancashire\",\"RM1\",9\r\n\"E10000017\",\"Lancashire\",\"RWH\",4\r\n\"E10000017\",\"Lancashire\",\"RNA\",5\r\n\"E10000017\",\"Lancashire\",\"RPA\",2\r\n\"E10000017\",\"Lancashire\",\"RT3\",1\r\n\"E10000017\",\"Lancashire\",\"RAS\",6\r\n\"E10000017\",\"Lancashire\",\"RKE\",5\r\n\"E10000017\",\"Lancashire\",\"RJ6\",3\r\n\"E10000017\",\"Lancashire\",\"RCU\",3\r\n\"E10000017\",\"Lancashire\",\"RHU\",4\r\n\"E10000017\",\"Lancashire\",\"RYG\",1\r\n\"E10000017\",\"Lancashire\",\"RK5\",6\r\n\"E10000017\",\"Lancashire\",\"RV3\",1\r\n\"E10000017\",\"Lancashire\",\"TAD\",3\r\n\"E10000017\",\"Lancashire\",\"RP4\",1\r\n\"E10000017\",\"Lancashire\",\"RQX\",3\r\n\"E10000017\",\"Lancashire\",\"RVJ\",7\r\n\"E10000017\",\"Lancashire\",\"RPY\",1\r\n\"E10000017\",\"Lancashire\",\"R1F\",2\r\n\"E10000017\",\"Lancashire\",\"RWK\",1\r\n\"E10000017\",\"Lancashire\",\"RW4\",8\r\n\"E10000017\",\"Lancashire\",\"RXX\",1\r\n\"E10000017\",\"Lancashire\",\"RA4\",3\r\n\"E10000017\",\"Lancashire\",\"RGD\",1\r\n\"E10000017\",\"Lancashire\",\"RX3\",1\r\n\"E10000017\",\"Lancashire\",\"RDD\",3\r\n\"E10000017\",\"Lancashire\",\"RQ3\",3\r\n\"E10000017\",\"Lancashire\",\"RC1\",3\r\n\"E10000017\",\"Lancashire\",\"RHA\",1\r\n\"E10000018\",\"Leicestershire\",\"RWE\",54261\r\n\"E10000018\",\"Leicestershire\",\"RT5\",3235\r\n\"E10000018\",\"Leicestershire\",\"RKB\",1819\r\n\"E10000018\",\"Leicestershire\",\"RLT\",2865\r\n\"E10000018\",\"Leicestershire\",\"RX1\",2334\r\n\"E10000018\",\"Leicestershire\",\"RRK\",127\r\n\"E10000018\",\"Leicestershire\",\"RTG\",4202\r\n\"E10000018\",\"Leicestershire\",\"R1H\",26\r\n\"E10000018\",\"Leicestershire\",\"REF\",37\r\n\"E10000018\",\"Leicestershire\",\"R0A\",23\r\n\"E10000018\",\"Leicestershire\",\"RHQ\",22\r\n\"E10000018\",\"Leicestershire\",\"RNS\",115\r\n\"E10000018\",\"Leicestershire\",\"RQ3\",39\r\n\"E10000018\",\"Leicestershire\",\"RCB\",32\r\n\"E10000018\",\"Leicestershire\",\"RWD\",401\r\n\"E10000018\",\"Leicestershire\",\"RP6\",13\r\n\"E10000018\",\"Leicestershire\",\"RRV\",18\r\n\"E10000018\",\"Leicestershire\",\"RFS\",11\r\n\"E10000018\",\"Leicestershire\",\"RXK\",28\r\n\"E10000018\",\"Leicestershire\",\"RJ1\",18\r\n\"E10000018\",\"Leicestershire\",\"RJ7\",7\r\n\"E10000018\",\"Leicestershire\",\"RGP\",21\r\n\"E10000018\",\"Leicestershire\",\"RJ6\",4\r\n\"E10000018\",\"Leicestershire\",\"REM\",10\r\n\"E10000018\",\"Leicestershire\",\"R1K\",13\r\n\"E10000018\",\"Leicestershire\",\"RC1\",9\r\n\"E10000018\",\"Leicestershire\",\"RCX\",39\r\n\"E10000018\",\"Leicestershire\",\"RGN\",96\r\n\"E10000018\",\"Leicestershire\",\"RK5\",27\r\n\"E10000018\",\"Leicestershire\",\"RWG\",11\r\n\"E10000018\",\"Leicestershire\",\"RNQ\",1690\r\n\"E10000018\",\"Leicestershire\",\"RXF\",13\r\n\"E10000018\",\"Leicestershire\",\"RXP\",7\r\n\"E10000018\",\"Leicestershire\",\"RBZ\",9\r\n\"E10000018\",\"Leicestershire\",\"RVJ\",6\r\n\"E10000018\",\"Leicestershire\",\"RDU\",19\r\n\"E10000018\",\"Leicestershire\",\"RGT\",28\r\n\"E10000018\",\"Leicestershire\",\"RM1\",19\r\n\"E10000018\",\"Leicestershire\",\"RTF\",8\r\n\"E10000018\",\"Leicestershire\",\"RWH\",9\r\n\"E10000018\",\"Leicestershire\",\"RDZ\",8\r\n\"E10000018\",\"Leicestershire\",\"RTE\",14\r\n\"E10000018\",\"Leicestershire\",\"RLQ\",5\r\n\"E10000018\",\"Leicestershire\",\"RWJ\",8\r\n\"E10000018\",\"Leicestershire\",\"RGR\",5\r\n\"E10000018\",\"Leicestershire\",\"RVW\",3\r\n\"E10000018\",\"Leicestershire\",\"RWY\",6\r\n\"E10000018\",\"Leicestershire\",\"RYJ\",14\r\n\"E10000018\",\"Leicestershire\",\"RBA\",10\r\n\"E10000018\",\"Leicestershire\",\"RBQ\",1\r\n\"E10000018\",\"Leicestershire\",\"RFF\",8\r\n\"E10000018\",\"Leicestershire\",\"RQM\",18\r\n\"E10000018\",\"Leicestershire\",\"RA3\",5\r\n\"E10000018\",\"Leicestershire\",\"RA9\",21\r\n\"E10000018\",\"Leicestershire\",\"RCD\",5\r\n\"E10000018\",\"Leicestershire\",\"RFR\",4\r\n\"E10000018\",\"Leicestershire\",\"RNZ\",5\r\n\"E10000018\",\"Leicestershire\",\"RHA\",9\r\n\"E10000018\",\"Leicestershire\",\"RHM\",9\r\n\"E10000018\",\"Leicestershire\",\"RP5\",13\r\n\"E10000018\",\"Leicestershire\",\"RPY\",6\r\n\"E10000018\",\"Leicestershire\",\"RWW\",3\r\n\"E10000018\",\"Leicestershire\",\"RXC\",14\r\n\"E10000018\",\"Leicestershire\",\"RXQ\",8\r\n\"E10000018\",\"Leicestershire\",\"RYR\",4\r\n\"E10000018\",\"Leicestershire\",\"RA2\",4\r\n\"E10000018\",\"Leicestershire\",\"RBK\",8\r\n\"E10000018\",\"Leicestershire\",\"RK9\",15\r\n\"E10000018\",\"Leicestershire\",\"RH8\",21\r\n\"E10000018\",\"Leicestershire\",\"RJL\",12\r\n\"E10000018\",\"Leicestershire\",\"RR8\",13\r\n\"E10000018\",\"Leicestershire\",\"RA7\",10\r\n\"E10000018\",\"Leicestershire\",\"RQW\",10\r\n\"E10000018\",\"Leicestershire\",\"RW1\",1\r\n\"E10000018\",\"Leicestershire\",\"RHU\",7\r\n\"E10000018\",\"Leicestershire\",\"RXH\",5\r\n\"E10000018\",\"Leicestershire\",\"RXL\",6\r\n\"E10000018\",\"Leicestershire\",\"RAJ\",2\r\n\"E10000018\",\"Leicestershire\",\"RD1\",5\r\n\"E10000018\",\"Leicestershire\",\"RJC\",28\r\n\"E10000018\",\"Leicestershire\",\"RPC\",1\r\n\"E10000018\",\"Leicestershire\",\"RRJ\",2\r\n\"E10000018\",\"Leicestershire\",\"RXW\",11\r\n\"E10000018\",\"Leicestershire\",\"RTH\",50\r\n\"E10000018\",\"Leicestershire\",\"RJE\",36\r\n\"E10000018\",\"Leicestershire\",\"RC9\",18\r\n\"E10000018\",\"Leicestershire\",\"RWF\",11\r\n\"E10000018\",\"Leicestershire\",\"RBD\",10\r\n\"E10000018\",\"Leicestershire\",\"RTD\",6\r\n\"E10000018\",\"Leicestershire\",\"RM3\",12\r\n\"E10000018\",\"Leicestershire\",\"RWA\",5\r\n\"E10000018\",\"Leicestershire\",\"RD8\",14\r\n\"E10000018\",\"Leicestershire\",\"RTX\",8\r\n\"E10000018\",\"Leicestershire\",\"RHW\",6\r\n\"E10000018\",\"Leicestershire\",\"RF4\",7\r\n\"E10000018\",\"Leicestershire\",\"RNL\",6\r\n\"E10000018\",\"Leicestershire\",\"RGM\",10\r\n\"E10000018\",\"Leicestershire\",\"RL4\",10\r\n\"E10000018\",\"Leicestershire\",\"RN3\",8\r\n\"E10000018\",\"Leicestershire\",\"RQ8\",11\r\n\"E10000018\",\"Leicestershire\",\"RWP\",10\r\n\"E10000018\",\"Leicestershire\",\"RXN\",3\r\n\"E10000018\",\"Leicestershire\",\"R1F\",8\r\n\"E10000018\",\"Leicestershire\",\"RN5\",10\r\n\"E10000018\",\"Leicestershire\",\"RN7\",2\r\n\"E10000018\",\"Leicestershire\",\"RAP\",2\r\n\"E10000018\",\"Leicestershire\",\"RBN\",5\r\n\"E10000018\",\"Leicestershire\",\"RD3\",6\r\n\"E10000018\",\"Leicestershire\",\"RTP\",3\r\n\"E10000018\",\"Leicestershire\",\"RBL\",4\r\n\"E10000018\",\"Leicestershire\",\"RCF\",2\r\n\"E10000018\",\"Leicestershire\",\"RDE\",6\r\n\"E10000018\",\"Leicestershire\",\"RAL\",3\r\n\"E10000018\",\"Leicestershire\",\"R0B\",6\r\n\"E10000018\",\"Leicestershire\",\"RT3\",2\r\n\"E10000018\",\"Leicestershire\",\"RLY\",1\r\n\"E10000018\",\"Leicestershire\",\"RP1\",5\r\n\"E10000018\",\"Leicestershire\",\"RW6\",5\r\n\"E10000018\",\"Leicestershire\",\"RVV\",4\r\n\"E10000018\",\"Leicestershire\",\"RBS\",2\r\n\"E10000018\",\"Leicestershire\",\"RDD\",4\r\n\"E10000018\",\"Leicestershire\",\"RKE\",2\r\n\"E10000018\",\"Leicestershire\",\"RTR\",1\r\n\"E10000018\",\"Leicestershire\",\"RVR\",8\r\n\"E10000018\",\"Leicestershire\",\"RAX\",2\r\n\"E10000018\",\"Leicestershire\",\"RJZ\",4\r\n\"E10000018\",\"Leicestershire\",\"RBT\",6\r\n\"E10000018\",\"Leicestershire\",\"RA4\",4\r\n\"E10000018\",\"Leicestershire\",\"RCU\",3\r\n\"E10000018\",\"Leicestershire\",\"RXM\",6\r\n\"E10000018\",\"Leicestershire\",\"RBV\",2\r\n\"E10000018\",\"Leicestershire\",\"RXR\",3\r\n\"E10000018\",\"Leicestershire\",\"RYG\",1\r\n\"E10000018\",\"Leicestershire\",\"RR7\",2\r\n\"E10000018\",\"Leicestershire\",\"RXT\",3\r\n\"E10000018\",\"Leicestershire\",\"RTK\",6\r\n\"E10000018\",\"Leicestershire\",\"RP7\",4\r\n\"E10000018\",\"Leicestershire\",\"RAE\",2\r\n\"E10000018\",\"Leicestershire\",\"RP4\",2\r\n\"E10000018\",\"Leicestershire\",\"RRF\",2\r\n\"E10000018\",\"Leicestershire\",\"RQX\",1\r\n\"E10000018\",\"Leicestershire\",\"RAS\",4\r\n\"E10000018\",\"Leicestershire\",\"RJR\",1\r\n\"E10000018\",\"Leicestershire\",\"RNU\",1\r\n\"E10000018\",\"Leicestershire\",\"RJ2\",1\r\n\"E10000018\",\"Leicestershire\",\"RNA\",1\r\n\"E10000018\",\"Leicestershire\",\"RMC\",2\r\n\"E10000018\",\"Leicestershire\",\"RPA\",2\r\n\"E10000018\",\"Leicestershire\",\"REN\",1\r\n\"E10000019\",\"Lincolnshire\",\"RWD\",54560\r\n\"E10000019\",\"Lincolnshire\",\"RX1\",1546\r\n\"E10000019\",\"Lincolnshire\",\"RP7\",720\r\n\"E10000019\",\"Lincolnshire\",\"RWE\",490\r\n\"E10000019\",\"Lincolnshire\",\"RGN\",9049\r\n\"E10000019\",\"Lincolnshire\",\"RCX\",2670\r\n\"E10000019\",\"Lincolnshire\",\"RTG\",216\r\n\"E10000019\",\"Lincolnshire\",\"RGT\",288\r\n\"E10000019\",\"Lincolnshire\",\"RJL\",6588\r\n\"E10000019\",\"Lincolnshire\",\"RM1\",83\r\n\"E10000019\",\"Lincolnshire\",\"RP6\",33\r\n\"E10000019\",\"Lincolnshire\",\"RTH\",22\r\n\"E10000019\",\"Lincolnshire\",\"RQ8\",19\r\n\"E10000019\",\"Lincolnshire\",\"RCU\",67\r\n\"E10000019\",\"Lincolnshire\",\"RD8\",15\r\n\"E10000019\",\"Lincolnshire\",\"RWA\",450\r\n\"E10000019\",\"Lincolnshire\",\"RWH\",16\r\n\"E10000019\",\"Lincolnshire\",\"RRV\",23\r\n\"E10000019\",\"Lincolnshire\",\"RYJ\",23\r\n\"E10000019\",\"Lincolnshire\",\"RRK\",28\r\n\"E10000019\",\"Lincolnshire\",\"R0A\",24\r\n\"E10000019\",\"Lincolnshire\",\"RGP\",30\r\n\"E10000019\",\"Lincolnshire\",\"RDU\",22\r\n\"E10000019\",\"Lincolnshire\",\"RXP\",15\r\n\"E10000019\",\"Lincolnshire\",\"RGM\",64\r\n\"E10000019\",\"Lincolnshire\",\"RP5\",113\r\n\"E10000019\",\"Lincolnshire\",\"RK5\",169\r\n\"E10000019\",\"Lincolnshire\",\"RVJ\",8\r\n\"E10000019\",\"Lincolnshire\",\"RWP\",7\r\n\"E10000019\",\"Lincolnshire\",\"RGR\",7\r\n\"E10000019\",\"Lincolnshire\",\"RCB\",63\r\n\"E10000019\",\"Lincolnshire\",\"RKB\",16\r\n\"E10000019\",\"Lincolnshire\",\"R1H\",32\r\n\"E10000019\",\"Lincolnshire\",\"RHQ\",149\r\n\"E10000019\",\"Lincolnshire\",\"RJC\",8\r\n\"E10000019\",\"Lincolnshire\",\"RP4\",3\r\n\"E10000019\",\"Lincolnshire\",\"RCD\",15\r\n\"E10000019\",\"Lincolnshire\",\"RHU\",12\r\n\"E10000019\",\"Lincolnshire\",\"RHM\",10\r\n\"E10000019\",\"Lincolnshire\",\"REM\",17\r\n\"E10000019\",\"Lincolnshire\",\"RTP\",13\r\n\"E10000019\",\"Lincolnshire\",\"RXW\",14\r\n\"E10000019\",\"Lincolnshire\",\"R1F\",7\r\n\"E10000019\",\"Lincolnshire\",\"RA3\",4\r\n\"E10000019\",\"Lincolnshire\",\"RDD\",10\r\n\"E10000019\",\"Lincolnshire\",\"RH8\",7\r\n\"E10000019\",\"Lincolnshire\",\"RTR\",17\r\n\"E10000019\",\"Lincolnshire\",\"RWG\",13\r\n\"E10000019\",\"Lincolnshire\",\"RAL\",14\r\n\"E10000019\",\"Lincolnshire\",\"RCF\",4\r\n\"E10000019\",\"Lincolnshire\",\"REF\",23\r\n\"E10000019\",\"Lincolnshire\",\"RFS\",16\r\n\"E10000019\",\"Lincolnshire\",\"RHW\",8\r\n\"E10000019\",\"Lincolnshire\",\"RK9\",8\r\n\"E10000019\",\"Lincolnshire\",\"RN7\",2\r\n\"E10000019\",\"Lincolnshire\",\"RNS\",7\r\n\"E10000019\",\"Lincolnshire\",\"RR8\",46\r\n\"E10000019\",\"Lincolnshire\",\"RY5\",46\r\n\"E10000019\",\"Lincolnshire\",\"RBZ\",6\r\n\"E10000019\",\"Lincolnshire\",\"RDZ\",5\r\n\"E10000019\",\"Lincolnshire\",\"RFF\",16\r\n\"E10000019\",\"Lincolnshire\",\"RJ7\",6\r\n\"E10000019\",\"Lincolnshire\",\"RN3\",10\r\n\"E10000019\",\"Lincolnshire\",\"RYR\",4\r\n\"E10000019\",\"Lincolnshire\",\"RC1\",12\r\n\"E10000019\",\"Lincolnshire\",\"RD1\",11\r\n\"E10000019\",\"Lincolnshire\",\"RQ3\",6\r\n\"E10000019\",\"Lincolnshire\",\"RWW\",8\r\n\"E10000019\",\"Lincolnshire\",\"RAX\",4\r\n\"E10000019\",\"Lincolnshire\",\"RC9\",16\r\n\"E10000019\",\"Lincolnshire\",\"RJ2\",8\r\n\"E10000019\",\"Lincolnshire\",\"RQW\",13\r\n\"E10000019\",\"Lincolnshire\",\"RA2\",7\r\n\"E10000019\",\"Lincolnshire\",\"RJ1\",14\r\n\"E10000019\",\"Lincolnshire\",\"RJZ\",8\r\n\"E10000019\",\"Lincolnshire\",\"RLT\",6\r\n\"E10000019\",\"Lincolnshire\",\"RPY\",2\r\n\"E10000019\",\"Lincolnshire\",\"RXF\",22\r\n\"E10000019\",\"Lincolnshire\",\"RTF\",18\r\n\"E10000019\",\"Lincolnshire\",\"RVW\",10\r\n\"E10000019\",\"Lincolnshire\",\"RFR\",17\r\n\"E10000019\",\"Lincolnshire\",\"RWF\",10\r\n\"E10000019\",\"Lincolnshire\",\"RXQ\",14\r\n\"E10000019\",\"Lincolnshire\",\"RBV\",6\r\n\"E10000019\",\"Lincolnshire\",\"RDE\",16\r\n\"E10000019\",\"Lincolnshire\",\"RAE\",9\r\n\"E10000019\",\"Lincolnshire\",\"RA9\",10\r\n\"E10000019\",\"Lincolnshire\",\"RTX\",9\r\n\"E10000019\",\"Lincolnshire\",\"RTD\",17\r\n\"E10000019\",\"Lincolnshire\",\"RJE\",13\r\n\"E10000019\",\"Lincolnshire\",\"RWY\",5\r\n\"E10000019\",\"Lincolnshire\",\"RA7\",5\r\n\"E10000019\",\"Lincolnshire\",\"RAP\",5\r\n\"E10000019\",\"Lincolnshire\",\"RAS\",6\r\n\"E10000019\",\"Lincolnshire\",\"RBK\",8\r\n\"E10000019\",\"Lincolnshire\",\"R0B\",6\r\n\"E10000019\",\"Lincolnshire\",\"RXY\",2\r\n\"E10000019\",\"Lincolnshire\",\"RBT\",9\r\n\"E10000019\",\"Lincolnshire\",\"RHA\",7\r\n\"E10000019\",\"Lincolnshire\",\"RNL\",9\r\n\"E10000019\",\"Lincolnshire\",\"RNQ\",30\r\n\"E10000019\",\"Lincolnshire\",\"RNZ\",3\r\n\"E10000019\",\"Lincolnshire\",\"RM3\",5\r\n\"E10000019\",\"Lincolnshire\",\"RPA\",3\r\n\"E10000019\",\"Lincolnshire\",\"RWJ\",6\r\n\"E10000019\",\"Lincolnshire\",\"RT5\",13\r\n\"E10000019\",\"Lincolnshire\",\"RYV\",8\r\n\"E10000019\",\"Lincolnshire\",\"RAN\",2\r\n\"E10000019\",\"Lincolnshire\",\"RBQ\",1\r\n\"E10000019\",\"Lincolnshire\",\"RL4\",1\r\n\"E10000019\",\"Lincolnshire\",\"RXH\",8\r\n\"E10000019\",\"Lincolnshire\",\"RJ6\",5\r\n\"E10000019\",\"Lincolnshire\",\"RTK\",5\r\n\"E10000019\",\"Lincolnshire\",\"RAJ\",6\r\n\"E10000019\",\"Lincolnshire\",\"RVV\",7\r\n\"E10000019\",\"Lincolnshire\",\"RN5\",8\r\n\"E10000019\",\"Lincolnshire\",\"RNA\",5\r\n\"E10000019\",\"Lincolnshire\",\"RWK\",1\r\n\"E10000019\",\"Lincolnshire\",\"RXE\",3\r\n\"E10000019\",\"Lincolnshire\",\"RXN\",2\r\n\"E10000019\",\"Lincolnshire\",\"RBL\",6\r\n\"E10000019\",\"Lincolnshire\",\"RJN\",1\r\n\"E10000019\",\"Lincolnshire\",\"RTE\",13\r\n\"E10000019\",\"Lincolnshire\",\"RV9\",2\r\n\"E10000019\",\"Lincolnshire\",\"RA4\",5\r\n\"E10000019\",\"Lincolnshire\",\"RXL\",10\r\n\"E10000019\",\"Lincolnshire\",\"R1K\",10\r\n\"E10000019\",\"Lincolnshire\",\"RQM\",14\r\n\"E10000019\",\"Lincolnshire\",\"RVR\",4\r\n\"E10000019\",\"Lincolnshire\",\"RW6\",4\r\n\"E10000019\",\"Lincolnshire\",\"RXR\",3\r\n\"E10000019\",\"Lincolnshire\",\"RJR\",6\r\n\"E10000019\",\"Lincolnshire\",\"RXK\",4\r\n\"E10000019\",\"Lincolnshire\",\"RLQ\",2\r\n\"E10000019\",\"Lincolnshire\",\"RBA\",8\r\n\"E10000019\",\"Lincolnshire\",\"RMP\",4\r\n\"E10000019\",\"Lincolnshire\",\"RR7\",2\r\n\"E10000019\",\"Lincolnshire\",\"RBS\",2\r\n\"E10000019\",\"Lincolnshire\",\"RF4\",6\r\n\"E10000019\",\"Lincolnshire\",\"RX4\",2\r\n\"E10000019\",\"Lincolnshire\",\"RBD\",4\r\n\"E10000019\",\"Lincolnshire\",\"RRF\",4\r\n\"E10000019\",\"Lincolnshire\",\"RBN\",4\r\n\"E10000019\",\"Lincolnshire\",\"RD3\",6\r\n\"E10000019\",\"Lincolnshire\",\"RXC\",5\r\n\"E10000019\",\"Lincolnshire\",\"RMY\",1\r\n\"E10000019\",\"Lincolnshire\",\"RRJ\",2\r\n\"E10000019\",\"Lincolnshire\",\"RQX\",2\r\n\"E10000019\",\"Lincolnshire\",\"RT1\",1\r\n\"E10000019\",\"Lincolnshire\",\"RX3\",1\r\n\"E10000019\",\"Lincolnshire\",\"RVY\",1\r\n\"E10000019\",\"Lincolnshire\",\"RXM\",1\r\n\"E10000020\",\"Norfolk\",\"RM1\",54327\r\n\"E10000020\",\"Norfolk\",\"RGR\",3641\r\n\"E10000020\",\"Norfolk\",\"RCX\",26178\r\n\"E10000020\",\"Norfolk\",\"RGT\",1076\r\n\"E10000020\",\"Norfolk\",\"RMY\",1113\r\n\"E10000020\",\"Norfolk\",\"RDE\",163\r\n\"E10000020\",\"Norfolk\",\"RGP\",12675\r\n\"E10000020\",\"Norfolk\",\"RGM\",81\r\n\"E10000020\",\"Norfolk\",\"RQ8\",69\r\n\"E10000020\",\"Norfolk\",\"RYJ\",42\r\n\"E10000020\",\"Norfolk\",\"RJZ\",20\r\n\"E10000020\",\"Norfolk\",\"RWD\",45\r\n\"E10000020\",\"Norfolk\",\"RVV\",15\r\n\"E10000020\",\"Norfolk\",\"RQW\",20\r\n\"E10000020\",\"Norfolk\",\"RGN\",116\r\n\"E10000020\",\"Norfolk\",\"RY3\",82\r\n\"E10000020\",\"Norfolk\",\"RF4\",16\r\n\"E10000020\",\"Norfolk\",\"RX1\",30\r\n\"E10000020\",\"Norfolk\",\"RJE\",6\r\n\"E10000020\",\"Norfolk\",\"RP6\",8\r\n\"E10000020\",\"Norfolk\",\"RWP\",8\r\n\"E10000020\",\"Norfolk\",\"R1H\",69\r\n\"E10000020\",\"Norfolk\",\"RAL\",20\r\n\"E10000020\",\"Norfolk\",\"RC9\",18\r\n\"E10000020\",\"Norfolk\",\"RDU\",20\r\n\"E10000020\",\"Norfolk\",\"R1F\",8\r\n\"E10000020\",\"Norfolk\",\"RDZ\",5\r\n\"E10000020\",\"Norfolk\",\"R1K\",20\r\n\"E10000020\",\"Norfolk\",\"RCB\",20\r\n\"E10000020\",\"Norfolk\",\"RJ1\",31\r\n\"E10000020\",\"Norfolk\",\"RR8\",10\r\n\"E10000020\",\"Norfolk\",\"RTH\",33\r\n\"E10000020\",\"Norfolk\",\"RT3\",6\r\n\"E10000020\",\"Norfolk\",\"RJL\",8\r\n\"E10000020\",\"Norfolk\",\"RBZ\",13\r\n\"E10000020\",\"Norfolk\",\"REF\",18\r\n\"E10000020\",\"Norfolk\",\"RTE\",11\r\n\"E10000020\",\"Norfolk\",\"RTF\",8\r\n\"E10000020\",\"Norfolk\",\"RWG\",11\r\n\"E10000020\",\"Norfolk\",\"RHM\",13\r\n\"E10000020\",\"Norfolk\",\"RWA\",8\r\n\"E10000020\",\"Norfolk\",\"RDD\",19\r\n\"E10000020\",\"Norfolk\",\"R0A\",13\r\n\"E10000020\",\"Norfolk\",\"RD8\",16\r\n\"E10000020\",\"Norfolk\",\"RNQ\",10\r\n\"E10000020\",\"Norfolk\",\"RHQ\",14\r\n\"E10000020\",\"Norfolk\",\"RKB\",13\r\n\"E10000020\",\"Norfolk\",\"RA2\",9\r\n\"E10000020\",\"Norfolk\",\"RBA\",6\r\n\"E10000020\",\"Norfolk\",\"RC1\",18\r\n\"E10000020\",\"Norfolk\",\"RTX\",14\r\n\"E10000020\",\"Norfolk\",\"RWH\",22\r\n\"E10000020\",\"Norfolk\",\"RAJ\",9\r\n\"E10000020\",\"Norfolk\",\"RLQ\",7\r\n\"E10000020\",\"Norfolk\",\"RXF\",6\r\n\"E10000020\",\"Norfolk\",\"RXQ\",19\r\n\"E10000020\",\"Norfolk\",\"RBT\",5\r\n\"E10000020\",\"Norfolk\",\"RL4\",3\r\n\"E10000020\",\"Norfolk\",\"RT1\",2\r\n\"E10000020\",\"Norfolk\",\"RVR\",5\r\n\"E10000020\",\"Norfolk\",\"RXT\",1\r\n\"E10000020\",\"Norfolk\",\"RBK\",2\r\n\"E10000020\",\"Norfolk\",\"RJ2\",9\r\n\"E10000020\",\"Norfolk\",\"RLT\",2\r\n\"E10000020\",\"Norfolk\",\"RPA\",11\r\n\"E10000020\",\"Norfolk\",\"RBD\",6\r\n\"E10000020\",\"Norfolk\",\"RCD\",4\r\n\"E10000020\",\"Norfolk\",\"RHW\",8\r\n\"E10000020\",\"Norfolk\",\"RN3\",8\r\n\"E10000020\",\"Norfolk\",\"RP4\",11\r\n\"E10000020\",\"Norfolk\",\"RTR\",8\r\n\"E10000020\",\"Norfolk\",\"RWF\",14\r\n\"E10000020\",\"Norfolk\",\"RHU\",6\r\n\"E10000020\",\"Norfolk\",\"RNS\",11\r\n\"E10000020\",\"Norfolk\",\"RR7\",3\r\n\"E10000020\",\"Norfolk\",\"RRV\",33\r\n\"E10000020\",\"Norfolk\",\"RVY\",1\r\n\"E10000020\",\"Norfolk\",\"RH8\",4\r\n\"E10000020\",\"Norfolk\",\"RQX\",15\r\n\"E10000020\",\"Norfolk\",\"RRK\",21\r\n\"E10000020\",\"Norfolk\",\"RXC\",7\r\n\"E10000020\",\"Norfolk\",\"RXL\",3\r\n\"E10000020\",\"Norfolk\",\"RYR\",8\r\n\"E10000020\",\"Norfolk\",\"RAS\",6\r\n\"E10000020\",\"Norfolk\",\"RCU\",1\r\n\"E10000020\",\"Norfolk\",\"RFS\",6\r\n\"E10000020\",\"Norfolk\",\"RJ7\",8\r\n\"E10000020\",\"Norfolk\",\"RJC\",2\r\n\"E10000020\",\"Norfolk\",\"RK5\",5\r\n\"E10000020\",\"Norfolk\",\"RN5\",9\r\n\"E10000020\",\"Norfolk\",\"RNZ\",4\r\n\"E10000020\",\"Norfolk\",\"REM\",7\r\n\"E10000020\",\"Norfolk\",\"RRF\",3\r\n\"E10000020\",\"Norfolk\",\"RTK\",5\r\n\"E10000020\",\"Norfolk\",\"RVJ\",9\r\n\"E10000020\",\"Norfolk\",\"RWE\",17\r\n\"E10000020\",\"Norfolk\",\"RAP\",5\r\n\"E10000020\",\"Norfolk\",\"RP5\",4\r\n\"E10000020\",\"Norfolk\",\"RTP\",8\r\n\"E10000020\",\"Norfolk\",\"RXH\",14\r\n\"E10000020\",\"Norfolk\",\"RQM\",26\r\n\"E10000020\",\"Norfolk\",\"RNL\",8\r\n\"E10000020\",\"Norfolk\",\"RN7\",7\r\n\"E10000020\",\"Norfolk\",\"RK9\",7\r\n\"E10000020\",\"Norfolk\",\"RA9\",5\r\n\"E10000020\",\"Norfolk\",\"RTG\",15\r\n\"E10000020\",\"Norfolk\",\"RA3\",2\r\n\"E10000020\",\"Norfolk\",\"RXP\",7\r\n\"E10000020\",\"Norfolk\",\"RXW\",12\r\n\"E10000020\",\"Norfolk\",\"RAE\",2\r\n\"E10000020\",\"Norfolk\",\"RTD\",4\r\n\"E10000020\",\"Norfolk\",\"RAX\",7\r\n\"E10000020\",\"Norfolk\",\"RET\",1\r\n\"E10000020\",\"Norfolk\",\"RNA\",4\r\n\"E10000020\",\"Norfolk\",\"RA7\",4\r\n\"E10000020\",\"Norfolk\",\"RPY\",7\r\n\"E10000020\",\"Norfolk\",\"RAN\",4\r\n\"E10000020\",\"Norfolk\",\"RD3\",3\r\n\"E10000020\",\"Norfolk\",\"RX3\",1\r\n\"E10000020\",\"Norfolk\",\"NAX\",24\r\n\"E10000020\",\"Norfolk\",\"RD1\",5\r\n\"E10000020\",\"Norfolk\",\"RXN\",4\r\n\"E10000020\",\"Norfolk\",\"R1L\",4\r\n\"E10000020\",\"Norfolk\",\"R0B\",5\r\n\"E10000020\",\"Norfolk\",\"RBS\",2\r\n\"E10000020\",\"Norfolk\",\"RJ6\",3\r\n\"E10000020\",\"Norfolk\",\"RBL\",3\r\n\"E10000020\",\"Norfolk\",\"RMC\",3\r\n\"E10000020\",\"Norfolk\",\"RW6\",3\r\n\"E10000020\",\"Norfolk\",\"RFF\",3\r\n\"E10000020\",\"Norfolk\",\"RJR\",3\r\n\"E10000020\",\"Norfolk\",\"RCF\",5\r\n\"E10000020\",\"Norfolk\",\"RWR\",2\r\n\"E10000020\",\"Norfolk\",\"RFR\",1\r\n\"E10000020\",\"Norfolk\",\"RWK\",2\r\n\"E10000020\",\"Norfolk\",\"RBN\",1\r\n\"E10000020\",\"Norfolk\",\"RWW\",2\r\n\"E10000020\",\"Norfolk\",\"RQ3\",1\r\n\"E10000020\",\"Norfolk\",\"RYV\",1\r\n\"E10000020\",\"Norfolk\",\"RM3\",1\r\n\"E10000020\",\"Norfolk\",\"RWY\",1\r\n\"E10000020\",\"Norfolk\",\"RXY\",1\r\n\"E10000020\",\"Norfolk\",\"RBQ\",1\r\n\"E10000020\",\"Norfolk\",\"RT5\",4\r\n\"E10000020\",\"Norfolk\",\"RJN\",1\r\n\"E10000020\",\"Norfolk\",\"RXE\",1\r\n\"E10000020\",\"Norfolk\",\"RXR\",2\r\n\"E10000020\",\"Norfolk\",\"RXX\",1\r\n\"E10000020\",\"Norfolk\",\"RVW\",2\r\n\"E10000020\",\"Norfolk\",\"RV9\",1\r\n\"E10000020\",\"Norfolk\",\"RWJ\",3\r\n\"E10000020\",\"Norfolk\",\"RXK\",3\r\n\"E10000021\",\"Northamptonshire\",\"RNQ\",33459\r\n\"E10000021\",\"Northamptonshire\",\"RNS\",46672\r\n\"E10000021\",\"Northamptonshire\",\"RWE\",1121\r\n\"E10000021\",\"Northamptonshire\",\"RP1\",772\r\n\"E10000021\",\"Northamptonshire\",\"RKB\",1172\r\n\"E10000021\",\"Northamptonshire\",\"RGN\",1126\r\n\"E10000021\",\"Northamptonshire\",\"RTH\",3939\r\n\"E10000021\",\"Northamptonshire\",\"RX1\",92\r\n\"E10000021\",\"Northamptonshire\",\"RGT\",104\r\n\"E10000021\",\"Northamptonshire\",\"RD8\",1386\r\n\"E10000021\",\"Northamptonshire\",\"RWD\",55\r\n\"E10000021\",\"Northamptonshire\",\"RCX\",33\r\n\"E10000021\",\"Northamptonshire\",\"RT5\",33\r\n\"E10000021\",\"Northamptonshire\",\"RQ3\",43\r\n\"E10000021\",\"Northamptonshire\",\"RC9\",82\r\n\"E10000021\",\"Northamptonshire\",\"RGP\",31\r\n\"E10000021\",\"Northamptonshire\",\"REF\",30\r\n\"E10000021\",\"Northamptonshire\",\"RJZ\",15\r\n\"E10000021\",\"Northamptonshire\",\"RGM\",16\r\n\"E10000021\",\"Northamptonshire\",\"RAL\",34\r\n\"E10000021\",\"Northamptonshire\",\"RCB\",25\r\n\"E10000021\",\"Northamptonshire\",\"RDE\",14\r\n\"E10000021\",\"Northamptonshire\",\"RJ7\",16\r\n\"E10000021\",\"Northamptonshire\",\"RBA\",10\r\n\"E10000021\",\"Northamptonshire\",\"RRK\",73\r\n\"E10000021\",\"Northamptonshire\",\"RD3\",17\r\n\"E10000021\",\"Northamptonshire\",\"RDZ\",24\r\n\"E10000021\",\"Northamptonshire\",\"RTG\",16\r\n\"E10000021\",\"Northamptonshire\",\"R1K\",15\r\n\"E10000021\",\"Northamptonshire\",\"RK9\",18\r\n\"E10000021\",\"Northamptonshire\",\"RC1\",188\r\n\"E10000021\",\"Northamptonshire\",\"RTE\",13\r\n\"E10000021\",\"Northamptonshire\",\"RA7\",6\r\n\"E10000021\",\"Northamptonshire\",\"RW5\",3\r\n\"E10000021\",\"Northamptonshire\",\"RWG\",27\r\n\"E10000021\",\"Northamptonshire\",\"RAP\",9\r\n\"E10000021\",\"Northamptonshire\",\"RCD\",9\r\n\"E10000021\",\"Northamptonshire\",\"RCU\",7\r\n\"E10000021\",\"Northamptonshire\",\"RD1\",11\r\n\"E10000021\",\"Northamptonshire\",\"RJ1\",26\r\n\"E10000021\",\"Northamptonshire\",\"RP5\",7\r\n\"E10000021\",\"Northamptonshire\",\"REM\",10\r\n\"E10000021\",\"Northamptonshire\",\"RVN\",1\r\n\"E10000021\",\"Northamptonshire\",\"RWA\",8\r\n\"E10000021\",\"Northamptonshire\",\"RXQ\",100\r\n\"E10000021\",\"Northamptonshire\",\"RYJ\",16\r\n\"E10000021\",\"Northamptonshire\",\"RDU\",20\r\n\"E10000021\",\"Northamptonshire\",\"RWY\",5\r\n\"E10000021\",\"Northamptonshire\",\"RBD\",13\r\n\"E10000021\",\"Northamptonshire\",\"RM1\",28\r\n\"E10000021\",\"Northamptonshire\",\"RAX\",6\r\n\"E10000021\",\"Northamptonshire\",\"RBN\",2\r\n\"E10000021\",\"Northamptonshire\",\"RXC\",8\r\n\"E10000021\",\"Northamptonshire\",\"RJ6\",2\r\n\"E10000021\",\"Northamptonshire\",\"RWH\",26\r\n\"E10000021\",\"Northamptonshire\",\"R1L\",3\r\n\"E10000021\",\"Northamptonshire\",\"RJ2\",6\r\n\"E10000021\",\"Northamptonshire\",\"RJL\",6\r\n\"E10000021\",\"Northamptonshire\",\"RK5\",9\r\n\"E10000021\",\"Northamptonshire\",\"RNA\",7\r\n\"E10000021\",\"Northamptonshire\",\"RRV\",29\r\n\"E10000021\",\"Northamptonshire\",\"RWF\",6\r\n\"E10000021\",\"Northamptonshire\",\"RAN\",4\r\n\"E10000021\",\"Northamptonshire\",\"RN5\",11\r\n\"E10000021\",\"Northamptonshire\",\"RTX\",12\r\n\"E10000021\",\"Northamptonshire\",\"RVV\",11\r\n\"E10000021\",\"Northamptonshire\",\"RFR\",1\r\n\"E10000021\",\"Northamptonshire\",\"RHQ\",6\r\n\"E10000021\",\"Northamptonshire\",\"RTK\",12\r\n\"E10000021\",\"Northamptonshire\",\"RTR\",5\r\n\"E10000021\",\"Northamptonshire\",\"RWK\",11\r\n\"E10000021\",\"Northamptonshire\",\"RJC\",43\r\n\"E10000021\",\"Northamptonshire\",\"RYG\",7\r\n\"E10000021\",\"Northamptonshire\",\"RT3\",24\r\n\"E10000021\",\"Northamptonshire\",\"R0A\",16\r\n\"E10000021\",\"Northamptonshire\",\"RNU\",19\r\n\"E10000021\",\"Northamptonshire\",\"RV3\",23\r\n\"E10000021\",\"Northamptonshire\",\"RWP\",16\r\n\"E10000021\",\"Northamptonshire\",\"RA9\",19\r\n\"E10000021\",\"Northamptonshire\",\"RN7\",7\r\n\"E10000021\",\"Northamptonshire\",\"TAJ\",4\r\n\"E10000021\",\"Northamptonshire\",\"RJE\",13\r\n\"E10000021\",\"Northamptonshire\",\"RXK\",19\r\n\"E10000021\",\"Northamptonshire\",\"RAS\",8\r\n\"E10000021\",\"Northamptonshire\",\"RBK\",6\r\n\"E10000021\",\"Northamptonshire\",\"RLT\",9\r\n\"E10000021\",\"Northamptonshire\",\"RQX\",10\r\n\"E10000021\",\"Northamptonshire\",\"RL4\",8\r\n\"E10000021\",\"Northamptonshire\",\"RTF\",7\r\n\"E10000021\",\"Northamptonshire\",\"RXH\",13\r\n\"E10000021\",\"Northamptonshire\",\"RXP\",6\r\n\"E10000021\",\"Northamptonshire\",\"RQW\",9\r\n\"E10000021\",\"Northamptonshire\",\"RYR\",12\r\n\"E10000021\",\"Northamptonshire\",\"RHW\",9\r\n\"E10000021\",\"Northamptonshire\",\"RTD\",2\r\n\"E10000021\",\"Northamptonshire\",\"R1H\",34\r\n\"E10000021\",\"Northamptonshire\",\"RP4\",4\r\n\"E10000021\",\"Northamptonshire\",\"RHU\",4\r\n\"E10000021\",\"Northamptonshire\",\"RXL\",8\r\n\"E10000021\",\"Northamptonshire\",\"RXN\",5\r\n\"E10000021\",\"Northamptonshire\",\"RXW\",7\r\n\"E10000021\",\"Northamptonshire\",\"RA4\",3\r\n\"E10000021\",\"Northamptonshire\",\"RCF\",5\r\n\"E10000021\",\"Northamptonshire\",\"RHM\",16\r\n\"E10000021\",\"Northamptonshire\",\"RGR\",11\r\n\"E10000021\",\"Northamptonshire\",\"RJN\",1\r\n\"E10000021\",\"Northamptonshire\",\"RMP\",1\r\n\"E10000021\",\"Northamptonshire\",\"RNZ\",6\r\n\"E10000021\",\"Northamptonshire\",\"RPY\",3\r\n\"E10000021\",\"Northamptonshire\",\"RTP\",8\r\n\"E10000021\",\"Northamptonshire\",\"RH8\",8\r\n\"E10000021\",\"Northamptonshire\",\"RMC\",3\r\n\"E10000021\",\"Northamptonshire\",\"RPA\",3\r\n\"E10000021\",\"Northamptonshire\",\"RR8\",7\r\n\"E10000021\",\"Northamptonshire\",\"RVJ\",7\r\n\"E10000021\",\"Northamptonshire\",\"RW4\",1\r\n\"E10000021\",\"Northamptonshire\",\"RYV\",24\r\n\"E10000021\",\"Northamptonshire\",\"RPC\",6\r\n\"E10000021\",\"Northamptonshire\",\"R1F\",9\r\n\"E10000021\",\"Northamptonshire\",\"RQM\",23\r\n\"E10000021\",\"Northamptonshire\",\"RBZ\",8\r\n\"E10000021\",\"Northamptonshire\",\"RVR\",11\r\n\"E10000021\",\"Northamptonshire\",\"RDD\",6\r\n\"E10000021\",\"Northamptonshire\",\"RQ8\",9\r\n\"E10000021\",\"Northamptonshire\",\"RBT\",7\r\n\"E10000021\",\"Northamptonshire\",\"RBQ\",1\r\n\"E10000021\",\"Northamptonshire\",\"RN3\",4\r\n\"E10000021\",\"Northamptonshire\",\"RNL\",2\r\n\"E10000021\",\"Northamptonshire\",\"RW6\",4\r\n\"E10000021\",\"Northamptonshire\",\"RXF\",6\r\n\"E10000021\",\"Northamptonshire\",\"RXY\",2\r\n\"E10000021\",\"Northamptonshire\",\"RAJ\",6\r\n\"E10000021\",\"Northamptonshire\",\"RT1\",1\r\n\"E10000021\",\"Northamptonshire\",\"RLY\",1\r\n\"E10000021\",\"Northamptonshire\",\"RP7\",2\r\n\"E10000021\",\"Northamptonshire\",\"RXE\",3\r\n\"E10000021\",\"Northamptonshire\",\"RWW\",3\r\n\"E10000021\",\"Northamptonshire\",\"RA2\",5\r\n\"E10000021\",\"Northamptonshire\",\"R0B\",6\r\n\"E10000021\",\"Northamptonshire\",\"RWJ\",4\r\n\"E10000021\",\"Northamptonshire\",\"RXR\",2\r\n\"E10000021\",\"Northamptonshire\",\"RAE\",4\r\n\"E10000021\",\"Northamptonshire\",\"RJR\",3\r\n\"E10000021\",\"Northamptonshire\",\"RWX\",6\r\n\"E10000021\",\"Northamptonshire\",\"RFS\",4\r\n\"E10000021\",\"Northamptonshire\",\"RLQ\",5\r\n\"E10000021\",\"Northamptonshire\",\"RP6\",6\r\n\"E10000021\",\"Northamptonshire\",\"RF4\",3\r\n\"E10000021\",\"Northamptonshire\",\"RBL\",3\r\n\"E10000021\",\"Northamptonshire\",\"RVY\",2\r\n\"E10000021\",\"Northamptonshire\",\"RRE\",1\r\n\"E10000021\",\"Northamptonshire\",\"RVW\",1\r\n\"E10000021\",\"Northamptonshire\",\"RM3\",1\r\n\"E10000021\",\"Northamptonshire\",\"RMY\",2\r\n\"E10000021\",\"Northamptonshire\",\"RKE\",1\r\n\"E10000021\",\"Northamptonshire\",\"RR7\",2\r\n\"E10000021\",\"Northamptonshire\",\"RTQ\",1\r\n\"E10000021\",\"Northamptonshire\",\"RHA\",3\r\n\"E10000021\",\"Northamptonshire\",\"RA3\",2\r\n\"E10000021\",\"Northamptonshire\",\"RXM\",1\r\n\"E10000021\",\"Northamptonshire\",\"RRF\",1\r\n\"E10000023\",\"North Yorkshire\",\"RCF\",5187\r\n\"E10000023\",\"North Yorkshire\",\"RTX\",653\r\n\"E10000023\",\"North Yorkshire\",\"RAE\",436\r\n\"E10000023\",\"North Yorkshire\",\"RR8\",1717\r\n\"E10000023\",\"North Yorkshire\",\"TAD\",37\r\n\"E10000023\",\"North Yorkshire\",\"RCD\",16016\r\n\"E10000023\",\"North Yorkshire\",\"RXN\",32\r\n\"E10000023\",\"North Yorkshire\",\"RXR\",25\r\n\"E10000023\",\"North Yorkshire\",\"RTD\",178\r\n\"E10000023\",\"North Yorkshire\",\"RWY\",27\r\n\"E10000023\",\"North Yorkshire\",\"RXL\",23\r\n\"E10000023\",\"North Yorkshire\",\"RNL\",25\r\n\"E10000023\",\"North Yorkshire\",\"RXF\",1017\r\n\"E10000023\",\"North Yorkshire\",\"RTR\",11715\r\n\"E10000023\",\"North Yorkshire\",\"R0A\",33\r\n\"E10000023\",\"North Yorkshire\",\"RRK\",23\r\n\"E10000023\",\"North Yorkshire\",\"RCB\",28217\r\n\"E10000023\",\"North Yorkshire\",\"REM\",24\r\n\"E10000023\",\"North Yorkshire\",\"RBD\",5\r\n\"E10000023\",\"North Yorkshire\",\"RJE\",7\r\n\"E10000023\",\"North Yorkshire\",\"RJ1\",13\r\n\"E10000023\",\"North Yorkshire\",\"RK9\",7\r\n\"E10000023\",\"North Yorkshire\",\"RHQ\",48\r\n\"E10000023\",\"North Yorkshire\",\"RBV\",6\r\n\"E10000023\",\"North Yorkshire\",\"RJC\",6\r\n\"E10000023\",\"North Yorkshire\",\"RTF\",38\r\n\"E10000023\",\"North Yorkshire\",\"RVY\",7\r\n\"E10000023\",\"North Yorkshire\",\"RCU\",13\r\n\"E10000023\",\"North Yorkshire\",\"RDU\",17\r\n\"E10000023\",\"North Yorkshire\",\"RP5\",145\r\n\"E10000023\",\"North Yorkshire\",\"RX3\",644\r\n\"E10000023\",\"North Yorkshire\",\"RBS\",2\r\n\"E10000023\",\"North Yorkshire\",\"RTG\",18\r\n\"E10000023\",\"North Yorkshire\",\"RAX\",2\r\n\"E10000023\",\"North Yorkshire\",\"RFR\",5\r\n\"E10000023\",\"North Yorkshire\",\"RJR\",6\r\n\"E10000023\",\"North Yorkshire\",\"RQ8\",4\r\n\"E10000023\",\"North Yorkshire\",\"RRV\",9\r\n\"E10000023\",\"North Yorkshire\",\"RJL\",62\r\n\"E10000023\",\"North Yorkshire\",\"RXW\",9\r\n\"E10000023\",\"North Yorkshire\",\"RAL\",7\r\n\"E10000023\",\"North Yorkshire\",\"RC9\",6\r\n\"E10000023\",\"North Yorkshire\",\"RFS\",9\r\n\"E10000023\",\"North Yorkshire\",\"RWH\",7\r\n\"E10000023\",\"North Yorkshire\",\"RD3\",6\r\n\"E10000023\",\"North Yorkshire\",\"REF\",23\r\n\"E10000023\",\"North Yorkshire\",\"RGP\",3\r\n\"E10000023\",\"North Yorkshire\",\"RM3\",10\r\n\"E10000023\",\"North Yorkshire\",\"RNN\",1\r\n\"E10000023\",\"North Yorkshire\",\"RWA\",780\r\n\"E10000023\",\"North Yorkshire\",\"RXQ\",7\r\n\"E10000023\",\"North Yorkshire\",\"RYJ\",14\r\n\"E10000023\",\"North Yorkshire\",\"RX1\",11\r\n\"E10000023\",\"North Yorkshire\",\"RA9\",10\r\n\"E10000023\",\"North Yorkshire\",\"RJZ\",5\r\n\"E10000023\",\"North Yorkshire\",\"RDZ\",3\r\n\"E10000023\",\"North Yorkshire\",\"RN5\",3\r\n\"E10000023\",\"North Yorkshire\",\"RXP\",2017\r\n\"E10000023\",\"North Yorkshire\",\"RVW\",91\r\n\"E10000023\",\"North Yorkshire\",\"RW6\",10\r\n\"E10000023\",\"North Yorkshire\",\"RTH\",17\r\n\"E10000023\",\"North Yorkshire\",\"RK5\",13\r\n\"E10000023\",\"North Yorkshire\",\"RGT\",11\r\n\"E10000023\",\"North Yorkshire\",\"RTP\",4\r\n\"E10000023\",\"North Yorkshire\",\"RWD\",23\r\n\"E10000023\",\"North Yorkshire\",\"RWJ\",6\r\n\"E10000023\",\"North Yorkshire\",\"R0B\",20\r\n\"E10000023\",\"North Yorkshire\",\"RWF\",11\r\n\"E10000023\",\"North Yorkshire\",\"RBT\",5\r\n\"E10000023\",\"North Yorkshire\",\"RHW\",2\r\n\"E10000023\",\"North Yorkshire\",\"RNS\",2\r\n\"E10000023\",\"North Yorkshire\",\"RNZ\",13\r\n\"E10000023\",\"North Yorkshire\",\"RA7\",4\r\n\"E10000023\",\"North Yorkshire\",\"RHU\",3\r\n\"E10000023\",\"North Yorkshire\",\"RN7\",1\r\n\"E10000023\",\"North Yorkshire\",\"RQ3\",1\r\n\"E10000023\",\"North Yorkshire\",\"RV9\",261\r\n\"E10000023\",\"North Yorkshire\",\"RD1\",7\r\n\"E10000023\",\"North Yorkshire\",\"RWP\",1\r\n\"E10000023\",\"North Yorkshire\",\"R1K\",8\r\n\"E10000023\",\"North Yorkshire\",\"RAS\",5\r\n\"E10000023\",\"North Yorkshire\",\"RCX\",5\r\n\"E10000023\",\"North Yorkshire\",\"RDD\",1\r\n\"E10000023\",\"North Yorkshire\",\"RFF\",20\r\n\"E10000023\",\"North Yorkshire\",\"RGN\",6\r\n\"E10000023\",\"North Yorkshire\",\"RGR\",5\r\n\"E10000023\",\"North Yorkshire\",\"RHM\",8\r\n\"E10000023\",\"North Yorkshire\",\"RKB\",8\r\n\"E10000023\",\"North Yorkshire\",\"RQM\",7\r\n\"E10000023\",\"North Yorkshire\",\"RVJ\",4\r\n\"E10000023\",\"North Yorkshire\",\"RXH\",7\r\n\"E10000023\",\"North Yorkshire\",\"RA2\",10\r\n\"E10000023\",\"North Yorkshire\",\"RBL\",5\r\n\"E10000023\",\"North Yorkshire\",\"RBZ\",2\r\n\"E10000023\",\"North Yorkshire\",\"RGD\",6\r\n\"E10000023\",\"North Yorkshire\",\"RJ2\",4\r\n\"E10000023\",\"North Yorkshire\",\"RJ6\",4\r\n\"E10000023\",\"North Yorkshire\",\"RXK\",5\r\n\"E10000023\",\"North Yorkshire\",\"R1H\",9\r\n\"E10000023\",\"North Yorkshire\",\"RDE\",9\r\n\"E10000023\",\"North Yorkshire\",\"RH8\",7\r\n\"E10000023\",\"North Yorkshire\",\"RMP\",3\r\n\"E10000023\",\"North Yorkshire\",\"RBA\",3\r\n\"E10000023\",\"North Yorkshire\",\"RJ7\",7\r\n\"E10000023\",\"North Yorkshire\",\"RVV\",4\r\n\"E10000023\",\"North Yorkshire\",\"RA4\",2\r\n\"E10000023\",\"North Yorkshire\",\"RQX\",3\r\n\"E10000023\",\"North Yorkshire\",\"RTV\",2\r\n\"E10000023\",\"North Yorkshire\",\"RKE\",2\r\n\"E10000023\",\"North Yorkshire\",\"RN3\",2\r\n\"E10000023\",\"North Yorkshire\",\"RBN\",5\r\n\"E10000023\",\"North Yorkshire\",\"RMC\",3\r\n\"E10000023\",\"North Yorkshire\",\"RBQ\",1\r\n\"E10000023\",\"North Yorkshire\",\"RC1\",1\r\n\"E10000023\",\"North Yorkshire\",\"RWG\",1\r\n\"E10000023\",\"North Yorkshire\",\"RX4\",2\r\n\"E10000023\",\"North Yorkshire\",\"RXC\",2\r\n\"E10000023\",\"North Yorkshire\",\"RPA\",3\r\n\"E10000023\",\"North Yorkshire\",\"RWW\",2\r\n\"E10000023\",\"North Yorkshire\",\"RL4\",1\r\n\"E10000023\",\"North Yorkshire\",\"RD8\",6\r\n\"E10000023\",\"North Yorkshire\",\"REP\",1\r\n\"E10000023\",\"North Yorkshire\",\"RWE\",5\r\n\"E10000023\",\"North Yorkshire\",\"RXE\",2\r\n\"E10000023\",\"North Yorkshire\",\"RTE\",4\r\n\"E10000023\",\"North Yorkshire\",\"RP7\",2\r\n\"E10000023\",\"North Yorkshire\",\"RR7\",1\r\n\"E10000023\",\"North Yorkshire\",\"RRF\",4\r\n\"E10000023\",\"North Yorkshire\",\"RM1\",6\r\n\"E10000023\",\"North Yorkshire\",\"RLQ\",4\r\n\"E10000023\",\"North Yorkshire\",\"RNQ\",3\r\n\"E10000023\",\"North Yorkshire\",\"RA3\",1\r\n\"E10000023\",\"North Yorkshire\",\"RP6\",2\r\n\"E10000023\",\"North Yorkshire\",\"RBK\",1\r\n\"E10000023\",\"North Yorkshire\",\"RNA\",2\r\n\"E10000023\",\"North Yorkshire\",\"R1F\",3\r\n\"E10000023\",\"North Yorkshire\",\"RTK\",1\r\n\"E10000023\",\"North Yorkshire\",\"RV5\",1\r\n\"E10000023\",\"North Yorkshire\",\"RGM\",4\r\n\"E10000023\",\"North Yorkshire\",\"RXG\",4\r\n\"E10000023\",\"North Yorkshire\",\"RYR\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RK5\",33362\r\n\"E10000024\",\"Nottinghamshire\",\"RX1\",38883\r\n\"E10000024\",\"Nottinghamshire\",\"RTG\",501\r\n\"E10000024\",\"Nottinghamshire\",\"RHA\",553\r\n\"E10000024\",\"Nottinghamshire\",\"RFS\",212\r\n\"E10000024\",\"Nottinghamshire\",\"RWD\",1127\r\n\"E10000024\",\"Nottinghamshire\",\"RWE\",203\r\n\"E10000024\",\"Nottinghamshire\",\"RCU\",164\r\n\"E10000024\",\"Nottinghamshire\",\"RHQ\",735\r\n\"E10000024\",\"Nottinghamshire\",\"R0A\",33\r\n\"E10000024\",\"Nottinghamshire\",\"RP5\",13266\r\n\"E10000024\",\"Nottinghamshire\",\"RRK\",48\r\n\"E10000024\",\"Nottinghamshire\",\"RCB\",65\r\n\"E10000024\",\"Nottinghamshire\",\"RQ3\",12\r\n\"E10000024\",\"Nottinghamshire\",\"RGT\",44\r\n\"E10000024\",\"Nottinghamshire\",\"RJC\",12\r\n\"E10000024\",\"Nottinghamshire\",\"RQX\",7\r\n\"E10000024\",\"Nottinghamshire\",\"RFR\",84\r\n\"E10000024\",\"Nottinghamshire\",\"RM3\",6\r\n\"E10000024\",\"Nottinghamshire\",\"REF\",40\r\n\"E10000024\",\"Nottinghamshire\",\"RWG\",11\r\n\"E10000024\",\"Nottinghamshire\",\"RCX\",24\r\n\"E10000024\",\"Nottinghamshire\",\"RRF\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RH8\",17\r\n\"E10000024\",\"Nottinghamshire\",\"RTD\",26\r\n\"E10000024\",\"Nottinghamshire\",\"RGP\",28\r\n\"E10000024\",\"Nottinghamshire\",\"R1H\",13\r\n\"E10000024\",\"Nottinghamshire\",\"RBD\",6\r\n\"E10000024\",\"Nottinghamshire\",\"RTH\",20\r\n\"E10000024\",\"Nottinghamshire\",\"RXF\",14\r\n\"E10000024\",\"Nottinghamshire\",\"RCD\",12\r\n\"E10000024\",\"Nottinghamshire\",\"RM1\",31\r\n\"E10000024\",\"Nottinghamshire\",\"RAS\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RDU\",14\r\n\"E10000024\",\"Nottinghamshire\",\"RTE\",8\r\n\"E10000024\",\"Nottinghamshire\",\"R1F\",12\r\n\"E10000024\",\"Nottinghamshire\",\"REM\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RHM\",7\r\n\"E10000024\",\"Nottinghamshire\",\"RJL\",54\r\n\"E10000024\",\"Nottinghamshire\",\"RKB\",28\r\n\"E10000024\",\"Nottinghamshire\",\"RTX\",6\r\n\"E10000024\",\"Nottinghamshire\",\"RVR\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RJE\",15\r\n\"E10000024\",\"Nottinghamshire\",\"RBT\",13\r\n\"E10000024\",\"Nottinghamshire\",\"RA2\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RC9\",11\r\n\"E10000024\",\"Nottinghamshire\",\"RK9\",14\r\n\"E10000024\",\"Nottinghamshire\",\"RXC\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RJR\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RR8\",38\r\n\"E10000024\",\"Nottinghamshire\",\"RJ6\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RPC\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RVV\",7\r\n\"E10000024\",\"Nottinghamshire\",\"RXK\",20\r\n\"E10000024\",\"Nottinghamshire\",\"RD1\",18\r\n\"E10000024\",\"Nottinghamshire\",\"RGM\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RL4\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RP1\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RVY\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RAJ\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RBK\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RDZ\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RGN\",31\r\n\"E10000024\",\"Nottinghamshire\",\"RNZ\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RTF\",16\r\n\"E10000024\",\"Nottinghamshire\",\"RY8\",12\r\n\"E10000024\",\"Nottinghamshire\",\"R0B\",7\r\n\"E10000024\",\"Nottinghamshire\",\"RT5\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RVW\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RWA\",23\r\n\"E10000024\",\"Nottinghamshire\",\"RXL\",11\r\n\"E10000024\",\"Nottinghamshire\",\"RYR\",6\r\n\"E10000024\",\"Nottinghamshire\",\"RBL\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RQW\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RW6\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RWJ\",6\r\n\"E10000024\",\"Nottinghamshire\",\"RXP\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RA9\",17\r\n\"E10000024\",\"Nottinghamshire\",\"RAE\",6\r\n\"E10000024\",\"Nottinghamshire\",\"RAX\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RD8\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RMP\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RRV\",17\r\n\"E10000024\",\"Nottinghamshire\",\"RWP\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RXM\",12\r\n\"E10000024\",\"Nottinghamshire\",\"RXE\",13\r\n\"E10000024\",\"Nottinghamshire\",\"RFF\",18\r\n\"E10000024\",\"Nottinghamshire\",\"RN7\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RTR\",19\r\n\"E10000024\",\"Nottinghamshire\",\"RXR\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RBZ\",8\r\n\"E10000024\",\"Nottinghamshire\",\"RHU\",14\r\n\"E10000024\",\"Nottinghamshire\",\"RJ1\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RXH\",8\r\n\"E10000024\",\"Nottinghamshire\",\"RA4\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RDE\",14\r\n\"E10000024\",\"Nottinghamshire\",\"RXQ\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RJ7\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RNS\",15\r\n\"E10000024\",\"Nottinghamshire\",\"RVJ\",6\r\n\"E10000024\",\"Nottinghamshire\",\"RBA\",16\r\n\"E10000024\",\"Nottinghamshire\",\"RTK\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RXW\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RA3\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RN5\",16\r\n\"E10000024\",\"Nottinghamshire\",\"RWW\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RWY\",5\r\n\"E10000024\",\"Nottinghamshire\",\"R1K\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RWH\",8\r\n\"E10000024\",\"Nottinghamshire\",\"RNA\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RNQ\",8\r\n\"E10000024\",\"Nottinghamshire\",\"RXN\",8\r\n\"E10000024\",\"Nottinghamshire\",\"RMC\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RAL\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RLQ\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RQM\",11\r\n\"E10000024\",\"Nottinghamshire\",\"RD3\",6\r\n\"E10000024\",\"Nottinghamshire\",\"RGR\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RQ8\",7\r\n\"E10000024\",\"Nottinghamshire\",\"RYJ\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RLT\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RTP\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RA7\",10\r\n\"E10000024\",\"Nottinghamshire\",\"RWF\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RNL\",9\r\n\"E10000024\",\"Nottinghamshire\",\"RN3\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RW5\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RBS\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RBN\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RF4\",5\r\n\"E10000024\",\"Nottinghamshire\",\"RHW\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RR7\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RP7\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RAP\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RPA\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RVN\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RC1\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RX3\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RJZ\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RV9\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RT3\",4\r\n\"E10000024\",\"Nottinghamshire\",\"RDD\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RP6\",3\r\n\"E10000024\",\"Nottinghamshire\",\"RCF\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RET\",2\r\n\"E10000024\",\"Nottinghamshire\",\"RT1\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RP4\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RAT\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RBQ\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RPY\",1\r\n\"E10000024\",\"Nottinghamshire\",\"REN\",1\r\n\"E10000024\",\"Nottinghamshire\",\"RJ2\",1\r\n\"E10000025\",\"Oxfordshire\",\"RTH\",63239\r\n\"E10000025\",\"Oxfordshire\",\"RNU\",890\r\n\"E10000025\",\"Oxfordshire\",\"RJC\",66\r\n\"E10000025\",\"Oxfordshire\",\"RD8\",53\r\n\"E10000025\",\"Oxfordshire\",\"RXQ\",1290\r\n\"E10000025\",\"Oxfordshire\",\"RKB\",43\r\n\"E10000025\",\"Oxfordshire\",\"RDU\",86\r\n\"E10000025\",\"Oxfordshire\",\"RHM\",45\r\n\"E10000025\",\"Oxfordshire\",\"REF\",38\r\n\"E10000025\",\"Oxfordshire\",\"RJ1\",46\r\n\"E10000025\",\"Oxfordshire\",\"RRK\",43\r\n\"E10000025\",\"Oxfordshire\",\"RRV\",44\r\n\"E10000025\",\"Oxfordshire\",\"RN5\",39\r\n\"E10000025\",\"Oxfordshire\",\"RYJ\",53\r\n\"E10000025\",\"Oxfordshire\",\"RAL\",22\r\n\"E10000025\",\"Oxfordshire\",\"RAX\",19\r\n\"E10000025\",\"Oxfordshire\",\"RBZ\",20\r\n\"E10000025\",\"Oxfordshire\",\"RDZ\",27\r\n\"E10000025\",\"Oxfordshire\",\"RVJ\",38\r\n\"E10000025\",\"Oxfordshire\",\"RCB\",15\r\n\"E10000025\",\"Oxfordshire\",\"RD3\",22\r\n\"E10000025\",\"Oxfordshire\",\"RNS\",21\r\n\"E10000025\",\"Oxfordshire\",\"RQM\",56\r\n\"E10000025\",\"Oxfordshire\",\"R1H\",42\r\n\"E10000025\",\"Oxfordshire\",\"RTE\",66\r\n\"E10000025\",\"Oxfordshire\",\"RT3\",24\r\n\"E10000025\",\"Oxfordshire\",\"RWE\",17\r\n\"E10000025\",\"Oxfordshire\",\"RHW\",2782\r\n\"E10000025\",\"Oxfordshire\",\"RWD\",11\r\n\"E10000025\",\"Oxfordshire\",\"R1K\",21\r\n\"E10000025\",\"Oxfordshire\",\"RYR\",15\r\n\"E10000025\",\"Oxfordshire\",\"RH8\",26\r\n\"E10000025\",\"Oxfordshire\",\"RK9\",27\r\n\"E10000025\",\"Oxfordshire\",\"RBA\",17\r\n\"E10000025\",\"Oxfordshire\",\"RN3\",1349\r\n\"E10000025\",\"Oxfordshire\",\"RA9\",24\r\n\"E10000025\",\"Oxfordshire\",\"RD1\",29\r\n\"E10000025\",\"Oxfordshire\",\"RA2\",19\r\n\"E10000025\",\"Oxfordshire\",\"RA3\",13\r\n\"E10000025\",\"Oxfordshire\",\"RGT\",22\r\n\"E10000025\",\"Oxfordshire\",\"RJE\",13\r\n\"E10000025\",\"Oxfordshire\",\"RJZ\",16\r\n\"E10000025\",\"Oxfordshire\",\"RA7\",29\r\n\"E10000025\",\"Oxfordshire\",\"RP4\",4\r\n\"E10000025\",\"Oxfordshire\",\"RHU\",19\r\n\"E10000025\",\"Oxfordshire\",\"RXH\",16\r\n\"E10000025\",\"Oxfordshire\",\"RDE\",21\r\n\"E10000025\",\"Oxfordshire\",\"RNL\",13\r\n\"E10000025\",\"Oxfordshire\",\"RWP\",13\r\n\"E10000025\",\"Oxfordshire\",\"RXK\",9\r\n\"E10000025\",\"Oxfordshire\",\"R1F\",5\r\n\"E10000025\",\"Oxfordshire\",\"RA4\",10\r\n\"E10000025\",\"Oxfordshire\",\"RAS\",14\r\n\"E10000025\",\"Oxfordshire\",\"RGN\",8\r\n\"E10000025\",\"Oxfordshire\",\"RVR\",8\r\n\"E10000025\",\"Oxfordshire\",\"RBD\",27\r\n\"E10000025\",\"Oxfordshire\",\"RVW\",4\r\n\"E10000025\",\"Oxfordshire\",\"RJL\",3\r\n\"E10000025\",\"Oxfordshire\",\"RNQ\",9\r\n\"E10000025\",\"Oxfordshire\",\"RR8\",11\r\n\"E10000025\",\"Oxfordshire\",\"RTG\",6\r\n\"E10000025\",\"Oxfordshire\",\"RM1\",9\r\n\"E10000025\",\"Oxfordshire\",\"RWH\",9\r\n\"E10000025\",\"Oxfordshire\",\"RX1\",9\r\n\"E10000025\",\"Oxfordshire\",\"RNZ\",13\r\n\"E10000025\",\"Oxfordshire\",\"RQ3\",2\r\n\"E10000025\",\"Oxfordshire\",\"RAE\",6\r\n\"E10000025\",\"Oxfordshire\",\"RP1\",2\r\n\"E10000025\",\"Oxfordshire\",\"RFR\",1\r\n\"E10000025\",\"Oxfordshire\",\"RJ2\",12\r\n\"E10000025\",\"Oxfordshire\",\"RJ7\",25\r\n\"E10000025\",\"Oxfordshire\",\"RW6\",4\r\n\"E10000025\",\"Oxfordshire\",\"RXW\",10\r\n\"E10000025\",\"Oxfordshire\",\"RBK\",3\r\n\"E10000025\",\"Oxfordshire\",\"RTK\",4\r\n\"E10000025\",\"Oxfordshire\",\"RXC\",9\r\n\"E10000025\",\"Oxfordshire\",\"RXN\",1\r\n\"E10000025\",\"Oxfordshire\",\"RHQ\",7\r\n\"E10000025\",\"Oxfordshire\",\"RJN\",1\r\n\"E10000025\",\"Oxfordshire\",\"RN7\",7\r\n\"E10000025\",\"Oxfordshire\",\"RWF\",9\r\n\"E10000025\",\"Oxfordshire\",\"RCX\",9\r\n\"E10000025\",\"Oxfordshire\",\"RKE\",4\r\n\"E10000025\",\"Oxfordshire\",\"RP6\",3\r\n\"E10000025\",\"Oxfordshire\",\"RQW\",1\r\n\"E10000025\",\"Oxfordshire\",\"RTP\",9\r\n\"E10000025\",\"Oxfordshire\",\"RTX\",10\r\n\"E10000025\",\"Oxfordshire\",\"RXL\",5\r\n\"E10000025\",\"Oxfordshire\",\"RAP\",5\r\n\"E10000025\",\"Oxfordshire\",\"RW1\",2\r\n\"E10000025\",\"Oxfordshire\",\"RYV\",1\r\n\"E10000025\",\"Oxfordshire\",\"RET\",1\r\n\"E10000025\",\"Oxfordshire\",\"RRF\",5\r\n\"E10000025\",\"Oxfordshire\",\"RVV\",14\r\n\"E10000025\",\"Oxfordshire\",\"RWY\",2\r\n\"E10000025\",\"Oxfordshire\",\"RBS\",2\r\n\"E10000025\",\"Oxfordshire\",\"RCD\",5\r\n\"E10000025\",\"Oxfordshire\",\"RFS\",4\r\n\"E10000025\",\"Oxfordshire\",\"RGP\",6\r\n\"E10000025\",\"Oxfordshire\",\"RGR\",7\r\n\"E10000025\",\"Oxfordshire\",\"RLT\",3\r\n\"E10000025\",\"Oxfordshire\",\"RNA\",7\r\n\"E10000025\",\"Oxfordshire\",\"RRE\",1\r\n\"E10000025\",\"Oxfordshire\",\"RVN\",4\r\n\"E10000025\",\"Oxfordshire\",\"RWA\",4\r\n\"E10000025\",\"Oxfordshire\",\"RWJ\",4\r\n\"E10000025\",\"Oxfordshire\",\"RXP\",4\r\n\"E10000025\",\"Oxfordshire\",\"RXR\",2\r\n\"E10000025\",\"Oxfordshire\",\"RLQ\",12\r\n\"E10000025\",\"Oxfordshire\",\"RQX\",6\r\n\"E10000025\",\"Oxfordshire\",\"R0A\",19\r\n\"E10000025\",\"Oxfordshire\",\"RC1\",6\r\n\"E10000025\",\"Oxfordshire\",\"RF4\",3\r\n\"E10000025\",\"Oxfordshire\",\"RTF\",7\r\n\"E10000025\",\"Oxfordshire\",\"RWG\",11\r\n\"E10000025\",\"Oxfordshire\",\"RQ8\",8\r\n\"E10000025\",\"Oxfordshire\",\"RBT\",4\r\n\"E10000025\",\"Oxfordshire\",\"RFF\",2\r\n\"E10000025\",\"Oxfordshire\",\"RWW\",5\r\n\"E10000025\",\"Oxfordshire\",\"RJR\",2\r\n\"E10000025\",\"Oxfordshire\",\"RPA\",4\r\n\"E10000025\",\"Oxfordshire\",\"REM\",5\r\n\"E10000025\",\"Oxfordshire\",\"RBL\",6\r\n\"E10000025\",\"Oxfordshire\",\"RDD\",3\r\n\"E10000025\",\"Oxfordshire\",\"RMY\",1\r\n\"E10000025\",\"Oxfordshire\",\"RTR\",3\r\n\"E10000025\",\"Oxfordshire\",\"RAJ\",2\r\n\"E10000025\",\"Oxfordshire\",\"RJ6\",2\r\n\"E10000025\",\"Oxfordshire\",\"RWX\",3\r\n\"E10000025\",\"Oxfordshire\",\"RXF\",1\r\n\"E10000025\",\"Oxfordshire\",\"RVY\",1\r\n\"E10000025\",\"Oxfordshire\",\"RWK\",1\r\n\"E10000025\",\"Oxfordshire\",\"RPY\",12\r\n\"E10000025\",\"Oxfordshire\",\"RC9\",2\r\n\"E10000025\",\"Oxfordshire\",\"RP5\",4\r\n\"E10000025\",\"Oxfordshire\",\"RMC\",1\r\n\"E10000025\",\"Oxfordshire\",\"RTD\",3\r\n\"E10000025\",\"Oxfordshire\",\"RCF\",1\r\n\"E10000025\",\"Oxfordshire\",\"RH5\",2\r\n\"E10000025\",\"Oxfordshire\",\"RM3\",3\r\n\"E10000025\",\"Oxfordshire\",\"RGM\",2\r\n\"E10000025\",\"Oxfordshire\",\"RT5\",1\r\n\"E10000025\",\"Oxfordshire\",\"RL4\",2\r\n\"E10000025\",\"Oxfordshire\",\"R0B\",1\r\n\"E10000025\",\"Oxfordshire\",\"RTQ\",4\r\n\"E10000025\",\"Oxfordshire\",\"R1J\",2\r\n\"E10000025\",\"Oxfordshire\",\"RK5\",1\r\n\"E10000025\",\"Oxfordshire\",\"RXT\",1\r\n\"E10000027\",\"Somerset\",\"RD1\",6650\r\n\"E10000027\",\"Somerset\",\"RA4\",19029\r\n\"E10000027\",\"Somerset\",\"RBA\",38951\r\n\"E10000027\",\"Somerset\",\"RH5\",1183\r\n\"E10000027\",\"Somerset\",\"RVJ\",922\r\n\"E10000027\",\"Somerset\",\"RA7\",915\r\n\"E10000027\",\"Somerset\",\"RA3\",2923\r\n\"E10000027\",\"Somerset\",\"RBD\",357\r\n\"E10000027\",\"Somerset\",\"RNZ\",74\r\n\"E10000027\",\"Somerset\",\"RH8\",357\r\n\"E10000027\",\"Somerset\",\"REF\",75\r\n\"E10000027\",\"Somerset\",\"NTP\",18\r\n\"E10000027\",\"Somerset\",\"RA9\",68\r\n\"E10000027\",\"Somerset\",\"RHM\",52\r\n\"E10000027\",\"Somerset\",\"RN5\",14\r\n\"E10000027\",\"Somerset\",\"RK9\",61\r\n\"E10000027\",\"Somerset\",\"RTE\",29\r\n\"E10000027\",\"Somerset\",\"RD3\",39\r\n\"E10000027\",\"Somerset\",\"RTH\",32\r\n\"E10000027\",\"Somerset\",\"R1H\",21\r\n\"E10000027\",\"Somerset\",\"RQM\",20\r\n\"E10000027\",\"Somerset\",\"RJ1\",19\r\n\"E10000027\",\"Somerset\",\"RLQ\",14\r\n\"E10000027\",\"Somerset\",\"RAX\",10\r\n\"E10000027\",\"Somerset\",\"RVN\",7\r\n\"E10000027\",\"Somerset\",\"RN3\",15\r\n\"E10000027\",\"Somerset\",\"RDZ\",24\r\n\"E10000027\",\"Somerset\",\"RDU\",19\r\n\"E10000027\",\"Somerset\",\"RJ7\",13\r\n\"E10000027\",\"Somerset\",\"RBZ\",70\r\n\"E10000027\",\"Somerset\",\"RRK\",32\r\n\"E10000027\",\"Somerset\",\"RX1\",6\r\n\"E10000027\",\"Somerset\",\"R1K\",12\r\n\"E10000027\",\"Somerset\",\"RYJ\",19\r\n\"E10000027\",\"Somerset\",\"RKE\",3\r\n\"E10000027\",\"Somerset\",\"RXH\",12\r\n\"E10000027\",\"Somerset\",\"RYR\",9\r\n\"E10000027\",\"Somerset\",\"RAT\",2\r\n\"E10000027\",\"Somerset\",\"RT3\",13\r\n\"E10000027\",\"Somerset\",\"RVV\",13\r\n\"E10000027\",\"Somerset\",\"RW6\",3\r\n\"E10000027\",\"Somerset\",\"R0A\",5\r\n\"E10000027\",\"Somerset\",\"RWG\",8\r\n\"E10000027\",\"Somerset\",\"RQX\",2\r\n\"E10000027\",\"Somerset\",\"RDY\",12\r\n\"E10000027\",\"Somerset\",\"RGR\",3\r\n\"E10000027\",\"Somerset\",\"RGT\",5\r\n\"E10000027\",\"Somerset\",\"RJZ\",8\r\n\"E10000027\",\"Somerset\",\"RWE\",6\r\n\"E10000027\",\"Somerset\",\"RAS\",6\r\n\"E10000027\",\"Somerset\",\"RHU\",10\r\n\"E10000027\",\"Somerset\",\"RCB\",6\r\n\"E10000027\",\"Somerset\",\"RAL\",12\r\n\"E10000027\",\"Somerset\",\"RCX\",4\r\n\"E10000027\",\"Somerset\",\"RM3\",3\r\n\"E10000027\",\"Somerset\",\"RW1\",1\r\n\"E10000027\",\"Somerset\",\"RWD\",4\r\n\"E10000027\",\"Somerset\",\"RWP\",10\r\n\"E10000027\",\"Somerset\",\"RA2\",4\r\n\"E10000027\",\"Somerset\",\"RBL\",2\r\n\"E10000027\",\"Somerset\",\"RBS\",1\r\n\"E10000027\",\"Somerset\",\"RGP\",2\r\n\"E10000027\",\"Somerset\",\"RTD\",3\r\n\"E10000027\",\"Somerset\",\"RWH\",6\r\n\"E10000027\",\"Somerset\",\"RXC\",4\r\n\"E10000027\",\"Somerset\",\"RCD\",4\r\n\"E10000027\",\"Somerset\",\"RJC\",4\r\n\"E10000027\",\"Somerset\",\"RTF\",2\r\n\"E10000027\",\"Somerset\",\"RTP\",6\r\n\"E10000027\",\"Somerset\",\"RWJ\",5\r\n\"E10000027\",\"Somerset\",\"RXQ\",12\r\n\"E10000027\",\"Somerset\",\"RF4\",2\r\n\"E10000027\",\"Somerset\",\"RFS\",3\r\n\"E10000027\",\"Somerset\",\"RGN\",6\r\n\"E10000027\",\"Somerset\",\"RJ2\",2\r\n\"E10000027\",\"Somerset\",\"RNU\",1\r\n\"E10000027\",\"Somerset\",\"RPY\",1\r\n\"E10000027\",\"Somerset\",\"RPC\",1\r\n\"E10000027\",\"Somerset\",\"RLT\",2\r\n\"E10000027\",\"Somerset\",\"RTG\",11\r\n\"E10000027\",\"Somerset\",\"RC1\",5\r\n\"E10000027\",\"Somerset\",\"RDE\",7\r\n\"E10000027\",\"Somerset\",\"RMC\",3\r\n\"E10000027\",\"Somerset\",\"RNQ\",5\r\n\"E10000027\",\"Somerset\",\"RQW\",2\r\n\"E10000027\",\"Somerset\",\"RC9\",4\r\n\"E10000027\",\"Somerset\",\"RHQ\",1\r\n\"E10000027\",\"Somerset\",\"RXW\",9\r\n\"E10000027\",\"Somerset\",\"RVR\",7\r\n\"E10000027\",\"Somerset\",\"RJE\",6\r\n\"E10000027\",\"Somerset\",\"RRV\",12\r\n\"E10000027\",\"Somerset\",\"RBN\",6\r\n\"E10000027\",\"Somerset\",\"RM1\",5\r\n\"E10000027\",\"Somerset\",\"RNA\",3\r\n\"E10000027\",\"Somerset\",\"RHW\",15\r\n\"E10000027\",\"Somerset\",\"RNS\",7\r\n\"E10000027\",\"Somerset\",\"REM\",6\r\n\"E10000027\",\"Somerset\",\"RXK\",3\r\n\"E10000027\",\"Somerset\",\"RXP\",4\r\n\"E10000027\",\"Somerset\",\"R1F\",8\r\n\"E10000027\",\"Somerset\",\"RAP\",3\r\n\"E10000027\",\"Somerset\",\"RJ8\",1\r\n\"E10000027\",\"Somerset\",\"RKB\",5\r\n\"E10000027\",\"Somerset\",\"RQ3\",2\r\n\"E10000027\",\"Somerset\",\"RWF\",7\r\n\"E10000027\",\"Somerset\",\"RNL\",2\r\n\"E10000027\",\"Somerset\",\"RTQ\",1\r\n\"E10000027\",\"Somerset\",\"RWW\",1\r\n\"E10000027\",\"Somerset\",\"RXL\",7\r\n\"E10000027\",\"Somerset\",\"RXF\",2\r\n\"E10000027\",\"Somerset\",\"RQ8\",2\r\n\"E10000027\",\"Somerset\",\"RTK\",4\r\n\"E10000027\",\"Somerset\",\"RVY\",1\r\n\"E10000027\",\"Somerset\",\"RBK\",1\r\n\"E10000027\",\"Somerset\",\"RJ6\",4\r\n\"E10000027\",\"Somerset\",\"RXN\",6\r\n\"E10000027\",\"Somerset\",\"RGM\",3\r\n\"E10000027\",\"Somerset\",\"RCF\",3\r\n\"E10000027\",\"Somerset\",\"RL4\",2\r\n\"E10000027\",\"Somerset\",\"RAN\",1\r\n\"E10000027\",\"Somerset\",\"RXR\",2\r\n\"E10000027\",\"Somerset\",\"RAJ\",6\r\n\"E10000027\",\"Somerset\",\"RK5\",1\r\n\"E10000027\",\"Somerset\",\"RP5\",2\r\n\"E10000027\",\"Somerset\",\"RWA\",2\r\n\"E10000027\",\"Somerset\",\"RN7\",2\r\n\"E10000027\",\"Somerset\",\"RWY\",1\r\n\"E10000027\",\"Somerset\",\"RD8\",3\r\n\"E10000027\",\"Somerset\",\"RPA\",1\r\n\"E10000027\",\"Somerset\",\"RXE\",1\r\n\"E10000027\",\"Somerset\",\"RDD\",2\r\n\"E10000027\",\"Somerset\",\"RBV\",1\r\n\"E10000027\",\"Somerset\",\"R0B\",4\r\n\"E10000027\",\"Somerset\",\"RET\",2\r\n\"E10000027\",\"Somerset\",\"RJN\",1\r\n\"E10000027\",\"Somerset\",\"RTX\",1\r\n\"E10000028\",\"Staffordshire\",\"RJE\",53337\r\n\"E10000028\",\"Staffordshire\",\"RL4\",10246\r\n\"E10000028\",\"Staffordshire\",\"RBK\",3514\r\n\"E10000028\",\"Staffordshire\",\"RTG\",23100\r\n\"E10000028\",\"Staffordshire\",\"RRE\",1054\r\n\"E10000028\",\"Staffordshire\",\"RRK\",13685\r\n\"E10000028\",\"Staffordshire\",\"RQ3\",329\r\n\"E10000028\",\"Staffordshire\",\"RNA\",2039\r\n\"E10000028\",\"Staffordshire\",\"RXK\",149\r\n\"E10000028\",\"Staffordshire\",\"RXW\",464\r\n\"E10000028\",\"Staffordshire\",\"RX1\",169\r\n\"E10000028\",\"Staffordshire\",\"RKB\",100\r\n\"E10000028\",\"Staffordshire\",\"RWE\",57\r\n\"E10000028\",\"Staffordshire\",\"RCB\",29\r\n\"E10000028\",\"Staffordshire\",\"RA9\",30\r\n\"E10000028\",\"Staffordshire\",\"RWP\",53\r\n\"E10000028\",\"Staffordshire\",\"RTH\",30\r\n\"E10000028\",\"Staffordshire\",\"RJC\",16\r\n\"E10000028\",\"Staffordshire\",\"RGT\",13\r\n\"E10000028\",\"Staffordshire\",\"RJ1\",14\r\n\"E10000028\",\"Staffordshire\",\"R0A\",84\r\n\"E10000028\",\"Staffordshire\",\"REF\",49\r\n\"E10000028\",\"Staffordshire\",\"RWD\",21\r\n\"E10000028\",\"Staffordshire\",\"RTX\",18\r\n\"E10000028\",\"Staffordshire\",\"RVV\",11\r\n\"E10000028\",\"Staffordshire\",\"RHW\",10\r\n\"E10000028\",\"Staffordshire\",\"RAX\",5\r\n\"E10000028\",\"Staffordshire\",\"RBN\",14\r\n\"E10000028\",\"Staffordshire\",\"RK9\",16\r\n\"E10000028\",\"Staffordshire\",\"R1H\",13\r\n\"E10000028\",\"Staffordshire\",\"RA3\",12\r\n\"E10000028\",\"Staffordshire\",\"RL1\",11\r\n\"E10000028\",\"Staffordshire\",\"RRJ\",24\r\n\"E10000028\",\"Staffordshire\",\"RXC\",4\r\n\"E10000028\",\"Staffordshire\",\"RAS\",7\r\n\"E10000028\",\"Staffordshire\",\"RCD\",6\r\n\"E10000028\",\"Staffordshire\",\"RM1\",11\r\n\"E10000028\",\"Staffordshire\",\"RDZ\",7\r\n\"E10000028\",\"Staffordshire\",\"RBD\",9\r\n\"E10000028\",\"Staffordshire\",\"RLQ\",14\r\n\"E10000028\",\"Staffordshire\",\"RLT\",89\r\n\"E10000028\",\"Staffordshire\",\"RXL\",29\r\n\"E10000028\",\"Staffordshire\",\"RBT\",202\r\n\"E10000028\",\"Staffordshire\",\"RM3\",27\r\n\"E10000028\",\"Staffordshire\",\"RA4\",4\r\n\"E10000028\",\"Staffordshire\",\"RNZ\",8\r\n\"E10000028\",\"Staffordshire\",\"RQX\",2\r\n\"E10000028\",\"Staffordshire\",\"RA7\",10\r\n\"E10000028\",\"Staffordshire\",\"RLY\",452\r\n\"E10000028\",\"Staffordshire\",\"RNL\",12\r\n\"E10000028\",\"Staffordshire\",\"RR8\",10\r\n\"E10000028\",\"Staffordshire\",\"RTF\",7\r\n\"E10000028\",\"Staffordshire\",\"RD1\",4\r\n\"E10000028\",\"Staffordshire\",\"RD8\",12\r\n\"E10000028\",\"Staffordshire\",\"RHM\",10\r\n\"E10000028\",\"Staffordshire\",\"RJR\",12\r\n\"E10000028\",\"Staffordshire\",\"RTP\",5\r\n\"E10000028\",\"Staffordshire\",\"RWF\",5\r\n\"E10000028\",\"Staffordshire\",\"RBA\",16\r\n\"E10000028\",\"Staffordshire\",\"RBL\",13\r\n\"E10000028\",\"Staffordshire\",\"REM\",23\r\n\"E10000028\",\"Staffordshire\",\"RVY\",3\r\n\"E10000028\",\"Staffordshire\",\"RC1\",7\r\n\"E10000028\",\"Staffordshire\",\"RD3\",9\r\n\"E10000028\",\"Staffordshire\",\"RGP\",6\r\n\"E10000028\",\"Staffordshire\",\"RWA\",7\r\n\"E10000028\",\"Staffordshire\",\"R1K\",11\r\n\"E10000028\",\"Staffordshire\",\"RA2\",4\r\n\"E10000028\",\"Staffordshire\",\"RDU\",14\r\n\"E10000028\",\"Staffordshire\",\"RH8\",17\r\n\"E10000028\",\"Staffordshire\",\"RNS\",10\r\n\"E10000028\",\"Staffordshire\",\"RT3\",5\r\n\"E10000028\",\"Staffordshire\",\"RTE\",16\r\n\"E10000028\",\"Staffordshire\",\"R1F\",6\r\n\"E10000028\",\"Staffordshire\",\"RHQ\",20\r\n\"E10000028\",\"Staffordshire\",\"RN3\",14\r\n\"E10000028\",\"Staffordshire\",\"RRV\",18\r\n\"E10000028\",\"Staffordshire\",\"RTD\",10\r\n\"E10000028\",\"Staffordshire\",\"RBZ\",18\r\n\"E10000028\",\"Staffordshire\",\"RJ8\",1\r\n\"E10000028\",\"Staffordshire\",\"RNQ\",12\r\n\"E10000028\",\"Staffordshire\",\"RQM\",5\r\n\"E10000028\",\"Staffordshire\",\"RWG\",5\r\n\"E10000028\",\"Staffordshire\",\"RWJ\",41\r\n\"E10000028\",\"Staffordshire\",\"RFS\",22\r\n\"E10000028\",\"Staffordshire\",\"RN5\",10\r\n\"E10000028\",\"Staffordshire\",\"RDE\",15\r\n\"E10000028\",\"Staffordshire\",\"RY8\",6\r\n\"E10000028\",\"Staffordshire\",\"RJL\",8\r\n\"E10000028\",\"Staffordshire\",\"RK5\",15\r\n\"E10000028\",\"Staffordshire\",\"RXF\",7\r\n\"E10000028\",\"Staffordshire\",\"RCX\",9\r\n\"E10000028\",\"Staffordshire\",\"RC9\",6\r\n\"E10000028\",\"Staffordshire\",\"RGN\",6\r\n\"E10000028\",\"Staffordshire\",\"RRF\",6\r\n\"E10000028\",\"Staffordshire\",\"TAJ\",19\r\n\"E10000028\",\"Staffordshire\",\"RJN\",830\r\n\"E10000028\",\"Staffordshire\",\"RET\",6\r\n\"E10000028\",\"Staffordshire\",\"RGR\",2\r\n\"E10000028\",\"Staffordshire\",\"R0B\",4\r\n\"E10000028\",\"Staffordshire\",\"RWH\",4\r\n\"E10000028\",\"Staffordshire\",\"RAE\",2\r\n\"E10000028\",\"Staffordshire\",\"RP5\",8\r\n\"E10000028\",\"Staffordshire\",\"RVJ\",12\r\n\"E10000028\",\"Staffordshire\",\"RXE\",1\r\n\"E10000028\",\"Staffordshire\",\"RXR\",2\r\n\"E10000028\",\"Staffordshire\",\"RTR\",7\r\n\"E10000028\",\"Staffordshire\",\"RMC\",6\r\n\"E10000028\",\"Staffordshire\",\"RW6\",7\r\n\"E10000028\",\"Staffordshire\",\"RYJ\",5\r\n\"E10000028\",\"Staffordshire\",\"RVR\",6\r\n\"E10000028\",\"Staffordshire\",\"RT5\",1\r\n\"E10000028\",\"Staffordshire\",\"RXN\",10\r\n\"E10000028\",\"Staffordshire\",\"RCU\",2\r\n\"E10000028\",\"Staffordshire\",\"RFF\",3\r\n\"E10000028\",\"Staffordshire\",\"RHU\",6\r\n\"E10000028\",\"Staffordshire\",\"RPA\",2\r\n\"E10000028\",\"Staffordshire\",\"RXM\",2\r\n\"E10000028\",\"Staffordshire\",\"R1A\",7\r\n\"E10000028\",\"Staffordshire\",\"RBV\",48\r\n\"E10000028\",\"Staffordshire\",\"RYR\",7\r\n\"E10000028\",\"Staffordshire\",\"RJZ\",5\r\n\"E10000028\",\"Staffordshire\",\"RJ7\",5\r\n\"E10000028\",\"Staffordshire\",\"RBS\",62\r\n\"E10000028\",\"Staffordshire\",\"RTK\",7\r\n\"E10000028\",\"Staffordshire\",\"RXT\",6\r\n\"E10000028\",\"Staffordshire\",\"RKE\",2\r\n\"E10000028\",\"Staffordshire\",\"RMP\",2\r\n\"E10000028\",\"Staffordshire\",\"RBQ\",3\r\n\"E10000028\",\"Staffordshire\",\"RQW\",1\r\n\"E10000028\",\"Staffordshire\",\"RFR\",1\r\n\"E10000028\",\"Staffordshire\",\"RWW\",8\r\n\"E10000028\",\"Staffordshire\",\"RXH\",4\r\n\"E10000028\",\"Staffordshire\",\"RXP\",3\r\n\"E10000028\",\"Staffordshire\",\"RXA\",3\r\n\"E10000028\",\"Staffordshire\",\"RDY\",1\r\n\"E10000028\",\"Staffordshire\",\"RJ6\",2\r\n\"E10000028\",\"Staffordshire\",\"RJ2\",3\r\n\"E10000028\",\"Staffordshire\",\"RAL\",6\r\n\"E10000028\",\"Staffordshire\",\"RP1\",1\r\n\"E10000028\",\"Staffordshire\",\"RX3\",2\r\n\"E10000028\",\"Staffordshire\",\"R1D\",4\r\n\"E10000028\",\"Staffordshire\",\"RGM\",3\r\n\"E10000028\",\"Staffordshire\",\"RVN\",1\r\n\"E10000028\",\"Staffordshire\",\"RDD\",1\r\n\"E10000028\",\"Staffordshire\",\"REP\",3\r\n\"E10000028\",\"Staffordshire\",\"RCF\",3\r\n\"E10000028\",\"Staffordshire\",\"RQ8\",1\r\n\"E10000028\",\"Staffordshire\",\"RAP\",1\r\n\"E10000028\",\"Staffordshire\",\"RPC\",1\r\n\"E10000028\",\"Staffordshire\",\"RXQ\",1\r\n\"E10000028\",\"Staffordshire\",\"RPY\",1\r\n\"E10000028\",\"Staffordshire\",\"RYG\",2\r\n\"E10000028\",\"Staffordshire\",\"RWK\",1\r\n\"E10000029\",\"Suffolk\",\"RDE\",35991\r\n\"E10000029\",\"Suffolk\",\"RGR\",22294\r\n\"E10000029\",\"Suffolk\",\"RGT\",4445\r\n\"E10000029\",\"Suffolk\",\"RMY\",723\r\n\"E10000029\",\"Suffolk\",\"RQ8\",160\r\n\"E10000029\",\"Suffolk\",\"RM1\",2595\r\n\"E10000029\",\"Suffolk\",\"RGM\",347\r\n\"E10000029\",\"Suffolk\",\"RDD\",74\r\n\"E10000029\",\"Suffolk\",\"REF\",24\r\n\"E10000029\",\"Suffolk\",\"R1H\",77\r\n\"E10000029\",\"Suffolk\",\"RRV\",27\r\n\"E10000029\",\"Suffolk\",\"RYJ\",29\r\n\"E10000029\",\"Suffolk\",\"R1L\",19\r\n\"E10000029\",\"Suffolk\",\"RGN\",36\r\n\"E10000029\",\"Suffolk\",\"RGP\",11263\r\n\"E10000029\",\"Suffolk\",\"RJ1\",51\r\n\"E10000029\",\"Suffolk\",\"RWH\",21\r\n\"E10000029\",\"Suffolk\",\"RAJ\",16\r\n\"E10000029\",\"Suffolk\",\"RTH\",15\r\n\"E10000029\",\"Suffolk\",\"RPY\",7\r\n\"E10000029\",\"Suffolk\",\"RJZ\",20\r\n\"E10000029\",\"Suffolk\",\"RTP\",10\r\n\"E10000029\",\"Suffolk\",\"RXC\",17\r\n\"E10000029\",\"Suffolk\",\"RCX\",61\r\n\"E10000029\",\"Suffolk\",\"RF4\",22\r\n\"E10000029\",\"Suffolk\",\"RA9\",11\r\n\"E10000029\",\"Suffolk\",\"RBA\",9\r\n\"E10000029\",\"Suffolk\",\"R0A\",12\r\n\"E10000029\",\"Suffolk\",\"RQW\",25\r\n\"E10000029\",\"Suffolk\",\"RAL\",22\r\n\"E10000029\",\"Suffolk\",\"RHW\",5\r\n\"E10000029\",\"Suffolk\",\"RJ7\",18\r\n\"E10000029\",\"Suffolk\",\"RNQ\",10\r\n\"E10000029\",\"Suffolk\",\"RQM\",20\r\n\"E10000029\",\"Suffolk\",\"RTF\",7\r\n\"E10000029\",\"Suffolk\",\"RVY\",2\r\n\"E10000029\",\"Suffolk\",\"RHM\",8\r\n\"E10000029\",\"Suffolk\",\"RT1\",2\r\n\"E10000029\",\"Suffolk\",\"RTR\",7\r\n\"E10000029\",\"Suffolk\",\"RXH\",18\r\n\"E10000029\",\"Suffolk\",\"RHU\",7\r\n\"E10000029\",\"Suffolk\",\"RVV\",22\r\n\"E10000029\",\"Suffolk\",\"RAS\",6\r\n\"E10000029\",\"Suffolk\",\"RD8\",11\r\n\"E10000029\",\"Suffolk\",\"RTD\",6\r\n\"E10000029\",\"Suffolk\",\"RC9\",17\r\n\"E10000029\",\"Suffolk\",\"RDU\",19\r\n\"E10000029\",\"Suffolk\",\"RTX\",14\r\n\"E10000029\",\"Suffolk\",\"RXP\",4\r\n\"E10000029\",\"Suffolk\",\"RYR\",13\r\n\"E10000029\",\"Suffolk\",\"NQ1\",1\r\n\"E10000029\",\"Suffolk\",\"R1F\",4\r\n\"E10000029\",\"Suffolk\",\"RNS\",6\r\n\"E10000029\",\"Suffolk\",\"RXK\",5\r\n\"E10000029\",\"Suffolk\",\"R1K\",11\r\n\"E10000029\",\"Suffolk\",\"RCB\",10\r\n\"E10000029\",\"Suffolk\",\"RNL\",7\r\n\"E10000029\",\"Suffolk\",\"RPC\",4\r\n\"E10000029\",\"Suffolk\",\"RR8\",3\r\n\"E10000029\",\"Suffolk\",\"RBK\",1\r\n\"E10000029\",\"Suffolk\",\"RN3\",9\r\n\"E10000029\",\"Suffolk\",\"RC1\",9\r\n\"E10000029\",\"Suffolk\",\"RVJ\",3\r\n\"E10000029\",\"Suffolk\",\"RWG\",9\r\n\"E10000029\",\"Suffolk\",\"RA7\",10\r\n\"E10000029\",\"Suffolk\",\"RBD\",7\r\n\"E10000029\",\"Suffolk\",\"RKB\",12\r\n\"E10000029\",\"Suffolk\",\"RP6\",9\r\n\"E10000029\",\"Suffolk\",\"REM\",5\r\n\"E10000029\",\"Suffolk\",\"RTG\",5\r\n\"E10000029\",\"Suffolk\",\"RWD\",17\r\n\"E10000029\",\"Suffolk\",\"RXN\",3\r\n\"E10000029\",\"Suffolk\",\"RJ2\",15\r\n\"E10000029\",\"Suffolk\",\"RLQ\",3\r\n\"E10000029\",\"Suffolk\",\"RN5\",7\r\n\"E10000029\",\"Suffolk\",\"RP4\",12\r\n\"E10000029\",\"Suffolk\",\"RXQ\",9\r\n\"E10000029\",\"Suffolk\",\"RAN\",4\r\n\"E10000029\",\"Suffolk\",\"RNZ\",6\r\n\"E10000029\",\"Suffolk\",\"RX1\",10\r\n\"E10000029\",\"Suffolk\",\"RJL\",8\r\n\"E10000029\",\"Suffolk\",\"RNA\",2\r\n\"E10000029\",\"Suffolk\",\"RRK\",15\r\n\"E10000029\",\"Suffolk\",\"RCD\",3\r\n\"E10000029\",\"Suffolk\",\"RD3\",4\r\n\"E10000029\",\"Suffolk\",\"RWF\",8\r\n\"E10000029\",\"Suffolk\",\"RBV\",1\r\n\"E10000029\",\"Suffolk\",\"RQ3\",3\r\n\"E10000029\",\"Suffolk\",\"RTE\",12\r\n\"E10000029\",\"Suffolk\",\"RDZ\",4\r\n\"E10000029\",\"Suffolk\",\"RJ6\",5\r\n\"E10000029\",\"Suffolk\",\"RJC\",2\r\n\"E10000029\",\"Suffolk\",\"RXW\",9\r\n\"E10000029\",\"Suffolk\",\"RQX\",7\r\n\"E10000029\",\"Suffolk\",\"RD1\",12\r\n\"E10000029\",\"Suffolk\",\"RWE\",7\r\n\"E10000029\",\"Suffolk\",\"RWP\",5\r\n\"E10000029\",\"Suffolk\",\"RVR\",3\r\n\"E10000029\",\"Suffolk\",\"RH8\",6\r\n\"E10000029\",\"Suffolk\",\"RHQ\",4\r\n\"E10000029\",\"Suffolk\",\"RN7\",4\r\n\"E10000029\",\"Suffolk\",\"RXF\",6\r\n\"E10000029\",\"Suffolk\",\"RWW\",2\r\n\"E10000029\",\"Suffolk\",\"RAP\",2\r\n\"E10000029\",\"Suffolk\",\"RL4\",3\r\n\"E10000029\",\"Suffolk\",\"RRJ\",1\r\n\"E10000029\",\"Suffolk\",\"RCU\",1\r\n\"E10000029\",\"Suffolk\",\"RJE\",5\r\n\"E10000029\",\"Suffolk\",\"RP7\",1\r\n\"E10000029\",\"Suffolk\",\"RPA\",6\r\n\"E10000029\",\"Suffolk\",\"RW6\",3\r\n\"E10000029\",\"Suffolk\",\"RBZ\",3\r\n\"E10000029\",\"Suffolk\",\"RK5\",2\r\n\"E10000029\",\"Suffolk\",\"RK9\",6\r\n\"E10000029\",\"Suffolk\",\"RA2\",4\r\n\"E10000029\",\"Suffolk\",\"RP5\",2\r\n\"E10000029\",\"Suffolk\",\"RR7\",2\r\n\"E10000029\",\"Suffolk\",\"RBL\",2\r\n\"E10000029\",\"Suffolk\",\"RXT\",2\r\n\"E10000029\",\"Suffolk\",\"RTK\",3\r\n\"E10000029\",\"Suffolk\",\"RCF\",3\r\n\"E10000029\",\"Suffolk\",\"RM3\",1\r\n\"E10000029\",\"Suffolk\",\"RRF\",2\r\n\"E10000029\",\"Suffolk\",\"RMC\",2\r\n\"E10000029\",\"Suffolk\",\"RXR\",1\r\n\"E10000029\",\"Suffolk\",\"RAE\",1\r\n\"E10000029\",\"Suffolk\",\"RJN\",2\r\n\"E10000029\",\"Suffolk\",\"RXL\",1\r\n\"E10000029\",\"Suffolk\",\"RAX\",6\r\n\"E10000029\",\"Suffolk\",\"RWK\",3\r\n\"E10000029\",\"Suffolk\",\"RA4\",3\r\n\"E10000029\",\"Suffolk\",\"RYV\",4\r\n\"E10000029\",\"Suffolk\",\"RA3\",3\r\n\"E10000029\",\"Suffolk\",\"RMP\",2\r\n\"E10000029\",\"Suffolk\",\"RDY\",1\r\n\"E10000029\",\"Suffolk\",\"RWX\",1\r\n\"E10000029\",\"Suffolk\",\"RT3\",5\r\n\"E10000029\",\"Suffolk\",\"RWA\",6\r\n\"E10000029\",\"Suffolk\",\"RBT\",1\r\n\"E10000029\",\"Suffolk\",\"RH5\",1\r\n\"E10000029\",\"Suffolk\",\"RFS\",5\r\n\"E10000029\",\"Suffolk\",\"RKE\",1\r\n\"E10000029\",\"Suffolk\",\"RJR\",2\r\n\"E10000029\",\"Suffolk\",\"RWJ\",2\r\n\"E10000029\",\"Suffolk\",\"RXE\",1\r\n\"E10000029\",\"Suffolk\",\"NAX\",21\r\n\"E10000029\",\"Suffolk\",\"RWR\",1\r\n\"E10000029\",\"Suffolk\",\"RWY\",1\r\n\"E10000029\",\"Suffolk\",\"R0B\",1\r\n\"E10000030\",\"Surrey\",\"RTK\",24538\r\n\"E10000030\",\"Surrey\",\"RAX\",5114\r\n\"E10000030\",\"Surrey\",\"RA2\",26568\r\n\"E10000030\",\"Surrey\",\"RVR\",17337\r\n\"E10000030\",\"Surrey\",\"RJ7\",3056\r\n\"E10000030\",\"Surrey\",\"RXX\",965\r\n\"E10000030\",\"Surrey\",\"RQM\",710\r\n\"E10000030\",\"Surrey\",\"RPY\",465\r\n\"E10000030\",\"Surrey\",\"RDU\",15328\r\n\"E10000030\",\"Surrey\",\"RJ1\",408\r\n\"E10000030\",\"Surrey\",\"RP6\",154\r\n\"E10000030\",\"Surrey\",\"RYJ\",233\r\n\"E10000030\",\"Surrey\",\"RJZ\",286\r\n\"E10000030\",\"Surrey\",\"RRV\",151\r\n\"E10000030\",\"Surrey\",\"NTV\",136\r\n\"E10000030\",\"Surrey\",\"RT3\",151\r\n\"E10000030\",\"Surrey\",\"RTP\",18327\r\n\"E10000030\",\"Surrey\",\"RYR\",198\r\n\"E10000030\",\"Surrey\",\"REF\",62\r\n\"E10000030\",\"Surrey\",\"R1H\",145\r\n\"E10000030\",\"Surrey\",\"RDZ\",60\r\n\"E10000030\",\"Surrey\",\"R1K\",61\r\n\"E10000030\",\"Surrey\",\"RAL\",49\r\n\"E10000030\",\"Surrey\",\"RHU\",73\r\n\"E10000030\",\"Surrey\",\"RPC\",535\r\n\"E10000030\",\"Surrey\",\"RHM\",131\r\n\"E10000030\",\"Surrey\",\"RTH\",80\r\n\"E10000030\",\"Surrey\",\"RH8\",38\r\n\"E10000030\",\"Surrey\",\"RWF\",152\r\n\"E10000030\",\"Surrey\",\"RXC\",66\r\n\"E10000030\",\"Surrey\",\"RWG\",23\r\n\"E10000030\",\"Surrey\",\"RN3\",19\r\n\"E10000030\",\"Surrey\",\"RD3\",41\r\n\"E10000030\",\"Surrey\",\"RJ6\",270\r\n\"E10000030\",\"Surrey\",\"RAS\",90\r\n\"E10000030\",\"Surrey\",\"RHW\",66\r\n\"E10000030\",\"Surrey\",\"RXP\",10\r\n\"E10000030\",\"Surrey\",\"RXH\",209\r\n\"E10000030\",\"Surrey\",\"RWA\",12\r\n\"E10000030\",\"Surrey\",\"RN5\",77\r\n\"E10000030\",\"Surrey\",\"RTE\",26\r\n\"E10000030\",\"Surrey\",\"RVV\",37\r\n\"E10000030\",\"Surrey\",\"RNS\",18\r\n\"E10000030\",\"Surrey\",\"RQX\",21\r\n\"E10000030\",\"Surrey\",\"RA7\",19\r\n\"E10000030\",\"Surrey\",\"RA9\",24\r\n\"E10000030\",\"Surrey\",\"RK5\",4\r\n\"E10000030\",\"Surrey\",\"RK9\",23\r\n\"E10000030\",\"Surrey\",\"RQY\",7\r\n\"E10000030\",\"Surrey\",\"RBD\",33\r\n\"E10000030\",\"Surrey\",\"RTX\",13\r\n\"E10000030\",\"Surrey\",\"RAN\",14\r\n\"E10000030\",\"Surrey\",\"RC1\",13\r\n\"E10000030\",\"Surrey\",\"RA4\",31\r\n\"E10000030\",\"Surrey\",\"REM\",13\r\n\"E10000030\",\"Surrey\",\"RWY\",8\r\n\"E10000030\",\"Surrey\",\"RGT\",26\r\n\"E10000030\",\"Surrey\",\"RRK\",32\r\n\"E10000030\",\"Surrey\",\"RCF\",6\r\n\"E10000030\",\"Surrey\",\"RGR\",20\r\n\"E10000030\",\"Surrey\",\"RJ2\",21\r\n\"E10000030\",\"Surrey\",\"R0A\",11\r\n\"E10000030\",\"Surrey\",\"RCD\",7\r\n\"E10000030\",\"Surrey\",\"RMC\",1\r\n\"E10000030\",\"Surrey\",\"RTR\",8\r\n\"E10000030\",\"Surrey\",\"RCB\",12\r\n\"E10000030\",\"Surrey\",\"RDE\",15\r\n\"E10000030\",\"Surrey\",\"RW6\",4\r\n\"E10000030\",\"Surrey\",\"RXQ\",28\r\n\"E10000030\",\"Surrey\",\"RC9\",29\r\n\"E10000030\",\"Surrey\",\"R0B\",2\r\n\"E10000030\",\"Surrey\",\"RM1\",17\r\n\"E10000030\",\"Surrey\",\"RTF\",8\r\n\"E10000030\",\"Surrey\",\"RTG\",6\r\n\"E10000030\",\"Surrey\",\"RVJ\",12\r\n\"E10000030\",\"Surrey\",\"RWD\",8\r\n\"E10000030\",\"Surrey\",\"RBL\",7\r\n\"E10000030\",\"Surrey\",\"RJC\",10\r\n\"E10000030\",\"Surrey\",\"RLT\",4\r\n\"E10000030\",\"Surrey\",\"RM3\",2\r\n\"E10000030\",\"Surrey\",\"RQ8\",9\r\n\"E10000030\",\"Surrey\",\"RVW\",6\r\n\"E10000030\",\"Surrey\",\"RCX\",8\r\n\"E10000030\",\"Surrey\",\"RMP\",2\r\n\"E10000030\",\"Surrey\",\"RP5\",3\r\n\"E10000030\",\"Surrey\",\"R1F\",27\r\n\"E10000030\",\"Surrey\",\"RD1\",20\r\n\"E10000030\",\"Surrey\",\"RJN\",4\r\n\"E10000030\",\"Surrey\",\"RW1\",6\r\n\"E10000030\",\"Surrey\",\"RWP\",5\r\n\"E10000030\",\"Surrey\",\"RXW\",10\r\n\"E10000030\",\"Surrey\",\"RD8\",17\r\n\"E10000030\",\"Surrey\",\"RJL\",6\r\n\"E10000030\",\"Surrey\",\"RNZ\",22\r\n\"E10000030\",\"Surrey\",\"RQW\",8\r\n\"E10000030\",\"Surrey\",\"RWH\",10\r\n\"E10000030\",\"Surrey\",\"RBT\",9\r\n\"E10000030\",\"Surrey\",\"RPA\",14\r\n\"E10000030\",\"Surrey\",\"RX2\",52\r\n\"E10000030\",\"Surrey\",\"RV3\",10\r\n\"E10000030\",\"Surrey\",\"RTD\",11\r\n\"E10000030\",\"Surrey\",\"RBA\",18\r\n\"E10000030\",\"Surrey\",\"RNA\",3\r\n\"E10000030\",\"Surrey\",\"RXN\",6\r\n\"E10000030\",\"Surrey\",\"RXY\",3\r\n\"E10000030\",\"Surrey\",\"RDD\",12\r\n\"E10000030\",\"Surrey\",\"RWE\",17\r\n\"E10000030\",\"Surrey\",\"RL4\",4\r\n\"E10000030\",\"Surrey\",\"RX1\",12\r\n\"E10000030\",\"Surrey\",\"RXF\",7\r\n\"E10000030\",\"Surrey\",\"RFS\",6\r\n\"E10000030\",\"Surrey\",\"RGN\",13\r\n\"E10000030\",\"Surrey\",\"RGP\",11\r\n\"E10000030\",\"Surrey\",\"RNQ\",6\r\n\"E10000030\",\"Surrey\",\"RR8\",7\r\n\"E10000030\",\"Surrey\",\"RKE\",10\r\n\"E10000030\",\"Surrey\",\"RVN\",2\r\n\"E10000030\",\"Surrey\",\"RF4\",9\r\n\"E10000030\",\"Surrey\",\"RQ3\",2\r\n\"E10000030\",\"Surrey\",\"RFR\",3\r\n\"E10000030\",\"Surrey\",\"RAJ\",6\r\n\"E10000030\",\"Surrey\",\"RAP\",8\r\n\"E10000030\",\"Surrey\",\"RXK\",5\r\n\"E10000030\",\"Surrey\",\"RBK\",1\r\n\"E10000030\",\"Surrey\",\"RVY\",6\r\n\"E10000030\",\"Surrey\",\"RJE\",6\r\n\"E10000030\",\"Surrey\",\"RP4\",6\r\n\"E10000030\",\"Surrey\",\"RA3\",1\r\n\"E10000030\",\"Surrey\",\"RKB\",11\r\n\"E10000030\",\"Surrey\",\"RN7\",15\r\n\"E10000030\",\"Surrey\",\"RBZ\",20\r\n\"E10000030\",\"Surrey\",\"RWJ\",6\r\n\"E10000030\",\"Surrey\",\"RHQ\",4\r\n\"E10000030\",\"Surrey\",\"RXR\",2\r\n\"E10000030\",\"Surrey\",\"RPG\",2\r\n\"E10000030\",\"Surrey\",\"RV5\",4\r\n\"E10000030\",\"Surrey\",\"RNL\",5\r\n\"E10000030\",\"Surrey\",\"RWK\",6\r\n\"E10000030\",\"Surrey\",\"RXA\",1\r\n\"E10000030\",\"Surrey\",\"RDR\",7\r\n\"E10000030\",\"Surrey\",\"RDY\",2\r\n\"E10000030\",\"Surrey\",\"RXL\",3\r\n\"E10000030\",\"Surrey\",\"RWW\",4\r\n\"E10000030\",\"Surrey\",\"RBS\",1\r\n\"E10000030\",\"Surrey\",\"RGM\",4\r\n\"E10000030\",\"Surrey\",\"RLQ\",9\r\n\"E10000030\",\"Surrey\",\"RWX\",3\r\n\"E10000030\",\"Surrey\",\"RBQ\",2\r\n\"E10000030\",\"Surrey\",\"RBN\",4\r\n\"E10000030\",\"Surrey\",\"RCU\",1\r\n\"E10000030\",\"Surrey\",\"RAT\",2\r\n\"E10000030\",\"Surrey\",\"RAE\",3\r\n\"E10000030\",\"Surrey\",\"RBV\",4\r\n\"E10000030\",\"Surrey\",\"RRJ\",1\r\n\"E10000030\",\"Surrey\",\"RFF\",2\r\n\"E10000030\",\"Surrey\",\"RMY\",1\r\n\"E10000030\",\"Surrey\",\"RXG\",1\r\n\"E10000030\",\"Surrey\",\"RJR\",1\r\n\"E10000030\",\"Surrey\",\"RRF\",2\r\n\"E10000030\",\"Surrey\",\"RNU\",2\r\n\"E10000030\",\"Surrey\",\"RT5\",1\r\n\"E10000030\",\"Surrey\",\"RW5\",1\r\n\"E10000031\",\"Warwickshire\",\"RLT\",13160\r\n\"E10000031\",\"Warwickshire\",\"RRK\",2633\r\n\"E10000031\",\"Warwickshire\",\"RKB\",17930\r\n\"E10000031\",\"Warwickshire\",\"RTG\",165\r\n\"E10000031\",\"Warwickshire\",\"RQ3\",319\r\n\"E10000031\",\"Warwickshire\",\"RYG\",672\r\n\"E10000031\",\"Warwickshire\",\"RWE\",192\r\n\"E10000031\",\"Warwickshire\",\"RJC\",22659\r\n\"E10000031\",\"Warwickshire\",\"RJE\",37\r\n\"E10000031\",\"Warwickshire\",\"RTH\",745\r\n\"E10000031\",\"Warwickshire\",\"RWD\",33\r\n\"E10000031\",\"Warwickshire\",\"RX1\",36\r\n\"E10000031\",\"Warwickshire\",\"RXK\",68\r\n\"E10000031\",\"Warwickshire\",\"REF\",36\r\n\"E10000031\",\"Warwickshire\",\"RNA\",19\r\n\"E10000031\",\"Warwickshire\",\"R0A\",15\r\n\"E10000031\",\"Warwickshire\",\"RBK\",18\r\n\"E10000031\",\"Warwickshire\",\"RWP\",1558\r\n\"E10000031\",\"Warwickshire\",\"RRE\",5\r\n\"E10000031\",\"Warwickshire\",\"RA9\",16\r\n\"E10000031\",\"Warwickshire\",\"RTE\",70\r\n\"E10000031\",\"Warwickshire\",\"RCU\",3\r\n\"E10000031\",\"Warwickshire\",\"RD1\",11\r\n\"E10000031\",\"Warwickshire\",\"RNS\",67\r\n\"E10000031\",\"Warwickshire\",\"RVJ\",7\r\n\"E10000031\",\"Warwickshire\",\"RDU\",20\r\n\"E10000031\",\"Warwickshire\",\"RH8\",18\r\n\"E10000031\",\"Warwickshire\",\"RGP\",9\r\n\"E10000031\",\"Warwickshire\",\"RBA\",15\r\n\"E10000031\",\"Warwickshire\",\"RJL\",4\r\n\"E10000031\",\"Warwickshire\",\"RWA\",7\r\n\"E10000031\",\"Warwickshire\",\"RA2\",9\r\n\"E10000031\",\"Warwickshire\",\"RWG\",11\r\n\"E10000031\",\"Warwickshire\",\"R1K\",5\r\n\"E10000031\",\"Warwickshire\",\"RTD\",8\r\n\"E10000031\",\"Warwickshire\",\"RXH\",10\r\n\"E10000031\",\"Warwickshire\",\"R1H\",16\r\n\"E10000031\",\"Warwickshire\",\"RT5\",12\r\n\"E10000031\",\"Warwickshire\",\"RCB\",19\r\n\"E10000031\",\"Warwickshire\",\"RD8\",17\r\n\"E10000031\",\"Warwickshire\",\"RDE\",5\r\n\"E10000031\",\"Warwickshire\",\"RAS\",5\r\n\"E10000031\",\"Warwickshire\",\"RGN\",6\r\n\"E10000031\",\"Warwickshire\",\"RA7\",10\r\n\"E10000031\",\"Warwickshire\",\"RJZ\",8\r\n\"E10000031\",\"Warwickshire\",\"RM1\",10\r\n\"E10000031\",\"Warwickshire\",\"RTR\",7\r\n\"E10000031\",\"Warwickshire\",\"RAX\",5\r\n\"E10000031\",\"Warwickshire\",\"RHW\",3\r\n\"E10000031\",\"Warwickshire\",\"RA3\",7\r\n\"E10000031\",\"Warwickshire\",\"RBZ\",17\r\n\"E10000031\",\"Warwickshire\",\"RHU\",7\r\n\"E10000031\",\"Warwickshire\",\"RJ7\",11\r\n\"E10000031\",\"Warwickshire\",\"RL4\",34\r\n\"E10000031\",\"Warwickshire\",\"RTX\",14\r\n\"E10000031\",\"Warwickshire\",\"RDZ\",16\r\n\"E10000031\",\"Warwickshire\",\"RXT\",10\r\n\"E10000031\",\"Warwickshire\",\"RXW\",16\r\n\"E10000031\",\"Warwickshire\",\"RYJ\",16\r\n\"E10000031\",\"Warwickshire\",\"R1F\",8\r\n\"E10000031\",\"Warwickshire\",\"RFS\",6\r\n\"E10000031\",\"Warwickshire\",\"RVV\",7\r\n\"E10000031\",\"Warwickshire\",\"RXN\",5\r\n\"E10000031\",\"Warwickshire\",\"RBT\",6\r\n\"E10000031\",\"Warwickshire\",\"RJR\",5\r\n\"E10000031\",\"Warwickshire\",\"RPY\",4\r\n\"E10000031\",\"Warwickshire\",\"RRV\",17\r\n\"E10000031\",\"Warwickshire\",\"RWK\",1\r\n\"E10000031\",\"Warwickshire\",\"RJ1\",18\r\n\"E10000031\",\"Warwickshire\",\"REM\",16\r\n\"E10000031\",\"Warwickshire\",\"RNQ\",20\r\n\"E10000031\",\"Warwickshire\",\"RGM\",4\r\n\"E10000031\",\"Warwickshire\",\"RHM\",18\r\n\"E10000031\",\"Warwickshire\",\"RCX\",6\r\n\"E10000031\",\"Warwickshire\",\"RLQ\",6\r\n\"E10000031\",\"Warwickshire\",\"RBV\",3\r\n\"E10000031\",\"Warwickshire\",\"RGT\",16\r\n\"E10000031\",\"Warwickshire\",\"RBD\",11\r\n\"E10000031\",\"Warwickshire\",\"RHQ\",12\r\n\"E10000031\",\"Warwickshire\",\"RNL\",11\r\n\"E10000031\",\"Warwickshire\",\"RXL\",4\r\n\"E10000031\",\"Warwickshire\",\"RXQ\",6\r\n\"E10000031\",\"Warwickshire\",\"RC9\",10\r\n\"E10000031\",\"Warwickshire\",\"RK5\",10\r\n\"E10000031\",\"Warwickshire\",\"RXP\",8\r\n\"E10000031\",\"Warwickshire\",\"RWF\",10\r\n\"E10000031\",\"Warwickshire\",\"RXF\",2\r\n\"E10000031\",\"Warwickshire\",\"RD3\",10\r\n\"E10000031\",\"Warwickshire\",\"RK9\",12\r\n\"E10000031\",\"Warwickshire\",\"RMP\",1\r\n\"E10000031\",\"Warwickshire\",\"RA4\",2\r\n\"E10000031\",\"Warwickshire\",\"R0B\",3\r\n\"E10000031\",\"Warwickshire\",\"RGR\",5\r\n\"E10000031\",\"Warwickshire\",\"RJ2\",6\r\n\"E10000031\",\"Warwickshire\",\"RN5\",7\r\n\"E10000031\",\"Warwickshire\",\"RQW\",5\r\n\"E10000031\",\"Warwickshire\",\"RTP\",4\r\n\"E10000031\",\"Warwickshire\",\"RW1\",1\r\n\"E10000031\",\"Warwickshire\",\"RXG\",2\r\n\"E10000031\",\"Warwickshire\",\"RXR\",1\r\n\"E10000031\",\"Warwickshire\",\"RMC\",1\r\n\"E10000031\",\"Warwickshire\",\"RKE\",2\r\n\"E10000031\",\"Warwickshire\",\"RPA\",2\r\n\"E10000031\",\"Warwickshire\",\"RTK\",3\r\n\"E10000031\",\"Warwickshire\",\"RYR\",8\r\n\"E10000031\",\"Warwickshire\",\"RT1\",2\r\n\"E10000031\",\"Warwickshire\",\"RBL\",4\r\n\"E10000031\",\"Warwickshire\",\"RN7\",2\r\n\"E10000031\",\"Warwickshire\",\"RVW\",1\r\n\"E10000031\",\"Warwickshire\",\"RQM\",13\r\n\"E10000031\",\"Warwickshire\",\"RTF\",8\r\n\"E10000031\",\"Warwickshire\",\"RNZ\",2\r\n\"E10000031\",\"Warwickshire\",\"RWH\",4\r\n\"E10000031\",\"Warwickshire\",\"RWJ\",3\r\n\"E10000031\",\"Warwickshire\",\"RWW\",4\r\n\"E10000031\",\"Warwickshire\",\"RXC\",3\r\n\"E10000031\",\"Warwickshire\",\"RFF\",1\r\n\"E10000031\",\"Warwickshire\",\"RAJ\",1\r\n\"E10000031\",\"Warwickshire\",\"RC1\",3\r\n\"E10000031\",\"Warwickshire\",\"RX3\",1\r\n\"E10000031\",\"Warwickshire\",\"RM3\",5\r\n\"E10000031\",\"Warwickshire\",\"RL1\",1\r\n\"E10000031\",\"Warwickshire\",\"RP5\",4\r\n\"E10000031\",\"Warwickshire\",\"RAE\",1\r\n\"E10000031\",\"Warwickshire\",\"RAL\",4\r\n\"E10000031\",\"Warwickshire\",\"RBS\",1\r\n\"E10000031\",\"Warwickshire\",\"RN3\",8\r\n\"E10000031\",\"Warwickshire\",\"RRJ\",6\r\n\"E10000031\",\"Warwickshire\",\"RVR\",3\r\n\"E10000031\",\"Warwickshire\",\"R1A\",9\r\n\"E10000031\",\"Warwickshire\",\"RQX\",5\r\n\"E10000031\",\"Warwickshire\",\"RT3\",3\r\n\"E10000031\",\"Warwickshire\",\"RTQ\",2\r\n\"E10000031\",\"Warwickshire\",\"RF4\",2\r\n\"E10000031\",\"Warwickshire\",\"R1J\",2\r\n\"E10000031\",\"Warwickshire\",\"RNU\",1\r\n\"E10000031\",\"Warwickshire\",\"RP6\",2\r\n\"E10000031\",\"Warwickshire\",\"RCF\",2\r\n\"E10000031\",\"Warwickshire\",\"RRF\",1\r\n\"E10000031\",\"Warwickshire\",\"RVY\",2\r\n\"E10000031\",\"Warwickshire\",\"RW6\",1\r\n\"E10000031\",\"Warwickshire\",\"REN\",3\r\n\"E10000031\",\"Warwickshire\",\"RDD\",3\r\n\"E10000031\",\"Warwickshire\",\"RR8\",2\r\n\"E10000031\",\"Warwickshire\",\"RCD\",2\r\n\"E10000031\",\"Warwickshire\",\"RLY\",2\r\n\"E10000031\",\"Warwickshire\",\"RAP\",1\r\n\"E10000031\",\"Warwickshire\",\"RPC\",1\r\n\"E10000031\",\"Warwickshire\",\"RWY\",1\r\n\"E10000031\",\"Warwickshire\",\"RET\",1\r\n\"E10000032\",\"West Sussex\",\"RYR\",57881\r\n\"E10000032\",\"West Sussex\",\"RXH\",13485\r\n\"E10000032\",\"West Sussex\",\"RDR\",1991\r\n\"E10000032\",\"West Sussex\",\"RPC\",875\r\n\"E10000032\",\"West Sussex\",\"RX2\",625\r\n\"E10000032\",\"West Sussex\",\"RHM\",394\r\n\"E10000032\",\"West Sussex\",\"RJ1\",160\r\n\"E10000032\",\"West Sussex\",\"RTP\",17009\r\n\"E10000032\",\"West Sussex\",\"RJZ\",87\r\n\"E10000032\",\"West Sussex\",\"RJ7\",374\r\n\"E10000032\",\"West Sussex\",\"RHU\",1160\r\n\"E10000032\",\"West Sussex\",\"RA2\",1727\r\n\"E10000032\",\"West Sussex\",\"RT3\",50\r\n\"E10000032\",\"West Sussex\",\"RXC\",75\r\n\"E10000032\",\"West Sussex\",\"REF\",45\r\n\"E10000032\",\"West Sussex\",\"RWE\",11\r\n\"E10000032\",\"West Sussex\",\"RPY\",73\r\n\"E10000032\",\"West Sussex\",\"RYJ\",65\r\n\"E10000032\",\"West Sussex\",\"RGT\",21\r\n\"E10000032\",\"West Sussex\",\"RH8\",11\r\n\"E10000032\",\"West Sussex\",\"RDE\",23\r\n\"E10000032\",\"West Sussex\",\"RDU\",112\r\n\"E10000032\",\"West Sussex\",\"RTE\",15\r\n\"E10000032\",\"West Sussex\",\"RWF\",155\r\n\"E10000032\",\"West Sussex\",\"RRK\",21\r\n\"E10000032\",\"West Sussex\",\"RNZ\",24\r\n\"E10000032\",\"West Sussex\",\"R1H\",76\r\n\"E10000032\",\"West Sussex\",\"RA7\",11\r\n\"E10000032\",\"West Sussex\",\"RJC\",13\r\n\"E10000032\",\"West Sussex\",\"RDZ\",32\r\n\"E10000032\",\"West Sussex\",\"RTH\",48\r\n\"E10000032\",\"West Sussex\",\"RAL\",21\r\n\"E10000032\",\"West Sussex\",\"RBA\",11\r\n\"E10000032\",\"West Sussex\",\"RWG\",10\r\n\"E10000032\",\"West Sussex\",\"R1K\",27\r\n\"E10000032\",\"West Sussex\",\"RAS\",17\r\n\"E10000032\",\"West Sussex\",\"RJ2\",18\r\n\"E10000032\",\"West Sussex\",\"RXW\",10\r\n\"E10000032\",\"West Sussex\",\"RAX\",24\r\n\"E10000032\",\"West Sussex\",\"RN3\",13\r\n\"E10000032\",\"West Sussex\",\"RNL\",4\r\n\"E10000032\",\"West Sussex\",\"RRV\",67\r\n\"E10000032\",\"West Sussex\",\"RVJ\",11\r\n\"E10000032\",\"West Sussex\",\"RXQ\",16\r\n\"E10000032\",\"West Sussex\",\"RVR\",147\r\n\"E10000032\",\"West Sussex\",\"R1F\",23\r\n\"E10000032\",\"West Sussex\",\"RJE\",7\r\n\"E10000032\",\"West Sussex\",\"RDD\",7\r\n\"E10000032\",\"West Sussex\",\"RQM\",51\r\n\"E10000032\",\"West Sussex\",\"RXL\",3\r\n\"E10000032\",\"West Sussex\",\"RF4\",4\r\n\"E10000032\",\"West Sussex\",\"RJL\",3\r\n\"E10000032\",\"West Sussex\",\"RC1\",9\r\n\"E10000032\",\"West Sussex\",\"RVV\",20\r\n\"E10000032\",\"West Sussex\",\"RJ6\",40\r\n\"E10000032\",\"West Sussex\",\"RTK\",33\r\n\"E10000032\",\"West Sussex\",\"RD1\",27\r\n\"E10000032\",\"West Sussex\",\"RA9\",10\r\n\"E10000032\",\"West Sussex\",\"RHW\",20\r\n\"E10000032\",\"West Sussex\",\"RCB\",9\r\n\"E10000032\",\"West Sussex\",\"RBD\",25\r\n\"E10000032\",\"West Sussex\",\"RN5\",25\r\n\"E10000032\",\"West Sussex\",\"RWH\",10\r\n\"E10000032\",\"West Sussex\",\"RLQ\",6\r\n\"E10000032\",\"West Sussex\",\"RBZ\",14\r\n\"E10000032\",\"West Sussex\",\"RD3\",22\r\n\"E10000032\",\"West Sussex\",\"RD8\",6\r\n\"E10000032\",\"West Sussex\",\"RQW\",5\r\n\"E10000032\",\"West Sussex\",\"RKB\",7\r\n\"E10000032\",\"West Sussex\",\"RA4\",15\r\n\"E10000032\",\"West Sussex\",\"RBT\",6\r\n\"E10000032\",\"West Sussex\",\"RPA\",8\r\n\"E10000032\",\"West Sussex\",\"RWY\",3\r\n\"E10000032\",\"West Sussex\",\"RBN\",4\r\n\"E10000032\",\"West Sussex\",\"RBV\",3\r\n\"E10000032\",\"West Sussex\",\"RGP\",9\r\n\"E10000032\",\"West Sussex\",\"RTX\",9\r\n\"E10000032\",\"West Sussex\",\"RGR\",5\r\n\"E10000032\",\"West Sussex\",\"RQ8\",7\r\n\"E10000032\",\"West Sussex\",\"RLT\",3\r\n\"E10000032\",\"West Sussex\",\"RP6\",35\r\n\"E10000032\",\"West Sussex\",\"RQX\",8\r\n\"E10000032\",\"West Sussex\",\"RWW\",3\r\n\"E10000032\",\"West Sussex\",\"RAP\",3\r\n\"E10000032\",\"West Sussex\",\"RCF\",2\r\n\"E10000032\",\"West Sussex\",\"RCX\",6\r\n\"E10000032\",\"West Sussex\",\"REM\",8\r\n\"E10000032\",\"West Sussex\",\"RTF\",8\r\n\"E10000032\",\"West Sussex\",\"RXK\",6\r\n\"E10000032\",\"West Sussex\",\"RXX\",10\r\n\"E10000032\",\"West Sussex\",\"R0A\",7\r\n\"E10000032\",\"West Sussex\",\"RFS\",4\r\n\"E10000032\",\"West Sussex\",\"RWD\",7\r\n\"E10000032\",\"West Sussex\",\"RC9\",3\r\n\"E10000032\",\"West Sussex\",\"RX1\",10\r\n\"E10000032\",\"West Sussex\",\"RP4\",2\r\n\"E10000032\",\"West Sussex\",\"RP5\",2\r\n\"E10000032\",\"West Sussex\",\"RM1\",6\r\n\"E10000032\",\"West Sussex\",\"RFF\",2\r\n\"E10000032\",\"West Sussex\",\"RNQ\",4\r\n\"E10000032\",\"West Sussex\",\"RA3\",1\r\n\"E10000032\",\"West Sussex\",\"RAE\",8\r\n\"E10000032\",\"West Sussex\",\"RGN\",5\r\n\"E10000032\",\"West Sussex\",\"RVW\",3\r\n\"E10000032\",\"West Sussex\",\"RW1\",14\r\n\"E10000032\",\"West Sussex\",\"RXR\",6\r\n\"E10000032\",\"West Sussex\",\"RL4\",3\r\n\"E10000032\",\"West Sussex\",\"RQ3\",2\r\n\"E10000032\",\"West Sussex\",\"RHQ\",5\r\n\"E10000032\",\"West Sussex\",\"RXP\",4\r\n\"E10000032\",\"West Sussex\",\"RBS\",2\r\n\"E10000032\",\"West Sussex\",\"RK5\",1\r\n\"E10000032\",\"West Sussex\",\"RN7\",12\r\n\"E10000032\",\"West Sussex\",\"RWP\",6\r\n\"E10000032\",\"West Sussex\",\"RFR\",1\r\n\"E10000032\",\"West Sussex\",\"RTD\",3\r\n\"E10000032\",\"West Sussex\",\"RAJ\",5\r\n\"E10000032\",\"West Sussex\",\"RK9\",9\r\n\"E10000032\",\"West Sussex\",\"RKE\",3\r\n\"E10000032\",\"West Sussex\",\"RWK\",5\r\n\"E10000032\",\"West Sussex\",\"RNS\",5\r\n\"E10000032\",\"West Sussex\",\"RGM\",2\r\n\"E10000032\",\"West Sussex\",\"RP7\",1\r\n\"E10000032\",\"West Sussex\",\"RPG\",1\r\n\"E10000032\",\"West Sussex\",\"RBL\",1\r\n\"E10000032\",\"West Sussex\",\"RXN\",1\r\n\"E10000032\",\"West Sussex\",\"RMP\",1\r\n\"E10000032\",\"West Sussex\",\"RW6\",4\r\n\"E10000032\",\"West Sussex\",\"RTG\",8\r\n\"E10000032\",\"West Sussex\",\"RTR\",4\r\n\"E10000032\",\"West Sussex\",\"RWX\",1\r\n\"E10000032\",\"West Sussex\",\"RAN\",4\r\n\"E10000032\",\"West Sussex\",\"RM3\",1\r\n\"E10000032\",\"West Sussex\",\"RX4\",2\r\n\"E10000032\",\"West Sussex\",\"RCD\",2\r\n\"E10000032\",\"West Sussex\",\"RBK\",2\r\n\"E10000032\",\"West Sussex\",\"RJR\",2\r\n\"E10000032\",\"West Sussex\",\"RP1\",1\r\n\"E10000032\",\"West Sussex\",\"RWA\",2\r\n\"E10000032\",\"West Sussex\",\"RXY\",1\r\n\"E10000032\",\"West Sussex\",\"RJ8\",1\r\n\"E10000032\",\"West Sussex\",\"RVN\",1\r\n\"E10000032\",\"West Sussex\",\"RHA\",1\r\n\"E10000032\",\"West Sussex\",\"RX3\",3\r\n\"E10000032\",\"West Sussex\",\"RH5\",1\r\n\"E10000032\",\"West Sussex\",\"RR8\",1\r\n\"E10000032\",\"West Sussex\",\"RXF\",1\r\n\"E10000034\",\"Worcestershire\",\"RWP\",48147\r\n\"E10000034\",\"Worcestershire\",\"RRK\",3943\r\n\"E10000034\",\"Worcestershire\",\"RNA\",1063\r\n\"E10000034\",\"Worcestershire\",\"R1A\",2001\r\n\"E10000034\",\"Worcestershire\",\"RQ3\",684\r\n\"E10000034\",\"Worcestershire\",\"RXK\",187\r\n\"E10000034\",\"Worcestershire\",\"RKB\",190\r\n\"E10000034\",\"Worcestershire\",\"RJC\",326\r\n\"E10000034\",\"Worcestershire\",\"RL4\",100\r\n\"E10000034\",\"Worcestershire\",\"RBK\",20\r\n\"E10000034\",\"Worcestershire\",\"RJE\",37\r\n\"E10000034\",\"Worcestershire\",\"RA3\",25\r\n\"E10000034\",\"Worcestershire\",\"RA9\",35\r\n\"E10000034\",\"Worcestershire\",\"RRJ\",89\r\n\"E10000034\",\"Worcestershire\",\"RTH\",74\r\n\"E10000034\",\"Worcestershire\",\"RWE\",17\r\n\"E10000034\",\"Worcestershire\",\"RQM\",9\r\n\"E10000034\",\"Worcestershire\",\"REF\",50\r\n\"E10000034\",\"Worcestershire\",\"RH8\",30\r\n\"E10000034\",\"Worcestershire\",\"RHU\",13\r\n\"E10000034\",\"Worcestershire\",\"RXT\",11\r\n\"E10000034\",\"Worcestershire\",\"RAX\",6\r\n\"E10000034\",\"Worcestershire\",\"RLQ\",428\r\n\"E10000034\",\"Worcestershire\",\"RDU\",18\r\n\"E10000034\",\"Worcestershire\",\"RYW\",4\r\n\"E10000034\",\"Worcestershire\",\"RXW\",35\r\n\"E10000034\",\"Worcestershire\",\"RX1\",19\r\n\"E10000034\",\"Worcestershire\",\"RD3\",9\r\n\"E10000034\",\"Worcestershire\",\"RNS\",7\r\n\"E10000034\",\"Worcestershire\",\"RRV\",6\r\n\"E10000034\",\"Worcestershire\",\"RYG\",10\r\n\"E10000034\",\"Worcestershire\",\"RA7\",45\r\n\"E10000034\",\"Worcestershire\",\"RHW\",7\r\n\"E10000034\",\"Worcestershire\",\"RD1\",13\r\n\"E10000034\",\"Worcestershire\",\"RGN\",6\r\n\"E10000034\",\"Worcestershire\",\"RWA\",5\r\n\"E10000034\",\"Worcestershire\",\"RBT\",6\r\n\"E10000034\",\"Worcestershire\",\"RF4\",4\r\n\"E10000034\",\"Worcestershire\",\"RM1\",7\r\n\"E10000034\",\"Worcestershire\",\"RTG\",15\r\n\"E10000034\",\"Worcestershire\",\"RTE\",1072\r\n\"E10000034\",\"Worcestershire\",\"TAJ\",6\r\n\"E10000034\",\"Worcestershire\",\"RBZ\",10\r\n\"E10000034\",\"Worcestershire\",\"RTF\",5\r\n\"E10000034\",\"Worcestershire\",\"RWF\",5\r\n\"E10000034\",\"Worcestershire\",\"RBA\",17\r\n\"E10000034\",\"Worcestershire\",\"RDZ\",7\r\n\"E10000034\",\"Worcestershire\",\"RLT\",2\r\n\"E10000034\",\"Worcestershire\",\"RVJ\",41\r\n\"E10000034\",\"Worcestershire\",\"RBL\",3\r\n\"E10000034\",\"Worcestershire\",\"RJ2\",1\r\n\"E10000034\",\"Worcestershire\",\"RJL\",5\r\n\"E10000034\",\"Worcestershire\",\"RK5\",5\r\n\"E10000034\",\"Worcestershire\",\"RLY\",3\r\n\"E10000034\",\"Worcestershire\",\"RC9\",1\r\n\"E10000034\",\"Worcestershire\",\"RGM\",1\r\n\"E10000034\",\"Worcestershire\",\"RTR\",4\r\n\"E10000034\",\"Worcestershire\",\"RTX\",9\r\n\"E10000034\",\"Worcestershire\",\"RWY\",4\r\n\"E10000034\",\"Worcestershire\",\"RXF\",5\r\n\"E10000034\",\"Worcestershire\",\"RJN\",2\r\n\"E10000034\",\"Worcestershire\",\"RTP\",4\r\n\"E10000034\",\"Worcestershire\",\"RWG\",7\r\n\"E10000034\",\"Worcestershire\",\"RXN\",2\r\n\"E10000034\",\"Worcestershire\",\"R0A\",13\r\n\"E10000034\",\"Worcestershire\",\"RDD\",3\r\n\"E10000034\",\"Worcestershire\",\"RDE\",2\r\n\"E10000034\",\"Worcestershire\",\"RN5\",11\r\n\"E10000034\",\"Worcestershire\",\"RQX\",1\r\n\"E10000034\",\"Worcestershire\",\"RWD\",5\r\n\"E10000034\",\"Worcestershire\",\"RWJ\",2\r\n\"E10000034\",\"Worcestershire\",\"RA2\",8\r\n\"E10000034\",\"Worcestershire\",\"RA4\",7\r\n\"E10000034\",\"Worcestershire\",\"RJ7\",8\r\n\"E10000034\",\"Worcestershire\",\"RTK\",1\r\n\"E10000034\",\"Worcestershire\",\"RXM\",1\r\n\"E10000034\",\"Worcestershire\",\"RYR\",7\r\n\"E10000034\",\"Worcestershire\",\"RBV\",4\r\n\"E10000034\",\"Worcestershire\",\"RC1\",3\r\n\"E10000034\",\"Worcestershire\",\"RCB\",13\r\n\"E10000034\",\"Worcestershire\",\"RCX\",4\r\n\"E10000034\",\"Worcestershire\",\"RN7\",4\r\n\"E10000034\",\"Worcestershire\",\"RAL\",3\r\n\"E10000034\",\"Worcestershire\",\"RNL\",6\r\n\"E10000034\",\"Worcestershire\",\"RR8\",3\r\n\"E10000034\",\"Worcestershire\",\"RVR\",5\r\n\"E10000034\",\"Worcestershire\",\"RJZ\",6\r\n\"E10000034\",\"Worcestershire\",\"RPA\",3\r\n\"E10000034\",\"Worcestershire\",\"RTD\",6\r\n\"E10000034\",\"Worcestershire\",\"RVW\",1\r\n\"E10000034\",\"Worcestershire\",\"RFF\",10\r\n\"E10000034\",\"Worcestershire\",\"RN3\",21\r\n\"E10000034\",\"Worcestershire\",\"R1J\",4\r\n\"E10000034\",\"Worcestershire\",\"RR7\",3\r\n\"E10000034\",\"Worcestershire\",\"REM\",7\r\n\"E10000034\",\"Worcestershire\",\"RXC\",4\r\n\"E10000034\",\"Worcestershire\",\"R1F\",9\r\n\"E10000034\",\"Worcestershire\",\"RJ1\",12\r\n\"E10000034\",\"Worcestershire\",\"RK9\",10\r\n\"E10000034\",\"Worcestershire\",\"RPY\",3\r\n\"E10000034\",\"Worcestershire\",\"RD8\",5\r\n\"E10000034\",\"Worcestershire\",\"RJR\",3\r\n\"E10000034\",\"Worcestershire\",\"RYJ\",11\r\n\"E10000034\",\"Worcestershire\",\"RCF\",2\r\n\"E10000034\",\"Worcestershire\",\"RNQ\",3\r\n\"E10000034\",\"Worcestershire\",\"RW6\",3\r\n\"E10000034\",\"Worcestershire\",\"RCD\",1\r\n\"E10000034\",\"Worcestershire\",\"RMP\",1\r\n\"E10000034\",\"Worcestershire\",\"RP6\",2\r\n\"E10000034\",\"Worcestershire\",\"RWX\",1\r\n\"E10000034\",\"Worcestershire\",\"RAS\",3\r\n\"E10000034\",\"Worcestershire\",\"RGR\",3\r\n\"E10000034\",\"Worcestershire\",\"RHM\",9\r\n\"E10000034\",\"Worcestershire\",\"RNZ\",7\r\n\"E10000034\",\"Worcestershire\",\"R0B\",3\r\n\"E10000034\",\"Worcestershire\",\"RP4\",1\r\n\"E10000034\",\"Worcestershire\",\"RAN\",1\r\n\"E10000034\",\"Worcestershire\",\"RXH\",4\r\n\"E10000034\",\"Worcestershire\",\"RXP\",5\r\n\"E10000034\",\"Worcestershire\",\"RBD\",12\r\n\"E10000034\",\"Worcestershire\",\"R1H\",12\r\n\"E10000034\",\"Worcestershire\",\"RXL\",6\r\n\"E10000034\",\"Worcestershire\",\"RHQ\",6\r\n\"E10000034\",\"Worcestershire\",\"RT3\",5\r\n\"E10000034\",\"Worcestershire\",\"RQW\",3\r\n\"E10000034\",\"Worcestershire\",\"RGT\",3\r\n\"E10000034\",\"Worcestershire\",\"RFR\",1\r\n\"E10000034\",\"Worcestershire\",\"RAJ\",1\r\n\"E10000034\",\"Worcestershire\",\"RAE\",1\r\n\"E10000034\",\"Worcestershire\",\"RVY\",4\r\n\"E10000034\",\"Worcestershire\",\"RXQ\",2\r\n\"E10000034\",\"Worcestershire\",\"RM3\",4\r\n\"E10000034\",\"Worcestershire\",\"RTQ\",9\r\n\"E10000034\",\"Worcestershire\",\"RWW\",2\r\n\"E10000034\",\"Worcestershire\",\"RP5\",2\r\n\"E10000034\",\"Worcestershire\",\"RBS\",3\r\n\"E10000034\",\"Worcestershire\",\"RXR\",1\r\n\"E10000034\",\"Worcestershire\",\"R1K\",4\r\n\"E10000034\",\"Worcestershire\",\"RFS\",5\r\n\"E10000034\",\"Worcestershire\",\"RT5\",1\r\n\"E10000034\",\"Worcestershire\",\"RQ8\",2\r\n\"E10000034\",\"Worcestershire\",\"RGP\",2\r\n\"E10000034\",\"Worcestershire\",\"RDY\",1\r\n\"E10000034\",\"Worcestershire\",\"RWH\",2\r\n\"E10000034\",\"Worcestershire\",\"RET\",2\r\n\"E10000034\",\"Worcestershire\",\"RVV\",1\r\n\"E10000034\",\"Worcestershire\",\"REP\",1\r\n\"E10000034\",\"Worcestershire\",\"R1D\",1\r\n\"E10000034\",\"Worcestershire\",\"RL1\",1\r\n\"E10000015\",\"Hertfordshire\",\"RBN\",2\r\n\"E10000015\",\"Hertfordshire\",\"RFS\",4\r\n\"E10000015\",\"Hertfordshire\",\"RH5\",1\r\n\"E10000015\",\"Hertfordshire\",\"RJL\",4\r\n\"E10000015\",\"Hertfordshire\",\"RX4\",1\r\n\"E10000015\",\"Hertfordshire\",\"TAD\",1\r\n\"E10000015\",\"Hertfordshire\",\"RMP\",2\r\nNA,NA,\"RMY\",1\r\n\"E08000001\",\"Bolton\",\"RMC\",27522\r\n\"E08000001\",\"Bolton\",\"RM3\",1392\r\n\"E08000001\",\"Bolton\",\"R0A\",1213\r\n\"E08000001\",\"Bolton\",\"RRF\",461\r\n\"E08000001\",\"Bolton\",\"RW6\",326\r\n\"E08000001\",\"Bolton\",\"RBV\",308\r\n\"E08000001\",\"Bolton\",\"RXN\",237\r\n\"E08000001\",\"Bolton\",\"RXR\",235\r\n\"E08000001\",\"Bolton\",\"RXL\",39\r\n\"E08000001\",\"Bolton\",\"RBS\",36\r\n\"E08000001\",\"Bolton\",\"RTX\",29\r\n\"E08000001\",\"Bolton\",\"RWJ\",25\r\n\"E08000001\",\"Bolton\",\"RR8\",20\r\n\"E08000001\",\"Bolton\",\"REM\",23\r\n\"E08000001\",\"Bolton\",\"RBN\",15\r\n\"E08000001\",\"Bolton\",\"RVY\",15\r\n\"E08000001\",\"Bolton\",\"RWW\",14\r\n\"E08000001\",\"Bolton\",\"RTV\",12\r\n\"E08000001\",\"Bolton\",\"RCB\",12\r\n\"E08000001\",\"Bolton\",\"RMP\",11\r\n\"E08000001\",\"Bolton\",\"R1H\",11\r\n\"E08000001\",\"Bolton\",\"RTD\",9\r\n\"E08000001\",\"Bolton\",\"RXF\",9\r\n\"E08000001\",\"Bolton\",\"RJE\",8\r\n\"E08000001\",\"Bolton\",\"RAE\",7\r\n\"E08000001\",\"Bolton\",\"RRV\",8\r\n\"E08000001\",\"Bolton\",\"RTE\",7\r\n\"E08000001\",\"Bolton\",\"RBL\",7\r\n\"E08000001\",\"Bolton\",\"RF4\",7\r\n\"E08000001\",\"Bolton\",\"RNL\",7\r\n\"E08000001\",\"Bolton\",\"RHQ\",6\r\n\"E08000001\",\"Bolton\",\"RLQ\",6\r\n\"E08000001\",\"Bolton\",\"RX1\",6\r\n\"E08000001\",\"Bolton\",\"RJR\",6\r\n\"E08000001\",\"Bolton\",\"RFF\",6\r\n\"E08000001\",\"Bolton\",\"RCF\",5\r\n\"E08000001\",\"Bolton\",\"RQW\",5\r\n\"E08000001\",\"Bolton\",\"RRK\",9\r\n\"E08000001\",\"Bolton\",\"RWE\",5\r\n\"E08000001\",\"Bolton\",\"RXQ\",5\r\n\"E08000001\",\"Bolton\",\"RWA\",5\r\n\"E08000001\",\"Bolton\",\"RKB\",5\r\n\"E08000001\",\"Bolton\",\"RDU\",4\r\n\"E08000001\",\"Bolton\",\"REF\",4\r\n\"E08000001\",\"Bolton\",\"R1K\",4\r\n\"E08000001\",\"Bolton\",\"RWY\",4\r\n\"E08000001\",\"Bolton\",\"RJ1\",4\r\n\"E08000001\",\"Bolton\",\"RBT\",4\r\n\"E08000001\",\"Bolton\",\"RQM\",4\r\n\"E08000001\",\"Bolton\",\"RWD\",4\r\n\"E08000001\",\"Bolton\",\"RC9\",4\r\n\"E08000001\",\"Bolton\",\"RFR\",3\r\n\"E08000001\",\"Bolton\",\"RH8\",3\r\n\"E08000001\",\"Bolton\",\"RN3\",3\r\n\"E08000001\",\"Bolton\",\"RXP\",3\r\n\"E08000001\",\"Bolton\",\"RA9\",3\r\n\"E08000001\",\"Bolton\",\"RHM\",3\r\n\"E08000001\",\"Bolton\",\"RTH\",3\r\n\"E08000001\",\"Bolton\",\"RDZ\",3\r\n\"E08000001\",\"Bolton\",\"RAL\",2\r\n\"E08000001\",\"Bolton\",\"RET\",2\r\n\"E08000001\",\"Bolton\",\"RN7\",2\r\n\"E08000001\",\"Bolton\",\"RW5\",2\r\n\"E08000001\",\"Bolton\",\"RGN\",2\r\n\"E08000001\",\"Bolton\",\"RL4\",2\r\n\"E08000001\",\"Bolton\",\"RVV\",2\r\n\"E08000001\",\"Bolton\",\"RJ2\",2\r\n\"E08000001\",\"Bolton\",\"RP5\",2\r\n\"E08000001\",\"Bolton\",\"RBQ\",2\r\n\"E08000001\",\"Bolton\",\"RD3\",2\r\n\"E08000001\",\"Bolton\",\"RM1\",2\r\n\"E08000001\",\"Bolton\",\"RXW\",3\r\n\"E08000001\",\"Bolton\",\"RAP\",2\r\n\"E08000001\",\"Bolton\",\"RAX\",2\r\n\"E08000001\",\"Bolton\",\"RJZ\",2\r\n\"E08000001\",\"Bolton\",\"RT3\",2\r\n\"E08000001\",\"Bolton\",\"RXK\",3\r\n\"E08000001\",\"Bolton\",\"RBZ\",2\r\n\"E08000001\",\"Bolton\",\"RRE\",2\r\n\"E08000001\",\"Bolton\",\"RHU\",2\r\n\"E08000001\",\"Bolton\",\"RJ7\",2\r\n\"E08000001\",\"Bolton\",\"RTG\",2\r\n\"E08000001\",\"Bolton\",\"RXA\",1\r\n\"E08000001\",\"Bolton\",\"RD1\",1\r\n\"E08000001\",\"Bolton\",\"RTP\",1\r\n\"E08000001\",\"Bolton\",\"REN\",1\r\n\"E08000001\",\"Bolton\",\"RNU\",1\r\n\"E08000001\",\"Bolton\",\"RQX\",1\r\n\"E08000001\",\"Bolton\",\"RTR\",2\r\n\"E08000001\",\"Bolton\",\"RWP\",1\r\n\"E08000001\",\"Bolton\",\"RCX\",1\r\n\"E08000001\",\"Bolton\",\"RGT\",1\r\n\"E08000001\",\"Bolton\",\"RHW\",1\r\n\"E08000001\",\"Bolton\",\"RJL\",1\r\n\"E08000001\",\"Bolton\",\"RK9\",1\r\n\"E08000001\",\"Bolton\",\"RPA\",1\r\n\"E08000001\",\"Bolton\",\"RVW\",1\r\n\"E08000001\",\"Bolton\",\"RWG\",1\r\n\"E08000001\",\"Bolton\",\"RWH\",1\r\n\"E08000001\",\"Bolton\",\"RCU\",1\r\n\"E08000001\",\"Bolton\",\"RFS\",1\r\n\"E08000001\",\"Bolton\",\"RGP\",1\r\n\"E08000001\",\"Bolton\",\"RNQ\",1\r\n\"E08000001\",\"Bolton\",\"RQ3\",1\r\n\"E08000001\",\"Bolton\",\"RVR\",1\r\n\"E08000001\",\"Bolton\",\"R1F\",1\r\n\"E08000001\",\"Bolton\",\"RBD\",1\r\n\"E08000001\",\"Bolton\",\"RCD\",1\r\n\"E08000001\",\"Bolton\",\"RJ6\",1\r\n\"E08000001\",\"Bolton\",\"R0B\",1\r\n\"E08000001\",\"Bolton\",\"RN5\",1\r\n\"E08000001\",\"Bolton\",\"RXH\",1\r\n\"E08000001\",\"Bolton\",\"RA7\",1\r\n\"E08000001\",\"Bolton\",\"RD8\",1\r\n\"E08000001\",\"Bolton\",\"RK5\",1\r\n\"E08000001\",\"Bolton\",\"RLY\",1\r\n\"E08000002\",\"Bury\",\"RW6\",18997\r\n\"E08000002\",\"Bury\",\"R0A\",1345\r\n\"E08000002\",\"Bury\",\"RM3\",1168\r\n\"E08000002\",\"Bury\",\"RMC\",1115\r\n\"E08000002\",\"Bury\",\"RBV\",341\r\n\"E08000002\",\"Bury\",\"RXR\",86\r\n\"E08000002\",\"Bury\",\"RXN\",28\r\n\"E08000002\",\"Bury\",\"RBS\",24\r\n\"E08000002\",\"Bury\",\"RMP\",24\r\n\"E08000002\",\"Bury\",\"RXL\",22\r\n\"E08000002\",\"Bury\",\"RRF\",19\r\n\"E08000002\",\"Bury\",\"RTX\",18\r\n\"E08000002\",\"Bury\",\"RR8\",16\r\n\"E08000002\",\"Bury\",\"RWJ\",16\r\n\"E08000002\",\"Bury\",\"RVY\",14\r\n\"E08000002\",\"Bury\",\"RWW\",13\r\n\"E08000002\",\"Bury\",\"REM\",14\r\n\"E08000002\",\"Bury\",\"RBT\",9\r\n\"E08000002\",\"Bury\",\"RTD\",7\r\n\"E08000002\",\"Bury\",\"RHQ\",6\r\n\"E08000002\",\"Bury\",\"RBN\",6\r\n\"E08000002\",\"Bury\",\"RJR\",5\r\n\"E08000002\",\"Bury\",\"RCF\",5\r\n\"E08000002\",\"Bury\",\"R1H\",5\r\n\"E08000002\",\"Bury\",\"RJE\",5\r\n\"E08000002\",\"Bury\",\"R1K\",5\r\n\"E08000002\",\"Bury\",\"RA9\",5\r\n\"E08000002\",\"Bury\",\"RAE\",5\r\n\"E08000002\",\"Bury\",\"RRK\",9\r\n\"E08000002\",\"Bury\",\"RCB\",4\r\n\"E08000002\",\"Bury\",\"RJL\",4\r\n\"E08000002\",\"Bury\",\"RNL\",4\r\n\"E08000002\",\"Bury\",\"RAL\",4\r\n\"E08000002\",\"Bury\",\"RQM\",4\r\n\"E08000002\",\"Bury\",\"RXP\",4\r\n\"E08000002\",\"Bury\",\"RBA\",3\r\n\"E08000002\",\"Bury\",\"RBQ\",3\r\n\"E08000002\",\"Bury\",\"RGP\",3\r\n\"E08000002\",\"Bury\",\"RM1\",3\r\n\"E08000002\",\"Bury\",\"RTG\",3\r\n\"E08000002\",\"Bury\",\"RX1\",3\r\n\"E08000002\",\"Bury\",\"RA2\",3\r\n\"E08000002\",\"Bury\",\"RTE\",3\r\n\"E08000002\",\"Bury\",\"RWA\",3\r\n\"E08000002\",\"Bury\",\"RJ7\",3\r\n\"E08000002\",\"Bury\",\"RRV\",3\r\n\"E08000002\",\"Bury\",\"RCD\",2\r\n\"E08000002\",\"Bury\",\"RFF\",2\r\n\"E08000002\",\"Bury\",\"RVJ\",2\r\n\"E08000002\",\"Bury\",\"RA7\",2\r\n\"E08000002\",\"Bury\",\"RCU\",2\r\n\"E08000002\",\"Bury\",\"RTP\",2\r\n\"E08000002\",\"Bury\",\"RDU\",2\r\n\"E08000002\",\"Bury\",\"RD8\",2\r\n\"E08000002\",\"Bury\",\"RH8\",2\r\n\"E08000002\",\"Bury\",\"RQW\",2\r\n\"E08000002\",\"Bury\",\"RVR\",2\r\n\"E08000002\",\"Bury\",\"RTV\",2\r\n\"E08000002\",\"Bury\",\"RBL\",2\r\n\"E08000002\",\"Bury\",\"RN3\",2\r\n\"E08000002\",\"Bury\",\"RWG\",2\r\n\"E08000002\",\"Bury\",\"RWY\",2\r\n\"E08000002\",\"Bury\",\"RA3\",1\r\n\"E08000002\",\"Bury\",\"RAX\",1\r\n\"E08000002\",\"Bury\",\"RD1\",1\r\n\"E08000002\",\"Bury\",\"RJ2\",2\r\n\"E08000002\",\"Bury\",\"RJC\",1\r\n\"E08000002\",\"Bury\",\"RVW\",1\r\n\"E08000002\",\"Bury\",\"RJN\",1\r\n\"E08000002\",\"Bury\",\"RVV\",1\r\n\"E08000002\",\"Bury\",\"RA4\",1\r\n\"E08000002\",\"Bury\",\"RAS\",1\r\n\"E08000002\",\"Bury\",\"RBK\",1\r\n\"E08000002\",\"Bury\",\"RGR\",1\r\n\"E08000002\",\"Bury\",\"RK5\",1\r\n\"E08000002\",\"Bury\",\"RL4\",1\r\n\"E08000002\",\"Bury\",\"RHM\",1\r\n\"E08000002\",\"Bury\",\"RKB\",1\r\n\"E08000002\",\"Bury\",\"RNQ\",1\r\n\"E08000002\",\"Bury\",\"RPC\",1\r\n\"E08000002\",\"Bury\",\"RGT\",1\r\n\"E08000002\",\"Bury\",\"RK9\",1\r\n\"E08000002\",\"Bury\",\"RNU\",1\r\n\"E08000002\",\"Bury\",\"RRJ\",1\r\n\"E08000002\",\"Bury\",\"RWP\",1\r\n\"E08000002\",\"Bury\",\"RX3\",1\r\n\"E08000002\",\"Bury\",\"RXC\",1\r\n\"E08000002\",\"Bury\",\"RXE\",1\r\n\"E08000002\",\"Bury\",\"REF\",1\r\n\"E08000002\",\"Bury\",\"RQ8\",1\r\n\"E08000002\",\"Bury\",\"RTH\",1\r\n\"E08000002\",\"Bury\",\"RWD\",1\r\n\"E08000002\",\"Bury\",\"RXW\",2\r\n\"E08000002\",\"Bury\",\"RYR\",1\r\n\"E08000002\",\"Bury\",\"RN7\",1\r\n\"E08000002\",\"Bury\",\"RWF\",1\r\n\"E08000002\",\"Bury\",\"TAJ\",1\r\n\"E08000002\",\"Bury\",\"RC1\",1\r\n\"E08000002\",\"Bury\",\"RJ1\",1\r\n\"E08000002\",\"Bury\",\"RP5\",1\r\n\"E08000002\",\"Bury\",\"RW5\",1\r\n\"E08000003\",\"Manchester\",\"R0A\",48911\r\n\"E08000003\",\"Manchester\",\"RW6\",16401\r\n\"E08000003\",\"Manchester\",\"RM3\",1783\r\n\"E08000003\",\"Manchester\",\"RBV\",794\r\n\"E08000003\",\"Manchester\",\"RWJ\",619\r\n\"E08000003\",\"Manchester\",\"RMP\",298\r\n\"E08000003\",\"Manchester\",\"RXL\",46\r\n\"E08000003\",\"Manchester\",\"RMC\",45\r\n\"E08000003\",\"Manchester\",\"RR8\",42\r\n\"E08000003\",\"Manchester\",\"RXR\",36\r\n\"E08000003\",\"Manchester\",\"R1H\",34\r\n\"E08000003\",\"Manchester\",\"RBT\",33\r\n\"E08000003\",\"Manchester\",\"RJN\",29\r\n\"E08000003\",\"Manchester\",\"RHQ\",28\r\n\"E08000003\",\"Manchester\",\"REM\",36\r\n\"E08000003\",\"Manchester\",\"RBS\",26\r\n\"E08000003\",\"Manchester\",\"RTX\",24\r\n\"E08000003\",\"Manchester\",\"RXN\",24\r\n\"E08000003\",\"Manchester\",\"RWW\",23\r\n\"E08000003\",\"Manchester\",\"RJE\",22\r\n\"E08000003\",\"Manchester\",\"RBN\",22\r\n\"E08000003\",\"Manchester\",\"RRF\",22\r\n\"E08000003\",\"Manchester\",\"RCB\",20\r\n\"E08000003\",\"Manchester\",\"RAE\",20\r\n\"E08000003\",\"Manchester\",\"RRV\",16\r\n\"E08000003\",\"Manchester\",\"RX1\",15\r\n\"E08000003\",\"Manchester\",\"RBL\",15\r\n\"E08000003\",\"Manchester\",\"RJR\",14\r\n\"E08000003\",\"Manchester\",\"RRK\",24\r\n\"E08000003\",\"Manchester\",\"RXK\",19\r\n\"E08000003\",\"Manchester\",\"RDU\",13\r\n\"E08000003\",\"Manchester\",\"RTG\",14\r\n\"E08000003\",\"Manchester\",\"RWY\",12\r\n\"E08000003\",\"Manchester\",\"RTD\",11\r\n\"E08000003\",\"Manchester\",\"RYJ\",11\r\n\"E08000003\",\"Manchester\",\"RJ7\",11\r\n\"E08000003\",\"Manchester\",\"RVJ\",11\r\n\"E08000003\",\"Manchester\",\"RNL\",10\r\n\"E08000003\",\"Manchester\",\"RTH\",10\r\n\"E08000003\",\"Manchester\",\"RVY\",11\r\n\"E08000003\",\"Manchester\",\"RQM\",10\r\n\"E08000003\",\"Manchester\",\"RJ1\",10\r\n\"E08000003\",\"Manchester\",\"RWE\",9\r\n\"E08000003\",\"Manchester\",\"RXF\",9\r\n\"E08000003\",\"Manchester\",\"RQ3\",9\r\n\"E08000003\",\"Manchester\",\"RQX\",9\r\n\"E08000003\",\"Manchester\",\"RBQ\",8\r\n\"E08000003\",\"Manchester\",\"R1K\",8\r\n\"E08000003\",\"Manchester\",\"RA7\",8\r\n\"E08000003\",\"Manchester\",\"RXP\",8\r\n\"E08000003\",\"Manchester\",\"RJZ\",8\r\n\"E08000003\",\"Manchester\",\"RHU\",7\r\n\"E08000003\",\"Manchester\",\"RA9\",7\r\n\"E08000003\",\"Manchester\",\"RJ2\",12\r\n\"E08000003\",\"Manchester\",\"RWA\",7\r\n\"E08000003\",\"Manchester\",\"RM1\",6\r\n\"E08000003\",\"Manchester\",\"RK9\",6\r\n\"E08000003\",\"Manchester\",\"RTF\",6\r\n\"E08000003\",\"Manchester\",\"RWH\",6\r\n\"E08000003\",\"Manchester\",\"RWP\",6\r\n\"E08000003\",\"Manchester\",\"RAL\",5\r\n\"E08000003\",\"Manchester\",\"RNZ\",5\r\n\"E08000003\",\"Manchester\",\"RET\",5\r\n\"E08000003\",\"Manchester\",\"RN5\",5\r\n\"E08000003\",\"Manchester\",\"RJ6\",5\r\n\"E08000003\",\"Manchester\",\"RQ8\",5\r\n\"E08000003\",\"Manchester\",\"RC1\",5\r\n\"E08000003\",\"Manchester\",\"RH8\",5\r\n\"E08000003\",\"Manchester\",\"REF\",5\r\n\"E08000003\",\"Manchester\",\"RTR\",5\r\n\"E08000003\",\"Manchester\",\"RAX\",5\r\n\"E08000003\",\"Manchester\",\"RVW\",5\r\n\"E08000003\",\"Manchester\",\"RDE\",4\r\n\"E08000003\",\"Manchester\",\"RAS\",4\r\n\"E08000003\",\"Manchester\",\"RC9\",4\r\n\"E08000003\",\"Manchester\",\"RCF\",4\r\n\"E08000003\",\"Manchester\",\"RF4\",4\r\n\"E08000003\",\"Manchester\",\"RKB\",4\r\n\"E08000003\",\"Manchester\",\"RL4\",4\r\n\"E08000003\",\"Manchester\",\"RNS\",4\r\n\"E08000003\",\"Manchester\",\"RTV\",4\r\n\"E08000003\",\"Manchester\",\"RWG\",4\r\n\"E08000003\",\"Manchester\",\"RD8\",4\r\n\"E08000003\",\"Manchester\",\"RFR\",4\r\n\"E08000003\",\"Manchester\",\"RGT\",4\r\n\"E08000003\",\"Manchester\",\"RXA\",4\r\n\"E08000003\",\"Manchester\",\"RTE\",4\r\n\"E08000003\",\"Manchester\",\"RD1\",3\r\n\"E08000003\",\"Manchester\",\"RHW\",3\r\n\"E08000003\",\"Manchester\",\"RP5\",4\r\n\"E08000003\",\"Manchester\",\"RFF\",3\r\n\"E08000003\",\"Manchester\",\"RLQ\",3\r\n\"E08000003\",\"Manchester\",\"RK5\",3\r\n\"E08000003\",\"Manchester\",\"RVR\",3\r\n\"E08000003\",\"Manchester\",\"RA4\",3\r\n\"E08000003\",\"Manchester\",\"RXW\",5\r\n\"E08000003\",\"Manchester\",\"RGN\",3\r\n\"E08000003\",\"Manchester\",\"RAP\",3\r\n\"E08000003\",\"Manchester\",\"RNA\",3\r\n\"E08000003\",\"Manchester\",\"RCD\",3\r\n\"E08000003\",\"Manchester\",\"RQW\",3\r\n\"E08000003\",\"Manchester\",\"RN7\",2\r\n\"E08000003\",\"Manchester\",\"RTP\",2\r\n\"E08000003\",\"Manchester\",\"RXG\",2\r\n\"E08000003\",\"Manchester\",\"RYR\",2\r\n\"E08000003\",\"Manchester\",\"RHM\",2\r\n\"E08000003\",\"Manchester\",\"RJC\",2\r\n\"E08000003\",\"Manchester\",\"RXH\",2\r\n\"E08000003\",\"Manchester\",\"RBA\",2\r\n\"E08000003\",\"Manchester\",\"RFS\",2\r\n\"E08000003\",\"Manchester\",\"RBD\",2\r\n\"E08000003\",\"Manchester\",\"RVV\",2\r\n\"E08000003\",\"Manchester\",\"RWF\",2\r\n\"E08000003\",\"Manchester\",\"RNQ\",1\r\n\"E08000003\",\"Manchester\",\"RW5\",1\r\n\"E08000003\",\"Manchester\",\"RWK\",1\r\n\"E08000003\",\"Manchester\",\"RDZ\",1\r\n\"E08000003\",\"Manchester\",\"REN\",1\r\n\"E08000003\",\"Manchester\",\"RGP\",1\r\n\"E08000003\",\"Manchester\",\"RHA\",1\r\n\"E08000003\",\"Manchester\",\"RJL\",1\r\n\"E08000003\",\"Manchester\",\"R0B\",2\r\n\"E08000003\",\"Manchester\",\"RT3\",1\r\n\"E08000003\",\"Manchester\",\"RXQ\",1\r\n\"E08000003\",\"Manchester\",\"RBZ\",1\r\n\"E08000003\",\"Manchester\",\"RCU\",1\r\n\"E08000003\",\"Manchester\",\"RD3\",1\r\n\"E08000003\",\"Manchester\",\"RN3\",1\r\n\"E08000003\",\"Manchester\",\"RTK\",1\r\n\"E08000003\",\"Manchester\",\"RXC\",1\r\n\"E08000003\",\"Manchester\",\"RT1\",1\r\n\"E08000003\",\"Manchester\",\"RAJ\",1\r\n\"E08000003\",\"Manchester\",\"RBK\",1\r\n\"E08000003\",\"Manchester\",\"RGM\",1\r\n\"E08000003\",\"Manchester\",\"RLY\",1\r\n\"E08000003\",\"Manchester\",\"RMY\",1\r\n\"E08000003\",\"Manchester\",\"RP6\",1\r\n\"E08000003\",\"Manchester\",\"RGR\",1\r\n\"E08000003\",\"Manchester\",\"RWD\",1\r\n\"E08000004\",\"Oldham\",\"RW6\",30932\r\n\"E08000004\",\"Oldham\",\"R0A\",1615\r\n\"E08000004\",\"Oldham\",\"RM3\",545\r\n\"E08000004\",\"Oldham\",\"RMP\",366\r\n\"E08000004\",\"Oldham\",\"RBV\",328\r\n\"E08000004\",\"Oldham\",\"RWJ\",49\r\n\"E08000004\",\"Oldham\",\"RXL\",29\r\n\"E08000004\",\"Oldham\",\"RMC\",21\r\n\"E08000004\",\"Oldham\",\"RHQ\",18\r\n\"E08000004\",\"Oldham\",\"RWW\",17\r\n\"E08000004\",\"Oldham\",\"RWY\",17\r\n\"E08000004\",\"Oldham\",\"RR8\",16\r\n\"E08000004\",\"Oldham\",\"RBS\",16\r\n\"E08000004\",\"Oldham\",\"RTX\",16\r\n\"E08000004\",\"Oldham\",\"RAE\",14\r\n\"E08000004\",\"Oldham\",\"RJE\",13\r\n\"E08000004\",\"Oldham\",\"RXR\",14\r\n\"E08000004\",\"Oldham\",\"RXN\",12\r\n\"E08000004\",\"Oldham\",\"R1H\",12\r\n\"E08000004\",\"Oldham\",\"RBN\",12\r\n\"E08000004\",\"Oldham\",\"RRF\",11\r\n\"E08000004\",\"Oldham\",\"RJN\",9\r\n\"E08000004\",\"Oldham\",\"REM\",16\r\n\"E08000004\",\"Oldham\",\"RCB\",8\r\n\"E08000004\",\"Oldham\",\"RNL\",8\r\n\"E08000004\",\"Oldham\",\"RA9\",7\r\n\"E08000004\",\"Oldham\",\"RGN\",6\r\n\"E08000004\",\"Oldham\",\"RXF\",6\r\n\"E08000004\",\"Oldham\",\"RRK\",9\r\n\"E08000004\",\"Oldham\",\"RXK\",5\r\n\"E08000004\",\"Oldham\",\"RJR\",5\r\n\"E08000004\",\"Oldham\",\"RCD\",5\r\n\"E08000004\",\"Oldham\",\"RD8\",5\r\n\"E08000004\",\"Oldham\",\"RVY\",6\r\n\"E08000004\",\"Oldham\",\"RDU\",4\r\n\"E08000004\",\"Oldham\",\"RBD\",4\r\n\"E08000004\",\"Oldham\",\"RBT\",4\r\n\"E08000004\",\"Oldham\",\"RBQ\",3\r\n\"E08000004\",\"Oldham\",\"REF\",3\r\n\"E08000004\",\"Oldham\",\"RVJ\",3\r\n\"E08000004\",\"Oldham\",\"R1K\",3\r\n\"E08000004\",\"Oldham\",\"RC9\",3\r\n\"E08000004\",\"Oldham\",\"RDE\",3\r\n\"E08000004\",\"Oldham\",\"RJC\",3\r\n\"E08000004\",\"Oldham\",\"RTF\",3\r\n\"E08000004\",\"Oldham\",\"RTH\",3\r\n\"E08000004\",\"Oldham\",\"RTR\",3\r\n\"E08000004\",\"Oldham\",\"RRV\",3\r\n\"E08000004\",\"Oldham\",\"RTG\",4\r\n\"E08000004\",\"Oldham\",\"RWD\",3\r\n\"E08000004\",\"Oldham\",\"RBA\",3\r\n\"E08000004\",\"Oldham\",\"RHU\",3\r\n\"E08000004\",\"Oldham\",\"RJL\",2\r\n\"E08000004\",\"Oldham\",\"RN3\",2\r\n\"E08000004\",\"Oldham\",\"RN5\",2\r\n\"E08000004\",\"Oldham\",\"RD3\",2\r\n\"E08000004\",\"Oldham\",\"RM1\",2\r\n\"E08000004\",\"Oldham\",\"RVR\",2\r\n\"E08000004\",\"Oldham\",\"RXQ\",2\r\n\"E08000004\",\"Oldham\",\"RA7\",2\r\n\"E08000004\",\"Oldham\",\"RK5\",2\r\n\"E08000004\",\"Oldham\",\"RQM\",2\r\n\"E08000004\",\"Oldham\",\"R1F\",2\r\n\"E08000004\",\"Oldham\",\"RCF\",2\r\n\"E08000004\",\"Oldham\",\"RJ7\",2\r\n\"E08000004\",\"Oldham\",\"RVV\",2\r\n\"E08000004\",\"Oldham\",\"RQX\",2\r\n\"E08000004\",\"Oldham\",\"RX1\",2\r\n\"E08000004\",\"Oldham\",\"R0B\",3\r\n\"E08000004\",\"Oldham\",\"RNZ\",2\r\n\"E08000004\",\"Oldham\",\"RWA\",2\r\n\"E08000004\",\"Oldham\",\"RYJ\",2\r\n\"E08000004\",\"Oldham\",\"REP\",1\r\n\"E08000004\",\"Oldham\",\"RFF\",1\r\n\"E08000004\",\"Oldham\",\"RNA\",1\r\n\"E08000004\",\"Oldham\",\"RC1\",1\r\n\"E08000004\",\"Oldham\",\"RH8\",1\r\n\"E08000004\",\"Oldham\",\"RJZ\",1\r\n\"E08000004\",\"Oldham\",\"RKB\",1\r\n\"E08000004\",\"Oldham\",\"RTD\",1\r\n\"E08000004\",\"Oldham\",\"RTK\",1\r\n\"E08000004\",\"Oldham\",\"RGM\",1\r\n\"E08000004\",\"Oldham\",\"RHM\",1\r\n\"E08000004\",\"Oldham\",\"RHW\",1\r\n\"E08000004\",\"Oldham\",\"RJ2\",2\r\n\"E08000004\",\"Oldham\",\"RTP\",1\r\n\"E08000004\",\"Oldham\",\"RWH\",1\r\n\"E08000004\",\"Oldham\",\"RWP\",1\r\n\"E08000004\",\"Oldham\",\"RXW\",2\r\n\"E08000004\",\"Oldham\",\"RJ1\",1\r\n\"E08000004\",\"Oldham\",\"RK9\",1\r\n\"E08000004\",\"Oldham\",\"RNQ\",1\r\n\"E08000004\",\"Oldham\",\"RQ3\",1\r\n\"E08000004\",\"Oldham\",\"RWE\",1\r\n\"E08000004\",\"Oldham\",\"RAS\",1\r\n\"E08000004\",\"Oldham\",\"RQW\",1\r\n\"E08000004\",\"Oldham\",\"RVW\",1\r\n\"E08000004\",\"Oldham\",\"RBL\",1\r\n\"E08000004\",\"Oldham\",\"REN\",1\r\n\"E08000004\",\"Oldham\",\"RWG\",1\r\n\"E08000004\",\"Oldham\",\"RXP\",1\r\n\"E08000004\",\"Oldham\",\"RXT\",1\r\n\"E08000004\",\"Oldham\",\"RYR\",1\r\n\"E08000004\",\"Oldham\",\"RDD\",1\r\n\"E08000004\",\"Oldham\",\"RXA\",1\r\n\"E08000005\",\"Rochdale\",\"RW6\",27128\r\n\"E08000005\",\"Rochdale\",\"R0A\",1324\r\n\"E08000005\",\"Rochdale\",\"RM3\",488\r\n\"E08000005\",\"Rochdale\",\"RBV\",227\r\n\"E08000005\",\"Rochdale\",\"RMP\",46\r\n\"E08000005\",\"Rochdale\",\"RWY\",40\r\n\"E08000005\",\"Rochdale\",\"RMC\",39\r\n\"E08000005\",\"Rochdale\",\"RR8\",36\r\n\"E08000005\",\"Rochdale\",\"RXL\",35\r\n\"E08000005\",\"Rochdale\",\"RXR\",36\r\n\"E08000005\",\"Rochdale\",\"RWJ\",22\r\n\"E08000005\",\"Rochdale\",\"RBS\",17\r\n\"E08000005\",\"Rochdale\",\"RRF\",15\r\n\"E08000005\",\"Rochdale\",\"RXN\",14\r\n\"E08000005\",\"Rochdale\",\"RTX\",13\r\n\"E08000005\",\"Rochdale\",\"REM\",12\r\n\"E08000005\",\"Rochdale\",\"RJE\",8\r\n\"E08000005\",\"Rochdale\",\"RNL\",8\r\n\"E08000005\",\"Rochdale\",\"RBT\",8\r\n\"E08000005\",\"Rochdale\",\"RWW\",8\r\n\"E08000005\",\"Rochdale\",\"RAE\",8\r\n\"E08000005\",\"Rochdale\",\"RWA\",7\r\n\"E08000005\",\"Rochdale\",\"RCB\",7\r\n\"E08000005\",\"Rochdale\",\"RBN\",6\r\n\"E08000005\",\"Rochdale\",\"RYJ\",6\r\n\"E08000005\",\"Rochdale\",\"RBL\",6\r\n\"E08000005\",\"Rochdale\",\"RXF\",6\r\n\"E08000005\",\"Rochdale\",\"R1H\",6\r\n\"E08000005\",\"Rochdale\",\"RA7\",6\r\n\"E08000005\",\"Rochdale\",\"RF4\",5\r\n\"E08000005\",\"Rochdale\",\"RJL\",5\r\n\"E08000005\",\"Rochdale\",\"RJN\",5\r\n\"E08000005\",\"Rochdale\",\"RBQ\",5\r\n\"E08000005\",\"Rochdale\",\"REF\",5\r\n\"E08000005\",\"Rochdale\",\"R1K\",4\r\n\"E08000005\",\"Rochdale\",\"RQM\",4\r\n\"E08000005\",\"Rochdale\",\"RX1\",4\r\n\"E08000005\",\"Rochdale\",\"RTH\",4\r\n\"E08000005\",\"Rochdale\",\"RRK\",6\r\n\"E08000005\",\"Rochdale\",\"RTD\",3\r\n\"E08000005\",\"Rochdale\",\"RC9\",3\r\n\"E08000005\",\"Rochdale\",\"RJ1\",3\r\n\"E08000005\",\"Rochdale\",\"RVY\",4\r\n\"E08000005\",\"Rochdale\",\"RGT\",3\r\n\"E08000005\",\"Rochdale\",\"RRV\",3\r\n\"E08000005\",\"Rochdale\",\"RWD\",3\r\n\"E08000005\",\"Rochdale\",\"RCX\",3\r\n\"E08000005\",\"Rochdale\",\"RGP\",3\r\n\"E08000005\",\"Rochdale\",\"RCF\",3\r\n\"E08000005\",\"Rochdale\",\"RL4\",3\r\n\"E08000005\",\"Rochdale\",\"RXP\",3\r\n\"E08000005\",\"Rochdale\",\"RDU\",3\r\n\"E08000005\",\"Rochdale\",\"RFF\",3\r\n\"E08000005\",\"Rochdale\",\"RGN\",3\r\n\"E08000005\",\"Rochdale\",\"RHQ\",2\r\n\"E08000005\",\"Rochdale\",\"RJ6\",2\r\n\"E08000005\",\"Rochdale\",\"R0B\",3\r\n\"E08000005\",\"Rochdale\",\"RM1\",2\r\n\"E08000005\",\"Rochdale\",\"RJC\",2\r\n\"E08000005\",\"Rochdale\",\"RQW\",2\r\n\"E08000005\",\"Rochdale\",\"RXC\",2\r\n\"E08000005\",\"Rochdale\",\"RBA\",2\r\n\"E08000005\",\"Rochdale\",\"RJR\",2\r\n\"E08000005\",\"Rochdale\",\"RN5\",2\r\n\"E08000005\",\"Rochdale\",\"RWG\",2\r\n\"E08000005\",\"Rochdale\",\"RK5\",2\r\n\"E08000005\",\"Rochdale\",\"RLT\",2\r\n\"E08000005\",\"Rochdale\",\"RN3\",2\r\n\"E08000005\",\"Rochdale\",\"RHU\",2\r\n\"E08000005\",\"Rochdale\",\"RQX\",2\r\n\"E08000005\",\"Rochdale\",\"RTG\",2\r\n\"E08000005\",\"Rochdale\",\"RA4\",2\r\n\"E08000005\",\"Rochdale\",\"RAX\",2\r\n\"E08000005\",\"Rochdale\",\"RWE\",2\r\n\"E08000005\",\"Rochdale\",\"RK9\",1\r\n\"E08000005\",\"Rochdale\",\"RQ3\",1\r\n\"E08000005\",\"Rochdale\",\"RT3\",1\r\n\"E08000005\",\"Rochdale\",\"RTE\",1\r\n\"E08000005\",\"Rochdale\",\"RVR\",1\r\n\"E08000005\",\"Rochdale\",\"RWH\",1\r\n\"E08000005\",\"Rochdale\",\"RXK\",2\r\n\"E08000005\",\"Rochdale\",\"RCD\",1\r\n\"E08000005\",\"Rochdale\",\"RDZ\",1\r\n\"E08000005\",\"Rochdale\",\"RTR\",2\r\n\"E08000005\",\"Rochdale\",\"RHW\",1\r\n\"E08000005\",\"Rochdale\",\"RNZ\",1\r\n\"E08000005\",\"Rochdale\",\"RTV\",1\r\n\"E08000005\",\"Rochdale\",\"RXH\",1\r\n\"E08000005\",\"Rochdale\",\"RXW\",2\r\n\"E08000005\",\"Rochdale\",\"R1F\",1\r\n\"E08000005\",\"Rochdale\",\"RJZ\",1\r\n\"E08000005\",\"Rochdale\",\"RL1\",1\r\n\"E08000005\",\"Rochdale\",\"RR7\",1\r\n\"E08000005\",\"Rochdale\",\"RX4\",1\r\n\"E08000005\",\"Rochdale\",\"RXA\",1\r\n\"E08000005\",\"Rochdale\",\"RHM\",1\r\n\"E08000005\",\"Rochdale\",\"RKB\",1\r\n\"E08000005\",\"Rochdale\",\"RTF\",1\r\n\"E08000005\",\"Rochdale\",\"RBD\",1\r\n\"E08000005\",\"Rochdale\",\"RGM\",1\r\n\"E08000005\",\"Rochdale\",\"RTP\",1\r\n\"E08000005\",\"Rochdale\",\"RWK\",1\r\n\"E08000005\",\"Rochdale\",\"RA9\",1\r\n\"E08000005\",\"Rochdale\",\"RC1\",1\r\n\"E08000005\",\"Rochdale\",\"RNS\",1\r\n\"E08000005\",\"Rochdale\",\"RVV\",1\r\n\"E08000005\",\"Rochdale\",\"RW5\",1\r\n\"E08000005\",\"Rochdale\",\"RXQ\",1\r\n\"E08000005\",\"Rochdale\",\"RET\",1\r\n\"E08000005\",\"Rochdale\",\"RP5\",1\r\n\"E08000006\",\"Salford\",\"RM3\",25071\r\n\"E08000006\",\"Salford\",\"R0A\",3205\r\n\"E08000006\",\"Salford\",\"RMC\",2691\r\n\"E08000006\",\"Salford\",\"RW6\",1545\r\n\"E08000006\",\"Salford\",\"RBV\",390\r\n\"E08000006\",\"Salford\",\"RWW\",119\r\n\"E08000006\",\"Salford\",\"RRF\",97\r\n\"E08000006\",\"Salford\",\"RWJ\",42\r\n\"E08000006\",\"Salford\",\"RXN\",40\r\n\"E08000006\",\"Salford\",\"RXL\",35\r\n\"E08000006\",\"Salford\",\"RMP\",33\r\n\"E08000006\",\"Salford\",\"RBS\",33\r\n\"E08000006\",\"Salford\",\"RXR\",29\r\n\"E08000006\",\"Salford\",\"RTX\",22\r\n\"E08000006\",\"Salford\",\"RBN\",17\r\n\"E08000006\",\"Salford\",\"REM\",25\r\n\"E08000006\",\"Salford\",\"RBT\",13\r\n\"E08000006\",\"Salford\",\"RR8\",12\r\n\"E08000006\",\"Salford\",\"RVY\",15\r\n\"E08000006\",\"Salford\",\"RJE\",9\r\n\"E08000006\",\"Salford\",\"RJN\",9\r\n\"E08000006\",\"Salford\",\"RTV\",9\r\n\"E08000006\",\"Salford\",\"R1H\",8\r\n\"E08000006\",\"Salford\",\"RHQ\",8\r\n\"E08000006\",\"Salford\",\"RAE\",7\r\n\"E08000006\",\"Salford\",\"REF\",7\r\n\"E08000006\",\"Salford\",\"RRK\",9\r\n\"E08000006\",\"Salford\",\"RJ1\",7\r\n\"E08000006\",\"Salford\",\"RCB\",6\r\n\"E08000006\",\"Salford\",\"RTD\",6\r\n\"E08000006\",\"Salford\",\"RX1\",5\r\n\"E08000006\",\"Salford\",\"RD8\",5\r\n\"E08000006\",\"Salford\",\"RXF\",5\r\n\"E08000006\",\"Salford\",\"R1K\",4\r\n\"E08000006\",\"Salford\",\"RA9\",4\r\n\"E08000006\",\"Salford\",\"RHW\",4\r\n\"E08000006\",\"Salford\",\"RJR\",4\r\n\"E08000006\",\"Salford\",\"RWY\",4\r\n\"E08000006\",\"Salford\",\"RJ7\",4\r\n\"E08000006\",\"Salford\",\"RTG\",5\r\n\"E08000006\",\"Salford\",\"RAL\",4\r\n\"E08000006\",\"Salford\",\"RK5\",3\r\n\"E08000006\",\"Salford\",\"RTH\",3\r\n\"E08000006\",\"Salford\",\"RWE\",3\r\n\"E08000006\",\"Salford\",\"RWF\",3\r\n\"E08000006\",\"Salford\",\"RCD\",3\r\n\"E08000006\",\"Salford\",\"RNL\",3\r\n\"E08000006\",\"Salford\",\"RRV\",3\r\n\"E08000006\",\"Salford\",\"RD3\",3\r\n\"E08000006\",\"Salford\",\"RQX\",3\r\n\"E08000006\",\"Salford\",\"RBQ\",3\r\n\"E08000006\",\"Salford\",\"RFR\",3\r\n\"E08000006\",\"Salford\",\"RHU\",3\r\n\"E08000006\",\"Salford\",\"RFF\",3\r\n\"E08000006\",\"Salford\",\"RDU\",3\r\n\"E08000006\",\"Salford\",\"RVV\",3\r\n\"E08000006\",\"Salford\",\"RWD\",3\r\n\"E08000006\",\"Salford\",\"RPA\",2\r\n\"E08000006\",\"Salford\",\"RXW\",2\r\n\"E08000006\",\"Salford\",\"RXK\",2\r\n\"E08000006\",\"Salford\",\"RXP\",2\r\n\"E08000006\",\"Salford\",\"RYJ\",2\r\n\"E08000006\",\"Salford\",\"RGT\",2\r\n\"E08000006\",\"Salford\",\"RM1\",2\r\n\"E08000006\",\"Salford\",\"RWA\",2\r\n\"E08000006\",\"Salford\",\"RXC\",2\r\n\"E08000006\",\"Salford\",\"RWP\",2\r\n\"E08000006\",\"Salford\",\"RTE\",2\r\n\"E08000006\",\"Salford\",\"RW4\",2\r\n\"E08000006\",\"Salford\",\"RW5\",2\r\n\"E08000006\",\"Salford\",\"RAS\",2\r\n\"E08000006\",\"Salford\",\"RBL\",2\r\n\"E08000006\",\"Salford\",\"RCU\",2\r\n\"E08000006\",\"Salford\",\"RJC\",2\r\n\"E08000006\",\"Salford\",\"RKB\",2\r\n\"E08000006\",\"Salford\",\"RQM\",2\r\n\"E08000006\",\"Salford\",\"RAJ\",2\r\n\"E08000006\",\"Salford\",\"RTF\",2\r\n\"E08000006\",\"Salford\",\"RBZ\",1\r\n\"E08000006\",\"Salford\",\"RL1\",1\r\n\"E08000006\",\"Salford\",\"RN7\",1\r\n\"E08000006\",\"Salford\",\"RPY\",1\r\n\"E08000006\",\"Salford\",\"RGP\",1\r\n\"E08000006\",\"Salford\",\"RLY\",1\r\n\"E08000006\",\"Salford\",\"RNS\",1\r\n\"E08000006\",\"Salford\",\"RTK\",1\r\n\"E08000006\",\"Salford\",\"RYR\",1\r\n\"E08000006\",\"Salford\",\"RFS\",1\r\n\"E08000006\",\"Salford\",\"RCF\",1\r\n\"E08000006\",\"Salford\",\"RDD\",1\r\n\"E08000006\",\"Salford\",\"RH8\",1\r\n\"E08000006\",\"Salford\",\"RXA\",1\r\n\"E08000006\",\"Salford\",\"R1F\",1\r\n\"E08000006\",\"Salford\",\"RA2\",1\r\n\"E08000006\",\"Salford\",\"RET\",1\r\n\"E08000006\",\"Salford\",\"RGN\",1\r\n\"E08000006\",\"Salford\",\"RGR\",1\r\n\"E08000006\",\"Salford\",\"RKE\",1\r\n\"E08000006\",\"Salford\",\"RNA\",1\r\n\"E08000006\",\"Salford\",\"RVJ\",1\r\n\"E08000006\",\"Salford\",\"RVW\",1\r\n\"E08000006\",\"Salford\",\"RC9\",1\r\n\"E08000006\",\"Salford\",\"REP\",1\r\n\"E08000006\",\"Salford\",\"RJL\",1\r\n\"E08000006\",\"Salford\",\"RNQ\",1\r\n\"E08000006\",\"Salford\",\"RA7\",1\r\n\"E08000006\",\"Salford\",\"RF4\",1\r\n\"E08000006\",\"Salford\",\"RHM\",1\r\n\"E08000006\",\"Salford\",\"RBA\",1\r\n\"E08000006\",\"Salford\",\"RJZ\",1\r\n\"E08000006\",\"Salford\",\"R0B\",1\r\n\"E08000006\",\"Salford\",\"RT3\",1\r\n\"E08000006\",\"Salford\",\"RWG\",1\r\n\"E08000007\",\"Stockport\",\"RWJ\",32277\r\n\"E08000007\",\"Stockport\",\"R0A\",6943\r\n\"E08000007\",\"Stockport\",\"RBV\",757\r\n\"E08000007\",\"Stockport\",\"RM3\",457\r\n\"E08000007\",\"Stockport\",\"RMP\",119\r\n\"E08000007\",\"Stockport\",\"RJN\",99\r\n\"E08000007\",\"Stockport\",\"RW6\",95\r\n\"E08000007\",\"Stockport\",\"RXL\",21\r\n\"E08000007\",\"Stockport\",\"RR8\",20\r\n\"E08000007\",\"Stockport\",\"RJE\",19\r\n\"E08000007\",\"Stockport\",\"RBT\",18\r\n\"E08000007\",\"Stockport\",\"RTX\",16\r\n\"E08000007\",\"Stockport\",\"RMC\",13\r\n\"E08000007\",\"Stockport\",\"RXN\",13\r\n\"E08000007\",\"Stockport\",\"RCB\",12\r\n\"E08000007\",\"Stockport\",\"RKB\",12\r\n\"E08000007\",\"Stockport\",\"RBS\",12\r\n\"E08000007\",\"Stockport\",\"RJC\",11\r\n\"E08000007\",\"Stockport\",\"RNL\",11\r\n\"E08000007\",\"Stockport\",\"RWW\",11\r\n\"E08000007\",\"Stockport\",\"RBN\",10\r\n\"E08000007\",\"Stockport\",\"RHQ\",10\r\n\"E08000007\",\"Stockport\",\"RVY\",11\r\n\"E08000007\",\"Stockport\",\"RXR\",9\r\n\"E08000007\",\"Stockport\",\"RRF\",9\r\n\"E08000007\",\"Stockport\",\"REF\",8\r\n\"E08000007\",\"Stockport\",\"RJR\",8\r\n\"E08000007\",\"Stockport\",\"RWY\",8\r\n\"E08000007\",\"Stockport\",\"RWG\",7\r\n\"E08000007\",\"Stockport\",\"RJ7\",7\r\n\"E08000007\",\"Stockport\",\"REM\",9\r\n\"E08000007\",\"Stockport\",\"RDU\",7\r\n\"E08000007\",\"Stockport\",\"RJ1\",6\r\n\"E08000007\",\"Stockport\",\"RFS\",6\r\n\"E08000007\",\"Stockport\",\"RD8\",5\r\n\"E08000007\",\"Stockport\",\"RWP\",5\r\n\"E08000007\",\"Stockport\",\"RRV\",5\r\n\"E08000007\",\"Stockport\",\"RWF\",5\r\n\"E08000007\",\"Stockport\",\"RXP\",5\r\n\"E08000007\",\"Stockport\",\"RA9\",4\r\n\"E08000007\",\"Stockport\",\"RJL\",4\r\n\"E08000007\",\"Stockport\",\"RD1\",4\r\n\"E08000007\",\"Stockport\",\"RRK\",5\r\n\"E08000007\",\"Stockport\",\"RX1\",4\r\n\"E08000007\",\"Stockport\",\"RTE\",4\r\n\"E08000007\",\"Stockport\",\"RXA\",4\r\n\"E08000007\",\"Stockport\",\"RC9\",4\r\n\"E08000007\",\"Stockport\",\"RH8\",4\r\n\"E08000007\",\"Stockport\",\"RNS\",4\r\n\"E08000007\",\"Stockport\",\"RXF\",4\r\n\"E08000007\",\"Stockport\",\"R1K\",4\r\n\"E08000007\",\"Stockport\",\"RWD\",4\r\n\"E08000007\",\"Stockport\",\"RBL\",4\r\n\"E08000007\",\"Stockport\",\"RHW\",4\r\n\"E08000007\",\"Stockport\",\"RK9\",4\r\n\"E08000007\",\"Stockport\",\"RTD\",4\r\n\"E08000007\",\"Stockport\",\"RTF\",4\r\n\"E08000007\",\"Stockport\",\"RDE\",3\r\n\"E08000007\",\"Stockport\",\"RWH\",3\r\n\"E08000007\",\"Stockport\",\"RTG\",3\r\n\"E08000007\",\"Stockport\",\"RBZ\",3\r\n\"E08000007\",\"Stockport\",\"RCD\",3\r\n\"E08000007\",\"Stockport\",\"RGR\",3\r\n\"E08000007\",\"Stockport\",\"RET\",3\r\n\"E08000007\",\"Stockport\",\"RTV\",3\r\n\"E08000007\",\"Stockport\",\"RXW\",6\r\n\"E08000007\",\"Stockport\",\"RP5\",4\r\n\"E08000007\",\"Stockport\",\"RWA\",3\r\n\"E08000007\",\"Stockport\",\"RVJ\",3\r\n\"E08000007\",\"Stockport\",\"RTH\",2\r\n\"E08000007\",\"Stockport\",\"RBA\",2\r\n\"E08000007\",\"Stockport\",\"RLQ\",2\r\n\"E08000007\",\"Stockport\",\"R1F\",2\r\n\"E08000007\",\"Stockport\",\"RBK\",2\r\n\"E08000007\",\"Stockport\",\"RFF\",2\r\n\"E08000007\",\"Stockport\",\"RGT\",2\r\n\"E08000007\",\"Stockport\",\"RJZ\",2\r\n\"E08000007\",\"Stockport\",\"RAE\",2\r\n\"E08000007\",\"Stockport\",\"RPY\",2\r\n\"E08000007\",\"Stockport\",\"RXC\",2\r\n\"E08000007\",\"Stockport\",\"RXH\",2\r\n\"E08000007\",\"Stockport\",\"RAS\",2\r\n\"E08000007\",\"Stockport\",\"RBD\",2\r\n\"E08000007\",\"Stockport\",\"RBQ\",2\r\n\"E08000007\",\"Stockport\",\"R1H\",1\r\n\"E08000007\",\"Stockport\",\"RAL\",1\r\n\"E08000007\",\"Stockport\",\"R0B\",2\r\n\"E08000007\",\"Stockport\",\"RVW\",1\r\n\"E08000007\",\"Stockport\",\"RX2\",1\r\n\"E08000007\",\"Stockport\",\"RXQ\",1\r\n\"E08000007\",\"Stockport\",\"RYG\",1\r\n\"E08000007\",\"Stockport\",\"RA2\",1\r\n\"E08000007\",\"Stockport\",\"REP\",1\r\n\"E08000007\",\"Stockport\",\"RKE\",1\r\n\"E08000007\",\"Stockport\",\"RNZ\",1\r\n\"E08000007\",\"Stockport\",\"RVV\",1\r\n\"E08000007\",\"Stockport\",\"RW5\",1\r\n\"E08000007\",\"Stockport\",\"RWE\",1\r\n\"E08000007\",\"Stockport\",\"RYJ\",1\r\n\"E08000007\",\"Stockport\",\"RAN\",1\r\n\"E08000007\",\"Stockport\",\"RHM\",1\r\n\"E08000007\",\"Stockport\",\"RL4\",1\r\n\"E08000007\",\"Stockport\",\"RPA\",1\r\n\"E08000007\",\"Stockport\",\"RTR\",1\r\n\"E08000007\",\"Stockport\",\"RWK\",1\r\n\"E08000007\",\"Stockport\",\"RCX\",1\r\n\"E08000007\",\"Stockport\",\"RDZ\",1\r\n\"E08000007\",\"Stockport\",\"RLY\",1\r\n\"E08000007\",\"Stockport\",\"RF4\",1\r\n\"E08000007\",\"Stockport\",\"RHU\",1\r\n\"E08000007\",\"Stockport\",\"RGN\",1\r\n\"E08000007\",\"Stockport\",\"RJ2\",1\r\n\"E08000007\",\"Stockport\",\"RN3\",1\r\n\"E08000007\",\"Stockport\",\"RNQ\",1\r\n\"E08000007\",\"Stockport\",\"RP4\",1\r\n\"E08000007\",\"Stockport\",\"RQ8\",1\r\n\"E08000007\",\"Stockport\",\"RQX\",1\r\n\"E08000007\",\"Stockport\",\"RXK\",1\r\n\"E08000007\",\"Stockport\",\"RPC\",1\r\n\"E08000007\",\"Stockport\",\"RV9\",1\r\n\"E08000007\",\"Stockport\",\"RM1\",1\r\n\"E08000007\",\"Stockport\",\"RNU\",1\r\n\"E08000007\",\"Stockport\",\"RTQ\",1\r\n\"E08000008\",\"Tameside\",\"RMP\",21973\r\n\"E08000008\",\"Tameside\",\"R0A\",3754\r\n\"E08000008\",\"Tameside\",\"RWJ\",1486\r\n\"E08000008\",\"Tameside\",\"RW6\",636\r\n\"E08000008\",\"Tameside\",\"RBV\",473\r\n\"E08000008\",\"Tameside\",\"RM3\",468\r\n\"E08000008\",\"Tameside\",\"RXL\",27\r\n\"E08000008\",\"Tameside\",\"RCB\",18\r\n\"E08000008\",\"Tameside\",\"RHQ\",15\r\n\"E08000008\",\"Tameside\",\"RJN\",14\r\n\"E08000008\",\"Tameside\",\"RWY\",12\r\n\"E08000008\",\"Tameside\",\"RTX\",12\r\n\"E08000008\",\"Tameside\",\"RMC\",11\r\n\"E08000008\",\"Tameside\",\"RJE\",11\r\n\"E08000008\",\"Tameside\",\"RBN\",11\r\n\"E08000008\",\"Tameside\",\"RR8\",11\r\n\"E08000008\",\"Tameside\",\"RWW\",10\r\n\"E08000008\",\"Tameside\",\"RBT\",9\r\n\"E08000008\",\"Tameside\",\"REM\",12\r\n\"E08000008\",\"Tameside\",\"REF\",7\r\n\"E08000008\",\"Tameside\",\"RXR\",8\r\n\"E08000008\",\"Tameside\",\"RBS\",7\r\n\"E08000008\",\"Tameside\",\"RRF\",7\r\n\"E08000008\",\"Tameside\",\"RXP\",7\r\n\"E08000008\",\"Tameside\",\"RGT\",5\r\n\"E08000008\",\"Tameside\",\"RXN\",5\r\n\"E08000008\",\"Tameside\",\"RBL\",5\r\n\"E08000008\",\"Tameside\",\"RRK\",6\r\n\"E08000008\",\"Tameside\",\"RAE\",5\r\n\"E08000008\",\"Tameside\",\"RVV\",4\r\n\"E08000008\",\"Tameside\",\"RJL\",4\r\n\"E08000008\",\"Tameside\",\"RA9\",4\r\n\"E08000008\",\"Tameside\",\"RK5\",3\r\n\"E08000008\",\"Tameside\",\"RKB\",3\r\n\"E08000008\",\"Tameside\",\"RTG\",5\r\n\"E08000008\",\"Tameside\",\"RWD\",3\r\n\"E08000008\",\"Tameside\",\"RFS\",3\r\n\"E08000008\",\"Tameside\",\"RHM\",3\r\n\"E08000008\",\"Tameside\",\"RNL\",3\r\n\"E08000008\",\"Tameside\",\"RTE\",3\r\n\"E08000008\",\"Tameside\",\"RWE\",3\r\n\"E08000008\",\"Tameside\",\"RTR\",4\r\n\"E08000008\",\"Tameside\",\"RXF\",3\r\n\"E08000008\",\"Tameside\",\"RXK\",4\r\n\"E08000008\",\"Tameside\",\"RVY\",4\r\n\"E08000008\",\"Tameside\",\"RBQ\",3\r\n\"E08000008\",\"Tameside\",\"RYR\",3\r\n\"E08000008\",\"Tameside\",\"RQM\",3\r\n\"E08000008\",\"Tameside\",\"RVR\",3\r\n\"E08000008\",\"Tameside\",\"RQ3\",2\r\n\"E08000008\",\"Tameside\",\"RBK\",2\r\n\"E08000008\",\"Tameside\",\"RFR\",2\r\n\"E08000008\",\"Tameside\",\"RJ7\",2\r\n\"E08000008\",\"Tameside\",\"RWA\",2\r\n\"E08000008\",\"Tameside\",\"RX1\",2\r\n\"E08000008\",\"Tameside\",\"RD1\",2\r\n\"E08000008\",\"Tameside\",\"RWP\",2\r\n\"E08000008\",\"Tameside\",\"RXC\",2\r\n\"E08000008\",\"Tameside\",\"RFF\",2\r\n\"E08000008\",\"Tameside\",\"RJR\",2\r\n\"E08000008\",\"Tameside\",\"RL4\",2\r\n\"E08000008\",\"Tameside\",\"RN5\",2\r\n\"E08000008\",\"Tameside\",\"RBD\",2\r\n\"E08000008\",\"Tameside\",\"RWH\",2\r\n\"E08000008\",\"Tameside\",\"RAP\",2\r\n\"E08000008\",\"Tameside\",\"RDU\",2\r\n\"E08000008\",\"Tameside\",\"RHW\",2\r\n\"E08000008\",\"Tameside\",\"RJ1\",2\r\n\"E08000008\",\"Tameside\",\"RXW\",3\r\n\"E08000008\",\"Tameside\",\"RH8\",2\r\n\"E08000008\",\"Tameside\",\"RBZ\",1\r\n\"E08000008\",\"Tameside\",\"RTF\",1\r\n\"E08000008\",\"Tameside\",\"R1F\",1\r\n\"E08000008\",\"Tameside\",\"R1K\",1\r\n\"E08000008\",\"Tameside\",\"RAX\",1\r\n\"E08000008\",\"Tameside\",\"RJ2\",1\r\n\"E08000008\",\"Tameside\",\"RK9\",1\r\n\"E08000008\",\"Tameside\",\"RN7\",1\r\n\"E08000008\",\"Tameside\",\"RVJ\",1\r\n\"E08000008\",\"Tameside\",\"RYJ\",1\r\n\"E08000008\",\"Tameside\",\"RA4\",1\r\n\"E08000008\",\"Tameside\",\"RDD\",1\r\n\"E08000008\",\"Tameside\",\"RJC\",1\r\n\"E08000008\",\"Tameside\",\"RTH\",1\r\n\"E08000008\",\"Tameside\",\"RGP\",1\r\n\"E08000008\",\"Tameside\",\"R0B\",2\r\n\"E08000008\",\"Tameside\",\"RQW\",1\r\n\"E08000008\",\"Tameside\",\"RAS\",1\r\n\"E08000008\",\"Tameside\",\"RKE\",1\r\n\"E08000008\",\"Tameside\",\"RW5\",1\r\n\"E08000008\",\"Tameside\",\"RCD\",1\r\n\"E08000008\",\"Tameside\",\"RDZ\",1\r\n\"E08000008\",\"Tameside\",\"RLQ\",1\r\n\"E08000008\",\"Tameside\",\"RM1\",1\r\n\"E08000008\",\"Tameside\",\"RTP\",1\r\n\"E08000008\",\"Tameside\",\"RWG\",1\r\n\"E08000009\",\"Trafford\",\"R0A\",24427\r\n\"E08000009\",\"Trafford\",\"RM3\",3319\r\n\"E08000009\",\"Trafford\",\"RBV\",481\r\n\"E08000009\",\"Trafford\",\"RWJ\",193\r\n\"E08000009\",\"Trafford\",\"RW6\",81\r\n\"E08000009\",\"Trafford\",\"RWW\",49\r\n\"E08000009\",\"Trafford\",\"RMC\",33\r\n\"E08000009\",\"Trafford\",\"RBT\",23\r\n\"E08000009\",\"Trafford\",\"RTX\",20\r\n\"E08000009\",\"Trafford\",\"RBS\",19\r\n\"E08000009\",\"Trafford\",\"RMP\",19\r\n\"E08000009\",\"Trafford\",\"REM\",26\r\n\"E08000009\",\"Trafford\",\"RJN\",18\r\n\"E08000009\",\"Trafford\",\"RJE\",16\r\n\"E08000009\",\"Trafford\",\"RR8\",14\r\n\"E08000009\",\"Trafford\",\"RXR\",13\r\n\"E08000009\",\"Trafford\",\"RBN\",12\r\n\"E08000009\",\"Trafford\",\"RJR\",12\r\n\"E08000009\",\"Trafford\",\"RCB\",12\r\n\"E08000009\",\"Trafford\",\"RXN\",11\r\n\"E08000009\",\"Trafford\",\"RBL\",10\r\n\"E08000009\",\"Trafford\",\"RRF\",9\r\n\"E08000009\",\"Trafford\",\"RTE\",9\r\n\"E08000009\",\"Trafford\",\"RXL\",9\r\n\"E08000009\",\"Trafford\",\"RNL\",8\r\n\"E08000009\",\"Trafford\",\"RXW\",9\r\n\"E08000009\",\"Trafford\",\"R1K\",6\r\n\"E08000009\",\"Trafford\",\"RCD\",6\r\n\"E08000009\",\"Trafford\",\"RRK\",8\r\n\"E08000009\",\"Trafford\",\"R1H\",6\r\n\"E08000009\",\"Trafford\",\"RVY\",7\r\n\"E08000009\",\"Trafford\",\"REF\",5\r\n\"E08000009\",\"Trafford\",\"RKB\",5\r\n\"E08000009\",\"Trafford\",\"RRV\",5\r\n\"E08000009\",\"Trafford\",\"RWY\",5\r\n\"E08000009\",\"Trafford\",\"RJ1\",5\r\n\"E08000009\",\"Trafford\",\"RQM\",5\r\n\"E08000009\",\"Trafford\",\"RX1\",4\r\n\"E08000009\",\"Trafford\",\"RXA\",4\r\n\"E08000009\",\"Trafford\",\"RAE\",4\r\n\"E08000009\",\"Trafford\",\"RCX\",4\r\n\"E08000009\",\"Trafford\",\"RHQ\",4\r\n\"E08000009\",\"Trafford\",\"RJC\",4\r\n\"E08000009\",\"Trafford\",\"RTG\",5\r\n\"E08000009\",\"Trafford\",\"RWD\",4\r\n\"E08000009\",\"Trafford\",\"RM1\",4\r\n\"E08000009\",\"Trafford\",\"RAX\",4\r\n\"E08000009\",\"Trafford\",\"RH8\",3\r\n\"E08000009\",\"Trafford\",\"RXH\",3\r\n\"E08000009\",\"Trafford\",\"RTR\",3\r\n\"E08000009\",\"Trafford\",\"RAL\",3\r\n\"E08000009\",\"Trafford\",\"RFS\",3\r\n\"E08000009\",\"Trafford\",\"RGT\",3\r\n\"E08000009\",\"Trafford\",\"RK5\",3\r\n\"E08000009\",\"Trafford\",\"RTH\",3\r\n\"E08000009\",\"Trafford\",\"RBQ\",3\r\n\"E08000009\",\"Trafford\",\"RJ7\",3\r\n\"E08000009\",\"Trafford\",\"RHM\",3\r\n\"E08000009\",\"Trafford\",\"RXP\",3\r\n\"E08000009\",\"Trafford\",\"RXC\",2\r\n\"E08000009\",\"Trafford\",\"RXF\",2\r\n\"E08000009\",\"Trafford\",\"RWF\",2\r\n\"E08000009\",\"Trafford\",\"RAS\",2\r\n\"E08000009\",\"Trafford\",\"RYR\",2\r\n\"E08000009\",\"Trafford\",\"RA7\",2\r\n\"E08000009\",\"Trafford\",\"RLQ\",2\r\n\"E08000009\",\"Trafford\",\"RVJ\",2\r\n\"E08000009\",\"Trafford\",\"RA2\",2\r\n\"E08000009\",\"Trafford\",\"RD8\",2\r\n\"E08000009\",\"Trafford\",\"R0B\",4\r\n\"E08000009\",\"Trafford\",\"RQ3\",2\r\n\"E08000009\",\"Trafford\",\"RTV\",2\r\n\"E08000009\",\"Trafford\",\"RVV\",2\r\n\"E08000009\",\"Trafford\",\"RVW\",2\r\n\"E08000009\",\"Trafford\",\"RWG\",2\r\n\"E08000009\",\"Trafford\",\"RBD\",2\r\n\"E08000009\",\"Trafford\",\"RWA\",2\r\n\"E08000009\",\"Trafford\",\"RDZ\",1\r\n\"E08000009\",\"Trafford\",\"RJ2\",1\r\n\"E08000009\",\"Trafford\",\"RNA\",1\r\n\"E08000009\",\"Trafford\",\"RDU\",1\r\n\"E08000009\",\"Trafford\",\"REN\",1\r\n\"E08000009\",\"Trafford\",\"RGR\",1\r\n\"E08000009\",\"Trafford\",\"RJZ\",1\r\n\"E08000009\",\"Trafford\",\"RP5\",1\r\n\"E08000009\",\"Trafford\",\"RT3\",1\r\n\"E08000009\",\"Trafford\",\"RTD\",1\r\n\"E08000009\",\"Trafford\",\"RWE\",1\r\n\"E08000009\",\"Trafford\",\"RBA\",1\r\n\"E08000009\",\"Trafford\",\"RQ8\",1\r\n\"E08000009\",\"Trafford\",\"RD1\",1\r\n\"E08000009\",\"Trafford\",\"RT1\",1\r\n\"E08000009\",\"Trafford\",\"RTF\",1\r\n\"E08000009\",\"Trafford\",\"RTP\",1\r\n\"E08000009\",\"Trafford\",\"RV3\",1\r\n\"E08000009\",\"Trafford\",\"RD3\",1\r\n\"E08000009\",\"Trafford\",\"RDE\",1\r\n\"E08000009\",\"Trafford\",\"REP\",1\r\n\"E08000009\",\"Trafford\",\"RHW\",1\r\n\"E08000009\",\"Trafford\",\"RN5\",1\r\n\"E08000009\",\"Trafford\",\"RNZ\",1\r\n\"E08000009\",\"Trafford\",\"RQW\",1\r\n\"E08000009\",\"Trafford\",\"RXQ\",1\r\n\"E08000009\",\"Trafford\",\"RMY\",1\r\n\"E08000009\",\"Trafford\",\"RNS\",1\r\n\"E08000009\",\"Trafford\",\"RCF\",1\r\n\"E08000009\",\"Trafford\",\"RDD\",1\r\n\"E08000009\",\"Trafford\",\"RF4\",1\r\n\"E08000010\",\"Wigan\",\"RRF\",30553\r\n\"E08000010\",\"Wigan\",\"RMC\",3636\r\n\"E08000010\",\"Wigan\",\"RM3\",1945\r\n\"E08000010\",\"Wigan\",\"R0A\",1036\r\n\"E08000010\",\"Wigan\",\"RTV\",902\r\n\"E08000010\",\"Wigan\",\"RBN\",728\r\n\"E08000010\",\"Wigan\",\"RWW\",611\r\n\"E08000010\",\"Wigan\",\"RBV\",301\r\n\"E08000010\",\"Wigan\",\"RXN\",193\r\n\"E08000010\",\"Wigan\",\"RBS\",178\r\n\"E08000010\",\"Wigan\",\"REM\",149\r\n\"E08000010\",\"Wigan\",\"RVY\",149\r\n\"E08000010\",\"Wigan\",\"RXR\",56\r\n\"E08000010\",\"Wigan\",\"RXL\",43\r\n\"E08000010\",\"Wigan\",\"RTX\",40\r\n\"E08000010\",\"Wigan\",\"RW6\",38\r\n\"E08000010\",\"Wigan\",\"RJE\",29\r\n\"E08000010\",\"Wigan\",\"RET\",28\r\n\"E08000010\",\"Wigan\",\"RBQ\",24\r\n\"E08000010\",\"Wigan\",\"RJR\",13\r\n\"E08000010\",\"Wigan\",\"RR8\",12\r\n\"E08000010\",\"Wigan\",\"REN\",11\r\n\"E08000010\",\"Wigan\",\"RCB\",11\r\n\"E08000010\",\"Wigan\",\"RBL\",10\r\n\"E08000010\",\"Wigan\",\"RHQ\",9\r\n\"E08000010\",\"Wigan\",\"RWJ\",8\r\n\"E08000010\",\"Wigan\",\"RAE\",8\r\n\"E08000010\",\"Wigan\",\"RNL\",8\r\n\"E08000010\",\"Wigan\",\"RTD\",8\r\n\"E08000010\",\"Wigan\",\"RMP\",7\r\n\"E08000010\",\"Wigan\",\"RRK\",11\r\n\"E08000010\",\"Wigan\",\"RBT\",7\r\n\"E08000010\",\"Wigan\",\"RH8\",6\r\n\"E08000010\",\"Wigan\",\"RWY\",6\r\n\"E08000010\",\"Wigan\",\"RA9\",6\r\n\"E08000010\",\"Wigan\",\"REF\",6\r\n\"E08000010\",\"Wigan\",\"RK9\",6\r\n\"E08000010\",\"Wigan\",\"RKB\",6\r\n\"E08000010\",\"Wigan\",\"RW4\",4\r\n\"E08000010\",\"Wigan\",\"RTF\",4\r\n\"E08000010\",\"Wigan\",\"RTR\",5\r\n\"E08000010\",\"Wigan\",\"RW5\",4\r\n\"E08000010\",\"Wigan\",\"RDE\",3\r\n\"E08000010\",\"Wigan\",\"RRV\",3\r\n\"E08000010\",\"Wigan\",\"RAS\",3\r\n\"E08000010\",\"Wigan\",\"RGT\",3\r\n\"E08000010\",\"Wigan\",\"RJN\",3\r\n\"E08000010\",\"Wigan\",\"RTG\",6\r\n\"E08000010\",\"Wigan\",\"RWD\",3\r\n\"E08000010\",\"Wigan\",\"RXH\",3\r\n\"E08000010\",\"Wigan\",\"RP5\",4\r\n\"E08000010\",\"Wigan\",\"R1H\",3\r\n\"E08000010\",\"Wigan\",\"RK5\",3\r\n\"E08000010\",\"Wigan\",\"RXW\",4\r\n\"E08000010\",\"Wigan\",\"RBD\",3\r\n\"E08000010\",\"Wigan\",\"RJ1\",3\r\n\"E08000010\",\"Wigan\",\"RJ7\",3\r\n\"E08000010\",\"Wigan\",\"RL4\",3\r\n\"E08000010\",\"Wigan\",\"RDD\",2\r\n\"E08000010\",\"Wigan\",\"RDU\",2\r\n\"E08000010\",\"Wigan\",\"RTE\",2\r\n\"E08000010\",\"Wigan\",\"RWA\",2\r\n\"E08000010\",\"Wigan\",\"RWE\",2\r\n\"E08000010\",\"Wigan\",\"RWG\",2\r\n\"E08000010\",\"Wigan\",\"RGR\",2\r\n\"E08000010\",\"Wigan\",\"RHU\",2\r\n\"E08000010\",\"Wigan\",\"RVJ\",2\r\n\"E08000010\",\"Wigan\",\"RXK\",2\r\n\"E08000010\",\"Wigan\",\"RBZ\",2\r\n\"E08000010\",\"Wigan\",\"RTH\",2\r\n\"E08000010\",\"Wigan\",\"RVV\",2\r\n\"E08000010\",\"Wigan\",\"RCF\",2\r\n\"E08000010\",\"Wigan\",\"RX1\",2\r\n\"E08000010\",\"Wigan\",\"RHW\",2\r\n\"E08000010\",\"Wigan\",\"RN5\",2\r\n\"E08000010\",\"Wigan\",\"RFF\",1\r\n\"E08000010\",\"Wigan\",\"RFS\",1\r\n\"E08000010\",\"Wigan\",\"RJL\",1\r\n\"E08000010\",\"Wigan\",\"RM1\",1\r\n\"E08000010\",\"Wigan\",\"RPA\",1\r\n\"E08000010\",\"Wigan\",\"RQM\",1\r\n\"E08000010\",\"Wigan\",\"RTK\",1\r\n\"E08000010\",\"Wigan\",\"RWP\",1\r\n\"E08000010\",\"Wigan\",\"RA7\",1\r\n\"E08000010\",\"Wigan\",\"RN3\",1\r\n\"E08000010\",\"Wigan\",\"RVW\",1\r\n\"E08000010\",\"Wigan\",\"RD3\",1\r\n\"E08000010\",\"Wigan\",\"R0B\",1\r\n\"E08000010\",\"Wigan\",\"RXF\",1\r\n\"E08000010\",\"Wigan\",\"RDZ\",1\r\n\"E08000010\",\"Wigan\",\"RL1\",1\r\n\"E08000010\",\"Wigan\",\"RN7\",1\r\n\"E08000010\",\"Wigan\",\"RXP\",1\r\n\"E08000010\",\"Wigan\",\"RYJ\",1\r\n\"E08000010\",\"Wigan\",\"RNS\",1\r\n\"E08000010\",\"Wigan\",\"RTQ\",1\r\n\"E08000010\",\"Wigan\",\"RWH\",1\r\n\"E08000010\",\"Wigan\",\"RBA\",1\r\n\"E08000010\",\"Wigan\",\"RD8\",1\r\n\"E08000010\",\"Wigan\",\"RP4\",1\r\n\"E08000010\",\"Wigan\",\"RPC\",1\r\n\"E08000010\",\"Wigan\",\"RWF\",1\r\n\"E08000010\",\"Wigan\",\"RAP\",1\r\n\"E08000010\",\"Wigan\",\"RFR\",1\r\n\"E08000010\",\"Wigan\",\"RJC\",1\r\n\"E08000010\",\"Wigan\",\"RLY\",1\r\n\"E08000010\",\"Wigan\",\"RBK\",1\r\n\"E08000010\",\"Wigan\",\"RHM\",1\r\n\"E08000010\",\"Wigan\",\"RXA\",1\r\n\"E08000011\",\"Knowsley\",\"RBN\",14800\r\n\"E08000011\",\"Knowsley\",\"REM\",9394\r\n\"E08000011\",\"Knowsley\",\"RBS\",1784\r\n\"E08000011\",\"Knowsley\",\"RVY\",563\r\n\"E08000011\",\"Knowsley\",\"RTV\",253\r\n\"E08000011\",\"Knowsley\",\"RBQ\",205\r\n\"E08000011\",\"Knowsley\",\"RW4\",99\r\n\"E08000011\",\"Knowsley\",\"RET\",94\r\n\"E08000011\",\"Knowsley\",\"REP\",90\r\n\"E08000011\",\"Knowsley\",\"REN\",76\r\n\"E08000011\",\"Knowsley\",\"RWW\",42\r\n\"E08000011\",\"Knowsley\",\"RBL\",35\r\n\"E08000011\",\"Knowsley\",\"R0A\",25\r\n\"E08000011\",\"Knowsley\",\"RRF\",13\r\n\"E08000011\",\"Knowsley\",\"RJR\",12\r\n\"E08000011\",\"Knowsley\",\"RXL\",9\r\n\"E08000011\",\"Knowsley\",\"RM3\",8\r\n\"E08000011\",\"Knowsley\",\"RXN\",7\r\n\"E08000011\",\"Knowsley\",\"REF\",6\r\n\"E08000011\",\"Knowsley\",\"RTX\",6\r\n\"E08000011\",\"Knowsley\",\"RBV\",6\r\n\"E08000011\",\"Knowsley\",\"RJE\",6\r\n\"E08000011\",\"Knowsley\",\"RBT\",6\r\n\"E08000011\",\"Knowsley\",\"RNL\",5\r\n\"E08000011\",\"Knowsley\",\"RMC\",5\r\n\"E08000011\",\"Knowsley\",\"RCB\",4\r\n\"E08000011\",\"Knowsley\",\"RW6\",4\r\n\"E08000011\",\"Knowsley\",\"RAL\",3\r\n\"E08000011\",\"Knowsley\",\"RX1\",3\r\n\"E08000011\",\"Knowsley\",\"RA9\",3\r\n\"E08000011\",\"Knowsley\",\"RK9\",3\r\n\"E08000011\",\"Knowsley\",\"RGT\",3\r\n\"E08000011\",\"Knowsley\",\"RCF\",2\r\n\"E08000011\",\"Knowsley\",\"RQW\",2\r\n\"E08000011\",\"Knowsley\",\"RQX\",2\r\n\"E08000011\",\"Knowsley\",\"R1K\",2\r\n\"E08000011\",\"Knowsley\",\"RRV\",2\r\n\"E08000011\",\"Knowsley\",\"RTF\",2\r\n\"E08000011\",\"Knowsley\",\"R0B\",2\r\n\"E08000011\",\"Knowsley\",\"RXF\",2\r\n\"E08000011\",\"Knowsley\",\"RCD\",2\r\n\"E08000011\",\"Knowsley\",\"RH8\",2\r\n\"E08000011\",\"Knowsley\",\"RQM\",2\r\n\"E08000011\",\"Knowsley\",\"RRK\",3\r\n\"E08000011\",\"Knowsley\",\"RWD\",2\r\n\"E08000011\",\"Knowsley\",\"RJL\",2\r\n\"E08000011\",\"Knowsley\",\"RMP\",2\r\n\"E08000011\",\"Knowsley\",\"RNA\",2\r\n\"E08000011\",\"Knowsley\",\"RWA\",2\r\n\"E08000011\",\"Knowsley\",\"RBA\",2\r\n\"E08000011\",\"Knowsley\",\"RHM\",2\r\n\"E08000011\",\"Knowsley\",\"RJ1\",2\r\n\"E08000011\",\"Knowsley\",\"RVJ\",2\r\n\"E08000011\",\"Knowsley\",\"RXR\",2\r\n\"E08000011\",\"Knowsley\",\"R1H\",1\r\n\"E08000011\",\"Knowsley\",\"RA7\",1\r\n\"E08000011\",\"Knowsley\",\"RD3\",1\r\n\"E08000011\",\"Knowsley\",\"RDZ\",1\r\n\"E08000011\",\"Knowsley\",\"RJ7\",1\r\n\"E08000011\",\"Knowsley\",\"RN5\",1\r\n\"E08000011\",\"Knowsley\",\"RN7\",1\r\n\"E08000011\",\"Knowsley\",\"RA2\",1\r\n\"E08000011\",\"Knowsley\",\"RFS\",1\r\n\"E08000011\",\"Knowsley\",\"RJ2\",2\r\n\"E08000011\",\"Knowsley\",\"RTH\",1\r\n\"E08000011\",\"Knowsley\",\"RTK\",1\r\n\"E08000011\",\"Knowsley\",\"RJC\",1\r\n\"E08000011\",\"Knowsley\",\"RNQ\",1\r\n\"E08000011\",\"Knowsley\",\"RTD\",1\r\n\"E08000011\",\"Knowsley\",\"R1F\",1\r\n\"E08000011\",\"Knowsley\",\"RBZ\",1\r\n\"E08000011\",\"Knowsley\",\"RD8\",1\r\n\"E08000011\",\"Knowsley\",\"RGP\",1\r\n\"E08000011\",\"Knowsley\",\"RJ6\",1\r\n\"E08000011\",\"Knowsley\",\"RJZ\",1\r\n\"E08000011\",\"Knowsley\",\"RLT\",1\r\n\"E08000011\",\"Knowsley\",\"RWE\",1\r\n\"E08000011\",\"Knowsley\",\"RHQ\",1\r\n\"E08000011\",\"Knowsley\",\"RNS\",1\r\n\"E08000011\",\"Knowsley\",\"RWG\",1\r\n\"E08000011\",\"Knowsley\",\"RBD\",1\r\n\"E08000011\",\"Knowsley\",\"RD1\",1\r\n\"E08000011\",\"Knowsley\",\"RQ8\",1\r\n\"E08000011\",\"Knowsley\",\"RR8\",1\r\n\"E08000011\",\"Knowsley\",\"RYR\",1\r\n\"E08000011\",\"Knowsley\",\"RAX\",1\r\n\"E08000011\",\"Knowsley\",\"RHU\",1\r\n\"E08000011\",\"Knowsley\",\"RKB\",1\r\n\"E08000011\",\"Knowsley\",\"RXC\",1\r\n\"E08000011\",\"Knowsley\",\"RXH\",1\r\n\"E08000012\",\"Liverpool\",\"REM\",55769\r\n\"E08000012\",\"Liverpool\",\"RBS\",7759\r\n\"E08000012\",\"Liverpool\",\"RBN\",5545\r\n\"E08000012\",\"Liverpool\",\"RW4\",1367\r\n\"E08000012\",\"Liverpool\",\"REP\",745\r\n\"E08000012\",\"Liverpool\",\"RBQ\",625\r\n\"E08000012\",\"Liverpool\",\"RET\",245\r\n\"E08000012\",\"Liverpool\",\"RBL\",226\r\n\"E08000012\",\"Liverpool\",\"REN\",280\r\n\"E08000012\",\"Liverpool\",\"RVY\",175\r\n\"E08000012\",\"Liverpool\",\"R0A\",85\r\n\"E08000012\",\"Liverpool\",\"RWW\",85\r\n\"E08000012\",\"Liverpool\",\"RJR\",36\r\n\"E08000012\",\"Liverpool\",\"RTV\",33\r\n\"E08000012\",\"Liverpool\",\"RM3\",26\r\n\"E08000012\",\"Liverpool\",\"RBT\",23\r\n\"E08000012\",\"Liverpool\",\"RXL\",19\r\n\"E08000012\",\"Liverpool\",\"RRF\",17\r\n\"E08000012\",\"Liverpool\",\"RW6\",17\r\n\"E08000012\",\"Liverpool\",\"RXN\",16\r\n\"E08000012\",\"Liverpool\",\"RTX\",16\r\n\"E08000012\",\"Liverpool\",\"RR8\",15\r\n\"E08000012\",\"Liverpool\",\"RTD\",12\r\n\"E08000012\",\"Liverpool\",\"R1H\",11\r\n\"E08000012\",\"Liverpool\",\"RRK\",14\r\n\"E08000012\",\"Liverpool\",\"RCB\",10\r\n\"E08000012\",\"Liverpool\",\"RKB\",10\r\n\"E08000012\",\"Liverpool\",\"RA9\",9\r\n\"E08000012\",\"Liverpool\",\"RWA\",9\r\n\"E08000012\",\"Liverpool\",\"R1K\",9\r\n\"E08000012\",\"Liverpool\",\"RBV\",8\r\n\"E08000012\",\"Liverpool\",\"RJ1\",8\r\n\"E08000012\",\"Liverpool\",\"RWY\",8\r\n\"E08000012\",\"Liverpool\",\"RHQ\",7\r\n\"E08000012\",\"Liverpool\",\"RQX\",7\r\n\"E08000012\",\"Liverpool\",\"RX1\",7\r\n\"E08000012\",\"Liverpool\",\"RMP\",7\r\n\"E08000012\",\"Liverpool\",\"RYJ\",6\r\n\"E08000012\",\"Liverpool\",\"RXK\",9\r\n\"E08000012\",\"Liverpool\",\"RJ7\",6\r\n\"E08000012\",\"Liverpool\",\"RTF\",6\r\n\"E08000012\",\"Liverpool\",\"RJ2\",10\r\n\"E08000012\",\"Liverpool\",\"RJE\",6\r\n\"E08000012\",\"Liverpool\",\"RBZ\",6\r\n\"E08000012\",\"Liverpool\",\"RMC\",6\r\n\"E08000012\",\"Liverpool\",\"RNL\",6\r\n\"E08000012\",\"Liverpool\",\"RXA\",6\r\n\"E08000012\",\"Liverpool\",\"RK9\",5\r\n\"E08000012\",\"Liverpool\",\"REF\",5\r\n\"E08000012\",\"Liverpool\",\"RDU\",5\r\n\"E08000012\",\"Liverpool\",\"RLT\",5\r\n\"E08000012\",\"Liverpool\",\"RAL\",5\r\n\"E08000012\",\"Liverpool\",\"RQ8\",5\r\n\"E08000012\",\"Liverpool\",\"RWH\",5\r\n\"E08000012\",\"Liverpool\",\"RYR\",5\r\n\"E08000012\",\"Liverpool\",\"RL4\",4\r\n\"E08000012\",\"Liverpool\",\"RWG\",4\r\n\"E08000012\",\"Liverpool\",\"RWJ\",4\r\n\"E08000012\",\"Liverpool\",\"RXQ\",4\r\n\"E08000012\",\"Liverpool\",\"RBA\",4\r\n\"E08000012\",\"Liverpool\",\"RDZ\",4\r\n\"E08000012\",\"Liverpool\",\"RXR\",4\r\n\"E08000012\",\"Liverpool\",\"RCF\",4\r\n\"E08000012\",\"Liverpool\",\"RQM\",4\r\n\"E08000012\",\"Liverpool\",\"RGR\",4\r\n\"E08000012\",\"Liverpool\",\"RGP\",4\r\n\"E08000012\",\"Liverpool\",\"RNS\",4\r\n\"E08000012\",\"Liverpool\",\"RJZ\",4\r\n\"E08000012\",\"Liverpool\",\"RK5\",4\r\n\"E08000012\",\"Liverpool\",\"RTH\",4\r\n\"E08000012\",\"Liverpool\",\"RFS\",4\r\n\"E08000012\",\"Liverpool\",\"RJC\",4\r\n\"E08000012\",\"Liverpool\",\"RM1\",4\r\n\"E08000012\",\"Liverpool\",\"RTP\",4\r\n\"E08000012\",\"Liverpool\",\"RAS\",3\r\n\"E08000012\",\"Liverpool\",\"RAX\",3\r\n\"E08000012\",\"Liverpool\",\"RCD\",3\r\n\"E08000012\",\"Liverpool\",\"RRV\",4\r\n\"E08000012\",\"Liverpool\",\"RWE\",3\r\n\"E08000012\",\"Liverpool\",\"RXF\",3\r\n\"E08000012\",\"Liverpool\",\"RVV\",3\r\n\"E08000012\",\"Liverpool\",\"RAE\",3\r\n\"E08000012\",\"Liverpool\",\"RF4\",3\r\n\"E08000012\",\"Liverpool\",\"RJN\",3\r\n\"E08000012\",\"Liverpool\",\"RTG\",5\r\n\"E08000012\",\"Liverpool\",\"RA7\",3\r\n\"E08000012\",\"Liverpool\",\"RHM\",3\r\n\"E08000012\",\"Liverpool\",\"RTE\",3\r\n\"E08000012\",\"Liverpool\",\"RXH\",3\r\n\"E08000012\",\"Liverpool\",\"RDD\",2\r\n\"E08000012\",\"Liverpool\",\"RFR\",2\r\n\"E08000012\",\"Liverpool\",\"RGT\",2\r\n\"E08000012\",\"Liverpool\",\"RNQ\",2\r\n\"E08000012\",\"Liverpool\",\"RVJ\",2\r\n\"E08000012\",\"Liverpool\",\"RTR\",2\r\n\"E08000012\",\"Liverpool\",\"RVW\",2\r\n\"E08000012\",\"Liverpool\",\"RD1\",2\r\n\"E08000012\",\"Liverpool\",\"RDE\",2\r\n\"E08000012\",\"Liverpool\",\"RWF\",2\r\n\"E08000012\",\"Liverpool\",\"RBK\",2\r\n\"E08000012\",\"Liverpool\",\"RNZ\",2\r\n\"E08000012\",\"Liverpool\",\"RWD\",2\r\n\"E08000012\",\"Liverpool\",\"RGN\",2\r\n\"E08000012\",\"Liverpool\",\"RHW\",2\r\n\"E08000012\",\"Liverpool\",\"RN5\",2\r\n\"E08000012\",\"Liverpool\",\"RBD\",2\r\n\"E08000012\",\"Liverpool\",\"RH8\",2\r\n\"E08000012\",\"Liverpool\",\"RN3\",2\r\n\"E08000012\",\"Liverpool\",\"RA2\",1\r\n\"E08000012\",\"Liverpool\",\"R1F\",1\r\n\"E08000012\",\"Liverpool\",\"RC9\",1\r\n\"E08000012\",\"Liverpool\",\"RX4\",1\r\n\"E08000012\",\"Liverpool\",\"RXP\",1\r\n\"E08000012\",\"Liverpool\",\"RYV\",1\r\n\"E08000012\",\"Liverpool\",\"RA4\",1\r\n\"E08000012\",\"Liverpool\",\"RAP\",1\r\n\"E08000012\",\"Liverpool\",\"RD3\",1\r\n\"E08000012\",\"Liverpool\",\"RTK\",1\r\n\"E08000012\",\"Liverpool\",\"RWP\",1\r\n\"E08000012\",\"Liverpool\",\"RC1\",1\r\n\"E08000012\",\"Liverpool\",\"R0B\",2\r\n\"E08000012\",\"Liverpool\",\"RJL\",1\r\n\"E08000012\",\"Liverpool\",\"RP5\",2\r\n\"E08000012\",\"Liverpool\",\"RJ6\",1\r\n\"E08000012\",\"Liverpool\",\"RLQ\",1\r\n\"E08000012\",\"Liverpool\",\"RW5\",1\r\n\"E08000012\",\"Liverpool\",\"RX2\",1\r\n\"E08000012\",\"Liverpool\",\"RXC\",1\r\n\"E08000012\",\"Liverpool\",\"RAT\",1\r\n\"E08000012\",\"Liverpool\",\"RT3\",1\r\n\"E08000012\",\"Liverpool\",\"RVR\",1\r\n\"E08000012\",\"Liverpool\",\"RCU\",1\r\n\"E08000012\",\"Liverpool\",\"RGD\",1\r\n\"E08000012\",\"Liverpool\",\"RKE\",1\r\n\"E08000012\",\"Liverpool\",\"RV9\",1\r\n\"E08000012\",\"Liverpool\",\"RXW\",1\r\n\"E08000013\",\"St. Helens\",\"RBN\",22785\r\n\"E08000013\",\"St. Helens\",\"RWW\",1407\r\n\"E08000013\",\"St. Helens\",\"REM\",930\r\n\"E08000013\",\"St. Helens\",\"RTV\",433\r\n\"E08000013\",\"St. Helens\",\"RRF\",407\r\n\"E08000013\",\"St. Helens\",\"RBS\",401\r\n\"E08000013\",\"St. Helens\",\"RBQ\",219\r\n\"E08000013\",\"St. Helens\",\"RET\",116\r\n\"E08000013\",\"St. Helens\",\"R0A\",96\r\n\"E08000013\",\"St. Helens\",\"REN\",68\r\n\"E08000013\",\"St. Helens\",\"RM3\",48\r\n\"E08000013\",\"St. Helens\",\"RVY\",57\r\n\"E08000013\",\"St. Helens\",\"RTX\",21\r\n\"E08000013\",\"St. Helens\",\"RJR\",21\r\n\"E08000013\",\"St. Helens\",\"RBV\",19\r\n\"E08000013\",\"St. Helens\",\"RXL\",19\r\n\"E08000013\",\"St. Helens\",\"RBL\",18\r\n\"E08000013\",\"St. Helens\",\"REP\",18\r\n\"E08000013\",\"St. Helens\",\"RXN\",18\r\n\"E08000013\",\"St. Helens\",\"RJE\",13\r\n\"E08000013\",\"St. Helens\",\"RBT\",13\r\n\"E08000013\",\"St. Helens\",\"RRK\",9\r\n\"E08000013\",\"St. Helens\",\"RNL\",7\r\n\"E08000013\",\"St. Helens\",\"RR8\",7\r\n\"E08000013\",\"St. Helens\",\"RW6\",7\r\n\"E08000013\",\"St. Helens\",\"RMC\",6\r\n\"E08000013\",\"St. Helens\",\"RMP\",5\r\n\"E08000013\",\"St. Helens\",\"RCB\",5\r\n\"E08000013\",\"St. Helens\",\"RTD\",5\r\n\"E08000013\",\"St. Helens\",\"RWD\",5\r\n\"E08000013\",\"St. Helens\",\"RA2\",4\r\n\"E08000013\",\"St. Helens\",\"RAE\",4\r\n\"E08000013\",\"St. Helens\",\"RBZ\",4\r\n\"E08000013\",\"St. Helens\",\"RHM\",3\r\n\"E08000013\",\"St. Helens\",\"RVR\",3\r\n\"E08000013\",\"St. Helens\",\"RH8\",3\r\n\"E08000013\",\"St. Helens\",\"RHQ\",3\r\n\"E08000013\",\"St. Helens\",\"REF\",3\r\n\"E08000013\",\"St. Helens\",\"RJ1\",3\r\n\"E08000013\",\"St. Helens\",\"RWE\",3\r\n\"E08000013\",\"St. Helens\",\"RK9\",3\r\n\"E08000013\",\"St. Helens\",\"RTH\",3\r\n\"E08000013\",\"St. Helens\",\"RGN\",3\r\n\"E08000013\",\"St. Helens\",\"RKB\",3\r\n\"E08000013\",\"St. Helens\",\"RHW\",3\r\n\"E08000013\",\"St. Helens\",\"RWJ\",3\r\n\"E08000013\",\"St. Helens\",\"RD1\",2\r\n\"E08000013\",\"St. Helens\",\"RDZ\",2\r\n\"E08000013\",\"St. Helens\",\"RTG\",2\r\n\"E08000013\",\"St. Helens\",\"RA3\",2\r\n\"E08000013\",\"St. Helens\",\"RAS\",2\r\n\"E08000013\",\"St. Helens\",\"RL4\",2\r\n\"E08000013\",\"St. Helens\",\"RRV\",2\r\n\"E08000013\",\"St. Helens\",\"RTF\",2\r\n\"E08000013\",\"St. Helens\",\"RWH\",2\r\n\"E08000013\",\"St. Helens\",\"RN3\",2\r\n\"E08000013\",\"St. Helens\",\"RXR\",2\r\n\"E08000013\",\"St. Helens\",\"RBA\",2\r\n\"E08000013\",\"St. Helens\",\"RF4\",2\r\n\"E08000013\",\"St. Helens\",\"RXQ\",2\r\n\"E08000013\",\"St. Helens\",\"R1K\",2\r\n\"E08000013\",\"St. Helens\",\"RBD\",2\r\n\"E08000013\",\"St. Helens\",\"RXH\",2\r\n\"E08000013\",\"St. Helens\",\"RW4\",2\r\n\"E08000013\",\"St. Helens\",\"RWY\",2\r\n\"E08000013\",\"St. Helens\",\"RJN\",2\r\n\"E08000013\",\"St. Helens\",\"RXF\",2\r\n\"E08000013\",\"St. Helens\",\"RJZ\",1\r\n\"E08000013\",\"St. Helens\",\"RN5\",1\r\n\"E08000013\",\"St. Helens\",\"RQX\",1\r\n\"E08000013\",\"St. Helens\",\"RXK\",1\r\n\"E08000013\",\"St. Helens\",\"RXW\",1\r\n\"E08000013\",\"St. Helens\",\"RC9\",1\r\n\"E08000013\",\"St. Helens\",\"RD8\",1\r\n\"E08000013\",\"St. Helens\",\"RFS\",1\r\n\"E08000013\",\"St. Helens\",\"RQM\",1\r\n\"E08000013\",\"St. Helens\",\"RCF\",1\r\n\"E08000013\",\"St. Helens\",\"RGT\",1\r\n\"E08000013\",\"St. Helens\",\"RHU\",1\r\n\"E08000013\",\"St. Helens\",\"RJL\",1\r\n\"E08000013\",\"St. Helens\",\"RP5\",2\r\n\"E08000013\",\"St. Helens\",\"RX1\",1\r\n\"E08000013\",\"St. Helens\",\"RD3\",1\r\n\"E08000013\",\"St. Helens\",\"RDU\",1\r\n\"E08000013\",\"St. Helens\",\"RJ7\",1\r\n\"E08000013\",\"St. Helens\",\"RNA\",1\r\n\"E08000013\",\"St. Helens\",\"RVV\",1\r\n\"E08000013\",\"St. Helens\",\"RW5\",1\r\n\"E08000013\",\"St. Helens\",\"RXT\",1\r\n\"E08000013\",\"St. Helens\",\"RFR\",1\r\n\"E08000013\",\"St. Helens\",\"RN7\",1\r\n\"E08000013\",\"St. Helens\",\"R1F\",1\r\n\"E08000013\",\"St. Helens\",\"R1H\",1\r\n\"E08000013\",\"St. Helens\",\"R0B\",1\r\n\"E08000013\",\"St. Helens\",\"RWG\",1\r\n\"E08000013\",\"St. Helens\",\"RM1\",1\r\n\"E08000013\",\"St. Helens\",\"RQ3\",1\r\n\"E08000013\",\"St. Helens\",\"RYJ\",1\r\n\"E08000013\",\"St. Helens\",\"RJC\",1\r\n\"E08000013\",\"St. Helens\",\"RKE\",1\r\n\"E08000013\",\"St. Helens\",\"RVJ\",1\r\n\"E08000013\",\"St. Helens\",\"RWP\",1\r\n\"E08000013\",\"St. Helens\",\"RX2\",1\r\n\"E08000014\",\"Sefton\",\"REM\",25305\r\n\"E08000014\",\"Sefton\",\"RVY\",17226\r\n\"E08000014\",\"Sefton\",\"RBS\",2227\r\n\"E08000014\",\"Sefton\",\"RBN\",604\r\n\"E08000014\",\"Sefton\",\"RW4\",499\r\n\"E08000014\",\"Sefton\",\"RBQ\",396\r\n\"E08000014\",\"Sefton\",\"RET\",196\r\n\"E08000014\",\"Sefton\",\"REP\",173\r\n\"E08000014\",\"Sefton\",\"REN\",125\r\n\"E08000014\",\"Sefton\",\"RBL\",78\r\n\"E08000014\",\"Sefton\",\"R0A\",62\r\n\"E08000014\",\"Sefton\",\"RXN\",42\r\n\"E08000014\",\"Sefton\",\"RXL\",28\r\n\"E08000014\",\"Sefton\",\"RTX\",22\r\n\"E08000014\",\"Sefton\",\"RWW\",21\r\n\"E08000014\",\"Sefton\",\"RNL\",21\r\n\"E08000014\",\"Sefton\",\"RM3\",20\r\n\"E08000014\",\"Sefton\",\"RRF\",18\r\n\"E08000014\",\"Sefton\",\"RJR\",17\r\n\"E08000014\",\"Sefton\",\"RBT\",11\r\n\"E08000014\",\"Sefton\",\"RJE\",11\r\n\"E08000014\",\"Sefton\",\"RR8\",9\r\n\"E08000014\",\"Sefton\",\"RW6\",8\r\n\"E08000014\",\"Sefton\",\"RRK\",9\r\n\"E08000014\",\"Sefton\",\"REF\",7\r\n\"E08000014\",\"Sefton\",\"RJ1\",7\r\n\"E08000014\",\"Sefton\",\"RH8\",7\r\n\"E08000014\",\"Sefton\",\"RTH\",6\r\n\"E08000014\",\"Sefton\",\"RDE\",5\r\n\"E08000014\",\"Sefton\",\"RX1\",5\r\n\"E08000014\",\"Sefton\",\"RBV\",5\r\n\"E08000014\",\"Sefton\",\"RXA\",5\r\n\"E08000014\",\"Sefton\",\"RHU\",5\r\n\"E08000014\",\"Sefton\",\"RYJ\",5\r\n\"E08000014\",\"Sefton\",\"RBZ\",4\r\n\"E08000014\",\"Sefton\",\"RFS\",4\r\n\"E08000014\",\"Sefton\",\"RHQ\",4\r\n\"E08000014\",\"Sefton\",\"RJZ\",4\r\n\"E08000014\",\"Sefton\",\"RXF\",4\r\n\"E08000014\",\"Sefton\",\"RXR\",4\r\n\"E08000014\",\"Sefton\",\"RCF\",4\r\n\"E08000014\",\"Sefton\",\"RQX\",4\r\n\"E08000014\",\"Sefton\",\"RXQ\",4\r\n\"E08000014\",\"Sefton\",\"RCB\",4\r\n\"E08000014\",\"Sefton\",\"RWG\",4\r\n\"E08000014\",\"Sefton\",\"RXC\",4\r\n\"E08000014\",\"Sefton\",\"RXP\",4\r\n\"E08000014\",\"Sefton\",\"RMC\",3\r\n\"E08000014\",\"Sefton\",\"RTD\",3\r\n\"E08000014\",\"Sefton\",\"RWP\",3\r\n\"E08000014\",\"Sefton\",\"RAS\",3\r\n\"E08000014\",\"Sefton\",\"RCD\",3\r\n\"E08000014\",\"Sefton\",\"RGN\",3\r\n\"E08000014\",\"Sefton\",\"RMP\",3\r\n\"E08000014\",\"Sefton\",\"RFF\",3\r\n\"E08000014\",\"Sefton\",\"RHW\",3\r\n\"E08000014\",\"Sefton\",\"RYR\",3\r\n\"E08000014\",\"Sefton\",\"RJ6\",3\r\n\"E08000014\",\"Sefton\",\"RWF\",3\r\n\"E08000014\",\"Sefton\",\"RAX\",3\r\n\"E08000014\",\"Sefton\",\"RDU\",3\r\n\"E08000014\",\"Sefton\",\"RAL\",3\r\n\"E08000014\",\"Sefton\",\"RDZ\",3\r\n\"E08000014\",\"Sefton\",\"RNS\",3\r\n\"E08000014\",\"Sefton\",\"RTG\",5\r\n\"E08000014\",\"Sefton\",\"RXW\",4\r\n\"E08000014\",\"Sefton\",\"RXK\",5\r\n\"E08000014\",\"Sefton\",\"RAE\",2\r\n\"E08000014\",\"Sefton\",\"RBD\",2\r\n\"E08000014\",\"Sefton\",\"RKB\",2\r\n\"E08000014\",\"Sefton\",\"R0B\",3\r\n\"E08000014\",\"Sefton\",\"RP5\",2\r\n\"E08000014\",\"Sefton\",\"RTE\",2\r\n\"E08000014\",\"Sefton\",\"R1H\",2\r\n\"E08000014\",\"Sefton\",\"RC1\",2\r\n\"E08000014\",\"Sefton\",\"RTP\",2\r\n\"E08000014\",\"Sefton\",\"RW5\",2\r\n\"E08000014\",\"Sefton\",\"RWE\",2\r\n\"E08000014\",\"Sefton\",\"RXE\",2\r\n\"E08000014\",\"Sefton\",\"RLQ\",2\r\n\"E08000014\",\"Sefton\",\"RWK\",2\r\n\"E08000014\",\"Sefton\",\"RDD\",3\r\n\"E08000014\",\"Sefton\",\"RJN\",2\r\n\"E08000014\",\"Sefton\",\"RWH\",2\r\n\"E08000014\",\"Sefton\",\"RTR\",3\r\n\"E08000014\",\"Sefton\",\"RD3\",2\r\n\"E08000014\",\"Sefton\",\"RN5\",2\r\n\"E08000014\",\"Sefton\",\"RNA\",2\r\n\"E08000014\",\"Sefton\",\"RWJ\",2\r\n\"E08000014\",\"Sefton\",\"RA7\",2\r\n\"E08000014\",\"Sefton\",\"RN3\",2\r\n\"E08000014\",\"Sefton\",\"RTV\",2\r\n\"E08000014\",\"Sefton\",\"RD8\",1\r\n\"E08000014\",\"Sefton\",\"RGP\",1\r\n\"E08000014\",\"Sefton\",\"RNZ\",1\r\n\"E08000014\",\"Sefton\",\"RWD\",1\r\n\"E08000014\",\"Sefton\",\"RA4\",1\r\n\"E08000014\",\"Sefton\",\"RF4\",1\r\n\"E08000014\",\"Sefton\",\"RJ7\",1\r\n\"E08000014\",\"Sefton\",\"RQ3\",1\r\n\"E08000014\",\"Sefton\",\"RGM\",1\r\n\"E08000014\",\"Sefton\",\"RWA\",1\r\n\"E08000014\",\"Sefton\",\"RM1\",1\r\n\"E08000014\",\"Sefton\",\"RRV\",1\r\n\"E08000014\",\"Sefton\",\"RAP\",1\r\n\"E08000014\",\"Sefton\",\"RBA\",1\r\n\"E08000014\",\"Sefton\",\"RGR\",1\r\n\"E08000014\",\"Sefton\",\"RKE\",1\r\n\"E08000014\",\"Sefton\",\"RVR\",1\r\n\"E08000014\",\"Sefton\",\"RGT\",1\r\n\"E08000014\",\"Sefton\",\"RTF\",1\r\n\"E08000014\",\"Sefton\",\"RXH\",1\r\n\"E08000014\",\"Sefton\",\"RCX\",1\r\n\"E08000014\",\"Sefton\",\"RD1\",1\r\n\"E08000014\",\"Sefton\",\"RFR\",1\r\n\"E08000014\",\"Sefton\",\"RQM\",1\r\n\"E08000014\",\"Sefton\",\"RT3\",1\r\n\"E08000014\",\"Sefton\",\"RTK\",1\r\n\"E08000014\",\"Sefton\",\"RV9\",1\r\n\"E08000014\",\"Sefton\",\"RC9\",1\r\n\"E08000015\",\"Wirral\",\"RBL\",43576\r\n\"E08000015\",\"Wirral\",\"REN\",535\r\n\"E08000015\",\"Wirral\",\"RBS\",517\r\n\"E08000015\",\"Wirral\",\"RXA\",508\r\n\"E08000015\",\"Wirral\",\"REM\",840\r\n\"E08000015\",\"Wirral\",\"RBQ\",346\r\n\"E08000015\",\"Wirral\",\"RJR\",334\r\n\"E08000015\",\"Wirral\",\"RET\",206\r\n\"E08000015\",\"Wirral\",\"RBN\",164\r\n\"E08000015\",\"Wirral\",\"R0A\",46\r\n\"E08000015\",\"Wirral\",\"REP\",26\r\n\"E08000015\",\"Wirral\",\"RWW\",21\r\n\"E08000015\",\"Wirral\",\"RJE\",20\r\n\"E08000015\",\"Wirral\",\"RTX\",17\r\n\"E08000015\",\"Wirral\",\"RBT\",16\r\n\"E08000015\",\"Wirral\",\"RVY\",19\r\n\"E08000015\",\"Wirral\",\"RBV\",11\r\n\"E08000015\",\"Wirral\",\"RXN\",11\r\n\"E08000015\",\"Wirral\",\"RM3\",10\r\n\"E08000015\",\"Wirral\",\"RW6\",10\r\n\"E08000015\",\"Wirral\",\"RRF\",8\r\n\"E08000015\",\"Wirral\",\"RHQ\",8\r\n\"E08000015\",\"Wirral\",\"RWJ\",8\r\n\"E08000015\",\"Wirral\",\"RHM\",7\r\n\"E08000015\",\"Wirral\",\"RXL\",7\r\n\"E08000015\",\"Wirral\",\"RXW\",12\r\n\"E08000015\",\"Wirral\",\"RR8\",7\r\n\"E08000015\",\"Wirral\",\"RRK\",8\r\n\"E08000015\",\"Wirral\",\"RA9\",6\r\n\"E08000015\",\"Wirral\",\"RCB\",6\r\n\"E08000015\",\"Wirral\",\"RNL\",6\r\n\"E08000015\",\"Wirral\",\"RHU\",5\r\n\"E08000015\",\"Wirral\",\"RRV\",5\r\n\"E08000015\",\"Wirral\",\"RWP\",5\r\n\"E08000015\",\"Wirral\",\"RTH\",5\r\n\"E08000015\",\"Wirral\",\"RJN\",4\r\n\"E08000015\",\"Wirral\",\"RXR\",4\r\n\"E08000015\",\"Wirral\",\"RD3\",4\r\n\"E08000015\",\"Wirral\",\"RD8\",4\r\n\"E08000015\",\"Wirral\",\"RTP\",4\r\n\"E08000015\",\"Wirral\",\"RTE\",4\r\n\"E08000015\",\"Wirral\",\"RTF\",4\r\n\"E08000015\",\"Wirral\",\"RJ1\",4\r\n\"E08000015\",\"Wirral\",\"REF\",4\r\n\"E08000015\",\"Wirral\",\"RWE\",4\r\n\"E08000015\",\"Wirral\",\"RJC\",4\r\n\"E08000015\",\"Wirral\",\"RTV\",4\r\n\"E08000015\",\"Wirral\",\"R1K\",4\r\n\"E08000015\",\"Wirral\",\"RMP\",4\r\n\"E08000015\",\"Wirral\",\"R1H\",3\r\n\"E08000015\",\"Wirral\",\"RAS\",3\r\n\"E08000015\",\"Wirral\",\"RGN\",3\r\n\"E08000015\",\"Wirral\",\"RLQ\",3\r\n\"E08000015\",\"Wirral\",\"RWY\",3\r\n\"E08000015\",\"Wirral\",\"RAE\",3\r\n\"E08000015\",\"Wirral\",\"RK5\",3\r\n\"E08000015\",\"Wirral\",\"RA7\",3\r\n\"E08000015\",\"Wirral\",\"RQM\",3\r\n\"E08000015\",\"Wirral\",\"RTR\",3\r\n\"E08000015\",\"Wirral\",\"RGT\",3\r\n\"E08000015\",\"Wirral\",\"RHW\",3\r\n\"E08000015\",\"Wirral\",\"RN7\",3\r\n\"E08000015\",\"Wirral\",\"RWA\",3\r\n\"E08000015\",\"Wirral\",\"RM1\",3\r\n\"E08000015\",\"Wirral\",\"RCF\",3\r\n\"E08000015\",\"Wirral\",\"RDU\",3\r\n\"E08000015\",\"Wirral\",\"RJL\",3\r\n\"E08000015\",\"Wirral\",\"RKB\",3\r\n\"E08000015\",\"Wirral\",\"RPY\",3\r\n\"E08000015\",\"Wirral\",\"RC9\",2\r\n\"E08000015\",\"Wirral\",\"RVJ\",2\r\n\"E08000015\",\"Wirral\",\"RTD\",2\r\n\"E08000015\",\"Wirral\",\"RVW\",2\r\n\"E08000015\",\"Wirral\",\"RCD\",2\r\n\"E08000015\",\"Wirral\",\"RXQ\",2\r\n\"E08000015\",\"Wirral\",\"RNA\",2\r\n\"E08000015\",\"Wirral\",\"RK9\",2\r\n\"E08000015\",\"Wirral\",\"RQ3\",2\r\n\"E08000015\",\"Wirral\",\"RXK\",4\r\n\"E08000015\",\"Wirral\",\"RAX\",2\r\n\"E08000015\",\"Wirral\",\"RD1\",2\r\n\"E08000015\",\"Wirral\",\"RN5\",2\r\n\"E08000015\",\"Wirral\",\"RQW\",2\r\n\"E08000015\",\"Wirral\",\"RWG\",2\r\n\"E08000015\",\"Wirral\",\"RXF\",2\r\n\"E08000015\",\"Wirral\",\"RNZ\",2\r\n\"E08000015\",\"Wirral\",\"RWD\",2\r\n\"E08000015\",\"Wirral\",\"RWH\",2\r\n\"E08000015\",\"Wirral\",\"RFS\",1\r\n\"E08000015\",\"Wirral\",\"RTG\",2\r\n\"E08000015\",\"Wirral\",\"RW4\",1\r\n\"E08000015\",\"Wirral\",\"RAL\",1\r\n\"E08000015\",\"Wirral\",\"RAP\",1\r\n\"E08000015\",\"Wirral\",\"RRE\",1\r\n\"E08000015\",\"Wirral\",\"RAJ\",1\r\n\"E08000015\",\"Wirral\",\"RCX\",1\r\n\"E08000015\",\"Wirral\",\"RDZ\",1\r\n\"E08000015\",\"Wirral\",\"RP5\",1\r\n\"E08000015\",\"Wirral\",\"RH8\",1\r\n\"E08000015\",\"Wirral\",\"RJ7\",1\r\n\"E08000015\",\"Wirral\",\"RL1\",1\r\n\"E08000015\",\"Wirral\",\"RLT\",1\r\n\"E08000015\",\"Wirral\",\"RVV\",1\r\n\"E08000015\",\"Wirral\",\"RYR\",1\r\n\"E08000015\",\"Wirral\",\"RA4\",1\r\n\"E08000015\",\"Wirral\",\"RGR\",1\r\n\"E08000015\",\"Wirral\",\"RX1\",1\r\n\"E08000015\",\"Wirral\",\"RXC\",1\r\n\"E08000015\",\"Wirral\",\"RDE\",1\r\n\"E08000015\",\"Wirral\",\"RJ6\",1\r\n\"E08000015\",\"Wirral\",\"RNQ\",1\r\n\"E08000015\",\"Wirral\",\"RXH\",1\r\n\"E08000015\",\"Wirral\",\"RF4\",1\r\n\"E08000015\",\"Wirral\",\"RN3\",1\r\n\"E08000016\",\"Barnsley\",\"RFF\",30080\r\n\"E08000016\",\"Barnsley\",\"RHQ\",2536\r\n\"E08000016\",\"Barnsley\",\"RP5\",445\r\n\"E08000016\",\"Barnsley\",\"RXF\",374\r\n\"E08000016\",\"Barnsley\",\"RCU\",272\r\n\"E08000016\",\"Barnsley\",\"RFR\",323\r\n\"E08000016\",\"Barnsley\",\"RXG\",203\r\n\"E08000016\",\"Barnsley\",\"RR8\",114\r\n\"E08000016\",\"Barnsley\",\"RCB\",65\r\n\"E08000016\",\"Barnsley\",\"RWY\",38\r\n\"E08000016\",\"Barnsley\",\"RWD\",25\r\n\"E08000016\",\"Barnsley\",\"R0A\",21\r\n\"E08000016\",\"Barnsley\",\"RWA\",15\r\n\"E08000016\",\"Barnsley\",\"RJL\",14\r\n\"E08000016\",\"Barnsley\",\"RX1\",11\r\n\"E08000016\",\"Barnsley\",\"RAE\",10\r\n\"E08000016\",\"Barnsley\",\"REF\",9\r\n\"E08000016\",\"Barnsley\",\"RFS\",9\r\n\"E08000016\",\"Barnsley\",\"RCD\",9\r\n\"E08000016\",\"Barnsley\",\"RTR\",9\r\n\"E08000016\",\"Barnsley\",\"RXL\",8\r\n\"E08000016\",\"Barnsley\",\"RTD\",8\r\n\"E08000016\",\"Barnsley\",\"RXE\",8\r\n\"E08000016\",\"Barnsley\",\"RXP\",8\r\n\"E08000016\",\"Barnsley\",\"RW6\",7\r\n\"E08000016\",\"Barnsley\",\"REM\",8\r\n\"E08000016\",\"Barnsley\",\"RGT\",6\r\n\"E08000016\",\"Barnsley\",\"RK5\",6\r\n\"E08000016\",\"Barnsley\",\"RVW\",6\r\n\"E08000016\",\"Barnsley\",\"RBV\",6\r\n\"E08000016\",\"Barnsley\",\"RTF\",6\r\n\"E08000016\",\"Barnsley\",\"RX3\",5\r\n\"E08000016\",\"Barnsley\",\"RTX\",5\r\n\"E08000016\",\"Barnsley\",\"RJE\",5\r\n\"E08000016\",\"Barnsley\",\"R1K\",4\r\n\"E08000016\",\"Barnsley\",\"RMP\",4\r\n\"E08000016\",\"Barnsley\",\"RCF\",4\r\n\"E08000016\",\"Barnsley\",\"RTG\",4\r\n\"E08000016\",\"Barnsley\",\"RXR\",4\r\n\"E08000016\",\"Barnsley\",\"RM3\",4\r\n\"E08000016\",\"Barnsley\",\"RVV\",4\r\n\"E08000016\",\"Barnsley\",\"RWE\",4\r\n\"E08000016\",\"Barnsley\",\"RK9\",3\r\n\"E08000016\",\"Barnsley\",\"RRK\",5\r\n\"E08000016\",\"Barnsley\",\"RHU\",3\r\n\"E08000016\",\"Barnsley\",\"RJC\",3\r\n\"E08000016\",\"Barnsley\",\"RA7\",3\r\n\"E08000016\",\"Barnsley\",\"RF4\",3\r\n\"E08000016\",\"Barnsley\",\"RKB\",3\r\n\"E08000016\",\"Barnsley\",\"RNS\",3\r\n\"E08000016\",\"Barnsley\",\"RM1\",3\r\n\"E08000016\",\"Barnsley\",\"RRF\",3\r\n\"E08000016\",\"Barnsley\",\"RRV\",4\r\n\"E08000016\",\"Barnsley\",\"RD3\",2\r\n\"E08000016\",\"Barnsley\",\"RYR\",2\r\n\"E08000016\",\"Barnsley\",\"RA4\",2\r\n\"E08000016\",\"Barnsley\",\"RA9\",2\r\n\"E08000016\",\"Barnsley\",\"RBD\",2\r\n\"E08000016\",\"Barnsley\",\"RBQ\",2\r\n\"E08000016\",\"Barnsley\",\"RGP\",2\r\n\"E08000016\",\"Barnsley\",\"RGR\",2\r\n\"E08000016\",\"Barnsley\",\"RNL\",2\r\n\"E08000016\",\"Barnsley\",\"RR7\",2\r\n\"E08000016\",\"Barnsley\",\"RVJ\",2\r\n\"E08000016\",\"Barnsley\",\"RXH\",2\r\n\"E08000016\",\"Barnsley\",\"RXW\",3\r\n\"E08000016\",\"Barnsley\",\"RGN\",2\r\n\"E08000016\",\"Barnsley\",\"RBA\",2\r\n\"E08000016\",\"Barnsley\",\"RBT\",2\r\n\"E08000016\",\"Barnsley\",\"RC1\",2\r\n\"E08000016\",\"Barnsley\",\"RJ7\",2\r\n\"E08000016\",\"Barnsley\",\"RTH\",2\r\n\"E08000016\",\"Barnsley\",\"RTE\",2\r\n\"E08000016\",\"Barnsley\",\"RCX\",2\r\n\"E08000016\",\"Barnsley\",\"RH8\",2\r\n\"E08000016\",\"Barnsley\",\"RYJ\",2\r\n\"E08000016\",\"Barnsley\",\"R1H\",2\r\n\"E08000016\",\"Barnsley\",\"RBN\",2\r\n\"E08000016\",\"Barnsley\",\"RJ1\",2\r\n\"E08000016\",\"Barnsley\",\"RJ2\",3\r\n\"E08000016\",\"Barnsley\",\"R1F\",1\r\n\"E08000016\",\"Barnsley\",\"RDD\",1\r\n\"E08000016\",\"Barnsley\",\"RP6\",1\r\n\"E08000016\",\"Barnsley\",\"RQ8\",1\r\n\"E08000016\",\"Barnsley\",\"RQW\",1\r\n\"E08000016\",\"Barnsley\",\"RW1\",1\r\n\"E08000016\",\"Barnsley\",\"RW5\",1\r\n\"E08000016\",\"Barnsley\",\"RBL\",1\r\n\"E08000016\",\"Barnsley\",\"RDE\",1\r\n\"E08000016\",\"Barnsley\",\"RHW\",1\r\n\"E08000016\",\"Barnsley\",\"RJ6\",1\r\n\"E08000016\",\"Barnsley\",\"RPC\",1\r\n\"E08000016\",\"Barnsley\",\"RWF\",1\r\n\"E08000016\",\"Barnsley\",\"RXC\",1\r\n\"E08000016\",\"Barnsley\",\"RAJ\",1\r\n\"E08000016\",\"Barnsley\",\"RBZ\",1\r\n\"E08000016\",\"Barnsley\",\"R0B\",1\r\n\"E08000016\",\"Barnsley\",\"RWJ\",1\r\n\"E08000016\",\"Barnsley\",\"RXK\",1\r\n\"E08000016\",\"Barnsley\",\"RA3\",1\r\n\"E08000016\",\"Barnsley\",\"RJN\",1\r\n\"E08000016\",\"Barnsley\",\"RTP\",1\r\n\"E08000016\",\"Barnsley\",\"RLQ\",1\r\n\"E08000016\",\"Barnsley\",\"RNA\",1\r\n\"E08000016\",\"Barnsley\",\"RPA\",1\r\n\"E08000016\",\"Barnsley\",\"RQX\",1\r\n\"E08000016\",\"Barnsley\",\"RJR\",1\r\n\"E08000016\",\"Barnsley\",\"RNQ\",1\r\n\"E08000016\",\"Barnsley\",\"RBK\",1\r\n\"E08000016\",\"Barnsley\",\"RC9\",1\r\n\"E08000016\",\"Barnsley\",\"RDU\",1\r\n\"E08000016\",\"Barnsley\",\"RMC\",1\r\n\"E08000016\",\"Barnsley\",\"RN3\",1\r\n\"E08000017\",\"Doncaster\",\"RP5\",34693\r\n\"E08000017\",\"Doncaster\",\"RHQ\",1321\r\n\"E08000017\",\"Doncaster\",\"RFR\",875\r\n\"E08000017\",\"Doncaster\",\"RXE\",440\r\n\"E08000017\",\"Doncaster\",\"RCU\",311\r\n\"E08000017\",\"Doncaster\",\"RJL\",117\r\n\"E08000017\",\"Doncaster\",\"RFF\",114\r\n\"E08000017\",\"Doncaster\",\"RR8\",108\r\n\"E08000017\",\"Doncaster\",\"RXF\",88\r\n\"E08000017\",\"Doncaster\",\"RCB\",70\r\n\"E08000017\",\"Doncaster\",\"RWA\",57\r\n\"E08000017\",\"Doncaster\",\"RWD\",49\r\n\"E08000017\",\"Doncaster\",\"R0A\",25\r\n\"E08000017\",\"Doncaster\",\"RX1\",20\r\n\"E08000017\",\"Doncaster\",\"RXP\",18\r\n\"E08000017\",\"Doncaster\",\"RFS\",13\r\n\"E08000017\",\"Doncaster\",\"RJ1\",13\r\n\"E08000017\",\"Doncaster\",\"RTG\",14\r\n\"E08000017\",\"Doncaster\",\"REF\",12\r\n\"E08000017\",\"Doncaster\",\"RTF\",11\r\n\"E08000017\",\"Doncaster\",\"RCF\",10\r\n\"E08000017\",\"Doncaster\",\"RKB\",9\r\n\"E08000017\",\"Doncaster\",\"RAE\",9\r\n\"E08000017\",\"Doncaster\",\"RTD\",9\r\n\"E08000017\",\"Doncaster\",\"RXL\",8\r\n\"E08000017\",\"Doncaster\",\"RK5\",8\r\n\"E08000017\",\"Doncaster\",\"REM\",11\r\n\"E08000017\",\"Doncaster\",\"RTR\",8\r\n\"E08000017\",\"Doncaster\",\"RHU\",7\r\n\"E08000017\",\"Doncaster\",\"RGN\",7\r\n\"E08000017\",\"Doncaster\",\"RHM\",6\r\n\"E08000017\",\"Doncaster\",\"RDU\",6\r\n\"E08000017\",\"Doncaster\",\"RRV\",6\r\n\"E08000017\",\"Doncaster\",\"RRK\",8\r\n\"E08000017\",\"Doncaster\",\"RJE\",6\r\n\"E08000017\",\"Doncaster\",\"RCD\",6\r\n\"E08000017\",\"Doncaster\",\"RAL\",5\r\n\"E08000017\",\"Doncaster\",\"RNL\",5\r\n\"E08000017\",\"Doncaster\",\"RWY\",5\r\n\"E08000017\",\"Doncaster\",\"RVJ\",5\r\n\"E08000017\",\"Doncaster\",\"RD8\",5\r\n\"E08000017\",\"Doncaster\",\"RWH\",5\r\n\"E08000017\",\"Doncaster\",\"RQM\",5\r\n\"E08000017\",\"Doncaster\",\"RA7\",4\r\n\"E08000017\",\"Doncaster\",\"RVV\",4\r\n\"E08000017\",\"Doncaster\",\"RTH\",4\r\n\"E08000017\",\"Doncaster\",\"RJR\",4\r\n\"E08000017\",\"Doncaster\",\"RCX\",4\r\n\"E08000017\",\"Doncaster\",\"R1H\",4\r\n\"E08000017\",\"Doncaster\",\"RWW\",4\r\n\"E08000017\",\"Doncaster\",\"RF4\",3\r\n\"E08000017\",\"Doncaster\",\"RM3\",3\r\n\"E08000017\",\"Doncaster\",\"RC1\",3\r\n\"E08000017\",\"Doncaster\",\"RQW\",3\r\n\"E08000017\",\"Doncaster\",\"RA9\",3\r\n\"E08000017\",\"Doncaster\",\"RXK\",4\r\n\"E08000017\",\"Doncaster\",\"RGT\",3\r\n\"E08000017\",\"Doncaster\",\"RTP\",3\r\n\"E08000017\",\"Doncaster\",\"RBT\",3\r\n\"E08000017\",\"Doncaster\",\"RM1\",3\r\n\"E08000017\",\"Doncaster\",\"RXQ\",3\r\n\"E08000017\",\"Doncaster\",\"RW6\",3\r\n\"E08000017\",\"Doncaster\",\"RA3\",2\r\n\"E08000017\",\"Doncaster\",\"RWF\",2\r\n\"E08000017\",\"Doncaster\",\"RRF\",2\r\n\"E08000017\",\"Doncaster\",\"RTE\",2\r\n\"E08000017\",\"Doncaster\",\"RXW\",2\r\n\"E08000017\",\"Doncaster\",\"RHW\",2\r\n\"E08000017\",\"Doncaster\",\"RJZ\",2\r\n\"E08000017\",\"Doncaster\",\"RN3\",2\r\n\"E08000017\",\"Doncaster\",\"RNS\",2\r\n\"E08000017\",\"Doncaster\",\"RVY\",2\r\n\"E08000017\",\"Doncaster\",\"RX3\",2\r\n\"E08000017\",\"Doncaster\",\"RAP\",2\r\n\"E08000017\",\"Doncaster\",\"RBS\",2\r\n\"E08000017\",\"Doncaster\",\"RK9\",2\r\n\"E08000017\",\"Doncaster\",\"RWE\",2\r\n\"E08000017\",\"Doncaster\",\"RXH\",2\r\n\"E08000017\",\"Doncaster\",\"RBD\",2\r\n\"E08000017\",\"Doncaster\",\"RC9\",2\r\n\"E08000017\",\"Doncaster\",\"RLQ\",2\r\n\"E08000017\",\"Doncaster\",\"RR7\",2\r\n\"E08000017\",\"Doncaster\",\"RWP\",2\r\n\"E08000017\",\"Doncaster\",\"RXC\",2\r\n\"E08000017\",\"Doncaster\",\"RBN\",2\r\n\"E08000017\",\"Doncaster\",\"RBZ\",2\r\n\"E08000017\",\"Doncaster\",\"RLT\",2\r\n\"E08000017\",\"Doncaster\",\"RN5\",2\r\n\"E08000017\",\"Doncaster\",\"RMC\",2\r\n\"E08000017\",\"Doncaster\",\"RN7\",2\r\n\"E08000017\",\"Doncaster\",\"RTK\",2\r\n\"E08000017\",\"Doncaster\",\"RTX\",2\r\n\"E08000017\",\"Doncaster\",\"RV9\",2\r\n\"E08000017\",\"Doncaster\",\"RAS\",1\r\n\"E08000017\",\"Doncaster\",\"RAX\",1\r\n\"E08000017\",\"Doncaster\",\"RBL\",1\r\n\"E08000017\",\"Doncaster\",\"RQ8\",1\r\n\"E08000017\",\"Doncaster\",\"RBQ\",1\r\n\"E08000017\",\"Doncaster\",\"RDD\",1\r\n\"E08000017\",\"Doncaster\",\"R0B\",1\r\n\"E08000017\",\"Doncaster\",\"RRJ\",1\r\n\"E08000017\",\"Doncaster\",\"R1K\",1\r\n\"E08000017\",\"Doncaster\",\"RAJ\",1\r\n\"E08000017\",\"Doncaster\",\"RDE\",1\r\n\"E08000017\",\"Doncaster\",\"RH8\",1\r\n\"E08000017\",\"Doncaster\",\"RNA\",1\r\n\"E08000017\",\"Doncaster\",\"RQX\",1\r\n\"E08000017\",\"Doncaster\",\"RT3\",1\r\n\"E08000017\",\"Doncaster\",\"RVR\",1\r\n\"E08000017\",\"Doncaster\",\"RBV\",1\r\n\"E08000017\",\"Doncaster\",\"RGP\",1\r\n\"E08000017\",\"Doncaster\",\"RQ3\",1\r\n\"E08000017\",\"Doncaster\",\"RL4\",1\r\n\"E08000017\",\"Doncaster\",\"RA4\",1\r\n\"E08000017\",\"Doncaster\",\"RBA\",1\r\n\"E08000017\",\"Doncaster\",\"RD1\",1\r\n\"E08000017\",\"Doncaster\",\"RGR\",1\r\n\"E08000017\",\"Doncaster\",\"RJC\",1\r\n\"E08000017\",\"Doncaster\",\"RWG\",1\r\n\"E08000017\",\"Doncaster\",\"R1F\",1\r\n\"E08000017\",\"Doncaster\",\"RA2\",1\r\n\"E08000017\",\"Doncaster\",\"RBK\",1\r\n\"E08000017\",\"Doncaster\",\"RHA\",1\r\n\"E08000017\",\"Doncaster\",\"RJ2\",1\r\n\"E08000017\",\"Doncaster\",\"RNQ\",1\r\n\"E08000017\",\"Doncaster\",\"RNZ\",1\r\n\"E08000017\",\"Doncaster\",\"RXG\",1\r\n\"E08000017\",\"Doncaster\",\"RXN\",1\r\n\"E08000017\",\"Doncaster\",\"RYJ\",1\r\n\"E08000018\",\"Rotherham\",\"RFR\",22612\r\n\"E08000018\",\"Rotherham\",\"RHQ\",3197\r\n\"E08000018\",\"Rotherham\",\"RP5\",1741\r\n\"E08000018\",\"Rotherham\",\"RFF\",703\r\n\"E08000018\",\"Rotherham\",\"RXE\",474\r\n\"E08000018\",\"Rotherham\",\"RCU\",408\r\n\"E08000018\",\"Rotherham\",\"RWD\",56\r\n\"E08000018\",\"Rotherham\",\"RCB\",45\r\n\"E08000018\",\"Rotherham\",\"RFS\",41\r\n\"E08000018\",\"Rotherham\",\"RR8\",40\r\n\"E08000018\",\"Rotherham\",\"RX1\",23\r\n\"E08000018\",\"Rotherham\",\"RXF\",23\r\n\"E08000018\",\"Rotherham\",\"RJL\",23\r\n\"E08000018\",\"Rotherham\",\"R0A\",18\r\n\"E08000018\",\"Rotherham\",\"RK5\",15\r\n\"E08000018\",\"Rotherham\",\"RWA\",13\r\n\"E08000018\",\"Rotherham\",\"RTG\",14\r\n\"E08000018\",\"Rotherham\",\"RBV\",10\r\n\"E08000018\",\"Rotherham\",\"RAE\",10\r\n\"E08000018\",\"Rotherham\",\"RA9\",8\r\n\"E08000018\",\"Rotherham\",\"RM1\",7\r\n\"E08000018\",\"Rotherham\",\"RK9\",7\r\n\"E08000018\",\"Rotherham\",\"RM3\",6\r\n\"E08000018\",\"Rotherham\",\"REF\",6\r\n\"E08000018\",\"Rotherham\",\"RRK\",11\r\n\"E08000018\",\"Rotherham\",\"RTD\",6\r\n\"E08000018\",\"Rotherham\",\"R1H\",5\r\n\"E08000018\",\"Rotherham\",\"RMC\",5\r\n\"E08000018\",\"Rotherham\",\"RWE\",4\r\n\"E08000018\",\"Rotherham\",\"RNQ\",4\r\n\"E08000018\",\"Rotherham\",\"RTH\",4\r\n\"E08000018\",\"Rotherham\",\"RXW\",6\r\n\"E08000018\",\"Rotherham\",\"RGP\",4\r\n\"E08000018\",\"Rotherham\",\"RTX\",4\r\n\"E08000018\",\"Rotherham\",\"RTF\",4\r\n\"E08000018\",\"Rotherham\",\"RXL\",4\r\n\"E08000018\",\"Rotherham\",\"RHM\",3\r\n\"E08000018\",\"Rotherham\",\"RCX\",3\r\n\"E08000018\",\"Rotherham\",\"RDE\",3\r\n\"E08000018\",\"Rotherham\",\"RJ2\",3\r\n\"E08000018\",\"Rotherham\",\"RX3\",3\r\n\"E08000018\",\"Rotherham\",\"RTR\",3\r\n\"E08000018\",\"Rotherham\",\"RXG\",3\r\n\"E08000018\",\"Rotherham\",\"RJE\",3\r\n\"E08000018\",\"Rotherham\",\"RNL\",3\r\n\"E08000018\",\"Rotherham\",\"RRV\",3\r\n\"E08000018\",\"Rotherham\",\"RWY\",3\r\n\"E08000018\",\"Rotherham\",\"RD3\",3\r\n\"E08000018\",\"Rotherham\",\"RGN\",3\r\n\"E08000018\",\"Rotherham\",\"RH8\",3\r\n\"E08000018\",\"Rotherham\",\"RRF\",3\r\n\"E08000018\",\"Rotherham\",\"RVJ\",3\r\n\"E08000018\",\"Rotherham\",\"RW6\",3\r\n\"E08000018\",\"Rotherham\",\"RXN\",3\r\n\"E08000018\",\"Rotherham\",\"RGT\",3\r\n\"E08000018\",\"Rotherham\",\"RMP\",3\r\n\"E08000018\",\"Rotherham\",\"RWF\",3\r\n\"E08000018\",\"Rotherham\",\"RNA\",2\r\n\"E08000018\",\"Rotherham\",\"RWW\",2\r\n\"E08000018\",\"Rotherham\",\"RYJ\",2\r\n\"E08000018\",\"Rotherham\",\"RYR\",2\r\n\"E08000018\",\"Rotherham\",\"R1K\",2\r\n\"E08000018\",\"Rotherham\",\"RXP\",2\r\n\"E08000018\",\"Rotherham\",\"R1F\",2\r\n\"E08000018\",\"Rotherham\",\"RAX\",2\r\n\"E08000018\",\"Rotherham\",\"RBD\",2\r\n\"E08000018\",\"Rotherham\",\"RHU\",2\r\n\"E08000018\",\"Rotherham\",\"RN5\",2\r\n\"E08000018\",\"Rotherham\",\"RXR\",3\r\n\"E08000018\",\"Rotherham\",\"RA2\",2\r\n\"E08000018\",\"Rotherham\",\"RAS\",2\r\n\"E08000018\",\"Rotherham\",\"RDD\",2\r\n\"E08000018\",\"Rotherham\",\"RJ1\",2\r\n\"E08000018\",\"Rotherham\",\"RVV\",2\r\n\"E08000018\",\"Rotherham\",\"RHA\",2\r\n\"E08000018\",\"Rotherham\",\"NTX\",2\r\n\"E08000018\",\"Rotherham\",\"RBT\",2\r\n\"E08000018\",\"Rotherham\",\"RJR\",2\r\n\"E08000018\",\"Rotherham\",\"RXK\",3\r\n\"E08000018\",\"Rotherham\",\"RXQ\",2\r\n\"E08000018\",\"Rotherham\",\"RA7\",2\r\n\"E08000018\",\"Rotherham\",\"RC9\",2\r\n\"E08000018\",\"Rotherham\",\"RCD\",2\r\n\"E08000018\",\"Rotherham\",\"RVY\",2\r\n\"E08000018\",\"Rotherham\",\"RBL\",1\r\n\"E08000018\",\"Rotherham\",\"RD1\",1\r\n\"E08000018\",\"Rotherham\",\"RHW\",1\r\n\"E08000018\",\"Rotherham\",\"RQM\",1\r\n\"E08000018\",\"Rotherham\",\"RVR\",1\r\n\"E08000018\",\"Rotherham\",\"RWG\",1\r\n\"E08000018\",\"Rotherham\",\"RH5\",1\r\n\"E08000018\",\"Rotherham\",\"RL1\",1\r\n\"E08000018\",\"Rotherham\",\"RYG\",1\r\n\"E08000018\",\"Rotherham\",\"RDU\",1\r\n\"E08000018\",\"Rotherham\",\"R0B\",1\r\n\"E08000018\",\"Rotherham\",\"RJZ\",1\r\n\"E08000018\",\"Rotherham\",\"RKB\",1\r\n\"E08000018\",\"Rotherham\",\"RNS\",1\r\n\"E08000018\",\"Rotherham\",\"REM\",1\r\n\"E08000018\",\"Rotherham\",\"RXH\",1\r\n\"E08000018\",\"Rotherham\",\"R1D\",1\r\n\"E08000018\",\"Rotherham\",\"RBK\",1\r\n\"E08000018\",\"Rotherham\",\"RC1\",1\r\n\"E08000018\",\"Rotherham\",\"RCF\",1\r\n\"E08000018\",\"Rotherham\",\"RL4\",1\r\n\"E08000018\",\"Rotherham\",\"RBN\",1\r\n\"E08000018\",\"Rotherham\",\"RBQ\",1\r\n\"E08000018\",\"Rotherham\",\"RJ7\",1\r\n\"E08000018\",\"Rotherham\",\"RN3\",1\r\n\"E08000018\",\"Rotherham\",\"RNZ\",1\r\n\"E08000018\",\"Rotherham\",\"RGD\",1\r\n\"E08000018\",\"Rotherham\",\"RVW\",1\r\n\"E08000018\",\"Rotherham\",\"RDZ\",1\r\n\"E08000018\",\"Rotherham\",\"RJ6\",1\r\n\"E08000018\",\"Rotherham\",\"RJC\",1\r\n\"E08000018\",\"Rotherham\",\"RTE\",1\r\n\"E08000018\",\"Rotherham\",\"RTP\",1\r\n\"E08000018\",\"Rotherham\",\"RWJ\",1\r\n\"E08000018\",\"Rotherham\",\"TAD\",1\r\n\"E08000019\",\"Sheffield\",\"RHQ\",54384\r\n\"E08000019\",\"Sheffield\",\"RCU\",3523\r\n\"E08000019\",\"Sheffield\",\"RFR\",868\r\n\"E08000019\",\"Sheffield\",\"RFS\",697\r\n\"E08000019\",\"Sheffield\",\"RFF\",239\r\n\"E08000019\",\"Sheffield\",\"RR8\",87\r\n\"E08000019\",\"Sheffield\",\"RWD\",86\r\n\"E08000019\",\"Sheffield\",\"RCB\",70\r\n\"E08000019\",\"Sheffield\",\"R0A\",53\r\n\"E08000019\",\"Sheffield\",\"RP5\",83\r\n\"E08000019\",\"Sheffield\",\"RXE\",41\r\n\"E08000019\",\"Sheffield\",\"RX1\",37\r\n\"E08000019\",\"Sheffield\",\"RJL\",34\r\n\"E08000019\",\"Sheffield\",\"RXF\",29\r\n\"E08000019\",\"Sheffield\",\"RTG\",32\r\n\"E08000019\",\"Sheffield\",\"RJE\",24\r\n\"E08000019\",\"Sheffield\",\"REF\",22\r\n\"E08000019\",\"Sheffield\",\"RK5\",21\r\n\"E08000019\",\"Sheffield\",\"RTH\",20\r\n\"E08000019\",\"Sheffield\",\"R1H\",18\r\n\"E08000019\",\"Sheffield\",\"RRK\",25\r\n\"E08000019\",\"Sheffield\",\"REM\",22\r\n\"E08000019\",\"Sheffield\",\"RWE\",17\r\n\"E08000019\",\"Sheffield\",\"RAE\",16\r\n\"E08000019\",\"Sheffield\",\"RWA\",15\r\n\"E08000019\",\"Sheffield\",\"RWY\",14\r\n\"E08000019\",\"Sheffield\",\"RKB\",13\r\n\"E08000019\",\"Sheffield\",\"RWJ\",12\r\n\"E08000019\",\"Sheffield\",\"RGT\",12\r\n\"E08000019\",\"Sheffield\",\"RJ1\",11\r\n\"E08000019\",\"Sheffield\",\"RA9\",11\r\n\"E08000019\",\"Sheffield\",\"RBT\",11\r\n\"E08000019\",\"Sheffield\",\"RRV\",13\r\n\"E08000019\",\"Sheffield\",\"RBV\",10\r\n\"E08000019\",\"Sheffield\",\"RM3\",10\r\n\"E08000019\",\"Sheffield\",\"RQM\",10\r\n\"E08000019\",\"Sheffield\",\"RTX\",9\r\n\"E08000019\",\"Sheffield\",\"RJZ\",9\r\n\"E08000019\",\"Sheffield\",\"RXH\",8\r\n\"E08000019\",\"Sheffield\",\"RCF\",8\r\n\"E08000019\",\"Sheffield\",\"RAL\",8\r\n\"E08000019\",\"Sheffield\",\"RDU\",8\r\n\"E08000019\",\"Sheffield\",\"RM1\",8\r\n\"E08000019\",\"Sheffield\",\"RW6\",8\r\n\"E08000019\",\"Sheffield\",\"RJC\",8\r\n\"E08000019\",\"Sheffield\",\"RXL\",8\r\n\"E08000019\",\"Sheffield\",\"R1K\",7\r\n\"E08000019\",\"Sheffield\",\"RTR\",8\r\n\"E08000019\",\"Sheffield\",\"RYJ\",7\r\n\"E08000019\",\"Sheffield\",\"RBA\",7\r\n\"E08000019\",\"Sheffield\",\"RCX\",7\r\n\"E08000019\",\"Sheffield\",\"RNL\",6\r\n\"E08000019\",\"Sheffield\",\"RNS\",6\r\n\"E08000019\",\"Sheffield\",\"RTD\",6\r\n\"E08000019\",\"Sheffield\",\"RXP\",6\r\n\"E08000019\",\"Sheffield\",\"RK9\",6\r\n\"E08000019\",\"Sheffield\",\"RD8\",6\r\n\"E08000019\",\"Sheffield\",\"RH8\",6\r\n\"E08000019\",\"Sheffield\",\"RC1\",5\r\n\"E08000019\",\"Sheffield\",\"RJ7\",5\r\n\"E08000019\",\"Sheffield\",\"RA7\",5\r\n\"E08000019\",\"Sheffield\",\"RAX\",5\r\n\"E08000019\",\"Sheffield\",\"RDZ\",5\r\n\"E08000019\",\"Sheffield\",\"RXG\",5\r\n\"E08000019\",\"Sheffield\",\"RPA\",5\r\n\"E08000019\",\"Sheffield\",\"RD3\",4\r\n\"E08000019\",\"Sheffield\",\"RJ2\",5\r\n\"E08000019\",\"Sheffield\",\"RXK\",8\r\n\"E08000019\",\"Sheffield\",\"RBN\",4\r\n\"E08000019\",\"Sheffield\",\"RTF\",4\r\n\"E08000019\",\"Sheffield\",\"RXM\",4\r\n\"E08000019\",\"Sheffield\",\"RVW\",4\r\n\"E08000019\",\"Sheffield\",\"RWW\",4\r\n\"E08000019\",\"Sheffield\",\"RDE\",4\r\n\"E08000019\",\"Sheffield\",\"RGN\",4\r\n\"E08000019\",\"Sheffield\",\"RJN\",4\r\n\"E08000019\",\"Sheffield\",\"RWF\",4\r\n\"E08000019\",\"Sheffield\",\"RNQ\",4\r\n\"E08000019\",\"Sheffield\",\"RQ3\",4\r\n\"E08000019\",\"Sheffield\",\"RBD\",4\r\n\"E08000019\",\"Sheffield\",\"RBZ\",4\r\n\"E08000019\",\"Sheffield\",\"RHM\",4\r\n\"E08000019\",\"Sheffield\",\"RMP\",4\r\n\"E08000019\",\"Sheffield\",\"RGP\",3\r\n\"E08000019\",\"Sheffield\",\"RVV\",3\r\n\"E08000019\",\"Sheffield\",\"RAS\",3\r\n\"E08000019\",\"Sheffield\",\"RHW\",3\r\n\"E08000019\",\"Sheffield\",\"RTE\",3\r\n\"E08000019\",\"Sheffield\",\"RVJ\",3\r\n\"E08000019\",\"Sheffield\",\"RXQ\",3\r\n\"E08000019\",\"Sheffield\",\"RBS\",3\r\n\"E08000019\",\"Sheffield\",\"RBL\",3\r\n\"E08000019\",\"Sheffield\",\"RNZ\",3\r\n\"E08000019\",\"Sheffield\",\"RWG\",3\r\n\"E08000019\",\"Sheffield\",\"RWP\",3\r\n\"E08000019\",\"Sheffield\",\"RCD\",2\r\n\"E08000019\",\"Sheffield\",\"RWH\",2\r\n\"E08000019\",\"Sheffield\",\"RYV\",2\r\n\"E08000019\",\"Sheffield\",\"RD1\",2\r\n\"E08000019\",\"Sheffield\",\"RHA\",2\r\n\"E08000019\",\"Sheffield\",\"RWK\",2\r\n\"E08000019\",\"Sheffield\",\"RAJ\",2\r\n\"E08000019\",\"Sheffield\",\"RAP\",2\r\n\"E08000019\",\"Sheffield\",\"RBK\",2\r\n\"E08000019\",\"Sheffield\",\"RJ6\",2\r\n\"E08000019\",\"Sheffield\",\"RRF\",2\r\n\"E08000019\",\"Sheffield\",\"RVY\",3\r\n\"E08000019\",\"Sheffield\",\"RXW\",2\r\n\"E08000019\",\"Sheffield\",\"RQX\",2\r\n\"E08000019\",\"Sheffield\",\"RXC\",2\r\n\"E08000019\",\"Sheffield\",\"RRJ\",2\r\n\"E08000019\",\"Sheffield\",\"RA3\",2\r\n\"E08000019\",\"Sheffield\",\"RL4\",2\r\n\"E08000019\",\"Sheffield\",\"RMC\",2\r\n\"E08000019\",\"Sheffield\",\"RPC\",2\r\n\"E08000019\",\"Sheffield\",\"RQ8\",2\r\n\"E08000019\",\"Sheffield\",\"RTP\",2\r\n\"E08000019\",\"Sheffield\",\"RJR\",2\r\n\"E08000019\",\"Sheffield\",\"RT5\",2\r\n\"E08000019\",\"Sheffield\",\"RA4\",1\r\n\"E08000019\",\"Sheffield\",\"RBQ\",1\r\n\"E08000019\",\"Sheffield\",\"R0B\",2\r\n\"E08000019\",\"Sheffield\",\"RN7\",1\r\n\"E08000019\",\"Sheffield\",\"RNA\",1\r\n\"E08000019\",\"Sheffield\",\"RV9\",1\r\n\"E08000019\",\"Sheffield\",\"RY8\",1\r\n\"E08000019\",\"Sheffield\",\"R1A\",1\r\n\"E08000019\",\"Sheffield\",\"RN3\",1\r\n\"E08000019\",\"Sheffield\",\"RP7\",1\r\n\"E08000019\",\"Sheffield\",\"RXT\",1\r\n\"E08000019\",\"Sheffield\",\"RVR\",1\r\n\"E08000019\",\"Sheffield\",\"RTV\",1\r\n\"E08000019\",\"Sheffield\",\"RYR\",1\r\n\"E08000019\",\"Sheffield\",\"RC9\",1\r\n\"E08000019\",\"Sheffield\",\"RHU\",1\r\n\"E08000019\",\"Sheffield\",\"RLT\",1\r\n\"E08000019\",\"Sheffield\",\"RP4\",1\r\n\"E08000019\",\"Sheffield\",\"RRE\",1\r\n\"E08000019\",\"Sheffield\",\"RTK\",1\r\n\"E08000019\",\"Sheffield\",\"RX3\",1\r\n\"E08000019\",\"Sheffield\",\"RXR\",1\r\n\"E08000019\",\"Sheffield\",\"RKE\",1\r\n\"E08000019\",\"Sheffield\",\"RV5\",1\r\n\"E08000019\",\"Sheffield\",\"TAD\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTD\",31266\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTF\",736\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RX4\",389\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RR7\",186\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXP\",63\r\n\"E08000021\",\"Newcastle upon Tyne\",\"R0B\",106\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTR\",31\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RNL\",22\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RVW\",22\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RCB\",19\r\n\"E08000021\",\"Newcastle upon Tyne\",\"R0A\",19\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RR8\",18\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTX\",12\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTH\",10\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RHQ\",9\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RQM\",8\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJZ\",8\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWD\",8\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RGN\",7\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWY\",7\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RKB\",6\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXF\",6\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWA\",6\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXL\",6\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RAE\",6\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RRV\",5\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RA2\",5\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJL\",5\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RF4\",5\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RRK\",6\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RK5\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RVY\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RCD\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RHU\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTG\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RN5\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RAX\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"R1K\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBL\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RHW\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTP\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RX3\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXH\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBT\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"REF\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJ2\",5\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RW6\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWG\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXN\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXQ\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RFF\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RP5\",6\r\n\"E08000021\",\"Newcastle upon Tyne\",\"REM\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RAL\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RHM\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWE\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBN\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RQ3\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RVR\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJE\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RMP\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RC9\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RM1\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RNZ\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RQ8\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RTE\",3\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RA4\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RDE\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RFR\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXK\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBA\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RH8\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJ7\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RQW\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RVV\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RYJ\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RGT\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RA9\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RN7\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RA7\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RK9\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWJ\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RDU\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RL4\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RNS\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"R1H\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RD8\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJC\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWW\",2\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXW\",4\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBK\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBQ\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RLT\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RMC\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBZ\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RD3\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RGR\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RYR\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RD1\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RDD\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RM3\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBD\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RBS\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RLQ\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RP4\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWK\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RC1\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RCX\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RPA\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RRF\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWH\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWP\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RFS\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RGP\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJ6\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJR\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RQX\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RW5\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RCF\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJ1\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RAP\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RJN\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RKE\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RT3\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RWF\",1\r\n\"E08000021\",\"Newcastle upon Tyne\",\"RXC\",1\r\n\"E08000022\",\"North Tyneside\",\"RTF\",22230\r\n\"E08000022\",\"North Tyneside\",\"RTD\",6229\r\n\"E08000022\",\"North Tyneside\",\"RX4\",208\r\n\"E08000022\",\"North Tyneside\",\"RR7\",57\r\n\"E08000022\",\"North Tyneside\",\"R0B\",83\r\n\"E08000022\",\"North Tyneside\",\"RXP\",29\r\n\"E08000022\",\"North Tyneside\",\"RTR\",29\r\n\"E08000022\",\"North Tyneside\",\"RNL\",19\r\n\"E08000022\",\"North Tyneside\",\"RCB\",18\r\n\"E08000022\",\"North Tyneside\",\"RR8\",10\r\n\"E08000022\",\"North Tyneside\",\"R0A\",8\r\n\"E08000022\",\"North Tyneside\",\"RTX\",8\r\n\"E08000022\",\"North Tyneside\",\"RXL\",6\r\n\"E08000022\",\"North Tyneside\",\"RJ1\",5\r\n\"E08000022\",\"North Tyneside\",\"RDU\",5\r\n\"E08000022\",\"North Tyneside\",\"RVW\",5\r\n\"E08000022\",\"North Tyneside\",\"RQM\",5\r\n\"E08000022\",\"North Tyneside\",\"RRV\",5\r\n\"E08000022\",\"North Tyneside\",\"RK5\",3\r\n\"E08000022\",\"North Tyneside\",\"REM\",3\r\n\"E08000022\",\"North Tyneside\",\"RXF\",3\r\n\"E08000022\",\"North Tyneside\",\"RWA\",3\r\n\"E08000022\",\"North Tyneside\",\"RJE\",3\r\n\"E08000022\",\"North Tyneside\",\"RWG\",3\r\n\"E08000022\",\"North Tyneside\",\"R1H\",3\r\n\"E08000022\",\"North Tyneside\",\"RCD\",3\r\n\"E08000022\",\"North Tyneside\",\"RWY\",3\r\n\"E08000022\",\"North Tyneside\",\"RH8\",3\r\n\"E08000022\",\"North Tyneside\",\"RJ7\",3\r\n\"E08000022\",\"North Tyneside\",\"RYR\",3\r\n\"E08000022\",\"North Tyneside\",\"RFF\",2\r\n\"E08000022\",\"North Tyneside\",\"RK9\",2\r\n\"E08000022\",\"North Tyneside\",\"RN3\",2\r\n\"E08000022\",\"North Tyneside\",\"RAE\",2\r\n\"E08000022\",\"North Tyneside\",\"RCF\",2\r\n\"E08000022\",\"North Tyneside\",\"RFS\",2\r\n\"E08000022\",\"North Tyneside\",\"RHM\",2\r\n\"E08000022\",\"North Tyneside\",\"RTG\",2\r\n\"E08000022\",\"North Tyneside\",\"RHQ\",2\r\n\"E08000022\",\"North Tyneside\",\"RX1\",2\r\n\"E08000022\",\"North Tyneside\",\"RGR\",2\r\n\"E08000022\",\"North Tyneside\",\"RNZ\",2\r\n\"E08000022\",\"North Tyneside\",\"RW6\",2\r\n\"E08000022\",\"North Tyneside\",\"RWF\",2\r\n\"E08000022\",\"North Tyneside\",\"RAS\",2\r\n\"E08000022\",\"North Tyneside\",\"RWE\",2\r\n\"E08000022\",\"North Tyneside\",\"R1K\",2\r\n\"E08000022\",\"North Tyneside\",\"REF\",2\r\n\"E08000022\",\"North Tyneside\",\"RTE\",2\r\n\"E08000022\",\"North Tyneside\",\"RDE\",1\r\n\"E08000022\",\"North Tyneside\",\"RHW\",1\r\n\"E08000022\",\"North Tyneside\",\"RJL\",1\r\n\"E08000022\",\"North Tyneside\",\"RM3\",1\r\n\"E08000022\",\"North Tyneside\",\"RQW\",1\r\n\"E08000022\",\"North Tyneside\",\"RVV\",1\r\n\"E08000022\",\"North Tyneside\",\"RVY\",1\r\n\"E08000022\",\"North Tyneside\",\"RA9\",1\r\n\"E08000022\",\"North Tyneside\",\"RJN\",1\r\n\"E08000022\",\"North Tyneside\",\"RP6\",1\r\n\"E08000022\",\"North Tyneside\",\"RVR\",1\r\n\"E08000022\",\"North Tyneside\",\"RXK\",2\r\n\"E08000022\",\"North Tyneside\",\"RGP\",1\r\n\"E08000022\",\"North Tyneside\",\"RGT\",1\r\n\"E08000022\",\"North Tyneside\",\"RKB\",1\r\n\"E08000022\",\"North Tyneside\",\"RP5\",1\r\n\"E08000022\",\"North Tyneside\",\"RA7\",1\r\n\"E08000022\",\"North Tyneside\",\"RJ2\",1\r\n\"E08000022\",\"North Tyneside\",\"RJR\",1\r\n\"E08000022\",\"North Tyneside\",\"RA2\",1\r\n\"E08000022\",\"North Tyneside\",\"RA4\",1\r\n\"E08000022\",\"North Tyneside\",\"RAJ\",1\r\n\"E08000022\",\"North Tyneside\",\"RJC\",1\r\n\"E08000022\",\"North Tyneside\",\"RMC\",1\r\n\"E08000022\",\"North Tyneside\",\"RQ3\",1\r\n\"E08000022\",\"North Tyneside\",\"RRK\",1\r\n\"E08000022\",\"North Tyneside\",\"RD8\",1\r\n\"E08000022\",\"North Tyneside\",\"RTH\",1\r\n\"E08000022\",\"North Tyneside\",\"RVJ\",1\r\n\"E08000022\",\"North Tyneside\",\"RX3\",1\r\n\"E08000022\",\"North Tyneside\",\"RXE\",1\r\n\"E08000022\",\"North Tyneside\",\"RYJ\",1\r\n\"E08000022\",\"North Tyneside\",\"RAX\",1\r\n\"E08000022\",\"North Tyneside\",\"RJZ\",1\r\n\"E08000022\",\"North Tyneside\",\"RL4\",1\r\n\"E08000022\",\"North Tyneside\",\"RN7\",1\r\n\"E08000022\",\"North Tyneside\",\"RNQ\",1\r\n\"E08000022\",\"North Tyneside\",\"RWJ\",1\r\n\"E08000022\",\"North Tyneside\",\"RXH\",1\r\n\"E08000022\",\"North Tyneside\",\"RA3\",1\r\n\"E08000022\",\"North Tyneside\",\"RBL\",1\r\n\"E08000022\",\"North Tyneside\",\"RLQ\",1\r\n\"E08000022\",\"North Tyneside\",\"RWD\",1\r\n\"E08000022\",\"North Tyneside\",\"RXR\",1\r\n\"E08000023\",\"South Tyneside\",\"R0B\",20392\r\n\"E08000023\",\"South Tyneside\",\"RTD\",1189\r\n\"E08000023\",\"South Tyneside\",\"RR7\",400\r\n\"E08000023\",\"South Tyneside\",\"RX4\",225\r\n\"E08000023\",\"South Tyneside\",\"RXP\",102\r\n\"E08000023\",\"South Tyneside\",\"RTF\",90\r\n\"E08000023\",\"South Tyneside\",\"RTR\",13\r\n\"E08000023\",\"South Tyneside\",\"RVW\",10\r\n\"E08000023\",\"South Tyneside\",\"RNL\",7\r\n\"E08000023\",\"South Tyneside\",\"RTX\",6\r\n\"E08000023\",\"South Tyneside\",\"RM3\",5\r\n\"E08000023\",\"South Tyneside\",\"RCB\",5\r\n\"E08000023\",\"South Tyneside\",\"RRV\",5\r\n\"E08000023\",\"South Tyneside\",\"R0A\",5\r\n\"E08000023\",\"South Tyneside\",\"RWF\",4\r\n\"E08000023\",\"South Tyneside\",\"RR8\",4\r\n\"E08000023\",\"South Tyneside\",\"RDE\",4\r\n\"E08000023\",\"South Tyneside\",\"RDU\",3\r\n\"E08000023\",\"South Tyneside\",\"RRK\",4\r\n\"E08000023\",\"South Tyneside\",\"RWA\",3\r\n\"E08000023\",\"South Tyneside\",\"RVJ\",3\r\n\"E08000023\",\"South Tyneside\",\"RHM\",3\r\n\"E08000023\",\"South Tyneside\",\"RQM\",3\r\n\"E08000023\",\"South Tyneside\",\"R1H\",3\r\n\"E08000023\",\"South Tyneside\",\"RWD\",3\r\n\"E08000023\",\"South Tyneside\",\"RVV\",3\r\n\"E08000023\",\"South Tyneside\",\"RX3\",2\r\n\"E08000023\",\"South Tyneside\",\"RXF\",2\r\n\"E08000023\",\"South Tyneside\",\"REF\",2\r\n\"E08000023\",\"South Tyneside\",\"RXN\",2\r\n\"E08000023\",\"South Tyneside\",\"RJL\",2\r\n\"E08000023\",\"South Tyneside\",\"RWE\",2\r\n\"E08000023\",\"South Tyneside\",\"RM1\",2\r\n\"E08000023\",\"South Tyneside\",\"RFS\",2\r\n\"E08000023\",\"South Tyneside\",\"RNS\",2\r\n\"E08000023\",\"South Tyneside\",\"REM\",2\r\n\"E08000023\",\"South Tyneside\",\"R1K\",2\r\n\"E08000023\",\"South Tyneside\",\"RTG\",2\r\n\"E08000023\",\"South Tyneside\",\"RAJ\",1\r\n\"E08000023\",\"South Tyneside\",\"RBT\",1\r\n\"E08000023\",\"South Tyneside\",\"RC1\",1\r\n\"E08000023\",\"South Tyneside\",\"RLQ\",1\r\n\"E08000023\",\"South Tyneside\",\"RP5\",1\r\n\"E08000023\",\"South Tyneside\",\"RPA\",1\r\n\"E08000023\",\"South Tyneside\",\"RYR\",1\r\n\"E08000023\",\"South Tyneside\",\"RCX\",1\r\n\"E08000023\",\"South Tyneside\",\"RD1\",1\r\n\"E08000023\",\"South Tyneside\",\"RRF\",1\r\n\"E08000023\",\"South Tyneside\",\"RW5\",1\r\n\"E08000023\",\"South Tyneside\",\"RJC\",1\r\n\"E08000023\",\"South Tyneside\",\"RJN\",1\r\n\"E08000023\",\"South Tyneside\",\"RAP\",1\r\n\"E08000023\",\"South Tyneside\",\"RGP\",1\r\n\"E08000023\",\"South Tyneside\",\"RJ1\",1\r\n\"E08000023\",\"South Tyneside\",\"RN5\",1\r\n\"E08000023\",\"South Tyneside\",\"RTP\",1\r\n\"E08000023\",\"South Tyneside\",\"RXH\",1\r\n\"E08000023\",\"South Tyneside\",\"RYJ\",1\r\n\"E08000023\",\"South Tyneside\",\"RCF\",1\r\n\"E08000023\",\"South Tyneside\",\"RJR\",1\r\n\"E08000023\",\"South Tyneside\",\"RNA\",1\r\n\"E08000023\",\"South Tyneside\",\"RTE\",1\r\n\"E08000023\",\"South Tyneside\",\"RCD\",1\r\n\"E08000023\",\"South Tyneside\",\"RH8\",1\r\n\"E08000023\",\"South Tyneside\",\"RHW\",1\r\n\"E08000023\",\"South Tyneside\",\"RK9\",1\r\n\"E08000023\",\"South Tyneside\",\"RL4\",1\r\n\"E08000023\",\"South Tyneside\",\"RW6\",1\r\n\"E08000023\",\"South Tyneside\",\"RXL\",1\r\n\"E08000023\",\"South Tyneside\",\"RA4\",1\r\n\"E08000023\",\"South Tyneside\",\"RAL\",1\r\n\"E08000023\",\"South Tyneside\",\"RBL\",1\r\n\"E08000023\",\"South Tyneside\",\"RBN\",1\r\n\"E08000023\",\"South Tyneside\",\"RD8\",1\r\n\"E08000023\",\"South Tyneside\",\"RK5\",1\r\n\"E08000023\",\"South Tyneside\",\"RTH\",1\r\n\"E08000023\",\"South Tyneside\",\"RGN\",1\r\n\"E08000023\",\"South Tyneside\",\"RGT\",1\r\n\"E08000023\",\"South Tyneside\",\"RJE\",1\r\n\"E08000023\",\"South Tyneside\",\"RLT\",1\r\n\"E08000023\",\"South Tyneside\",\"RQ3\",1\r\n\"E08000023\",\"South Tyneside\",\"RQX\",1\r\n\"E08000023\",\"South Tyneside\",\"RVY\",1\r\n\"E08000023\",\"South Tyneside\",\"RWG\",1\r\n\"E08000024\",\"Sunderland\",\"R0B\",28918\r\n\"E08000024\",\"Sunderland\",\"RR7\",3021\r\n\"E08000024\",\"Sunderland\",\"RTD\",1207\r\n\"E08000024\",\"Sunderland\",\"RXP\",653\r\n\"E08000024\",\"Sunderland\",\"RX4\",367\r\n\"E08000024\",\"Sunderland\",\"RTR\",90\r\n\"E08000024\",\"Sunderland\",\"RTF\",81\r\n\"E08000024\",\"Sunderland\",\"RVW\",53\r\n\"E08000024\",\"Sunderland\",\"RCB\",26\r\n\"E08000024\",\"Sunderland\",\"RX3\",24\r\n\"E08000024\",\"Sunderland\",\"RNL\",21\r\n\"E08000024\",\"Sunderland\",\"RR8\",12\r\n\"E08000024\",\"Sunderland\",\"RXL\",10\r\n\"E08000024\",\"Sunderland\",\"RCD\",9\r\n\"E08000024\",\"Sunderland\",\"RRV\",8\r\n\"E08000024\",\"Sunderland\",\"RTX\",6\r\n\"E08000024\",\"Sunderland\",\"R0A\",5\r\n\"E08000024\",\"Sunderland\",\"RVJ\",5\r\n\"E08000024\",\"Sunderland\",\"RW6\",5\r\n\"E08000024\",\"Sunderland\",\"RGT\",5\r\n\"E08000024\",\"Sunderland\",\"R1H\",5\r\n\"E08000024\",\"Sunderland\",\"REF\",5\r\n\"E08000024\",\"Sunderland\",\"RJZ\",4\r\n\"E08000024\",\"Sunderland\",\"RN3\",4\r\n\"E08000024\",\"Sunderland\",\"RWD\",4\r\n\"E08000024\",\"Sunderland\",\"RWE\",4\r\n\"E08000024\",\"Sunderland\",\"RM1\",3\r\n\"E08000024\",\"Sunderland\",\"RC1\",3\r\n\"E08000024\",\"Sunderland\",\"RCF\",3\r\n\"E08000024\",\"Sunderland\",\"RAE\",3\r\n\"E08000024\",\"Sunderland\",\"RKB\",3\r\n\"E08000024\",\"Sunderland\",\"REM\",5\r\n\"E08000024\",\"Sunderland\",\"RYR\",3\r\n\"E08000024\",\"Sunderland\",\"RP5\",3\r\n\"E08000024\",\"Sunderland\",\"RQM\",3\r\n\"E08000024\",\"Sunderland\",\"RRF\",3\r\n\"E08000024\",\"Sunderland\",\"RWF\",3\r\n\"E08000024\",\"Sunderland\",\"RCX\",2\r\n\"E08000024\",\"Sunderland\",\"RJ1\",2\r\n\"E08000024\",\"Sunderland\",\"RTE\",2\r\n\"E08000024\",\"Sunderland\",\"RX1\",2\r\n\"E08000024\",\"Sunderland\",\"RXQ\",2\r\n\"E08000024\",\"Sunderland\",\"RBA\",2\r\n\"E08000024\",\"Sunderland\",\"RJE\",2\r\n\"E08000024\",\"Sunderland\",\"RL4\",2\r\n\"E08000024\",\"Sunderland\",\"RMP\",2\r\n\"E08000024\",\"Sunderland\",\"RNQ\",2\r\n\"E08000024\",\"Sunderland\",\"RN5\",2\r\n\"E08000024\",\"Sunderland\",\"R1K\",2\r\n\"E08000024\",\"Sunderland\",\"RC9\",2\r\n\"E08000024\",\"Sunderland\",\"RDU\",2\r\n\"E08000024\",\"Sunderland\",\"RRK\",2\r\n\"E08000024\",\"Sunderland\",\"RXH\",2\r\n\"E08000024\",\"Sunderland\",\"RWJ\",2\r\n\"E08000024\",\"Sunderland\",\"RD8\",2\r\n\"E08000024\",\"Sunderland\",\"RFR\",2\r\n\"E08000024\",\"Sunderland\",\"RHQ\",2\r\n\"E08000024\",\"Sunderland\",\"RVR\",2\r\n\"E08000024\",\"Sunderland\",\"RK9\",2\r\n\"E08000024\",\"Sunderland\",\"RTH\",2\r\n\"E08000024\",\"Sunderland\",\"RYJ\",2\r\n\"E08000024\",\"Sunderland\",\"RH8\",1\r\n\"E08000024\",\"Sunderland\",\"RJ2\",1\r\n\"E08000024\",\"Sunderland\",\"RXW\",2\r\n\"E08000024\",\"Sunderland\",\"RBL\",1\r\n\"E08000024\",\"Sunderland\",\"RGN\",1\r\n\"E08000024\",\"Sunderland\",\"RJ7\",1\r\n\"E08000024\",\"Sunderland\",\"RAX\",1\r\n\"E08000024\",\"Sunderland\",\"RBS\",1\r\n\"E08000024\",\"Sunderland\",\"RKE\",1\r\n\"E08000024\",\"Sunderland\",\"RMC\",1\r\n\"E08000024\",\"Sunderland\",\"RNA\",1\r\n\"E08000024\",\"Sunderland\",\"RXF\",1\r\n\"E08000024\",\"Sunderland\",\"RQ3\",1\r\n\"E08000024\",\"Sunderland\",\"RVY\",1\r\n\"E08000024\",\"Sunderland\",\"RXN\",1\r\n\"E08000024\",\"Sunderland\",\"RDE\",1\r\n\"E08000024\",\"Sunderland\",\"RVV\",1\r\n\"E08000024\",\"Sunderland\",\"RWG\",1\r\n\"E08000024\",\"Sunderland\",\"RA4\",1\r\n\"E08000024\",\"Sunderland\",\"RA9\",1\r\n\"E08000024\",\"Sunderland\",\"RAS\",1\r\n\"E08000024\",\"Sunderland\",\"RWH\",1\r\n\"E08000024\",\"Sunderland\",\"RA2\",1\r\n\"E08000024\",\"Sunderland\",\"RCU\",1\r\n\"E08000024\",\"Sunderland\",\"RHU\",1\r\n\"E08000024\",\"Sunderland\",\"RQX\",1\r\n\"E08000024\",\"Sunderland\",\"RWW\",1\r\n\"E08000024\",\"Sunderland\",\"RAP\",1\r\n\"E08000024\",\"Sunderland\",\"RBN\",1\r\n\"E08000024\",\"Sunderland\",\"RD1\",1\r\n\"E08000024\",\"Sunderland\",\"RTK\",1\r\n\"E08000025\",\"Birmingham\",\"RRK\",124740\r\n\"E08000025\",\"Birmingham\",\"RXK\",18823\r\n\"E08000025\",\"Birmingham\",\"RQ3\",12086\r\n\"E08000025\",\"Birmingham\",\"RXT\",1525\r\n\"E08000025\",\"Birmingham\",\"RYW\",433\r\n\"E08000025\",\"Birmingham\",\"RWP\",321\r\n\"E08000025\",\"Birmingham\",\"RBK\",316\r\n\"E08000025\",\"Birmingham\",\"RNA\",192\r\n\"E08000025\",\"Birmingham\",\"RKB\",186\r\n\"E08000025\",\"Birmingham\",\"RL4\",157\r\n\"E08000025\",\"Birmingham\",\"RRJ\",95\r\n\"E08000025\",\"Birmingham\",\"RWE\",93\r\n\"E08000025\",\"Birmingham\",\"RJE\",84\r\n\"E08000025\",\"Birmingham\",\"RJC\",80\r\n\"E08000025\",\"Birmingham\",\"RYJ\",62\r\n\"E08000025\",\"Birmingham\",\"RTH\",61\r\n\"E08000025\",\"Birmingham\",\"R0A\",59\r\n\"E08000025\",\"Birmingham\",\"TAJ\",53\r\n\"E08000025\",\"Birmingham\",\"R1H\",45\r\n\"E08000025\",\"Birmingham\",\"R1K\",42\r\n\"E08000025\",\"Birmingham\",\"RX1\",42\r\n\"E08000025\",\"Birmingham\",\"RTE\",40\r\n\"E08000025\",\"Birmingham\",\"RA9\",37\r\n\"E08000025\",\"Birmingham\",\"RTG\",69\r\n\"E08000025\",\"Birmingham\",\"RDU\",36\r\n\"E08000025\",\"Birmingham\",\"RJ1\",35\r\n\"E08000025\",\"Birmingham\",\"RQM\",34\r\n\"E08000025\",\"Birmingham\",\"REF\",30\r\n\"E08000025\",\"Birmingham\",\"RA7\",30\r\n\"E08000025\",\"Birmingham\",\"RBA\",29\r\n\"E08000025\",\"Birmingham\",\"RA3\",28\r\n\"E08000025\",\"Birmingham\",\"RRV\",27\r\n\"E08000025\",\"Birmingham\",\"RNS\",26\r\n\"E08000025\",\"Birmingham\",\"RAE\",26\r\n\"E08000025\",\"Birmingham\",\"RVJ\",25\r\n\"E08000025\",\"Birmingham\",\"RLQ\",24\r\n\"E08000025\",\"Birmingham\",\"RHQ\",22\r\n\"E08000025\",\"Birmingham\",\"RLT\",21\r\n\"E08000025\",\"Birmingham\",\"RXW\",43\r\n\"E08000025\",\"Birmingham\",\"RJ7\",19\r\n\"E08000025\",\"Birmingham\",\"RD1\",18\r\n\"E08000025\",\"Birmingham\",\"RW6\",18\r\n\"E08000025\",\"Birmingham\",\"RXL\",18\r\n\"E08000025\",\"Birmingham\",\"RCB\",17\r\n\"E08000025\",\"Birmingham\",\"RHW\",17\r\n\"E08000025\",\"Birmingham\",\"RAL\",17\r\n\"E08000025\",\"Birmingham\",\"RD8\",16\r\n\"E08000025\",\"Birmingham\",\"RH8\",16\r\n\"E08000025\",\"Birmingham\",\"RXR\",20\r\n\"E08000025\",\"Birmingham\",\"REM\",18\r\n\"E08000025\",\"Birmingham\",\"RK9\",15\r\n\"E08000025\",\"Birmingham\",\"RM3\",14\r\n\"E08000025\",\"Birmingham\",\"RN3\",14\r\n\"E08000025\",\"Birmingham\",\"RXQ\",14\r\n\"E08000025\",\"Birmingham\",\"RBT\",13\r\n\"E08000025\",\"Birmingham\",\"RWD\",13\r\n\"E08000025\",\"Birmingham\",\"RJZ\",13\r\n\"E08000025\",\"Birmingham\",\"R1A\",13\r\n\"E08000025\",\"Birmingham\",\"RGT\",13\r\n\"E08000025\",\"Birmingham\",\"RF4\",12\r\n\"E08000025\",\"Birmingham\",\"RC9\",12\r\n\"E08000025\",\"Birmingham\",\"RDZ\",12\r\n\"E08000025\",\"Birmingham\",\"RHU\",12\r\n\"E08000025\",\"Birmingham\",\"RNQ\",12\r\n\"E08000025\",\"Birmingham\",\"RQX\",12\r\n\"E08000025\",\"Birmingham\",\"RTD\",12\r\n\"E08000025\",\"Birmingham\",\"RWG\",12\r\n\"E08000025\",\"Birmingham\",\"RBD\",11\r\n\"E08000025\",\"Birmingham\",\"RR8\",11\r\n\"E08000025\",\"Birmingham\",\"RXH\",11\r\n\"E08000025\",\"Birmingham\",\"RYR\",11\r\n\"E08000025\",\"Birmingham\",\"RBZ\",11\r\n\"E08000025\",\"Birmingham\",\"RJ2\",19\r\n\"E08000025\",\"Birmingham\",\"RK5\",10\r\n\"E08000025\",\"Birmingham\",\"RC1\",10\r\n\"E08000025\",\"Birmingham\",\"RAS\",10\r\n\"E08000025\",\"Birmingham\",\"RGN\",10\r\n\"E08000025\",\"Birmingham\",\"RAX\",10\r\n\"E08000025\",\"Birmingham\",\"RDE\",10\r\n\"E08000025\",\"Birmingham\",\"RYG\",10\r\n\"E08000025\",\"Birmingham\",\"RBN\",10\r\n\"E08000025\",\"Birmingham\",\"RWY\",9\r\n\"E08000025\",\"Birmingham\",\"RWF\",9\r\n\"E08000025\",\"Birmingham\",\"RHM\",9\r\n\"E08000025\",\"Birmingham\",\"RAP\",9\r\n\"E08000025\",\"Birmingham\",\"RTX\",9\r\n\"E08000025\",\"Birmingham\",\"RVR\",9\r\n\"E08000025\",\"Birmingham\",\"RBL\",9\r\n\"E08000025\",\"Birmingham\",\"RWA\",8\r\n\"E08000025\",\"Birmingham\",\"RA2\",8\r\n\"E08000025\",\"Birmingham\",\"RXF\",8\r\n\"E08000025\",\"Birmingham\",\"RTP\",8\r\n\"E08000025\",\"Birmingham\",\"RWH\",8\r\n\"E08000025\",\"Birmingham\",\"RNL\",7\r\n\"E08000025\",\"Birmingham\",\"RD3\",7\r\n\"E08000025\",\"Birmingham\",\"RXC\",7\r\n\"E08000025\",\"Birmingham\",\"RAJ\",7\r\n\"E08000025\",\"Birmingham\",\"RM1\",7\r\n\"E08000025\",\"Birmingham\",\"RNZ\",7\r\n\"E08000025\",\"Birmingham\",\"RWK\",7\r\n\"E08000025\",\"Birmingham\",\"RGP\",7\r\n\"E08000025\",\"Birmingham\",\"RVV\",7\r\n\"E08000025\",\"Birmingham\",\"RFR\",8\r\n\"E08000025\",\"Birmingham\",\"RWW\",7\r\n\"E08000025\",\"Birmingham\",\"R1F\",6\r\n\"E08000025\",\"Birmingham\",\"RFS\",6\r\n\"E08000025\",\"Birmingham\",\"RVY\",8\r\n\"E08000025\",\"Birmingham\",\"RXP\",6\r\n\"E08000025\",\"Birmingham\",\"RJL\",6\r\n\"E08000025\",\"Birmingham\",\"RJ6\",6\r\n\"E08000025\",\"Birmingham\",\"RMC\",5\r\n\"E08000025\",\"Birmingham\",\"RRF\",5\r\n\"E08000025\",\"Birmingham\",\"RCX\",5\r\n\"E08000025\",\"Birmingham\",\"RJR\",5\r\n\"E08000025\",\"Birmingham\",\"RGR\",5\r\n\"E08000025\",\"Birmingham\",\"RPY\",5\r\n\"E08000025\",\"Birmingham\",\"RQ8\",5\r\n\"E08000025\",\"Birmingham\",\"RA4\",5\r\n\"E08000025\",\"Birmingham\",\"RRE\",5\r\n\"E08000025\",\"Birmingham\",\"RTK\",5\r\n\"E08000025\",\"Birmingham\",\"R0B\",5\r\n\"E08000025\",\"Birmingham\",\"RN7\",4\r\n\"E08000025\",\"Birmingham\",\"RWJ\",4\r\n\"E08000025\",\"Birmingham\",\"RCU\",4\r\n\"E08000025\",\"Birmingham\",\"RP4\",3\r\n\"E08000025\",\"Birmingham\",\"RCF\",3\r\n\"E08000025\",\"Birmingham\",\"RPA\",3\r\n\"E08000025\",\"Birmingham\",\"RXN\",3\r\n\"E08000025\",\"Birmingham\",\"RT5\",3\r\n\"E08000025\",\"Birmingham\",\"RBS\",3\r\n\"E08000025\",\"Birmingham\",\"RDD\",3\r\n\"E08000025\",\"Birmingham\",\"RJN\",2\r\n\"E08000025\",\"Birmingham\",\"RMY\",2\r\n\"E08000025\",\"Birmingham\",\"RT3\",2\r\n\"E08000025\",\"Birmingham\",\"RFF\",2\r\n\"E08000025\",\"Birmingham\",\"RQW\",2\r\n\"E08000025\",\"Birmingham\",\"RET\",2\r\n\"E08000025\",\"Birmingham\",\"RLY\",2\r\n\"E08000025\",\"Birmingham\",\"RVW\",2\r\n\"E08000025\",\"Birmingham\",\"RNU\",2\r\n\"E08000025\",\"Birmingham\",\"RN5\",2\r\n\"E08000025\",\"Birmingham\",\"RTR\",3\r\n\"E08000025\",\"Birmingham\",\"RCD\",2\r\n\"E08000025\",\"Birmingham\",\"RP5\",3\r\n\"E08000025\",\"Birmingham\",\"RTQ\",2\r\n\"E08000025\",\"Birmingham\",\"RBQ\",1\r\n\"E08000025\",\"Birmingham\",\"RQY\",1\r\n\"E08000025\",\"Birmingham\",\"RWR\",1\r\n\"E08000025\",\"Birmingham\",\"RGM\",1\r\n\"E08000025\",\"Birmingham\",\"R1L\",1\r\n\"E08000025\",\"Birmingham\",\"RBV\",1\r\n\"E08000025\",\"Birmingham\",\"RL1\",1\r\n\"E08000025\",\"Birmingham\",\"RHA\",1\r\n\"E08000025\",\"Birmingham\",\"RMP\",1\r\n\"E08000025\",\"Birmingham\",\"RPC\",1\r\n\"E08000025\",\"Birmingham\",\"RX4\",1\r\n\"E08000025\",\"Birmingham\",\"RXY\",1\r\n\"E08000025\",\"Birmingham\",\"RP6\",1\r\n\"E08000025\",\"Birmingham\",\"RR7\",1\r\n\"E08000025\",\"Birmingham\",\"RTF\",1\r\n\"E08000025\",\"Birmingham\",\"RV5\",1\r\n\"E08000025\",\"Birmingham\",\"RXM\",1\r\n\"E08000026\",\"Coventry\",\"RKB\",39492\r\n\"E08000026\",\"Coventry\",\"RYG\",581\r\n\"E08000026\",\"Coventry\",\"RJC\",538\r\n\"E08000026\",\"Coventry\",\"RLT\",289\r\n\"E08000026\",\"Coventry\",\"RQ3\",156\r\n\"E08000026\",\"Coventry\",\"RRK\",224\r\n\"E08000026\",\"Coventry\",\"RTH\",47\r\n\"E08000026\",\"Coventry\",\"RWE\",46\r\n\"E08000026\",\"Coventry\",\"RJE\",27\r\n\"E08000026\",\"Coventry\",\"RXK\",57\r\n\"E08000026\",\"Coventry\",\"RWD\",22\r\n\"E08000026\",\"Coventry\",\"RWP\",20\r\n\"E08000026\",\"Coventry\",\"R1H\",19\r\n\"E08000026\",\"Coventry\",\"RYJ\",19\r\n\"E08000026\",\"Coventry\",\"RQM\",18\r\n\"E08000026\",\"Coventry\",\"R1K\",18\r\n\"E08000026\",\"Coventry\",\"RDU\",18\r\n\"E08000026\",\"Coventry\",\"RNS\",17\r\n\"E08000026\",\"Coventry\",\"REF\",16\r\n\"E08000026\",\"Coventry\",\"RBK\",13\r\n\"E08000026\",\"Coventry\",\"RX1\",12\r\n\"E08000026\",\"Coventry\",\"RL4\",11\r\n\"E08000026\",\"Coventry\",\"RHQ\",11\r\n\"E08000026\",\"Coventry\",\"RGP\",11\r\n\"E08000026\",\"Coventry\",\"RTE\",11\r\n\"E08000026\",\"Coventry\",\"R0A\",10\r\n\"E08000026\",\"Coventry\",\"RC9\",10\r\n\"E08000026\",\"Coventry\",\"RXL\",9\r\n\"E08000026\",\"Coventry\",\"RRV\",10\r\n\"E08000026\",\"Coventry\",\"RVR\",9\r\n\"E08000026\",\"Coventry\",\"RD8\",8\r\n\"E08000026\",\"Coventry\",\"RGN\",8\r\n\"E08000026\",\"Coventry\",\"RXT\",8\r\n\"E08000026\",\"Coventry\",\"RCB\",8\r\n\"E08000026\",\"Coventry\",\"RJ1\",7\r\n\"E08000026\",\"Coventry\",\"RBA\",7\r\n\"E08000026\",\"Coventry\",\"RBD\",7\r\n\"E08000026\",\"Coventry\",\"RLQ\",7\r\n\"E08000026\",\"Coventry\",\"RWF\",7\r\n\"E08000026\",\"Coventry\",\"RTG\",14\r\n\"E08000026\",\"Coventry\",\"RTD\",7\r\n\"E08000026\",\"Coventry\",\"RGT\",7\r\n\"E08000026\",\"Coventry\",\"RJ7\",7\r\n\"E08000026\",\"Coventry\",\"RWH\",6\r\n\"E08000026\",\"Coventry\",\"RTP\",6\r\n\"E08000026\",\"Coventry\",\"RTK\",6\r\n\"E08000026\",\"Coventry\",\"RC1\",6\r\n\"E08000026\",\"Coventry\",\"RDZ\",6\r\n\"E08000026\",\"Coventry\",\"RN5\",6\r\n\"E08000026\",\"Coventry\",\"RAS\",5\r\n\"E08000026\",\"Coventry\",\"RNQ\",5\r\n\"E08000026\",\"Coventry\",\"RH8\",5\r\n\"E08000026\",\"Coventry\",\"RK9\",5\r\n\"E08000026\",\"Coventry\",\"RA7\",5\r\n\"E08000026\",\"Coventry\",\"RD3\",5\r\n\"E08000026\",\"Coventry\",\"RF4\",5\r\n\"E08000026\",\"Coventry\",\"RJZ\",5\r\n\"E08000026\",\"Coventry\",\"RQX\",5\r\n\"E08000026\",\"Coventry\",\"RFS\",5\r\n\"E08000026\",\"Coventry\",\"REM\",7\r\n\"E08000026\",\"Coventry\",\"TAJ\",5\r\n\"E08000026\",\"Coventry\",\"RCF\",5\r\n\"E08000026\",\"Coventry\",\"RT3\",5\r\n\"E08000026\",\"Coventry\",\"RWJ\",5\r\n\"E08000026\",\"Coventry\",\"RM1\",4\r\n\"E08000026\",\"Coventry\",\"RNA\",4\r\n\"E08000026\",\"Coventry\",\"RNZ\",4\r\n\"E08000026\",\"Coventry\",\"RDD\",4\r\n\"E08000026\",\"Coventry\",\"RJ2\",6\r\n\"E08000026\",\"Coventry\",\"RWG\",4\r\n\"E08000026\",\"Coventry\",\"RA3\",4\r\n\"E08000026\",\"Coventry\",\"RAJ\",4\r\n\"E08000026\",\"Coventry\",\"RAX\",4\r\n\"E08000026\",\"Coventry\",\"RBZ\",4\r\n\"E08000026\",\"Coventry\",\"RAL\",4\r\n\"E08000026\",\"Coventry\",\"RHU\",4\r\n\"E08000026\",\"Coventry\",\"RXQ\",4\r\n\"E08000026\",\"Coventry\",\"RVV\",3\r\n\"E08000026\",\"Coventry\",\"RA4\",3\r\n\"E08000026\",\"Coventry\",\"RJN\",3\r\n\"E08000026\",\"Coventry\",\"RVJ\",3\r\n\"E08000026\",\"Coventry\",\"RDE\",3\r\n\"E08000026\",\"Coventry\",\"RR8\",3\r\n\"E08000026\",\"Coventry\",\"RK5\",3\r\n\"E08000026\",\"Coventry\",\"RWW\",3\r\n\"E08000026\",\"Coventry\",\"RXH\",3\r\n\"E08000026\",\"Coventry\",\"RXN\",3\r\n\"E08000026\",\"Coventry\",\"RA9\",3\r\n\"E08000026\",\"Coventry\",\"RAP\",3\r\n\"E08000026\",\"Coventry\",\"RJL\",3\r\n\"E08000026\",\"Coventry\",\"RW6\",3\r\n\"E08000026\",\"Coventry\",\"RBT\",3\r\n\"E08000026\",\"Coventry\",\"RWY\",3\r\n\"E08000026\",\"Coventry\",\"RXW\",5\r\n\"E08000026\",\"Coventry\",\"RHM\",2\r\n\"E08000026\",\"Coventry\",\"RNL\",2\r\n\"E08000026\",\"Coventry\",\"RP5\",3\r\n\"E08000026\",\"Coventry\",\"RPY\",2\r\n\"E08000026\",\"Coventry\",\"RCX\",2\r\n\"E08000026\",\"Coventry\",\"RHW\",2\r\n\"E08000026\",\"Coventry\",\"RLY\",2\r\n\"E08000026\",\"Coventry\",\"R1A\",2\r\n\"E08000026\",\"Coventry\",\"RMP\",2\r\n\"E08000026\",\"Coventry\",\"RT5\",2\r\n\"E08000026\",\"Coventry\",\"RAE\",2\r\n\"E08000026\",\"Coventry\",\"RJR\",2\r\n\"E08000026\",\"Coventry\",\"RN3\",2\r\n\"E08000026\",\"Coventry\",\"RN7\",2\r\n\"E08000026\",\"Coventry\",\"RQ8\",2\r\n\"E08000026\",\"Coventry\",\"RTF\",2\r\n\"E08000026\",\"Coventry\",\"RTR\",2\r\n\"E08000026\",\"Coventry\",\"R1F\",2\r\n\"E08000026\",\"Coventry\",\"RXC\",2\r\n\"E08000026\",\"Coventry\",\"RBQ\",1\r\n\"E08000026\",\"Coventry\",\"RM3\",1\r\n\"E08000026\",\"Coventry\",\"RPA\",1\r\n\"E08000026\",\"Coventry\",\"RAT\",1\r\n\"E08000026\",\"Coventry\",\"RFF\",1\r\n\"E08000026\",\"Coventry\",\"RP6\",1\r\n\"E08000026\",\"Coventry\",\"RTX\",1\r\n\"E08000026\",\"Coventry\",\"RWX\",1\r\n\"E08000026\",\"Coventry\",\"RXF\",1\r\n\"E08000026\",\"Coventry\",\"RXP\",1\r\n\"E08000026\",\"Coventry\",\"RA2\",1\r\n\"E08000026\",\"Coventry\",\"RXR\",1\r\n\"E08000026\",\"Coventry\",\"RFR\",1\r\n\"E08000026\",\"Coventry\",\"RBN\",1\r\n\"E08000026\",\"Coventry\",\"R0B\",1\r\n\"E08000026\",\"Coventry\",\"RRJ\",1\r\n\"E08000026\",\"Coventry\",\"RWK\",1\r\n\"E08000026\",\"Coventry\",\"RX3\",1\r\n\"E08000026\",\"Coventry\",\"RKE\",1\r\n\"E08000026\",\"Coventry\",\"RVY\",1\r\n\"E08000026\",\"Coventry\",\"RWA\",1\r\n\"E08000026\",\"Coventry\",\"RD1\",1\r\n\"E08000026\",\"Coventry\",\"RW5\",1\r\n\"E08000027\",\"Dudley\",\"RNA\",26934\r\n\"E08000027\",\"Dudley\",\"RRK\",1771\r\n\"E08000027\",\"Dudley\",\"RL4\",1549\r\n\"E08000027\",\"Dudley\",\"RXK\",650\r\n\"E08000027\",\"Dudley\",\"RQ3\",436\r\n\"E08000027\",\"Dudley\",\"RWP\",103\r\n\"E08000027\",\"Dudley\",\"RBK\",68\r\n\"E08000027\",\"Dudley\",\"TAJ\",26\r\n\"E08000027\",\"Dudley\",\"RKB\",26\r\n\"E08000027\",\"Dudley\",\"RRJ\",24\r\n\"E08000027\",\"Dudley\",\"RXW\",34\r\n\"E08000027\",\"Dudley\",\"RJE\",22\r\n\"E08000027\",\"Dudley\",\"REF\",22\r\n\"E08000027\",\"Dudley\",\"RA9\",16\r\n\"E08000027\",\"Dudley\",\"R0A\",14\r\n\"E08000027\",\"Dudley\",\"RH8\",13\r\n\"E08000027\",\"Dudley\",\"RLQ\",12\r\n\"E08000027\",\"Dudley\",\"RA3\",12\r\n\"E08000027\",\"Dudley\",\"RJC\",12\r\n\"E08000027\",\"Dudley\",\"RBA\",11\r\n\"E08000027\",\"Dudley\",\"RVJ\",11\r\n\"E08000027\",\"Dudley\",\"RK9\",10\r\n\"E08000027\",\"Dudley\",\"RXL\",10\r\n\"E08000027\",\"Dudley\",\"RA7\",10\r\n\"E08000027\",\"Dudley\",\"RTG\",13\r\n\"E08000027\",\"Dudley\",\"RTH\",9\r\n\"E08000027\",\"Dudley\",\"RWE\",8\r\n\"E08000027\",\"Dudley\",\"R1H\",8\r\n\"E08000027\",\"Dudley\",\"RCB\",8\r\n\"E08000027\",\"Dudley\",\"RBZ\",8\r\n\"E08000027\",\"Dudley\",\"RTE\",7\r\n\"E08000027\",\"Dudley\",\"RQM\",7\r\n\"E08000027\",\"Dudley\",\"R1K\",6\r\n\"E08000027\",\"Dudley\",\"RDU\",6\r\n\"E08000027\",\"Dudley\",\"RGP\",6\r\n\"E08000027\",\"Dudley\",\"RWG\",6\r\n\"E08000027\",\"Dudley\",\"RAS\",6\r\n\"E08000027\",\"Dudley\",\"RHM\",5\r\n\"E08000027\",\"Dudley\",\"RBT\",5\r\n\"E08000027\",\"Dudley\",\"R1F\",5\r\n\"E08000027\",\"Dudley\",\"RX1\",5\r\n\"E08000027\",\"Dudley\",\"RXT\",5\r\n\"E08000027\",\"Dudley\",\"RDZ\",4\r\n\"E08000027\",\"Dudley\",\"RNS\",4\r\n\"E08000027\",\"Dudley\",\"RD8\",4\r\n\"E08000027\",\"Dudley\",\"RXF\",4\r\n\"E08000027\",\"Dudley\",\"RBD\",4\r\n\"E08000027\",\"Dudley\",\"RRV\",3\r\n\"E08000027\",\"Dudley\",\"RTX\",3\r\n\"E08000027\",\"Dudley\",\"RWH\",3\r\n\"E08000027\",\"Dudley\",\"RA4\",3\r\n\"E08000027\",\"Dudley\",\"RJ7\",3\r\n\"E08000027\",\"Dudley\",\"RR8\",3\r\n\"E08000027\",\"Dudley\",\"RJ1\",3\r\n\"E08000027\",\"Dudley\",\"REM\",5\r\n\"E08000027\",\"Dudley\",\"RTF\",3\r\n\"E08000027\",\"Dudley\",\"RWF\",3\r\n\"E08000027\",\"Dudley\",\"RD1\",3\r\n\"E08000027\",\"Dudley\",\"RVV\",3\r\n\"E08000027\",\"Dudley\",\"RWD\",3\r\n\"E08000027\",\"Dudley\",\"RAJ\",3\r\n\"E08000027\",\"Dudley\",\"RK5\",3\r\n\"E08000027\",\"Dudley\",\"RN5\",3\r\n\"E08000027\",\"Dudley\",\"RLT\",2\r\n\"E08000027\",\"Dudley\",\"RXQ\",2\r\n\"E08000027\",\"Dudley\",\"RHW\",2\r\n\"E08000027\",\"Dudley\",\"RQ8\",2\r\n\"E08000027\",\"Dudley\",\"RVY\",2\r\n\"E08000027\",\"Dudley\",\"RBL\",2\r\n\"E08000027\",\"Dudley\",\"RHQ\",2\r\n\"E08000027\",\"Dudley\",\"RJ2\",4\r\n\"E08000027\",\"Dudley\",\"RNZ\",2\r\n\"E08000027\",\"Dudley\",\"RT3\",2\r\n\"E08000027\",\"Dudley\",\"R1A\",2\r\n\"E08000027\",\"Dudley\",\"RAP\",2\r\n\"E08000027\",\"Dudley\",\"RBS\",2\r\n\"E08000027\",\"Dudley\",\"RC9\",2\r\n\"E08000027\",\"Dudley\",\"RTD\",2\r\n\"E08000027\",\"Dudley\",\"RCD\",2\r\n\"E08000027\",\"Dudley\",\"RL1\",2\r\n\"E08000027\",\"Dudley\",\"RN3\",2\r\n\"E08000027\",\"Dudley\",\"RD3\",2\r\n\"E08000027\",\"Dudley\",\"RGN\",2\r\n\"E08000027\",\"Dudley\",\"RM3\",2\r\n\"E08000027\",\"Dudley\",\"RAL\",2\r\n\"E08000027\",\"Dudley\",\"RGR\",2\r\n\"E08000027\",\"Dudley\",\"RGT\",2\r\n\"E08000027\",\"Dudley\",\"RKE\",2\r\n\"E08000027\",\"Dudley\",\"RWA\",2\r\n\"E08000027\",\"Dudley\",\"RXC\",2\r\n\"E08000027\",\"Dudley\",\"RFR\",1\r\n\"E08000027\",\"Dudley\",\"RJ8\",1\r\n\"E08000027\",\"Dudley\",\"RWJ\",1\r\n\"E08000027\",\"Dudley\",\"RBN\",1\r\n\"E08000027\",\"Dudley\",\"RP5\",1\r\n\"E08000027\",\"Dudley\",\"RQX\",1\r\n\"E08000027\",\"Dudley\",\"RAE\",1\r\n\"E08000027\",\"Dudley\",\"RFS\",1\r\n\"E08000027\",\"Dudley\",\"RQW\",1\r\n\"E08000027\",\"Dudley\",\"RVR\",1\r\n\"E08000027\",\"Dudley\",\"RCX\",1\r\n\"E08000027\",\"Dudley\",\"RJL\",1\r\n\"E08000027\",\"Dudley\",\"RNL\",1\r\n\"E08000027\",\"Dudley\",\"RV5\",1\r\n\"E08000027\",\"Dudley\",\"RYJ\",1\r\n\"E08000027\",\"Dudley\",\"R0B\",2\r\n\"E08000027\",\"Dudley\",\"RPA\",1\r\n\"E08000027\",\"Dudley\",\"RTK\",1\r\n\"E08000027\",\"Dudley\",\"RBV\",1\r\n\"E08000027\",\"Dudley\",\"RJ6\",1\r\n\"E08000027\",\"Dudley\",\"RRF\",1\r\n\"E08000027\",\"Dudley\",\"RF4\",1\r\n\"E08000027\",\"Dudley\",\"RJR\",1\r\n\"E08000027\",\"Dudley\",\"RNQ\",1\r\n\"E08000027\",\"Dudley\",\"RWW\",1\r\n\"E08000028\",\"Sandwell\",\"RXK\",27176\r\n\"E08000028\",\"Sandwell\",\"RNA\",5345\r\n\"E08000028\",\"Sandwell\",\"RRK\",3350\r\n\"E08000028\",\"Sandwell\",\"RBK\",1920\r\n\"E08000028\",\"Sandwell\",\"RQ3\",1079\r\n\"E08000028\",\"Sandwell\",\"TAJ\",625\r\n\"E08000028\",\"Sandwell\",\"RL4\",484\r\n\"E08000028\",\"Sandwell\",\"RWP\",52\r\n\"E08000028\",\"Sandwell\",\"RXT\",26\r\n\"E08000028\",\"Sandwell\",\"RKB\",21\r\n\"E08000028\",\"Sandwell\",\"RJE\",21\r\n\"E08000028\",\"Sandwell\",\"R0A\",20\r\n\"E08000028\",\"Sandwell\",\"RXW\",27\r\n\"E08000028\",\"Sandwell\",\"RRJ\",14\r\n\"E08000028\",\"Sandwell\",\"R1K\",14\r\n\"E08000028\",\"Sandwell\",\"RTH\",13\r\n\"E08000028\",\"Sandwell\",\"RWE\",12\r\n\"E08000028\",\"Sandwell\",\"RJC\",10\r\n\"E08000028\",\"Sandwell\",\"REF\",10\r\n\"E08000028\",\"Sandwell\",\"RBA\",10\r\n\"E08000028\",\"Sandwell\",\"RLQ\",10\r\n\"E08000028\",\"Sandwell\",\"RX1\",9\r\n\"E08000028\",\"Sandwell\",\"RTG\",12\r\n\"E08000028\",\"Sandwell\",\"RA7\",9\r\n\"E08000028\",\"Sandwell\",\"RQM\",9\r\n\"E08000028\",\"Sandwell\",\"RVJ\",8\r\n\"E08000028\",\"Sandwell\",\"RAE\",8\r\n\"E08000028\",\"Sandwell\",\"RTE\",8\r\n\"E08000028\",\"Sandwell\",\"RXL\",8\r\n\"E08000028\",\"Sandwell\",\"RDU\",7\r\n\"E08000028\",\"Sandwell\",\"RA3\",7\r\n\"E08000028\",\"Sandwell\",\"RJ1\",7\r\n\"E08000028\",\"Sandwell\",\"RAS\",7\r\n\"E08000028\",\"Sandwell\",\"RC9\",7\r\n\"E08000028\",\"Sandwell\",\"R1H\",6\r\n\"E08000028\",\"Sandwell\",\"RLT\",6\r\n\"E08000028\",\"Sandwell\",\"RXR\",6\r\n\"E08000028\",\"Sandwell\",\"RYW\",6\r\n\"E08000028\",\"Sandwell\",\"RBT\",5\r\n\"E08000028\",\"Sandwell\",\"RQX\",5\r\n\"E08000028\",\"Sandwell\",\"RBD\",5\r\n\"E08000028\",\"Sandwell\",\"RW6\",5\r\n\"E08000028\",\"Sandwell\",\"RRV\",5\r\n\"E08000028\",\"Sandwell\",\"RHQ\",5\r\n\"E08000028\",\"Sandwell\",\"RJ6\",5\r\n\"E08000028\",\"Sandwell\",\"RH8\",5\r\n\"E08000028\",\"Sandwell\",\"RHW\",4\r\n\"E08000028\",\"Sandwell\",\"RN3\",4\r\n\"E08000028\",\"Sandwell\",\"RYJ\",4\r\n\"E08000028\",\"Sandwell\",\"RK9\",4\r\n\"E08000028\",\"Sandwell\",\"RAL\",4\r\n\"E08000028\",\"Sandwell\",\"REM\",4\r\n\"E08000028\",\"Sandwell\",\"RA9\",4\r\n\"E08000028\",\"Sandwell\",\"RNS\",4\r\n\"E08000028\",\"Sandwell\",\"RXF\",4\r\n\"E08000028\",\"Sandwell\",\"RJL\",3\r\n\"E08000028\",\"Sandwell\",\"RCB\",3\r\n\"E08000028\",\"Sandwell\",\"RHM\",3\r\n\"E08000028\",\"Sandwell\",\"RXN\",3\r\n\"E08000028\",\"Sandwell\",\"RTR\",3\r\n\"E08000028\",\"Sandwell\",\"RVV\",3\r\n\"E08000028\",\"Sandwell\",\"RWW\",3\r\n\"E08000028\",\"Sandwell\",\"RJZ\",3\r\n\"E08000028\",\"Sandwell\",\"RNQ\",3\r\n\"E08000028\",\"Sandwell\",\"RWD\",3\r\n\"E08000028\",\"Sandwell\",\"RBS\",3\r\n\"E08000028\",\"Sandwell\",\"RDZ\",3\r\n\"E08000028\",\"Sandwell\",\"RF4\",3\r\n\"E08000028\",\"Sandwell\",\"RRE\",3\r\n\"E08000028\",\"Sandwell\",\"RTD\",3\r\n\"E08000028\",\"Sandwell\",\"RTK\",2\r\n\"E08000028\",\"Sandwell\",\"RXQ\",2\r\n\"E08000028\",\"Sandwell\",\"RYR\",2\r\n\"E08000028\",\"Sandwell\",\"RGN\",2\r\n\"E08000028\",\"Sandwell\",\"RR7\",2\r\n\"E08000028\",\"Sandwell\",\"RBN\",2\r\n\"E08000028\",\"Sandwell\",\"R0B\",2\r\n\"E08000028\",\"Sandwell\",\"RM3\",2\r\n\"E08000028\",\"Sandwell\",\"RR8\",2\r\n\"E08000028\",\"Sandwell\",\"RA2\",2\r\n\"E08000028\",\"Sandwell\",\"RNZ\",2\r\n\"E08000028\",\"Sandwell\",\"RXP\",2\r\n\"E08000028\",\"Sandwell\",\"RGM\",2\r\n\"E08000028\",\"Sandwell\",\"R1F\",2\r\n\"E08000028\",\"Sandwell\",\"RC1\",2\r\n\"E08000028\",\"Sandwell\",\"RDE\",2\r\n\"E08000028\",\"Sandwell\",\"RYG\",2\r\n\"E08000028\",\"Sandwell\",\"RAP\",2\r\n\"E08000028\",\"Sandwell\",\"RBZ\",2\r\n\"E08000028\",\"Sandwell\",\"RJ2\",3\r\n\"E08000028\",\"Sandwell\",\"RWA\",2\r\n\"E08000028\",\"Sandwell\",\"RWF\",1\r\n\"E08000028\",\"Sandwell\",\"RWH\",1\r\n\"E08000028\",\"Sandwell\",\"RWK\",1\r\n\"E08000028\",\"Sandwell\",\"RXH\",1\r\n\"E08000028\",\"Sandwell\",\"RFR\",1\r\n\"E08000028\",\"Sandwell\",\"RMP\",1\r\n\"E08000028\",\"Sandwell\",\"RPA\",1\r\n\"E08000028\",\"Sandwell\",\"RTQ\",1\r\n\"E08000028\",\"Sandwell\",\"RVR\",1\r\n\"E08000028\",\"Sandwell\",\"RCD\",1\r\n\"E08000028\",\"Sandwell\",\"RK5\",1\r\n\"E08000028\",\"Sandwell\",\"RWY\",1\r\n\"E08000028\",\"Sandwell\",\"RAJ\",1\r\n\"E08000028\",\"Sandwell\",\"RLY\",1\r\n\"E08000028\",\"Sandwell\",\"RWG\",1\r\n\"E08000028\",\"Sandwell\",\"RGP\",1\r\n\"E08000028\",\"Sandwell\",\"RP5\",2\r\n\"E08000028\",\"Sandwell\",\"R1A\",1\r\n\"E08000028\",\"Sandwell\",\"RFS\",1\r\n\"E08000028\",\"Sandwell\",\"RJR\",1\r\n\"E08000028\",\"Sandwell\",\"RXY\",1\r\n\"E08000028\",\"Sandwell\",\"RD3\",1\r\n\"E08000028\",\"Sandwell\",\"RD8\",1\r\n\"E08000028\",\"Sandwell\",\"RNL\",1\r\n\"E08000028\",\"Sandwell\",\"RWJ\",1\r\n\"E08000028\",\"Sandwell\",\"RGT\",1\r\n\"E08000028\",\"Sandwell\",\"RMC\",1\r\n\"E08000028\",\"Sandwell\",\"RVW\",1\r\n\"E08000029\",\"Solihull\",\"RRK\",28534\r\n\"E08000029\",\"Solihull\",\"RJC\",726\r\n\"E08000029\",\"Solihull\",\"RQ3\",582\r\n\"E08000029\",\"Solihull\",\"RKB\",334\r\n\"E08000029\",\"Solihull\",\"RXT\",205\r\n\"E08000029\",\"Solihull\",\"RXK\",162\r\n\"E08000029\",\"Solihull\",\"RWP\",66\r\n\"E08000029\",\"Solihull\",\"RLT\",24\r\n\"E08000029\",\"Solihull\",\"RL4\",16\r\n\"E08000029\",\"Solihull\",\"REF\",14\r\n\"E08000029\",\"Solihull\",\"RYW\",14\r\n\"E08000029\",\"Solihull\",\"RBK\",12\r\n\"E08000029\",\"Solihull\",\"RTE\",12\r\n\"E08000029\",\"Solihull\",\"RTH\",12\r\n\"E08000029\",\"Solihull\",\"RBA\",11\r\n\"E08000029\",\"Solihull\",\"RH8\",11\r\n\"E08000029\",\"Solihull\",\"RJE\",11\r\n\"E08000029\",\"Solihull\",\"RA9\",10\r\n\"E08000029\",\"Solihull\",\"RRJ\",10\r\n\"E08000029\",\"Solihull\",\"RA3\",10\r\n\"E08000029\",\"Solihull\",\"RBZ\",9\r\n\"E08000029\",\"Solihull\",\"RWE\",9\r\n\"E08000029\",\"Solihull\",\"RD3\",8\r\n\"E08000029\",\"Solihull\",\"R1H\",8\r\n\"E08000029\",\"Solihull\",\"RXW\",12\r\n\"E08000029\",\"Solihull\",\"RYG\",8\r\n\"E08000029\",\"Solihull\",\"RNA\",8\r\n\"E08000029\",\"Solihull\",\"RQM\",7\r\n\"E08000029\",\"Solihull\",\"RA7\",7\r\n\"E08000029\",\"Solihull\",\"RDU\",6\r\n\"E08000029\",\"Solihull\",\"RBD\",6\r\n\"E08000029\",\"Solihull\",\"RTG\",12\r\n\"E08000029\",\"Solihull\",\"RX1\",6\r\n\"E08000029\",\"Solihull\",\"RLQ\",6\r\n\"E08000029\",\"Solihull\",\"RYJ\",6\r\n\"E08000029\",\"Solihull\",\"RK9\",6\r\n\"E08000029\",\"Solihull\",\"RWD\",6\r\n\"E08000029\",\"Solihull\",\"RHQ\",5\r\n\"E08000029\",\"Solihull\",\"RHW\",5\r\n\"E08000029\",\"Solihull\",\"RJ1\",5\r\n\"E08000029\",\"Solihull\",\"RXP\",5\r\n\"E08000029\",\"Solihull\",\"RDZ\",5\r\n\"E08000029\",\"Solihull\",\"RD1\",5\r\n\"E08000029\",\"Solihull\",\"RGN\",4\r\n\"E08000029\",\"Solihull\",\"R0A\",4\r\n\"E08000029\",\"Solihull\",\"RFS\",4\r\n\"E08000029\",\"Solihull\",\"RCB\",4\r\n\"E08000029\",\"Solihull\",\"RTX\",4\r\n\"E08000029\",\"Solihull\",\"RGP\",4\r\n\"E08000029\",\"Solihull\",\"RNL\",3\r\n\"E08000029\",\"Solihull\",\"RWY\",3\r\n\"E08000029\",\"Solihull\",\"RHM\",3\r\n\"E08000029\",\"Solihull\",\"R1F\",3\r\n\"E08000029\",\"Solihull\",\"R1K\",3\r\n\"E08000029\",\"Solihull\",\"RXL\",3\r\n\"E08000029\",\"Solihull\",\"RA4\",3\r\n\"E08000029\",\"Solihull\",\"RNS\",3\r\n\"E08000029\",\"Solihull\",\"RF4\",3\r\n\"E08000029\",\"Solihull\",\"RJL\",3\r\n\"E08000029\",\"Solihull\",\"RNQ\",3\r\n\"E08000029\",\"Solihull\",\"RVJ\",3\r\n\"E08000029\",\"Solihull\",\"RJZ\",3\r\n\"E08000029\",\"Solihull\",\"RRV\",5\r\n\"E08000029\",\"Solihull\",\"RBT\",3\r\n\"E08000029\",\"Solihull\",\"RXE\",2\r\n\"E08000029\",\"Solihull\",\"RJ7\",2\r\n\"E08000029\",\"Solihull\",\"RMC\",2\r\n\"E08000029\",\"Solihull\",\"RTR\",2\r\n\"E08000029\",\"Solihull\",\"RYR\",2\r\n\"E08000029\",\"Solihull\",\"RC9\",2\r\n\"E08000029\",\"Solihull\",\"RAS\",2\r\n\"E08000029\",\"Solihull\",\"RC1\",2\r\n\"E08000029\",\"Solihull\",\"RD8\",2\r\n\"E08000029\",\"Solihull\",\"RDD\",2\r\n\"E08000029\",\"Solihull\",\"RXC\",2\r\n\"E08000029\",\"Solihull\",\"TAJ\",2\r\n\"E08000029\",\"Solihull\",\"RGT\",2\r\n\"E08000029\",\"Solihull\",\"RJR\",2\r\n\"E08000029\",\"Solihull\",\"RK5\",2\r\n\"E08000029\",\"Solihull\",\"RAX\",2\r\n\"E08000029\",\"Solihull\",\"RTP\",2\r\n\"E08000029\",\"Solihull\",\"RVY\",2\r\n\"E08000029\",\"Solihull\",\"RGM\",1\r\n\"E08000029\",\"Solihull\",\"RHA\",1\r\n\"E08000029\",\"Solihull\",\"RJN\",1\r\n\"E08000029\",\"Solihull\",\"RWG\",1\r\n\"E08000029\",\"Solihull\",\"RXH\",1\r\n\"E08000029\",\"Solihull\",\"RDY\",1\r\n\"E08000029\",\"Solihull\",\"RGR\",1\r\n\"E08000029\",\"Solihull\",\"RQX\",1\r\n\"E08000029\",\"Solihull\",\"RAJ\",1\r\n\"E08000029\",\"Solihull\",\"REM\",1\r\n\"E08000029\",\"Solihull\",\"RWH\",1\r\n\"E08000029\",\"Solihull\",\"RNZ\",1\r\n\"E08000029\",\"Solihull\",\"RWA\",1\r\n\"E08000029\",\"Solihull\",\"R1A\",1\r\n\"E08000029\",\"Solihull\",\"RAP\",1\r\n\"E08000029\",\"Solihull\",\"RDE\",1\r\n\"E08000029\",\"Solihull\",\"RFR\",1\r\n\"E08000029\",\"Solihull\",\"RHU\",1\r\n\"E08000029\",\"Solihull\",\"RVV\",1\r\n\"E08000029\",\"Solihull\",\"RW6\",1\r\n\"E08000029\",\"Solihull\",\"RXQ\",1\r\n\"E08000029\",\"Solihull\",\"RBS\",1\r\n\"E08000029\",\"Solihull\",\"RCU\",1\r\n\"E08000029\",\"Solihull\",\"REP\",1\r\n\"E08000029\",\"Solihull\",\"RP5\",1\r\n\"E08000029\",\"Solihull\",\"RWW\",1\r\n\"E08000029\",\"Solihull\",\"RJ2\",1\r\n\"E08000029\",\"Solihull\",\"R0B\",1\r\n\"E08000029\",\"Solihull\",\"RM1\",1\r\n\"E08000029\",\"Solihull\",\"RTF\",1\r\n\"E08000029\",\"Solihull\",\"RTK\",1\r\n\"E08000029\",\"Solihull\",\"RBV\",1\r\n\"E08000029\",\"Solihull\",\"RM3\",1\r\n\"E08000029\",\"Solihull\",\"RR7\",1\r\n\"E08000029\",\"Solihull\",\"RVW\",1\r\n\"E08000030\",\"Walsall\",\"RBK\",26632\r\n\"E08000030\",\"Walsall\",\"RL4\",4368\r\n\"E08000030\",\"Walsall\",\"RRK\",3370\r\n\"E08000030\",\"Walsall\",\"RXK\",1023\r\n\"E08000030\",\"Walsall\",\"RQ3\",461\r\n\"E08000030\",\"Walsall\",\"RNA\",207\r\n\"E08000030\",\"Walsall\",\"RJE\",68\r\n\"E08000030\",\"Walsall\",\"RTG\",78\r\n\"E08000030\",\"Walsall\",\"TAJ\",31\r\n\"E08000030\",\"Walsall\",\"RKB\",22\r\n\"E08000030\",\"Walsall\",\"RXW\",34\r\n\"E08000030\",\"Walsall\",\"RRJ\",17\r\n\"E08000030\",\"Walsall\",\"RWP\",16\r\n\"E08000030\",\"Walsall\",\"RTH\",16\r\n\"E08000030\",\"Walsall\",\"REF\",14\r\n\"E08000030\",\"Walsall\",\"RXT\",12\r\n\"E08000030\",\"Walsall\",\"RWE\",12\r\n\"E08000030\",\"Walsall\",\"RA9\",10\r\n\"E08000030\",\"Walsall\",\"RTE\",10\r\n\"E08000030\",\"Walsall\",\"RLQ\",10\r\n\"E08000030\",\"Walsall\",\"RJC\",9\r\n\"E08000030\",\"Walsall\",\"RHQ\",8\r\n\"E08000030\",\"Walsall\",\"RNL\",8\r\n\"E08000030\",\"Walsall\",\"RXL\",8\r\n\"E08000030\",\"Walsall\",\"RA3\",7\r\n\"E08000030\",\"Walsall\",\"R1F\",7\r\n\"E08000030\",\"Walsall\",\"RBA\",7\r\n\"E08000030\",\"Walsall\",\"RW6\",6\r\n\"E08000030\",\"Walsall\",\"R1H\",6\r\n\"E08000030\",\"Walsall\",\"RK9\",6\r\n\"E08000030\",\"Walsall\",\"RBZ\",5\r\n\"E08000030\",\"Walsall\",\"RRE\",5\r\n\"E08000030\",\"Walsall\",\"RA7\",5\r\n\"E08000030\",\"Walsall\",\"RAE\",5\r\n\"E08000030\",\"Walsall\",\"RJ1\",5\r\n\"E08000030\",\"Walsall\",\"RBT\",5\r\n\"E08000030\",\"Walsall\",\"RBD\",5\r\n\"E08000030\",\"Walsall\",\"RLT\",5\r\n\"E08000030\",\"Walsall\",\"RWD\",5\r\n\"E08000030\",\"Walsall\",\"R1K\",4\r\n\"E08000030\",\"Walsall\",\"RXQ\",4\r\n\"E08000030\",\"Walsall\",\"RC9\",4\r\n\"E08000030\",\"Walsall\",\"RDU\",4\r\n\"E08000030\",\"Walsall\",\"RM3\",4\r\n\"E08000030\",\"Walsall\",\"R0A\",4\r\n\"E08000030\",\"Walsall\",\"RDZ\",4\r\n\"E08000030\",\"Walsall\",\"RN3\",4\r\n\"E08000030\",\"Walsall\",\"RNS\",4\r\n\"E08000030\",\"Walsall\",\"RVV\",4\r\n\"E08000030\",\"Walsall\",\"RWH\",3\r\n\"E08000030\",\"Walsall\",\"RXR\",3\r\n\"E08000030\",\"Walsall\",\"RHW\",3\r\n\"E08000030\",\"Walsall\",\"RQM\",3\r\n\"E08000030\",\"Walsall\",\"RYW\",3\r\n\"E08000030\",\"Walsall\",\"RWG\",3\r\n\"E08000030\",\"Walsall\",\"RXN\",3\r\n\"E08000030\",\"Walsall\",\"RBN\",3\r\n\"E08000030\",\"Walsall\",\"RD8\",3\r\n\"E08000030\",\"Walsall\",\"RF4\",3\r\n\"E08000030\",\"Walsall\",\"RX1\",3\r\n\"E08000030\",\"Walsall\",\"RYR\",3\r\n\"E08000030\",\"Walsall\",\"RWY\",2\r\n\"E08000030\",\"Walsall\",\"RC1\",2\r\n\"E08000030\",\"Walsall\",\"RCB\",2\r\n\"E08000030\",\"Walsall\",\"RD3\",2\r\n\"E08000030\",\"Walsall\",\"RBS\",2\r\n\"E08000030\",\"Walsall\",\"RWJ\",2\r\n\"E08000030\",\"Walsall\",\"RN5\",2\r\n\"E08000030\",\"Walsall\",\"RFF\",2\r\n\"E08000030\",\"Walsall\",\"RGN\",2\r\n\"E08000030\",\"Walsall\",\"RTP\",2\r\n\"E08000030\",\"Walsall\",\"RH8\",2\r\n\"E08000030\",\"Walsall\",\"RJ7\",2\r\n\"E08000030\",\"Walsall\",\"RYJ\",2\r\n\"E08000030\",\"Walsall\",\"RAP\",2\r\n\"E08000030\",\"Walsall\",\"RD1\",2\r\n\"E08000030\",\"Walsall\",\"RGR\",2\r\n\"E08000030\",\"Walsall\",\"RJR\",2\r\n\"E08000030\",\"Walsall\",\"RK5\",2\r\n\"E08000030\",\"Walsall\",\"RNQ\",2\r\n\"E08000030\",\"Walsall\",\"REM\",2\r\n\"E08000030\",\"Walsall\",\"RR8\",2\r\n\"E08000030\",\"Walsall\",\"RRF\",2\r\n\"E08000030\",\"Walsall\",\"RRV\",2\r\n\"E08000030\",\"Walsall\",\"RWW\",2\r\n\"E08000030\",\"Walsall\",\"RAJ\",1\r\n\"E08000030\",\"Walsall\",\"RM1\",1\r\n\"E08000030\",\"Walsall\",\"RTF\",1\r\n\"E08000030\",\"Walsall\",\"RVJ\",1\r\n\"E08000030\",\"Walsall\",\"RDE\",1\r\n\"E08000030\",\"Walsall\",\"RHM\",1\r\n\"E08000030\",\"Walsall\",\"RMY\",1\r\n\"E08000030\",\"Walsall\",\"RWA\",1\r\n\"E08000030\",\"Walsall\",\"RGP\",1\r\n\"E08000030\",\"Walsall\",\"RN7\",1\r\n\"E08000030\",\"Walsall\",\"RTR\",1\r\n\"E08000030\",\"Walsall\",\"RVR\",1\r\n\"E08000030\",\"Walsall\",\"RKE\",1\r\n\"E08000030\",\"Walsall\",\"RMP\",1\r\n\"E08000030\",\"Walsall\",\"RTD\",1\r\n\"E08000030\",\"Walsall\",\"RTK\",1\r\n\"E08000030\",\"Walsall\",\"RCD\",1\r\n\"E08000030\",\"Walsall\",\"RCX\",1\r\n\"E08000030\",\"Walsall\",\"RGT\",1\r\n\"E08000030\",\"Walsall\",\"RVY\",1\r\n\"E08000030\",\"Walsall\",\"RXM\",1\r\n\"E08000030\",\"Walsall\",\"RHU\",1\r\n\"E08000030\",\"Walsall\",\"RJZ\",1\r\n\"E08000030\",\"Walsall\",\"RP1\",1\r\n\"E08000030\",\"Walsall\",\"RP5\",1\r\n\"E08000030\",\"Walsall\",\"RXC\",1\r\n\"E08000030\",\"Walsall\",\"RXP\",1\r\n\"E08000030\",\"Walsall\",\"RA4\",1\r\n\"E08000030\",\"Walsall\",\"RCF\",1\r\n\"E08000030\",\"Walsall\",\"RH5\",1\r\n\"E08000030\",\"Walsall\",\"RJL\",1\r\n\"E08000031\",\"Wolverhampton\",\"RL4\",27248\r\n\"E08000031\",\"Wolverhampton\",\"RNA\",510\r\n\"E08000031\",\"Wolverhampton\",\"TAJ\",491\r\n\"E08000031\",\"Wolverhampton\",\"RBK\",437\r\n\"E08000031\",\"Wolverhampton\",\"RRK\",413\r\n\"E08000031\",\"Wolverhampton\",\"RQ3\",172\r\n\"E08000031\",\"Wolverhampton\",\"RXK\",185\r\n\"E08000031\",\"Wolverhampton\",\"RJE\",58\r\n\"E08000031\",\"Wolverhampton\",\"RXW\",83\r\n\"E08000031\",\"Wolverhampton\",\"RKB\",24\r\n\"E08000031\",\"Wolverhampton\",\"RWP\",21\r\n\"E08000031\",\"Wolverhampton\",\"RWE\",19\r\n\"E08000031\",\"Wolverhampton\",\"RTH\",19\r\n\"E08000031\",\"Wolverhampton\",\"R0A\",15\r\n\"E08000031\",\"Wolverhampton\",\"RTG\",18\r\n\"E08000031\",\"Wolverhampton\",\"RDU\",10\r\n\"E08000031\",\"Wolverhampton\",\"R1K\",9\r\n\"E08000031\",\"Wolverhampton\",\"RBA\",9\r\n\"E08000031\",\"Wolverhampton\",\"R1H\",8\r\n\"E08000031\",\"Wolverhampton\",\"RJ1\",8\r\n\"E08000031\",\"Wolverhampton\",\"RX1\",7\r\n\"E08000031\",\"Wolverhampton\",\"RA9\",7\r\n\"E08000031\",\"Wolverhampton\",\"RYJ\",7\r\n\"E08000031\",\"Wolverhampton\",\"RA7\",6\r\n\"E08000031\",\"Wolverhampton\",\"RHQ\",6\r\n\"E08000031\",\"Wolverhampton\",\"RRV\",6\r\n\"E08000031\",\"Wolverhampton\",\"RM1\",6\r\n\"E08000031\",\"Wolverhampton\",\"RTE\",6\r\n\"E08000031\",\"Wolverhampton\",\"RVJ\",5\r\n\"E08000031\",\"Wolverhampton\",\"RBT\",5\r\n\"E08000031\",\"Wolverhampton\",\"RK5\",5\r\n\"E08000031\",\"Wolverhampton\",\"RLQ\",5\r\n\"E08000031\",\"Wolverhampton\",\"RJC\",5\r\n\"E08000031\",\"Wolverhampton\",\"RH8\",5\r\n\"E08000031\",\"Wolverhampton\",\"RRE\",5\r\n\"E08000031\",\"Wolverhampton\",\"RQM\",5\r\n\"E08000031\",\"Wolverhampton\",\"RHU\",4\r\n\"E08000031\",\"Wolverhampton\",\"RXT\",4\r\n\"E08000031\",\"Wolverhampton\",\"RD1\",4\r\n\"E08000031\",\"Wolverhampton\",\"REF\",4\r\n\"E08000031\",\"Wolverhampton\",\"RGT\",4\r\n\"E08000031\",\"Wolverhampton\",\"RA3\",4\r\n\"E08000031\",\"Wolverhampton\",\"RAP\",4\r\n\"E08000031\",\"Wolverhampton\",\"RJZ\",4\r\n\"E08000031\",\"Wolverhampton\",\"RK9\",4\r\n\"E08000031\",\"Wolverhampton\",\"RXL\",4\r\n\"E08000031\",\"Wolverhampton\",\"RAX\",4\r\n\"E08000031\",\"Wolverhampton\",\"RJL\",4\r\n\"E08000031\",\"Wolverhampton\",\"RR8\",4\r\n\"E08000031\",\"Wolverhampton\",\"R0B\",5\r\n\"E08000031\",\"Wolverhampton\",\"RRJ\",3\r\n\"E08000031\",\"Wolverhampton\",\"RXH\",3\r\n\"E08000031\",\"Wolverhampton\",\"RBD\",3\r\n\"E08000031\",\"Wolverhampton\",\"RBS\",3\r\n\"E08000031\",\"Wolverhampton\",\"RCU\",3\r\n\"E08000031\",\"Wolverhampton\",\"RWD\",3\r\n\"E08000031\",\"Wolverhampton\",\"RWW\",3\r\n\"E08000031\",\"Wolverhampton\",\"RCB\",3\r\n\"E08000031\",\"Wolverhampton\",\"RHM\",3\r\n\"E08000031\",\"Wolverhampton\",\"RBN\",3\r\n\"E08000031\",\"Wolverhampton\",\"RJR\",3\r\n\"E08000031\",\"Wolverhampton\",\"RM3\",3\r\n\"E08000031\",\"Wolverhampton\",\"RTK\",3\r\n\"E08000031\",\"Wolverhampton\",\"RVY\",3\r\n\"E08000031\",\"Wolverhampton\",\"RLY\",3\r\n\"E08000031\",\"Wolverhampton\",\"RQX\",3\r\n\"E08000031\",\"Wolverhampton\",\"RDD\",3\r\n\"E08000031\",\"Wolverhampton\",\"RJ2\",4\r\n\"E08000031\",\"Wolverhampton\",\"RWG\",3\r\n\"E08000031\",\"Wolverhampton\",\"RD8\",3\r\n\"E08000031\",\"Wolverhampton\",\"RNL\",2\r\n\"E08000031\",\"Wolverhampton\",\"RNS\",2\r\n\"E08000031\",\"Wolverhampton\",\"RNZ\",2\r\n\"E08000031\",\"Wolverhampton\",\"RAL\",2\r\n\"E08000031\",\"Wolverhampton\",\"RXN\",2\r\n\"E08000031\",\"Wolverhampton\",\"RXP\",2\r\n\"E08000031\",\"Wolverhampton\",\"R1F\",2\r\n\"E08000031\",\"Wolverhampton\",\"RL1\",2\r\n\"E08000031\",\"Wolverhampton\",\"RN5\",2\r\n\"E08000031\",\"Wolverhampton\",\"RC9\",2\r\n\"E08000031\",\"Wolverhampton\",\"RNQ\",2\r\n\"E08000031\",\"Wolverhampton\",\"RW1\",2\r\n\"E08000031\",\"Wolverhampton\",\"RW6\",2\r\n\"E08000031\",\"Wolverhampton\",\"RJ6\",2\r\n\"E08000031\",\"Wolverhampton\",\"RXC\",2\r\n\"E08000031\",\"Wolverhampton\",\"RAS\",2\r\n\"E08000031\",\"Wolverhampton\",\"RLT\",2\r\n\"E08000031\",\"Wolverhampton\",\"RAJ\",2\r\n\"E08000031\",\"Wolverhampton\",\"RKE\",2\r\n\"E08000031\",\"Wolverhampton\",\"RN7\",2\r\n\"E08000031\",\"Wolverhampton\",\"RCX\",1\r\n\"E08000031\",\"Wolverhampton\",\"RVR\",1\r\n\"E08000031\",\"Wolverhampton\",\"RBV\",1\r\n\"E08000031\",\"Wolverhampton\",\"RCF\",1\r\n\"E08000031\",\"Wolverhampton\",\"RDE\",1\r\n\"E08000031\",\"Wolverhampton\",\"RMC\",1\r\n\"E08000031\",\"Wolverhampton\",\"RD3\",1\r\n\"E08000031\",\"Wolverhampton\",\"RMY\",1\r\n\"E08000031\",\"Wolverhampton\",\"RN3\",1\r\n\"E08000031\",\"Wolverhampton\",\"RRF\",1\r\n\"E08000031\",\"Wolverhampton\",\"RTD\",1\r\n\"E08000031\",\"Wolverhampton\",\"RTR\",1\r\n\"E08000031\",\"Wolverhampton\",\"RXF\",1\r\n\"E08000031\",\"Wolverhampton\",\"REM\",2\r\n\"E08000031\",\"Wolverhampton\",\"RWA\",1\r\n\"E08000031\",\"Wolverhampton\",\"RWF\",1\r\n\"E08000031\",\"Wolverhampton\",\"R1A\",1\r\n\"E08000031\",\"Wolverhampton\",\"RWY\",1\r\n\"E08000031\",\"Wolverhampton\",\"RX4\",1\r\n\"E08000031\",\"Wolverhampton\",\"RF4\",1\r\n\"E08000031\",\"Wolverhampton\",\"RFR\",1\r\n\"E08000031\",\"Wolverhampton\",\"RBL\",1\r\n\"E08000031\",\"Wolverhampton\",\"RBZ\",1\r\n\"E08000031\",\"Wolverhampton\",\"RFS\",1\r\n\"E08000031\",\"Wolverhampton\",\"RJ7\",1\r\n\"E08000031\",\"Wolverhampton\",\"RMP\",1\r\n\"E08000031\",\"Wolverhampton\",\"RTP\",1\r\n\"E08000031\",\"Wolverhampton\",\"RVV\",1\r\n\"E08000031\",\"Wolverhampton\",\"RFF\",1\r\n\"E08000031\",\"Wolverhampton\",\"RGN\",1\r\n\"E08000031\",\"Wolverhampton\",\"RNU\",1\r\n\"E08000031\",\"Wolverhampton\",\"RTF\",1\r\n\"E08000032\",\"Bradford\",\"RAE\",60638\r\n\"E08000032\",\"Bradford\",\"RCF\",15185\r\n\"E08000032\",\"Bradford\",\"RR8\",2823\r\n\"E08000032\",\"Bradford\",\"RWY\",1364\r\n\"E08000032\",\"Bradford\",\"TAD\",453\r\n\"E08000032\",\"Bradford\",\"RXF\",350\r\n\"E08000032\",\"Bradford\",\"RCD\",117\r\n\"E08000032\",\"Bradford\",\"RCB\",109\r\n\"E08000032\",\"Bradford\",\"R0A\",106\r\n\"E08000032\",\"Bradford\",\"RWA\",33\r\n\"E08000032\",\"Bradford\",\"RHQ\",31\r\n\"E08000032\",\"Bradford\",\"RTX\",29\r\n\"E08000032\",\"Bradford\",\"RXL\",25\r\n\"E08000032\",\"Bradford\",\"RM3\",23\r\n\"E08000032\",\"Bradford\",\"RWD\",22\r\n\"E08000032\",\"Bradford\",\"RTG\",21\r\n\"E08000032\",\"Bradford\",\"RXR\",20\r\n\"E08000032\",\"Bradford\",\"RRK\",30\r\n\"E08000032\",\"Bradford\",\"RW6\",17\r\n\"E08000032\",\"Bradford\",\"RTD\",16\r\n\"E08000032\",\"Bradford\",\"RTR\",19\r\n\"E08000032\",\"Bradford\",\"R1H\",15\r\n\"E08000032\",\"Bradford\",\"RGN\",15\r\n\"E08000032\",\"Bradford\",\"RXN\",15\r\n\"E08000032\",\"Bradford\",\"RCU\",14\r\n\"E08000032\",\"Bradford\",\"RP5\",17\r\n\"E08000032\",\"Bradford\",\"RBV\",13\r\n\"E08000032\",\"Bradford\",\"RNL\",11\r\n\"E08000032\",\"Bradford\",\"RQ3\",11\r\n\"E08000032\",\"Bradford\",\"RXP\",11\r\n\"E08000032\",\"Bradford\",\"RKB\",10\r\n\"E08000032\",\"Bradford\",\"RTF\",10\r\n\"E08000032\",\"Bradford\",\"RJE\",9\r\n\"E08000032\",\"Bradford\",\"RXK\",14\r\n\"E08000032\",\"Bradford\",\"RTH\",9\r\n\"E08000032\",\"Bradford\",\"RJL\",8\r\n\"E08000032\",\"Bradford\",\"RWW\",8\r\n\"E08000032\",\"Bradford\",\"RX1\",8\r\n\"E08000032\",\"Bradford\",\"RXG\",8\r\n\"E08000032\",\"Bradford\",\"RQM\",8\r\n\"E08000032\",\"Bradford\",\"RRV\",8\r\n\"E08000032\",\"Bradford\",\"RGD\",8\r\n\"E08000032\",\"Bradford\",\"REM\",9\r\n\"E08000032\",\"Bradford\",\"RWH\",6\r\n\"E08000032\",\"Bradford\",\"RA9\",6\r\n\"E08000032\",\"Bradford\",\"RBD\",6\r\n\"E08000032\",\"Bradford\",\"REF\",6\r\n\"E08000032\",\"Bradford\",\"RVY\",8\r\n\"E08000032\",\"Bradford\",\"RJ1\",5\r\n\"E08000032\",\"Bradford\",\"RBT\",5\r\n\"E08000032\",\"Bradford\",\"RFF\",5\r\n\"E08000032\",\"Bradford\",\"RFS\",5\r\n\"E08000032\",\"Bradford\",\"RDU\",5\r\n\"E08000032\",\"Bradford\",\"RFR\",4\r\n\"E08000032\",\"Bradford\",\"RBN\",4\r\n\"E08000032\",\"Bradford\",\"RC1\",4\r\n\"E08000032\",\"Bradford\",\"RGP\",4\r\n\"E08000032\",\"Bradford\",\"RL4\",4\r\n\"E08000032\",\"Bradford\",\"RP6\",4\r\n\"E08000032\",\"Bradford\",\"R1K\",4\r\n\"E08000032\",\"Bradford\",\"RJC\",4\r\n\"E08000032\",\"Bradford\",\"RMP\",4\r\n\"E08000032\",\"Bradford\",\"RC9\",4\r\n\"E08000032\",\"Bradford\",\"RHW\",4\r\n\"E08000032\",\"Bradford\",\"RYJ\",4\r\n\"E08000032\",\"Bradford\",\"RJ7\",4\r\n\"E08000032\",\"Bradford\",\"RM1\",4\r\n\"E08000032\",\"Bradford\",\"RTP\",4\r\n\"E08000032\",\"Bradford\",\"RWE\",3\r\n\"E08000032\",\"Bradford\",\"RDZ\",3\r\n\"E08000032\",\"Bradford\",\"RVW\",3\r\n\"E08000032\",\"Bradford\",\"RX3\",3\r\n\"E08000032\",\"Bradford\",\"R1F\",3\r\n\"E08000032\",\"Bradford\",\"RAP\",3\r\n\"E08000032\",\"Bradford\",\"RNS\",3\r\n\"E08000032\",\"Bradford\",\"RT3\",3\r\n\"E08000032\",\"Bradford\",\"RYR\",3\r\n\"E08000032\",\"Bradford\",\"RF4\",3\r\n\"E08000032\",\"Bradford\",\"RJR\",3\r\n\"E08000032\",\"Bradford\",\"RLQ\",3\r\n\"E08000032\",\"Bradford\",\"RVV\",3\r\n\"E08000032\",\"Bradford\",\"RD1\",3\r\n\"E08000032\",\"Bradford\",\"RGT\",3\r\n\"E08000032\",\"Bradford\",\"RBK\",2\r\n\"E08000032\",\"Bradford\",\"RCX\",2\r\n\"E08000032\",\"Bradford\",\"RHM\",2\r\n\"E08000032\",\"Bradford\",\"RLY\",2\r\n\"E08000032\",\"Bradford\",\"RMC\",2\r\n\"E08000032\",\"Bradford\",\"RWJ\",2\r\n\"E08000032\",\"Bradford\",\"RJN\",2\r\n\"E08000032\",\"Bradford\",\"RWG\",2\r\n\"E08000032\",\"Bradford\",\"RNZ\",2\r\n\"E08000032\",\"Bradford\",\"RA4\",2\r\n\"E08000032\",\"Bradford\",\"RTK\",2\r\n\"E08000032\",\"Bradford\",\"RA7\",2\r\n\"E08000032\",\"Bradford\",\"RJ6\",2\r\n\"E08000032\",\"Bradford\",\"RAS\",2\r\n\"E08000032\",\"Bradford\",\"RH8\",2\r\n\"E08000032\",\"Bradford\",\"RJZ\",2\r\n\"E08000032\",\"Bradford\",\"RN7\",2\r\n\"E08000032\",\"Bradford\",\"RW5\",2\r\n\"E08000032\",\"Bradford\",\"RWF\",2\r\n\"E08000032\",\"Bradford\",\"R0B\",5\r\n\"E08000032\",\"Bradford\",\"RLT\",2\r\n\"E08000032\",\"Bradford\",\"RN3\",2\r\n\"E08000032\",\"Bradford\",\"RRF\",2\r\n\"E08000032\",\"Bradford\",\"RXC\",2\r\n\"E08000032\",\"Bradford\",\"RXH\",2\r\n\"E08000032\",\"Bradford\",\"RKE\",2\r\n\"E08000032\",\"Bradford\",\"RXQ\",2\r\n\"E08000032\",\"Bradford\",\"RA3\",1\r\n\"E08000032\",\"Bradford\",\"RBS\",1\r\n\"E08000032\",\"Bradford\",\"REP\",1\r\n\"E08000032\",\"Bradford\",\"RHU\",1\r\n\"E08000032\",\"Bradford\",\"RK5\",1\r\n\"E08000032\",\"Bradford\",\"RXW\",1\r\n\"E08000032\",\"Bradford\",\"RAJ\",1\r\n\"E08000032\",\"Bradford\",\"RBL\",1\r\n\"E08000032\",\"Bradford\",\"RJ2\",2\r\n\"E08000032\",\"Bradford\",\"RXE\",1\r\n\"E08000032\",\"Bradford\",\"RBQ\",1\r\n\"E08000032\",\"Bradford\",\"RET\",1\r\n\"E08000032\",\"Bradford\",\"RQW\",1\r\n\"E08000032\",\"Bradford\",\"RD3\",1\r\n\"E08000032\",\"Bradford\",\"RGR\",1\r\n\"E08000032\",\"Bradford\",\"RQX\",1\r\n\"E08000032\",\"Bradford\",\"RTE\",1\r\n\"E08000032\",\"Bradford\",\"RGM\",1\r\n\"E08000032\",\"Bradford\",\"RP4\",1\r\n\"E08000032\",\"Bradford\",\"RAL\",1\r\n\"E08000032\",\"Bradford\",\"RAT\",1\r\n\"E08000032\",\"Bradford\",\"RDE\",1\r\n\"E08000032\",\"Bradford\",\"RN5\",1\r\n\"E08000032\",\"Bradford\",\"RNA\",1\r\n\"E08000032\",\"Bradford\",\"RD8\",1\r\n\"E08000032\",\"Bradford\",\"RDD\",1\r\n\"E08000032\",\"Bradford\",\"RAX\",1\r\n\"E08000032\",\"Bradford\",\"RBA\",1\r\n\"E08000032\",\"Bradford\",\"RPA\",1\r\n\"E08000032\",\"Bradford\",\"RR7\",1\r\n\"E08000032\",\"Bradford\",\"RVR\",1\r\n\"E08000033\",\"Calderdale\",\"RWY\",25185\r\n\"E08000033\",\"Calderdale\",\"RAE\",845\r\n\"E08000033\",\"Calderdale\",\"RR8\",758\r\n\"E08000033\",\"Calderdale\",\"RXG\",278\r\n\"E08000033\",\"Calderdale\",\"RXF\",99\r\n\"E08000033\",\"Calderdale\",\"RW6\",90\r\n\"E08000033\",\"Calderdale\",\"RXR\",84\r\n\"E08000033\",\"Calderdale\",\"R0A\",56\r\n\"E08000033\",\"Calderdale\",\"RCF\",28\r\n\"E08000033\",\"Calderdale\",\"RCB\",27\r\n\"E08000033\",\"Calderdale\",\"RXN\",18\r\n\"E08000033\",\"Calderdale\",\"RHQ\",14\r\n\"E08000033\",\"Calderdale\",\"RM3\",13\r\n\"E08000033\",\"Calderdale\",\"RTX\",13\r\n\"E08000033\",\"Calderdale\",\"RXL\",12\r\n\"E08000033\",\"Calderdale\",\"R1H\",12\r\n\"E08000033\",\"Calderdale\",\"RCD\",8\r\n\"E08000033\",\"Calderdale\",\"RBV\",8\r\n\"E08000033\",\"Calderdale\",\"RXP\",7\r\n\"E08000033\",\"Calderdale\",\"RTD\",7\r\n\"E08000033\",\"Calderdale\",\"RJL\",6\r\n\"E08000033\",\"Calderdale\",\"RWA\",6\r\n\"E08000033\",\"Calderdale\",\"RTF\",6\r\n\"E08000033\",\"Calderdale\",\"RFF\",6\r\n\"E08000033\",\"Calderdale\",\"RWD\",6\r\n\"E08000033\",\"Calderdale\",\"RDZ\",6\r\n\"E08000033\",\"Calderdale\",\"RNL\",5\r\n\"E08000033\",\"Calderdale\",\"RDE\",5\r\n\"E08000033\",\"Calderdale\",\"RTR\",8\r\n\"E08000033\",\"Calderdale\",\"REM\",6\r\n\"E08000033\",\"Calderdale\",\"RTG\",5\r\n\"E08000033\",\"Calderdale\",\"RVW\",4\r\n\"E08000033\",\"Calderdale\",\"RDU\",4\r\n\"E08000033\",\"Calderdale\",\"RCU\",4\r\n\"E08000033\",\"Calderdale\",\"RQM\",4\r\n\"E08000033\",\"Calderdale\",\"RRK\",7\r\n\"E08000033\",\"Calderdale\",\"RBQ\",4\r\n\"E08000033\",\"Calderdale\",\"RGN\",3\r\n\"E08000033\",\"Calderdale\",\"RWJ\",3\r\n\"E08000033\",\"Calderdale\",\"RX3\",3\r\n\"E08000033\",\"Calderdale\",\"RA2\",3\r\n\"E08000033\",\"Calderdale\",\"RBN\",3\r\n\"E08000033\",\"Calderdale\",\"RNS\",3\r\n\"E08000033\",\"Calderdale\",\"RTH\",3\r\n\"E08000033\",\"Calderdale\",\"RW5\",3\r\n\"E08000033\",\"Calderdale\",\"RBT\",3\r\n\"E08000033\",\"Calderdale\",\"RP5\",4\r\n\"E08000033\",\"Calderdale\",\"RTE\",3\r\n\"E08000033\",\"Calderdale\",\"RJ1\",3\r\n\"E08000033\",\"Calderdale\",\"RJR\",3\r\n\"E08000033\",\"Calderdale\",\"RK5\",3\r\n\"E08000033\",\"Calderdale\",\"RVJ\",3\r\n\"E08000033\",\"Calderdale\",\"RX1\",3\r\n\"E08000033\",\"Calderdale\",\"RD1\",3\r\n\"E08000033\",\"Calderdale\",\"RFR\",3\r\n\"E08000033\",\"Calderdale\",\"RMP\",3\r\n\"E08000033\",\"Calderdale\",\"R1K\",2\r\n\"E08000033\",\"Calderdale\",\"RNZ\",2\r\n\"E08000033\",\"Calderdale\",\"RVR\",2\r\n\"E08000033\",\"Calderdale\",\"RC9\",2\r\n\"E08000033\",\"Calderdale\",\"REF\",2\r\n\"E08000033\",\"Calderdale\",\"RRV\",3\r\n\"E08000033\",\"Calderdale\",\"RA4\",2\r\n\"E08000033\",\"Calderdale\",\"RCX\",2\r\n\"E08000033\",\"Calderdale\",\"RH8\",2\r\n\"E08000033\",\"Calderdale\",\"RD3\",2\r\n\"E08000033\",\"Calderdale\",\"RKB\",2\r\n\"E08000033\",\"Calderdale\",\"RVV\",2\r\n\"E08000033\",\"Calderdale\",\"RWP\",2\r\n\"E08000033\",\"Calderdale\",\"RA9\",2\r\n\"E08000033\",\"Calderdale\",\"RAL\",2\r\n\"E08000033\",\"Calderdale\",\"RBZ\",2\r\n\"E08000033\",\"Calderdale\",\"RXC\",2\r\n\"E08000033\",\"Calderdale\",\"RYJ\",2\r\n\"E08000033\",\"Calderdale\",\"RET\",2\r\n\"E08000033\",\"Calderdale\",\"RA7\",2\r\n\"E08000033\",\"Calderdale\",\"RF4\",2\r\n\"E08000033\",\"Calderdale\",\"RNQ\",2\r\n\"E08000033\",\"Calderdale\",\"RLQ\",2\r\n\"E08000033\",\"Calderdale\",\"RMC\",2\r\n\"E08000033\",\"Calderdale\",\"RRF\",2\r\n\"E08000033\",\"Calderdale\",\"RVY\",2\r\n\"E08000033\",\"Calderdale\",\"RBD\",1\r\n\"E08000033\",\"Calderdale\",\"RGP\",1\r\n\"E08000033\",\"Calderdale\",\"RJE\",1\r\n\"E08000033\",\"Calderdale\",\"RQ8\",1\r\n\"E08000033\",\"Calderdale\",\"TAD\",1\r\n\"E08000033\",\"Calderdale\",\"RD8\",1\r\n\"E08000033\",\"Calderdale\",\"RGT\",1\r\n\"E08000033\",\"Calderdale\",\"RPY\",1\r\n\"E08000033\",\"Calderdale\",\"RRE\",1\r\n\"E08000033\",\"Calderdale\",\"RBL\",1\r\n\"E08000033\",\"Calderdale\",\"RGR\",1\r\n\"E08000033\",\"Calderdale\",\"RQ3\",1\r\n\"E08000033\",\"Calderdale\",\"RW4\",1\r\n\"E08000033\",\"Calderdale\",\"RWG\",1\r\n\"E08000033\",\"Calderdale\",\"RDD\",1\r\n\"E08000033\",\"Calderdale\",\"RL4\",1\r\n\"E08000033\",\"Calderdale\",\"RPA\",1\r\n\"E08000033\",\"Calderdale\",\"RWE\",1\r\n\"E08000033\",\"Calderdale\",\"RXK\",2\r\n\"E08000033\",\"Calderdale\",\"RXQ\",1\r\n\"E08000033\",\"Calderdale\",\"RA3\",1\r\n\"E08000033\",\"Calderdale\",\"RJ2\",1\r\n\"E08000033\",\"Calderdale\",\"RQX\",1\r\n\"E08000033\",\"Calderdale\",\"RRJ\",1\r\n\"E08000033\",\"Calderdale\",\"RJZ\",1\r\n\"E08000033\",\"Calderdale\",\"RK9\",1\r\n\"E08000033\",\"Calderdale\",\"RTP\",1\r\n\"E08000033\",\"Calderdale\",\"RWH\",1\r\n\"E08000033\",\"Calderdale\",\"RAS\",1\r\n\"E08000033\",\"Calderdale\",\"RBS\",1\r\n\"E08000033\",\"Calderdale\",\"RHU\",1\r\n\"E08000033\",\"Calderdale\",\"RKE\",1\r\n\"E08000033\",\"Calderdale\",\"RC1\",1\r\n\"E08000033\",\"Calderdale\",\"R0B\",2\r\n\"E08000033\",\"Calderdale\",\"RJN\",1\r\n\"E08000033\",\"Calderdale\",\"RT5\",1\r\n\"E08000033\",\"Calderdale\",\"RXM\",1\r\n\"E08000034\",\"Kirklees\",\"RWY\",24495\r\n\"E08000034\",\"Kirklees\",\"RXF\",18741\r\n\"E08000034\",\"Kirklees\",\"RR8\",2068\r\n\"E08000034\",\"Kirklees\",\"RAE\",1382\r\n\"E08000034\",\"Kirklees\",\"RFF\",1046\r\n\"E08000034\",\"Kirklees\",\"RXG\",567\r\n\"E08000034\",\"Kirklees\",\"RHQ\",146\r\n\"E08000034\",\"Kirklees\",\"RCB\",81\r\n\"E08000034\",\"Kirklees\",\"R0A\",71\r\n\"E08000034\",\"Kirklees\",\"RW6\",53\r\n\"E08000034\",\"Kirklees\",\"RWA\",34\r\n\"E08000034\",\"Kirklees\",\"RTD\",32\r\n\"E08000034\",\"Kirklees\",\"RCU\",30\r\n\"E08000034\",\"Kirklees\",\"RCD\",20\r\n\"E08000034\",\"Kirklees\",\"RCF\",20\r\n\"E08000034\",\"Kirklees\",\"RBV\",18\r\n\"E08000034\",\"Kirklees\",\"RM3\",16\r\n\"E08000034\",\"Kirklees\",\"RTX\",15\r\n\"E08000034\",\"Kirklees\",\"RMP\",15\r\n\"E08000034\",\"Kirklees\",\"RQM\",14\r\n\"E08000034\",\"Kirklees\",\"RJL\",14\r\n\"E08000034\",\"Kirklees\",\"RXL\",14\r\n\"E08000034\",\"Kirklees\",\"RP5\",14\r\n\"E08000034\",\"Kirklees\",\"RTR\",14\r\n\"E08000034\",\"Kirklees\",\"RTG\",17\r\n\"E08000034\",\"Kirklees\",\"RWJ\",12\r\n\"E08000034\",\"Kirklees\",\"RXR\",11\r\n\"E08000034\",\"Kirklees\",\"R1H\",11\r\n\"E08000034\",\"Kirklees\",\"R1K\",11\r\n\"E08000034\",\"Kirklees\",\"RTF\",10\r\n\"E08000034\",\"Kirklees\",\"RYJ\",9\r\n\"E08000034\",\"Kirklees\",\"RXN\",9\r\n\"E08000034\",\"Kirklees\",\"RRF\",8\r\n\"E08000034\",\"Kirklees\",\"RRK\",12\r\n\"E08000034\",\"Kirklees\",\"RWH\",8\r\n\"E08000034\",\"Kirklees\",\"REM\",10\r\n\"E08000034\",\"Kirklees\",\"RWE\",8\r\n\"E08000034\",\"Kirklees\",\"RVW\",7\r\n\"E08000034\",\"Kirklees\",\"RX1\",7\r\n\"E08000034\",\"Kirklees\",\"REF\",7\r\n\"E08000034\",\"Kirklees\",\"RTE\",6\r\n\"E08000034\",\"Kirklees\",\"RBT\",6\r\n\"E08000034\",\"Kirklees\",\"RHW\",6\r\n\"E08000034\",\"Kirklees\",\"RMC\",6\r\n\"E08000034\",\"Kirklees\",\"RHU\",6\r\n\"E08000034\",\"Kirklees\",\"RQX\",6\r\n\"E08000034\",\"Kirklees\",\"RWW\",6\r\n\"E08000034\",\"Kirklees\",\"RGP\",6\r\n\"E08000034\",\"Kirklees\",\"RBZ\",5\r\n\"E08000034\",\"Kirklees\",\"RDU\",5\r\n\"E08000034\",\"Kirklees\",\"RFS\",5\r\n\"E08000034\",\"Kirklees\",\"RKB\",5\r\n\"E08000034\",\"Kirklees\",\"RWD\",5\r\n\"E08000034\",\"Kirklees\",\"RLQ\",5\r\n\"E08000034\",\"Kirklees\",\"RNL\",5\r\n\"E08000034\",\"Kirklees\",\"RXP\",5\r\n\"E08000034\",\"Kirklees\",\"RGT\",4\r\n\"E08000034\",\"Kirklees\",\"TAD\",4\r\n\"E08000034\",\"Kirklees\",\"RJZ\",4\r\n\"E08000034\",\"Kirklees\",\"RH8\",4\r\n\"E08000034\",\"Kirklees\",\"RVV\",4\r\n\"E08000034\",\"Kirklees\",\"RFR\",4\r\n\"E08000034\",\"Kirklees\",\"RJE\",4\r\n\"E08000034\",\"Kirklees\",\"RJ1\",4\r\n\"E08000034\",\"Kirklees\",\"RXK\",7\r\n\"E08000034\",\"Kirklees\",\"RA9\",4\r\n\"E08000034\",\"Kirklees\",\"RBD\",3\r\n\"E08000034\",\"Kirklees\",\"RTH\",3\r\n\"E08000034\",\"Kirklees\",\"RWF\",3\r\n\"E08000034\",\"Kirklees\",\"RJR\",3\r\n\"E08000034\",\"Kirklees\",\"RK9\",3\r\n\"E08000034\",\"Kirklees\",\"RBK\",3\r\n\"E08000034\",\"Kirklees\",\"RBN\",3\r\n\"E08000034\",\"Kirklees\",\"RJ2\",4\r\n\"E08000034\",\"Kirklees\",\"RNA\",3\r\n\"E08000034\",\"Kirklees\",\"RN5\",3\r\n\"E08000034\",\"Kirklees\",\"RXQ\",3\r\n\"E08000034\",\"Kirklees\",\"RNQ\",3\r\n\"E08000034\",\"Kirklees\",\"RD8\",3\r\n\"E08000034\",\"Kirklees\",\"RHM\",3\r\n\"E08000034\",\"Kirklees\",\"RK5\",3\r\n\"E08000034\",\"Kirklees\",\"RXH\",3\r\n\"E08000034\",\"Kirklees\",\"RCX\",3\r\n\"E08000034\",\"Kirklees\",\"RJ7\",3\r\n\"E08000034\",\"Kirklees\",\"RM1\",3\r\n\"E08000034\",\"Kirklees\",\"RRV\",4\r\n\"E08000034\",\"Kirklees\",\"RAL\",2\r\n\"E08000034\",\"Kirklees\",\"RBQ\",2\r\n\"E08000034\",\"Kirklees\",\"RJC\",2\r\n\"E08000034\",\"Kirklees\",\"RF4\",2\r\n\"E08000034\",\"Kirklees\",\"RLT\",2\r\n\"E08000034\",\"Kirklees\",\"RXC\",2\r\n\"E08000034\",\"Kirklees\",\"RA7\",2\r\n\"E08000034\",\"Kirklees\",\"RDE\",2\r\n\"E08000034\",\"Kirklees\",\"RL4\",2\r\n\"E08000034\",\"Kirklees\",\"RYR\",2\r\n\"E08000034\",\"Kirklees\",\"RAS\",2\r\n\"E08000034\",\"Kirklees\",\"RD3\",2\r\n\"E08000034\",\"Kirklees\",\"RGN\",2\r\n\"E08000034\",\"Kirklees\",\"RQW\",2\r\n\"E08000034\",\"Kirklees\",\"RWG\",2\r\n\"E08000034\",\"Kirklees\",\"RA3\",2\r\n\"E08000034\",\"Kirklees\",\"RAX\",2\r\n\"E08000034\",\"Kirklees\",\"RBA\",2\r\n\"E08000034\",\"Kirklees\",\"RD1\",2\r\n\"E08000034\",\"Kirklees\",\"RGD\",2\r\n\"E08000034\",\"Kirklees\",\"R0B\",3\r\n\"E08000034\",\"Kirklees\",\"RTP\",2\r\n\"E08000034\",\"Kirklees\",\"RWP\",2\r\n\"E08000034\",\"Kirklees\",\"RXW\",3\r\n\"E08000034\",\"Kirklees\",\"RA2\",2\r\n\"E08000034\",\"Kirklees\",\"RBL\",2\r\n\"E08000034\",\"Kirklees\",\"RC9\",2\r\n\"E08000034\",\"Kirklees\",\"RR7\",2\r\n\"E08000034\",\"Kirklees\",\"RN7\",1\r\n\"E08000034\",\"Kirklees\",\"RT3\",1\r\n\"E08000034\",\"Kirklees\",\"RV9\",1\r\n\"E08000034\",\"Kirklees\",\"R1D\",1\r\n\"E08000034\",\"Kirklees\",\"RQ8\",1\r\n\"E08000034\",\"Kirklees\",\"RET\",1\r\n\"E08000034\",\"Kirklees\",\"RRJ\",1\r\n\"E08000034\",\"Kirklees\",\"RVY\",2\r\n\"E08000034\",\"Kirklees\",\"RX3\",1\r\n\"E08000034\",\"Kirklees\",\"R1F\",1\r\n\"E08000034\",\"Kirklees\",\"RJ6\",1\r\n\"E08000034\",\"Kirklees\",\"RJN\",1\r\n\"E08000034\",\"Kirklees\",\"RP6\",1\r\n\"E08000034\",\"Kirklees\",\"RQ3\",1\r\n\"E08000034\",\"Kirklees\",\"RWK\",1\r\n\"E08000034\",\"Kirklees\",\"RP4\",1\r\n\"E08000034\",\"Kirklees\",\"RVR\",1\r\n\"E08000034\",\"Kirklees\",\"RNZ\",1\r\n\"E08000034\",\"Kirklees\",\"RPA\",1\r\n\"E08000034\",\"Kirklees\",\"RC1\",1\r\n\"E08000034\",\"Kirklees\",\"RKE\",1\r\n\"E08000034\",\"Kirklees\",\"RXE\",1\r\n\"E08000035\",\"Leeds\",\"RR8\",65196\r\n\"E08000035\",\"Leeds\",\"RXF\",4539\r\n\"E08000035\",\"Leeds\",\"RCD\",2871\r\n\"E08000035\",\"Leeds\",\"RAE\",1174\r\n\"E08000035\",\"Leeds\",\"RGD\",850\r\n\"E08000035\",\"Leeds\",\"RCB\",415\r\n\"E08000035\",\"Leeds\",\"RCF\",192\r\n\"E08000035\",\"Leeds\",\"RWY\",96\r\n\"E08000035\",\"Leeds\",\"R0A\",72\r\n\"E08000035\",\"Leeds\",\"RWA\",55\r\n\"E08000035\",\"Leeds\",\"RHQ\",53\r\n\"E08000035\",\"Leeds\",\"RX3\",38\r\n\"E08000035\",\"Leeds\",\"RTR\",43\r\n\"E08000035\",\"Leeds\",\"RTD\",33\r\n\"E08000035\",\"Leeds\",\"RTX\",32\r\n\"E08000035\",\"Leeds\",\"RWD\",26\r\n\"E08000035\",\"Leeds\",\"RFF\",26\r\n\"E08000035\",\"Leeds\",\"R1H\",25\r\n\"E08000035\",\"Leeds\",\"RJL\",25\r\n\"E08000035\",\"Leeds\",\"RX1\",24\r\n\"E08000035\",\"Leeds\",\"RP5\",29\r\n\"E08000035\",\"Leeds\",\"RXL\",24\r\n\"E08000035\",\"Leeds\",\"RM3\",23\r\n\"E08000035\",\"Leeds\",\"RW6\",22\r\n\"E08000035\",\"Leeds\",\"RTF\",22\r\n\"E08000035\",\"Leeds\",\"RVW\",21\r\n\"E08000035\",\"Leeds\",\"REM\",24\r\n\"E08000035\",\"Leeds\",\"RXP\",20\r\n\"E08000035\",\"Leeds\",\"RFR\",17\r\n\"E08000035\",\"Leeds\",\"RRK\",26\r\n\"E08000035\",\"Leeds\",\"RXG\",16\r\n\"E08000035\",\"Leeds\",\"RKB\",16\r\n\"E08000035\",\"Leeds\",\"RRV\",17\r\n\"E08000035\",\"Leeds\",\"REF\",15\r\n\"E08000035\",\"Leeds\",\"RWE\",15\r\n\"E08000035\",\"Leeds\",\"RTG\",17\r\n\"E08000035\",\"Leeds\",\"RWJ\",14\r\n\"E08000035\",\"Leeds\",\"RTH\",14\r\n\"E08000035\",\"Leeds\",\"RWF\",13\r\n\"E08000035\",\"Leeds\",\"RWG\",13\r\n\"E08000035\",\"Leeds\",\"RJ1\",12\r\n\"E08000035\",\"Leeds\",\"RYJ\",12\r\n\"E08000035\",\"Leeds\",\"RDE\",12\r\n\"E08000035\",\"Leeds\",\"RGT\",12\r\n\"E08000035\",\"Leeds\",\"RXR\",13\r\n\"E08000035\",\"Leeds\",\"RGN\",11\r\n\"E08000035\",\"Leeds\",\"RNL\",11\r\n\"E08000035\",\"Leeds\",\"RHM\",11\r\n\"E08000035\",\"Leeds\",\"RFS\",11\r\n\"E08000035\",\"Leeds\",\"RK5\",10\r\n\"E08000035\",\"Leeds\",\"RA9\",10\r\n\"E08000035\",\"Leeds\",\"R1K\",10\r\n\"E08000035\",\"Leeds\",\"RWW\",10\r\n\"E08000035\",\"Leeds\",\"RD1\",10\r\n\"E08000035\",\"Leeds\",\"RD8\",9\r\n\"E08000035\",\"Leeds\",\"RQM\",9\r\n\"E08000035\",\"Leeds\",\"RXN\",9\r\n\"E08000035\",\"Leeds\",\"RTP\",8\r\n\"E08000035\",\"Leeds\",\"RBN\",8\r\n\"E08000035\",\"Leeds\",\"RJE\",8\r\n\"E08000035\",\"Leeds\",\"RDU\",8\r\n\"E08000035\",\"Leeds\",\"RM1\",8\r\n\"E08000035\",\"Leeds\",\"RTE\",8\r\n\"E08000035\",\"Leeds\",\"RNS\",8\r\n\"E08000035\",\"Leeds\",\"RWH\",8\r\n\"E08000035\",\"Leeds\",\"RA7\",7\r\n\"E08000035\",\"Leeds\",\"RAS\",7\r\n\"E08000035\",\"Leeds\",\"RXQ\",7\r\n\"E08000035\",\"Leeds\",\"RXC\",7\r\n\"E08000035\",\"Leeds\",\"RAL\",7\r\n\"E08000035\",\"Leeds\",\"RJC\",7\r\n\"E08000035\",\"Leeds\",\"TAD\",7\r\n\"E08000035\",\"Leeds\",\"RCU\",7\r\n\"E08000035\",\"Leeds\",\"RJ7\",7\r\n\"E08000035\",\"Leeds\",\"RXH\",7\r\n\"E08000035\",\"Leeds\",\"RBL\",7\r\n\"E08000035\",\"Leeds\",\"RC1\",6\r\n\"E08000035\",\"Leeds\",\"RD3\",6\r\n\"E08000035\",\"Leeds\",\"RQX\",6\r\n\"E08000035\",\"Leeds\",\"RBV\",6\r\n\"E08000035\",\"Leeds\",\"RVY\",6\r\n\"E08000035\",\"Leeds\",\"RMC\",5\r\n\"E08000035\",\"Leeds\",\"RRF\",5\r\n\"E08000035\",\"Leeds\",\"RJ2\",9\r\n\"E08000035\",\"Leeds\",\"RQW\",5\r\n\"E08000035\",\"Leeds\",\"RBA\",5\r\n\"E08000035\",\"Leeds\",\"RC9\",5\r\n\"E08000035\",\"Leeds\",\"RNQ\",5\r\n\"E08000035\",\"Leeds\",\"RVJ\",5\r\n\"E08000035\",\"Leeds\",\"R0B\",7\r\n\"E08000035\",\"Leeds\",\"RAX\",4\r\n\"E08000035\",\"Leeds\",\"RBZ\",4\r\n\"E08000035\",\"Leeds\",\"RCX\",4\r\n\"E08000035\",\"Leeds\",\"RYR\",4\r\n\"E08000035\",\"Leeds\",\"RF4\",4\r\n\"E08000035\",\"Leeds\",\"RXW\",8\r\n\"E08000035\",\"Leeds\",\"RJR\",4\r\n\"E08000035\",\"Leeds\",\"RWP\",4\r\n\"E08000035\",\"Leeds\",\"RXK\",5\r\n\"E08000035\",\"Leeds\",\"RA4\",4\r\n\"E08000035\",\"Leeds\",\"RMP\",4\r\n\"E08000035\",\"Leeds\",\"RVV\",4\r\n\"E08000035\",\"Leeds\",\"RBK\",4\r\n\"E08000035\",\"Leeds\",\"RDZ\",4\r\n\"E08000035\",\"Leeds\",\"NR5\",4\r\n\"E08000035\",\"Leeds\",\"RHU\",3\r\n\"E08000035\",\"Leeds\",\"RJZ\",3\r\n\"E08000035\",\"Leeds\",\"RN7\",3\r\n\"E08000035\",\"Leeds\",\"RNA\",3\r\n\"E08000035\",\"Leeds\",\"RGP\",3\r\n\"E08000035\",\"Leeds\",\"RR7\",3\r\n\"E08000035\",\"Leeds\",\"RJN\",3\r\n\"E08000035\",\"Leeds\",\"RL4\",3\r\n\"E08000035\",\"Leeds\",\"RNZ\",3\r\n\"E08000035\",\"Leeds\",\"RA2\",3\r\n\"E08000035\",\"Leeds\",\"RBT\",3\r\n\"E08000035\",\"Leeds\",\"RV9\",3\r\n\"E08000035\",\"Leeds\",\"RQ8\",3\r\n\"E08000035\",\"Leeds\",\"RBD\",2\r\n\"E08000035\",\"Leeds\",\"R1F\",2\r\n\"E08000035\",\"Leeds\",\"RLT\",2\r\n\"E08000035\",\"Leeds\",\"RN3\",2\r\n\"E08000035\",\"Leeds\",\"RVR\",2\r\n\"E08000035\",\"Leeds\",\"RXY\",2\r\n\"E08000035\",\"Leeds\",\"RA3\",2\r\n\"E08000035\",\"Leeds\",\"RXA\",2\r\n\"E08000035\",\"Leeds\",\"RAJ\",2\r\n\"E08000035\",\"Leeds\",\"RQ3\",2\r\n\"E08000035\",\"Leeds\",\"RTQ\",2\r\n\"E08000035\",\"Leeds\",\"RN5\",2\r\n\"E08000035\",\"Leeds\",\"RJ6\",2\r\n\"E08000035\",\"Leeds\",\"RKE\",2\r\n\"E08000035\",\"Leeds\",\"RLQ\",1\r\n\"E08000035\",\"Leeds\",\"RNU\",1\r\n\"E08000035\",\"Leeds\",\"RRJ\",1\r\n\"E08000035\",\"Leeds\",\"RAP\",1\r\n\"E08000035\",\"Leeds\",\"RH8\",1\r\n\"E08000035\",\"Leeds\",\"RK9\",1\r\n\"E08000035\",\"Leeds\",\"RPA\",1\r\n\"E08000035\",\"Leeds\",\"RY6\",1\r\n\"E08000035\",\"Leeds\",\"RP6\",1\r\n\"E08000035\",\"Leeds\",\"RW4\",1\r\n\"E08000035\",\"Leeds\",\"RXM\",1\r\n\"E08000035\",\"Leeds\",\"RBQ\",1\r\n\"E08000035\",\"Leeds\",\"RT3\",1\r\n\"E08000035\",\"Leeds\",\"RW5\",1\r\n\"E08000035\",\"Leeds\",\"RX4\",1\r\n\"E08000036\",\"Wakefield\",\"RXF\",36932\r\n\"E08000036\",\"Wakefield\",\"RR8\",1804\r\n\"E08000036\",\"Wakefield\",\"RFF\",662\r\n\"E08000036\",\"Wakefield\",\"RXG\",375\r\n\"E08000036\",\"Wakefield\",\"RP5\",273\r\n\"E08000036\",\"Wakefield\",\"RHQ\",140\r\n\"E08000036\",\"Wakefield\",\"RCB\",117\r\n\"E08000036\",\"Wakefield\",\"RAE\",57\r\n\"E08000036\",\"Wakefield\",\"RWA\",42\r\n\"E08000036\",\"Wakefield\",\"RWY\",40\r\n\"E08000036\",\"Wakefield\",\"RWD\",27\r\n\"E08000036\",\"Wakefield\",\"RCU\",25\r\n\"E08000036\",\"Wakefield\",\"RCD\",25\r\n\"E08000036\",\"Wakefield\",\"R0A\",21\r\n\"E08000036\",\"Wakefield\",\"RTD\",19\r\n\"E08000036\",\"Wakefield\",\"RXL\",17\r\n\"E08000036\",\"Wakefield\",\"RTX\",16\r\n\"E08000036\",\"Wakefield\",\"RJL\",15\r\n\"E08000036\",\"Wakefield\",\"RTR\",19\r\n\"E08000036\",\"Wakefield\",\"RCF\",13\r\n\"E08000036\",\"Wakefield\",\"REF\",10\r\n\"E08000036\",\"Wakefield\",\"RFR\",12\r\n\"E08000036\",\"Wakefield\",\"RTF\",9\r\n\"E08000036\",\"Wakefield\",\"RVW\",8\r\n\"E08000036\",\"Wakefield\",\"RKB\",8\r\n\"E08000036\",\"Wakefield\",\"RBV\",7\r\n\"E08000036\",\"Wakefield\",\"RRK\",8\r\n\"E08000036\",\"Wakefield\",\"RWF\",6\r\n\"E08000036\",\"Wakefield\",\"RTG\",9\r\n\"E08000036\",\"Wakefield\",\"RQM\",6\r\n\"E08000036\",\"Wakefield\",\"R1H\",6\r\n\"E08000036\",\"Wakefield\",\"RNL\",5\r\n\"E08000036\",\"Wakefield\",\"RXN\",5\r\n\"E08000036\",\"Wakefield\",\"RFS\",5\r\n\"E08000036\",\"Wakefield\",\"RGP\",5\r\n\"E08000036\",\"Wakefield\",\"RM3\",5\r\n\"E08000036\",\"Wakefield\",\"RVY\",6\r\n\"E08000036\",\"Wakefield\",\"RWW\",4\r\n\"E08000036\",\"Wakefield\",\"RA9\",4\r\n\"E08000036\",\"Wakefield\",\"RH8\",4\r\n\"E08000036\",\"Wakefield\",\"RW6\",4\r\n\"E08000036\",\"Wakefield\",\"RAL\",4\r\n\"E08000036\",\"Wakefield\",\"RM1\",4\r\n\"E08000036\",\"Wakefield\",\"RXR\",4\r\n\"E08000036\",\"Wakefield\",\"REM\",6\r\n\"E08000036\",\"Wakefield\",\"RTK\",3\r\n\"E08000036\",\"Wakefield\",\"RX1\",3\r\n\"E08000036\",\"Wakefield\",\"RX3\",3\r\n\"E08000036\",\"Wakefield\",\"RXE\",3\r\n\"E08000036\",\"Wakefield\",\"RBK\",3\r\n\"E08000036\",\"Wakefield\",\"RJ1\",3\r\n\"E08000036\",\"Wakefield\",\"R1K\",3\r\n\"E08000036\",\"Wakefield\",\"RK5\",3\r\n\"E08000036\",\"Wakefield\",\"RXP\",3\r\n\"E08000036\",\"Wakefield\",\"RWH\",3\r\n\"E08000036\",\"Wakefield\",\"RGD\",3\r\n\"E08000036\",\"Wakefield\",\"RHM\",3\r\n\"E08000036\",\"Wakefield\",\"RK9\",3\r\n\"E08000036\",\"Wakefield\",\"RQ3\",2\r\n\"E08000036\",\"Wakefield\",\"RWJ\",2\r\n\"E08000036\",\"Wakefield\",\"RJ7\",2\r\n\"E08000036\",\"Wakefield\",\"RMP\",2\r\n\"E08000036\",\"Wakefield\",\"RAX\",2\r\n\"E08000036\",\"Wakefield\",\"RBN\",2\r\n\"E08000036\",\"Wakefield\",\"RL4\",2\r\n\"E08000036\",\"Wakefield\",\"RNA\",2\r\n\"E08000036\",\"Wakefield\",\"RNS\",2\r\n\"E08000036\",\"Wakefield\",\"RTH\",2\r\n\"E08000036\",\"Wakefield\",\"RV9\",2\r\n\"E08000036\",\"Wakefield\",\"RVR\",2\r\n\"E08000036\",\"Wakefield\",\"RVV\",2\r\n\"E08000036\",\"Wakefield\",\"RA4\",2\r\n\"E08000036\",\"Wakefield\",\"RAS\",2\r\n\"E08000036\",\"Wakefield\",\"RC1\",2\r\n\"E08000036\",\"Wakefield\",\"R0B\",2\r\n\"E08000036\",\"Wakefield\",\"RRF\",2\r\n\"E08000036\",\"Wakefield\",\"RXQ\",2\r\n\"E08000036\",\"Wakefield\",\"RWE\",2\r\n\"E08000036\",\"Wakefield\",\"R1F\",2\r\n\"E08000036\",\"Wakefield\",\"RD3\",2\r\n\"E08000036\",\"Wakefield\",\"RDZ\",2\r\n\"E08000036\",\"Wakefield\",\"RRV\",2\r\n\"E08000036\",\"Wakefield\",\"RA3\",2\r\n\"E08000036\",\"Wakefield\",\"RBT\",2\r\n\"E08000036\",\"Wakefield\",\"RDD\",3\r\n\"E08000036\",\"Wakefield\",\"RDU\",2\r\n\"E08000036\",\"Wakefield\",\"RGT\",2\r\n\"E08000036\",\"Wakefield\",\"RN7\",2\r\n\"E08000036\",\"Wakefield\",\"RHW\",1\r\n\"E08000036\",\"Wakefield\",\"RJE\",1\r\n\"E08000036\",\"Wakefield\",\"RPY\",1\r\n\"E08000036\",\"Wakefield\",\"RWG\",1\r\n\"E08000036\",\"Wakefield\",\"NTX\",1\r\n\"E08000036\",\"Wakefield\",\"RAP\",1\r\n\"E08000036\",\"Wakefield\",\"RBL\",1\r\n\"E08000036\",\"Wakefield\",\"RPC\",1\r\n\"E08000036\",\"Wakefield\",\"RW4\",1\r\n\"E08000036\",\"Wakefield\",\"RXK\",2\r\n\"E08000036\",\"Wakefield\",\"RC9\",1\r\n\"E08000036\",\"Wakefield\",\"RF4\",1\r\n\"E08000036\",\"Wakefield\",\"RJ2\",1\r\n\"E08000036\",\"Wakefield\",\"RQX\",1\r\n\"E08000036\",\"Wakefield\",\"RX4\",1\r\n\"E08000036\",\"Wakefield\",\"RXH\",1\r\n\"E08000036\",\"Wakefield\",\"RCX\",1\r\n\"E08000036\",\"Wakefield\",\"RHU\",1\r\n\"E08000036\",\"Wakefield\",\"RTE\",1\r\n\"E08000036\",\"Wakefield\",\"RXW\",1\r\n\"E08000036\",\"Wakefield\",\"RJC\",1\r\n\"E08000036\",\"Wakefield\",\"RXT\",1\r\n\"E08000036\",\"Wakefield\",\"RBD\",1\r\n\"E08000036\",\"Wakefield\",\"RNU\",1\r\n\"E08000036\",\"Wakefield\",\"RD8\",1\r\n\"E08000036\",\"Wakefield\",\"RJR\",1\r\n\"E08000036\",\"Wakefield\",\"RJZ\",1\r\n\"E08000036\",\"Wakefield\",\"RNQ\",1\r\n\"E08000036\",\"Wakefield\",\"RXC\",1\r\n\"E08000036\",\"Wakefield\",\"RYJ\",1\r\n\"E08000037\",\"Gateshead\",\"RR7\",19313\r\n\"E08000037\",\"Gateshead\",\"RTD\",4402\r\n\"E08000037\",\"Gateshead\",\"R0B\",277\r\n\"E08000037\",\"Gateshead\",\"RX4\",183\r\n\"E08000037\",\"Gateshead\",\"RXP\",182\r\n\"E08000037\",\"Gateshead\",\"RTF\",168\r\n\"E08000037\",\"Gateshead\",\"RTR\",18\r\n\"E08000037\",\"Gateshead\",\"RVW\",14\r\n\"E08000037\",\"Gateshead\",\"R0A\",12\r\n\"E08000037\",\"Gateshead\",\"RX3\",10\r\n\"E08000037\",\"Gateshead\",\"RCB\",10\r\n\"E08000037\",\"Gateshead\",\"RNL\",8\r\n\"E08000037\",\"Gateshead\",\"RXL\",7\r\n\"E08000037\",\"Gateshead\",\"RM3\",7\r\n\"E08000037\",\"Gateshead\",\"RR8\",6\r\n\"E08000037\",\"Gateshead\",\"RVJ\",5\r\n\"E08000037\",\"Gateshead\",\"RAL\",5\r\n\"E08000037\",\"Gateshead\",\"RTG\",6\r\n\"E08000037\",\"Gateshead\",\"REM\",6\r\n\"E08000037\",\"Gateshead\",\"RHQ\",5\r\n\"E08000037\",\"Gateshead\",\"RXF\",4\r\n\"E08000037\",\"Gateshead\",\"RA9\",4\r\n\"E08000037\",\"Gateshead\",\"RWA\",4\r\n\"E08000037\",\"Gateshead\",\"RW6\",4\r\n\"E08000037\",\"Gateshead\",\"R1H\",3\r\n\"E08000037\",\"Gateshead\",\"RHM\",3\r\n\"E08000037\",\"Gateshead\",\"RTH\",3\r\n\"E08000037\",\"Gateshead\",\"RWD\",3\r\n\"E08000037\",\"Gateshead\",\"RWY\",3\r\n\"E08000037\",\"Gateshead\",\"RX1\",3\r\n\"E08000037\",\"Gateshead\",\"RRK\",3\r\n\"E08000037\",\"Gateshead\",\"RK5\",3\r\n\"E08000037\",\"Gateshead\",\"RYR\",3\r\n\"E08000037\",\"Gateshead\",\"RVV\",3\r\n\"E08000037\",\"Gateshead\",\"RA2\",3\r\n\"E08000037\",\"Gateshead\",\"RCD\",2\r\n\"E08000037\",\"Gateshead\",\"RCF\",2\r\n\"E08000037\",\"Gateshead\",\"RD3\",2\r\n\"E08000037\",\"Gateshead\",\"RQM\",2\r\n\"E08000037\",\"Gateshead\",\"RTK\",2\r\n\"E08000037\",\"Gateshead\",\"RRV\",2\r\n\"E08000037\",\"Gateshead\",\"RVY\",3\r\n\"E08000037\",\"Gateshead\",\"RQX\",2\r\n\"E08000037\",\"Gateshead\",\"RWG\",2\r\n\"E08000037\",\"Gateshead\",\"RFS\",2\r\n\"E08000037\",\"Gateshead\",\"RWH\",2\r\n\"E08000037\",\"Gateshead\",\"RAS\",2\r\n\"E08000037\",\"Gateshead\",\"RBN\",2\r\n\"E08000037\",\"Gateshead\",\"RC1\",2\r\n\"E08000037\",\"Gateshead\",\"RD8\",2\r\n\"E08000037\",\"Gateshead\",\"REF\",2\r\n\"E08000037\",\"Gateshead\",\"RKB\",2\r\n\"E08000037\",\"Gateshead\",\"RTX\",2\r\n\"E08000037\",\"Gateshead\",\"RJ1\",1\r\n\"E08000037\",\"Gateshead\",\"RNS\",1\r\n\"E08000037\",\"Gateshead\",\"RP5\",2\r\n\"E08000037\",\"Gateshead\",\"RA3\",1\r\n\"E08000037\",\"Gateshead\",\"RC9\",1\r\n\"E08000037\",\"Gateshead\",\"RKE\",1\r\n\"E08000037\",\"Gateshead\",\"RTP\",1\r\n\"E08000037\",\"Gateshead\",\"RWE\",1\r\n\"E08000037\",\"Gateshead\",\"RWJ\",1\r\n\"E08000037\",\"Gateshead\",\"RBQ\",1\r\n\"E08000037\",\"Gateshead\",\"RJZ\",1\r\n\"E08000037\",\"Gateshead\",\"RHU\",1\r\n\"E08000037\",\"Gateshead\",\"RN7\",1\r\n\"E08000037\",\"Gateshead\",\"RWW\",1\r\n\"E08000037\",\"Gateshead\",\"RAP\",1\r\n\"E08000037\",\"Gateshead\",\"RFF\",1\r\n\"E08000037\",\"Gateshead\",\"RLQ\",1\r\n\"E08000037\",\"Gateshead\",\"RVR\",1\r\n\"E08000037\",\"Gateshead\",\"RDE\",1\r\n\"E08000037\",\"Gateshead\",\"RTE\",1\r\n\"E08000037\",\"Gateshead\",\"RXH\",1\r\n\"E08000037\",\"Gateshead\",\"RWF\",1\r\n\"E08000037\",\"Gateshead\",\"RJ7\",1\r\n\"E08000037\",\"Gateshead\",\"RP6\",1\r\n\"E08000037\",\"Gateshead\",\"RRF\",1\r\n\"E08000037\",\"Gateshead\",\"RWP\",1\r\n\"E08000037\",\"Gateshead\",\"RXK\",1\r\n\"E08000037\",\"Gateshead\",\"RXQ\",1\r\n\"E09000001\",\"City of London\",\"R1H\",327\r\n\"E09000001\",\"City of London\",\"RRV\",241\r\n\"E09000001\",\"City of London\",\"RJ1\",54\r\n\"E09000001\",\"City of London\",\"RQX\",12\r\n\"E09000001\",\"City of London\",\"RWK\",10\r\n\"E09000001\",\"City of London\",\"RYJ\",9\r\n\"E09000001\",\"City of London\",\"RAL\",7\r\n\"E09000001\",\"City of London\",\"RP6\",3\r\n\"E09000001\",\"City of London\",\"RWP\",2\r\n\"E09000001\",\"City of London\",\"RQM\",2\r\n\"E09000001\",\"City of London\",\"RJZ\",1\r\n\"E09000001\",\"City of London\",\"RT3\",1\r\n\"E09000001\",\"City of London\",\"RWH\",1\r\n\"E09000001\",\"City of London\",\"RXH\",1\r\n\"E09000001\",\"City of London\",\"RP4\",1\r\n\"E09000001\",\"City of London\",\"RD8\",1\r\n\"E09000001\",\"City of London\",\"RDU\",1\r\n\"E09000001\",\"City of London\",\"RPY\",1\r\n\"E09000001\",\"City of London\",\"RA4\",1\r\n\"E09000001\",\"City of London\",\"REF\",1\r\n\"E09000001\",\"City of London\",\"RF4\",1\r\n\"E09000001\",\"City of London\",\"RBN\",1\r\n\"E09000001\",\"City of London\",\"RD1\",1\r\n\"E09000001\",\"City of London\",\"RTH\",1\r\n\"E09000001\",\"City of London\",\"R0A\",1\r\n\"E09000001\",\"City of London\",\"RHM\",1\r\n\"E09000001\",\"City of London\",\"RAE\",1\r\n\"E09000001\",\"City of London\",\"RKE\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RF4\",15124\r\n\"E09000002\",\"Barking and Dagenham\",\"R1H\",3225\r\n\"E09000002\",\"Barking and Dagenham\",\"RQX\",343\r\n\"E09000002\",\"Barking and Dagenham\",\"RQ8\",225\r\n\"E09000002\",\"Barking and Dagenham\",\"RAT\",160\r\n\"E09000002\",\"Barking and Dagenham\",\"RJ1\",140\r\n\"E09000002\",\"Barking and Dagenham\",\"RDD\",123\r\n\"E09000002\",\"Barking and Dagenham\",\"RRV\",106\r\n\"E09000002\",\"Barking and Dagenham\",\"RYJ\",60\r\n\"E09000002\",\"Barking and Dagenham\",\"RAL\",44\r\n\"E09000002\",\"Barking and Dagenham\",\"RAP\",39\r\n\"E09000002\",\"Barking and Dagenham\",\"RP6\",37\r\n\"E09000002\",\"Barking and Dagenham\",\"RJZ\",34\r\n\"E09000002\",\"Barking and Dagenham\",\"RQM\",34\r\n\"E09000002\",\"Barking and Dagenham\",\"RAJ\",31\r\n\"E09000002\",\"Barking and Dagenham\",\"RJ2\",47\r\n\"E09000002\",\"Barking and Dagenham\",\"RDE\",27\r\n\"E09000002\",\"Barking and Dagenham\",\"R1K\",23\r\n\"E09000002\",\"Barking and Dagenham\",\"RQW\",19\r\n\"E09000002\",\"Barking and Dagenham\",\"RJ7\",18\r\n\"E09000002\",\"Barking and Dagenham\",\"RP4\",17\r\n\"E09000002\",\"Barking and Dagenham\",\"RVV\",14\r\n\"E09000002\",\"Barking and Dagenham\",\"RKE\",12\r\n\"E09000002\",\"Barking and Dagenham\",\"RPA\",11\r\n\"E09000002\",\"Barking and Dagenham\",\"RJ6\",11\r\n\"E09000002\",\"Barking and Dagenham\",\"RWK\",11\r\n\"E09000002\",\"Barking and Dagenham\",\"RN7\",10\r\n\"E09000002\",\"Barking and Dagenham\",\"RC9\",9\r\n\"E09000002\",\"Barking and Dagenham\",\"RKB\",9\r\n\"E09000002\",\"Barking and Dagenham\",\"RYR\",8\r\n\"E09000002\",\"Barking and Dagenham\",\"RVR\",7\r\n\"E09000002\",\"Barking and Dagenham\",\"RWF\",7\r\n\"E09000002\",\"Barking and Dagenham\",\"RGP\",7\r\n\"E09000002\",\"Barking and Dagenham\",\"RTP\",7\r\n\"E09000002\",\"Barking and Dagenham\",\"RGT\",7\r\n\"E09000002\",\"Barking and Dagenham\",\"RWE\",6\r\n\"E09000002\",\"Barking and Dagenham\",\"RWH\",5\r\n\"E09000002\",\"Barking and Dagenham\",\"RDU\",5\r\n\"E09000002\",\"Barking and Dagenham\",\"RW6\",5\r\n\"E09000002\",\"Barking and Dagenham\",\"RA7\",4\r\n\"E09000002\",\"Barking and Dagenham\",\"RAX\",4\r\n\"E09000002\",\"Barking and Dagenham\",\"RWG\",4\r\n\"E09000002\",\"Barking and Dagenham\",\"RXQ\",4\r\n\"E09000002\",\"Barking and Dagenham\",\"RAS\",4\r\n\"E09000002\",\"Barking and Dagenham\",\"R0A\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RCX\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RWD\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RXC\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RXH\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RX1\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RTH\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"R1L\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RAN\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RBA\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RM1\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RTD\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RBD\",3\r\n\"E09000002\",\"Barking and Dagenham\",\"RMC\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"REM\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RHM\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RRK\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RTK\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RGR\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RH8\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RT3\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RJE\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RL4\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RR8\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RVJ\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RXL\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RA9\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"REF\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RN5\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RHW\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RJL\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RGM\",2\r\n\"E09000002\",\"Barking and Dagenham\",\"RA2\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RFR\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RQ3\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RTE\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RVY\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RWA\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RCF\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RHU\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RK9\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RV3\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RWP\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RWY\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RAE\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RXW\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RBZ\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RHQ\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RPY\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RWW\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RXK\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RA4\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RGN\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RQY\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RPC\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RXP\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RCB\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RD8\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RFF\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RMY\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RNU\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RC1\",1\r\n\"E09000002\",\"Barking and Dagenham\",\"RDZ\",1\r\n\"E09000003\",\"Barnet\",\"RAL\",26012\r\n\"E09000003\",\"Barnet\",\"R1K\",2055\r\n\"E09000003\",\"Barnet\",\"RRV\",1713\r\n\"E09000003\",\"Barnet\",\"RKE\",1349\r\n\"E09000003\",\"Barnet\",\"RYJ\",637\r\n\"E09000003\",\"Barnet\",\"RAP\",387\r\n\"E09000003\",\"Barnet\",\"R1H\",384\r\n\"E09000003\",\"Barnet\",\"RJ1\",168\r\n\"E09000003\",\"Barnet\",\"RQM\",100\r\n\"E09000003\",\"Barnet\",\"RWG\",94\r\n\"E09000003\",\"Barnet\",\"RP6\",94\r\n\"E09000003\",\"Barnet\",\"RWH\",72\r\n\"E09000003\",\"Barnet\",\"RWK\",49\r\n\"E09000003\",\"Barnet\",\"RQX\",46\r\n\"E09000003\",\"Barnet\",\"RP4\",39\r\n\"E09000003\",\"Barnet\",\"RPY\",39\r\n\"E09000003\",\"Barnet\",\"RT3\",36\r\n\"E09000003\",\"Barnet\",\"RJ7\",31\r\n\"E09000003\",\"Barnet\",\"RC9\",30\r\n\"E09000003\",\"Barnet\",\"RJZ\",27\r\n\"E09000003\",\"Barnet\",\"RDU\",23\r\n\"E09000003\",\"Barnet\",\"RQW\",23\r\n\"E09000003\",\"Barnet\",\"RTH\",21\r\n\"E09000003\",\"Barnet\",\"RAS\",20\r\n\"E09000003\",\"Barnet\",\"RD8\",19\r\n\"E09000003\",\"Barnet\",\"RXQ\",15\r\n\"E09000003\",\"Barnet\",\"RF4\",15\r\n\"E09000003\",\"Barnet\",\"RJ6\",15\r\n\"E09000003\",\"Barnet\",\"RAN\",14\r\n\"E09000003\",\"Barnet\",\"RDE\",14\r\n\"E09000003\",\"Barnet\",\"RGT\",13\r\n\"E09000003\",\"Barnet\",\"R0A\",12\r\n\"E09000003\",\"Barnet\",\"RWE\",12\r\n\"E09000003\",\"Barnet\",\"RJ2\",19\r\n\"E09000003\",\"Barnet\",\"RDZ\",11\r\n\"E09000003\",\"Barnet\",\"RQ8\",11\r\n\"E09000003\",\"Barnet\",\"REF\",10\r\n\"E09000003\",\"Barnet\",\"RWF\",10\r\n\"E09000003\",\"Barnet\",\"RVV\",9\r\n\"E09000003\",\"Barnet\",\"RX1\",9\r\n\"E09000003\",\"Barnet\",\"RHU\",9\r\n\"E09000003\",\"Barnet\",\"RV3\",9\r\n\"E09000003\",\"Barnet\",\"RA2\",8\r\n\"E09000003\",\"Barnet\",\"RDD\",8\r\n\"E09000003\",\"Barnet\",\"RAX\",8\r\n\"E09000003\",\"Barnet\",\"RD3\",8\r\n\"E09000003\",\"Barnet\",\"RN7\",8\r\n\"E09000003\",\"Barnet\",\"RGP\",8\r\n\"E09000003\",\"Barnet\",\"RTP\",8\r\n\"E09000003\",\"Barnet\",\"RN5\",7\r\n\"E09000003\",\"Barnet\",\"RNZ\",7\r\n\"E09000003\",\"Barnet\",\"RRK\",12\r\n\"E09000003\",\"Barnet\",\"RXH\",7\r\n\"E09000003\",\"Barnet\",\"RYR\",6\r\n\"E09000003\",\"Barnet\",\"RAJ\",6\r\n\"E09000003\",\"Barnet\",\"RW6\",6\r\n\"E09000003\",\"Barnet\",\"RXC\",6\r\n\"E09000003\",\"Barnet\",\"RD1\",6\r\n\"E09000003\",\"Barnet\",\"RHW\",6\r\n\"E09000003\",\"Barnet\",\"RN3\",6\r\n\"E09000003\",\"Barnet\",\"RTK\",5\r\n\"E09000003\",\"Barnet\",\"RC1\",5\r\n\"E09000003\",\"Barnet\",\"RHM\",5\r\n\"E09000003\",\"Barnet\",\"RWR\",5\r\n\"E09000003\",\"Barnet\",\"RM1\",5\r\n\"E09000003\",\"Barnet\",\"RVJ\",5\r\n\"E09000003\",\"Barnet\",\"RBD\",5\r\n\"E09000003\",\"Barnet\",\"RTE\",5\r\n\"E09000003\",\"Barnet\",\"RTG\",6\r\n\"E09000003\",\"Barnet\",\"RGR\",4\r\n\"E09000003\",\"Barnet\",\"RXN\",4\r\n\"E09000003\",\"Barnet\",\"RJE\",4\r\n\"E09000003\",\"Barnet\",\"RNS\",4\r\n\"E09000003\",\"Barnet\",\"RCX\",4\r\n\"E09000003\",\"Barnet\",\"RVR\",4\r\n\"E09000003\",\"Barnet\",\"RBA\",4\r\n\"E09000003\",\"Barnet\",\"RPA\",4\r\n\"E09000003\",\"Barnet\",\"RJR\",4\r\n\"E09000003\",\"Barnet\",\"RKB\",4\r\n\"E09000003\",\"Barnet\",\"RNQ\",4\r\n\"E09000003\",\"Barnet\",\"RBT\",4\r\n\"E09000003\",\"Barnet\",\"R1F\",3\r\n\"E09000003\",\"Barnet\",\"REM\",4\r\n\"E09000003\",\"Barnet\",\"RAE\",3\r\n\"E09000003\",\"Barnet\",\"RK9\",3\r\n\"E09000003\",\"Barnet\",\"RXK\",5\r\n\"E09000003\",\"Barnet\",\"RWP\",3\r\n\"E09000003\",\"Barnet\",\"RBS\",3\r\n\"E09000003\",\"Barnet\",\"RNL\",3\r\n\"E09000003\",\"Barnet\",\"RJL\",2\r\n\"E09000003\",\"Barnet\",\"RVW\",2\r\n\"E09000003\",\"Barnet\",\"RWD\",2\r\n\"E09000003\",\"Barnet\",\"RGM\",2\r\n\"E09000003\",\"Barnet\",\"R0B\",2\r\n\"E09000003\",\"Barnet\",\"RM3\",2\r\n\"E09000003\",\"Barnet\",\"RTD\",2\r\n\"E09000003\",\"Barnet\",\"RXP\",2\r\n\"E09000003\",\"Barnet\",\"RA9\",2\r\n\"E09000003\",\"Barnet\",\"RJC\",2\r\n\"E09000003\",\"Barnet\",\"RVY\",2\r\n\"E09000003\",\"Barnet\",\"RXW\",2\r\n\"E09000003\",\"Barnet\",\"RA7\",2\r\n\"E09000003\",\"Barnet\",\"RPC\",2\r\n\"E09000003\",\"Barnet\",\"RH8\",1\r\n\"E09000003\",\"Barnet\",\"RTQ\",1\r\n\"E09000003\",\"Barnet\",\"RV5\",1\r\n\"E09000003\",\"Barnet\",\"RBN\",1\r\n\"E09000003\",\"Barnet\",\"RBZ\",1\r\n\"E09000003\",\"Barnet\",\"RCB\",1\r\n\"E09000003\",\"Barnet\",\"RR7\",1\r\n\"E09000003\",\"Barnet\",\"RCD\",1\r\n\"E09000003\",\"Barnet\",\"RFF\",1\r\n\"E09000003\",\"Barnet\",\"RJN\",1\r\n\"E09000003\",\"Barnet\",\"RLT\",1\r\n\"E09000003\",\"Barnet\",\"RMC\",1\r\n\"E09000003\",\"Barnet\",\"RP5\",1\r\n\"E09000003\",\"Barnet\",\"RR8\",1\r\n\"E09000003\",\"Barnet\",\"RWY\",1\r\n\"E09000003\",\"Barnet\",\"RYG\",1\r\n\"E09000003\",\"Barnet\",\"RMP\",1\r\n\"E09000003\",\"Barnet\",\"RWA\",1\r\n\"E09000003\",\"Barnet\",\"RX4\",1\r\n\"E09000003\",\"Barnet\",\"RA3\",1\r\n\"E09000003\",\"Barnet\",\"RAT\",1\r\n\"E09000003\",\"Barnet\",\"RGN\",1\r\n\"E09000003\",\"Barnet\",\"RRF\",1\r\n\"E09000003\",\"Barnet\",\"RWJ\",1\r\n\"E09000003\",\"Barnet\",\"RXF\",1\r\n\"E09000003\",\"Barnet\",\"RHQ\",1\r\n\"E09000003\",\"Barnet\",\"RK5\",1\r\n\"E09000003\",\"Barnet\",\"RLQ\",1\r\n\"E09000003\",\"Barnet\",\"RA4\",1\r\n\"E09000003\",\"Barnet\",\"RBK\",1\r\n\"E09000003\",\"Barnet\",\"RTX\",1\r\n\"E09000004\",\"Bexley\",\"RJ2\",14101\r\n\"E09000004\",\"Bexley\",\"RN7\",7118\r\n\"E09000004\",\"Bexley\",\"RJZ\",3098\r\n\"E09000004\",\"Bexley\",\"RJ1\",1170\r\n\"E09000004\",\"Bexley\",\"RPG\",314\r\n\"E09000004\",\"Bexley\",\"R1H\",157\r\n\"E09000004\",\"Bexley\",\"RPC\",113\r\n\"E09000004\",\"Bexley\",\"RPA\",105\r\n\"E09000004\",\"Bexley\",\"RQX\",74\r\n\"E09000004\",\"Bexley\",\"RRV\",71\r\n\"E09000004\",\"Bexley\",\"RVV\",49\r\n\"E09000004\",\"Bexley\",\"RWF\",46\r\n\"E09000004\",\"Bexley\",\"RJ7\",44\r\n\"E09000004\",\"Bexley\",\"RQM\",28\r\n\"E09000004\",\"Bexley\",\"RP6\",26\r\n\"E09000004\",\"Bexley\",\"RYJ\",25\r\n\"E09000004\",\"Bexley\",\"RXC\",24\r\n\"E09000004\",\"Bexley\",\"RJ6\",18\r\n\"E09000004\",\"Bexley\",\"RDD\",17\r\n\"E09000004\",\"Bexley\",\"RF4\",16\r\n\"E09000004\",\"Bexley\",\"RAL\",16\r\n\"E09000004\",\"Bexley\",\"RT3\",13\r\n\"E09000004\",\"Bexley\",\"RTP\",13\r\n\"E09000004\",\"Bexley\",\"RQW\",12\r\n\"E09000004\",\"Bexley\",\"RVR\",12\r\n\"E09000004\",\"Bexley\",\"RHM\",11\r\n\"E09000004\",\"Bexley\",\"R1K\",11\r\n\"E09000004\",\"Bexley\",\"RDU\",11\r\n\"E09000004\",\"Bexley\",\"RWK\",11\r\n\"E09000004\",\"Bexley\",\"RYR\",10\r\n\"E09000004\",\"Bexley\",\"RKE\",9\r\n\"E09000004\",\"Bexley\",\"RXH\",9\r\n\"E09000004\",\"Bexley\",\"RAP\",9\r\n\"E09000004\",\"Bexley\",\"RAJ\",8\r\n\"E09000004\",\"Bexley\",\"REF\",8\r\n\"E09000004\",\"Bexley\",\"RGP\",8\r\n\"E09000004\",\"Bexley\",\"RQ8\",8\r\n\"E09000004\",\"Bexley\",\"RWE\",8\r\n\"E09000004\",\"Bexley\",\"RXY\",8\r\n\"E09000004\",\"Bexley\",\"RDZ\",7\r\n\"E09000004\",\"Bexley\",\"RWH\",7\r\n\"E09000004\",\"Bexley\",\"RGT\",7\r\n\"E09000004\",\"Bexley\",\"RA9\",6\r\n\"E09000004\",\"Bexley\",\"RL4\",6\r\n\"E09000004\",\"Bexley\",\"RX1\",6\r\n\"E09000004\",\"Bexley\",\"RAS\",5\r\n\"E09000004\",\"Bexley\",\"RAX\",5\r\n\"E09000004\",\"Bexley\",\"RDE\",5\r\n\"E09000004\",\"Bexley\",\"RTE\",5\r\n\"E09000004\",\"Bexley\",\"RPY\",5\r\n\"E09000004\",\"Bexley\",\"RTH\",5\r\n\"E09000004\",\"Bexley\",\"RGR\",4\r\n\"E09000004\",\"Bexley\",\"RK9\",4\r\n\"E09000004\",\"Bexley\",\"RVJ\",4\r\n\"E09000004\",\"Bexley\",\"RWG\",4\r\n\"E09000004\",\"Bexley\",\"RNL\",4\r\n\"E09000004\",\"Bexley\",\"RCB\",4\r\n\"E09000004\",\"Bexley\",\"RHW\",3\r\n\"E09000004\",\"Bexley\",\"RN5\",3\r\n\"E09000004\",\"Bexley\",\"RGN\",3\r\n\"E09000004\",\"Bexley\",\"RH8\",3\r\n\"E09000004\",\"Bexley\",\"RM1\",3\r\n\"E09000004\",\"Bexley\",\"RXQ\",3\r\n\"E09000004\",\"Bexley\",\"RCX\",3\r\n\"E09000004\",\"Bexley\",\"R1F\",3\r\n\"E09000004\",\"Bexley\",\"RLQ\",3\r\n\"E09000004\",\"Bexley\",\"RD3\",3\r\n\"E09000004\",\"Bexley\",\"RC1\",2\r\n\"E09000004\",\"Bexley\",\"RKB\",2\r\n\"E09000004\",\"Bexley\",\"RNZ\",2\r\n\"E09000004\",\"Bexley\",\"RRK\",4\r\n\"E09000004\",\"Bexley\",\"REM\",2\r\n\"E09000004\",\"Bexley\",\"RTR\",2\r\n\"E09000004\",\"Bexley\",\"RHU\",2\r\n\"E09000004\",\"Bexley\",\"RVW\",2\r\n\"E09000004\",\"Bexley\",\"RBK\",2\r\n\"E09000004\",\"Bexley\",\"RJE\",2\r\n\"E09000004\",\"Bexley\",\"RBA\",2\r\n\"E09000004\",\"Bexley\",\"RBD\",2\r\n\"E09000004\",\"Bexley\",\"RXK\",3\r\n\"E09000004\",\"Bexley\",\"RXP\",2\r\n\"E09000004\",\"Bexley\",\"RAN\",2\r\n\"E09000004\",\"Bexley\",\"RBZ\",2\r\n\"E09000004\",\"Bexley\",\"RNQ\",2\r\n\"E09000004\",\"Bexley\",\"RN3\",2\r\n\"E09000004\",\"Bexley\",\"RTF\",2\r\n\"E09000004\",\"Bexley\",\"RV5\",2\r\n\"E09000004\",\"Bexley\",\"NDA\",1\r\n\"E09000004\",\"Bexley\",\"RM3\",1\r\n\"E09000004\",\"Bexley\",\"RP4\",1\r\n\"E09000004\",\"Bexley\",\"RR7\",1\r\n\"E09000004\",\"Bexley\",\"R1L\",1\r\n\"E09000004\",\"Bexley\",\"RA4\",1\r\n\"E09000004\",\"Bexley\",\"RC9\",1\r\n\"E09000004\",\"Bexley\",\"RD1\",1\r\n\"E09000004\",\"Bexley\",\"RTK\",1\r\n\"E09000004\",\"Bexley\",\"RHQ\",1\r\n\"E09000004\",\"Bexley\",\"RWP\",1\r\n\"E09000004\",\"Bexley\",\"RXF\",1\r\n\"E09000004\",\"Bexley\",\"RXN\",1\r\n\"E09000004\",\"Bexley\",\"RBN\",1\r\n\"E09000004\",\"Bexley\",\"RD8\",1\r\n\"E09000004\",\"Bexley\",\"RTX\",1\r\n\"E09000004\",\"Bexley\",\"RCF\",1\r\n\"E09000004\",\"Bexley\",\"RR8\",1\r\n\"E09000004\",\"Bexley\",\"RWD\",1\r\n\"E09000004\",\"Bexley\",\"R0A\",1\r\n\"E09000004\",\"Bexley\",\"RGM\",1\r\n\"E09000004\",\"Bexley\",\"RW1\",1\r\n\"E09000004\",\"Bexley\",\"RYG\",1\r\n\"E09000004\",\"Bexley\",\"RA2\",1\r\n\"E09000004\",\"Bexley\",\"RA7\",1\r\n\"E09000004\",\"Bexley\",\"RJC\",1\r\n\"E09000004\",\"Bexley\",\"RQ3\",1\r\n\"E09000004\",\"Bexley\",\"RQY\",1\r\n\"E09000005\",\"Brent\",\"R1K\",21139\r\n\"E09000005\",\"Brent\",\"RYJ\",7351\r\n\"E09000005\",\"Brent\",\"RAL\",3258\r\n\"E09000005\",\"Brent\",\"RRV\",646\r\n\"E09000005\",\"Brent\",\"RQM\",417\r\n\"E09000005\",\"Brent\",\"RV3\",415\r\n\"E09000005\",\"Brent\",\"RJ1\",220\r\n\"E09000005\",\"Brent\",\"R1H\",166\r\n\"E09000005\",\"Brent\",\"RT3\",86\r\n\"E09000005\",\"Brent\",\"RKE\",74\r\n\"E09000005\",\"Brent\",\"RWG\",70\r\n\"E09000005\",\"Brent\",\"RAS\",65\r\n\"E09000005\",\"Brent\",\"RJ7\",61\r\n\"E09000005\",\"Brent\",\"RWH\",54\r\n\"E09000005\",\"Brent\",\"RJZ\",39\r\n\"E09000005\",\"Brent\",\"RAP\",37\r\n\"E09000005\",\"Brent\",\"RP6\",36\r\n\"E09000005\",\"Brent\",\"RC9\",35\r\n\"E09000005\",\"Brent\",\"RDU\",30\r\n\"E09000005\",\"Brent\",\"RQX\",28\r\n\"E09000005\",\"Brent\",\"RAX\",20\r\n\"E09000005\",\"Brent\",\"RP4\",19\r\n\"E09000005\",\"Brent\",\"RWE\",17\r\n\"E09000005\",\"Brent\",\"RF4\",16\r\n\"E09000005\",\"Brent\",\"RRK\",21\r\n\"E09000005\",\"Brent\",\"RPY\",15\r\n\"E09000005\",\"Brent\",\"RXQ\",12\r\n\"E09000005\",\"Brent\",\"RJ2\",19\r\n\"E09000005\",\"Brent\",\"RTP\",11\r\n\"E09000005\",\"Brent\",\"RNS\",11\r\n\"E09000005\",\"Brent\",\"RVR\",11\r\n\"E09000005\",\"Brent\",\"RHW\",10\r\n\"E09000005\",\"Brent\",\"R0A\",10\r\n\"E09000005\",\"Brent\",\"RTH\",10\r\n\"E09000005\",\"Brent\",\"RWK\",9\r\n\"E09000005\",\"Brent\",\"RDE\",9\r\n\"E09000005\",\"Brent\",\"RTK\",9\r\n\"E09000005\",\"Brent\",\"RW6\",8\r\n\"E09000005\",\"Brent\",\"RH8\",7\r\n\"E09000005\",\"Brent\",\"RHM\",7\r\n\"E09000005\",\"Brent\",\"RAE\",6\r\n\"E09000005\",\"Brent\",\"RPA\",6\r\n\"E09000005\",\"Brent\",\"RA7\",6\r\n\"E09000005\",\"Brent\",\"RMC\",6\r\n\"E09000005\",\"Brent\",\"RDZ\",6\r\n\"E09000005\",\"Brent\",\"RKB\",6\r\n\"E09000005\",\"Brent\",\"RAN\",6\r\n\"E09000005\",\"Brent\",\"RXH\",6\r\n\"E09000005\",\"Brent\",\"RQW\",5\r\n\"E09000005\",\"Brent\",\"RXC\",5\r\n\"E09000005\",\"Brent\",\"RD8\",5\r\n\"E09000005\",\"Brent\",\"RJ6\",5\r\n\"E09000005\",\"Brent\",\"RVV\",5\r\n\"E09000005\",\"Brent\",\"RD1\",5\r\n\"E09000005\",\"Brent\",\"RM1\",5\r\n\"E09000005\",\"Brent\",\"RYR\",5\r\n\"E09000005\",\"Brent\",\"RGT\",4\r\n\"E09000005\",\"Brent\",\"RNZ\",4\r\n\"E09000005\",\"Brent\",\"RN3\",4\r\n\"E09000005\",\"Brent\",\"RR8\",4\r\n\"E09000005\",\"Brent\",\"RVJ\",4\r\n\"E09000005\",\"Brent\",\"RGN\",4\r\n\"E09000005\",\"Brent\",\"RN5\",4\r\n\"E09000005\",\"Brent\",\"RGP\",3\r\n\"E09000005\",\"Brent\",\"RQ8\",3\r\n\"E09000005\",\"Brent\",\"RWF\",3\r\n\"E09000005\",\"Brent\",\"RGR\",3\r\n\"E09000005\",\"Brent\",\"REM\",5\r\n\"E09000005\",\"Brent\",\"RA2\",3\r\n\"E09000005\",\"Brent\",\"RBK\",3\r\n\"E09000005\",\"Brent\",\"RXK\",4\r\n\"E09000005\",\"Brent\",\"RBD\",3\r\n\"E09000005\",\"Brent\",\"RTE\",3\r\n\"E09000005\",\"Brent\",\"RX1\",3\r\n\"E09000005\",\"Brent\",\"RNQ\",3\r\n\"E09000005\",\"Brent\",\"RQ3\",3\r\n\"E09000005\",\"Brent\",\"RK9\",3\r\n\"E09000005\",\"Brent\",\"RCF\",2\r\n\"E09000005\",\"Brent\",\"RDD\",2\r\n\"E09000005\",\"Brent\",\"RC1\",2\r\n\"E09000005\",\"Brent\",\"RD3\",2\r\n\"E09000005\",\"Brent\",\"RXL\",2\r\n\"E09000005\",\"Brent\",\"RXW\",2\r\n\"E09000005\",\"Brent\",\"RBL\",2\r\n\"E09000005\",\"Brent\",\"REF\",2\r\n\"E09000005\",\"Brent\",\"RWP\",2\r\n\"E09000005\",\"Brent\",\"RAT\",2\r\n\"E09000005\",\"Brent\",\"RJE\",2\r\n\"E09000005\",\"Brent\",\"RTD\",2\r\n\"E09000005\",\"Brent\",\"RTG\",2\r\n\"E09000005\",\"Brent\",\"RWA\",2\r\n\"E09000005\",\"Brent\",\"RXF\",2\r\n\"E09000005\",\"Brent\",\"RA9\",1\r\n\"E09000005\",\"Brent\",\"RBS\",1\r\n\"E09000005\",\"Brent\",\"RCX\",1\r\n\"E09000005\",\"Brent\",\"RLQ\",1\r\n\"E09000005\",\"Brent\",\"RLT\",1\r\n\"E09000005\",\"Brent\",\"RJR\",1\r\n\"E09000005\",\"Brent\",\"R0B\",1\r\n\"E09000005\",\"Brent\",\"RPG\",1\r\n\"E09000005\",\"Brent\",\"RR7\",1\r\n\"E09000005\",\"Brent\",\"RHQ\",1\r\n\"E09000005\",\"Brent\",\"RMY\",1\r\n\"E09000005\",\"Brent\",\"R1L\",1\r\n\"E09000005\",\"Brent\",\"RBT\",1\r\n\"E09000005\",\"Brent\",\"REP\",1\r\n\"E09000005\",\"Brent\",\"RNU\",1\r\n\"E09000005\",\"Brent\",\"RBZ\",1\r\n\"E09000005\",\"Brent\",\"RCB\",1\r\n\"E09000005\",\"Brent\",\"RW1\",1\r\n\"E09000005\",\"Brent\",\"RWD\",1\r\n\"E09000005\",\"Brent\",\"RXR\",1\r\n\"E09000005\",\"Brent\",\"RAJ\",1\r\n\"E09000005\",\"Brent\",\"RBN\",1\r\n\"E09000005\",\"Brent\",\"RCD\",1\r\n\"E09000005\",\"Brent\",\"RJC\",1\r\n\"E09000005\",\"Brent\",\"RWJ\",1\r\n\"E09000005\",\"Brent\",\"R1F\",1\r\n\"E09000005\",\"Brent\",\"RP5\",1\r\n\"E09000006\",\"Bromley\",\"RJZ\",21691\r\n\"E09000006\",\"Bromley\",\"RJ2\",2268\r\n\"E09000006\",\"Bromley\",\"RJ1\",1118\r\n\"E09000006\",\"Bromley\",\"RJ6\",660\r\n\"E09000006\",\"Bromley\",\"RPG\",449\r\n\"E09000006\",\"Bromley\",\"RPC\",223\r\n\"E09000006\",\"Bromley\",\"RJ7\",201\r\n\"E09000006\",\"Bromley\",\"RN7\",136\r\n\"E09000006\",\"Bromley\",\"RWF\",135\r\n\"E09000006\",\"Bromley\",\"R1H\",107\r\n\"E09000006\",\"Bromley\",\"RRV\",110\r\n\"E09000006\",\"Bromley\",\"RVR\",48\r\n\"E09000006\",\"Bromley\",\"RXC\",41\r\n\"E09000006\",\"Bromley\",\"RQM\",40\r\n\"E09000006\",\"Bromley\",\"RYJ\",37\r\n\"E09000006\",\"Bromley\",\"RP6\",35\r\n\"E09000006\",\"Bromley\",\"RVV\",32\r\n\"E09000006\",\"Bromley\",\"RTP\",29\r\n\"E09000006\",\"Bromley\",\"RPA\",28\r\n\"E09000006\",\"Bromley\",\"RXH\",23\r\n\"E09000006\",\"Bromley\",\"RDD\",22\r\n\"E09000006\",\"Bromley\",\"R1K\",21\r\n\"E09000006\",\"Bromley\",\"RAL\",16\r\n\"E09000006\",\"Bromley\",\"RAX\",16\r\n\"E09000006\",\"Bromley\",\"RF4\",16\r\n\"E09000006\",\"Bromley\",\"RT3\",15\r\n\"E09000006\",\"Bromley\",\"RV5\",15\r\n\"E09000006\",\"Bromley\",\"RDU\",14\r\n\"E09000006\",\"Bromley\",\"RYR\",13\r\n\"E09000006\",\"Bromley\",\"RQX\",12\r\n\"E09000006\",\"Bromley\",\"REF\",12\r\n\"E09000006\",\"Bromley\",\"RPY\",12\r\n\"E09000006\",\"Bromley\",\"RHW\",11\r\n\"E09000006\",\"Bromley\",\"RM1\",11\r\n\"E09000006\",\"Bromley\",\"RWE\",10\r\n\"E09000006\",\"Bromley\",\"RN5\",10\r\n\"E09000006\",\"Bromley\",\"RDE\",9\r\n\"E09000006\",\"Bromley\",\"RKE\",9\r\n\"E09000006\",\"Bromley\",\"RA9\",9\r\n\"E09000006\",\"Bromley\",\"RA2\",8\r\n\"E09000006\",\"Bromley\",\"R1F\",7\r\n\"E09000006\",\"Bromley\",\"RBZ\",7\r\n\"E09000006\",\"Bromley\",\"RK9\",7\r\n\"E09000006\",\"Bromley\",\"RWK\",7\r\n\"E09000006\",\"Bromley\",\"RD1\",6\r\n\"E09000006\",\"Bromley\",\"RM3\",6\r\n\"E09000006\",\"Bromley\",\"RQW\",6\r\n\"E09000006\",\"Bromley\",\"RAP\",6\r\n\"E09000006\",\"Bromley\",\"RQY\",6\r\n\"E09000006\",\"Bromley\",\"RRK\",9\r\n\"E09000006\",\"Bromley\",\"RKB\",6\r\n\"E09000006\",\"Bromley\",\"RDZ\",5\r\n\"E09000006\",\"Bromley\",\"RGT\",5\r\n\"E09000006\",\"Bromley\",\"RBA\",5\r\n\"E09000006\",\"Bromley\",\"RGN\",5\r\n\"E09000006\",\"Bromley\",\"RAS\",5\r\n\"E09000006\",\"Bromley\",\"RGR\",5\r\n\"E09000006\",\"Bromley\",\"RHU\",5\r\n\"E09000006\",\"Bromley\",\"RC9\",5\r\n\"E09000006\",\"Bromley\",\"RA7\",5\r\n\"E09000006\",\"Bromley\",\"RTH\",5\r\n\"E09000006\",\"Bromley\",\"RXQ\",5\r\n\"E09000006\",\"Bromley\",\"RCB\",4\r\n\"E09000006\",\"Bromley\",\"RQ8\",4\r\n\"E09000006\",\"Bromley\",\"RX1\",4\r\n\"E09000006\",\"Bromley\",\"RHM\",4\r\n\"E09000006\",\"Bromley\",\"RVJ\",4\r\n\"E09000006\",\"Bromley\",\"RNQ\",4\r\n\"E09000006\",\"Bromley\",\"RBD\",4\r\n\"E09000006\",\"Bromley\",\"RR8\",4\r\n\"E09000006\",\"Bromley\",\"RFS\",3\r\n\"E09000006\",\"Bromley\",\"RXK\",4\r\n\"E09000006\",\"Bromley\",\"RAJ\",3\r\n\"E09000006\",\"Bromley\",\"RC1\",3\r\n\"E09000006\",\"Bromley\",\"RD3\",3\r\n\"E09000006\",\"Bromley\",\"R0A\",3\r\n\"E09000006\",\"Bromley\",\"REM\",4\r\n\"E09000006\",\"Bromley\",\"RH8\",3\r\n\"E09000006\",\"Bromley\",\"RTK\",3\r\n\"E09000006\",\"Bromley\",\"RWP\",3\r\n\"E09000006\",\"Bromley\",\"RTE\",3\r\n\"E09000006\",\"Bromley\",\"RP4\",3\r\n\"E09000006\",\"Bromley\",\"RJE\",3\r\n\"E09000006\",\"Bromley\",\"RWH\",3\r\n\"E09000006\",\"Bromley\",\"RBK\",2\r\n\"E09000006\",\"Bromley\",\"RGP\",2\r\n\"E09000006\",\"Bromley\",\"RBL\",2\r\n\"E09000006\",\"Bromley\",\"RXR\",2\r\n\"E09000006\",\"Bromley\",\"RNS\",2\r\n\"E09000006\",\"Bromley\",\"RCX\",2\r\n\"E09000006\",\"Bromley\",\"RNA\",2\r\n\"E09000006\",\"Bromley\",\"RWG\",2\r\n\"E09000006\",\"Bromley\",\"RXL\",2\r\n\"E09000006\",\"Bromley\",\"RWA\",2\r\n\"E09000006\",\"Bromley\",\"RNZ\",2\r\n\"E09000006\",\"Bromley\",\"RTX\",2\r\n\"E09000006\",\"Bromley\",\"RHQ\",2\r\n\"E09000006\",\"Bromley\",\"RXW\",2\r\n\"E09000006\",\"Bromley\",\"RJC\",2\r\n\"E09000006\",\"Bromley\",\"RJR\",2\r\n\"E09000006\",\"Bromley\",\"RVW\",2\r\n\"E09000006\",\"Bromley\",\"RAN\",1\r\n\"E09000006\",\"Bromley\",\"R0B\",1\r\n\"E09000006\",\"Bromley\",\"RH5\",1\r\n\"E09000006\",\"Bromley\",\"RL4\",1\r\n\"E09000006\",\"Bromley\",\"RCD\",1\r\n\"E09000006\",\"Bromley\",\"RW6\",1\r\n\"E09000006\",\"Bromley\",\"RQ3\",1\r\n\"E09000006\",\"Bromley\",\"RWJ\",1\r\n\"E09000006\",\"Bromley\",\"RLQ\",1\r\n\"E09000006\",\"Bromley\",\"RNU\",1\r\n\"E09000006\",\"Bromley\",\"TAJ\",1\r\n\"E09000006\",\"Bromley\",\"RBT\",1\r\n\"E09000006\",\"Bromley\",\"RCF\",1\r\n\"E09000006\",\"Bromley\",\"RTF\",1\r\n\"E09000006\",\"Bromley\",\"RVY\",1\r\n\"E09000006\",\"Bromley\",\"RNL\",1\r\n\"E09000006\",\"Bromley\",\"RD8\",1\r\n\"E09000006\",\"Bromley\",\"RWY\",1\r\n\"E09000006\",\"Bromley\",\"RAE\",1\r\n\"E09000006\",\"Bromley\",\"RWD\",1\r\n\"E09000007\",\"Camden\",\"RRV\",7774\r\n\"E09000007\",\"Camden\",\"RAL\",7193\r\n\"E09000007\",\"Camden\",\"RYJ\",828\r\n\"E09000007\",\"Camden\",\"RKE\",765\r\n\"E09000007\",\"Camden\",\"R1H\",364\r\n\"E09000007\",\"Camden\",\"RJ1\",195\r\n\"E09000007\",\"Camden\",\"RQM\",89\r\n\"E09000007\",\"Camden\",\"R1K\",81\r\n\"E09000007\",\"Camden\",\"RQX\",54\r\n\"E09000007\",\"Camden\",\"RAP\",41\r\n\"E09000007\",\"Camden\",\"RP6\",36\r\n\"E09000007\",\"Camden\",\"RJZ\",36\r\n\"E09000007\",\"Camden\",\"RJ7\",32\r\n\"E09000007\",\"Camden\",\"RF4\",24\r\n\"E09000007\",\"Camden\",\"RTH\",21\r\n\"E09000007\",\"Camden\",\"RPY\",20\r\n\"E09000007\",\"Camden\",\"RP4\",19\r\n\"E09000007\",\"Camden\",\"RAS\",17\r\n\"E09000007\",\"Camden\",\"RWG\",15\r\n\"E09000007\",\"Camden\",\"R0A\",13\r\n\"E09000007\",\"Camden\",\"RAX\",13\r\n\"E09000007\",\"Camden\",\"RT3\",13\r\n\"E09000007\",\"Camden\",\"RWH\",11\r\n\"E09000007\",\"Camden\",\"RWE\",9\r\n\"E09000007\",\"Camden\",\"RXQ\",9\r\n\"E09000007\",\"Camden\",\"RGT\",9\r\n\"E09000007\",\"Camden\",\"RDU\",8\r\n\"E09000007\",\"Camden\",\"RWF\",8\r\n\"E09000007\",\"Camden\",\"RJ2\",13\r\n\"E09000007\",\"Camden\",\"RWK\",8\r\n\"E09000007\",\"Camden\",\"RDE\",7\r\n\"E09000007\",\"Camden\",\"RVJ\",7\r\n\"E09000007\",\"Camden\",\"REF\",7\r\n\"E09000007\",\"Camden\",\"RNS\",7\r\n\"E09000007\",\"Camden\",\"RVR\",7\r\n\"E09000007\",\"Camden\",\"RXH\",7\r\n\"E09000007\",\"Camden\",\"RC9\",6\r\n\"E09000007\",\"Camden\",\"RDZ\",6\r\n\"E09000007\",\"Camden\",\"RN7\",6\r\n\"E09000007\",\"Camden\",\"RBD\",6\r\n\"E09000007\",\"Camden\",\"RHM\",6\r\n\"E09000007\",\"Camden\",\"RM1\",6\r\n\"E09000007\",\"Camden\",\"RDD\",6\r\n\"E09000007\",\"Camden\",\"RXC\",6\r\n\"E09000007\",\"Camden\",\"RYR\",6\r\n\"E09000007\",\"Camden\",\"RD1\",6\r\n\"E09000007\",\"Camden\",\"RJ6\",5\r\n\"E09000007\",\"Camden\",\"RWD\",5\r\n\"E09000007\",\"Camden\",\"RA2\",5\r\n\"E09000007\",\"Camden\",\"RD8\",5\r\n\"E09000007\",\"Camden\",\"RAN\",5\r\n\"E09000007\",\"Camden\",\"RKB\",5\r\n\"E09000007\",\"Camden\",\"RQ8\",5\r\n\"E09000007\",\"Camden\",\"RRK\",9\r\n\"E09000007\",\"Camden\",\"RV3\",5\r\n\"E09000007\",\"Camden\",\"RVV\",4\r\n\"E09000007\",\"Camden\",\"RC1\",4\r\n\"E09000007\",\"Camden\",\"RD3\",4\r\n\"E09000007\",\"Camden\",\"RTE\",4\r\n\"E09000007\",\"Camden\",\"RR8\",4\r\n\"E09000007\",\"Camden\",\"RXK\",4\r\n\"E09000007\",\"Camden\",\"RGN\",4\r\n\"E09000007\",\"Camden\",\"RTP\",4\r\n\"E09000007\",\"Camden\",\"RTK\",3\r\n\"E09000007\",\"Camden\",\"RN3\",3\r\n\"E09000007\",\"Camden\",\"RJE\",3\r\n\"E09000007\",\"Camden\",\"RK9\",3\r\n\"E09000007\",\"Camden\",\"RPA\",3\r\n\"E09000007\",\"Camden\",\"RTD\",3\r\n\"E09000007\",\"Camden\",\"RGM\",3\r\n\"E09000007\",\"Camden\",\"RN5\",3\r\n\"E09000007\",\"Camden\",\"RQW\",3\r\n\"E09000007\",\"Camden\",\"RTX\",3\r\n\"E09000007\",\"Camden\",\"RWJ\",3\r\n\"E09000007\",\"Camden\",\"RVY\",3\r\n\"E09000007\",\"Camden\",\"RX1\",3\r\n\"E09000007\",\"Camden\",\"RCX\",2\r\n\"E09000007\",\"Camden\",\"RA7\",2\r\n\"E09000007\",\"Camden\",\"RBA\",2\r\n\"E09000007\",\"Camden\",\"RBZ\",2\r\n\"E09000007\",\"Camden\",\"RM3\",2\r\n\"E09000007\",\"Camden\",\"RNL\",2\r\n\"E09000007\",\"Camden\",\"R1F\",2\r\n\"E09000007\",\"Camden\",\"RA9\",2\r\n\"E09000007\",\"Camden\",\"RHW\",2\r\n\"E09000007\",\"Camden\",\"RGP\",2\r\n\"E09000007\",\"Camden\",\"RLQ\",2\r\n\"E09000007\",\"Camden\",\"RTR\",2\r\n\"E09000007\",\"Camden\",\"RYV\",2\r\n\"E09000007\",\"Camden\",\"RAE\",2\r\n\"E09000007\",\"Camden\",\"RH8\",2\r\n\"E09000007\",\"Camden\",\"RCB\",2\r\n\"E09000007\",\"Camden\",\"RHQ\",2\r\n\"E09000007\",\"Camden\",\"RXW\",1\r\n\"E09000007\",\"Camden\",\"RET\",1\r\n\"E09000007\",\"Camden\",\"RGR\",1\r\n\"E09000007\",\"Camden\",\"RHU\",1\r\n\"E09000007\",\"Camden\",\"RL4\",1\r\n\"E09000007\",\"Camden\",\"RMC\",1\r\n\"E09000007\",\"Camden\",\"RTG\",2\r\n\"E09000007\",\"Camden\",\"RMP\",1\r\n\"E09000007\",\"Camden\",\"RX2\",1\r\n\"E09000007\",\"Camden\",\"RXF\",1\r\n\"E09000007\",\"Camden\",\"RXL\",1\r\n\"E09000007\",\"Camden\",\"RXP\",1\r\n\"E09000007\",\"Camden\",\"RP5\",1\r\n\"E09000007\",\"Camden\",\"RQ3\",1\r\n\"E09000007\",\"Camden\",\"RWA\",1\r\n\"E09000007\",\"Camden\",\"RNZ\",1\r\n\"E09000007\",\"Camden\",\"RA3\",1\r\n\"E09000007\",\"Camden\",\"RW4\",1\r\n\"E09000007\",\"Camden\",\"RXR\",1\r\n\"E09000007\",\"Camden\",\"RBL\",1\r\n\"E09000007\",\"Camden\",\"RBS\",1\r\n\"E09000007\",\"Camden\",\"REM\",1\r\n\"E09000007\",\"Camden\",\"RPG\",1\r\n\"E09000007\",\"Camden\",\"RRE\",1\r\n\"E09000007\",\"Camden\",\"RW6\",1\r\n\"E09000007\",\"Camden\",\"RBK\",1\r\n\"E09000007\",\"Camden\",\"RCD\",1\r\n\"E09000007\",\"Camden\",\"RFS\",1\r\n\"E09000007\",\"Camden\",\"RJC\",1\r\n\"E09000007\",\"Camden\",\"RWW\",1\r\n\"E09000008\",\"Croydon\",\"RJ6\",22940\r\n\"E09000008\",\"Croydon\",\"RJ7\",4595\r\n\"E09000008\",\"Croydon\",\"RJZ\",2754\r\n\"E09000008\",\"Croydon\",\"RVR\",1217\r\n\"E09000008\",\"Croydon\",\"RTP\",930\r\n\"E09000008\",\"Croydon\",\"RJ1\",704\r\n\"E09000008\",\"Croydon\",\"RV5\",277\r\n\"E09000008\",\"Croydon\",\"RPY\",259\r\n\"E09000008\",\"Croydon\",\"RJ2\",213\r\n\"E09000008\",\"Croydon\",\"R1H\",139\r\n\"E09000008\",\"Croydon\",\"RQM\",118\r\n\"E09000008\",\"Croydon\",\"RYJ\",109\r\n\"E09000008\",\"Croydon\",\"RRV\",112\r\n\"E09000008\",\"Croydon\",\"RP6\",100\r\n\"E09000008\",\"Croydon\",\"RAX\",85\r\n\"E09000008\",\"Croydon\",\"RPC\",50\r\n\"E09000008\",\"Croydon\",\"RWK\",49\r\n\"E09000008\",\"Croydon\",\"RAL\",47\r\n\"E09000008\",\"Croydon\",\"RQX\",41\r\n\"E09000008\",\"Croydon\",\"R1K\",38\r\n\"E09000008\",\"Croydon\",\"RWF\",34\r\n\"E09000008\",\"Croydon\",\"RXC\",31\r\n\"E09000008\",\"Croydon\",\"RXH\",31\r\n\"E09000008\",\"Croydon\",\"RT3\",30\r\n\"E09000008\",\"Croydon\",\"RA2\",26\r\n\"E09000008\",\"Croydon\",\"RYR\",25\r\n\"E09000008\",\"Croydon\",\"RVV\",23\r\n\"E09000008\",\"Croydon\",\"RDU\",21\r\n\"E09000008\",\"Croydon\",\"RTK\",18\r\n\"E09000008\",\"Croydon\",\"RN7\",17\r\n\"E09000008\",\"Croydon\",\"RDZ\",17\r\n\"E09000008\",\"Croydon\",\"REF\",16\r\n\"E09000008\",\"Croydon\",\"RPA\",15\r\n\"E09000008\",\"Croydon\",\"RPG\",14\r\n\"E09000008\",\"Croydon\",\"RF4\",13\r\n\"E09000008\",\"Croydon\",\"RDE\",13\r\n\"E09000008\",\"Croydon\",\"RKE\",12\r\n\"E09000008\",\"Croydon\",\"RQY\",12\r\n\"E09000008\",\"Croydon\",\"RAP\",11\r\n\"E09000008\",\"Croydon\",\"RN5\",10\r\n\"E09000008\",\"Croydon\",\"RTH\",10\r\n\"E09000008\",\"Croydon\",\"RAN\",10\r\n\"E09000008\",\"Croydon\",\"RHU\",10\r\n\"E09000008\",\"Croydon\",\"RAS\",10\r\n\"E09000008\",\"Croydon\",\"RBA\",9\r\n\"E09000008\",\"Croydon\",\"RC9\",9\r\n\"E09000008\",\"Croydon\",\"RDD\",11\r\n\"E09000008\",\"Croydon\",\"RRK\",15\r\n\"E09000008\",\"Croydon\",\"RHM\",8\r\n\"E09000008\",\"Croydon\",\"RD8\",8\r\n\"E09000008\",\"Croydon\",\"RP4\",7\r\n\"E09000008\",\"Croydon\",\"RQ8\",7\r\n\"E09000008\",\"Croydon\",\"RGT\",7\r\n\"E09000008\",\"Croydon\",\"RWG\",7\r\n\"E09000008\",\"Croydon\",\"RKB\",6\r\n\"E09000008\",\"Croydon\",\"RK9\",6\r\n\"E09000008\",\"Croydon\",\"REM\",7\r\n\"E09000008\",\"Croydon\",\"R1F\",6\r\n\"E09000008\",\"Croydon\",\"RHW\",6\r\n\"E09000008\",\"Croydon\",\"RWE\",5\r\n\"E09000008\",\"Croydon\",\"RWH\",5\r\n\"E09000008\",\"Croydon\",\"RD3\",5\r\n\"E09000008\",\"Croydon\",\"RBD\",5\r\n\"E09000008\",\"Croydon\",\"RAE\",4\r\n\"E09000008\",\"Croydon\",\"RA9\",4\r\n\"E09000008\",\"Croydon\",\"RQW\",4\r\n\"E09000008\",\"Croydon\",\"RXL\",4\r\n\"E09000008\",\"Croydon\",\"RXX\",4\r\n\"E09000008\",\"Croydon\",\"RMC\",4\r\n\"E09000008\",\"Croydon\",\"RL4\",4\r\n\"E09000008\",\"Croydon\",\"RX1\",4\r\n\"E09000008\",\"Croydon\",\"R1L\",3\r\n\"E09000008\",\"Croydon\",\"RTG\",4\r\n\"E09000008\",\"Croydon\",\"RBZ\",3\r\n\"E09000008\",\"Croydon\",\"RHQ\",3\r\n\"E09000008\",\"Croydon\",\"RR8\",3\r\n\"E09000008\",\"Croydon\",\"RTE\",3\r\n\"E09000008\",\"Croydon\",\"RA7\",3\r\n\"E09000008\",\"Croydon\",\"RBK\",3\r\n\"E09000008\",\"Croydon\",\"RBT\",3\r\n\"E09000008\",\"Croydon\",\"RW6\",3\r\n\"E09000008\",\"Croydon\",\"RGP\",3\r\n\"E09000008\",\"Croydon\",\"RXK\",5\r\n\"E09000008\",\"Croydon\",\"RXQ\",3\r\n\"E09000008\",\"Croydon\",\"RXW\",4\r\n\"E09000008\",\"Croydon\",\"RM3\",3\r\n\"E09000008\",\"Croydon\",\"RNS\",3\r\n\"E09000008\",\"Croydon\",\"RXP\",3\r\n\"E09000008\",\"Croydon\",\"R0A\",3\r\n\"E09000008\",\"Croydon\",\"RNZ\",2\r\n\"E09000008\",\"Croydon\",\"RTD\",2\r\n\"E09000008\",\"Croydon\",\"RXY\",2\r\n\"E09000008\",\"Croydon\",\"RGN\",2\r\n\"E09000008\",\"Croydon\",\"RAJ\",2\r\n\"E09000008\",\"Croydon\",\"RLQ\",2\r\n\"E09000008\",\"Croydon\",\"RNA\",2\r\n\"E09000008\",\"Croydon\",\"RTR\",2\r\n\"E09000008\",\"Croydon\",\"RWW\",2\r\n\"E09000008\",\"Croydon\",\"RCD\",2\r\n\"E09000008\",\"Croydon\",\"RCX\",2\r\n\"E09000008\",\"Croydon\",\"RW1\",2\r\n\"E09000008\",\"Croydon\",\"RX2\",2\r\n\"E09000008\",\"Croydon\",\"RCB\",2\r\n\"E09000008\",\"Croydon\",\"RFS\",2\r\n\"E09000008\",\"Croydon\",\"RC1\",2\r\n\"E09000008\",\"Croydon\",\"RVJ\",2\r\n\"E09000008\",\"Croydon\",\"RJR\",1\r\n\"E09000008\",\"Croydon\",\"RM1\",1\r\n\"E09000008\",\"Croydon\",\"RWJ\",1\r\n\"E09000008\",\"Croydon\",\"RWP\",1\r\n\"E09000008\",\"Croydon\",\"RXN\",1\r\n\"E09000008\",\"Croydon\",\"RBS\",1\r\n\"E09000008\",\"Croydon\",\"RXG\",1\r\n\"E09000008\",\"Croydon\",\"RGM\",1\r\n\"E09000008\",\"Croydon\",\"RGR\",1\r\n\"E09000008\",\"Croydon\",\"RJL\",1\r\n\"E09000008\",\"Croydon\",\"RTX\",1\r\n\"E09000008\",\"Croydon\",\"RWA\",1\r\n\"E09000008\",\"Croydon\",\"RXF\",1\r\n\"E09000008\",\"Croydon\",\"RH8\",1\r\n\"E09000008\",\"Croydon\",\"RAT\",1\r\n\"E09000008\",\"Croydon\",\"RNU\",1\r\n\"E09000008\",\"Croydon\",\"RP5\",1\r\n\"E09000008\",\"Croydon\",\"RV3\",1\r\n\"E09000008\",\"Croydon\",\"RQ3\",1\r\n\"E09000008\",\"Croydon\",\"RXR\",1\r\n\"E09000008\",\"Croydon\",\"RJC\",1\r\n\"E09000008\",\"Croydon\",\"R0B\",1\r\n\"E09000008\",\"Croydon\",\"RTF\",1\r\n\"E09000008\",\"Croydon\",\"RWD\",1\r\n\"E09000008\",\"Croydon\",\"RWY\",1\r\n\"E09000008\",\"Croydon\",\"RA3\",1\r\n\"E09000008\",\"Croydon\",\"RA4\",1\r\n\"E09000008\",\"Croydon\",\"RBN\",1\r\n\"E09000008\",\"Croydon\",\"RD1\",1\r\n\"E09000008\",\"Croydon\",\"RJE\",1\r\n\"E09000008\",\"Croydon\",\"RN3\",1\r\n\"E09000008\",\"Croydon\",\"RR7\",1\r\n\"E09000008\",\"Croydon\",\"RVY\",1\r\n\"E09000009\",\"Ealing\",\"R1K\",22517\r\n\"E09000009\",\"Ealing\",\"RYJ\",6811\r\n\"E09000009\",\"Ealing\",\"RQM\",3976\r\n\"E09000009\",\"Ealing\",\"RAS\",1843\r\n\"E09000009\",\"Ealing\",\"RRV\",227\r\n\"E09000009\",\"Ealing\",\"RJ1\",181\r\n\"E09000009\",\"Ealing\",\"RAL\",166\r\n\"E09000009\",\"Ealing\",\"R1H\",125\r\n\"E09000009\",\"Ealing\",\"RDU\",124\r\n\"E09000009\",\"Ealing\",\"RT3\",115\r\n\"E09000009\",\"Ealing\",\"RJ7\",70\r\n\"E09000009\",\"Ealing\",\"RP6\",54\r\n\"E09000009\",\"Ealing\",\"RAX\",51\r\n\"E09000009\",\"Ealing\",\"RJZ\",47\r\n\"E09000009\",\"Ealing\",\"RWG\",40\r\n\"E09000009\",\"Ealing\",\"RWH\",37\r\n\"E09000009\",\"Ealing\",\"RPY\",34\r\n\"E09000009\",\"Ealing\",\"RTH\",28\r\n\"E09000009\",\"Ealing\",\"RQX\",21\r\n\"E09000009\",\"Ealing\",\"RAP\",20\r\n\"E09000009\",\"Ealing\",\"RV3\",19\r\n\"E09000009\",\"Ealing\",\"RTK\",18\r\n\"E09000009\",\"Ealing\",\"RXQ\",17\r\n\"E09000009\",\"Ealing\",\"RC9\",16\r\n\"E09000009\",\"Ealing\",\"RXH\",14\r\n\"E09000009\",\"Ealing\",\"RVR\",14\r\n\"E09000009\",\"Ealing\",\"RYR\",14\r\n\"E09000009\",\"Ealing\",\"RF4\",13\r\n\"E09000009\",\"Ealing\",\"RP4\",13\r\n\"E09000009\",\"Ealing\",\"RXC\",12\r\n\"E09000009\",\"Ealing\",\"RDE\",11\r\n\"E09000009\",\"Ealing\",\"RA2\",11\r\n\"E09000009\",\"Ealing\",\"RKE\",11\r\n\"E09000009\",\"Ealing\",\"RJ2\",18\r\n\"E09000009\",\"Ealing\",\"RJ6\",10\r\n\"E09000009\",\"Ealing\",\"RTP\",10\r\n\"E09000009\",\"Ealing\",\"RKB\",9\r\n\"E09000009\",\"Ealing\",\"RHW\",9\r\n\"E09000009\",\"Ealing\",\"RDZ\",9\r\n\"E09000009\",\"Ealing\",\"RA7\",8\r\n\"E09000009\",\"Ealing\",\"RRK\",14\r\n\"E09000009\",\"Ealing\",\"RGT\",8\r\n\"E09000009\",\"Ealing\",\"RWE\",8\r\n\"E09000009\",\"Ealing\",\"RM1\",8\r\n\"E09000009\",\"Ealing\",\"RD8\",7\r\n\"E09000009\",\"Ealing\",\"RW6\",7\r\n\"E09000009\",\"Ealing\",\"RBD\",7\r\n\"E09000009\",\"Ealing\",\"RCB\",7\r\n\"E09000009\",\"Ealing\",\"RVV\",6\r\n\"E09000009\",\"Ealing\",\"RHM\",6\r\n\"E09000009\",\"Ealing\",\"REM\",8\r\n\"E09000009\",\"Ealing\",\"RXK\",8\r\n\"E09000009\",\"Ealing\",\"RAN\",6\r\n\"E09000009\",\"Ealing\",\"RK9\",5\r\n\"E09000009\",\"Ealing\",\"RAE\",5\r\n\"E09000009\",\"Ealing\",\"RBA\",5\r\n\"E09000009\",\"Ealing\",\"RVJ\",5\r\n\"E09000009\",\"Ealing\",\"RX1\",5\r\n\"E09000009\",\"Ealing\",\"RC1\",5\r\n\"E09000009\",\"Ealing\",\"RD1\",5\r\n\"E09000009\",\"Ealing\",\"RHU\",5\r\n\"E09000009\",\"Ealing\",\"R0A\",5\r\n\"E09000009\",\"Ealing\",\"RD3\",5\r\n\"E09000009\",\"Ealing\",\"R1F\",4\r\n\"E09000009\",\"Ealing\",\"RAJ\",4\r\n\"E09000009\",\"Ealing\",\"RJC\",4\r\n\"E09000009\",\"Ealing\",\"RN7\",4\r\n\"E09000009\",\"Ealing\",\"RTG\",4\r\n\"E09000009\",\"Ealing\",\"RBZ\",4\r\n\"E09000009\",\"Ealing\",\"RA3\",4\r\n\"E09000009\",\"Ealing\",\"RQW\",4\r\n\"E09000009\",\"Ealing\",\"RWF\",4\r\n\"E09000009\",\"Ealing\",\"RBK\",4\r\n\"E09000009\",\"Ealing\",\"RGR\",3\r\n\"E09000009\",\"Ealing\",\"RA4\",3\r\n\"E09000009\",\"Ealing\",\"RA9\",3\r\n\"E09000009\",\"Ealing\",\"RCX\",3\r\n\"E09000009\",\"Ealing\",\"RPA\",3\r\n\"E09000009\",\"Ealing\",\"RQY\",3\r\n\"E09000009\",\"Ealing\",\"RXW\",3\r\n\"E09000009\",\"Ealing\",\"RDD\",3\r\n\"E09000009\",\"Ealing\",\"RBL\",3\r\n\"E09000009\",\"Ealing\",\"RQ8\",3\r\n\"E09000009\",\"Ealing\",\"RR8\",3\r\n\"E09000009\",\"Ealing\",\"RH8\",3\r\n\"E09000009\",\"Ealing\",\"RLQ\",2\r\n\"E09000009\",\"Ealing\",\"RN3\",2\r\n\"E09000009\",\"Ealing\",\"RPC\",2\r\n\"E09000009\",\"Ealing\",\"RTE\",2\r\n\"E09000009\",\"Ealing\",\"RQ3\",4\r\n\"E09000009\",\"Ealing\",\"REF\",2\r\n\"E09000009\",\"Ealing\",\"RFR\",2\r\n\"E09000009\",\"Ealing\",\"RNL\",2\r\n\"E09000009\",\"Ealing\",\"RGN\",2\r\n\"E09000009\",\"Ealing\",\"RTF\",2\r\n\"E09000009\",\"Ealing\",\"RVN\",2\r\n\"E09000009\",\"Ealing\",\"RGP\",2\r\n\"E09000009\",\"Ealing\",\"RTD\",2\r\n\"E09000009\",\"Ealing\",\"RN5\",2\r\n\"E09000009\",\"Ealing\",\"RNA\",2\r\n\"E09000009\",\"Ealing\",\"RNQ\",2\r\n\"E09000009\",\"Ealing\",\"RTX\",2\r\n\"E09000009\",\"Ealing\",\"RCU\",1\r\n\"E09000009\",\"Ealing\",\"RL4\",1\r\n\"E09000009\",\"Ealing\",\"RTR\",1\r\n\"E09000009\",\"Ealing\",\"RXN\",1\r\n\"E09000009\",\"Ealing\",\"RHQ\",1\r\n\"E09000009\",\"Ealing\",\"RLT\",1\r\n\"E09000009\",\"Ealing\",\"RP5\",2\r\n\"E09000009\",\"Ealing\",\"RWK\",1\r\n\"E09000009\",\"Ealing\",\"RXR\",1\r\n\"E09000009\",\"Ealing\",\"RJR\",1\r\n\"E09000009\",\"Ealing\",\"RM3\",1\r\n\"E09000009\",\"Ealing\",\"RNS\",1\r\n\"E09000009\",\"Ealing\",\"RNU\",1\r\n\"E09000009\",\"Ealing\",\"RWJ\",1\r\n\"E09000009\",\"Ealing\",\"RXL\",1\r\n\"E09000009\",\"Ealing\",\"R1L\",1\r\n\"E09000009\",\"Ealing\",\"RFS\",1\r\n\"E09000009\",\"Ealing\",\"RMP\",1\r\n\"E09000009\",\"Ealing\",\"RRF\",1\r\n\"E09000009\",\"Ealing\",\"RV5\",1\r\n\"E09000009\",\"Ealing\",\"RWP\",1\r\n\"E09000009\",\"Ealing\",\"RFF\",1\r\n\"E09000009\",\"Ealing\",\"RMC\",1\r\n\"E09000009\",\"Ealing\",\"RX2\",1\r\n\"E09000009\",\"Ealing\",\"RWD\",1\r\n\"E09000010\",\"Enfield\",\"RAP\",19920\r\n\"E09000010\",\"Enfield\",\"RAL\",8217\r\n\"E09000010\",\"Enfield\",\"RRV\",1236\r\n\"E09000010\",\"Enfield\",\"R1H\",1018\r\n\"E09000010\",\"Enfield\",\"RKE\",389\r\n\"E09000010\",\"Enfield\",\"RJ1\",139\r\n\"E09000010\",\"Enfield\",\"RYJ\",124\r\n\"E09000010\",\"Enfield\",\"RQX\",123\r\n\"E09000010\",\"Enfield\",\"RQW\",113\r\n\"E09000010\",\"Enfield\",\"RP6\",88\r\n\"E09000010\",\"Enfield\",\"R1K\",75\r\n\"E09000010\",\"Enfield\",\"RWH\",73\r\n\"E09000010\",\"Enfield\",\"RQM\",64\r\n\"E09000010\",\"Enfield\",\"RF4\",51\r\n\"E09000010\",\"Enfield\",\"RQ8\",40\r\n\"E09000010\",\"Enfield\",\"RJZ\",30\r\n\"E09000010\",\"Enfield\",\"RJ7\",25\r\n\"E09000010\",\"Enfield\",\"RWK\",24\r\n\"E09000010\",\"Enfield\",\"RPY\",21\r\n\"E09000010\",\"Enfield\",\"RP4\",20\r\n\"E09000010\",\"Enfield\",\"RGT\",19\r\n\"E09000010\",\"Enfield\",\"RWG\",18\r\n\"E09000010\",\"Enfield\",\"RDD\",21\r\n\"E09000010\",\"Enfield\",\"RJ2\",27\r\n\"E09000010\",\"Enfield\",\"RDU\",15\r\n\"E09000010\",\"Enfield\",\"RAS\",15\r\n\"E09000010\",\"Enfield\",\"RDE\",15\r\n\"E09000010\",\"Enfield\",\"RT3\",14\r\n\"E09000010\",\"Enfield\",\"RC9\",14\r\n\"E09000010\",\"Enfield\",\"RAN\",13\r\n\"E09000010\",\"Enfield\",\"RAX\",12\r\n\"E09000010\",\"Enfield\",\"RTH\",11\r\n\"E09000010\",\"Enfield\",\"REF\",11\r\n\"E09000010\",\"Enfield\",\"RD8\",11\r\n\"E09000010\",\"Enfield\",\"RM1\",11\r\n\"E09000010\",\"Enfield\",\"RC1\",10\r\n\"E09000010\",\"Enfield\",\"RWF\",9\r\n\"E09000010\",\"Enfield\",\"RD3\",9\r\n\"E09000010\",\"Enfield\",\"RVR\",9\r\n\"E09000010\",\"Enfield\",\"RDZ\",9\r\n\"E09000010\",\"Enfield\",\"RA7\",8\r\n\"E09000010\",\"Enfield\",\"RA2\",7\r\n\"E09000010\",\"Enfield\",\"RH8\",7\r\n\"E09000010\",\"Enfield\",\"RD1\",6\r\n\"E09000010\",\"Enfield\",\"RGR\",6\r\n\"E09000010\",\"Enfield\",\"RRK\",9\r\n\"E09000010\",\"Enfield\",\"RN3\",6\r\n\"E09000010\",\"Enfield\",\"RGP\",6\r\n\"E09000010\",\"Enfield\",\"RHM\",5\r\n\"E09000010\",\"Enfield\",\"RXQ\",5\r\n\"E09000010\",\"Enfield\",\"RTP\",5\r\n\"E09000010\",\"Enfield\",\"RAJ\",5\r\n\"E09000010\",\"Enfield\",\"RX1\",5\r\n\"E09000010\",\"Enfield\",\"RGM\",5\r\n\"E09000010\",\"Enfield\",\"RXH\",5\r\n\"E09000010\",\"Enfield\",\"RNS\",5\r\n\"E09000010\",\"Enfield\",\"RKB\",4\r\n\"E09000010\",\"Enfield\",\"RTD\",4\r\n\"E09000010\",\"Enfield\",\"REM\",4\r\n\"E09000010\",\"Enfield\",\"RYR\",4\r\n\"E09000010\",\"Enfield\",\"RXC\",4\r\n\"E09000010\",\"Enfield\",\"RN7\",4\r\n\"E09000010\",\"Enfield\",\"RTX\",4\r\n\"E09000010\",\"Enfield\",\"RN5\",3\r\n\"E09000010\",\"Enfield\",\"RTE\",3\r\n\"E09000010\",\"Enfield\",\"RYV\",3\r\n\"E09000010\",\"Enfield\",\"RJE\",3\r\n\"E09000010\",\"Enfield\",\"RWE\",3\r\n\"E09000010\",\"Enfield\",\"RCX\",3\r\n\"E09000010\",\"Enfield\",\"RTG\",3\r\n\"E09000010\",\"Enfield\",\"RHW\",3\r\n\"E09000010\",\"Enfield\",\"RVV\",3\r\n\"E09000010\",\"Enfield\",\"R0A\",3\r\n\"E09000010\",\"Enfield\",\"RBA\",3\r\n\"E09000010\",\"Enfield\",\"RVJ\",3\r\n\"E09000010\",\"Enfield\",\"RBD\",2\r\n\"E09000010\",\"Enfield\",\"RP5\",3\r\n\"E09000010\",\"Enfield\",\"RTK\",2\r\n\"E09000010\",\"Enfield\",\"RJ6\",2\r\n\"E09000010\",\"Enfield\",\"RWA\",2\r\n\"E09000010\",\"Enfield\",\"RAT\",2\r\n\"E09000010\",\"Enfield\",\"RQ3\",2\r\n\"E09000010\",\"Enfield\",\"RWP\",2\r\n\"E09000010\",\"Enfield\",\"RXL\",2\r\n\"E09000010\",\"Enfield\",\"RGN\",2\r\n\"E09000010\",\"Enfield\",\"R1L\",2\r\n\"E09000010\",\"Enfield\",\"RCB\",2\r\n\"E09000010\",\"Enfield\",\"RCD\",2\r\n\"E09000010\",\"Enfield\",\"RFR\",2\r\n\"E09000010\",\"Enfield\",\"RK5\",2\r\n\"E09000010\",\"Enfield\",\"RMC\",2\r\n\"E09000010\",\"Enfield\",\"RXK\",3\r\n\"E09000010\",\"Enfield\",\"RFS\",1\r\n\"E09000010\",\"Enfield\",\"RK9\",1\r\n\"E09000010\",\"Enfield\",\"RTF\",1\r\n\"E09000010\",\"Enfield\",\"RV3\",1\r\n\"E09000010\",\"Enfield\",\"RVW\",1\r\n\"E09000010\",\"Enfield\",\"RA9\",1\r\n\"E09000010\",\"Enfield\",\"R0B\",2\r\n\"E09000010\",\"Enfield\",\"RJL\",1\r\n\"E09000010\",\"Enfield\",\"RNA\",1\r\n\"E09000010\",\"Enfield\",\"RPA\",1\r\n\"E09000010\",\"Enfield\",\"RV5\",1\r\n\"E09000010\",\"Enfield\",\"RBZ\",1\r\n\"E09000010\",\"Enfield\",\"RHQ\",1\r\n\"E09000010\",\"Enfield\",\"RPC\",1\r\n\"E09000010\",\"Enfield\",\"RVY\",1\r\n\"E09000010\",\"Enfield\",\"RWW\",1\r\n\"E09000010\",\"Enfield\",\"RXW\",1\r\n\"E09000010\",\"Enfield\",\"RBS\",1\r\n\"E09000010\",\"Enfield\",\"RNZ\",1\r\n\"E09000010\",\"Enfield\",\"RWJ\",1\r\n\"E09000010\",\"Enfield\",\"RJN\",1\r\n\"E09000010\",\"Enfield\",\"RJR\",1\r\n\"E09000010\",\"Enfield\",\"RLQ\",1\r\n\"E09000010\",\"Enfield\",\"RWR\",1\r\n\"E09000010\",\"Enfield\",\"R1F\",1\r\n\"E09000010\",\"Enfield\",\"RAE\",1\r\n\"E09000010\",\"Enfield\",\"RBN\",1\r\n\"E09000010\",\"Enfield\",\"RBQ\",1\r\n\"E09000010\",\"Enfield\",\"RMY\",1\r\n\"E09000010\",\"Enfield\",\"RXY\",1\r\n\"E09000010\",\"Enfield\",\"RJC\",1\r\n\"E09000010\",\"Enfield\",\"RNL\",1\r\n\"E09000010\",\"Enfield\",\"RTR\",1\r\n\"E09000011\",\"Greenwich\",\"RJ2\",23324\r\n\"E09000011\",\"Greenwich\",\"RJ1\",1686\r\n\"E09000011\",\"Greenwich\",\"RJZ\",1626\r\n\"E09000011\",\"Greenwich\",\"RPG\",367\r\n\"E09000011\",\"Greenwich\",\"R1H\",330\r\n\"E09000011\",\"Greenwich\",\"RN7\",274\r\n\"E09000011\",\"Greenwich\",\"RRV\",118\r\n\"E09000011\",\"Greenwich\",\"RYJ\",82\r\n\"E09000011\",\"Greenwich\",\"RJ7\",64\r\n\"E09000011\",\"Greenwich\",\"RQM\",57\r\n\"E09000011\",\"Greenwich\",\"RQX\",39\r\n\"E09000011\",\"Greenwich\",\"RWF\",37\r\n\"E09000011\",\"Greenwich\",\"RAL\",36\r\n\"E09000011\",\"Greenwich\",\"RVV\",33\r\n\"E09000011\",\"Greenwich\",\"RP6\",32\r\n\"E09000011\",\"Greenwich\",\"RPA\",26\r\n\"E09000011\",\"Greenwich\",\"RF4\",26\r\n\"E09000011\",\"Greenwich\",\"R1K\",25\r\n\"E09000011\",\"Greenwich\",\"RWK\",25\r\n\"E09000011\",\"Greenwich\",\"RXC\",18\r\n\"E09000011\",\"Greenwich\",\"RPY\",15\r\n\"E09000011\",\"Greenwich\",\"RVR\",15\r\n\"E09000011\",\"Greenwich\",\"RJ6\",13\r\n\"E09000011\",\"Greenwich\",\"RQ8\",13\r\n\"E09000011\",\"Greenwich\",\"RAP\",13\r\n\"E09000011\",\"Greenwich\",\"REF\",12\r\n\"E09000011\",\"Greenwich\",\"RKB\",12\r\n\"E09000011\",\"Greenwich\",\"RKE\",12\r\n\"E09000011\",\"Greenwich\",\"RGT\",12\r\n\"E09000011\",\"Greenwich\",\"RAX\",11\r\n\"E09000011\",\"Greenwich\",\"RWH\",10\r\n\"E09000011\",\"Greenwich\",\"RYR\",10\r\n\"E09000011\",\"Greenwich\",\"RWE\",10\r\n\"E09000011\",\"Greenwich\",\"RT3\",10\r\n\"E09000011\",\"Greenwich\",\"RDD\",9\r\n\"E09000011\",\"Greenwich\",\"RDE\",9\r\n\"E09000011\",\"Greenwich\",\"RXH\",9\r\n\"E09000011\",\"Greenwich\",\"R0A\",9\r\n\"E09000011\",\"Greenwich\",\"RV5\",8\r\n\"E09000011\",\"Greenwich\",\"RWG\",8\r\n\"E09000011\",\"Greenwich\",\"RPC\",8\r\n\"E09000011\",\"Greenwich\",\"RRK\",13\r\n\"E09000011\",\"Greenwich\",\"RA2\",7\r\n\"E09000011\",\"Greenwich\",\"RD8\",7\r\n\"E09000011\",\"Greenwich\",\"RXY\",7\r\n\"E09000011\",\"Greenwich\",\"RDU\",7\r\n\"E09000011\",\"Greenwich\",\"RDZ\",6\r\n\"E09000011\",\"Greenwich\",\"RGN\",6\r\n\"E09000011\",\"Greenwich\",\"RTP\",6\r\n\"E09000011\",\"Greenwich\",\"RQW\",6\r\n\"E09000011\",\"Greenwich\",\"RBD\",5\r\n\"E09000011\",\"Greenwich\",\"RP4\",5\r\n\"E09000011\",\"Greenwich\",\"RXP\",5\r\n\"E09000011\",\"Greenwich\",\"RD3\",5\r\n\"E09000011\",\"Greenwich\",\"RM1\",5\r\n\"E09000011\",\"Greenwich\",\"RNQ\",5\r\n\"E09000011\",\"Greenwich\",\"RC9\",5\r\n\"E09000011\",\"Greenwich\",\"RJE\",5\r\n\"E09000011\",\"Greenwich\",\"RH8\",4\r\n\"E09000011\",\"Greenwich\",\"RNS\",4\r\n\"E09000011\",\"Greenwich\",\"RCB\",4\r\n\"E09000011\",\"Greenwich\",\"RX1\",4\r\n\"E09000011\",\"Greenwich\",\"RHW\",4\r\n\"E09000011\",\"Greenwich\",\"RTE\",4\r\n\"E09000011\",\"Greenwich\",\"RGR\",4\r\n\"E09000011\",\"Greenwich\",\"RHM\",4\r\n\"E09000011\",\"Greenwich\",\"RXW\",4\r\n\"E09000011\",\"Greenwich\",\"RWA\",4\r\n\"E09000011\",\"Greenwich\",\"RWY\",4\r\n\"E09000011\",\"Greenwich\",\"R1F\",4\r\n\"E09000011\",\"Greenwich\",\"RBA\",4\r\n\"E09000011\",\"Greenwich\",\"RC1\",3\r\n\"E09000011\",\"Greenwich\",\"RTH\",3\r\n\"E09000011\",\"Greenwich\",\"RA9\",3\r\n\"E09000011\",\"Greenwich\",\"RBZ\",3\r\n\"E09000011\",\"Greenwich\",\"RXQ\",3\r\n\"E09000011\",\"Greenwich\",\"RNL\",3\r\n\"E09000011\",\"Greenwich\",\"RQ3\",3\r\n\"E09000011\",\"Greenwich\",\"RTK\",3\r\n\"E09000011\",\"Greenwich\",\"RAE\",3\r\n\"E09000011\",\"Greenwich\",\"RGP\",3\r\n\"E09000011\",\"Greenwich\",\"RNZ\",3\r\n\"E09000011\",\"Greenwich\",\"RAS\",3\r\n\"E09000011\",\"Greenwich\",\"RAN\",2\r\n\"E09000011\",\"Greenwich\",\"RFF\",2\r\n\"E09000011\",\"Greenwich\",\"RVY\",2\r\n\"E09000011\",\"Greenwich\",\"RXL\",2\r\n\"E09000011\",\"Greenwich\",\"RN5\",2\r\n\"E09000011\",\"Greenwich\",\"RTR\",2\r\n\"E09000011\",\"Greenwich\",\"RXK\",2\r\n\"E09000011\",\"Greenwich\",\"RXN\",2\r\n\"E09000011\",\"Greenwich\",\"RCX\",2\r\n\"E09000011\",\"Greenwich\",\"RK9\",2\r\n\"E09000011\",\"Greenwich\",\"RNA\",2\r\n\"E09000011\",\"Greenwich\",\"RTF\",2\r\n\"E09000011\",\"Greenwich\",\"RHU\",2\r\n\"E09000011\",\"Greenwich\",\"RK5\",2\r\n\"E09000011\",\"Greenwich\",\"RYV\",2\r\n\"E09000011\",\"Greenwich\",\"RDY\",2\r\n\"E09000011\",\"Greenwich\",\"RJL\",2\r\n\"E09000011\",\"Greenwich\",\"RLQ\",2\r\n\"E09000011\",\"Greenwich\",\"RTX\",2\r\n\"E09000011\",\"Greenwich\",\"RCD\",2\r\n\"E09000011\",\"Greenwich\",\"RMP\",2\r\n\"E09000011\",\"Greenwich\",\"RN3\",2\r\n\"E09000011\",\"Greenwich\",\"RVJ\",2\r\n\"E09000011\",\"Greenwich\",\"RFR\",2\r\n\"E09000011\",\"Greenwich\",\"RFS\",2\r\n\"E09000011\",\"Greenwich\",\"R1A\",1\r\n\"E09000011\",\"Greenwich\",\"RA7\",1\r\n\"E09000011\",\"Greenwich\",\"RTD\",1\r\n\"E09000011\",\"Greenwich\",\"RBQ\",1\r\n\"E09000011\",\"Greenwich\",\"RCU\",1\r\n\"E09000011\",\"Greenwich\",\"RTG\",1\r\n\"E09000011\",\"Greenwich\",\"RM3\",1\r\n\"E09000011\",\"Greenwich\",\"RA4\",1\r\n\"E09000011\",\"Greenwich\",\"RAT\",1\r\n\"E09000011\",\"Greenwich\",\"RGM\",1\r\n\"E09000011\",\"Greenwich\",\"RMC\",1\r\n\"E09000011\",\"Greenwich\",\"REM\",1\r\n\"E09000011\",\"Greenwich\",\"RBV\",1\r\n\"E09000011\",\"Greenwich\",\"RJC\",1\r\n\"E09000011\",\"Greenwich\",\"RAJ\",1\r\n\"E09000011\",\"Greenwich\",\"RH5\",1\r\n\"E09000011\",\"Greenwich\",\"RWD\",1\r\n\"E09000011\",\"Greenwich\",\"RBL\",1\r\n\"E09000011\",\"Greenwich\",\"RBN\",1\r\n\"E09000011\",\"Greenwich\",\"RJN\",1\r\n\"E09000011\",\"Greenwich\",\"RQY\",1\r\n\"E09000011\",\"Greenwich\",\"RXR\",1\r\n\"E09000011\",\"Greenwich\",\"RD1\",1\r\n\"E09000011\",\"Greenwich\",\"RL4\",1\r\n\"E09000011\",\"Greenwich\",\"RW6\",1\r\n\"E09000011\",\"Greenwich\",\"RWP\",1\r\n\"E09000012\",\"Hackney\",\"RQX\",16190\r\n\"E09000012\",\"Hackney\",\"R1H\",4683\r\n\"E09000012\",\"Hackney\",\"RRV\",1019\r\n\"E09000012\",\"Hackney\",\"RWK\",827\r\n\"E09000012\",\"Hackney\",\"RKE\",509\r\n\"E09000012\",\"Hackney\",\"RJ1\",247\r\n\"E09000012\",\"Hackney\",\"RAL\",235\r\n\"E09000012\",\"Hackney\",\"RAP\",232\r\n\"E09000012\",\"Hackney\",\"RYJ\",80\r\n\"E09000012\",\"Hackney\",\"RQM\",61\r\n\"E09000012\",\"Hackney\",\"RF4\",60\r\n\"E09000012\",\"Hackney\",\"RJZ\",57\r\n\"E09000012\",\"Hackney\",\"RP6\",57\r\n\"E09000012\",\"Hackney\",\"R1K\",47\r\n\"E09000012\",\"Hackney\",\"RJ7\",42\r\n\"E09000012\",\"Hackney\",\"RJ2\",41\r\n\"E09000012\",\"Hackney\",\"RDE\",19\r\n\"E09000012\",\"Hackney\",\"RQ8\",18\r\n\"E09000012\",\"Hackney\",\"RP4\",17\r\n\"E09000012\",\"Hackney\",\"RJ6\",17\r\n\"E09000012\",\"Hackney\",\"RTH\",14\r\n\"E09000012\",\"Hackney\",\"RDD\",13\r\n\"E09000012\",\"Hackney\",\"RVV\",13\r\n\"E09000012\",\"Hackney\",\"RPY\",13\r\n\"E09000012\",\"Hackney\",\"RAX\",11\r\n\"E09000012\",\"Hackney\",\"RWG\",11\r\n\"E09000012\",\"Hackney\",\"RWH\",11\r\n\"E09000012\",\"Hackney\",\"RGT\",10\r\n\"E09000012\",\"Hackney\",\"REF\",10\r\n\"E09000012\",\"Hackney\",\"RQW\",10\r\n\"E09000012\",\"Hackney\",\"RVR\",10\r\n\"E09000012\",\"Hackney\",\"RAJ\",10\r\n\"E09000012\",\"Hackney\",\"RN7\",9\r\n\"E09000012\",\"Hackney\",\"RWF\",9\r\n\"E09000012\",\"Hackney\",\"RM1\",9\r\n\"E09000012\",\"Hackney\",\"R0A\",9\r\n\"E09000012\",\"Hackney\",\"RX1\",9\r\n\"E09000012\",\"Hackney\",\"RA7\",8\r\n\"E09000012\",\"Hackney\",\"RC9\",8\r\n\"E09000012\",\"Hackney\",\"RYR\",8\r\n\"E09000012\",\"Hackney\",\"RT3\",8\r\n\"E09000012\",\"Hackney\",\"RDU\",7\r\n\"E09000012\",\"Hackney\",\"RD3\",7\r\n\"E09000012\",\"Hackney\",\"RDZ\",7\r\n\"E09000012\",\"Hackney\",\"RW6\",7\r\n\"E09000012\",\"Hackney\",\"RC1\",6\r\n\"E09000012\",\"Hackney\",\"RWE\",6\r\n\"E09000012\",\"Hackney\",\"RHW\",6\r\n\"E09000012\",\"Hackney\",\"RBA\",6\r\n\"E09000012\",\"Hackney\",\"RTE\",5\r\n\"E09000012\",\"Hackney\",\"RHQ\",5\r\n\"E09000012\",\"Hackney\",\"RKB\",5\r\n\"E09000012\",\"Hackney\",\"RAS\",5\r\n\"E09000012\",\"Hackney\",\"RD1\",5\r\n\"E09000012\",\"Hackney\",\"RXH\",5\r\n\"E09000012\",\"Hackney\",\"RA9\",5\r\n\"E09000012\",\"Hackney\",\"RAN\",5\r\n\"E09000012\",\"Hackney\",\"RAT\",5\r\n\"E09000012\",\"Hackney\",\"RNS\",5\r\n\"E09000012\",\"Hackney\",\"RPA\",5\r\n\"E09000012\",\"Hackney\",\"RTP\",5\r\n\"E09000012\",\"Hackney\",\"RHM\",4\r\n\"E09000012\",\"Hackney\",\"RBL\",4\r\n\"E09000012\",\"Hackney\",\"RCX\",4\r\n\"E09000012\",\"Hackney\",\"RR8\",4\r\n\"E09000012\",\"Hackney\",\"RRK\",4\r\n\"E09000012\",\"Hackney\",\"RGP\",4\r\n\"E09000012\",\"Hackney\",\"RA2\",4\r\n\"E09000012\",\"Hackney\",\"RD8\",4\r\n\"E09000012\",\"Hackney\",\"RGN\",4\r\n\"E09000012\",\"Hackney\",\"RBT\",4\r\n\"E09000012\",\"Hackney\",\"RNQ\",4\r\n\"E09000012\",\"Hackney\",\"RVJ\",4\r\n\"E09000012\",\"Hackney\",\"RXC\",4\r\n\"E09000012\",\"Hackney\",\"RXW\",4\r\n\"E09000012\",\"Hackney\",\"RAE\",3\r\n\"E09000012\",\"Hackney\",\"REM\",3\r\n\"E09000012\",\"Hackney\",\"RJE\",3\r\n\"E09000012\",\"Hackney\",\"RM3\",3\r\n\"E09000012\",\"Hackney\",\"RTK\",3\r\n\"E09000012\",\"Hackney\",\"RTG\",3\r\n\"E09000012\",\"Hackney\",\"RK5\",3\r\n\"E09000012\",\"Hackney\",\"RLQ\",3\r\n\"E09000012\",\"Hackney\",\"RA4\",3\r\n\"E09000012\",\"Hackney\",\"RN5\",3\r\n\"E09000012\",\"Hackney\",\"RBD\",2\r\n\"E09000012\",\"Hackney\",\"RN3\",2\r\n\"E09000012\",\"Hackney\",\"RNZ\",2\r\n\"E09000012\",\"Hackney\",\"RWA\",2\r\n\"E09000012\",\"Hackney\",\"RXR\",2\r\n\"E09000012\",\"Hackney\",\"RHU\",2\r\n\"E09000012\",\"Hackney\",\"RCB\",2\r\n\"E09000012\",\"Hackney\",\"RXK\",2\r\n\"E09000012\",\"Hackney\",\"RXQ\",2\r\n\"E09000012\",\"Hackney\",\"R1L\",2\r\n\"E09000012\",\"Hackney\",\"RTX\",2\r\n\"E09000012\",\"Hackney\",\"RWP\",2\r\n\"E09000012\",\"Hackney\",\"RXF\",2\r\n\"E09000012\",\"Hackney\",\"RV5\",2\r\n\"E09000012\",\"Hackney\",\"RVW\",2\r\n\"E09000012\",\"Hackney\",\"RGR\",1\r\n\"E09000012\",\"Hackney\",\"RNA\",1\r\n\"E09000012\",\"Hackney\",\"RV3\",1\r\n\"E09000012\",\"Hackney\",\"RA3\",1\r\n\"E09000012\",\"Hackney\",\"RH5\",1\r\n\"E09000012\",\"Hackney\",\"RCD\",1\r\n\"E09000012\",\"Hackney\",\"RCF\",1\r\n\"E09000012\",\"Hackney\",\"RH8\",1\r\n\"E09000012\",\"Hackney\",\"RLT\",1\r\n\"E09000012\",\"Hackney\",\"RBS\",1\r\n\"E09000012\",\"Hackney\",\"RTD\",1\r\n\"E09000012\",\"Hackney\",\"RTF\",1\r\n\"E09000012\",\"Hackney\",\"RBN\",1\r\n\"E09000012\",\"Hackney\",\"RWD\",1\r\n\"E09000012\",\"Hackney\",\"RBK\",1\r\n\"E09000012\",\"Hackney\",\"RWW\",1\r\n\"E09000012\",\"Hackney\",\"RWY\",1\r\n\"E09000012\",\"Hackney\",\"RGM\",1\r\n\"E09000012\",\"Hackney\",\"RJC\",1\r\n\"E09000012\",\"Hackney\",\"RK9\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RYJ\",8965\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RQM\",4796\r\n\"E09000013\",\"Hammersmith and Fulham\",\"R1K\",230\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJ1\",165\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RRV\",168\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJ7\",119\r\n\"E09000013\",\"Hammersmith and Fulham\",\"R1H\",80\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RPY\",57\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RAX\",49\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJZ\",43\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RT3\",36\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RAL\",29\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RDU\",23\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RTH\",22\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RQX\",21\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RAS\",18\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RA2\",15\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RAP\",14\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJ6\",13\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RP6\",13\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RP4\",12\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RTE\",11\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RVR\",11\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RC9\",8\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RYR\",8\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJ2\",12\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RN3\",8\r\n\"E09000013\",\"Hammersmith and Fulham\",\"REF\",8\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RF4\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWG\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RNZ\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWF\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RDZ\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RN5\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RD1\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RGT\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RTP\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RA7\",6\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RXQ\",6\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RVJ\",6\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RXH\",6\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RD3\",6\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RRK\",7\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RKE\",6\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RDE\",6\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RTK\",5\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RVV\",5\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RBA\",5\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RM1\",5\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RA4\",5\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RNS\",5\r\n\"E09000013\",\"Hammersmith and Fulham\",\"R0A\",5\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RXK\",4\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RHW\",4\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RBD\",4\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RAN\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RHM\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"R1F\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWH\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RD8\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RBT\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RR8\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RKB\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RXW\",3\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RK9\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RGR\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RM3\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWY\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RXP\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RCB\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RQ8\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RGP\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RH8\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJC\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"REM\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RW6\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RQW\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RBZ\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RGN\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RNA\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RXC\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RTG\",2\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RTR\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWA\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RA9\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RAE\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RPG\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RC1\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWE\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RGM\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RN7\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RTD\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWJ\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RBN\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RHU\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJR\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RV3\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RVY\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RX1\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"R1J\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RCF\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RCX\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RHQ\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RPA\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWK\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RXT\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RCD\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RDD\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RJN\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"R0B\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RNQ\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RQY\",1\r\n\"E09000013\",\"Hammersmith and Fulham\",\"RWD\",1\r\n\"E09000014\",\"Haringey\",\"RAP\",10290\r\n\"E09000014\",\"Haringey\",\"RKE\",5669\r\n\"E09000014\",\"Haringey\",\"RAL\",1737\r\n\"E09000014\",\"Haringey\",\"RRV\",1753\r\n\"E09000014\",\"Haringey\",\"R1H\",961\r\n\"E09000014\",\"Haringey\",\"RQX\",918\r\n\"E09000014\",\"Haringey\",\"RJ1\",220\r\n\"E09000014\",\"Haringey\",\"RYJ\",188\r\n\"E09000014\",\"Haringey\",\"R1K\",84\r\n\"E09000014\",\"Haringey\",\"RQM\",79\r\n\"E09000014\",\"Haringey\",\"RP6\",73\r\n\"E09000014\",\"Haringey\",\"RWK\",58\r\n\"E09000014\",\"Haringey\",\"RJZ\",54\r\n\"E09000014\",\"Haringey\",\"RJ7\",39\r\n\"E09000014\",\"Haringey\",\"RWH\",28\r\n\"E09000014\",\"Haringey\",\"RF4\",27\r\n\"E09000014\",\"Haringey\",\"RP4\",24\r\n\"E09000014\",\"Haringey\",\"RQW\",23\r\n\"E09000014\",\"Haringey\",\"RJ2\",28\r\n\"E09000014\",\"Haringey\",\"RT3\",21\r\n\"E09000014\",\"Haringey\",\"RTH\",21\r\n\"E09000014\",\"Haringey\",\"RWG\",20\r\n\"E09000014\",\"Haringey\",\"RQ8\",20\r\n\"E09000014\",\"Haringey\",\"RAS\",16\r\n\"E09000014\",\"Haringey\",\"RDD\",14\r\n\"E09000014\",\"Haringey\",\"RDU\",14\r\n\"E09000014\",\"Haringey\",\"RDE\",12\r\n\"E09000014\",\"Haringey\",\"RVR\",10\r\n\"E09000014\",\"Haringey\",\"RTP\",10\r\n\"E09000014\",\"Haringey\",\"RGT\",8\r\n\"E09000014\",\"Haringey\",\"RC9\",8\r\n\"E09000014\",\"Haringey\",\"RJ6\",7\r\n\"E09000014\",\"Haringey\",\"REF\",7\r\n\"E09000014\",\"Haringey\",\"RXC\",7\r\n\"E09000014\",\"Haringey\",\"RGN\",7\r\n\"E09000014\",\"Haringey\",\"RTE\",7\r\n\"E09000014\",\"Haringey\",\"RHM\",7\r\n\"E09000014\",\"Haringey\",\"RAX\",7\r\n\"E09000014\",\"Haringey\",\"RVV\",7\r\n\"E09000014\",\"Haringey\",\"R0A\",6\r\n\"E09000014\",\"Haringey\",\"RPY\",6\r\n\"E09000014\",\"Haringey\",\"RRK\",12\r\n\"E09000014\",\"Haringey\",\"RXH\",6\r\n\"E09000014\",\"Haringey\",\"RYR\",6\r\n\"E09000014\",\"Haringey\",\"RAT\",6\r\n\"E09000014\",\"Haringey\",\"RD3\",6\r\n\"E09000014\",\"Haringey\",\"RAJ\",6\r\n\"E09000014\",\"Haringey\",\"RM1\",6\r\n\"E09000014\",\"Haringey\",\"RWF\",6\r\n\"E09000014\",\"Haringey\",\"RDZ\",5\r\n\"E09000014\",\"Haringey\",\"RC1\",5\r\n\"E09000014\",\"Haringey\",\"RGR\",5\r\n\"E09000014\",\"Haringey\",\"RN7\",5\r\n\"E09000014\",\"Haringey\",\"RCB\",5\r\n\"E09000014\",\"Haringey\",\"RXQ\",5\r\n\"E09000014\",\"Haringey\",\"RA9\",4\r\n\"E09000014\",\"Haringey\",\"RD8\",4\r\n\"E09000014\",\"Haringey\",\"RJC\",4\r\n\"E09000014\",\"Haringey\",\"RV3\",4\r\n\"E09000014\",\"Haringey\",\"RTG\",5\r\n\"E09000014\",\"Haringey\",\"R1F\",4\r\n\"E09000014\",\"Haringey\",\"RA7\",4\r\n\"E09000014\",\"Haringey\",\"RBV\",3\r\n\"E09000014\",\"Haringey\",\"RNL\",3\r\n\"E09000014\",\"Haringey\",\"RQ3\",4\r\n\"E09000014\",\"Haringey\",\"RAN\",3\r\n\"E09000014\",\"Haringey\",\"RN5\",3\r\n\"E09000014\",\"Haringey\",\"RJE\",3\r\n\"E09000014\",\"Haringey\",\"RCX\",3\r\n\"E09000014\",\"Haringey\",\"REM\",4\r\n\"E09000014\",\"Haringey\",\"RGP\",2\r\n\"E09000014\",\"Haringey\",\"RHW\",2\r\n\"E09000014\",\"Haringey\",\"RJR\",2\r\n\"E09000014\",\"Haringey\",\"RVJ\",2\r\n\"E09000014\",\"Haringey\",\"RXW\",2\r\n\"E09000014\",\"Haringey\",\"R0B\",2\r\n\"E09000014\",\"Haringey\",\"RM3\",2\r\n\"E09000014\",\"Haringey\",\"RNZ\",2\r\n\"E09000014\",\"Haringey\",\"RAE\",2\r\n\"E09000014\",\"Haringey\",\"RD1\",2\r\n\"E09000014\",\"Haringey\",\"RNA\",2\r\n\"E09000014\",\"Haringey\",\"RTD\",2\r\n\"E09000014\",\"Haringey\",\"RJL\",2\r\n\"E09000014\",\"Haringey\",\"RBD\",2\r\n\"E09000014\",\"Haringey\",\"RTX\",2\r\n\"E09000014\",\"Haringey\",\"RXK\",3\r\n\"E09000014\",\"Haringey\",\"RA2\",2\r\n\"E09000014\",\"Haringey\",\"RN3\",2\r\n\"E09000014\",\"Haringey\",\"RNS\",2\r\n\"E09000014\",\"Haringey\",\"RBA\",2\r\n\"E09000014\",\"Haringey\",\"RK9\",2\r\n\"E09000014\",\"Haringey\",\"RA4\",2\r\n\"E09000014\",\"Haringey\",\"RNQ\",2\r\n\"E09000014\",\"Haringey\",\"RA3\",1\r\n\"E09000014\",\"Haringey\",\"RBL\",1\r\n\"E09000014\",\"Haringey\",\"RVW\",1\r\n\"E09000014\",\"Haringey\",\"RXN\",1\r\n\"E09000014\",\"Haringey\",\"RBS\",1\r\n\"E09000014\",\"Haringey\",\"RWA\",1\r\n\"E09000014\",\"Haringey\",\"RXL\",1\r\n\"E09000014\",\"Haringey\",\"RCD\",1\r\n\"E09000014\",\"Haringey\",\"RL4\",1\r\n\"E09000014\",\"Haringey\",\"RMC\",1\r\n\"E09000014\",\"Haringey\",\"RR8\",1\r\n\"E09000014\",\"Haringey\",\"RVN\",1\r\n\"E09000014\",\"Haringey\",\"RX3\",1\r\n\"E09000014\",\"Haringey\",\"RK5\",1\r\n\"E09000014\",\"Haringey\",\"RRE\",1\r\n\"E09000014\",\"Haringey\",\"RVY\",1\r\n\"E09000014\",\"Haringey\",\"RBT\",1\r\n\"E09000014\",\"Haringey\",\"RLQ\",1\r\n\"E09000014\",\"Haringey\",\"RPG\",1\r\n\"E09000014\",\"Haringey\",\"RTK\",1\r\n\"E09000014\",\"Haringey\",\"RW4\",1\r\n\"E09000014\",\"Haringey\",\"RFS\",1\r\n\"E09000014\",\"Haringey\",\"RWP\",1\r\n\"E09000014\",\"Haringey\",\"RXT\",1\r\n\"E09000014\",\"Haringey\",\"RX1\",1\r\n\"E09000014\",\"Haringey\",\"RXR\",1\r\n\"E09000014\",\"Haringey\",\"RBK\",1\r\n\"E09000014\",\"Haringey\",\"RKB\",1\r\n\"E09000014\",\"Haringey\",\"RPC\",1\r\n\"E09000014\",\"Haringey\",\"RXP\",1\r\n\"E09000014\",\"Haringey\",\"RXY\",1\r\n\"E09000015\",\"Harrow\",\"R1K\",23430\r\n\"E09000015\",\"Harrow\",\"RAL\",1320\r\n\"E09000015\",\"Harrow\",\"RYJ\",884\r\n\"E09000015\",\"Harrow\",\"RWG\",432\r\n\"E09000015\",\"Harrow\",\"RT3\",299\r\n\"E09000015\",\"Harrow\",\"RAS\",239\r\n\"E09000015\",\"Harrow\",\"RV3\",204\r\n\"E09000015\",\"Harrow\",\"RRV\",219\r\n\"E09000015\",\"Harrow\",\"RQM\",158\r\n\"E09000015\",\"Harrow\",\"RWH\",122\r\n\"E09000015\",\"Harrow\",\"R1H\",102\r\n\"E09000015\",\"Harrow\",\"RJ1\",94\r\n\"E09000015\",\"Harrow\",\"RP6\",34\r\n\"E09000015\",\"Harrow\",\"RC9\",34\r\n\"E09000015\",\"Harrow\",\"RDU\",31\r\n\"E09000015\",\"Harrow\",\"RJ7\",25\r\n\"E09000015\",\"Harrow\",\"RKE\",21\r\n\"E09000015\",\"Harrow\",\"RAX\",20\r\n\"E09000015\",\"Harrow\",\"RXQ\",17\r\n\"E09000015\",\"Harrow\",\"RJZ\",14\r\n\"E09000015\",\"Harrow\",\"RAP\",14\r\n\"E09000015\",\"Harrow\",\"RQX\",14\r\n\"E09000015\",\"Harrow\",\"RF4\",10\r\n\"E09000015\",\"Harrow\",\"RP4\",10\r\n\"E09000015\",\"Harrow\",\"RPY\",10\r\n\"E09000015\",\"Harrow\",\"RAN\",9\r\n\"E09000015\",\"Harrow\",\"RD8\",9\r\n\"E09000015\",\"Harrow\",\"RJ6\",9\r\n\"E09000015\",\"Harrow\",\"RVV\",8\r\n\"E09000015\",\"Harrow\",\"RVR\",7\r\n\"E09000015\",\"Harrow\",\"REF\",7\r\n\"E09000015\",\"Harrow\",\"RKB\",7\r\n\"E09000015\",\"Harrow\",\"RH8\",7\r\n\"E09000015\",\"Harrow\",\"RD3\",7\r\n\"E09000015\",\"Harrow\",\"RWE\",7\r\n\"E09000015\",\"Harrow\",\"RDZ\",7\r\n\"E09000015\",\"Harrow\",\"RHW\",6\r\n\"E09000015\",\"Harrow\",\"RWF\",6\r\n\"E09000015\",\"Harrow\",\"RJE\",6\r\n\"E09000015\",\"Harrow\",\"RA7\",6\r\n\"E09000015\",\"Harrow\",\"RHQ\",5\r\n\"E09000015\",\"Harrow\",\"RGT\",5\r\n\"E09000015\",\"Harrow\",\"R0A\",5\r\n\"E09000015\",\"Harrow\",\"RRK\",8\r\n\"E09000015\",\"Harrow\",\"RXK\",7\r\n\"E09000015\",\"Harrow\",\"RTK\",4\r\n\"E09000015\",\"Harrow\",\"RTH\",4\r\n\"E09000015\",\"Harrow\",\"RA2\",3\r\n\"E09000015\",\"Harrow\",\"RJ2\",6\r\n\"E09000015\",\"Harrow\",\"RN3\",3\r\n\"E09000015\",\"Harrow\",\"RBA\",3\r\n\"E09000015\",\"Harrow\",\"RDD\",3\r\n\"E09000015\",\"Harrow\",\"RTP\",3\r\n\"E09000015\",\"Harrow\",\"RX1\",3\r\n\"E09000015\",\"Harrow\",\"R1L\",3\r\n\"E09000015\",\"Harrow\",\"RHM\",3\r\n\"E09000015\",\"Harrow\",\"RWK\",3\r\n\"E09000015\",\"Harrow\",\"REM\",4\r\n\"E09000015\",\"Harrow\",\"RA9\",2\r\n\"E09000015\",\"Harrow\",\"RJC\",2\r\n\"E09000015\",\"Harrow\",\"RN5\",2\r\n\"E09000015\",\"Harrow\",\"RA4\",2\r\n\"E09000015\",\"Harrow\",\"RMP\",2\r\n\"E09000015\",\"Harrow\",\"RAE\",2\r\n\"E09000015\",\"Harrow\",\"RBT\",2\r\n\"E09000015\",\"Harrow\",\"RCF\",2\r\n\"E09000015\",\"Harrow\",\"RCX\",2\r\n\"E09000015\",\"Harrow\",\"RQW\",2\r\n\"E09000015\",\"Harrow\",\"RTR\",3\r\n\"E09000015\",\"Harrow\",\"RVJ\",2\r\n\"E09000015\",\"Harrow\",\"RW6\",2\r\n\"E09000015\",\"Harrow\",\"RAT\",2\r\n\"E09000015\",\"Harrow\",\"RYR\",2\r\n\"E09000015\",\"Harrow\",\"RMC\",2\r\n\"E09000015\",\"Harrow\",\"RWW\",2\r\n\"E09000015\",\"Harrow\",\"RCD\",2\r\n\"E09000015\",\"Harrow\",\"RQ8\",2\r\n\"E09000015\",\"Harrow\",\"RM1\",2\r\n\"E09000015\",\"Harrow\",\"R1F\",2\r\n\"E09000015\",\"Harrow\",\"RD1\",2\r\n\"E09000015\",\"Harrow\",\"RFS\",2\r\n\"E09000015\",\"Harrow\",\"RR8\",2\r\n\"E09000015\",\"Harrow\",\"RFF\",1\r\n\"E09000015\",\"Harrow\",\"RGM\",1\r\n\"E09000015\",\"Harrow\",\"RGN\",1\r\n\"E09000015\",\"Harrow\",\"RWD\",1\r\n\"E09000015\",\"Harrow\",\"RXH\",1\r\n\"E09000015\",\"Harrow\",\"RAJ\",1\r\n\"E09000015\",\"Harrow\",\"RLQ\",1\r\n\"E09000015\",\"Harrow\",\"RN7\",1\r\n\"E09000015\",\"Harrow\",\"RNS\",1\r\n\"E09000015\",\"Harrow\",\"RRF\",1\r\n\"E09000015\",\"Harrow\",\"RTD\",1\r\n\"E09000015\",\"Harrow\",\"RXC\",1\r\n\"E09000015\",\"Harrow\",\"RTE\",1\r\n\"E09000015\",\"Harrow\",\"RTG\",1\r\n\"E09000015\",\"Harrow\",\"RW1\",1\r\n\"E09000015\",\"Harrow\",\"RWJ\",1\r\n\"E09000015\",\"Harrow\",\"RX2\",1\r\n\"E09000015\",\"Harrow\",\"RXP\",1\r\n\"E09000015\",\"Harrow\",\"RHU\",1\r\n\"E09000015\",\"Harrow\",\"RNZ\",1\r\n\"E09000015\",\"Harrow\",\"RPC\",1\r\n\"E09000015\",\"Harrow\",\"RTF\",1\r\n\"E09000015\",\"Harrow\",\"RWA\",1\r\n\"E09000015\",\"Harrow\",\"RWP\",1\r\n\"E09000015\",\"Harrow\",\"RWX\",1\r\n\"E09000015\",\"Harrow\",\"RDE\",1\r\n\"E09000015\",\"Harrow\",\"RGP\",1\r\n\"E09000015\",\"Harrow\",\"RK5\",1\r\n\"E09000015\",\"Harrow\",\"RQ3\",1\r\n\"E09000015\",\"Harrow\",\"RXL\",1\r\n\"E09000015\",\"Harrow\",\"RBK\",1\r\n\"E09000015\",\"Harrow\",\"RC1\",1\r\n\"E09000015\",\"Harrow\",\"RGR\",1\r\n\"E09000015\",\"Harrow\",\"RJL\",1\r\n\"E09000015\",\"Harrow\",\"RL4\",1\r\n\"E09000015\",\"Harrow\",\"RPA\",1\r\n\"E09000015\",\"Harrow\",\"RM3\",1\r\n\"E09000015\",\"Harrow\",\"RP5\",1\r\n\"E09000016\",\"Havering\",\"RF4\",22508\r\n\"E09000016\",\"Havering\",\"R1H\",1321\r\n\"E09000016\",\"Havering\",\"RQ8\",310\r\n\"E09000016\",\"Havering\",\"RDD\",320\r\n\"E09000016\",\"Havering\",\"RAT\",137\r\n\"E09000016\",\"Havering\",\"RJ1\",88\r\n\"E09000016\",\"Havering\",\"RRV\",98\r\n\"E09000016\",\"Havering\",\"RP6\",77\r\n\"E09000016\",\"Havering\",\"RQX\",56\r\n\"E09000016\",\"Havering\",\"RAJ\",56\r\n\"E09000016\",\"Havering\",\"RDE\",51\r\n\"E09000016\",\"Havering\",\"RYJ\",44\r\n\"E09000016\",\"Havering\",\"RQW\",41\r\n\"E09000016\",\"Havering\",\"RAL\",37\r\n\"E09000016\",\"Havering\",\"RQM\",27\r\n\"E09000016\",\"Havering\",\"RJZ\",24\r\n\"E09000016\",\"Havering\",\"RN7\",21\r\n\"E09000016\",\"Havering\",\"RAP\",20\r\n\"E09000016\",\"Havering\",\"RT3\",18\r\n\"E09000016\",\"Havering\",\"RM1\",16\r\n\"E09000016\",\"Havering\",\"RJ7\",16\r\n\"E09000016\",\"Havering\",\"R1K\",16\r\n\"E09000016\",\"Havering\",\"RVV\",13\r\n\"E09000016\",\"Havering\",\"RGP\",12\r\n\"E09000016\",\"Havering\",\"RJ2\",18\r\n\"E09000016\",\"Havering\",\"RGT\",10\r\n\"E09000016\",\"Havering\",\"RDU\",10\r\n\"E09000016\",\"Havering\",\"RP4\",10\r\n\"E09000016\",\"Havering\",\"RKE\",9\r\n\"E09000016\",\"Havering\",\"RWK\",9\r\n\"E09000016\",\"Havering\",\"RTP\",9\r\n\"E09000016\",\"Havering\",\"R1L\",8\r\n\"E09000016\",\"Havering\",\"RGR\",7\r\n\"E09000016\",\"Havering\",\"RYR\",7\r\n\"E09000016\",\"Havering\",\"RAX\",7\r\n\"E09000016\",\"Havering\",\"RWF\",7\r\n\"E09000016\",\"Havering\",\"RWH\",7\r\n\"E09000016\",\"Havering\",\"REF\",7\r\n\"E09000016\",\"Havering\",\"RXH\",6\r\n\"E09000016\",\"Havering\",\"RTH\",6\r\n\"E09000016\",\"Havering\",\"RAS\",6\r\n\"E09000016\",\"Havering\",\"RD8\",5\r\n\"E09000016\",\"Havering\",\"RWE\",5\r\n\"E09000016\",\"Havering\",\"RPY\",5\r\n\"E09000016\",\"Havering\",\"RA2\",5\r\n\"E09000016\",\"Havering\",\"RCX\",5\r\n\"E09000016\",\"Havering\",\"RAN\",5\r\n\"E09000016\",\"Havering\",\"RW6\",5\r\n\"E09000016\",\"Havering\",\"RGM\",4\r\n\"E09000016\",\"Havering\",\"RGN\",4\r\n\"E09000016\",\"Havering\",\"RA9\",4\r\n\"E09000016\",\"Havering\",\"RBA\",4\r\n\"E09000016\",\"Havering\",\"RXK\",4\r\n\"E09000016\",\"Havering\",\"RCD\",4\r\n\"E09000016\",\"Havering\",\"RWG\",4\r\n\"E09000016\",\"Havering\",\"RXC\",4\r\n\"E09000016\",\"Havering\",\"RHM\",4\r\n\"E09000016\",\"Havering\",\"RK9\",3\r\n\"E09000016\",\"Havering\",\"RDZ\",3\r\n\"E09000016\",\"Havering\",\"RNS\",3\r\n\"E09000016\",\"Havering\",\"RJL\",3\r\n\"E09000016\",\"Havering\",\"RN3\",3\r\n\"E09000016\",\"Havering\",\"RN5\",3\r\n\"E09000016\",\"Havering\",\"RC9\",3\r\n\"E09000016\",\"Havering\",\"RTE\",3\r\n\"E09000016\",\"Havering\",\"RBD\",3\r\n\"E09000016\",\"Havering\",\"RRK\",5\r\n\"E09000016\",\"Havering\",\"RTR\",2\r\n\"E09000016\",\"Havering\",\"R0A\",2\r\n\"E09000016\",\"Havering\",\"RCB\",2\r\n\"E09000016\",\"Havering\",\"RTK\",2\r\n\"E09000016\",\"Havering\",\"RR8\",2\r\n\"E09000016\",\"Havering\",\"RAE\",2\r\n\"E09000016\",\"Havering\",\"RPA\",2\r\n\"E09000016\",\"Havering\",\"RD1\",2\r\n\"E09000016\",\"Havering\",\"RHU\",2\r\n\"E09000016\",\"Havering\",\"RJE\",2\r\n\"E09000016\",\"Havering\",\"RTD\",2\r\n\"E09000016\",\"Havering\",\"RA3\",2\r\n\"E09000016\",\"Havering\",\"RH8\",2\r\n\"E09000016\",\"Havering\",\"REM\",3\r\n\"E09000016\",\"Havering\",\"RRF\",2\r\n\"E09000016\",\"Havering\",\"R1F\",1\r\n\"E09000016\",\"Havering\",\"RKB\",1\r\n\"E09000016\",\"Havering\",\"RMC\",1\r\n\"E09000016\",\"Havering\",\"RTX\",1\r\n\"E09000016\",\"Havering\",\"RC1\",1\r\n\"E09000016\",\"Havering\",\"RTG\",2\r\n\"E09000016\",\"Havering\",\"RVJ\",1\r\n\"E09000016\",\"Havering\",\"RBZ\",1\r\n\"E09000016\",\"Havering\",\"RJ6\",1\r\n\"E09000016\",\"Havering\",\"RK5\",1\r\n\"E09000016\",\"Havering\",\"RNL\",1\r\n\"E09000016\",\"Havering\",\"RNU\",1\r\n\"E09000016\",\"Havering\",\"RQ3\",1\r\n\"E09000016\",\"Havering\",\"RTF\",1\r\n\"E09000016\",\"Havering\",\"RBK\",1\r\n\"E09000016\",\"Havering\",\"RNA\",1\r\n\"E09000016\",\"Havering\",\"RA4\",1\r\n\"E09000016\",\"Havering\",\"RA7\",1\r\n\"E09000016\",\"Havering\",\"RCU\",1\r\n\"E09000016\",\"Havering\",\"RV3\",1\r\n\"E09000016\",\"Havering\",\"RWD\",1\r\n\"E09000016\",\"Havering\",\"RWJ\",1\r\n\"E09000016\",\"Havering\",\"RBL\",1\r\n\"E09000016\",\"Havering\",\"RBN\",1\r\n\"E09000016\",\"Havering\",\"RBS\",1\r\n\"E09000016\",\"Havering\",\"RM3\",1\r\n\"E09000016\",\"Havering\",\"RP5\",1\r\n\"E09000016\",\"Havering\",\"RVR\",1\r\n\"E09000016\",\"Havering\",\"RMY\",1\r\n\"E09000016\",\"Havering\",\"RX1\",1\r\n\"E09000016\",\"Havering\",\"RXP\",1\r\n\"E09000016\",\"Havering\",\"RXQ\",1\r\n\"E09000017\",\"Hillingdon\",\"RAS\",20218\r\n\"E09000017\",\"Hillingdon\",\"R1K\",4317\r\n\"E09000017\",\"Hillingdon\",\"RYJ\",1151\r\n\"E09000017\",\"Hillingdon\",\"RWG\",680\r\n\"E09000017\",\"Hillingdon\",\"RT3\",537\r\n\"E09000017\",\"Hillingdon\",\"RQM\",501\r\n\"E09000017\",\"Hillingdon\",\"RDU\",359\r\n\"E09000017\",\"Hillingdon\",\"RWH\",301\r\n\"E09000017\",\"Hillingdon\",\"RV3\",148\r\n\"E09000017\",\"Hillingdon\",\"RAL\",110\r\n\"E09000017\",\"Hillingdon\",\"RRV\",110\r\n\"E09000017\",\"Hillingdon\",\"RJ1\",89\r\n\"E09000017\",\"Hillingdon\",\"R1H\",61\r\n\"E09000017\",\"Hillingdon\",\"RJ7\",44\r\n\"E09000017\",\"Hillingdon\",\"RXQ\",33\r\n\"E09000017\",\"Hillingdon\",\"RTK\",31\r\n\"E09000017\",\"Hillingdon\",\"RYR\",22\r\n\"E09000017\",\"Hillingdon\",\"RP4\",22\r\n\"E09000017\",\"Hillingdon\",\"RJZ\",19\r\n\"E09000017\",\"Hillingdon\",\"RF4\",18\r\n\"E09000017\",\"Hillingdon\",\"RTH\",15\r\n\"E09000017\",\"Hillingdon\",\"RD8\",14\r\n\"E09000017\",\"Hillingdon\",\"RAX\",14\r\n\"E09000017\",\"Hillingdon\",\"RHW\",14\r\n\"E09000017\",\"Hillingdon\",\"RHU\",12\r\n\"E09000017\",\"Hillingdon\",\"RA2\",12\r\n\"E09000017\",\"Hillingdon\",\"RC9\",12\r\n\"E09000017\",\"Hillingdon\",\"RP6\",12\r\n\"E09000017\",\"Hillingdon\",\"RBA\",10\r\n\"E09000017\",\"Hillingdon\",\"RD3\",10\r\n\"E09000017\",\"Hillingdon\",\"RQX\",10\r\n\"E09000017\",\"Hillingdon\",\"RGT\",10\r\n\"E09000017\",\"Hillingdon\",\"RXH\",9\r\n\"E09000017\",\"Hillingdon\",\"RHM\",9\r\n\"E09000017\",\"Hillingdon\",\"RJ6\",9\r\n\"E09000017\",\"Hillingdon\",\"RKE\",9\r\n\"E09000017\",\"Hillingdon\",\"RVV\",8\r\n\"E09000017\",\"Hillingdon\",\"RAP\",8\r\n\"E09000017\",\"Hillingdon\",\"RA9\",8\r\n\"E09000017\",\"Hillingdon\",\"RVR\",8\r\n\"E09000017\",\"Hillingdon\",\"RDE\",8\r\n\"E09000017\",\"Hillingdon\",\"RBK\",7\r\n\"E09000017\",\"Hillingdon\",\"RBZ\",7\r\n\"E09000017\",\"Hillingdon\",\"RAN\",7\r\n\"E09000017\",\"Hillingdon\",\"RDZ\",7\r\n\"E09000017\",\"Hillingdon\",\"RX1\",6\r\n\"E09000017\",\"Hillingdon\",\"RKB\",6\r\n\"E09000017\",\"Hillingdon\",\"R1F\",6\r\n\"E09000017\",\"Hillingdon\",\"RJ2\",8\r\n\"E09000017\",\"Hillingdon\",\"RWE\",6\r\n\"E09000017\",\"Hillingdon\",\"R0A\",5\r\n\"E09000017\",\"Hillingdon\",\"RGP\",5\r\n\"E09000017\",\"Hillingdon\",\"RJE\",5\r\n\"E09000017\",\"Hillingdon\",\"RM1\",5\r\n\"E09000017\",\"Hillingdon\",\"REF\",5\r\n\"E09000017\",\"Hillingdon\",\"RVJ\",5\r\n\"E09000017\",\"Hillingdon\",\"RTD\",4\r\n\"E09000017\",\"Hillingdon\",\"RXK\",7\r\n\"E09000017\",\"Hillingdon\",\"RAJ\",4\r\n\"E09000017\",\"Hillingdon\",\"RRK\",6\r\n\"E09000017\",\"Hillingdon\",\"RWD\",4\r\n\"E09000017\",\"Hillingdon\",\"RXC\",4\r\n\"E09000017\",\"Hillingdon\",\"RC1\",4\r\n\"E09000017\",\"Hillingdon\",\"RCX\",4\r\n\"E09000017\",\"Hillingdon\",\"RJC\",4\r\n\"E09000017\",\"Hillingdon\",\"RTP\",4\r\n\"E09000017\",\"Hillingdon\",\"RD1\",4\r\n\"E09000017\",\"Hillingdon\",\"RHQ\",4\r\n\"E09000017\",\"Hillingdon\",\"RLQ\",4\r\n\"E09000017\",\"Hillingdon\",\"RN5\",4\r\n\"E09000017\",\"Hillingdon\",\"RBD\",4\r\n\"E09000017\",\"Hillingdon\",\"RPY\",4\r\n\"E09000017\",\"Hillingdon\",\"RAE\",3\r\n\"E09000017\",\"Hillingdon\",\"RMC\",3\r\n\"E09000017\",\"Hillingdon\",\"RN3\",3\r\n\"E09000017\",\"Hillingdon\",\"RQ8\",3\r\n\"E09000017\",\"Hillingdon\",\"RDY\",3\r\n\"E09000017\",\"Hillingdon\",\"RN7\",3\r\n\"E09000017\",\"Hillingdon\",\"REM\",4\r\n\"E09000017\",\"Hillingdon\",\"RNS\",3\r\n\"E09000017\",\"Hillingdon\",\"RTX\",3\r\n\"E09000017\",\"Hillingdon\",\"RWF\",3\r\n\"E09000017\",\"Hillingdon\",\"RBL\",2\r\n\"E09000017\",\"Hillingdon\",\"RL4\",2\r\n\"E09000017\",\"Hillingdon\",\"RWK\",2\r\n\"E09000017\",\"Hillingdon\",\"RNL\",2\r\n\"E09000017\",\"Hillingdon\",\"RQW\",2\r\n\"E09000017\",\"Hillingdon\",\"RA7\",2\r\n\"E09000017\",\"Hillingdon\",\"RBN\",2\r\n\"E09000017\",\"Hillingdon\",\"RTE\",2\r\n\"E09000017\",\"Hillingdon\",\"RH8\",2\r\n\"E09000017\",\"Hillingdon\",\"RXR\",2\r\n\"E09000017\",\"Hillingdon\",\"RCB\",2\r\n\"E09000017\",\"Hillingdon\",\"RA4\",2\r\n\"E09000017\",\"Hillingdon\",\"RGR\",2\r\n\"E09000017\",\"Hillingdon\",\"RJR\",2\r\n\"E09000017\",\"Hillingdon\",\"RK9\",2\r\n\"E09000017\",\"Hillingdon\",\"RXL\",2\r\n\"E09000017\",\"Hillingdon\",\"RDD\",2\r\n\"E09000017\",\"Hillingdon\",\"RPA\",2\r\n\"E09000017\",\"Hillingdon\",\"RR8\",1\r\n\"E09000017\",\"Hillingdon\",\"RFR\",1\r\n\"E09000017\",\"Hillingdon\",\"RFS\",1\r\n\"E09000017\",\"Hillingdon\",\"RGN\",1\r\n\"E09000017\",\"Hillingdon\",\"RNU\",1\r\n\"E09000017\",\"Hillingdon\",\"RNZ\",1\r\n\"E09000017\",\"Hillingdon\",\"RQ3\",1\r\n\"E09000017\",\"Hillingdon\",\"RTF\",1\r\n\"E09000017\",\"Hillingdon\",\"RVW\",1\r\n\"E09000017\",\"Hillingdon\",\"RW6\",1\r\n\"E09000017\",\"Hillingdon\",\"RCF\",1\r\n\"E09000017\",\"Hillingdon\",\"RQY\",1\r\n\"E09000017\",\"Hillingdon\",\"RW1\",1\r\n\"E09000017\",\"Hillingdon\",\"RA3\",1\r\n\"E09000017\",\"Hillingdon\",\"RBS\",1\r\n\"E09000017\",\"Hillingdon\",\"RET\",1\r\n\"E09000017\",\"Hillingdon\",\"RFF\",1\r\n\"E09000017\",\"Hillingdon\",\"RNA\",1\r\n\"E09000017\",\"Hillingdon\",\"RNQ\",1\r\n\"E09000017\",\"Hillingdon\",\"RGM\",1\r\n\"E09000017\",\"Hillingdon\",\"RRF\",1\r\n\"E09000017\",\"Hillingdon\",\"RWJ\",1\r\n\"E09000017\",\"Hillingdon\",\"RCU\",1\r\n\"E09000017\",\"Hillingdon\",\"RK5\",1\r\n\"E09000017\",\"Hillingdon\",\"RWA\",1\r\n\"E09000017\",\"Hillingdon\",\"RXW\",1\r\n\"E09000017\",\"Hillingdon\",\"RBT\",1\r\n\"E09000017\",\"Hillingdon\",\"RVN\",1\r\n\"E09000017\",\"Hillingdon\",\"RWP\",1\r\n\"E09000018\",\"Hounslow\",\"RQM\",25546\r\n\"E09000018\",\"Hounslow\",\"RYJ\",3443\r\n\"E09000018\",\"Hounslow\",\"R1K\",1045\r\n\"E09000018\",\"Hounslow\",\"RTK\",516\r\n\"E09000018\",\"Hounslow\",\"RAX\",395\r\n\"E09000018\",\"Hounslow\",\"RAS\",262\r\n\"E09000018\",\"Hounslow\",\"RJ7\",136\r\n\"E09000018\",\"Hounslow\",\"RJ1\",120\r\n\"E09000018\",\"Hounslow\",\"RDU\",118\r\n\"E09000018\",\"Hounslow\",\"RRV\",114\r\n\"E09000018\",\"Hounslow\",\"R1H\",72\r\n\"E09000018\",\"Hounslow\",\"RPY\",68\r\n\"E09000018\",\"Hounslow\",\"RT3\",61\r\n\"E09000018\",\"Hounslow\",\"RA2\",54\r\n\"E09000018\",\"Hounslow\",\"RJZ\",32\r\n\"E09000018\",\"Hounslow\",\"RAL\",31\r\n\"E09000018\",\"Hounslow\",\"RVR\",29\r\n\"E09000018\",\"Hounslow\",\"RP6\",25\r\n\"E09000018\",\"Hounslow\",\"RJ6\",17\r\n\"E09000018\",\"Hounslow\",\"RHW\",17\r\n\"E09000018\",\"Hounslow\",\"RP4\",16\r\n\"E09000018\",\"Hounslow\",\"RTP\",14\r\n\"E09000018\",\"Hounslow\",\"RXQ\",13\r\n\"E09000018\",\"Hounslow\",\"RWG\",13\r\n\"E09000018\",\"Hounslow\",\"RHU\",13\r\n\"E09000018\",\"Hounslow\",\"RYR\",12\r\n\"E09000018\",\"Hounslow\",\"RTH\",12\r\n\"E09000018\",\"Hounslow\",\"RHM\",11\r\n\"E09000018\",\"Hounslow\",\"RC9\",11\r\n\"E09000018\",\"Hounslow\",\"RWH\",11\r\n\"E09000018\",\"Hounslow\",\"RDZ\",10\r\n\"E09000018\",\"Hounslow\",\"RAP\",10\r\n\"E09000018\",\"Hounslow\",\"RQX\",9\r\n\"E09000018\",\"Hounslow\",\"RWF\",8\r\n\"E09000018\",\"Hounslow\",\"RVV\",8\r\n\"E09000018\",\"Hounslow\",\"RXH\",7\r\n\"E09000018\",\"Hounslow\",\"RKE\",7\r\n\"E09000018\",\"Hounslow\",\"RF4\",7\r\n\"E09000018\",\"Hounslow\",\"RJ2\",10\r\n\"E09000018\",\"Hounslow\",\"RK9\",6\r\n\"E09000018\",\"Hounslow\",\"RRK\",8\r\n\"E09000018\",\"Hounslow\",\"RV3\",6\r\n\"E09000018\",\"Hounslow\",\"RXC\",6\r\n\"E09000018\",\"Hounslow\",\"RXK\",8\r\n\"E09000018\",\"Hounslow\",\"RBA\",6\r\n\"E09000018\",\"Hounslow\",\"RN7\",6\r\n\"E09000018\",\"Hounslow\",\"REF\",6\r\n\"E09000018\",\"Hounslow\",\"RGT\",6\r\n\"E09000018\",\"Hounslow\",\"RN3\",5\r\n\"E09000018\",\"Hounslow\",\"RD3\",5\r\n\"E09000018\",\"Hounslow\",\"RGN\",5\r\n\"E09000018\",\"Hounslow\",\"RH8\",5\r\n\"E09000018\",\"Hounslow\",\"RD1\",4\r\n\"E09000018\",\"Hounslow\",\"RDE\",4\r\n\"E09000018\",\"Hounslow\",\"RQ8\",4\r\n\"E09000018\",\"Hounslow\",\"RWE\",4\r\n\"E09000018\",\"Hounslow\",\"RJC\",4\r\n\"E09000018\",\"Hounslow\",\"RKB\",4\r\n\"E09000018\",\"Hounslow\",\"RN5\",4\r\n\"E09000018\",\"Hounslow\",\"RNZ\",4\r\n\"E09000018\",\"Hounslow\",\"RQW\",4\r\n\"E09000018\",\"Hounslow\",\"RTE\",3\r\n\"E09000018\",\"Hounslow\",\"R1F\",3\r\n\"E09000018\",\"Hounslow\",\"RAE\",3\r\n\"E09000018\",\"Hounslow\",\"RDD\",4\r\n\"E09000018\",\"Hounslow\",\"RNS\",3\r\n\"E09000018\",\"Hounslow\",\"RXL\",3\r\n\"E09000018\",\"Hounslow\",\"RXX\",3\r\n\"E09000018\",\"Hounslow\",\"RWD\",3\r\n\"E09000018\",\"Hounslow\",\"RWP\",3\r\n\"E09000018\",\"Hounslow\",\"RQY\",3\r\n\"E09000018\",\"Hounslow\",\"RA4\",3\r\n\"E09000018\",\"Hounslow\",\"RBZ\",3\r\n\"E09000018\",\"Hounslow\",\"RTR\",4\r\n\"E09000018\",\"Hounslow\",\"RJL\",2\r\n\"E09000018\",\"Hounslow\",\"RVJ\",2\r\n\"E09000018\",\"Hounslow\",\"RJE\",2\r\n\"E09000018\",\"Hounslow\",\"R0B\",3\r\n\"E09000018\",\"Hounslow\",\"RWX\",2\r\n\"E09000018\",\"Hounslow\",\"RXP\",2\r\n\"E09000018\",\"Hounslow\",\"RAN\",2\r\n\"E09000018\",\"Hounslow\",\"RC1\",2\r\n\"E09000018\",\"Hounslow\",\"RLQ\",2\r\n\"E09000018\",\"Hounslow\",\"RX1\",2\r\n\"E09000018\",\"Hounslow\",\"RA9\",2\r\n\"E09000018\",\"Hounslow\",\"RBD\",2\r\n\"E09000018\",\"Hounslow\",\"RQ3\",2\r\n\"E09000018\",\"Hounslow\",\"RW6\",2\r\n\"E09000018\",\"Hounslow\",\"RCX\",2\r\n\"E09000018\",\"Hounslow\",\"RPC\",2\r\n\"E09000018\",\"Hounslow\",\"RTG\",2\r\n\"E09000018\",\"Hounslow\",\"RXR\",3\r\n\"E09000018\",\"Hounslow\",\"RMP\",2\r\n\"E09000018\",\"Hounslow\",\"RV5\",2\r\n\"E09000018\",\"Hounslow\",\"RCF\",2\r\n\"E09000018\",\"Hounslow\",\"RR8\",2\r\n\"E09000018\",\"Hounslow\",\"RH5\",1\r\n\"E09000018\",\"Hounslow\",\"RK5\",1\r\n\"E09000018\",\"Hounslow\",\"RVW\",1\r\n\"E09000018\",\"Hounslow\",\"RBT\",1\r\n\"E09000018\",\"Hounslow\",\"REM\",1\r\n\"E09000018\",\"Hounslow\",\"RFF\",1\r\n\"E09000018\",\"Hounslow\",\"RJR\",1\r\n\"E09000018\",\"Hounslow\",\"RM1\",1\r\n\"E09000018\",\"Hounslow\",\"RA7\",1\r\n\"E09000018\",\"Hounslow\",\"RAJ\",1\r\n\"E09000018\",\"Hounslow\",\"RNU\",1\r\n\"E09000018\",\"Hounslow\",\"RPA\",1\r\n\"E09000018\",\"Hounslow\",\"RTD\",1\r\n\"E09000018\",\"Hounslow\",\"RWY\",1\r\n\"E09000018\",\"Hounslow\",\"R0A\",1\r\n\"E09000018\",\"Hounslow\",\"RBN\",1\r\n\"E09000018\",\"Hounslow\",\"RD8\",1\r\n\"E09000018\",\"Hounslow\",\"RFS\",1\r\n\"E09000018\",\"Hounslow\",\"RTF\",1\r\n\"E09000018\",\"Hounslow\",\"RGM\",1\r\n\"E09000018\",\"Hounslow\",\"RXW\",1\r\n\"E09000018\",\"Hounslow\",\"RBS\",1\r\n\"E09000018\",\"Hounslow\",\"RGP\",1\r\n\"E09000018\",\"Hounslow\",\"RL4\",1\r\n\"E09000018\",\"Hounslow\",\"RNQ\",1\r\n\"E09000018\",\"Hounslow\",\"RMY\",1\r\n\"E09000018\",\"Hounslow\",\"RTX\",1\r\n\"E09000019\",\"Islington\",\"RRV\",7681\r\n\"E09000019\",\"Islington\",\"RKE\",6591\r\n\"E09000019\",\"Islington\",\"R1H\",995\r\n\"E09000019\",\"Islington\",\"RAL\",918\r\n\"E09000019\",\"Islington\",\"RQX\",816\r\n\"E09000019\",\"Islington\",\"RJ1\",246\r\n\"E09000019\",\"Islington\",\"RYJ\",150\r\n\"E09000019\",\"Islington\",\"RAP\",110\r\n\"E09000019\",\"Islington\",\"RQM\",67\r\n\"E09000019\",\"Islington\",\"RP6\",54\r\n\"E09000019\",\"Islington\",\"RJZ\",39\r\n\"E09000019\",\"Islington\",\"R1K\",34\r\n\"E09000019\",\"Islington\",\"RWK\",32\r\n\"E09000019\",\"Islington\",\"RJ7\",21\r\n\"E09000019\",\"Islington\",\"RF4\",21\r\n\"E09000019\",\"Islington\",\"RTH\",20\r\n\"E09000019\",\"Islington\",\"RP4\",18\r\n\"E09000019\",\"Islington\",\"RXH\",17\r\n\"E09000019\",\"Islington\",\"RDE\",16\r\n\"E09000019\",\"Islington\",\"RWH\",14\r\n\"E09000019\",\"Islington\",\"RJ2\",21\r\n\"E09000019\",\"Islington\",\"RWG\",13\r\n\"E09000019\",\"Islington\",\"RGT\",12\r\n\"E09000019\",\"Islington\",\"RAX\",11\r\n\"E09000019\",\"Islington\",\"RDU\",11\r\n\"E09000019\",\"Islington\",\"RC9\",10\r\n\"E09000019\",\"Islington\",\"RQW\",10\r\n\"E09000019\",\"Islington\",\"RDD\",9\r\n\"E09000019\",\"Islington\",\"RT3\",8\r\n\"E09000019\",\"Islington\",\"RA7\",8\r\n\"E09000019\",\"Islington\",\"RPA\",8\r\n\"E09000019\",\"Islington\",\"RVV\",7\r\n\"E09000019\",\"Islington\",\"RN3\",7\r\n\"E09000019\",\"Islington\",\"RWF\",7\r\n\"E09000019\",\"Islington\",\"RN5\",7\r\n\"E09000019\",\"Islington\",\"RTD\",6\r\n\"E09000019\",\"Islington\",\"R0A\",6\r\n\"E09000019\",\"Islington\",\"RAJ\",6\r\n\"E09000019\",\"Islington\",\"RAS\",6\r\n\"E09000019\",\"Islington\",\"RM1\",6\r\n\"E09000019\",\"Islington\",\"RKB\",6\r\n\"E09000019\",\"Islington\",\"RDZ\",6\r\n\"E09000019\",\"Islington\",\"RYR\",6\r\n\"E09000019\",\"Islington\",\"RH8\",6\r\n\"E09000019\",\"Islington\",\"RHM\",6\r\n\"E09000019\",\"Islington\",\"RQ8\",6\r\n\"E09000019\",\"Islington\",\"RN7\",6\r\n\"E09000019\",\"Islington\",\"RVJ\",5\r\n\"E09000019\",\"Islington\",\"RVR\",5\r\n\"E09000019\",\"Islington\",\"RXQ\",5\r\n\"E09000019\",\"Islington\",\"RGN\",5\r\n\"E09000019\",\"Islington\",\"REF\",5\r\n\"E09000019\",\"Islington\",\"RTE\",5\r\n\"E09000019\",\"Islington\",\"RXC\",5\r\n\"E09000019\",\"Islington\",\"RC1\",4\r\n\"E09000019\",\"Islington\",\"RK5\",4\r\n\"E09000019\",\"Islington\",\"RHW\",4\r\n\"E09000019\",\"Islington\",\"RPY\",4\r\n\"E09000019\",\"Islington\",\"RAN\",4\r\n\"E09000019\",\"Islington\",\"RAT\",4\r\n\"E09000019\",\"Islington\",\"RCX\",4\r\n\"E09000019\",\"Islington\",\"RA2\",3\r\n\"E09000019\",\"Islington\",\"REM\",3\r\n\"E09000019\",\"Islington\",\"RJ6\",3\r\n\"E09000019\",\"Islington\",\"RK9\",3\r\n\"E09000019\",\"Islington\",\"RWE\",3\r\n\"E09000019\",\"Islington\",\"RD1\",3\r\n\"E09000019\",\"Islington\",\"RJR\",3\r\n\"E09000019\",\"Islington\",\"RWW\",3\r\n\"E09000019\",\"Islington\",\"RXK\",3\r\n\"E09000019\",\"Islington\",\"RCB\",3\r\n\"E09000019\",\"Islington\",\"RNS\",3\r\n\"E09000019\",\"Islington\",\"RHU\",2\r\n\"E09000019\",\"Islington\",\"RR8\",2\r\n\"E09000019\",\"Islington\",\"RTP\",2\r\n\"E09000019\",\"Islington\",\"RD8\",2\r\n\"E09000019\",\"Islington\",\"RTG\",2\r\n\"E09000019\",\"Islington\",\"RXN\",2\r\n\"E09000019\",\"Islington\",\"RNA\",2\r\n\"E09000019\",\"Islington\",\"RRK\",3\r\n\"E09000019\",\"Islington\",\"RTX\",2\r\n\"E09000019\",\"Islington\",\"RBA\",2\r\n\"E09000019\",\"Islington\",\"RGP\",2\r\n\"E09000019\",\"Islington\",\"RNZ\",2\r\n\"E09000019\",\"Islington\",\"RAE\",1\r\n\"E09000019\",\"Islington\",\"RBD\",1\r\n\"E09000019\",\"Islington\",\"RLT\",1\r\n\"E09000019\",\"Islington\",\"RWP\",1\r\n\"E09000019\",\"Islington\",\"RXY\",1\r\n\"E09000019\",\"Islington\",\"RA9\",1\r\n\"E09000019\",\"Islington\",\"RTR\",1\r\n\"E09000019\",\"Islington\",\"RVW\",1\r\n\"E09000019\",\"Islington\",\"RBQ\",1\r\n\"E09000019\",\"Islington\",\"RBZ\",1\r\n\"E09000019\",\"Islington\",\"RJC\",1\r\n\"E09000019\",\"Islington\",\"RXF\",1\r\n\"E09000019\",\"Islington\",\"RBN\",1\r\n\"E09000019\",\"Islington\",\"RGM\",1\r\n\"E09000019\",\"Islington\",\"RA4\",1\r\n\"E09000019\",\"Islington\",\"RCF\",1\r\n\"E09000019\",\"Islington\",\"RFS\",1\r\n\"E09000019\",\"Islington\",\"RXL\",1\r\n\"E09000019\",\"Islington\",\"RCD\",1\r\n\"E09000019\",\"Islington\",\"RFR\",1\r\n\"E09000019\",\"Islington\",\"RHQ\",1\r\n\"E09000019\",\"Islington\",\"RQY\",1\r\n\"E09000019\",\"Islington\",\"RTF\",1\r\n\"E09000019\",\"Islington\",\"RX1\",1\r\n\"E09000019\",\"Islington\",\"RGR\",1\r\n\"E09000019\",\"Islington\",\"RJ8\",1\r\n\"E09000019\",\"Islington\",\"RLQ\",1\r\n\"E09000019\",\"Islington\",\"RNQ\",1\r\n\"E09000019\",\"Islington\",\"RP5\",1\r\n\"E09000019\",\"Islington\",\"RTK\",1\r\n\"E09000019\",\"Islington\",\"R1F\",1\r\n\"E09000019\",\"Islington\",\"RBS\",1\r\n\"E09000019\",\"Islington\",\"RV3\",1\r\n\"E09000019\",\"Islington\",\"RVY\",1\r\n\"E09000019\",\"Islington\",\"RW6\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RQM\",5562\r\n\"E09000020\",\"Kensington and Chelsea\",\"RYJ\",4599\r\n\"E09000020\",\"Kensington and Chelsea\",\"RV3\",195\r\n\"E09000020\",\"Kensington and Chelsea\",\"RJ1\",161\r\n\"E09000020\",\"Kensington and Chelsea\",\"RRV\",169\r\n\"E09000020\",\"Kensington and Chelsea\",\"RPY\",115\r\n\"E09000020\",\"Kensington and Chelsea\",\"R1H\",75\r\n\"E09000020\",\"Kensington and Chelsea\",\"R1K\",67\r\n\"E09000020\",\"Kensington and Chelsea\",\"RT3\",60\r\n\"E09000020\",\"Kensington and Chelsea\",\"RJ7\",56\r\n\"E09000020\",\"Kensington and Chelsea\",\"RAL\",54\r\n\"E09000020\",\"Kensington and Chelsea\",\"RJZ\",32\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTP\",18\r\n\"E09000020\",\"Kensington and Chelsea\",\"RAS\",16\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTH\",16\r\n\"E09000020\",\"Kensington and Chelsea\",\"RDU\",15\r\n\"E09000020\",\"Kensington and Chelsea\",\"RAX\",14\r\n\"E09000020\",\"Kensington and Chelsea\",\"RVR\",12\r\n\"E09000020\",\"Kensington and Chelsea\",\"RP6\",11\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWG\",11\r\n\"E09000020\",\"Kensington and Chelsea\",\"RYR\",10\r\n\"E09000020\",\"Kensington and Chelsea\",\"RQX\",10\r\n\"E09000020\",\"Kensington and Chelsea\",\"RA4\",9\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWH\",9\r\n\"E09000020\",\"Kensington and Chelsea\",\"RKE\",9\r\n\"E09000020\",\"Kensington and Chelsea\",\"RXH\",9\r\n\"E09000020\",\"Kensington and Chelsea\",\"RGT\",8\r\n\"E09000020\",\"Kensington and Chelsea\",\"RAP\",7\r\n\"E09000020\",\"Kensington and Chelsea\",\"RXC\",7\r\n\"E09000020\",\"Kensington and Chelsea\",\"RC1\",6\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWK\",6\r\n\"E09000020\",\"Kensington and Chelsea\",\"RN3\",6\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWF\",6\r\n\"E09000020\",\"Kensington and Chelsea\",\"RJ6\",6\r\n\"E09000020\",\"Kensington and Chelsea\",\"RHW\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RF4\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RVJ\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RVV\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RDE\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RN5\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RXQ\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RNZ\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RA2\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RP4\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RAT\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"REF\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RDZ\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RJC\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RRK\",5\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTE\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWE\",3\r\n\"E09000020\",\"Kensington and Chelsea\",\"RM3\",3\r\n\"E09000020\",\"Kensington and Chelsea\",\"RLQ\",3\r\n\"E09000020\",\"Kensington and Chelsea\",\"RD1\",3\r\n\"E09000020\",\"Kensington and Chelsea\",\"RBD\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RCX\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RH8\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RJ2\",4\r\n\"E09000020\",\"Kensington and Chelsea\",\"RPC\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTX\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RD8\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RQW\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RA7\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RBN\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"R0A\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RHM\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RL4\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RPA\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTK\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RAN\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RDR\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RA9\",2\r\n\"E09000020\",\"Kensington and Chelsea\",\"RDY\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTG\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RW6\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWD\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RYG\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RBT\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RHQ\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RN7\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTV\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RGP\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RQ3\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWJ\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RAJ\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RBA\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RC9\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RM1\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RQ8\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RXK\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RX2\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RD3\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RK5\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RA3\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RBZ\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RGR\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RJE\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTD\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RTF\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RWP\",1\r\n\"E09000020\",\"Kensington and Chelsea\",\"RXL\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RAX\",13792\r\n\"E09000021\",\"Kingston upon Thames\",\"RJ7\",1904\r\n\"E09000021\",\"Kingston upon Thames\",\"RVR\",432\r\n\"E09000021\",\"Kingston upon Thames\",\"RQM\",128\r\n\"E09000021\",\"Kingston upon Thames\",\"RYJ\",109\r\n\"E09000021\",\"Kingston upon Thames\",\"RPY\",97\r\n\"E09000021\",\"Kingston upon Thames\",\"RJ1\",88\r\n\"E09000021\",\"Kingston upon Thames\",\"RQY\",85\r\n\"E09000021\",\"Kingston upon Thames\",\"RJZ\",42\r\n\"E09000021\",\"Kingston upon Thames\",\"RA2\",36\r\n\"E09000021\",\"Kingston upon Thames\",\"RRV\",39\r\n\"E09000021\",\"Kingston upon Thames\",\"R1H\",32\r\n\"E09000021\",\"Kingston upon Thames\",\"RXH\",28\r\n\"E09000021\",\"Kingston upon Thames\",\"RTK\",28\r\n\"E09000021\",\"Kingston upon Thames\",\"RP6\",28\r\n\"E09000021\",\"Kingston upon Thames\",\"RDU\",23\r\n\"E09000021\",\"Kingston upon Thames\",\"RTP\",22\r\n\"E09000021\",\"Kingston upon Thames\",\"RAL\",14\r\n\"E09000021\",\"Kingston upon Thames\",\"R1K\",12\r\n\"E09000021\",\"Kingston upon Thames\",\"RJ6\",11\r\n\"E09000021\",\"Kingston upon Thames\",\"RYR\",9\r\n\"E09000021\",\"Kingston upon Thames\",\"RTH\",9\r\n\"E09000021\",\"Kingston upon Thames\",\"RWH\",9\r\n\"E09000021\",\"Kingston upon Thames\",\"RHU\",9\r\n\"E09000021\",\"Kingston upon Thames\",\"RDZ\",8\r\n\"E09000021\",\"Kingston upon Thames\",\"RT3\",8\r\n\"E09000021\",\"Kingston upon Thames\",\"RN5\",7\r\n\"E09000021\",\"Kingston upon Thames\",\"RHM\",7\r\n\"E09000021\",\"Kingston upon Thames\",\"REM\",6\r\n\"E09000021\",\"Kingston upon Thames\",\"RVV\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RD8\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RKE\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RBA\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RK9\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RQX\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RXC\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"R0A\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RCB\",5\r\n\"E09000021\",\"Kingston upon Thames\",\"RA9\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RNZ\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"REF\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RHW\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RWF\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RLQ\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RM1\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RTE\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RAS\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RR8\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RTX\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RWG\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RPC\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RWK\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RWP\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RN3\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RRK\",4\r\n\"E09000021\",\"Kingston upon Thames\",\"RC9\",3\r\n\"E09000021\",\"Kingston upon Thames\",\"RH8\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RD3\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RJE\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RNS\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RHQ\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RN7\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RBD\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RGT\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RXK\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RA7\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RCX\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RGR\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RXQ\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RD1\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RDE\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RBT\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RMC\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RXF\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RJ2\",2\r\n\"E09000021\",\"Kingston upon Thames\",\"RNL\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RWJ\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RDD\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RWE\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RX1\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RVW\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RAJ\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RCD\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RJC\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RKB\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RP5\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RQ8\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RBZ\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RCF\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RP4\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RAN\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RAP\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RTD\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RXX\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RV5\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RVJ\",1\r\n\"E09000021\",\"Kingston upon Thames\",\"RX2\",1\r\n\"E09000022\",\"Lambeth\",\"RJ1\",10877\r\n\"E09000022\",\"Lambeth\",\"RJZ\",9164\r\n\"E09000022\",\"Lambeth\",\"RJ7\",5130\r\n\"E09000022\",\"Lambeth\",\"RJ6\",466\r\n\"E09000022\",\"Lambeth\",\"RQM\",308\r\n\"E09000022\",\"Lambeth\",\"RV5\",300\r\n\"E09000022\",\"Lambeth\",\"RRV\",215\r\n\"E09000022\",\"Lambeth\",\"R1H\",177\r\n\"E09000022\",\"Lambeth\",\"RYJ\",156\r\n\"E09000022\",\"Lambeth\",\"RVR\",95\r\n\"E09000022\",\"Lambeth\",\"RJ2\",130\r\n\"E09000022\",\"Lambeth\",\"RQX\",61\r\n\"E09000022\",\"Lambeth\",\"RAX\",42\r\n\"E09000022\",\"Lambeth\",\"R1K\",42\r\n\"E09000022\",\"Lambeth\",\"RAL\",40\r\n\"E09000022\",\"Lambeth\",\"RPY\",38\r\n\"E09000022\",\"Lambeth\",\"RP6\",33\r\n\"E09000022\",\"Lambeth\",\"RKE\",31\r\n\"E09000022\",\"Lambeth\",\"RA2\",29\r\n\"E09000022\",\"Lambeth\",\"RAP\",19\r\n\"E09000022\",\"Lambeth\",\"RVV\",19\r\n\"E09000022\",\"Lambeth\",\"RDU\",16\r\n\"E09000022\",\"Lambeth\",\"RF4\",15\r\n\"E09000022\",\"Lambeth\",\"RTP\",14\r\n\"E09000022\",\"Lambeth\",\"RAS\",13\r\n\"E09000022\",\"Lambeth\",\"RXC\",13\r\n\"E09000022\",\"Lambeth\",\"RWF\",13\r\n\"E09000022\",\"Lambeth\",\"R0A\",13\r\n\"E09000022\",\"Lambeth\",\"RWE\",12\r\n\"E09000022\",\"Lambeth\",\"RTH\",11\r\n\"E09000022\",\"Lambeth\",\"RN7\",11\r\n\"E09000022\",\"Lambeth\",\"RTE\",11\r\n\"E09000022\",\"Lambeth\",\"RPA\",11\r\n\"E09000022\",\"Lambeth\",\"RD3\",11\r\n\"E09000022\",\"Lambeth\",\"RD8\",10\r\n\"E09000022\",\"Lambeth\",\"RN5\",10\r\n\"E09000022\",\"Lambeth\",\"RD1\",10\r\n\"E09000022\",\"Lambeth\",\"RDE\",9\r\n\"E09000022\",\"Lambeth\",\"RTK\",9\r\n\"E09000022\",\"Lambeth\",\"RRK\",13\r\n\"E09000022\",\"Lambeth\",\"RXH\",8\r\n\"E09000022\",\"Lambeth\",\"RYR\",8\r\n\"E09000022\",\"Lambeth\",\"RAJ\",8\r\n\"E09000022\",\"Lambeth\",\"RX1\",7\r\n\"E09000022\",\"Lambeth\",\"RT3\",7\r\n\"E09000022\",\"Lambeth\",\"RWG\",7\r\n\"E09000022\",\"Lambeth\",\"RWH\",7\r\n\"E09000022\",\"Lambeth\",\"RHQ\",7\r\n\"E09000022\",\"Lambeth\",\"RA7\",7\r\n\"E09000022\",\"Lambeth\",\"RGT\",7\r\n\"E09000022\",\"Lambeth\",\"RCB\",7\r\n\"E09000022\",\"Lambeth\",\"RVJ\",7\r\n\"E09000022\",\"Lambeth\",\"RDD\",6\r\n\"E09000022\",\"Lambeth\",\"RQ8\",6\r\n\"E09000022\",\"Lambeth\",\"RHM\",5\r\n\"E09000022\",\"Lambeth\",\"REF\",5\r\n\"E09000022\",\"Lambeth\",\"RBA\",5\r\n\"E09000022\",\"Lambeth\",\"RAN\",5\r\n\"E09000022\",\"Lambeth\",\"RH8\",5\r\n\"E09000022\",\"Lambeth\",\"RHU\",5\r\n\"E09000022\",\"Lambeth\",\"RXQ\",5\r\n\"E09000022\",\"Lambeth\",\"R1F\",5\r\n\"E09000022\",\"Lambeth\",\"RWK\",5\r\n\"E09000022\",\"Lambeth\",\"RHW\",5\r\n\"E09000022\",\"Lambeth\",\"RR8\",4\r\n\"E09000022\",\"Lambeth\",\"RTG\",4\r\n\"E09000022\",\"Lambeth\",\"RXK\",6\r\n\"E09000022\",\"Lambeth\",\"RGN\",4\r\n\"E09000022\",\"Lambeth\",\"RN3\",4\r\n\"E09000022\",\"Lambeth\",\"RQY\",4\r\n\"E09000022\",\"Lambeth\",\"RDZ\",4\r\n\"E09000022\",\"Lambeth\",\"RM1\",4\r\n\"E09000022\",\"Lambeth\",\"RC1\",4\r\n\"E09000022\",\"Lambeth\",\"RQW\",4\r\n\"E09000022\",\"Lambeth\",\"RP4\",4\r\n\"E09000022\",\"Lambeth\",\"RV3\",4\r\n\"E09000022\",\"Lambeth\",\"RA9\",4\r\n\"E09000022\",\"Lambeth\",\"RC9\",4\r\n\"E09000022\",\"Lambeth\",\"RJE\",4\r\n\"E09000022\",\"Lambeth\",\"REM\",5\r\n\"E09000022\",\"Lambeth\",\"RBT\",3\r\n\"E09000022\",\"Lambeth\",\"RPC\",3\r\n\"E09000022\",\"Lambeth\",\"RA3\",3\r\n\"E09000022\",\"Lambeth\",\"RBZ\",3\r\n\"E09000022\",\"Lambeth\",\"RNA\",3\r\n\"E09000022\",\"Lambeth\",\"RGR\",3\r\n\"E09000022\",\"Lambeth\",\"RK9\",2\r\n\"E09000022\",\"Lambeth\",\"RTX\",2\r\n\"E09000022\",\"Lambeth\",\"RW6\",2\r\n\"E09000022\",\"Lambeth\",\"RK5\",2\r\n\"E09000022\",\"Lambeth\",\"RA4\",2\r\n\"E09000022\",\"Lambeth\",\"RCX\",2\r\n\"E09000022\",\"Lambeth\",\"RBD\",2\r\n\"E09000022\",\"Lambeth\",\"RNS\",2\r\n\"E09000022\",\"Lambeth\",\"RTD\",2\r\n\"E09000022\",\"Lambeth\",\"RAE\",2\r\n\"E09000022\",\"Lambeth\",\"RXP\",2\r\n\"E09000022\",\"Lambeth\",\"RCD\",2\r\n\"E09000022\",\"Lambeth\",\"RXL\",2\r\n\"E09000022\",\"Lambeth\",\"RBL\",1\r\n\"E09000022\",\"Lambeth\",\"RNQ\",1\r\n\"E09000022\",\"Lambeth\",\"RVW\",1\r\n\"E09000022\",\"Lambeth\",\"RFS\",1\r\n\"E09000022\",\"Lambeth\",\"RGM\",1\r\n\"E09000022\",\"Lambeth\",\"RM3\",1\r\n\"E09000022\",\"Lambeth\",\"RQ3\",1\r\n\"E09000022\",\"Lambeth\",\"RJC\",1\r\n\"E09000022\",\"Lambeth\",\"RNN\",1\r\n\"E09000022\",\"Lambeth\",\"RPG\",1\r\n\"E09000022\",\"Lambeth\",\"R0B\",1\r\n\"E09000022\",\"Lambeth\",\"RJL\",1\r\n\"E09000022\",\"Lambeth\",\"RP5\",1\r\n\"E09000022\",\"Lambeth\",\"RXA\",1\r\n\"E09000022\",\"Lambeth\",\"RXT\",1\r\n\"E09000022\",\"Lambeth\",\"RNL\",1\r\n\"E09000022\",\"Lambeth\",\"RTF\",1\r\n\"E09000022\",\"Lambeth\",\"RTR\",1\r\n\"E09000022\",\"Lambeth\",\"R1L\",1\r\n\"E09000022\",\"Lambeth\",\"RNZ\",1\r\n\"E09000022\",\"Lambeth\",\"RXF\",1\r\n\"E09000022\",\"Lambeth\",\"TAJ\",1\r\n\"E09000022\",\"Lambeth\",\"RBK\",1\r\n\"E09000022\",\"Lambeth\",\"RFF\",1\r\n\"E09000022\",\"Lambeth\",\"RRF\",1\r\n\"E09000022\",\"Lambeth\",\"RWW\",1\r\n\"E09000022\",\"Lambeth\",\"RXR\",1\r\n\"E09000022\",\"Lambeth\",\"RXW\",1\r\n\"E09000023\",\"Lewisham\",\"RJ2\",16957\r\n\"E09000023\",\"Lewisham\",\"RJZ\",4042\r\n\"E09000023\",\"Lewisham\",\"RJ1\",3035\r\n\"E09000023\",\"Lewisham\",\"RV5\",343\r\n\"E09000023\",\"Lewisham\",\"R1H\",224\r\n\"E09000023\",\"Lewisham\",\"RJ7\",143\r\n\"E09000023\",\"Lewisham\",\"RRV\",141\r\n\"E09000023\",\"Lewisham\",\"RJ6\",110\r\n\"E09000023\",\"Lewisham\",\"RYJ\",87\r\n\"E09000023\",\"Lewisham\",\"RQM\",73\r\n\"E09000023\",\"Lewisham\",\"RN7\",51\r\n\"E09000023\",\"Lewisham\",\"R1K\",43\r\n\"E09000023\",\"Lewisham\",\"RQX\",41\r\n\"E09000023\",\"Lewisham\",\"RAL\",35\r\n\"E09000023\",\"Lewisham\",\"RP6\",33\r\n\"E09000023\",\"Lewisham\",\"RVR\",32\r\n\"E09000023\",\"Lewisham\",\"RWF\",30\r\n\"E09000023\",\"Lewisham\",\"RPG\",23\r\n\"E09000023\",\"Lewisham\",\"RPA\",22\r\n\"E09000023\",\"Lewisham\",\"RF4\",22\r\n\"E09000023\",\"Lewisham\",\"RTP\",22\r\n\"E09000023\",\"Lewisham\",\"RPY\",21\r\n\"E09000023\",\"Lewisham\",\"RXC\",20\r\n\"E09000023\",\"Lewisham\",\"RKE\",18\r\n\"E09000023\",\"Lewisham\",\"RVV\",16\r\n\"E09000023\",\"Lewisham\",\"RAX\",15\r\n\"E09000023\",\"Lewisham\",\"REF\",15\r\n\"E09000023\",\"Lewisham\",\"RXH\",15\r\n\"E09000023\",\"Lewisham\",\"RA2\",15\r\n\"E09000023\",\"Lewisham\",\"RDU\",15\r\n\"E09000023\",\"Lewisham\",\"RAP\",14\r\n\"E09000023\",\"Lewisham\",\"RDE\",13\r\n\"E09000023\",\"Lewisham\",\"RAS\",12\r\n\"E09000023\",\"Lewisham\",\"RPC\",12\r\n\"E09000023\",\"Lewisham\",\"RWK\",9\r\n\"E09000023\",\"Lewisham\",\"RHM\",9\r\n\"E09000023\",\"Lewisham\",\"RRK\",13\r\n\"E09000023\",\"Lewisham\",\"RDZ\",8\r\n\"E09000023\",\"Lewisham\",\"R0A\",8\r\n\"E09000023\",\"Lewisham\",\"RX1\",7\r\n\"E09000023\",\"Lewisham\",\"RDD\",8\r\n\"E09000023\",\"Lewisham\",\"RD1\",7\r\n\"E09000023\",\"Lewisham\",\"RT3\",6\r\n\"E09000023\",\"Lewisham\",\"RHW\",6\r\n\"E09000023\",\"Lewisham\",\"RTE\",6\r\n\"E09000023\",\"Lewisham\",\"RA7\",6\r\n\"E09000023\",\"Lewisham\",\"RWG\",6\r\n\"E09000023\",\"Lewisham\",\"RGP\",6\r\n\"E09000023\",\"Lewisham\",\"RH8\",5\r\n\"E09000023\",\"Lewisham\",\"RAJ\",5\r\n\"E09000023\",\"Lewisham\",\"RN3\",5\r\n\"E09000023\",\"Lewisham\",\"RN5\",5\r\n\"E09000023\",\"Lewisham\",\"RWH\",5\r\n\"E09000023\",\"Lewisham\",\"RWY\",5\r\n\"E09000023\",\"Lewisham\",\"RYR\",5\r\n\"E09000023\",\"Lewisham\",\"RQ8\",4\r\n\"E09000023\",\"Lewisham\",\"RGT\",4\r\n\"E09000023\",\"Lewisham\",\"RC9\",4\r\n\"E09000023\",\"Lewisham\",\"RTK\",4\r\n\"E09000023\",\"Lewisham\",\"RJC\",4\r\n\"E09000023\",\"Lewisham\",\"RD3\",4\r\n\"E09000023\",\"Lewisham\",\"RKB\",4\r\n\"E09000023\",\"Lewisham\",\"RWD\",4\r\n\"E09000023\",\"Lewisham\",\"RWP\",4\r\n\"E09000023\",\"Lewisham\",\"RCD\",3\r\n\"E09000023\",\"Lewisham\",\"RGN\",3\r\n\"E09000023\",\"Lewisham\",\"RTH\",3\r\n\"E09000023\",\"Lewisham\",\"RVJ\",3\r\n\"E09000023\",\"Lewisham\",\"RD8\",3\r\n\"E09000023\",\"Lewisham\",\"RHU\",3\r\n\"E09000023\",\"Lewisham\",\"RK9\",3\r\n\"E09000023\",\"Lewisham\",\"RBD\",3\r\n\"E09000023\",\"Lewisham\",\"RNS\",3\r\n\"E09000023\",\"Lewisham\",\"RWW\",3\r\n\"E09000023\",\"Lewisham\",\"RXP\",3\r\n\"E09000023\",\"Lewisham\",\"RCB\",3\r\n\"E09000023\",\"Lewisham\",\"RHQ\",3\r\n\"E09000023\",\"Lewisham\",\"RLQ\",3\r\n\"E09000023\",\"Lewisham\",\"RV3\",3\r\n\"E09000023\",\"Lewisham\",\"REM\",3\r\n\"E09000023\",\"Lewisham\",\"RXK\",3\r\n\"E09000023\",\"Lewisham\",\"RQW\",3\r\n\"E09000023\",\"Lewisham\",\"RTG\",4\r\n\"E09000023\",\"Lewisham\",\"RWE\",3\r\n\"E09000023\",\"Lewisham\",\"RGR\",3\r\n\"E09000023\",\"Lewisham\",\"RP5\",2\r\n\"E09000023\",\"Lewisham\",\"RWA\",2\r\n\"E09000023\",\"Lewisham\",\"RXW\",2\r\n\"E09000023\",\"Lewisham\",\"RXL\",2\r\n\"E09000023\",\"Lewisham\",\"RBZ\",2\r\n\"E09000023\",\"Lewisham\",\"RXQ\",2\r\n\"E09000023\",\"Lewisham\",\"RBL\",2\r\n\"E09000023\",\"Lewisham\",\"RBN\",2\r\n\"E09000023\",\"Lewisham\",\"RM1\",2\r\n\"E09000023\",\"Lewisham\",\"RNA\",2\r\n\"E09000023\",\"Lewisham\",\"RVW\",2\r\n\"E09000023\",\"Lewisham\",\"RTF\",2\r\n\"E09000023\",\"Lewisham\",\"RR8\",2\r\n\"E09000023\",\"Lewisham\",\"RTR\",2\r\n\"E09000023\",\"Lewisham\",\"R1L\",1\r\n\"E09000023\",\"Lewisham\",\"RA3\",1\r\n\"E09000023\",\"Lewisham\",\"RFS\",1\r\n\"E09000023\",\"Lewisham\",\"RL4\",1\r\n\"E09000023\",\"Lewisham\",\"RA4\",1\r\n\"E09000023\",\"Lewisham\",\"RBK\",1\r\n\"E09000023\",\"Lewisham\",\"RBT\",1\r\n\"E09000023\",\"Lewisham\",\"RCX\",1\r\n\"E09000023\",\"Lewisham\",\"RM3\",1\r\n\"E09000023\",\"Lewisham\",\"RP4\",1\r\n\"E09000023\",\"Lewisham\",\"RR7\",1\r\n\"E09000023\",\"Lewisham\",\"RXE\",1\r\n\"E09000023\",\"Lewisham\",\"RET\",1\r\n\"E09000023\",\"Lewisham\",\"RJL\",1\r\n\"E09000023\",\"Lewisham\",\"RJN\",1\r\n\"E09000023\",\"Lewisham\",\"RQ3\",1\r\n\"E09000023\",\"Lewisham\",\"RCF\",1\r\n\"E09000023\",\"Lewisham\",\"RXR\",1\r\n\"E09000023\",\"Lewisham\",\"RAE\",1\r\n\"E09000023\",\"Lewisham\",\"RFR\",1\r\n\"E09000023\",\"Lewisham\",\"RNU\",1\r\n\"E09000023\",\"Lewisham\",\"RAT\",1\r\n\"E09000023\",\"Lewisham\",\"RQY\",1\r\n\"E09000023\",\"Lewisham\",\"RTD\",1\r\n\"E09000023\",\"Lewisham\",\"RWJ\",1\r\n\"E09000023\",\"Lewisham\",\"RBS\",1\r\n\"E09000023\",\"Lewisham\",\"RTX\",1\r\n\"E09000024\",\"Merton\",\"RJ7\",14547\r\n\"E09000024\",\"Merton\",\"RVR\",4709\r\n\"E09000024\",\"Merton\",\"RAX\",1933\r\n\"E09000024\",\"Merton\",\"RJ6\",400\r\n\"E09000024\",\"Merton\",\"RJ1\",255\r\n\"E09000024\",\"Merton\",\"RQM\",127\r\n\"E09000024\",\"Merton\",\"RQY\",120\r\n\"E09000024\",\"Merton\",\"RPY\",107\r\n\"E09000024\",\"Merton\",\"RJZ\",106\r\n\"E09000024\",\"Merton\",\"R1H\",75\r\n\"E09000024\",\"Merton\",\"RYJ\",68\r\n\"E09000024\",\"Merton\",\"RRV\",70\r\n\"E09000024\",\"Merton\",\"RP6\",42\r\n\"E09000024\",\"Merton\",\"RYR\",26\r\n\"E09000024\",\"Merton\",\"R1K\",25\r\n\"E09000024\",\"Merton\",\"RTP\",23\r\n\"E09000024\",\"Merton\",\"RA2\",19\r\n\"E09000024\",\"Merton\",\"RT3\",19\r\n\"E09000024\",\"Merton\",\"RDU\",18\r\n\"E09000024\",\"Merton\",\"RAL\",17\r\n\"E09000024\",\"Merton\",\"RTK\",13\r\n\"E09000024\",\"Merton\",\"RXH\",13\r\n\"E09000024\",\"Merton\",\"RTH\",10\r\n\"E09000024\",\"Merton\",\"RXC\",10\r\n\"E09000024\",\"Merton\",\"RHU\",10\r\n\"E09000024\",\"Merton\",\"RAP\",10\r\n\"E09000024\",\"Merton\",\"RQX\",8\r\n\"E09000024\",\"Merton\",\"RWH\",8\r\n\"E09000024\",\"Merton\",\"RWF\",8\r\n\"E09000024\",\"Merton\",\"RGT\",7\r\n\"E09000024\",\"Merton\",\"RN3\",7\r\n\"E09000024\",\"Merton\",\"RVV\",6\r\n\"E09000024\",\"Merton\",\"RXQ\",6\r\n\"E09000024\",\"Merton\",\"RA9\",6\r\n\"E09000024\",\"Merton\",\"RAS\",6\r\n\"E09000024\",\"Merton\",\"RHM\",6\r\n\"E09000024\",\"Merton\",\"RJ2\",9\r\n\"E09000024\",\"Merton\",\"RWG\",5\r\n\"E09000024\",\"Merton\",\"RD1\",5\r\n\"E09000024\",\"Merton\",\"RKE\",5\r\n\"E09000024\",\"Merton\",\"RM1\",5\r\n\"E09000024\",\"Merton\",\"RWE\",5\r\n\"E09000024\",\"Merton\",\"RA7\",5\r\n\"E09000024\",\"Merton\",\"RC9\",5\r\n\"E09000024\",\"Merton\",\"RPA\",5\r\n\"E09000024\",\"Merton\",\"RQ8\",5\r\n\"E09000024\",\"Merton\",\"REF\",4\r\n\"E09000024\",\"Merton\",\"RF4\",4\r\n\"E09000024\",\"Merton\",\"RXK\",5\r\n\"E09000024\",\"Merton\",\"RBK\",4\r\n\"E09000024\",\"Merton\",\"RAN\",4\r\n\"E09000024\",\"Merton\",\"RPC\",4\r\n\"E09000024\",\"Merton\",\"R1F\",4\r\n\"E09000024\",\"Merton\",\"RN5\",4\r\n\"E09000024\",\"Merton\",\"R0A\",3\r\n\"E09000024\",\"Merton\",\"RTE\",3\r\n\"E09000024\",\"Merton\",\"RHW\",3\r\n\"E09000024\",\"Merton\",\"RD3\",3\r\n\"E09000024\",\"Merton\",\"RDE\",3\r\n\"E09000024\",\"Merton\",\"RK9\",3\r\n\"E09000024\",\"Merton\",\"RNL\",3\r\n\"E09000024\",\"Merton\",\"RTG\",3\r\n\"E09000024\",\"Merton\",\"RV3\",2\r\n\"E09000024\",\"Merton\",\"RKB\",2\r\n\"E09000024\",\"Merton\",\"RNA\",2\r\n\"E09000024\",\"Merton\",\"RW6\",2\r\n\"E09000024\",\"Merton\",\"RCX\",2\r\n\"E09000024\",\"Merton\",\"REM\",2\r\n\"E09000024\",\"Merton\",\"RRK\",4\r\n\"E09000024\",\"Merton\",\"RAE\",2\r\n\"E09000024\",\"Merton\",\"RD8\",2\r\n\"E09000024\",\"Merton\",\"RK5\",2\r\n\"E09000024\",\"Merton\",\"RR8\",2\r\n\"E09000024\",\"Merton\",\"RCB\",2\r\n\"E09000024\",\"Merton\",\"RH8\",2\r\n\"E09000024\",\"Merton\",\"RJE\",2\r\n\"E09000024\",\"Merton\",\"RAJ\",2\r\n\"E09000024\",\"Merton\",\"RVJ\",2\r\n\"E09000024\",\"Merton\",\"RA4\",2\r\n\"E09000024\",\"Merton\",\"RDZ\",2\r\n\"E09000024\",\"Merton\",\"RNZ\",2\r\n\"E09000024\",\"Merton\",\"RP4\",2\r\n\"E09000024\",\"Merton\",\"RNQ\",1\r\n\"E09000024\",\"Merton\",\"RWP\",1\r\n\"E09000024\",\"Merton\",\"RWW\",1\r\n\"E09000024\",\"Merton\",\"RXX\",1\r\n\"E09000024\",\"Merton\",\"RCD\",1\r\n\"E09000024\",\"Merton\",\"RN7\",1\r\n\"E09000024\",\"Merton\",\"RVW\",1\r\n\"E09000024\",\"Merton\",\"RBZ\",1\r\n\"E09000024\",\"Merton\",\"RWY\",1\r\n\"E09000024\",\"Merton\",\"RL4\",1\r\n\"E09000024\",\"Merton\",\"RPG\",1\r\n\"E09000024\",\"Merton\",\"RBA\",1\r\n\"E09000024\",\"Merton\",\"RBD\",1\r\n\"E09000024\",\"Merton\",\"RBN\",1\r\n\"E09000024\",\"Merton\",\"RDD\",1\r\n\"E09000024\",\"Merton\",\"RXF\",1\r\n\"E09000024\",\"Merton\",\"RTF\",1\r\n\"E09000024\",\"Merton\",\"RXW\",1\r\n\"E09000024\",\"Merton\",\"RDR\",1\r\n\"E09000024\",\"Merton\",\"RFS\",1\r\n\"E09000024\",\"Merton\",\"RV5\",1\r\n\"E09000024\",\"Merton\",\"RWK\",1\r\n\"E09000024\",\"Merton\",\"RGM\",1\r\n\"E09000024\",\"Merton\",\"RM3\",1\r\n\"E09000024\",\"Merton\",\"RQW\",1\r\n\"E09000024\",\"Merton\",\"RTD\",1\r\n\"E09000025\",\"Newham\",\"R1H\",27829\r\n\"E09000025\",\"Newham\",\"RWK\",1031\r\n\"E09000025\",\"Newham\",\"RQX\",793\r\n\"E09000025\",\"Newham\",\"RF4\",431\r\n\"E09000025\",\"Newham\",\"RJ1\",398\r\n\"E09000025\",\"Newham\",\"RRV\",276\r\n\"E09000025\",\"Newham\",\"RYJ\",100\r\n\"E09000025\",\"Newham\",\"RAL\",89\r\n\"E09000025\",\"Newham\",\"RQM\",78\r\n\"E09000025\",\"Newham\",\"RJ2\",106\r\n\"E09000025\",\"Newham\",\"RJZ\",71\r\n\"E09000025\",\"Newham\",\"RDD\",71\r\n\"E09000025\",\"Newham\",\"RP6\",67\r\n\"E09000025\",\"Newham\",\"RJ7\",64\r\n\"E09000025\",\"Newham\",\"R1K\",63\r\n\"E09000025\",\"Newham\",\"RQ8\",56\r\n\"E09000025\",\"Newham\",\"RAP\",55\r\n\"E09000025\",\"Newham\",\"RKE\",29\r\n\"E09000025\",\"Newham\",\"RQW\",28\r\n\"E09000025\",\"Newham\",\"RAJ\",19\r\n\"E09000025\",\"Newham\",\"RN7\",17\r\n\"E09000025\",\"Newham\",\"RAS\",16\r\n\"E09000025\",\"Newham\",\"RC9\",14\r\n\"E09000025\",\"Newham\",\"RAX\",13\r\n\"E09000025\",\"Newham\",\"RGT\",12\r\n\"E09000025\",\"Newham\",\"RP4\",12\r\n\"E09000025\",\"Newham\",\"RRK\",18\r\n\"E09000025\",\"Newham\",\"RJ6\",12\r\n\"E09000025\",\"Newham\",\"RAT\",11\r\n\"E09000025\",\"Newham\",\"RWE\",11\r\n\"E09000025\",\"Newham\",\"R0A\",11\r\n\"E09000025\",\"Newham\",\"RDU\",11\r\n\"E09000025\",\"Newham\",\"RVR\",11\r\n\"E09000025\",\"Newham\",\"RT3\",10\r\n\"E09000025\",\"Newham\",\"RDE\",10\r\n\"E09000025\",\"Newham\",\"RWG\",10\r\n\"E09000025\",\"Newham\",\"RWF\",9\r\n\"E09000025\",\"Newham\",\"RVV\",9\r\n\"E09000025\",\"Newham\",\"RHW\",8\r\n\"E09000025\",\"Newham\",\"RW6\",8\r\n\"E09000025\",\"Newham\",\"RTP\",8\r\n\"E09000025\",\"Newham\",\"RBK\",7\r\n\"E09000025\",\"Newham\",\"RTH\",7\r\n\"E09000025\",\"Newham\",\"RTG\",7\r\n\"E09000025\",\"Newham\",\"RXH\",7\r\n\"E09000025\",\"Newham\",\"RXQ\",7\r\n\"E09000025\",\"Newham\",\"RXR\",8\r\n\"E09000025\",\"Newham\",\"RXK\",8\r\n\"E09000025\",\"Newham\",\"RVJ\",6\r\n\"E09000025\",\"Newham\",\"RPA\",6\r\n\"E09000025\",\"Newham\",\"RD8\",6\r\n\"E09000025\",\"Newham\",\"RN3\",5\r\n\"E09000025\",\"Newham\",\"RHU\",5\r\n\"E09000025\",\"Newham\",\"RAE\",5\r\n\"E09000025\",\"Newham\",\"RR8\",5\r\n\"E09000025\",\"Newham\",\"RHQ\",4\r\n\"E09000025\",\"Newham\",\"RHM\",4\r\n\"E09000025\",\"Newham\",\"RJR\",4\r\n\"E09000025\",\"Newham\",\"RD3\",4\r\n\"E09000025\",\"Newham\",\"RAN\",4\r\n\"E09000025\",\"Newham\",\"RDZ\",4\r\n\"E09000025\",\"Newham\",\"RNS\",4\r\n\"E09000025\",\"Newham\",\"REM\",5\r\n\"E09000025\",\"Newham\",\"RGN\",3\r\n\"E09000025\",\"Newham\",\"RWP\",3\r\n\"E09000025\",\"Newham\",\"RPY\",3\r\n\"E09000025\",\"Newham\",\"RCB\",3\r\n\"E09000025\",\"Newham\",\"RTD\",3\r\n\"E09000025\",\"Newham\",\"RD1\",3\r\n\"E09000025\",\"Newham\",\"RWH\",3\r\n\"E09000025\",\"Newham\",\"RWJ\",3\r\n\"E09000025\",\"Newham\",\"RPC\",3\r\n\"E09000025\",\"Newham\",\"RXX\",3\r\n\"E09000025\",\"Newham\",\"RA7\",2\r\n\"E09000025\",\"Newham\",\"RGR\",2\r\n\"E09000025\",\"Newham\",\"RJC\",2\r\n\"E09000025\",\"Newham\",\"RK9\",2\r\n\"E09000025\",\"Newham\",\"RMY\",2\r\n\"E09000025\",\"Newham\",\"RTR\",3\r\n\"E09000025\",\"Newham\",\"RXN\",2\r\n\"E09000025\",\"Newham\",\"RA2\",2\r\n\"E09000025\",\"Newham\",\"RBA\",2\r\n\"E09000025\",\"Newham\",\"RC1\",2\r\n\"E09000025\",\"Newham\",\"RKB\",2\r\n\"E09000025\",\"Newham\",\"RVW\",2\r\n\"E09000025\",\"Newham\",\"RXF\",2\r\n\"E09000025\",\"Newham\",\"RN5\",2\r\n\"E09000025\",\"Newham\",\"RWY\",2\r\n\"E09000025\",\"Newham\",\"RM1\",2\r\n\"E09000025\",\"Newham\",\"RM3\",2\r\n\"E09000025\",\"Newham\",\"RGM\",2\r\n\"E09000025\",\"Newham\",\"R1F\",2\r\n\"E09000025\",\"Newham\",\"RL4\",2\r\n\"E09000025\",\"Newham\",\"RMC\",2\r\n\"E09000025\",\"Newham\",\"RTE\",2\r\n\"E09000025\",\"Newham\",\"RX1\",2\r\n\"E09000025\",\"Newham\",\"RYR\",2\r\n\"E09000025\",\"Newham\",\"RFF\",1\r\n\"E09000025\",\"Newham\",\"RJE\",1\r\n\"E09000025\",\"Newham\",\"RNU\",1\r\n\"E09000025\",\"Newham\",\"RR7\",1\r\n\"E09000025\",\"Newham\",\"RP5\",1\r\n\"E09000025\",\"Newham\",\"RWA\",1\r\n\"E09000025\",\"Newham\",\"RWD\",1\r\n\"E09000025\",\"Newham\",\"RA3\",1\r\n\"E09000025\",\"Newham\",\"RBT\",1\r\n\"E09000025\",\"Newham\",\"RTK\",1\r\n\"E09000025\",\"Newham\",\"RV3\",1\r\n\"E09000025\",\"Newham\",\"RCX\",1\r\n\"E09000025\",\"Newham\",\"RGP\",1\r\n\"E09000025\",\"Newham\",\"RBS\",1\r\n\"E09000025\",\"Newham\",\"RTX\",1\r\n\"E09000025\",\"Newham\",\"RBL\",1\r\n\"E09000025\",\"Newham\",\"R0B\",1\r\n\"E09000025\",\"Newham\",\"RNQ\",1\r\n\"E09000025\",\"Newham\",\"RW1\",1\r\n\"E09000025\",\"Newham\",\"RH8\",1\r\n\"E09000025\",\"Newham\",\"RXL\",1\r\n\"E09000025\",\"Newham\",\"RCF\",1\r\n\"E09000025\",\"Newham\",\"RFS\",1\r\n\"E09000025\",\"Newham\",\"RLQ\",1\r\n\"E09000026\",\"Redbridge\",\"RF4\",13515\r\n\"E09000026\",\"Redbridge\",\"R1H\",10998\r\n\"E09000026\",\"Redbridge\",\"RAT\",238\r\n\"E09000026\",\"Redbridge\",\"RRV\",249\r\n\"E09000026\",\"Redbridge\",\"RQ8\",208\r\n\"E09000026\",\"Redbridge\",\"RQX\",204\r\n\"E09000026\",\"Redbridge\",\"RJ1\",147\r\n\"E09000026\",\"Redbridge\",\"RQW\",106\r\n\"E09000026\",\"Redbridge\",\"RAL\",100\r\n\"E09000026\",\"Redbridge\",\"RYJ\",100\r\n\"E09000026\",\"Redbridge\",\"RAP\",90\r\n\"E09000026\",\"Redbridge\",\"RP6\",67\r\n\"E09000026\",\"Redbridge\",\"RDD\",51\r\n\"E09000026\",\"Redbridge\",\"R1K\",47\r\n\"E09000026\",\"Redbridge\",\"RJZ\",42\r\n\"E09000026\",\"Redbridge\",\"RQM\",38\r\n\"E09000026\",\"Redbridge\",\"RWK\",35\r\n\"E09000026\",\"Redbridge\",\"RDE\",22\r\n\"E09000026\",\"Redbridge\",\"RGT\",22\r\n\"E09000026\",\"Redbridge\",\"RJ7\",18\r\n\"E09000026\",\"Redbridge\",\"RP4\",18\r\n\"E09000026\",\"Redbridge\",\"RPY\",16\r\n\"E09000026\",\"Redbridge\",\"RKE\",15\r\n\"E09000026\",\"Redbridge\",\"RJ2\",23\r\n\"E09000026\",\"Redbridge\",\"RT3\",12\r\n\"E09000026\",\"Redbridge\",\"RWH\",12\r\n\"E09000026\",\"Redbridge\",\"RXH\",11\r\n\"E09000026\",\"Redbridge\",\"RAJ\",11\r\n\"E09000026\",\"Redbridge\",\"RDU\",11\r\n\"E09000026\",\"Redbridge\",\"RRK\",14\r\n\"E09000026\",\"Redbridge\",\"R1L\",10\r\n\"E09000026\",\"Redbridge\",\"RTH\",10\r\n\"E09000026\",\"Redbridge\",\"RCX\",9\r\n\"E09000026\",\"Redbridge\",\"RN7\",8\r\n\"E09000026\",\"Redbridge\",\"RWF\",8\r\n\"E09000026\",\"Redbridge\",\"RGR\",8\r\n\"E09000026\",\"Redbridge\",\"RTP\",8\r\n\"E09000026\",\"Redbridge\",\"RAS\",7\r\n\"E09000026\",\"Redbridge\",\"RHM\",7\r\n\"E09000026\",\"Redbridge\",\"RD8\",7\r\n\"E09000026\",\"Redbridge\",\"RC9\",7\r\n\"E09000026\",\"Redbridge\",\"RXQ\",7\r\n\"E09000026\",\"Redbridge\",\"RAE\",6\r\n\"E09000026\",\"Redbridge\",\"RD3\",6\r\n\"E09000026\",\"Redbridge\",\"RWE\",6\r\n\"E09000026\",\"Redbridge\",\"RVR\",6\r\n\"E09000026\",\"Redbridge\",\"RJ6\",6\r\n\"E09000026\",\"Redbridge\",\"RXK\",8\r\n\"E09000026\",\"Redbridge\",\"RKB\",5\r\n\"E09000026\",\"Redbridge\",\"RAX\",5\r\n\"E09000026\",\"Redbridge\",\"RK9\",5\r\n\"E09000026\",\"Redbridge\",\"R0A\",5\r\n\"E09000026\",\"Redbridge\",\"RPA\",5\r\n\"E09000026\",\"Redbridge\",\"RVV\",5\r\n\"E09000026\",\"Redbridge\",\"RWG\",5\r\n\"E09000026\",\"Redbridge\",\"REF\",5\r\n\"E09000026\",\"Redbridge\",\"RGP\",4\r\n\"E09000026\",\"Redbridge\",\"RM1\",4\r\n\"E09000026\",\"Redbridge\",\"RHW\",4\r\n\"E09000026\",\"Redbridge\",\"RMC\",4\r\n\"E09000026\",\"Redbridge\",\"RN5\",4\r\n\"E09000026\",\"Redbridge\",\"RAN\",4\r\n\"E09000026\",\"Redbridge\",\"RWD\",4\r\n\"E09000026\",\"Redbridge\",\"RX1\",4\r\n\"E09000026\",\"Redbridge\",\"RXC\",4\r\n\"E09000026\",\"Redbridge\",\"RNQ\",4\r\n\"E09000026\",\"Redbridge\",\"RVJ\",4\r\n\"E09000026\",\"Redbridge\",\"RTD\",4\r\n\"E09000026\",\"Redbridge\",\"RC1\",3\r\n\"E09000026\",\"Redbridge\",\"RGN\",3\r\n\"E09000026\",\"Redbridge\",\"RWJ\",3\r\n\"E09000026\",\"Redbridge\",\"RHQ\",3\r\n\"E09000026\",\"Redbridge\",\"REM\",4\r\n\"E09000026\",\"Redbridge\",\"RTG\",4\r\n\"E09000026\",\"Redbridge\",\"RFR\",3\r\n\"E09000026\",\"Redbridge\",\"RMP\",3\r\n\"E09000026\",\"Redbridge\",\"RXN\",3\r\n\"E09000026\",\"Redbridge\",\"RTX\",3\r\n\"E09000026\",\"Redbridge\",\"RN3\",3\r\n\"E09000026\",\"Redbridge\",\"R1F\",3\r\n\"E09000026\",\"Redbridge\",\"RNS\",3\r\n\"E09000026\",\"Redbridge\",\"RJR\",2\r\n\"E09000026\",\"Redbridge\",\"RTE\",2\r\n\"E09000026\",\"Redbridge\",\"RXW\",2\r\n\"E09000026\",\"Redbridge\",\"RYR\",2\r\n\"E09000026\",\"Redbridge\",\"RDZ\",2\r\n\"E09000026\",\"Redbridge\",\"RGM\",2\r\n\"E09000026\",\"Redbridge\",\"RTK\",2\r\n\"E09000026\",\"Redbridge\",\"RBK\",2\r\n\"E09000026\",\"Redbridge\",\"RHU\",2\r\n\"E09000026\",\"Redbridge\",\"RLY\",2\r\n\"E09000026\",\"Redbridge\",\"RVW\",2\r\n\"E09000026\",\"Redbridge\",\"RW6\",2\r\n\"E09000026\",\"Redbridge\",\"RA2\",2\r\n\"E09000026\",\"Redbridge\",\"RR7\",2\r\n\"E09000026\",\"Redbridge\",\"RRE\",2\r\n\"E09000026\",\"Redbridge\",\"RXF\",2\r\n\"E09000026\",\"Redbridge\",\"RA7\",2\r\n\"E09000026\",\"Redbridge\",\"RD1\",2\r\n\"E09000026\",\"Redbridge\",\"RNZ\",2\r\n\"E09000026\",\"Redbridge\",\"RV3\",2\r\n\"E09000026\",\"Redbridge\",\"RA9\",1\r\n\"E09000026\",\"Redbridge\",\"RBN\",1\r\n\"E09000026\",\"Redbridge\",\"RBL\",1\r\n\"E09000026\",\"Redbridge\",\"RFF\",1\r\n\"E09000026\",\"Redbridge\",\"RFS\",1\r\n\"E09000026\",\"Redbridge\",\"RH8\",1\r\n\"E09000026\",\"Redbridge\",\"RJE\",1\r\n\"E09000026\",\"Redbridge\",\"RLT\",1\r\n\"E09000026\",\"Redbridge\",\"RTR\",1\r\n\"E09000026\",\"Redbridge\",\"RXP\",1\r\n\"E09000026\",\"Redbridge\",\"RCB\",1\r\n\"E09000026\",\"Redbridge\",\"RK5\",1\r\n\"E09000026\",\"Redbridge\",\"RL4\",1\r\n\"E09000026\",\"Redbridge\",\"RQ3\",1\r\n\"E09000026\",\"Redbridge\",\"RBT\",1\r\n\"E09000026\",\"Redbridge\",\"RM3\",1\r\n\"E09000026\",\"Redbridge\",\"RNA\",1\r\n\"E09000026\",\"Redbridge\",\"RXR\",1\r\n\"E09000026\",\"Redbridge\",\"RRF\",1\r\n\"E09000026\",\"Redbridge\",\"RXY\",1\r\n\"E09000026\",\"Redbridge\",\"RCF\",1\r\n\"E09000026\",\"Redbridge\",\"RP5\",1\r\n\"E09000026\",\"Redbridge\",\"RNU\",1\r\n\"E09000026\",\"Redbridge\",\"RWP\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RAX\",7724\r\n\"E09000027\",\"Richmond upon Thames\",\"RQM\",7443\r\n\"E09000027\",\"Richmond upon Thames\",\"RYJ\",1406\r\n\"E09000027\",\"Richmond upon Thames\",\"RJ7\",1002\r\n\"E09000027\",\"Richmond upon Thames\",\"RJ1\",109\r\n\"E09000027\",\"Richmond upon Thames\",\"RQY\",108\r\n\"E09000027\",\"Richmond upon Thames\",\"RPY\",104\r\n\"E09000027\",\"Richmond upon Thames\",\"RRV\",88\r\n\"E09000027\",\"Richmond upon Thames\",\"R1K\",77\r\n\"E09000027\",\"Richmond upon Thames\",\"RTK\",52\r\n\"E09000027\",\"Richmond upon Thames\",\"R1H\",49\r\n\"E09000027\",\"Richmond upon Thames\",\"RJZ\",35\r\n\"E09000027\",\"Richmond upon Thames\",\"RDU\",30\r\n\"E09000027\",\"Richmond upon Thames\",\"RT3\",30\r\n\"E09000027\",\"Richmond upon Thames\",\"RP6\",29\r\n\"E09000027\",\"Richmond upon Thames\",\"RAL\",27\r\n\"E09000027\",\"Richmond upon Thames\",\"RA2\",22\r\n\"E09000027\",\"Richmond upon Thames\",\"RVR\",21\r\n\"E09000027\",\"Richmond upon Thames\",\"RAS\",20\r\n\"E09000027\",\"Richmond upon Thames\",\"RYR\",17\r\n\"E09000027\",\"Richmond upon Thames\",\"REF\",17\r\n\"E09000027\",\"Richmond upon Thames\",\"RTP\",15\r\n\"E09000027\",\"Richmond upon Thames\",\"RBD\",13\r\n\"E09000027\",\"Richmond upon Thames\",\"RTH\",12\r\n\"E09000027\",\"Richmond upon Thames\",\"RN5\",10\r\n\"E09000027\",\"Richmond upon Thames\",\"RXQ\",10\r\n\"E09000027\",\"Richmond upon Thames\",\"RXC\",10\r\n\"E09000027\",\"Richmond upon Thames\",\"RJ6\",9\r\n\"E09000027\",\"Richmond upon Thames\",\"RD3\",8\r\n\"E09000027\",\"Richmond upon Thames\",\"RWH\",8\r\n\"E09000027\",\"Richmond upon Thames\",\"RJ2\",9\r\n\"E09000027\",\"Richmond upon Thames\",\"R0A\",7\r\n\"E09000027\",\"Richmond upon Thames\",\"RTE\",7\r\n\"E09000027\",\"Richmond upon Thames\",\"RWG\",7\r\n\"E09000027\",\"Richmond upon Thames\",\"RA9\",7\r\n\"E09000027\",\"Richmond upon Thames\",\"RH8\",6\r\n\"E09000027\",\"Richmond upon Thames\",\"RHW\",6\r\n\"E09000027\",\"Richmond upon Thames\",\"RQX\",6\r\n\"E09000027\",\"Richmond upon Thames\",\"RWF\",5\r\n\"E09000027\",\"Richmond upon Thames\",\"RM1\",5\r\n\"E09000027\",\"Richmond upon Thames\",\"RP4\",5\r\n\"E09000027\",\"Richmond upon Thames\",\"RD8\",5\r\n\"E09000027\",\"Richmond upon Thames\",\"RDZ\",5\r\n\"E09000027\",\"Richmond upon Thames\",\"RC9\",5\r\n\"E09000027\",\"Richmond upon Thames\",\"RKE\",5\r\n\"E09000027\",\"Richmond upon Thames\",\"RC1\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RD1\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RKB\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RQW\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RVV\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RHM\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RHU\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RJC\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RTD\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RXK\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RA4\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RGT\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RMP\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RNZ\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RA7\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RBA\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RTX\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RGN\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RVJ\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RX1\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RXH\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RDE\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RRK\",4\r\n\"E09000027\",\"Richmond upon Thames\",\"RXP\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"RBZ\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RW6\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RK9\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RGR\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RCX\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RWJ\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RWP\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RP5\",3\r\n\"E09000027\",\"Richmond upon Thames\",\"R1F\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RVY\",2\r\n\"E09000027\",\"Richmond upon Thames\",\"RAP\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RQ8\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RAE\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RLQ\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RN3\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RNA\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RWK\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RWW\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RDD\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RJE\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RNS\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RR8\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RAN\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RCF\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RGM\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RGP\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RWY\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RXL\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RBT\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RPA\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RRF\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RWD\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RXX\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"R0B\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RXW\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"REM\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RQ3\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RAJ\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RF4\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RLT\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RTF\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RVN\",1\r\n\"E09000027\",\"Richmond upon Thames\",\"RXR\",1\r\n\"E09000028\",\"Southwark\",\"RJ1\",13779\r\n\"E09000028\",\"Southwark\",\"RJZ\",10797\r\n\"E09000028\",\"Southwark\",\"RJ2\",527\r\n\"E09000028\",\"Southwark\",\"R1H\",311\r\n\"E09000028\",\"Southwark\",\"RV5\",282\r\n\"E09000028\",\"Southwark\",\"RRV\",201\r\n\"E09000028\",\"Southwark\",\"RJ7\",162\r\n\"E09000028\",\"Southwark\",\"RYJ\",125\r\n\"E09000028\",\"Southwark\",\"RQM\",100\r\n\"E09000028\",\"Southwark\",\"RJ6\",73\r\n\"E09000028\",\"Southwark\",\"RN7\",40\r\n\"E09000028\",\"Southwark\",\"RQX\",39\r\n\"E09000028\",\"Southwark\",\"RP6\",36\r\n\"E09000028\",\"Southwark\",\"R1K\",35\r\n\"E09000028\",\"Southwark\",\"RAL\",30\r\n\"E09000028\",\"Southwark\",\"RAX\",27\r\n\"E09000028\",\"Southwark\",\"RF4\",27\r\n\"E09000028\",\"Southwark\",\"RVV\",25\r\n\"E09000028\",\"Southwark\",\"RVR\",22\r\n\"E09000028\",\"Southwark\",\"RKE\",21\r\n\"E09000028\",\"Southwark\",\"RWF\",20\r\n\"E09000028\",\"Southwark\",\"RA2\",17\r\n\"E09000028\",\"Southwark\",\"RM1\",16\r\n\"E09000028\",\"Southwark\",\"RDU\",16\r\n\"E09000028\",\"Southwark\",\"RPA\",16\r\n\"E09000028\",\"Southwark\",\"RPY\",15\r\n\"E09000028\",\"Southwark\",\"R0A\",14\r\n\"E09000028\",\"Southwark\",\"RAP\",14\r\n\"E09000028\",\"Southwark\",\"RTP\",14\r\n\"E09000028\",\"Southwark\",\"RYR\",12\r\n\"E09000028\",\"Southwark\",\"RT3\",11\r\n\"E09000028\",\"Southwark\",\"RWH\",11\r\n\"E09000028\",\"Southwark\",\"RXH\",10\r\n\"E09000028\",\"Southwark\",\"RKB\",10\r\n\"E09000028\",\"Southwark\",\"RDE\",10\r\n\"E09000028\",\"Southwark\",\"RDD\",9\r\n\"E09000028\",\"Southwark\",\"RXC\",9\r\n\"E09000028\",\"Southwark\",\"RXQ\",9\r\n\"E09000028\",\"Southwark\",\"RRK\",16\r\n\"E09000028\",\"Southwark\",\"RTH\",8\r\n\"E09000028\",\"Southwark\",\"RAS\",7\r\n\"E09000028\",\"Southwark\",\"RTE\",7\r\n\"E09000028\",\"Southwark\",\"RX1\",7\r\n\"E09000028\",\"Southwark\",\"RWG\",7\r\n\"E09000028\",\"Southwark\",\"RHU\",7\r\n\"E09000028\",\"Southwark\",\"REF\",7\r\n\"E09000028\",\"Southwark\",\"RV3\",7\r\n\"E09000028\",\"Southwark\",\"RQ8\",6\r\n\"E09000028\",\"Southwark\",\"RD8\",6\r\n\"E09000028\",\"Southwark\",\"RC9\",6\r\n\"E09000028\",\"Southwark\",\"RHM\",6\r\n\"E09000028\",\"Southwark\",\"RK9\",6\r\n\"E09000028\",\"Southwark\",\"RGT\",6\r\n\"E09000028\",\"Southwark\",\"RWK\",5\r\n\"E09000028\",\"Southwark\",\"REM\",7\r\n\"E09000028\",\"Southwark\",\"RD3\",5\r\n\"E09000028\",\"Southwark\",\"RDZ\",5\r\n\"E09000028\",\"Southwark\",\"RHW\",5\r\n\"E09000028\",\"Southwark\",\"RN3\",5\r\n\"E09000028\",\"Southwark\",\"RA7\",4\r\n\"E09000028\",\"Southwark\",\"RN5\",4\r\n\"E09000028\",\"Southwark\",\"RTX\",4\r\n\"E09000028\",\"Southwark\",\"RHQ\",4\r\n\"E09000028\",\"Southwark\",\"RNS\",4\r\n\"E09000028\",\"Southwark\",\"RQW\",4\r\n\"E09000028\",\"Southwark\",\"RTK\",4\r\n\"E09000028\",\"Southwark\",\"RBD\",4\r\n\"E09000028\",\"Southwark\",\"RWD\",4\r\n\"E09000028\",\"Southwark\",\"RC1\",4\r\n\"E09000028\",\"Southwark\",\"RD1\",4\r\n\"E09000028\",\"Southwark\",\"RPG\",4\r\n\"E09000028\",\"Southwark\",\"RAJ\",3\r\n\"E09000028\",\"Southwark\",\"RTG\",5\r\n\"E09000028\",\"Southwark\",\"RA9\",3\r\n\"E09000028\",\"Southwark\",\"RGP\",3\r\n\"E09000028\",\"Southwark\",\"RJL\",3\r\n\"E09000028\",\"Southwark\",\"RR8\",3\r\n\"E09000028\",\"Southwark\",\"RWJ\",3\r\n\"E09000028\",\"Southwark\",\"RTD\",3\r\n\"E09000028\",\"Southwark\",\"RW6\",3\r\n\"E09000028\",\"Southwark\",\"RBT\",3\r\n\"E09000028\",\"Southwark\",\"RGR\",3\r\n\"E09000028\",\"Southwark\",\"RNZ\",3\r\n\"E09000028\",\"Southwark\",\"RP5\",3\r\n\"E09000028\",\"Southwark\",\"RBN\",2\r\n\"E09000028\",\"Southwark\",\"RCX\",2\r\n\"E09000028\",\"Southwark\",\"RQ3\",2\r\n\"E09000028\",\"Southwark\",\"RBL\",2\r\n\"E09000028\",\"Southwark\",\"RK5\",2\r\n\"E09000028\",\"Southwark\",\"RVJ\",2\r\n\"E09000028\",\"Southwark\",\"RWE\",2\r\n\"E09000028\",\"Southwark\",\"RCB\",2\r\n\"E09000028\",\"Southwark\",\"RBS\",2\r\n\"E09000028\",\"Southwark\",\"RBK\",2\r\n\"E09000028\",\"Southwark\",\"RPC\",2\r\n\"E09000028\",\"Southwark\",\"RVW\",2\r\n\"E09000028\",\"Southwark\",\"RXK\",3\r\n\"E09000028\",\"Southwark\",\"RXR\",2\r\n\"E09000028\",\"Southwark\",\"R1F\",2\r\n\"E09000028\",\"Southwark\",\"RBZ\",2\r\n\"E09000028\",\"Southwark\",\"RP4\",2\r\n\"E09000028\",\"Southwark\",\"RLQ\",2\r\n\"E09000028\",\"Southwark\",\"RQY\",2\r\n\"E09000028\",\"Southwark\",\"RJE\",2\r\n\"E09000028\",\"Southwark\",\"RJR\",1\r\n\"E09000028\",\"Southwark\",\"RMC\",1\r\n\"E09000028\",\"Southwark\",\"RWP\",1\r\n\"E09000028\",\"Southwark\",\"RWW\",1\r\n\"E09000028\",\"Southwark\",\"RXW\",1\r\n\"E09000028\",\"Southwark\",\"R0B\",1\r\n\"E09000028\",\"Southwark\",\"RXL\",1\r\n\"E09000028\",\"Southwark\",\"RJC\",1\r\n\"E09000028\",\"Southwark\",\"RMY\",1\r\n\"E09000028\",\"Southwark\",\"RX4\",1\r\n\"E09000028\",\"Southwark\",\"R1L\",1\r\n\"E09000028\",\"Southwark\",\"RA4\",1\r\n\"E09000028\",\"Southwark\",\"RGN\",1\r\n\"E09000028\",\"Southwark\",\"RH5\",1\r\n\"E09000028\",\"Southwark\",\"RNQ\",1\r\n\"E09000028\",\"Southwark\",\"RWR\",1\r\n\"E09000028\",\"Southwark\",\"RXA\",1\r\n\"E09000028\",\"Southwark\",\"RXP\",1\r\n\"E09000028\",\"Southwark\",\"RFS\",1\r\n\"E09000028\",\"Southwark\",\"RL4\",1\r\n\"E09000028\",\"Southwark\",\"RLT\",1\r\n\"E09000028\",\"Southwark\",\"RTV\",1\r\n\"E09000028\",\"Southwark\",\"RVY\",1\r\n\"E09000028\",\"Southwark\",\"RYV\",1\r\n\"E09000028\",\"Southwark\",\"RAN\",1\r\n\"E09000028\",\"Southwark\",\"RH8\",1\r\n\"E09000029\",\"Sutton\",\"RVR\",18591\r\n\"E09000029\",\"Sutton\",\"RJ7\",3009\r\n\"E09000029\",\"Sutton\",\"RAX\",618\r\n\"E09000029\",\"Sutton\",\"RJ6\",383\r\n\"E09000029\",\"Sutton\",\"RPY\",225\r\n\"E09000029\",\"Sutton\",\"RJ1\",103\r\n\"E09000029\",\"Sutton\",\"RQY\",83\r\n\"E09000029\",\"Sutton\",\"RTP\",75\r\n\"E09000029\",\"Sutton\",\"RJZ\",56\r\n\"E09000029\",\"Sutton\",\"RQM\",54\r\n\"E09000029\",\"Sutton\",\"R1H\",48\r\n\"E09000029\",\"Sutton\",\"RYJ\",42\r\n\"E09000029\",\"Sutton\",\"RA2\",32\r\n\"E09000029\",\"Sutton\",\"RRV\",31\r\n\"E09000029\",\"Sutton\",\"RT3\",25\r\n\"E09000029\",\"Sutton\",\"R1K\",22\r\n\"E09000029\",\"Sutton\",\"RP6\",18\r\n\"E09000029\",\"Sutton\",\"RXH\",16\r\n\"E09000029\",\"Sutton\",\"RXC\",15\r\n\"E09000029\",\"Sutton\",\"RDU\",14\r\n\"E09000029\",\"Sutton\",\"RYR\",12\r\n\"E09000029\",\"Sutton\",\"RVV\",11\r\n\"E09000029\",\"Sutton\",\"RTK\",11\r\n\"E09000029\",\"Sutton\",\"RHM\",10\r\n\"E09000029\",\"Sutton\",\"RHU\",9\r\n\"E09000029\",\"Sutton\",\"RD3\",9\r\n\"E09000029\",\"Sutton\",\"RAL\",9\r\n\"E09000029\",\"Sutton\",\"RBD\",8\r\n\"E09000029\",\"Sutton\",\"RAN\",7\r\n\"E09000029\",\"Sutton\",\"RPC\",7\r\n\"E09000029\",\"Sutton\",\"RDZ\",7\r\n\"E09000029\",\"Sutton\",\"RJ2\",12\r\n\"E09000029\",\"Sutton\",\"RGP\",6\r\n\"E09000029\",\"Sutton\",\"RBA\",6\r\n\"E09000029\",\"Sutton\",\"RDD\",5\r\n\"E09000029\",\"Sutton\",\"R0A\",5\r\n\"E09000029\",\"Sutton\",\"RHW\",5\r\n\"E09000029\",\"Sutton\",\"RTH\",5\r\n\"E09000029\",\"Sutton\",\"RK9\",5\r\n\"E09000029\",\"Sutton\",\"RA7\",4\r\n\"E09000029\",\"Sutton\",\"RDE\",4\r\n\"E09000029\",\"Sutton\",\"RWF\",4\r\n\"E09000029\",\"Sutton\",\"RXQ\",4\r\n\"E09000029\",\"Sutton\",\"RJE\",4\r\n\"E09000029\",\"Sutton\",\"RVJ\",4\r\n\"E09000029\",\"Sutton\",\"RAP\",3\r\n\"E09000029\",\"Sutton\",\"RN5\",3\r\n\"E09000029\",\"Sutton\",\"RWG\",3\r\n\"E09000029\",\"Sutton\",\"RKE\",3\r\n\"E09000029\",\"Sutton\",\"RPA\",3\r\n\"E09000029\",\"Sutton\",\"RD8\",3\r\n\"E09000029\",\"Sutton\",\"RQW\",3\r\n\"E09000029\",\"Sutton\",\"RQX\",3\r\n\"E09000029\",\"Sutton\",\"RA9\",2\r\n\"E09000029\",\"Sutton\",\"RAS\",2\r\n\"E09000029\",\"Sutton\",\"RCB\",2\r\n\"E09000029\",\"Sutton\",\"RH8\",2\r\n\"E09000029\",\"Sutton\",\"RWK\",2\r\n\"E09000029\",\"Sutton\",\"RN7\",2\r\n\"E09000029\",\"Sutton\",\"RWP\",2\r\n\"E09000029\",\"Sutton\",\"RGN\",2\r\n\"E09000029\",\"Sutton\",\"RNQ\",2\r\n\"E09000029\",\"Sutton\",\"RBL\",2\r\n\"E09000029\",\"Sutton\",\"RC9\",2\r\n\"E09000029\",\"Sutton\",\"RRK\",3\r\n\"E09000029\",\"Sutton\",\"RWY\",2\r\n\"E09000029\",\"Sutton\",\"RXW\",2\r\n\"E09000029\",\"Sutton\",\"RC1\",2\r\n\"E09000029\",\"Sutton\",\"RM1\",2\r\n\"E09000029\",\"Sutton\",\"REF\",1\r\n\"E09000029\",\"Sutton\",\"RHQ\",1\r\n\"E09000029\",\"Sutton\",\"RNS\",1\r\n\"E09000029\",\"Sutton\",\"RTE\",1\r\n\"E09000029\",\"Sutton\",\"RXF\",1\r\n\"E09000029\",\"Sutton\",\"RXK\",2\r\n\"E09000029\",\"Sutton\",\"RXN\",1\r\n\"E09000029\",\"Sutton\",\"RCF\",1\r\n\"E09000029\",\"Sutton\",\"RKB\",1\r\n\"E09000029\",\"Sutton\",\"RWW\",1\r\n\"E09000029\",\"Sutton\",\"TAD\",1\r\n\"E09000029\",\"Sutton\",\"RCD\",1\r\n\"E09000029\",\"Sutton\",\"RR8\",1\r\n\"E09000029\",\"Sutton\",\"RW6\",1\r\n\"E09000029\",\"Sutton\",\"RWH\",1\r\n\"E09000029\",\"Sutton\",\"RWX\",1\r\n\"E09000029\",\"Sutton\",\"RCX\",1\r\n\"E09000029\",\"Sutton\",\"RP4\",1\r\n\"E09000029\",\"Sutton\",\"RTX\",1\r\n\"E09000029\",\"Sutton\",\"RW1\",1\r\n\"E09000029\",\"Sutton\",\"RWE\",1\r\n\"E09000029\",\"Sutton\",\"RXL\",1\r\n\"E09000029\",\"Sutton\",\"RXX\",1\r\n\"E09000029\",\"Sutton\",\"RWA\",1\r\n\"E09000029\",\"Sutton\",\"RA4\",1\r\n\"E09000029\",\"Sutton\",\"RAE\",1\r\n\"E09000029\",\"Sutton\",\"RBZ\",1\r\n\"E09000029\",\"Sutton\",\"RF4\",1\r\n\"E09000029\",\"Sutton\",\"RJC\",1\r\n\"E09000029\",\"Sutton\",\"RNA\",1\r\n\"E09000029\",\"Sutton\",\"RTD\",1\r\n\"E09000029\",\"Sutton\",\"RTG\",1\r\n\"E09000029\",\"Sutton\",\"RV5\",1\r\n\"E09000029\",\"Sutton\",\"RJR\",1\r\n\"E09000029\",\"Sutton\",\"RLQ\",1\r\n\"E09000029\",\"Sutton\",\"RNL\",1\r\n\"E09000029\",\"Sutton\",\"RTF\",1\r\n\"E09000029\",\"Sutton\",\"RXP\",1\r\n\"E09000029\",\"Sutton\",\"RL4\",1\r\n\"E09000029\",\"Sutton\",\"RQ8\",1\r\n\"E09000030\",\"Tower Hamlets\",\"R1H\",23822\r\n\"E09000030\",\"Tower Hamlets\",\"RWK\",694\r\n\"E09000030\",\"Tower Hamlets\",\"RQX\",501\r\n\"E09000030\",\"Tower Hamlets\",\"RJ1\",418\r\n\"E09000030\",\"Tower Hamlets\",\"RRV\",279\r\n\"E09000030\",\"Tower Hamlets\",\"RF4\",91\r\n\"E09000030\",\"Tower Hamlets\",\"RYJ\",87\r\n\"E09000030\",\"Tower Hamlets\",\"RQM\",71\r\n\"E09000030\",\"Tower Hamlets\",\"RAL\",61\r\n\"E09000030\",\"Tower Hamlets\",\"RP6\",52\r\n\"E09000030\",\"Tower Hamlets\",\"RJZ\",51\r\n\"E09000030\",\"Tower Hamlets\",\"RJ2\",66\r\n\"E09000030\",\"Tower Hamlets\",\"RJ7\",39\r\n\"E09000030\",\"Tower Hamlets\",\"R1K\",31\r\n\"E09000030\",\"Tower Hamlets\",\"RKE\",31\r\n\"E09000030\",\"Tower Hamlets\",\"RQ8\",27\r\n\"E09000030\",\"Tower Hamlets\",\"RQW\",26\r\n\"E09000030\",\"Tower Hamlets\",\"RAP\",23\r\n\"E09000030\",\"Tower Hamlets\",\"RWF\",22\r\n\"E09000030\",\"Tower Hamlets\",\"RDE\",19\r\n\"E09000030\",\"Tower Hamlets\",\"RDD\",17\r\n\"E09000030\",\"Tower Hamlets\",\"RJ6\",17\r\n\"E09000030\",\"Tower Hamlets\",\"RPA\",14\r\n\"E09000030\",\"Tower Hamlets\",\"RVV\",14\r\n\"E09000030\",\"Tower Hamlets\",\"RN7\",14\r\n\"E09000030\",\"Tower Hamlets\",\"R0A\",13\r\n\"E09000030\",\"Tower Hamlets\",\"RTH\",13\r\n\"E09000030\",\"Tower Hamlets\",\"RP4\",10\r\n\"E09000030\",\"Tower Hamlets\",\"RTP\",10\r\n\"E09000030\",\"Tower Hamlets\",\"RAJ\",10\r\n\"E09000030\",\"Tower Hamlets\",\"RYR\",9\r\n\"E09000030\",\"Tower Hamlets\",\"RWG\",9\r\n\"E09000030\",\"Tower Hamlets\",\"RAS\",9\r\n\"E09000030\",\"Tower Hamlets\",\"RD1\",9\r\n\"E09000030\",\"Tower Hamlets\",\"RVR\",8\r\n\"E09000030\",\"Tower Hamlets\",\"RT3\",8\r\n\"E09000030\",\"Tower Hamlets\",\"RC9\",8\r\n\"E09000030\",\"Tower Hamlets\",\"RDZ\",8\r\n\"E09000030\",\"Tower Hamlets\",\"RA2\",8\r\n\"E09000030\",\"Tower Hamlets\",\"RW6\",7\r\n\"E09000030\",\"Tower Hamlets\",\"RGT\",7\r\n\"E09000030\",\"Tower Hamlets\",\"RXC\",7\r\n\"E09000030\",\"Tower Hamlets\",\"RRK\",8\r\n\"E09000030\",\"Tower Hamlets\",\"RDU\",7\r\n\"E09000030\",\"Tower Hamlets\",\"RAX\",7\r\n\"E09000030\",\"Tower Hamlets\",\"RNZ\",6\r\n\"E09000030\",\"Tower Hamlets\",\"RXK\",8\r\n\"E09000030\",\"Tower Hamlets\",\"RHU\",6\r\n\"E09000030\",\"Tower Hamlets\",\"RXH\",6\r\n\"E09000030\",\"Tower Hamlets\",\"REF\",6\r\n\"E09000030\",\"Tower Hamlets\",\"RWE\",6\r\n\"E09000030\",\"Tower Hamlets\",\"RD8\",5\r\n\"E09000030\",\"Tower Hamlets\",\"RVJ\",5\r\n\"E09000030\",\"Tower Hamlets\",\"REM\",7\r\n\"E09000030\",\"Tower Hamlets\",\"RKB\",5\r\n\"E09000030\",\"Tower Hamlets\",\"RQ3\",5\r\n\"E09000030\",\"Tower Hamlets\",\"RWH\",5\r\n\"E09000030\",\"Tower Hamlets\",\"RWD\",4\r\n\"E09000030\",\"Tower Hamlets\",\"RR8\",4\r\n\"E09000030\",\"Tower Hamlets\",\"RWP\",4\r\n\"E09000030\",\"Tower Hamlets\",\"RAN\",4\r\n\"E09000030\",\"Tower Hamlets\",\"RWA\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RCF\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RTD\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RXQ\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RHQ\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RJE\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RNL\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RTE\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RTK\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RHW\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RM1\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RWY\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RJC\",3\r\n\"E09000030\",\"Tower Hamlets\",\"R0B\",4\r\n\"E09000030\",\"Tower Hamlets\",\"RCX\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RGP\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RPY\",3\r\n\"E09000030\",\"Tower Hamlets\",\"RBA\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RGN\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RNQ\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RPC\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RTX\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RA7\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RNU\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RV3\",2\r\n\"E09000030\",\"Tower Hamlets\",\"R1L\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RAT\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RDY\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RHM\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RV5\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RCU\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RFS\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RK9\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RRE\",2\r\n\"E09000030\",\"Tower Hamlets\",\"R1F\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RA3\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RCB\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RX1\",2\r\n\"E09000030\",\"Tower Hamlets\",\"RBT\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RGR\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RH8\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RRF\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RTG\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RXL\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RXY\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RVY\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RW4\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RBQ\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RXR\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RXW\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RL4\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RN3\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RX3\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RBK\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RNS\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RP5\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RXX\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RBL\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RGM\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RM3\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RTR\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RW1\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RXF\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RAE\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RD3\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RWJ\",1\r\n\"E09000030\",\"Tower Hamlets\",\"TAJ\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RBD\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RMC\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RN5\",1\r\n\"E09000030\",\"Tower Hamlets\",\"RTF\",1\r\n\"E09000031\",\"Waltham Forest\",\"R1H\",26009\r\n\"E09000031\",\"Waltham Forest\",\"RQX\",1000\r\n\"E09000031\",\"Waltham Forest\",\"RAP\",748\r\n\"E09000031\",\"Waltham Forest\",\"RRV\",330\r\n\"E09000031\",\"Waltham Forest\",\"RAT\",286\r\n\"E09000031\",\"Waltham Forest\",\"RF4\",199\r\n\"E09000031\",\"Waltham Forest\",\"RJ1\",185\r\n\"E09000031\",\"Waltham Forest\",\"RAL\",137\r\n\"E09000031\",\"Waltham Forest\",\"RYJ\",83\r\n\"E09000031\",\"Waltham Forest\",\"RQW\",81\r\n\"E09000031\",\"Waltham Forest\",\"RKE\",76\r\n\"E09000031\",\"Waltham Forest\",\"RWK\",68\r\n\"E09000031\",\"Waltham Forest\",\"RP6\",67\r\n\"E09000031\",\"Waltham Forest\",\"RQ8\",51\r\n\"E09000031\",\"Waltham Forest\",\"RJZ\",46\r\n\"E09000031\",\"Waltham Forest\",\"R1K\",42\r\n\"E09000031\",\"Waltham Forest\",\"RJ7\",42\r\n\"E09000031\",\"Waltham Forest\",\"RQM\",32\r\n\"E09000031\",\"Waltham Forest\",\"RGT\",24\r\n\"E09000031\",\"Waltham Forest\",\"RDD\",29\r\n\"E09000031\",\"Waltham Forest\",\"RDE\",17\r\n\"E09000031\",\"Waltham Forest\",\"RP4\",14\r\n\"E09000031\",\"Waltham Forest\",\"RJ2\",26\r\n\"E09000031\",\"Waltham Forest\",\"RAX\",11\r\n\"E09000031\",\"Waltham Forest\",\"RWH\",10\r\n\"E09000031\",\"Waltham Forest\",\"RAS\",10\r\n\"E09000031\",\"Waltham Forest\",\"RHW\",9\r\n\"E09000031\",\"Waltham Forest\",\"RWF\",9\r\n\"E09000031\",\"Waltham Forest\",\"RT3\",9\r\n\"E09000031\",\"Waltham Forest\",\"RJ6\",8\r\n\"E09000031\",\"Waltham Forest\",\"RDU\",8\r\n\"E09000031\",\"Waltham Forest\",\"RM1\",8\r\n\"E09000031\",\"Waltham Forest\",\"RRK\",15\r\n\"E09000031\",\"Waltham Forest\",\"RWG\",8\r\n\"E09000031\",\"Waltham Forest\",\"RYR\",7\r\n\"E09000031\",\"Waltham Forest\",\"RPY\",7\r\n\"E09000031\",\"Waltham Forest\",\"RTP\",7\r\n\"E09000031\",\"Waltham Forest\",\"RVR\",7\r\n\"E09000031\",\"Waltham Forest\",\"RXK\",8\r\n\"E09000031\",\"Waltham Forest\",\"RC9\",6\r\n\"E09000031\",\"Waltham Forest\",\"RD8\",6\r\n\"E09000031\",\"Waltham Forest\",\"RPA\",6\r\n\"E09000031\",\"Waltham Forest\",\"RTH\",6\r\n\"E09000031\",\"Waltham Forest\",\"RVV\",5\r\n\"E09000031\",\"Waltham Forest\",\"RGN\",5\r\n\"E09000031\",\"Waltham Forest\",\"RN7\",5\r\n\"E09000031\",\"Waltham Forest\",\"RA2\",5\r\n\"E09000031\",\"Waltham Forest\",\"REM\",7\r\n\"E09000031\",\"Waltham Forest\",\"RR8\",5\r\n\"E09000031\",\"Waltham Forest\",\"RXH\",5\r\n\"E09000031\",\"Waltham Forest\",\"RTD\",5\r\n\"E09000031\",\"Waltham Forest\",\"RAN\",5\r\n\"E09000031\",\"Waltham Forest\",\"RXQ\",4\r\n\"E09000031\",\"Waltham Forest\",\"REF\",4\r\n\"E09000031\",\"Waltham Forest\",\"RK9\",4\r\n\"E09000031\",\"Waltham Forest\",\"RNL\",4\r\n\"E09000031\",\"Waltham Forest\",\"RWD\",4\r\n\"E09000031\",\"Waltham Forest\",\"R1F\",4\r\n\"E09000031\",\"Waltham Forest\",\"RWY\",4\r\n\"E09000031\",\"Waltham Forest\",\"RXC\",4\r\n\"E09000031\",\"Waltham Forest\",\"R0A\",4\r\n\"E09000031\",\"Waltham Forest\",\"RA7\",3\r\n\"E09000031\",\"Waltham Forest\",\"RGP\",3\r\n\"E09000031\",\"Waltham Forest\",\"RGR\",3\r\n\"E09000031\",\"Waltham Forest\",\"RTE\",3\r\n\"E09000031\",\"Waltham Forest\",\"RXL\",3\r\n\"E09000031\",\"Waltham Forest\",\"RAJ\",3\r\n\"E09000031\",\"Waltham Forest\",\"RBK\",3\r\n\"E09000031\",\"Waltham Forest\",\"RCB\",3\r\n\"E09000031\",\"Waltham Forest\",\"RN3\",3\r\n\"E09000031\",\"Waltham Forest\",\"RTG\",5\r\n\"E09000031\",\"Waltham Forest\",\"RKB\",3\r\n\"E09000031\",\"Waltham Forest\",\"RN5\",3\r\n\"E09000031\",\"Waltham Forest\",\"RNQ\",3\r\n\"E09000031\",\"Waltham Forest\",\"RX1\",3\r\n\"E09000031\",\"Waltham Forest\",\"RTX\",3\r\n\"E09000031\",\"Waltham Forest\",\"RC1\",3\r\n\"E09000031\",\"Waltham Forest\",\"RD3\",3\r\n\"E09000031\",\"Waltham Forest\",\"RNA\",3\r\n\"E09000031\",\"Waltham Forest\",\"RWE\",3\r\n\"E09000031\",\"Waltham Forest\",\"RP5\",2\r\n\"E09000031\",\"Waltham Forest\",\"RAE\",2\r\n\"E09000031\",\"Waltham Forest\",\"RBT\",2\r\n\"E09000031\",\"Waltham Forest\",\"RWA\",2\r\n\"E09000031\",\"Waltham Forest\",\"RFS\",2\r\n\"E09000031\",\"Waltham Forest\",\"RM3\",2\r\n\"E09000031\",\"Waltham Forest\",\"RXF\",2\r\n\"E09000031\",\"Waltham Forest\",\"RBZ\",2\r\n\"E09000031\",\"Waltham Forest\",\"RH8\",2\r\n\"E09000031\",\"Waltham Forest\",\"RXP\",2\r\n\"E09000031\",\"Waltham Forest\",\"RA9\",2\r\n\"E09000031\",\"Waltham Forest\",\"RDZ\",2\r\n\"E09000031\",\"Waltham Forest\",\"RHM\",2\r\n\"E09000031\",\"Waltham Forest\",\"RJE\",2\r\n\"E09000031\",\"Waltham Forest\",\"RTK\",2\r\n\"E09000031\",\"Waltham Forest\",\"RLQ\",1\r\n\"E09000031\",\"Waltham Forest\",\"RVW\",1\r\n\"E09000031\",\"Waltham Forest\",\"RW6\",1\r\n\"E09000031\",\"Waltham Forest\",\"RD1\",1\r\n\"E09000031\",\"Waltham Forest\",\"RHQ\",1\r\n\"E09000031\",\"Waltham Forest\",\"RNU\",1\r\n\"E09000031\",\"Waltham Forest\",\"RTF\",1\r\n\"E09000031\",\"Waltham Forest\",\"RXW\",1\r\n\"E09000031\",\"Waltham Forest\",\"RBD\",1\r\n\"E09000031\",\"Waltham Forest\",\"RA4\",1\r\n\"E09000031\",\"Waltham Forest\",\"RCF\",1\r\n\"E09000031\",\"Waltham Forest\",\"R0B\",1\r\n\"E09000031\",\"Waltham Forest\",\"RV5\",1\r\n\"E09000031\",\"Waltham Forest\",\"RBA\",1\r\n\"E09000031\",\"Waltham Forest\",\"RJL\",1\r\n\"E09000031\",\"Waltham Forest\",\"RFR\",1\r\n\"E09000031\",\"Waltham Forest\",\"RHU\",1\r\n\"E09000031\",\"Waltham Forest\",\"RK5\",1\r\n\"E09000031\",\"Waltham Forest\",\"RX4\",1\r\n\"E09000031\",\"Waltham Forest\",\"R1L\",1\r\n\"E09000031\",\"Waltham Forest\",\"RNS\",1\r\n\"E09000031\",\"Waltham Forest\",\"RP1\",1\r\n\"E09000031\",\"Waltham Forest\",\"RPC\",1\r\n\"E09000031\",\"Waltham Forest\",\"RQ3\",1\r\n\"E09000031\",\"Waltham Forest\",\"RWJ\",1\r\n\"E09000031\",\"Waltham Forest\",\"RL4\",1\r\n\"E09000031\",\"Waltham Forest\",\"RVJ\",1\r\n\"E09000032\",\"Wandsworth\",\"RJ7\",18184\r\n\"E09000032\",\"Wandsworth\",\"RQM\",3667\r\n\"E09000032\",\"Wandsworth\",\"RAX\",2316\r\n\"E09000032\",\"Wandsworth\",\"RJ1\",1582\r\n\"E09000032\",\"Wandsworth\",\"RYJ\",727\r\n\"E09000032\",\"Wandsworth\",\"RJZ\",254\r\n\"E09000032\",\"Wandsworth\",\"RQY\",200\r\n\"E09000032\",\"Wandsworth\",\"RRV\",189\r\n\"E09000032\",\"Wandsworth\",\"R1H\",140\r\n\"E09000032\",\"Wandsworth\",\"RVR\",137\r\n\"E09000032\",\"Wandsworth\",\"RPY\",125\r\n\"E09000032\",\"Wandsworth\",\"RJ6\",87\r\n\"E09000032\",\"Wandsworth\",\"RP6\",71\r\n\"E09000032\",\"Wandsworth\",\"R1K\",59\r\n\"E09000032\",\"Wandsworth\",\"RT3\",48\r\n\"E09000032\",\"Wandsworth\",\"RA2\",36\r\n\"E09000032\",\"Wandsworth\",\"RDU\",32\r\n\"E09000032\",\"Wandsworth\",\"RYR\",27\r\n\"E09000032\",\"Wandsworth\",\"RAL\",24\r\n\"E09000032\",\"Wandsworth\",\"RTP\",24\r\n\"E09000032\",\"Wandsworth\",\"RQX\",23\r\n\"E09000032\",\"Wandsworth\",\"RTH\",19\r\n\"E09000032\",\"Wandsworth\",\"RWF\",19\r\n\"E09000032\",\"Wandsworth\",\"RF4\",17\r\n\"E09000032\",\"Wandsworth\",\"RKE\",17\r\n\"E09000032\",\"Wandsworth\",\"REF\",16\r\n\"E09000032\",\"Wandsworth\",\"RTK\",16\r\n\"E09000032\",\"Wandsworth\",\"RAS\",14\r\n\"E09000032\",\"Wandsworth\",\"RXH\",14\r\n\"E09000032\",\"Wandsworth\",\"RJ2\",23\r\n\"E09000032\",\"Wandsworth\",\"RHU\",12\r\n\"E09000032\",\"Wandsworth\",\"RD3\",11\r\n\"E09000032\",\"Wandsworth\",\"RDE\",11\r\n\"E09000032\",\"Wandsworth\",\"RN5\",11\r\n\"E09000032\",\"Wandsworth\",\"RXC\",11\r\n\"E09000032\",\"Wandsworth\",\"RA7\",11\r\n\"E09000032\",\"Wandsworth\",\"RWH\",10\r\n\"E09000032\",\"Wandsworth\",\"RCB\",10\r\n\"E09000032\",\"Wandsworth\",\"RWG\",10\r\n\"E09000032\",\"Wandsworth\",\"RA9\",10\r\n\"E09000032\",\"Wandsworth\",\"RAP\",10\r\n\"E09000032\",\"Wandsworth\",\"RN3\",10\r\n\"E09000032\",\"Wandsworth\",\"RM1\",9\r\n\"E09000032\",\"Wandsworth\",\"RDZ\",9\r\n\"E09000032\",\"Wandsworth\",\"RVV\",8\r\n\"E09000032\",\"Wandsworth\",\"RHW\",8\r\n\"E09000032\",\"Wandsworth\",\"RTE\",8\r\n\"E09000032\",\"Wandsworth\",\"RGT\",8\r\n\"E09000032\",\"Wandsworth\",\"RNZ\",8\r\n\"E09000032\",\"Wandsworth\",\"RLQ\",8\r\n\"E09000032\",\"Wandsworth\",\"R0A\",8\r\n\"E09000032\",\"Wandsworth\",\"RH8\",8\r\n\"E09000032\",\"Wandsworth\",\"RAJ\",6\r\n\"E09000032\",\"Wandsworth\",\"RBZ\",6\r\n\"E09000032\",\"Wandsworth\",\"RK9\",6\r\n\"E09000032\",\"Wandsworth\",\"RJC\",6\r\n\"E09000032\",\"Wandsworth\",\"RBD\",6\r\n\"E09000032\",\"Wandsworth\",\"RVJ\",6\r\n\"E09000032\",\"Wandsworth\",\"RRK\",8\r\n\"E09000032\",\"Wandsworth\",\"RDD\",5\r\n\"E09000032\",\"Wandsworth\",\"RHM\",5\r\n\"E09000032\",\"Wandsworth\",\"RGP\",5\r\n\"E09000032\",\"Wandsworth\",\"REM\",6\r\n\"E09000032\",\"Wandsworth\",\"RWK\",5\r\n\"E09000032\",\"Wandsworth\",\"RXQ\",5\r\n\"E09000032\",\"Wandsworth\",\"RV3\",5\r\n\"E09000032\",\"Wandsworth\",\"RX1\",5\r\n\"E09000032\",\"Wandsworth\",\"RD1\",5\r\n\"E09000032\",\"Wandsworth\",\"RN7\",5\r\n\"E09000032\",\"Wandsworth\",\"RC9\",4\r\n\"E09000032\",\"Wandsworth\",\"RQ8\",4\r\n\"E09000032\",\"Wandsworth\",\"R1F\",4\r\n\"E09000032\",\"Wandsworth\",\"RGN\",4\r\n\"E09000032\",\"Wandsworth\",\"RTG\",7\r\n\"E09000032\",\"Wandsworth\",\"RD8\",4\r\n\"E09000032\",\"Wandsworth\",\"RCX\",4\r\n\"E09000032\",\"Wandsworth\",\"RBN\",4\r\n\"E09000032\",\"Wandsworth\",\"RKB\",4\r\n\"E09000032\",\"Wandsworth\",\"RWE\",4\r\n\"E09000032\",\"Wandsworth\",\"RQW\",4\r\n\"E09000032\",\"Wandsworth\",\"RWJ\",4\r\n\"E09000032\",\"Wandsworth\",\"RJE\",3\r\n\"E09000032\",\"Wandsworth\",\"RXL\",3\r\n\"E09000032\",\"Wandsworth\",\"RBL\",3\r\n\"E09000032\",\"Wandsworth\",\"RPC\",3\r\n\"E09000032\",\"Wandsworth\",\"RAN\",3\r\n\"E09000032\",\"Wandsworth\",\"RPA\",3\r\n\"E09000032\",\"Wandsworth\",\"RWD\",3\r\n\"E09000032\",\"Wandsworth\",\"RBT\",3\r\n\"E09000032\",\"Wandsworth\",\"RK5\",3\r\n\"E09000032\",\"Wandsworth\",\"RP4\",3\r\n\"E09000032\",\"Wandsworth\",\"RTD\",3\r\n\"E09000032\",\"Wandsworth\",\"RBA\",3\r\n\"E09000032\",\"Wandsworth\",\"RV5\",3\r\n\"E09000032\",\"Wandsworth\",\"RVY\",3\r\n\"E09000032\",\"Wandsworth\",\"RBK\",2\r\n\"E09000032\",\"Wandsworth\",\"RRF\",2\r\n\"E09000032\",\"Wandsworth\",\"RWY\",2\r\n\"E09000032\",\"Wandsworth\",\"RGR\",2\r\n\"E09000032\",\"Wandsworth\",\"RGM\",2\r\n\"E09000032\",\"Wandsworth\",\"RM3\",2\r\n\"E09000032\",\"Wandsworth\",\"RCD\",2\r\n\"E09000032\",\"Wandsworth\",\"RXK\",2\r\n\"E09000032\",\"Wandsworth\",\"RXP\",2\r\n\"E09000032\",\"Wandsworth\",\"RFS\",1\r\n\"E09000032\",\"Wandsworth\",\"RH5\",1\r\n\"E09000032\",\"Wandsworth\",\"RMP\",1\r\n\"E09000032\",\"Wandsworth\",\"RMY\",1\r\n\"E09000032\",\"Wandsworth\",\"RPG\",1\r\n\"E09000032\",\"Wandsworth\",\"RXN\",1\r\n\"E09000032\",\"Wandsworth\",\"RNQ\",1\r\n\"E09000032\",\"Wandsworth\",\"RNS\",1\r\n\"E09000032\",\"Wandsworth\",\"RR8\",1\r\n\"E09000032\",\"Wandsworth\",\"RWW\",1\r\n\"E09000032\",\"Wandsworth\",\"RC1\",1\r\n\"E09000032\",\"Wandsworth\",\"RET\",1\r\n\"E09000032\",\"Wandsworth\",\"RTX\",1\r\n\"E09000032\",\"Wandsworth\",\"RA4\",1\r\n\"E09000032\",\"Wandsworth\",\"RJR\",1\r\n\"E09000032\",\"Wandsworth\",\"RTF\",1\r\n\"E09000032\",\"Wandsworth\",\"RW1\",1\r\n\"E09000032\",\"Wandsworth\",\"RXR\",1\r\n\"E09000032\",\"Wandsworth\",\"RXX\",1\r\n\"E09000032\",\"Wandsworth\",\"RYV\",1\r\n\"E09000032\",\"Wandsworth\",\"RXF\",1\r\n\"E09000032\",\"Wandsworth\",\"RTR\",1\r\n\"E09000032\",\"Wandsworth\",\"RVW\",1\r\n\"E09000033\",\"Westminster\",\"RYJ\",8580\r\n\"E09000033\",\"Westminster\",\"RJ1\",3010\r\n\"E09000033\",\"Westminster\",\"RRV\",2136\r\n\"E09000033\",\"Westminster\",\"RQM\",1836\r\n\"E09000033\",\"Westminster\",\"RAL\",450\r\n\"E09000033\",\"Westminster\",\"RV3\",215\r\n\"E09000033\",\"Westminster\",\"R1H\",181\r\n\"E09000033\",\"Westminster\",\"R1K\",169\r\n\"E09000033\",\"Westminster\",\"RJZ\",110\r\n\"E09000033\",\"Westminster\",\"RPY\",92\r\n\"E09000033\",\"Westminster\",\"RJ7\",62\r\n\"E09000033\",\"Westminster\",\"RKE\",39\r\n\"E09000033\",\"Westminster\",\"RT3\",36\r\n\"E09000033\",\"Westminster\",\"RAS\",36\r\n\"E09000033\",\"Westminster\",\"RTH\",27\r\n\"E09000033\",\"Westminster\",\"RQX\",23\r\n\"E09000033\",\"Westminster\",\"RWG\",19\r\n\"E09000033\",\"Westminster\",\"RDU\",15\r\n\"E09000033\",\"Westminster\",\"RHW\",15\r\n\"E09000033\",\"Westminster\",\"RVR\",13\r\n\"E09000033\",\"Westminster\",\"RJ2\",18\r\n\"E09000033\",\"Westminster\",\"RYR\",13\r\n\"E09000033\",\"Westminster\",\"RTP\",13\r\n\"E09000033\",\"Westminster\",\"RAX\",12\r\n\"E09000033\",\"Westminster\",\"RTE\",11\r\n\"E09000033\",\"Westminster\",\"RA2\",11\r\n\"E09000033\",\"Westminster\",\"RJ6\",11\r\n\"E09000033\",\"Westminster\",\"RP6\",11\r\n\"E09000033\",\"Westminster\",\"RXH\",10\r\n\"E09000033\",\"Westminster\",\"RAP\",9\r\n\"E09000033\",\"Westminster\",\"RF4\",9\r\n\"E09000033\",\"Westminster\",\"RNZ\",8\r\n\"E09000033\",\"Westminster\",\"RWH\",8\r\n\"E09000033\",\"Westminster\",\"RWF\",8\r\n\"E09000033\",\"Westminster\",\"RHM\",8\r\n\"E09000033\",\"Westminster\",\"RVV\",7\r\n\"E09000033\",\"Westminster\",\"RHU\",7\r\n\"E09000033\",\"Westminster\",\"REF\",7\r\n\"E09000033\",\"Westminster\",\"RDZ\",7\r\n\"E09000033\",\"Westminster\",\"RXC\",7\r\n\"E09000033\",\"Westminster\",\"RVJ\",6\r\n\"E09000033\",\"Westminster\",\"RQW\",6\r\n\"E09000033\",\"Westminster\",\"RM1\",6\r\n\"E09000033\",\"Westminster\",\"RN7\",6\r\n\"E09000033\",\"Westminster\",\"RN3\",6\r\n\"E09000033\",\"Westminster\",\"RNS\",6\r\n\"E09000033\",\"Westminster\",\"RWK\",5\r\n\"E09000033\",\"Westminster\",\"RD1\",5\r\n\"E09000033\",\"Westminster\",\"RBA\",5\r\n\"E09000033\",\"Westminster\",\"RDE\",5\r\n\"E09000033\",\"Westminster\",\"RGT\",5\r\n\"E09000033\",\"Westminster\",\"RP4\",5\r\n\"E09000033\",\"Westminster\",\"RHQ\",4\r\n\"E09000033\",\"Westminster\",\"RN5\",4\r\n\"E09000033\",\"Westminster\",\"RA9\",4\r\n\"E09000033\",\"Westminster\",\"RD3\",4\r\n\"E09000033\",\"Westminster\",\"RBV\",4\r\n\"E09000033\",\"Westminster\",\"RV5\",4\r\n\"E09000033\",\"Westminster\",\"R0A\",4\r\n\"E09000033\",\"Westminster\",\"RJE\",4\r\n\"E09000033\",\"Westminster\",\"RKB\",4\r\n\"E09000033\",\"Westminster\",\"RAN\",4\r\n\"E09000033\",\"Westminster\",\"RTF\",4\r\n\"E09000033\",\"Westminster\",\"RQ8\",3\r\n\"E09000033\",\"Westminster\",\"RRK\",5\r\n\"E09000033\",\"Westminster\",\"RDD\",3\r\n\"E09000033\",\"Westminster\",\"RTD\",3\r\n\"E09000033\",\"Westminster\",\"RTG\",3\r\n\"E09000033\",\"Westminster\",\"RGN\",3\r\n\"E09000033\",\"Westminster\",\"RGP\",3\r\n\"E09000033\",\"Westminster\",\"RH8\",3\r\n\"E09000033\",\"Westminster\",\"RPA\",3\r\n\"E09000033\",\"Westminster\",\"RXQ\",3\r\n\"E09000033\",\"Westminster\",\"RBD\",2\r\n\"E09000033\",\"Westminster\",\"RBL\",2\r\n\"E09000033\",\"Westminster\",\"RGR\",2\r\n\"E09000033\",\"Westminster\",\"RNU\",2\r\n\"E09000033\",\"Westminster\",\"REM\",2\r\n\"E09000033\",\"Westminster\",\"RXW\",2\r\n\"E09000033\",\"Westminster\",\"RXL\",2\r\n\"E09000033\",\"Westminster\",\"RAE\",2\r\n\"E09000033\",\"Westminster\",\"RC1\",2\r\n\"E09000033\",\"Westminster\",\"RJL\",2\r\n\"E09000033\",\"Westminster\",\"R1F\",2\r\n\"E09000033\",\"Westminster\",\"RA7\",2\r\n\"E09000033\",\"Westminster\",\"RAJ\",2\r\n\"E09000033\",\"Westminster\",\"RCX\",2\r\n\"E09000033\",\"Westminster\",\"RNL\",2\r\n\"E09000033\",\"Westminster\",\"RRF\",2\r\n\"E09000033\",\"Westminster\",\"RX1\",2\r\n\"E09000033\",\"Westminster\",\"RBK\",2\r\n\"E09000033\",\"Westminster\",\"RCD\",2\r\n\"E09000033\",\"Westminster\",\"RD8\",2\r\n\"E09000033\",\"Westminster\",\"RK9\",2\r\n\"E09000033\",\"Westminster\",\"RR8\",2\r\n\"E09000033\",\"Westminster\",\"RWE\",2\r\n\"E09000033\",\"Westminster\",\"RBT\",1\r\n\"E09000033\",\"Westminster\",\"RCF\",1\r\n\"E09000033\",\"Westminster\",\"RJC\",1\r\n\"E09000033\",\"Westminster\",\"RNA\",1\r\n\"E09000033\",\"Westminster\",\"RA4\",1\r\n\"E09000033\",\"Westminster\",\"RTR\",1\r\n\"E09000033\",\"Westminster\",\"RWD\",1\r\n\"E09000033\",\"Westminster\",\"RXF\",1\r\n\"E09000033\",\"Westminster\",\"R1L\",1\r\n\"E09000033\",\"Westminster\",\"RW6\",1\r\n\"E09000033\",\"Westminster\",\"RWX\",1\r\n\"E09000033\",\"Westminster\",\"RCB\",1\r\n\"E09000033\",\"Westminster\",\"RWP\",1\r\n\"E09000033\",\"Westminster\",\"RXY\",1\r\n\"E09000033\",\"Westminster\",\"RBN\",1\r\n\"E09000033\",\"Westminster\",\"RX3\",1\r\n\"E09000033\",\"Westminster\",\"RA3\",1\r\n\"E09000033\",\"Westminster\",\"RC9\",1\r\n\"E09000033\",\"Westminster\",\"RFS\",1\r\n\"E09000033\",\"Westminster\",\"RTX\",1\r\n\"E09000033\",\"Westminster\",\"RWR\",1\r\n\"E09000033\",\"Westminster\",\"RBZ\",1\r\n\"E09000033\",\"Westminster\",\"RFF\",1\r\n\"E09000033\",\"Westminster\",\"RPG\",1\r\n\"E09000033\",\"Westminster\",\"RXE\",1\r\n\"E09000033\",\"Westminster\",\"RJN\",1\r\n\"E09000033\",\"Westminster\",\"RPC\",1\r\n\"E09000033\",\"Westminster\",\"RWY\",1\r\n\"W06000001\",\"Isle of Anglesey\",NA,0\r\n\"W06000002\",\"Gwynedd\",NA,0\r\n\"W06000003\",\"Conwy\",NA,0\r\n\"W06000004\",\"Denbighshire\",NA,0\r\n\"W06000005\",\"Flintshire\",NA,0\r\n\"W06000006\",\"Wrexham\",NA,0\r\n\"W06000008\",\"Ceredigion\",NA,0\r\n\"W06000009\",\"Pembrokeshire\",NA,0\r\n\"W06000010\",\"Carmarthenshire\",NA,0\r\n\"W06000011\",\"Swansea\",NA,0\r\n\"W06000012\",\"Neath Port Talbot\",NA,0\r\n\"W06000013\",\"Bridgend\",NA,0\r\n\"W06000014\",\"Vale of Glamorgan\",NA,0\r\n\"W06000015\",\"Cardiff\",NA,0\r\n\"W06000016\",\"Rhondda Cynon Taf\",NA,0\r\n\"W06000018\",\"Caerphilly\",NA,0\r\n\"W06000019\",\"Blaenau Gwent\",NA,0\r\n\"W06000020\",\"Torfaen\",NA,0\r\n\"W06000021\",\"Monmouthshire\",NA,0\r\n\"W06000022\",\"Newport\",NA,0\r\n\"W06000023\",\"Powys\",NA,0\r\n\"W06000024\",\"Merthyr Tydfil\",NA,0\r\n"
  },
  {
    "path": "Heatmaps/readme.md",
    "content": "## Visualising the spread of the pandemic<br>\n*Cases*<br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n*Hospital admissions*<br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n*Vaccinations*<br>\n[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<br><br>\n[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.<br><br>\n*Apps*<br>\nI'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.\n\n![Vaccination cartogram](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDVaxMSOACartogram.png)\n\n![Cases heatmap](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDLACasesHeatmap.png)\n\n![COVID Cycle England](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDCycleEng.png)\n\n![Cases by age heatmap](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVID_Age_Plot1.PNG)\n\n![Cases by age linegraph](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVID_Age_Plot2.PNG)\n\n![Cases by age streamgraph](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVID_Age_Plot3.PNG)\n\nSuggested citation for any of this analysis:<br>\nAngus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226\n"
  },
  {
    "path": "Initial Inequality Estimates/Estimated Cases by IMD.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(readxl)\nlibrary(paletteer)\nlibrary(sf)\nlibrary(gganimate)\nlibrary(cowplot)\nlibrary(lubridate)\nlibrary(data.table)\nlibrary(forcats)\nlibrary(RcppRoll)\n\noptions(scipen = 999)\n\n#Read in COVID dase data\ntemp <- tempfile()\nsource <- \"https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\ndata <- fread(temp)[,c(1,2,3,4,5,8)]\ncolnames(data) <- c(\"name\", \"code\", \"type\", \"date\", \"cases\", \"cumul_cases\")\ndata$date <- as.Date(data$date)\n\n#split out regional data\nreg_data <- subset(data, type==\"Region\")\ndata <- subset(data, type==\"Upper tier local authority\")\n\n#Read in IMD data\ntemp <- tempfile()\nsource <- \"https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/834001/File_11_-_IoD2019_Local_Authority_District_Summaries__upper-tier__.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nIMDdata <- read_excel(temp, sheet=\"IMD\", range=\"A1:D152\", col_names=TRUE)[,-c(2)]\ncolnames(IMDdata) <-  c(\"code\", \"IMDrank\", \"IMDorder\")\nIMDdata$quintile <- ntile(IMDdata$IMDrank, 5)\n\ndata <- merge(data, IMDdata, by=\"code\")\n\n#Bring in region data (probably a better source for this)\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/healthandlifeexpectancies/datasets/healthylifeexpectancyatbirthforuppertierlocalauthoritiesenglandreferencetables/20102012/hleatbirthforuppertierlocalauthorities201012final.xls\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nRegionLookup <- read_excel(temp, sheet=\"UTLA males\", range=\"A10:E160\", col_names=TRUE)[,c(1,5)]\ncolnames(RegionLookup) <- c(\"code\", \"region\")\n\n#Combine\ndata <- merge(data, RegionLookup, all.x=TRUE)\n\n#Sort out regions with boundary changes since the region list was compiled\ndata$region <- case_when(\n  data$name==\"Dorset\" ~ \"South West\",\n  data$name==\"Bournemouth, Christchurch and Poole\" ~ \"South West\",\n  data$name==\"Gateshead\" ~ \"North East\",\n  data$name==\"City of London\" ~ \"London\",\n  TRUE ~ data$region\n)\n\n#Bring in LA-level population data\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fpopulationandmigration%2fpopulationestimates%2fdatasets%2fpopulationestimatesforukenglandandwalesscotlandandnorthernireland%2fmid20182019laboundaries/ukmidyearestimates20182019ladcodes.xls\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nLApop <- read_excel(temp, sheet=\"MYE2-All\", range=\"A5:D367\", col_names=TRUE)\ncolnames(LApop) <- c(\"code2\", \"name\", \"geography\", \"pop\")\n\nLApop_long <- gather(LApop, age, pop, pop)\n\n#deal with Cornwall & Scilly + Hackney & City of London which are merged in the PHE data\nLApop_long$code <- case_when(\n  LApop_long$code2==\"E06000052\" ~ \"E06000052\",\n  TRUE ~ LApop_long$code2\n)\n\nLApop_long <- LApop_long %>%\n  group_by(code) %>%\n  summarise(pop=sum(pop))\n\n#Combine\ndata <- merge(data, LApop_long, all.x=TRUE)\n\n#Set up skepeton dataframe with dates\nLAcodes <- unique(data$code)\nmin <- min(data$date)\nmax <- max(data$date)\n\nskeleton <- 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)))\n\n#Map data onto skeleton\nfulldata <- merge(skeleton, data[,c(1,4:6)], by=c(\"code\", \"date\"), all.x=TRUE, all.y=TRUE)\n\n#Fill in blank days\nfulldata$cases <- ifelse(is.na(fulldata$cases), 0, fulldata$cases)\n\n#Calculate cumulative sums so far\nfulldata <- fulldata %>%\n  group_by(code) %>%\n  mutate(cumul_cases=cumsum(cases))\n\n#Bring in LA factors\nLAdata <- unique(data[,c(1,2,7:11)])\nfulldata <- merge(fulldata, LAdata)\n  \n#Calculate rates by LA\nfulldata$caserate <- fulldata$cases*100000/fulldata$pop\n\n#Collapse to quintiles\nquintiles <- fulldata %>%\n  group_by(quintile, date) %>%\n  summarise(cases=sum(cases), cumul_cases=sum(cumul_cases), pop=sum(pop))\n\n#Calculate rates\nquintiles$caserate <- quintiles$cumul_cases*100000/quintiles$pop\n\n#Set up lines for log breaks\nlogbreaks <- data.frame(breaks=c(1,2,5,10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000))\nratebreaks <- data.frame(breaks=c(1,2,5,10,20,50))\n\ntiff(\"Outputs/COVIDQuintiles.tiff\", units=\"in\", res=300, width=8, height=6)\nggplot(quintiles, aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+\n  geom_line()+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases\")+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDQuintilesLog.tiff\", units=\"in\", res=300, width=8, height=6)\nggplot(subset(quintiles, cumul_cases>0), aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+\n  geom_segment(data=logbreaks, aes(x=as.Date(-Inf, origin=\"2018-01-01\"), xend=as.Date(Inf, origin=\"2018-01-01\"), \n                                   y=breaks, yend=breaks), colour=\"gray80\")+\n  geom_line()+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases (log scale)\", trans=\"log10\", breaks=logbreaks$breaks)+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDQuintilesRate.tiff\", units=\"in\", res=300, width=8, height=6)\nggplot(quintiles, aes(x=date, y=caserate, colour=as.factor(quintile)))+\n  geom_line()+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases per 100,000 population\")+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDQuintilesRateLog.tiff\", units=\"in\", res=300, width=8, height=6)\nggplot(subset(quintiles, cumul_cases>0), aes(x=date, y=caserate, colour=as.factor(quintile)))+\n  geom_segment(data=ratebreaks, aes(x=as.Date(-Inf, origin=\"2018-01-01\"), xend=as.Date(Inf, origin=\"2018-01-01\"), \n                                    y=breaks, yend=breaks), colour=\"gray80\")+  geom_line()+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases per 100,000 population (log scale)\", trans=\"log10\",\n                     breaks=ratebreaks$breaks)+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\n#Split into London/not London\nfulldata$London <- case_when(\n  fulldata$region==\"London\" ~ \"London\",\n  TRUE ~ \"Rest of England\"\n)\n\n#Collapse to quintiles\nLonquintiles<- fulldata %>%\n  group_by(quintile, London, date) %>%\n  summarise(cases=sum(cases), cumul_cases=sum(cumul_cases), pop=sum(pop))\n\n#Calculate rates\nLonquintiles$caserate <- Lonquintiles$cumul_cases*100000/Lonquintiles$pop\n\ntiff(\"Outputs/COVIDQuintilesLon.tiff\", units=\"in\", res=300, width=12, height=6)\nggplot(Lonquintiles, aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+\n  geom_line()+\n  facet_wrap(~London)+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases\")+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDQuintilesLonLog.tiff\", units=\"in\", res=300, width=12, height=6)\nggplot(subset(Lonquintiles, cumul_cases>0), aes(x=date, y=cumul_cases, colour=as.factor(quintile)))+\n  geom_segment(data=logbreaks, aes(x=as.Date(-Inf, origin=\"2018-01-01\"), xend=as.Date(Inf, origin=\"2018-01-01\"), \n                                   y=breaks, yend=breaks), colour=\"gray80\")+  geom_line()+  geom_line()+\n  facet_wrap(~London)+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases\", trans=\"log10\",\n                     breaks=logbreaks$breaks)+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDQuintilesLonRate.tiff\", units=\"in\", res=300, width=12, height=6)\nggplot(Lonquintiles, aes(x=date, y=caserate, colour=as.factor(quintile)))+\n  geom_line()+\n  facet_wrap(~London)+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases per 100,000 population\")+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDQuintilesLonRateLog.tiff\", units=\"in\", res=300, width=12, height=6)\nggplot(subset(Lonquintiles, cumul_cases>0), aes(x=date, y=caserate, colour=as.factor(quintile)))+\n  geom_segment(data=ratebreaks, aes(x=as.Date(-Inf, origin=\"2018-01-01\"), xend=as.Date(Inf, origin=\"2018-01-01\"), \n                                    y=breaks, yend=breaks), colour=\"gray80\")+  geom_line()+  geom_line()+\n  facet_wrap(~London)+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#fcc5c0\", \"#fa9fb5\", \"#f768a1\", \"#c51b8a\", \"#7a0177\"), name=\"IMD quintile\",\n                      labels=c(\"Q1 (least deprived)\", \"Q2\", \"Q3\", \"Q4\", \"Q5 (most deprived)\"))+\n  scale_x_date(name=\"Date\")+\n  scale_y_continuous(name=\"Cumulative known cases per 100,000 population\", trans=\"log10\",\n                     breaks=ratebreaks$breaks)+\n  labs(title=\"Cumulative COVID-19 cases by deprivation quintile\", subtitle=\"Deprivation estimated using mean IMD level across each UTLA\",\n       caption=\"Case data from PHE | IMD2019 data from DHCLG | Plot by @VictimOfMaths\")\ndev.off()\n\n#Map of most cumulative case rates\n#Read in shapefile of LA boundaries, which can be downloaded from:\n#http://geoportal.statistics.gov.uk/datasets/counties-and-unitary-authorities-december-2017-full-clipped-boundaries-in-uk/data\nshapefile <- st_read(\"Shapefiles/Counties_and_Unitary_Authorities_December_2017_Full_Clipped_Boundaries_in_UK.shp\")\nnames(shapefile)[names(shapefile) == \"ctyua17cd\"] <- \"code\"\n\nfulldata$caserate <- fulldata$cumul_cases*100000/fulldata$pop\n\n#Duplicate data to account for shapefile using pre-2019 codes\nint1 <- filter(fulldata, name==\"Bournemouth, Christchurch and Poole\")\nint1$code <- \"E06000028\"\nint2 <- filter(fulldata, name==\"Bournemouth, Christchurch and Poole\")\nint2$code <- \"E06000029\"\nint3 <- filter(fulldata, name==\"Bournemouth, Christchurch and Poole\")\nint3$code <- \"E10000009\"\nint4 <- filter(fulldata, name==\"Cornwall and Isles of Scilly\")\nint4$code <- \"E06000053\"\n\ntemp <- rbind(fulldata, int1, int2, int3, int4)\n\n#Bring in data\nmap.data <- full_join(shapefile, temp, by=\"code\", all.y=TRUE)\n\n#remove areas with no HLE data (i.e. Scotland, Wales & NI)\nmap.data <- subset(map.data, substr(code, 1, 1)==\"E\")\n\n#Whole country\nEngland <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+\n  geom_sf(colour=\"White\")+\n  xlim(10000,655644)+\n  ylim(5337,700000)+\n  theme_classic()+\n  scale_fill_paletteer_c(\"pals::ocean.tempo\", name=\"Total confirmed\\ncases per 100,000\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank(),  plot.title=element_text(face=\"bold\"))+\n  labs(title=\"Confirmed COVID-19 case rates for Local Authorities in England\",\n       caption=\"Data from Public Health England | Plot by @VictimOfMaths\")+\n  geom_rect(aes(xmin=500000, xmax=560000, ymin=156000, ymax=200000), fill=\"transparent\",\n            colour=\"gray50\")+\n  geom_rect(aes(xmin=310000, xmax=405000, ymin=370000, ymax=430000), fill=\"transparent\",\n            colour=\"gray50\")+\n  geom_rect(aes(xmin=405000, xmax=490000, ymin=505000, ymax=580000), fill=\"transparent\",\n            colour=\"gray50\")\n#Add zoomed in areas\n#London\nLondon <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+\n  geom_sf(colour=\"White\", show.legend=FALSE)+\n  scale_x_continuous(limits=c(500000,560000), expand=c(0,0))+\n  scale_y_continuous(limits=c(156000,200000), expand=c(0,0))+\n  theme_classic()+\n  scale_fill_paletteer_c(\"pals::ocean.tempo\", name=\"Total confirmed\\ncases per 100,000\",\n  )+\n  labs(title=\"Greater London\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank())\n\n#North-West England\nNWEng <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+\n  geom_sf(colour=\"White\", show.legend=FALSE)+\n  scale_x_continuous(limits=c(310000,405000), expand=c(0,0))+\n  scale_y_continuous(limits=c(370000,430000), expand=c(0,0))+\n  theme_classic()+\n  scale_fill_paletteer_c(\"pals::ocean.tempo\", name=\"Total confirmed\\ncases per 100,000\")+\n  labs(title=\"The North West\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank())\n\n#Tyne/Tees  \nNEEng <- ggplot(data=subset(map.data, date==max(date)), aes(fill=caserate, geometry=geometry))+\n  geom_sf(colour=\"White\", show.legend=FALSE)+\n  scale_x_continuous(limits=c(405000,490000), expand=c(0,0))+\n  scale_y_continuous(limits=c(505000,580000), expand=c(0,0))+\n  theme_classic()+\n  scale_fill_paletteer_c(\"pals::ocean.tempo\", name=\"Total confirmed\\ncases per 100,000\")+\n  labs(title=\"The North East\")+\n  theme(axis.line=element_blank(), axis.ticks=element_blank(), axis.text=element_blank(),\n        axis.title=element_blank())\n\ntiff(\"Outputs/COVIDMap.tiff\", units=\"in\", width=10, height=12, res=300)\nggdraw()+\n  draw_plot(England)+\n  draw_plot(London, 0.01,0.32,0.35,0.24)+\n  draw_plot(NWEng, 0.01,0.62, 0.32, 0.24)+\n  draw_plot(NEEng, 0.57, 0.67, 0.22, 0.22)\ndev.off()\n"
  },
  {
    "path": "Initial Inequality Estimates/readme.md",
    "content": "An initial attempt to understand the potential inequality impacts of the pandemic, before official data became available.<br><br>\n[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.\n\n![Quintile plot](https://github.com/VictimOfMaths/COVID-19/blob/master/Initial%20Inequality%20Estimates/COVIDQuintilesLonRate.png)\n\nSuggested citation for any of this analysis:<br>\nAngus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226\n"
  },
  {
    "path": "Observed Inequality/COVID-19 vs. Brexit.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(sf)\nlibrary(paletteer)\nlibrary(readxl)\n\n#Read in Brexit voting data by LA\ntemp <- tempfile()\nsource <- \"http://researchbriefings.files.parliament.uk/documents/CBP-7639/EU-referendum-results-and-characteristics-data.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nBrexitdata <- read_excel(temp, sheet=\"Results\", range=\"A1:U383\")[,c(4,5,19,20)]\nBrexitdata$Result <- if_else(Brexitdata$Pct_Leave>Brexitdata$Pct_Remain, \"Leave\", \"Remain\")\n\n#Read in COVID19 data\n#Deaths\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1march2020to31may2020/referencetablesworkbook1.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nDeathsdata <- read_excel(temp, sheet=\"Table 2\", range=\"A6:Z3488\", col_names=FALSE)[,c(1,2,4,5,16,17)]\ncolnames(Deathsdata) <- c(\"cause\", \"sex\", \"Area_Code\", \"Area\", \"Deaths\", \"Mortrate\")\n\nDeathsdata <- Deathsdata %>% \n  filter(cause==\"COVID-19\" & sex==\"Persons\")\n\n#Merge\ndata <- merge(Brexitdata, Deathsdata, by=\"Area_Code\")\n\ntiff(\"Outputs/COVIDvsBrexit.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(data, aes(x=Pct_Leave, y=as.numeric(Mortrate)))+\n  geom_point(colour=\"tomato4\", alpha=0.6)+\n  geom_smooth(method=\"lm\", formula=y~x)+\n  scale_x_continuous(name=\"% leave vote\", breaks=c(0.2,0.4,0.6), labels=c(\"20%\", \"40%\", \"60%\"))+\n  scale_y_continuous(name=\"Age-standardised COVID-19 deaths per 100,000\")+\n  theme_classic()+\n  labs(title=\"Correlation between Brexit vote and COVID-19 mortality\",\n       subtitle=\"Based on Local Authorities in England & Wales\",\n       caption=\"Data from House of Commons Library & ONS | Plot by @VictimOfMaths\")\ndev.off()\n\n#Bring in unadjusted case trajectories\ntemp <- tempfile()\nsource <- \"https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nCasesdata <- read.csv(temp)[,c(2,1,4,5)]\ncolnames(Casesdata) <- c(\"Area_Code\", \"Area\", \"Date\", \"NewCases\")\n\nCasesdata$Date <- as.Date(Casesdata$Date)\n\n#Merge in Brexit vote\nCasesdata <- merge(Casesdata, Brexitdata, by=\"Area_Code\")\n\n#Calculate trajectories\ncasetraj <- Casesdata %>%\n  group_by(Date, Result) %>%\n  summarise(cases=sum(NewCases))\n\ntiff(\"Outputs/COVIDvsBrexitTrajectories.tiff\", units=\"in\", width=8, height=6, res=500)\nggplot(casetraj, aes(x=Date, y=cases, colour=Result))+\n  geom_line()+\n  theme_classic()+\n  scale_colour_manual(values=c(\"#003399\", \"#FFCC00\"))+\n  scale_y_continuous(name=\"Daily confirmed COVID-19 cases\")+\n  labs(title=\"New COVID-19 cases by Local Authority Brexit vote\",\n       caption=\"Data from House of Commons Library & ONS | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Observed Inequality/COVIDIneqDataSetup.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(lubridate)\r\nlibrary(paletteer)\r\nlibrary(ggtext)\r\nlibrary(broom)\r\n\r\n#2005-2018 deaths registed from https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10929weeklydeathsregistrationsbyimdsexandagegroupenglandandwales2005to2018\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10929weeklydeathsregistrationsbyimdsexandagegroupenglandandwales2005to2018/wklydthsimdsexage2005to2018final.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\n\r\n#Read in data\r\ndeaths2005 <- read_excel(temp, sheet=\"Table 1\", range=\"A4:BC144\")\r\ndeaths2006 <- read_excel(temp, sheet=\"Table 3\", range=\"A4:BC144\")\r\ndeaths2007 <- read_excel(temp, sheet=\"Table 5\", range=\"A4:BC144\")\r\ndeaths2008 <- read_excel(temp, sheet=\"Table 7\", range=\"A4:BC144\")\r\ndeaths2009 <- read_excel(temp, sheet=\"Table 9\", range=\"A4:BD144\")\r\ncolnames(deaths2009)[56] <- \"Week 53\"\r\ndeaths2010 <- read_excel(temp, sheet=\"Table 11\", range=\"A4:BC144\")\r\ndeaths2011 <- read_excel(temp, sheet=\"Table 13\", range=\"A4:BC144\")\r\ndeaths2012 <- read_excel(temp, sheet=\"Table 15\", range=\"A4:BC144\")\r\ndeaths2013 <- read_excel(temp, sheet=\"Table 17\", range=\"A4:BC144\")\r\ndeaths2014 <- read_excel(temp, sheet=\"Table 19\", range=\"A4:BC144\")\r\ndeaths2015 <- read_excel(temp, sheet=\"Table 21\", range=\"A4:BD144\")\r\ndeaths2016 <- read_excel(temp, sheet=\"Table 23\", range=\"A4:BC144\")\r\ndeaths2017 <- read_excel(temp, sheet=\"Table 25\", range=\"A4:BC144\")\r\ndeaths2018 <- read_excel(temp, sheet=\"Table 27\", range=\"A4:BC144\")\r\n\r\n#Tidy up and merge\r\ndeaths2005$year <- 2005\r\ndeaths2006$year <- 2006\r\ndeaths2007$year <- 2007\r\ndeaths2008$year <- 2008\r\ndeaths2009$year <- 2009\r\ndeaths2010$year <- 2010\r\ndeaths2011$year <- 2011\r\ndeaths2012$year <- 2012\r\ndeaths2013$year <- 2013\r\ndeaths2014$year <- 2014\r\ndeaths2015$year <- 2015\r\ndeaths2016$year <- 2016\r\ndeaths2017$year <- 2017\r\ndeaths2018$year <- 2018\r\n\r\npopwt <- data.frame(Age=c(\"Under 1 year\", \"01-14\", \"15-44\", \"45-64\", \"65-74\", \"75-84\", \"85+\"), \r\n                    wt=c(0.01, 0.04+0.055+0.055, 0.055+0.06+0.06+0.065+0.07+0.07,\r\n                             0.07+0.07+0.065+0.06, 0.055+0.05, 0.04+0.025,\r\n                             0.015+0.008+0.002))\r\n\r\n#Bring in populations\r\n#2005-17 data from https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/adhocs/009316populationsbysexsingleyearofageandindexofmultipledeprivationimdengland2001to2017\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/populationandmigration/populationestimates/adhocs/009316populationsbysexsingleyearofageandindexofmultipledeprivationimdengland2001to2017/populationbyageimdengland20012017.xls\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nengpop0117 <- read_excel(temp, sheet=\"Table 1\", range=\"A14:E30953\", col_names=FALSE)\r\ncolnames(engpop0117) <- c(\"year\", \"Sex\", \"Age\", \"IMD\", \"exposure\")\r\n\r\nengpop0117$Age <- case_when(\r\n  engpop0117$Age==\"0\" ~ \"Under 1 year\",\r\n  as.numeric(engpop0117$Age)<15 ~ \"01-14\",\r\n  as.numeric(engpop0117$Age)<45 ~ \"15-44\",\r\n  as.numeric(engpop0117$Age)<65 ~ \"45-64\",\r\n  as.numeric(engpop0117$Age)<75 ~ \"65-74\",\r\n  as.numeric(engpop0117$Age)<85 ~ \"75-84\",\r\n  TRUE~ \"85+\")\r\n\r\n#collapse ages\r\nengpop0117 <- engpop0117 %>% \r\n  group_by(year, Sex, IMD, Age) %>% \r\n  summarise(exposure=sum(exposure)) %>% \r\n  ungroup()\r\n\r\nengpop0117$Sex <- if_else(engpop0117$Sex==1, \"Male\", \"Female\")\r\n\r\n#2018 data from https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10832deathsandpopulationsbyindexofmultipledeprivationimdenglandandwales2018registrations\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10832deathsandpopulationsbyindexofmultipledeprivationimdenglandandwales2018registrations/deathspopsimdengwal2018.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nengpop18.m <- read_excel(temp, sheet=4, range=\"B4:CO13\", col_names=FALSE)\r\nengpop18.f <- read_excel(temp, sheet=4, range=\"B15:CO24\", col_names=FALSE)\r\nengpop18.m$Sex <- \"Male\"\r\nengpop18.f$Sex <- \"Female\"\r\nengpop18 <- bind_rows(engpop18.m, engpop18.f)\r\n\r\nengpop18 <- gather(engpop18, Age, exposure, c(2:92))\r\ncolnames(engpop18) <- c(\"IMD\", \"Sex\", \"Age\", \"exposure\")\r\n\r\nengpop18$Age <- as.numeric(substr(engpop18$Age,4,5))-2\r\n\r\nengpop18$Age <- case_when(\r\n  engpop18$Age==0 ~ \"Under 1 year\",\r\n  engpop18$Age<15 ~ \"01-14\",\r\n  engpop18$Age<45 ~ \"15-44\",\r\n  engpop18$Age<65 ~ \"45-64\",\r\n  engpop18$Age<75 ~ \"65-74\",\r\n  engpop18$Age<85 ~ \"75-84\",\r\n  TRUE~ \"85+\")\r\n\r\n#Collapse ages and merge into 01-17 data\r\nengpop <- engpop18 %>% \r\n  group_by(Sex, IMD, Age) %>% \r\n  summarise(exposure=sum(exposure)) %>% \r\n  ungroup() %>% \r\n  mutate(year=2018) %>% \r\n  bind_rows(engpop0117)\r\n\r\n#Merge and collapse age groups\r\ndeaths0518 <- bind_rows(deaths2005, deaths2006, deaths2007, deaths2008, deaths2009, deaths2010,\r\n                        deaths2011, deaths2012, deaths2013, deaths2014, deaths2015, deaths2016,\r\n                        deaths2017, deaths2018) %>% \r\n  select(year, everything()) %>% \r\n  gather(week, deaths, `Week 1`:`Week 53`) %>%   \r\n  merge(popwt) %>% \r\n  merge(engpop) %>% \r\n  mutate(mortrate=deaths*100000/exposure, wtrate=mortrate*wt) %>% \r\n  group_by(IMD, Sex, year, week) %>% \r\n  summarise(deaths=sum(deaths, na.rm=TRUE), ASMR=sum(wtrate, na.rm=TRUE)) %>% \r\n  ungroup() %>% \r\n  filter(!(week==\"Week 53\" & !year %in% c(2009, 2015)))\r\n\r\n\r\ndeaths0518$week <- as.numeric(substr(deaths0518$week,6,7))\r\n\r\n#Collapse populations over age groups\r\n\r\nengpop <- engpop %>% \r\n  group_by(Sex, IMD, year) %>% \r\n  summarise(exposure=sum(exposure)) %>% \r\n  ungroup()\r\n\r\nengpop$time <- case_when(\r\n  engpop$year==2001 ~ -26-2*52-53,\r\n  engpop$year==2002 ~ -26-52-53,\r\n  engpop$year==2003 ~ -26-53,\r\n  engpop$year==2004 ~ -26,\r\n  engpop$year==2005 ~ 26,\r\n  engpop$year==2006 ~ 26+52,\r\n  engpop$year==2007 ~ 26+52*2,\r\n  engpop$year==2008 ~ 26+52*3,\r\n  engpop$year==2009 ~ 26+52*3+53,\r\n  engpop$year==2010 ~ 26+52*4+53,\r\n  engpop$year==2011 ~ 26+52*5+53,\r\n  engpop$year==2012 ~ 26+52*6+53,\r\n  engpop$year==2013 ~ 26+52*7+53,\r\n  engpop$year==2014 ~ 26+52*8+53,\r\n  engpop$year==2015 ~ 26+52*8+2*53,\r\n  engpop$year==2016 ~ 26+52*9+2*53,\r\n  engpop$year==2017 ~ 26+52*10+2*53,\r\n  engpop$year==2018 ~ 26+52*11+2*53\r\n)\r\n\r\n#Interpolate missing weeks between mid-year figures (take to be week 26)\r\n#At the same time extrapolate out to mid-year 2020\r\nexposures.splines <- function(data){\r\n  interpolation <- spline(data$time, data$exposure, xout=seq(from=1, to=26+52*13+2*53+5, 1), method=\"natural\")\r\n  #Set up week structure\r\n  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})))\r\n  years <- c(rep(2005:2020, c(52,52,52,52,53,52,52,52,52,52,53,52,52,52,52,31)))\r\n  results <- data.frame(cbind(year=years, week=weeks, exposures=interpolation$y))\r\n  \r\n  return(results)\r\n}\r\n\r\nengpop.interpolated <- engpop %>% \r\n  arrange(year) %>% \r\n  group_by(IMD, Sex) %>% \r\n  group_modify(~ exposures.splines(.x)) %>% \r\n  mutate(index=seq(1:n()), date=as.Date(\"2005-01-03\")+weeks(index-1)) %>% \r\n  ungroup()\r\n\r\n#Check interpolation visually\r\nggplot()+\r\n  geom_line(data=engpop.interpolated, aes(x=date, y=exposures))+\r\n  geom_point(data=engpop, aes(x=as.Date(paste0(year, \"-06-01\")), y=exposure))+\r\n  facet_grid(Sex~IMD)+\r\n  theme_classic()\r\n\r\n#Merge interpolated populations into 2005-2018 deaths data\r\ndata <- merge(engpop.interpolated, deaths0518, all.x=TRUE)[,-c(6)]\r\n\r\n#Bring in 2020 deaths\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1marchand31july2020/referencetables1.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nnewdata <- 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)]\r\ncolnames(newdata) <- c(\"cause\", \"Sex\", \"IMD\", \"March\" , \"March_AS\", \"April\", \"April_AS\",\r\n                       \"May\", \"May_AS\", \"June\", \"June_AS\", \"July\", \"July_AS\")\r\nnewdata$IMD <- rep(c(1:10),9)\r\nnewdata <- subset(newdata, Sex!=\"Persons\")\r\n\r\ntemp1 <- newdata %>% \r\n  gather(month, deaths, c(4,6,8,10,12)) %>% \r\n  select(cause, Sex, IMD, month, deaths) %>% \r\n  spread(cause, deaths)\r\n\r\ntemp2 <- newdata %>% \r\n  gather(month, ASMR, c(5,7,9,11,13)) %>% \r\n  select(cause, Sex, IMD, month, ASMR) %>% \r\n  spread(cause, ASMR)\r\n\r\ntemp2$month <- case_when(\r\n  temp2$month==\"March_AS\" ~ \"March\",\r\n  temp2$month==\"April_AS\" ~ \"April\",\r\n  temp2$month==\"May_AS\" ~ \"May\",\r\n  temp2$month==\"June_AS\" ~ \"June\",\r\n  temp2$month==\"July_AS\" ~ \"July\"\r\n)\r\n\r\ncolnames(temp1) <- c(\"Sex\", \"IMD\", \"month\", \"deaths\", \"COVID_deaths\", \"Other_deaths\")\r\ncolnames(temp2) <- c(\"Sex\", \"IMD\", \"month\", \"ASMR\", \"COVID_ASMR\", \"Other_ASMR\")\r\n\r\n\r\nnewdata <- merge(temp1, temp2)\r\n\r\n\r\nnewdata$Sex <- if_else(newdata$Sex==\"Males\", \"Male\", \"Female\")\r\nnewdata$year <- 2020\r\n\r\n#Set up for merging\r\ndata$month <- case_when(\r\n  data$year==2020 & data$week %in% c(10:13) ~ \"March\",\r\n  data$year==2020 & data$week %in% c(14:18) ~ \"April\",\r\n  data$year==2020 & data$week %in% c(19:22) ~ \"May\",\r\n  data$year==2020 & data$week %in% c(23:27) ~ \"June\",\r\n  data$year==2020 & data$week %in% c(28:31) ~ \"July\"\r\n)\r\n\r\ndata <- merge(data, newdata, by=c(\"Sex\", \"IMD\", \"year\", \"month\"), all.x=TRUE)\r\n\r\n#Converte ASMRs to Age-Standardised deaths\r\ndata$ASdeaths.x <- data$ASMR.x*data$exposures/100000\r\ndata$ASdeaths.y <- data$ASMR.y*data$exposures/100000\r\ndata$ASCOVID_deaths <- data$COVID_ASMR*data$exposures/100000\r\ndata$ASOther_deaths <- data$Other_ASMR*data$exposures/100000\r\n\r\n#Adjust 2020 deaths to weekly estimates - assume within-month distribution of deaths follows\r\n#the same patterns as the distribution of deaths in the overall population in England\r\n\r\n#Bring in overall deaths\r\ntemp <- tempfile()\r\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fweeklyprovisionalfiguresondeathsregisteredinenglandandwales%2f2020/publishedweek332020.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nalldeaths <- as.data.frame(t(read_excel(temp, sheet=\"Weekly figures 2020\", range=\"L87:AI95\", col_names=FALSE)))\r\nalldeaths <- alldeaths %>% \r\n  mutate(totdeaths=V1+V2+V3+V4+V5+V6+V7+V8+V9, week=c(10:33), year=2020)\r\n\r\n#calculate within-month proportions\r\nalldeaths$month <- case_when(\r\n  alldeaths$week %in% c(10:13) ~ \"March\",\r\n  alldeaths$week %in% c(14:18) ~ \"April\",\r\n  alldeaths$week %in% c(19:22) ~ \"May\",\r\n  alldeaths$week %in% c(23:27) ~ \"June\",\r\n  alldeaths$week %in% c(28:31) ~ \"July\"\r\n)\r\n\r\nalldeaths <- alldeaths %>% \r\n  group_by(month) %>% \r\n  mutate(total=sum(totdeaths), prop=totdeaths/total) %>% \r\n  ungroup()\r\n\r\ndata <- merge(data, alldeaths[,c(11,12,15)], all.x=TRUE)\r\n\r\n#Apportion 2020 deaths within month\r\ndata$deaths.y <- data$deaths.y*data$prop\r\ndata$ASdeaths.y <- data$ASdeaths.y*data$prop\r\ndata$COVID_deaths <- data$COVID_deaths*data$prop\r\ndata$Other_deaths <- data$Other_deaths*data$prop\r\ndata$ASCOVID_deaths <- data$ASCOVID_deaths*data$prop\r\ndata$ASOther_deaths <- data$ASOther_deaths*data$prop\r\n\r\ndata$deaths <- coalesce(data$deaths.x, data$deaths.y)\r\ndata$ASdeaths <- coalesce(data$ASdeaths.x, data$ASdeaths.y)\r\n\r\ndata <- data[,-c(5,8,9,10,13,14,15,16,17,20)]\r\n\r\nwrite.csv(data, \"IMDDataForJM.csv\")\r\n\r\n#Plot mortality rates over time before GAM modelling\r\ntiff(\"Outputs/AllCauseDeathsxIMD.tiff\", units=\"in\", width=12, height=8, res=500)\r\ndata %>% \r\n  mutate(mortrate=deaths*100000/exposures) %>% \r\n  ggplot(aes(x=date, y=mortrate, colour=as.factor(IMD)))+\r\n  geom_line(size=0.3)+\r\n  scale_colour_paletteer_d(\"dichromat::BluetoOrange_10\", name=\"IMD decile\", \r\n                           labels=c(\"1 (most deprived)\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10 (least deprived)\"))+\r\n  scale_x_date(name=\"Date\")+\r\n  scale_y_continuous(name=\"Weekly deaths per 100,000\")+\r\n  facet_grid(Sex~.)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))\r\ndev.off()\r\n\r\ntiff(\"Outputs/AllCauseDeathsxIMDASMR.tiff\", units=\"in\", width=12, height=8, res=500)\r\ndata %>% \r\n  mutate(ASMR=ASdeaths*100000/exposures) %>% \r\n  ggplot(aes(x=date, y=ASMR, colour=as.factor(IMD)))+\r\n  geom_line(size=0.3)+\r\n  scale_colour_paletteer_d(\"dichromat::BluetoOrange_10\", name=\"IMD decile\", \r\n                           labels=c(\"1 (most deprived)\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10 (least deprived)\"))+\r\n  scale_x_date(name=\"Date\")+\r\n  scale_y_continuous(name=\"Weekly age-standardised deaths per 100,000\")+\r\n  facet_grid(Sex~.)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)))\r\ndev.off()\r\n\r\n#Replicate graphs\r\nplotdata <- data %>% \r\n  filter(week %in% c(10:31) & year>=2014 & year!=2019) %>% \r\n  group_by(year, Sex, IMD) %>% \r\n  summarise(COVID_deaths=sum(COVID_deaths, na.rm=TRUE), Other_deaths=sum(Other_deaths, na.rm=TRUE),\r\n            ASCOVID_deaths=sum(ASCOVID_deaths, na.rm=TRUE), ASOther_deaths=sum(ASOther_deaths, na.rm=TRUE),\r\n            deaths=sum(deaths), ASdeaths=sum(ASdeaths)) %>% \r\n  gather(cause, deaths, c(4:9))\r\n\r\nplotdata$Sex <- factor(plotdata$Sex, levels=c(\"Male\", \"Female\"))\r\nplotdata$cause <- factor(plotdata$cause, levels=c(\"Other_deaths\", \"COVID_deaths\", \"deaths\", \"ASOther_deaths\",\r\n                                                  \"ASCOVID_deaths\", \"ASdeaths\" ))\r\n\r\ntiff(\"Outputs/COVIDIneqDeathHist.tiff\", units=\"in\", width=12, height=8, res=500)\r\nggplot()+\r\n  geom_col(data=subset(plotdata, year==2020 & cause %in% c(\"COVID_deaths\", \"Other_deaths\")),\r\n           aes(x=as.factor(IMD), y=deaths, fill=cause))+\r\n  geom_jitter(data=subset(plotdata, year!=2020 & cause==\"deaths\"), \r\n              aes(x=IMD, y=deaths), colour=\"midnightblue\")+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\r\n  scale_x_discrete(name=\"Deprivation decile\", labels=c(\"1 (most deprived)\", \"2\", \"3\", \"4\", \"5\",\r\n                                                       \"6\", \"7\", \"8\", \"9\", \"10 (least deprived)\"))+\r\n  scale_y_continuous(name=\"Deaths between 1st March & 31st July\")+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\r\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\r\n  labs(title=\"Inequality in crude mortality rates in England in 2020 is similar to previous years\",\r\n       subtitle=\"<span style='color:grey40;'>Deaths in England between March 1st and 31st July by deprivation decile from <span style='color:midnightblue;'>all causes in 2014-18<span style='color:grey40;'> and from <span style='color:#f89088;'>COVID-19<span style='color:grey40;'> and <span style='color:#40a0d8;'>other causes<span style='color:grey40;'> in 2020\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nCOVIDIneqRateHist <- ggplot()+\r\n  geom_col(data=subset(plotdata, year==2020 & cause %in% c(\"ASCOVID_deaths\", \"ASOther_deaths\")),\r\n           aes(x=as.factor(IMD), y=deaths, fill=cause))+\r\n  geom_jitter(data=subset(plotdata, year!=2020 & cause==\"ASdeaths\"), \r\n              aes(x=IMD, y=deaths), colour=\"midnightblue\")+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\r\n  scale_x_discrete(name=\"Deprivation decile\", labels=c(\"1 (most deprived)\", \"2\", \"3\", \"4\", \"5\",\r\n                                                       \"6\", \"7\", \"8\", \"9\", \"10 (least deprived)\"))+\r\n  scale_y_continuous(name=\"Age-standardised deaths between 1st March & 31st July\")+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\r\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\r\n  labs(title=\"After age-standardising, deaths in 2020 are slightly more unequal than usual\",\r\n       subtitle=\"<span style='color:grey40;'>Age-standardised deaths in England between March 1st and 31st July by deprivation decile from <span style='color:midnightblue;'>all causes in 2014-18<span style='color:grey40;'> and from <span style='color:#f89088;'>COVID-19<span style='color:grey40;'> and <span style='color:#40a0d8;'>other causes<span style='color:grey40;'> in 2020\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ntiff(\"Outputs/COVIDIneqRateHist.tiff\", units=\"in\", width=12, height=8, res=500)\r\nCOVIDIneqRateHist\r\ndev.off()\r\n\r\n###########################\r\n#Generate labels\r\ntempA <- (plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"Other_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"Other_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"Other_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabA <- paste0(round(tempA*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempB <- (plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"COVID_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"COVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"COVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabB <- paste0(round(tempB*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempC <- (plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"Other_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"Other_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"Other_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabC <- paste0(round(tempC*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempD <- (plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"COVID_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"COVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"COVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabD <- paste0(round(tempD*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\n#Set up annotations\r\nann_text1 <- data.frame(IMD=rep(5, times=4), deaths=c(14000, -3000, 14000, -3000), Sex=c(\"Male\", \"Male\", \"Female\", \"Female\"),\r\n                        cause=rep(\"Other_deaths\", times=4))\r\n\r\nann_arrows1a <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4), \r\n                           y=c(14000, -3000, 14000,-3000), yend=c(12000, 1500, 11000, 800),\r\n                           Sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"Other_deaths\", times=4))\r\n\r\nann_arrows1b <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4), \r\n                           y=c(-3000, 14000, -3000, 14000), yend=c(1100, 9900, 900, 9500),\r\n                           Sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"Other_deaths\", times=4))\r\n\r\nCOVIDIneqDeath <- plotdata %>% \r\n  filter(cause %in% c(\"COVID_deaths\", \"Other_deaths\") & year==2020) %>% \r\n  ggplot(aes(x=as.factor(IMD), y=deaths, fill=cause))+\r\n  geom_col()+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\r\n  scale_x_discrete(name=\"Deprivation decile\", labels=c(\"1 (most deprived)\",\r\n                                                                         \"2\", \"3\", \"4\", \"5\",\r\n                                                                         \"6\", \"7\", \"8\", \"9\",\r\n                                                                         \"10 (least deprived)\"))+\r\n  scale_y_continuous(name=\"Deaths between 1st March & 31st July 2020\")+\r\n  coord_cartesian(ylim=c(0,15000), clip=\"off\")+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\r\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\r\n  geom_text(data=ann_text1, aes(x=IMD, y=deaths), \r\n            label=c(labA, labB, labC, labD), colour=\"Grey40\")+\r\n  geom_curve(data=ann_arrows1a, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=0.21, \r\n            arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  geom_curve(data=ann_arrows1b, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=-0.21, \r\n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  labs(title=\"Inequalities in all-cause deaths in England in 2020 are fairly small\",\r\n       subtitle=\"<span style='color:grey40;'>Total deaths in England in 2020 by deprivation decile from <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes.\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ntiff(\"Outputs/COVIDIneqDeath.tiff\", units=\"in\", width=12, height=8, res=500)\r\nCOVIDIneqDeath\r\ndev.off()\r\n\r\n\r\n\r\n#######\r\n#Rates#\r\n#######\r\n\r\n#Generate labels\r\ntempE <- (plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"ASOther_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"ASOther_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"ASOther_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabE <- paste0(round(tempE*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempF <- (plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"ASCOVID_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"ASCOVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Male\" & plotdata$cause==\"ASCOVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabF <- paste0(round(tempF*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempG <- (plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"ASOther_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"ASOther_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"ASOther_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabG <- paste0(round(tempG*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempH <- (plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"ASCOVID_deaths\" & plotdata$IMD==1 & plotdata$year==2020]-\r\n            plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"ASCOVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020])/\r\n  plotdata$deaths[plotdata$Sex==\"Female\" & plotdata$cause==\"ASCOVID_deaths\" & plotdata$IMD==10 & plotdata$year==2020]\r\n\r\nlabH <- paste0(round(tempH*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\n#Set up annotations\r\nann_text2 <- data.frame(IMD=rep(5, times=4), deaths=c(23000, -4500, 19000, -4500), Sex=c(\"Male\", \"Male\", \"Female\", \"Female\"),\r\n                        cause=rep(\"ASOther_deaths\", times=4))\r\n\r\nann_arrows2a <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4), \r\n                           y=c(23000, -4500, 19000,-4500), yend=c(20000, 1000, 13000, 700),\r\n                           Sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"ASOther_deaths\", times=4))\r\n\r\nann_arrows2b <- data.frame(x=rep(c(2.5,7.5), times=4), xend=rep(c(1,10), times=4), \r\n                           y=c(-4500, 23000, -4500, 19000), yend=c(1500, 9000, 1100, 7500),\r\n                           Sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"ASOther_deaths\", times=4))\r\n\r\n\r\nCOVIDIneqRate <- plotdata %>% \r\n  filter(cause %in% c(\"ASCOVID_deaths\", \"ASOther_deaths\") & year==2020) %>% \r\n  ggplot(aes(x=as.factor(IMD), y=deaths, fill=cause))+\r\n  geom_col()+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\r\n  scale_x_discrete(name=\"Deprivation decile\", labels=c(\"1 (most deprived)\",\r\n                                                       \"2\", \"3\", \"4\", \"5\",\r\n                                                       \"6\", \"7\", \"8\", \"9\",\r\n                                                       \"10 (least deprived)\"))+\r\n  scale_y_continuous(name=\"Deaths between 1st March & 31st July 2020\")+\r\n  coord_cartesian(ylim=c(0,25000), clip=\"off\")+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\r\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\r\n  geom_text(data=ann_text2, aes(x=IMD, y=deaths), \r\n            label=c(labE, labF, labG, labH), colour=\"Grey40\")+\r\n  geom_curve(data=ann_arrows2a, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=0.21, \r\n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  geom_curve(data=ann_arrows2b, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=-0.21, \r\n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  labs(title=\"After age-standardising there are significant inequalities in deaths in 2020\",\r\n       subtitle=\"<span style='color:grey40;'>Age-standardised deaths in England in 2020 by deprivation decile from <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes.\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ntiff(\"Outputs/COVIDIneqRate.tiff\", units=\"in\", width=12, height=8, res=500)\r\nCOVIDIneqRate\r\ndev.off()\r\n\r\n#Calculate SII & RII\r\nplotdata$cumproppop <- -(0.05+0.1*(plotdata$IMD-1))\r\n\r\nSII <- plotdata %>% \r\n  group_by(year, Sex, cause) %>% \r\n  do(tidy(lm(deaths ~ cumproppop, data=.))) %>% \r\n  pivot_wider(id_cols=c(\"year\", \"Sex\", \"cause\"), names_from=term, \r\n              values_from=c(\"estimate\", \"std.error\"))\r\n\r\ncolnames(SII) <- c(\"year\", \"Sex\", \"cause\", \"intercept\", \"SII\", \"int.SE\", \"SII.SE\")\r\nSII$RII <- (SII$intercept+SII$SII)/SII$intercept\r\n\r\nggplot()+\r\n  geom_line(data=subset(SII, cause==\"deaths\"), aes(x=year, y=SII), colour=\"midnightblue\")+\r\n  geom_point(data=subset(SII, cause %in% c(\"COVID_deaths\", \"Other_deaths\") & year==2020), \r\n            aes(x=year, y=SII, colour=cause), show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Year\")+\r\n  scale_y_continuous(name=\"Slope Index of Inequality (SII)\")+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  coord_cartesian(ylim=c(0,NA))+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Absolute inequality in deaths has risen slightly in 2020\",\r\n       subtitle=\"<span style='color:grey40;'>Slope Index of Inequality for deaths in England from <span style='color:midnightblue;'>all causes<span style='color:grey40;'>, <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\ntiff(\"Outputs/COVIDSIIEng.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot()+\r\n  geom_line(data=subset(SII, cause==\"ASdeaths\"), aes(x=year, y=SII), colour=\"midnightblue\")+\r\n  geom_point(data=subset(SII, cause %in% c(\"ASCOVID_deaths\", \"ASOther_deaths\") & year==2020), \r\n             aes(x=year, y=SII, colour=cause), show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Year\")+\r\n  scale_y_continuous(name=\"Slope Index of Inequality (SII)\")+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  coord_cartesian(ylim=c(0,NA))+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Absolute inequality in deaths has risen sharply in 2020\",\r\n       subtitle=\"<span style='color:grey40;'>Slope Index of Inequality in age-standardised deaths in England from <span style='color:midnightblue;'>all causes<span style='color:grey40;'>, <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\nCOVIDRIIEng <- ggplot()+\r\n  geom_line(data=subset(SII, cause==\"ASdeaths\"), aes(x=year, y=RII), colour=\"midnightblue\")+\r\n  geom_point(data=subset(SII, cause %in% c(\"ASCOVID_deaths\", \"ASOther_deaths\") & year==2020), \r\n             aes(x=year, y=RII, colour=cause), show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Year\")+\r\n  scale_y_continuous(name=\"Relative Index of Inequality (RII)\")+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  coord_cartesian(ylim=c(0,NA))+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Relative inequality in deaths is in line with recent years\",\r\n       subtitle=\"<span style='color:grey40;'>Relative Index of Inequality in age-standardised deaths in England from <span style='color:midnightblue;'>all causes<span style='color:grey40;'>, <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\n\r\n\r\ntiff(\"Outputs/COVIDRIIEng.tiff\", units=\"in\", width=10, height=8, res=500)\r\nCOVIDRIIEng\r\ndev.off()\r\n\r\n#jpeg versions for blog\r\nggsave(\"Outputs/JPEGs/MortIneqBlog1.jpeg\", plot=COVIDIneqDeath, units=\"in\", width=12, height=8)\r\nggsave(\"Outputs/JPEGs/MortIneqBlog3.jpeg\", plot=COVIDIneqRate, units=\"in\", width=12, height=8)\r\nggsave(\"Outputs/JPEGs/MortIneqBlog4.jpeg\", plot=COVIDIneqRateHist, units=\"in\", width=12, height=8)\r\nggsave(\"Outputs/JPEGs/MortIneqBlog5.jpeg\", plot=COVIDRIIEng, units=\"in\", width=10, height=8)\r\n"
  },
  {
    "path": "Observed Inequality/COVIDScotlandDeathsIneq.R",
    "content": "rm(list=ls())\r\n\r\nlibrary(tidyverse)\r\nlibrary(curl)\r\nlibrary(readxl)\r\nlibrary(ggtext)\r\nlibrary(paletteer)\r\n\r\n###################################################################################\r\n#Weekly data\r\n\r\n#Read in 2020 data for Scotland\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/covid19/covid-deaths-data-week-37.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\ndata <- read_excel(temp, sheet=\"Table 6\", range=\"B6:N15\", col_names=FALSE)\r\ncolnames(data) <- c(\"SIMD\", \"Total_Deaths\", \"Total_Rate\", \"Total_LowerCI\", \"Total_UpperCI\",\r\n                    \"Male_Deaths\", \"Male_Rate\", \"Male_LowerCI\", \"Male_UpperCI\", \r\n                    \"Female_Deaths\", \"Female_Rate\", \"Female_LowerCI\", \"Female_UpperCI\")\r\ndata$cause <- rep(c(\"All Cause\", \"COVID-19\"), each=5)\r\n\r\ndata_long <- data %>% \r\n  pivot_longer(cols=c(2:13), names_to=c(\"sex\", \"metric\"), names_sep=\"_\", values_to=\"deaths\") %>% \r\n  spread(cause, deaths) %>% \r\n  mutate(`Other`=`All Cause`-`COVID-19`) %>% \r\n  gather(cause, deaths, c(4:6))\r\n\r\ndata_long$sex <- factor(data_long$sex, levels=c(\"Male\", \"Female\", \"Total\"))\r\ndata_long$cause <- factor(data_long$cause, levels=c(\"Other\", \"COVID-19\", \"All Cause\"))\r\n\r\n########\r\n#Deaths#\r\n########\r\n\r\n#Generate labels\r\ntempA <- (data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"Other\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Deaths\"]-\r\n            data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"])/\r\n  data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"]\r\n\r\nlabA <- paste0(round(tempA*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempB <- (data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Deaths\"]-\r\n            data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"])/\r\n  data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"]\r\n\r\nlabB <- paste0(round(tempB*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempC <- (data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"Other\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Deaths\"]-\r\n            data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"])/\r\n  data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"]\r\n\r\nlabC <- paste0(round(tempC*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\ntempD <- (data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Deaths\"]-\r\n            data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"])/\r\n  data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Deaths\"]\r\n\r\nlabD <- paste0(round(tempD*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\r\n\r\n#Set up annotations\r\nann_text1 <- data.frame(SIMD=rep(3, times=4), deaths=c(4200, -700, 4000, -700), sex=c(\"Male\", \"Male\", \"Female\", \"Female\"),\r\n                        cause=rep(\"Other\", times=4))\r\n\r\nann_arrows1a <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4), \r\n                           y=c(4200, -700,4000,-700), yend=c(3600, 200, 3400, 200),\r\n                           sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"Other\", times=4))\r\n\r\nann_arrows1b <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4), \r\n                           y=c(-700, 4200, -700, 4000), yend=c(300, 2000, 200, 2100),\r\n                           sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"Other\", times=4))\r\n\r\nCOVIDScotIneqDeath <- data_long %>% \r\n  filter(sex!=\"Total\" & cause!=\"All Cause\" & metric==\"Deaths\") %>% \r\nggplot(aes(x=SIMD, y=deaths, fill=cause))+\r\n  geom_col()+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\")+\r\n  scale_x_discrete(name=\"Deprivation quintile\")+\r\n  scale_y_continuous(name=\"Deaths between 1st March & 31st August 2020\")+\r\n  coord_cartesian(ylim=c(0,4500), clip=\"off\")+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\r\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\r\n  geom_text(data=ann_text1, aes(x=SIMD, y=deaths), \r\n            label=c(labA, labB, labC, labD), colour=\"Grey40\")+\r\n  geom_curve(data=ann_arrows1a, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=0.21, \r\n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  geom_curve(data=ann_arrows1b, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=-0.21, \r\n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  labs(title=\"Deprived areas in Scotland have borne the brunt of the impact of COVID-19\",\r\n       subtitle=\"<span style='color:grey40;'>Higher deprivation is associated with substantially more deaths in 2020 from both <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes\",\r\n       caption=\"Data from National Records of Scotland | Plot by @VictimOfMaths\")\r\n\r\n\r\ntiff(\"Outputs/COVIDScotIneqDeath.tiff\", units=\"in\", width=12, height=8, res=500)\r\nCOVIDScotIneqDeath\r\ndev.off()\r\n\r\n#######\r\n#Rates#\r\n#######\r\n\r\n#Generate labels\r\ntempE <- (data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"Other\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Rate\"]-\r\n            data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"])/\r\n  data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"]\r\n\r\nlabE <- paste0(round(tempE*100,0), \"% higher non-COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\r\n\r\ntempF <- (data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Rate\"]-\r\n            data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"])/\r\n  data_long$deaths[data_long$sex==\"Male\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"]\r\n\r\nlabF <- paste0(round(tempF*100,0), \"% higher non-COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\r\n\r\ntempG <- (data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"Other\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Rate\"]-\r\n            data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"])/\r\n  data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"Other\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"]\r\n\r\nlabG <- paste0(round(tempG*100,0), \"% higher non-COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\r\n\r\ntempH <- (data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"1 (most deprived)\" & data_long$metric==\"Rate\"]-\r\n            data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"])/\r\n  data_long$deaths[data_long$sex==\"Female\" & data_long$cause==\"COVID-19\" & data_long$SIMD==\"5 (least deprived)\" & data_long$metric==\"Rate\"]\r\n\r\nlabH <- paste0(round(tempH*100,0), \"% higher non-COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\r\n\r\n#Set up annotations\r\nann_text2 <- data.frame(SIMD=rep(3, times=4), deaths=c(1100, -190, 900, -190), sex=c(\"Male\", \"Male\", \"Female\", \"Female\"),\r\n                        cause=rep(\"Other\", times=4))\r\n\r\nann_arrows2a <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4), \r\n                           y=c(1100, -190,900,-190), yend=c(900, 30, 650, 25),\r\n                           sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"Other\", times=4))\r\n\r\nann_arrows2b <- data.frame(x=rep(c(2,4), times=4), xend=rep(c(1,5), times=4), \r\n                           y=c(-190, 1100, -190, 900), yend=c(50, 450, 50, 300),\r\n                           sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"Other\", times=4))\r\n\r\ntiff(\"Outputs/COVIDScotIneqRate.tiff\", units=\"in\", width=12, height=8, res=500)\r\ndata_long %>% \r\n  filter(sex!=\"Total\" & cause!=\"All Cause\" & metric==\"Rate\") %>% \r\n  ggplot(aes(x=SIMD, y=deaths, fill=cause))+\r\n  geom_col()+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\")+\r\n  scale_x_discrete(name=\"Deprivation quintile\")+\r\n  scale_y_continuous(name=\"Age-standardised deaths per 100,000\\nbetween 1st March & 31st August 2020\")+\r\n  coord_cartesian(ylim=c(0,1200), clip=\"off\")+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\r\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\r\n  geom_text(data=ann_text2, aes(x=SIMD, y=deaths), \r\n            label=c(labE, labF, labG, labH), colour=\"Grey40\")+\r\n  geom_curve(data=ann_arrows2a, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=0.21, \r\n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  geom_curve(data=ann_arrows2b, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=-0.21, \r\n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\r\n  labs(title=\"Inequalities increase once you adjust for age differences\",\r\n       subtitle=\"<span style='color:grey40;'>Higher deprivation is associated with substantially higher age-standardised death rates in 2020 from both <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes\",\r\n       caption=\"Data from National Records of Scotland | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Bring in historic inequalities\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/age-standardised-death-rates-esp/2018/age-standard-death-rates-18-tab7.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nhist.all <- read_excel(temp, sheet=\"Table 7\", range=\"A24:Q28\", col_names=FALSE)[,c(1,5,8,11,14,17)]\r\ncolnames(hist.all) <- c(\"Year\", \"1 (most deprived)\", \"2\", \"3\", \"4\", \"5 (least deprived)\")\r\nhist.all$sex <- \"Total\"\r\n\r\nhist.m <- read_excel(temp, sheet=\"Table 7\", range=\"A56:Q60\", col_names=FALSE)[,c(1,5,8,11,14,17)]\r\ncolnames(hist.m) <- c(\"Year\", \"1 (most deprived)\", \"2\", \"3\", \"4\", \"5 (least deprived)\")\r\nhist.m$sex <- \"Male\"\r\n\r\nhist.f <- read_excel(temp, sheet=\"Table 7\", range=\"A88:Q92\", col_names=FALSE)[,c(1,5,8,11,14,17)]\r\ncolnames(hist.f) <- c(\"Year\", \"1 (most deprived)\", \"2\", \"3\", \"4\", \"5 (least deprived)\")\r\nhist.f$sex <- \"Female\"\r\n\r\nhist <- bind_rows(hist.all, hist.m, hist.f)\r\nhist$cause <- \"All Cause\"\r\nhist$metric <- \"Rate\"\r\n\r\nhist_long <- gather(hist, SIMD, deaths, c(2:6))\r\n\r\n#Adjust deaths to estimate historic deaths between 1st March & 30th August using within-year % of deaths\r\n#In these months (not available split by IMD)\r\ntemp <- tempfile()\r\nsource <- \"https://www.nrscotland.gov.uk/files//statistics/weekly-monthly-births-deaths-data/2020/aug/monthly-august-20-tab3.xlsx\"\r\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\r\nmonth.adj <- read_excel(temp, sheet=\"Scotland\", range=\"A5:N35\")\r\nmonth.adj$adjprop <- (month.adj$Mar+month.adj$Apr+month.adj$May+month.adj$Jun+\r\n  month.adj$Jul+month.adj$Aug)/month.adj$...2\r\nmonth.adj <- month.adj[c(1,15)]\r\ncolnames(month.adj) <- c(\"Year\", \"adjprop\") \r\n\r\nhist_long <- merge(hist_long, month.adj, by=\"Year\")\r\nhist_long$deaths <- hist_long$deaths*hist_long$adjprop\r\n\r\ndata_long$Year <- 2020\r\n\r\ndata_full <- bind_rows(data_long, hist_long)\r\n\r\ndata_full$sex <- factor(data_full$sex, levels=c(\"Male\", \"Female\", \"Total\"))\r\ndata_full$cause <- factor(data_full$cause, levels=c(\"Other\", \"COVID-19\", \"All Cause\"))\r\n\r\nCOVIDScotIneqRateHist <- ggplot()+\r\n  geom_col(data=subset(data_full, Year==2020 & metric==\"Rate\" & sex!=\"Total\" & cause!=\"All Cause\"),\r\n           aes(x=SIMD, y=deaths, fill=cause))+\r\n  geom_jitter(data=subset(data_full, Year!=2020 & sex!=\"Total\"), \r\n              aes(x=SIMD, y=deaths), colour=\"midnightblue\")+\r\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\")+\r\n  scale_x_discrete(name=\"Deprivation quintile\")+\r\n  scale_y_continuous(name=\"Age-standardised deaths per 100,000\\nbetween 1st March & 31st August\")+\r\n  facet_wrap(~sex)+\r\n  theme_classic()+\r\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\r\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\r\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\r\n  labs(title=\"All-cause deaths in Scotland have been slightly more unequal than usual in 2020\",\r\n       subtitle=\"<span style='color:grey40;'>Age-standardised mortality rates in Scotland between March 1st and August 31st by deprivation quintile from <span style='color:midnightblue;'>all causes in 2014-18<span style='color:grey40;'> and from <span style='color:#f89088;'>COVID-19<span style='color:grey40;'> and <span style='color:#40a0d8;'>other causes<span style='color:grey40;'> in 2020\",\r\n       caption=\"Data from National Records of Scotland | Plot by @VictimOfMaths\")\r\n\r\n\r\ntiff(\"Outputs/COVIDScotIneqRateHist.tiff\", units=\"in\", width=12, height=8, res=500)\r\nCOVIDScotIneqRateHist\r\ndev.off()\r\n\r\n#Calculate SII & RII\r\ndata_full$cumproppop <- case_when(\r\n  data_full$SIMD==\"5 (least deprived)\" ~ 0.1,\r\n  data_full$SIMD==\"4\" ~ 0.3,\r\n  data_full$SIMD==\"3\" ~ 0.5,\r\n  data_full$SIMD==\"2\" ~ 0.7,\r\n  data_full$SIMD==\"1 (most deprived)\" ~ 0.9\r\n)\r\n\r\nSII <- data_full %>%\r\n  filter(metric==\"Rate\") %>% \r\n  group_by(Year, sex, cause) %>% \r\n  do(tidy(lm(deaths ~ cumproppop, data=.))) %>% \r\n  pivot_wider(id_cols=c(\"Year\", \"sex\", \"cause\"), names_from=term, \r\n              values_from=c(\"estimate\", \"std.error\"))\r\n\r\ncolnames(SII) <- c(\"year\", \"Sex\", \"cause\", \"intercept\", \"SII\", \"int.SE\", \"SII.SE\")\r\nSII$RII <- (SII$intercept+SII$SII)/SII$intercept\r\n\r\ntiff(\"Outputs/COVIDSIIScot.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot()+\r\n  geom_line(data=subset(SII, cause==\"All Cause\" & Sex!=\"Total\"), aes(x=year, y=SII), colour=\"midnightblue\")+\r\n  geom_point(data=subset(SII, cause %in% c(\"COVID-19\", \"Other\") & year==2020 & Sex!=\"Total\"), \r\n             aes(x=year, y=SII, colour=cause), show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Year\")+\r\n  scale_y_continuous(name=\"Slope Index of Inequality (SII)\")+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  coord_cartesian(ylim=c(0,NA))+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Absolute inequality in deaths has risen, particularly for men, in 2020\",\r\n       subtitle=\"<span style='color:grey40;'>Slope Index of Inequality in age-standardised deaths in Scotland from <span style='color:midnightblue;'>all causes<span style='color:grey40;'>, <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\ntiff(\"Outputs/COVIDRIIScot.tiff\", units=\"in\", width=10, height=8, res=500)\r\nggplot()+\r\n  geom_line(data=subset(SII, cause==\"All Cause\" & Sex!=\"Total\"), aes(x=year, y=RII), colour=\"midnightblue\")+\r\n  geom_point(data=subset(SII, cause %in% c(\"COVID-19\", \"Other\") & year==2020 & Sex!=\"Total\"), \r\n             aes(x=year, y=RII, colour=cause), show.legend=FALSE)+\r\n  scale_x_continuous(name=\"Year\")+\r\n  scale_y_continuous(name=\"Relative Index of Inequality (RII)\")+\r\n  scale_colour_paletteer_d(\"palettetown::porygon\")+\r\n  coord_cartesian(ylim=c(0,NA))+\r\n  facet_wrap(~Sex)+\r\n  theme_classic()+\r\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\r\n        plot.subtitle=element_markdown())+\r\n  labs(title=\"Relative inequality in deaths is in line with recent years\",\r\n       subtitle=\"<span style='color:grey40;'>Relative Index of Inequality in age-standardised deaths in Scotland from <span style='color:midnightblue;'>all causes<span style='color:grey40;'>, <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>all other causes\",\r\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\r\ndev.off()\r\n\r\n#Save jpegs for SIPHER blog\r\nggsave(\"Outputs/JPEGs/MortIneqBlog7.jpeg\", plot=COVIDScotIneqDeath, units=\"in\", width=12, height=8)\r\nggsave(\"Outputs/JPEGs/MortIneqBlog8.jpeg\", plot=COVIDScotIneqRateHist, units=\"in\", width=13, height=8)\r\n"
  },
  {
    "path": "Observed Inequality/ONS Deaths Ineq 2.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(curl)\nlibrary(paletteer)\nlibrary(readxl)\nlibrary(broom)\nlibrary(wesanderson)\nlibrary(ggtext)\n\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/10929weeklydeathsregistrationsbyimdsexandagegroupenglandandwales2005to2018/wklydthsimdsexage2005to2018final.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\n#Read in data\ndata2005.E <- read_excel(temp, sheet=\"Table 1\", range=\"A4:BC144\")\ndata2005.W <- read_excel(temp, sheet=\"Table 2\", range=\"A4:BC144\")\ndata2006.E <- read_excel(temp, sheet=\"Table 3\", range=\"A4:BC144\")\ndata2006.W <- read_excel(temp, sheet=\"Table 4\", range=\"A4:BC144\")\ndata2007.E <- read_excel(temp, sheet=\"Table 5\", range=\"A4:BC144\")\ndata2007.W <- read_excel(temp, sheet=\"Table 6\", range=\"A4:BC144\")\ndata2008.E <- read_excel(temp, sheet=\"Table 7\", range=\"A4:BC144\")\ndata2008.W <- read_excel(temp, sheet=\"Table 8\", range=\"A4:BC144\")\ndata2009.E <- read_excel(temp, sheet=\"Table 9\", range=\"A4:BD144\")\ncolnames(data2009.E)[56] <- \"Week 53\"\ndata2009.W <- read_excel(temp, sheet=\"Table 10\", range=\"A4:BD144\")\ncolnames(data2009.W)[56] <- \"Week 53\"\ndata2010.E <- read_excel(temp, sheet=\"Table 11\", range=\"A4:BC144\")\ndata2010.W <- read_excel(temp, sheet=\"Table 12\", range=\"A4:BC144\")\ndata2011.E <- read_excel(temp, sheet=\"Table 13\", range=\"A4:BC144\")\ndata2011.W <- read_excel(temp, sheet=\"Table 14\", range=\"A4:BC144\")\ndata2012.E <- read_excel(temp, sheet=\"Table 15\", range=\"A4:BC144\")\ndata2012.W <- read_excel(temp, sheet=\"Table 16\", range=\"A4:BC144\")\ndata2013.E <- read_excel(temp, sheet=\"Table 17\", range=\"A4:BC144\")\ndata2013.W <- read_excel(temp, sheet=\"Table 18\", range=\"A4:BC144\")\ndata2014.E <- read_excel(temp, sheet=\"Table 19\", range=\"A4:BC144\")\ndata2014.W <- read_excel(temp, sheet=\"Table 20\", range=\"A4:BC144\")\ndata2015.E <- read_excel(temp, sheet=\"Table 21\", range=\"A4:BD144\")\ndata2015.W <- read_excel(temp, sheet=\"Table 22\", range=\"A4:BD144\")\ndata2016.E <- read_excel(temp, sheet=\"Table 23\", range=\"A4:BC144\")\ndata2016.W <- read_excel(temp, sheet=\"Table 24\", range=\"A4:BC144\")\ndata2017.E <- read_excel(temp, sheet=\"Table 25\", range=\"A4:BC144\")\ndata2017.W <- read_excel(temp, sheet=\"Table 26\", range=\"A4:BC144\")\ndata2018.E <- read_excel(temp, sheet=\"Table 27\", range=\"A4:BC144\")\ndata2018.W <- read_excel(temp, sheet=\"Table 28\", range=\"A4:BC144\")\n\n#Tidy up and stick together\ndata2005.E$country <- \"England\"\ndata2005.W$country <- \"Wales\"\ndata2006.E$country <- \"England\"\ndata2006.W$country <- \"Wales\"\ndata2007.E$country <- \"England\"\ndata2007.W$country <- \"Wales\"\ndata2008.E$country <- \"England\"\ndata2008.W$country <- \"Wales\"\ndata2009.E$country <- \"England\"\ndata2009.W$country <- \"Wales\"\ndata2010.E$country <- \"England\"\ndata2010.W$country <- \"Wales\"\ndata2011.E$country <- \"England\"\ndata2011.W$country <- \"Wales\"\ndata2012.E$country <- \"England\"\ndata2012.W$country <- \"Wales\"\ndata2013.E$country <- \"England\"\ndata2013.W$country <- \"Wales\"\ndata2014.E$country <- \"England\"\ndata2014.W$country <- \"Wales\"\ndata2015.E$country <- \"England\"\ndata2015.W$country <- \"Wales\"\ndata2016.E$country <- \"England\"\ndata2016.W$country <- \"Wales\"\ndata2017.E$country <- \"England\"\ndata2017.W$country <- \"Wales\"\ndata2018.E$country <- \"England\"\ndata2018.W$country <- \"Wales\"\n\ndata2005 <- bind_rows(data2005.E, data2005.W)\ndata2005$year <- 2005\ndata2006 <- bind_rows(data2006.E, data2006.W)\ndata2006$year <- 2006\ndata2007 <- bind_rows(data2007.E, data2007.W)\ndata2007$year <- 2007\ndata2008 <- bind_rows(data2008.E, data2008.W)\ndata2008$year <- 2008\ndata2009 <- bind_rows(data2009.E, data2009.W)\ndata2009$year <- 2009\ndata2010 <- bind_rows(data2010.E, data2010.W)\ndata2010$year <- 2010\ndata2011 <- bind_rows(data2011.E, data2011.W)\ndata2011$year <- 2011\ndata2012 <- bind_rows(data2012.E, data2012.W)\ndata2012$year <- 2012\ndata2013 <- bind_rows(data2013.E, data2013.W)\ndata2013$year <- 2013\ndata2014 <- bind_rows(data2014.E, data2014.W)\ndata2014$year <- 2014\ndata2015 <- bind_rows(data2015.E, data2015.W)\ndata2015$year <- 2015\ndata2016 <- bind_rows(data2016.E, data2016.W)\ndata2016$year <- 2016\ndata2017 <- bind_rows(data2017.E, data2017.W)\ndata2017$year <- 2017\ndata2018 <- bind_rows(data2018.E, data2018.W)\ndata2018$year <- 2018\n\ndata <- bind_rows(data2005, data2006, data2007, data2008, data2009, data2010, data2011, data2012,\n                  data2013, data2014, data2015, data2016, data2017, data2018)\n\n#Merge E&W data\ndata <- data %>%\n  group_by(year, IMD, Sex, Age) %>%\n  summarise_at(vars(`Week 1`:`Week 52`, `Week 53`), sum)\n\n#Convert to long\ndata_long <- gather(data, week, deaths, c(5:57))\n\ndata_long$week <- as.numeric(substr(data_long$week, 6,7))\n\n#Read in populations for rates using mid-year values for each year\n#A more refined approach estimating week-on-week populations is no doubt possible,\n#But seems unlikely to make much difference.\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/adhocs/009299numberofdeathsandpopulationsindeprivationdecileareasbysexandsingleyearofageenglandandwalesregisteredyears2001to2017/final.xls\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\nengpop <- read_excel(temp, sheet=5, range=\"B6:GB175\", col_names=FALSE)\nwalpop <- read_excel(temp, sheet=6, range=\"B6:GB175\", col_names=FALSE)\n\nengpop$country <- \"England\"\nwalpop$country <- \"Wales\"\npop <- bind_rows(engpop, walpop)\n\n#Label years\npop$year <- rep(c(2001:2017), each=10, times=2)\n\ncolnames(pop) <- c(\"IMD\", paste0(\"Male_\", as.character(0:90)), \n                  paste0(\"Female_\", as.character(0:90)), \"country\", \"year\")\n\n#Collapse by country\npop <- pop %>%\n  group_by(IMD, year) %>%\n  summarise_at(vars(\"Male_0\":\"Female_90\"), sum)\n\n#Assume 2018 population=2017 population\ntemp <- subset(pop, year==2017)\ntemp$year <- 2018\npop <- bind_rows(pop, temp)\n\n#Move sex to long\npop_long <- pivot_longer(pop, cols=c(3:184), names_to=c(\"Sex\", \"age\"), names_sep=\"_\", values_to=\"pop\")\n\npop_long$age <- as.integer(pop_long$age)\n\npop_long$Age <- case_when(\n  pop_long$age==0 ~ \"Under 1 year\",\n  pop_long$age<15 ~ \"01-14\",\n  pop_long$age<45 ~ \"15-44\",\n  pop_long$age<65 ~ \"45-64\",\n  pop_long$age<75 ~ \"65-74\",\n  pop_long$age<85 ~ \"75-84\",\n  TRUE ~ \"85+\")\n\npop_long <- pop_long %>%\n  group_by(Age, Sex, year, IMD) %>%\n  summarise(pop=sum(pop))\n\n#Merge into deaths data\ndata_long <- merge(data_long, pop_long, all.x=TRUE)\n\ndata_long$mortrate <- data_long$deaths*100000/data_long$pop\n\n#Age standardise\ndata_long$weight <- case_when(\n  data_long$Age==\"Under 1 year\" ~ 0.01,\n  data_long$Age==\"01-14\" ~ 0.15,\n  data_long$Age==\"15-44\" ~ 0.38,\n  data_long$Age==\"45-64\" ~ 0.265,\n  data_long$Age==\"65-74\" ~ 0.105,\n  data_long$Age==\"75-84\" ~ 0.065,\n  data_long$Age==\"85+\" ~ 0.025,\n  TRUE~0)\n\ndata_long <- data_long %>%\n  group_by(year, IMD, Sex, week) %>%\n  summarise(mortrate=weighted.mean(mortrate, weight), pop=sum(pop))\n\n#Set up for SII calculations\ndata_long <- data_long %>%\n  arrange(year, Sex, week, -IMD) %>%\n  group_by(year, Sex, week) %>%\n  mutate(cumpop=cumsum(pop), totpop=sum(pop))\n\ndata_long$cumpopprop <- data_long$cumpop/data_long$totpop\n\n#Calculate SII & RII\nSII <- data_long %>%\n  group_by(year, Sex, week) %>%\n  filter(week!=53) %>%\n  do(tidy(lm(mortrate ~ cumpopprop, data=.))) %>%\n  pivot_wider(id_cols=c(\"year\", \"Sex\", \"week\"), names_from=term, values_from=c(\"estimate\", \"std.error\"))\n\ncolnames(SII) <- c(\"year\", \"Sex\", \"week\", \"intercept\", \"SII\", \"int.SE\", \"SII.SE\")\n\nSII$RII <- (SII$intercept+SII$SII)/SII$intercept\n\n#calculate mean across all years and last 5 years\nSII <- SII %>%\n  group_by(Sex, week) %>%\n  mutate(SII.mean.all=mean(SII), RII.mean.all=mean(RII))\n\npal <- wes_palette(\"Zissou1\", 14, type = \"continuous\")\n\n#Plot SII trends\ntiff(\"Outputs/SIIbyweek.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot(SII, aes(x=week, y=SII, colour=as.factor(year)))+\n  geom_line(show.legend=FALSE)+\n  facet_wrap(~Sex)+\n  theme_classic()+\n  scale_y_continuous(name=\"Slope Index of Inequality\", limits=c(0,25))+\n  scale_colour_manual(values=pal, name=\"Year\")+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.title.position=\"plot\", plot.subtitle=element_markdown())+\n  labs(title=\"Absolute inequalities in mortality are highest in winter\",\n       subtitle=\"Patterns in weekly Slope Index of Inequality (SII) values in age-standardised deaths in England & Wales between <span style='color:#3c99b2;'>2005 </span> and <span style='color:#f22300;'>2018\",\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/RIIbyweek.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot(SII, aes(x=week, y=RII, colour=as.factor(year)))+\n  geom_line(show.legend=FALSE)+\n  facet_wrap(~Sex)+\n  theme_classic()+\n  scale_y_continuous(name=\"Relative Index of Inequality\", limits=c(0,2.5))+\n  scale_colour_manual(values=pal, name=\"Year\")+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.title.position=\"plot\", plot.subtitle=element_markdown())+\n        labs(title=\"Relative inequalities in mortality are similar throughout the year\",\n             subtitle=\"Patterns in weekly Relative Index of Inequality (RII) values in age-standardised deaths in England & Wales between <span style='color:#3c99b2;'>2005 </span> and <span style='color:#f22300;'>2018\",\n             caption=\"Data from ONS | Plot by @VictimOfMaths\")\ndev.off()\n\n##################################################################################\n#Restrict analysis to England only from 1st March - 17th April 2020 (weeks 10-16)#\n##################################################################################\n\ndata2 <- bind_rows(data2005, data2006, data2007, data2008, data2009, data2010, data2011, data2012,\n                  data2013, data2014, data2015, data2016, data2017, data2018)\n\ndata2 <- subset(data2, country==\"England\")\ndata2_long <- gather(data2, week, deaths, c(4:55, 58))\ndata2_long$week <- as.numeric(substr(data2_long$week, 6,7))\n\n#Remove data outside of weeks of interest\ndata2_long <- subset(data2_long, week>=10 & week<=16)\n\n#Wollapse weeks\ndata2_long <- data2_long %>%\n  group_by(IMD, Sex, Age, year) %>%\n  summarise(deaths=sum(deaths))\n\nengpop$year <- rep(c(2001:2017), each=10)\n\ncolnames(engpop) <- c(\"IMD\", paste0(\"Male_\", as.character(0:90)), \n                   paste0(\"Female_\", as.character(0:90)), \"country\", \"year\")\n\n#Assume 2018 population=2017 population\ntemp <- subset(engpop, year==2017)\ntemp$year <- 2018\nengpop <- bind_rows(engpop, temp)\n\n#Move sex to long\nengpop_long <- pivot_longer(engpop, cols=c(2:183), names_to=c(\"Sex\", \"age\"), names_sep=\"_\", values_to=\"pop\")\n\nengpop_long$age <- as.integer(engpop_long$age)\n\nengpop_long$Age <- case_when(\n  engpop_long$age==0 ~ \"Under 1 year\",\n  engpop_long$age<15 ~ \"01-14\",\n  engpop_long$age<45 ~ \"15-44\",\n  engpop_long$age<65 ~ \"45-64\",\n  engpop_long$age<75 ~ \"65-74\",\n  engpop_long$age<85 ~ \"75-84\",\n  TRUE ~ \"85+\")\n\nengpop_long <- engpop_long %>%\n  group_by(Age, Sex, year, IMD) %>%\n  summarise(pop=sum(pop))\n\n#Merge into deaths data\ndata2_long <- merge(data2_long, engpop_long, all.x=TRUE)\n\ndata2_long$mortrate <- data2_long$deaths*100000/data2_long$pop\n\n#Age standardise\ndata2_long$weight <- case_when(\n  data2_long$Age==\"Under 1 year\" ~ 0.01,\n  data2_long$Age==\"01-14\" ~ 0.15,\n  data2_long$Age==\"15-44\" ~ 0.38,\n  data2_long$Age==\"45-64\" ~ 0.265,\n  data2_long$Age==\"65-74\" ~ 0.105,\n  data2_long$Age==\"75-84\" ~ 0.065,\n  data2_long$Age==\"85+\" ~ 0.025,\n  TRUE~0)\n\ndata2_long <- data2_long %>%\n  group_by(year, IMD, Sex) %>%\n  summarise(mortrate=weighted.mean(mortrate, weight), pop=sum(pop))\n\n#Bring in 2020 data \ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1march2020to17april2020/referencetablesdraft.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\ndata2020 <- read_excel(temp, sheet=\"Table 3\", range=\"B6:P25\", col_names=FALSE)[,-c(2:7,9:12, 14,15)]\n\ncolnames(data2020) <- c(\"IMD\", \"rate.m\", \"rate.f\")\n\ndata2020$cause <- rep(c(\"All cause\", \"COVID-19\"), each=10, times=1)\n\n#Calculate 'other cause' outcomes\ndata_wide2020 <- pivot_wider(data2020, names_from=cause, values_from=c(2:3))\n\ndata_wide2020$rate.m_other <- data_wide2020$`rate.m_All cause`-data_wide2020$`rate.m_COVID-19`\ndata_wide2020$rate.f_other <- data_wide2020$`rate.f_All cause`-data_wide2020$`rate.f_COVID-19`\n\ndata2020 <- pivot_longer(data_wide2020, cols=c(2:7), names_to=c(\"measure\", \"cause\"), \n                     values_to=\"mortrate\", names_sep=\"_\")\n\ndata2020$Sex <- case_when(\n  endsWith(data2020$measure, \"m\")==TRUE ~ \"Male\",\n  endsWith(data2020$measure, \"f\")==TRUE ~ \"Female\",\n  TRUE~\"all\"\n)\n\ndata2020$year <- 2020\ndata2020 <- data2020[-c(2)]\n\ndata2_long$IMD <- case_when(\n  data2_long$IMD==10 ~ \"10 (least deprived)\",\n  data2_long$IMD==9 ~ \"9\",\n  data2_long$IMD==8 ~ \"8\",\n  data2_long$IMD==7 ~ \"7\",\n  data2_long$IMD==6 ~ \"6\",\n  data2_long$IMD==5 ~ \"5\",\n  data2_long$IMD==4 ~ \"4\",\n  data2_long$IMD==3 ~ \"3\",\n  data2_long$IMD==2 ~ \"2\",\n  data2_long$IMD==1 ~ \"1 (most deprived)\"\n)\n\n#Calculate average deaths 2014-18\ntemp <- data2_long %>%\n              group_by(IMD, Sex) %>%\n              summarise(mortrate=mean(mortrate))\ntemp$year <- 2019\n\ndata2_long <- bind_rows(data2_long, temp)\n\ndata2_long$cause <- \"All cause\"\n\n\n#Merge with older data\nfulldata <- bind_rows(subset(data2_long, year>2013)[-c(5)], data2020)\n\nfulldata$Sex <- factor(fulldata$Sex, levels=c(\"Male\", \"Female\", \"all\"))\nfulldata$cause <- factor(fulldata$cause, levels=c(\"other\", \"COVID-19\", \"All cause\"))\nfulldata$IMD <- factor(fulldata$IMD, levels=c(\"1 (most deprived)\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10 (least deprived)\"))\n\ntiff(\"Outputs/COVIDIneqCompare.tiff\", units=\"in\", width=12, heigh=8, res=300)\nggplot(fulldata)+\n  geom_col(data=subset(fulldata, year==2020 & cause!=\"All cause\"), aes(x=IMD, y=mortrate, fill=cause), show.legend=FALSE)+\n  geom_jitter(data=subset(fulldata, year<2019 & cause==\"All cause\"), aes(x=IMD, y=mortrate), colour=\"midnightblue\")+\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\n  scale_x_discrete(\"Deprivation decile\")+\n  scale_y_continuous(\"Age-standardised mortality rate per 100,000\")+\n  theme_classic()+\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\n  facet_wrap(~Sex)+\n  labs(title=\"All cause deaths are higher and more unequal than usual\",\n       subtitle=\"<span style='color:grey40;'>Deaths in England between March 1st and April 17th by deprivation decile from <span style='color:midnightblue;'>all causes in 2014-18<span style='color:grey40;'> and from <span style='color:#f89088;'>COVID-19<span style='color:grey40;'> and <span style='color:#40a0d8;'>other causes<span style='color:grey40;'> in 2020\",\ncaption=\"Data from ONS | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/COVIDIneqCompare2.tiff\", units=\"in\", width=12, heigh=8, res=300)\nggplot(fulldata)+\n  geom_col(data=subset(fulldata, year==2020 & cause==\"other\"), aes(x=IMD, y=mortrate, fill=cause), show.legend=FALSE)+\n  geom_line(data=subset(fulldata, year==2019), aes(x=IMD, y=mortrate, group=Sex), colour=\"midnightblue\")+\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\n  scale_x_discrete(\"Deprivation decile\")+\n  scale_y_continuous(\"Age-standardised mortality rate per 100,000\")+\n  theme_classic()+\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"black\"), plot.subtitle=element_markdown())+\n  facet_wrap(~Sex)+\n  labs(title=\"Fewer people are dying of 'usual' causes during the pandemic\",\n       subtitle=\"<span style='color:grey40;'>Non-COVID-19 deaths in England between March 1st and April 17th by deprivation decile <span style='color:#40a0d8;'>in 2020 <span style='color:grey40;'>compared to <span style='color:midnightblue;'>the average for 2014-18\",\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\ndev.off()\n\n#Set up for SII calculations\nfulldata <- arrange(fulldata, year, Sex, cause, fct_rev(IMD))\nfulldata$popprop <- rep(seq(0.05,0.95, 0.1), times=18)\n\n#Calculate SII & RII\nSII <- fulldata %>%\n  group_by(year, Sex, cause) %>%\n  do(tidy(lm(mortrate ~ popprop, data=.))) %>%\n  pivot_wider(id_cols=c(\"year\", \"Sex\", \"cause\"), names_from=term, values_from=c(\"estimate\", \"std.error\"))\n\n\ncolnames(SII) <- c(\"year\", \"Sex\", \"cause\", \"intercept\", \"SII\", \"int.SE\", \"SII.SE\")\n\nSII$RII <- (SII$intercept+SII$SII)/SII$intercept\n\n#calculate mean from 2014-18\ntemp <- SII %>%\n  filter(year<2019) %>%\n  group_by(Sex, cause) %>%\n  summarise(SII=mean(SII), RII=mean(RII))\n\ntemp$year <- 2018\n\nSII <- bind_rows(temp, subset(SII, year>2019))\n\ntiff(\"Outputs/SIICompare.tiff\", units=\"in\", height=8, width=12, res=300)\nggplot()+\n  geom_col(data=subset(SII, year==2020), aes(x=fct_rev(cause), y=SII, fill=fct_rev(cause)), show.legend=FALSE)+\n  geom_point(data=subset(SII, year==2018), aes(x=cause, y=SII), colour=\"red\", shape=18, size=5)+\n  scale_x_discrete(name=\"\", labels=c(\"All cause\", \"COVID-19\", \"Other cause\"))+\n  scale_y_continuous(name=\"Slope Index of Inequality (SII)\")+\n  scale_fill_manual(values=c(\"midnightblue\", \"#f89088\", \"#40a0d8\"))+\n  facet_wrap(~Sex)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle=element_markdown())+\n  labs(title=\"Absolute inequality in mortality rates is higher than usual\",\n       subtitle = \"<span style='color:grey40;'>Slope Indices of Inequality (SII) for deaths in England between 1st March and 17th April by cause<br>in 2020 (<span style='color:midnightblue;'>All cause<span style='color:grey40;'>, <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>Other causes<span style='color:grey40;'>) and the <span style='color:red;'>All-cause average for 2014-18\",\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\ndev.off()\n\ntiff(\"Outputs/RIICompare.tiff\", units=\"in\", height=8, width=12, res=300)\nggplot()+\n  geom_col(data=subset(SII, year==2020), aes(x=fct_rev(cause), y=RII, fill=fct_rev(cause)), show.legend=FALSE)+\n  geom_point(data=subset(SII, year==2018), aes(x=cause, y=RII), colour=\"red\", shape=18, size=5)+\n  scale_x_discrete(name=\"\", labels=c(\"All cause\", \"COVID-19\", \"Other cause\"))+\n  scale_y_continuous(name=\"Relative Index of Inequality (RII)\")+\n  scale_fill_manual(values=c(\"midnightblue\", \"#f89088\", \"#40a0d8\"))+\n  facet_wrap(~Sex)+\n  theme_classic()+\n  theme(strip.background=element_blank(), strip.text=element_text(face=\"bold\", size=rel(1)),\n        plot.subtitle=element_markdown())+\n  labs(title=\"Relative inequality in non-COVID-19 deaths is on a par with historic levels\",\n       subtitle = \"<span style='color:grey40;'>Relative Indices of Inequality (RII) for deaths in England between 1st March and 17th April by cause<br>in 2020 (<span style='color:midnightblue;'>All cause<span style='color:grey40;'>, <span style='color:#f89088;'>COVID-19 <span style='color:grey40;'>and <span style='color:#40a0d8;'>Other causes<span style='color:grey40;'>) and the <span style='color:red;'>All-cause average for 2014-18\",\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")\ndev.off()\n"
  },
  {
    "path": "Observed Inequality/ONS Deaths Ineq.R",
    "content": "rm(list=ls())\n\nlibrary(tidyverse)\nlibrary(paletteer)\nlibrary(curl)\nlibrary(readxl)\n\ntemp <- tempfile()\nsource <- \"https://www.ons.gov.uk/file?uri=%2fpeoplepopulationandcommunity%2fbirthsdeathsandmarriages%2fdeaths%2fdatasets%2fdeathsinvolvingcovid19bylocalareaanddeprivation%2f1march2020to17april2020/referencetablesdraft.xlsx\"\ntemp <- curl_download(url=source, destfile=temp, quiet=FALSE, mode=\"wb\")\n\ndata <- read_excel(temp, sheet=\"Table 3\", range=\"B6:P25\", col_names=FALSE)[,-c(4:6,9:11, 14,15)]\n\ncolnames(data) <- c(\"IMD\", \"deaths.pers\", \"rate.pers\", \"deaths.m\", \"rate.m\", \"deaths.f\", \"rate.f\")\n\ndata$cause <- rep(c(\"All cause\", \"COVID-19\"), each=10, times=1)\n\n#Calculate 'other cause' outcomes\ndata_wide <- pivot_wider(data, names_from=cause, values_from=c(2:7))\n\ndata_wide$deaths.pers_other <- data_wide$`deaths.pers_All cause`-data_wide$`deaths.pers_COVID-19`\ndata_wide$rate.pers_other <- data_wide$`rate.pers_All cause`-data_wide$`rate.pers_COVID-19`\ndata_wide$deaths.m_other <- data_wide$`deaths.m_All cause`-data_wide$`deaths.m_COVID-19`\ndata_wide$rate.m_other <- data_wide$`rate.m_All cause`-data_wide$`rate.m_COVID-19`\ndata_wide$deaths.f_other <- data_wide$`deaths.f_All cause`-data_wide$`deaths.f_COVID-19`\ndata_wide$rate.f_other <- data_wide$`rate.f_All cause`-data_wide$`rate.f_COVID-19`\n\ndata <- pivot_longer(data_wide, cols=c(2:19), names_to=c(\"measure\", \"cause\"), \n                     values_to=\"values\", names_sep=\"_\")\n\ndata$metric <- case_when(\n  substr(data$measure, 1, 6)==\"deaths\" ~ \"deaths\",\n  substr(data$measure, 1, 4)==\"rate\" ~ \"rate\",\n  TRUE ~ \"ERROR\"\n)\n\ndata$sex <- case_when(\n  endsWith(data$measure, \"m\")==TRUE ~ \"Male\",\n  endsWith(data$measure, \"f\")==TRUE ~ \"Female\",\n  TRUE~\"all\"\n)\n\ndata$sex <- factor(data$sex, levels=c(\"Male\", \"Female\", \"all\"))\ndata$cause <- factor(data$cause, levels=c(\"other\", \"COVID-19\", \"All cause\"))\ndata$IMD <- factor(data$IMD, levels=c(\"1 (most deprived)\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10 (least deprived)\"))\n\n########\n#Deaths#\n########\n\n#Generate labels\ntempA <- (data$values[data$sex==\"Male\" & data$cause==\"other\" & data$IMD==\"1 (most deprived)\" & data$metric==\"deaths\"]-\n  data$values[data$sex==\"Male\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"])/\n  data$values[data$sex==\"Male\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"]\n\nlabA <- paste0(round(tempA*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\n\ntempB <- (data$values[data$sex==\"Male\" & data$cause==\"COVID-19\" & data$IMD==\"1 (most deprived)\" & data$metric==\"deaths\"]-\n           data$values[data$sex==\"Male\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"])/\n  data$values[data$sex==\"Male\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"]\n\nlabB <- paste0(round(tempB*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\n\ntempC <- (data$values[data$sex==\"Female\" & data$cause==\"other\" & data$IMD==\"1 (most deprived)\" & data$metric==\"deaths\"]-\n           data$values[data$sex==\"Female\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"])/\n  data$values[data$sex==\"Female\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"]\n\nlabC <- paste0(round(tempC*100,0), \"% more non-COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\n\ntempD <- (data$values[data$sex==\"Female\" & data$cause==\"COVID-19\" & data$IMD==\"1 (most deprived)\" & data$metric==\"deaths\"]-\n           data$values[data$sex==\"Female\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"])/\n  data$values[data$sex==\"Female\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"deaths\"]\n\nlabD <- paste0(round(tempD*100,0), \"% more COVID-19 deaths\\nin the most vs. least\\ndeprived areas\")\n\n#Set up annotations\nann_text1 <- data.frame(IMD=rep(5, times=4), values=c(4800, -900, 4700, -900), sex=c(\"Male\", \"Male\", \"Female\", \"Female\"),\n                        cause=rep(\"other\", times=4))\n\nann_arrows1a <- data.frame(x=rep(c(3.4,6.7), times=4), xend=rep(c(1,10), times=4), \n                         y=rep(c(4700, -1000), times=2), yend=c(4000, 200, 3800, 200),\n                         sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"other\", times=4))\n\nann_arrows1b <- data.frame(x=rep(c(3.4,6.7), times=4), xend=rep(c(1,10), times=4), \n                           y=rep(c(-1000, 4700), times=2), yend=c(300, 3500, 200, 3300),\n                           sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"other\", times=4))\n\ntiff(\"Outputs/COVIDIneqDeath.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot(subset(data, cause!=\"All cause\" & sex!=\"all\" & metric==\"deaths\"), aes(x=IMD, y=values, fill=cause))+\n  geom_col()+\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\n  scale_x_discrete(name=\"Deprivation decile\")+\n  scale_y_continuous(name=\"Total deaths 1st Mar-17th Apr\")+\n  coord_cartesian(ylim=c(0,5000), clip=\"off\")+\n  facet_wrap(~sex)+\n  theme_classic()+\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"black\"))+\n  labs(title=\"COVID-19 has hit the most deprived areas hardest\",\n      subtitle=\"Higher deprivation is associated with more deaths from both COVID-19 and non-COVID-19 causes during the pandemic\",\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\n  geom_text(data=ann_text1, aes(x=IMD, y=values), \n            label=c(labA, labB, labC, labD), colour=\"Grey40\")+\n  geom_curve(data=ann_arrows1a, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=0.21, \n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\n  geom_curve(data=ann_arrows1b, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=-0.21, \n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))\ndev.off()\n\n########\n#Rates#\n#######\n\n#Generate labels\ntempE <- (data$values[data$sex==\"Male\" & data$cause==\"other\" & data$IMD==\"1 (most deprived)\" & data$metric==\"rate\"]-\n           data$values[data$sex==\"Male\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"])/\n  data$values[data$sex==\"Male\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"]\n\nlabE <- paste0(round(tempE*100,0), \"% higher non-COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\n\ntempF <- (data$values[data$sex==\"Male\" & data$cause==\"COVID-19\" & data$IMD==\"1 (most deprived)\" & data$metric==\"rate\"]-\n           data$values[data$sex==\"Male\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"])/\n  data$values[data$sex==\"Male\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"]\n\nlabF <- paste0(round(tempF*100,0), \"% higher COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\n\ntempG <- (data$values[data$sex==\"Female\" & data$cause==\"other\" & data$IMD==\"1 (most deprived)\" & data$metric==\"rate\"]-\n           data$values[data$sex==\"Female\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"])/\n  data$values[data$sex==\"Female\" & data$cause==\"other\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"]\n\nlabG <- paste0(round(tempG*100,0), \"% higher non-COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\n\ntempH <- (data$values[data$sex==\"Female\" & data$cause==\"COVID-19\" & data$IMD==\"1 (most deprived)\" & data$metric==\"rate\"]-\n           data$values[data$sex==\"Female\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"])/\n  data$values[data$sex==\"Female\" & data$cause==\"COVID-19\" & data$IMD==\"10 (least deprived)\" & data$metric==\"rate\"]\n\nlabH <- paste0(round(tempH*100,0), \"% higher COVID-19 death\\nrate in the most vs.\\nleast deprived areas\")\n\n#Set up annotations\nann_text2 <- data.frame(IMD=rep(5, times=4), values=c(270, -50, 220, -50), sex=c(\"Male\", \"Male\", \"Female\", \"Female\"),\n                        cause=rep(\"other\", times=4))\n\nann_arrows2a <- data.frame(x=rep(c(3.2,6.8), times=4), xend=rep(c(1,10), times=4), \n                           y=c(260,-50, 210,-50), yend=c(220, 20, 160, 10),\n                           sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"other\", times=4))\n\nann_arrows2b <- data.frame(x=rep(c(3.2,6.8), times=4), xend=rep(c(1,10), times=4), \n                           y=c(-50,260,-50,210), yend=c(30, 130, 25, 90),\n                           sex=rep(c(\"Male\", \"Female\"), each=2), cause=rep(\"other\", times=4))\n\ntiff(\"Outputs/COVIDIneqRate.tiff\", units=\"in\", width=12, height=8, res=300)\nggplot(subset(data, cause!=\"All cause\" & sex!=\"all\" & metric==\"rate\"), aes(x=IMD, y=values, fill=cause))+\n  geom_col()+\n  scale_fill_paletteer_d(\"palettetown::porygon\", name=\"Cause\", labels=c(\"Other\", \"COVID-19\"))+\n  scale_x_discrete(name=\"Deprivation decile\")+\n  scale_y_continuous(name=\"Age-standardised death rate\\nper 100,000 1st Mar-17th Apr\")+\n  coord_cartesian(ylim=c(0,300), clip=\"off\")+\n  facet_wrap(~sex)+\n  theme_classic()+\n  theme(axis.text.x = element_text(angle = 45, hjust = 1), strip.background=element_blank(),\n        strip.text=element_text(face=\"bold\", size=rel(1)), plot.title.position=\"plot\",\n        axis.text=element_text(colour=\"black\"))+\n  labs(title=\"Inequalities in COVID-19 impact are even steeper after adjusting for age\",\n       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\",\n       caption=\"Data from ONS | Plot by @VictimOfMaths\")+\n  geom_text(data=ann_text2, aes(x=IMD, y=values), \n            label=c(labE, labF, labG, labH), colour=\"Grey40\")+\n  geom_curve(data=ann_arrows2a, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=0.16, \n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))+\n  geom_curve(data=ann_arrows2b, aes(x=x, xend=xend, y=y, yend=yend), colour=\"Grey40\", curvature=-0.29, \n             arrow=arrow(length=unit(0.2, \"cm\"), type=\"closed\"))\ndev.off()\n"
  },
  {
    "path": "Observed Inequality/readme.md",
    "content": "An analysis of published data on the inequality impacts of the pandemic, and how this compares to historic inequality.<br><br>\n[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.\n<br><br>[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.\n\n![Inequality plot](https://github.com/VictimOfMaths/COVID-19/blob/master/Observed%20Inequality/COVIDIneqRate.png)\n\nSuggested citation for any of this analysis:<br>\nAngus, Colin (2020): CoVid Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226\n"
  },
  {
    "path": "README.md",
    "content": "# COVID-19\nPlots and analysis relating to the pandemic\n\n1) *Cases*<br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n*Hospital admissions*<br>\n[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.<br><br>\n[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.<br><br>\n[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.<br><br>\n*Vaccinations*<br>\n[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<br><br>\n[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.<br><br>\n*Apps*<br>\nI'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.\n\n![Cases heatmap](https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/COVIDLACasesHeatmap.png)\n\n2) [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.<br><br>\n[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/).<br>\n[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/).<br><br>\nI'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).<br><br>\nI'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).<br><br>\n[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.<br><br>\n[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.\n[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).<br><br>\n[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*).<br><br>\n[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.\n\n![Excess deaths](https://github.com/VictimOfMaths/COVID-19/blob/master/All%20Cause%20Mortality/ONSNRSNISRAWeeklyDeathsxReg.png)\n\n3) [Exposure Mapping](https://github.com/VictimOfMaths/COVID-19/tree/master/Exposure%20mapping):<br>[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/).\n\n![Bivariate map](https://github.com/VictimOfMaths/COVID-19/blob/master/Exposure%20mapping/COVIDBivariateLondon.png)\n\n4) [Initial Inequality Estimates](https://github.com/VictimOfMaths/COVID-19/tree/master/Initial%20Inequality%20Estimates):<br>[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.\n\n![Quintile plot](https://github.com/VictimOfMaths/COVID-19/blob/master/Initial%20Inequality%20Estimates/COVIDQuintilesLonRate.png)\n\n5) [Observed Inequality](https://github.com/VictimOfMaths/COVID-19/tree/master/Observed%20Inequality):<br>[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.\n<br><br>[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.\n\n![Inequality plot](https://github.com/VictimOfMaths/COVID-19/blob/master/Observed%20Inequality/COVIDIneqRate.png)\n\nAnyone is free to use any of this code for any purpose (except for evil).<br><br>\nSuggested citation for any of this analysis or associated visualisations:<br>\nAngus, Colin (2021): COVID Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226\n"
  }
]