COVID-19
Plots and analysis relating to the pandemic
- Cases
English LA Heatmaps.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. The approach to modelling deaths, which are only published at NHS trust level, was developed by @Benj_Barr. The code also generates a map of Local Authority-level changes in case numbers in the past week and animated maps of both case and death counts.
COVIDCaseCartograms.R creates a series of cartograms based on the excellent templates created by @carlbaker showing COVID case rates across the UK. COVIDCasesLTLAPhasePlot.R uses an approach borrowed from John Burn-Murdoch to look at the current picture of Local Authority-level cases and whether they are accelerating or decelerating. COVIDLineages.R Plots data from the Wellcome Sanger Institute to look at the spread of different COVID variants over time in UK regions.
COVIDLACaseData.R generates similar outputs, including for hospital admissions, at Lower Tier Local Authority level. I've written about these plots in an article for the journal People, Place and Policy. COVIDTestingData.R analyses testing rates and positivity, although this analysis is now less relevant since the wider rollout of LFD tests, as it mostly focuses on PCR test data.
COVIDCFRs uses Case Fatality Rates estimated by Daniel Howdon to look at how these have changed over time, particularly in relation to the vaccine rollout. COVIDCasesvsCFR.R extends this to estimate the mortality burden associated with the current caseload in English Local Authorities and how this has changed over time as case numbers and the age profile of cases has shifted.
Scottish HB Heatmaps.R, Welsh LA Heatmaps.R, Irish County Heatmaps.R, German State Heatmaps.R and COVIDCanadaHeatmap.R produce equivalent case trajectory plots for Scottish Health Boards, Welsh Local Authorities, Irish Counties, German Bundeslรคnder and Canadian Provinces respectively.
COVIDMSOACaseRatexIMD.R looks at socioeconomic differences in case rates and how they have changed in recent weeks, while COVIDBivariateCasesxIMD looks at associations between COVID case rates and deprivation in London and Glasgow.
COVIDPHESurveillance.R and 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 which generates similar plots now that age-specific case data at Local Authority level is published as part of the PHE dashboard. ONSInfectionSurvey produces similar graphs for the ONS' random sampling infection survey. ScotlandCOVIDCasesxAge.R performs some similar analysis of case data by age for Scotland, alongside analysis of cases and deaths by deprivation quintile. COVIDAgeTrends.R takes data on COVID cases, admissions and deaths and separates the trends out by age, to help identify potential impacts of the vaccination programme.
ScotlandCOVIDHouseParties.R is a small piece of analysis looking at data from Scotland on regulation-breaching house parties. Finally, 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 is a collection of various quick plots related to various aspects of case data.
Hospital admissions
COVIDNHSAdmissions.R analyses hospital admissions, occupancy and ventilator bed use across England. UK Hex Animation.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 and @olihawkins. COVIDNHSBolton.R uses the same analysis, but focusing on Bolton specifically.
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 taken from Maarten Lambrechts. COVIDCycleUS produces similar plots for the US as a whole and for individual states.
COVIDAdmissionsLTLTPhasePlot.R uses an approach borrowed from John Burn-Murdoch to look at the current picture of trust- and Local Authority-level hospital admissions. COVIDHFRs.R looks (fairly simplistically) at the association between hospital admissions and deaths in hospitals in England.
Vaccinations
COVIDVaccinations.R creates graphs of the UK rollout of COVID vaccines, while COVIDVaccinationMSOACartogram 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 looks at vaccine coverage among health and social care staff. 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 plots cumulative uptake of vaccinations by age in England
COVIDCasesxVaxTadpoles generates a tadpole plot showing how current COVID cases at Local Authority and MSOA level relate to current vaccination rates. COVIDPHEVaxxAgexSex.R uses weekly data on vaccination coverage from the PHE Surveillance report to plot an age pyramid of vaccination coverage. COVIDVaxPyramidxRegion.R attempts to replicate theis at a regional level, while COVIDVaccinationAnimations.R creates an animated version to show the progress of vaccination coverage over time. Finally, YorkshireVaxCartogram.R produces Yorkshire-specific analyses of vaccination coverage.
Apps
I've also made a few apps to allow you to explore local and national COVID-19 data. One for mortality, cases and admissions data, one for case data stratified by age and another which compares trends in recent age-specific case data.
- 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. This replaces a previous (2020) version of the same file and now includes Scotland and Northern Ireland which were previous in separate code files: 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 produces graphs of excess deaths in Scotland by cause and location of death.
All Cause Deaths France.R uses detailed French all-cause mortality records published by Insee, the French statistical authority, to examine age-specific excess deaths in France and All Cause Deaths Italy.R does the same for Italy using data from ISTAT.
AllCauseDeathsxAge.R brings these together and extends this analysis using data from the UK and international data from the Human Mortality Database.
I've made an app 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.
I've also created a separate app to allow you to explore registration delays in English and Welsh mortality data from ONS. All code and data for this lives here.
COVIDCareHomeDeaths.R analyses additional data published by the ONS for England based on notifications from the Care Quality Commission of deaths of care home residents.
COVIDDeathsxRegion.R produces plots of regional trends in COVID mortality in England based on the 28-day measure of mortality. MSOA Deaths.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.
COVIDAgeMortPred.R uses age-specific Case Fatality Ratios estimated by Daniel Howden to estimate the future burden of mortality from COVID-19 infections that have already been identified (i.e. the total number of deaths we'd expect in England over the next few months assuming there were no further infections).
LA All Cause Deaths.R calculates excess mortality at Local Authority level from ONS figures.
- Exposure Mapping:
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 and @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, and wrote about these maps for the UK Data Service's Impact and Innovation blog.
- Initial Inequality Estimates:
Estimated Cases By IMD.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.
- Observed Inequality:
ONS Deaths Ineq.R takes data that ONS have published for England on deaths from COVID-19 and other causes between 1st March-17th April and illustrates socioeconomic inequalities in the impact of the pandemic.
ONS DeathsIneq 2.R brings in historical data on socioeconomic inequalities in all-cause deaths to compare the inequality impacts of the pandemic on mortality to historical levels of inequality.
Anyone is free to use any of this code for any purpose (except for evil).
Suggested citation for any of this analysis or associated visualisations:
Angus, Colin (2021): COVID Plots and Analysis. The University of Sheffield. Dataset. https://doi.org/10.15131/shef.data.12328226