In this project, the effects of the Covid-19 pandemic on acute care in Scotland were investigated using data obtained from Public Health Scotland under Open Government Data license 3.0. This project also determines if the media reported "winter crises" exists.
The dashboard consists of patient admission numbers (A&E and inpatient), length of stay and bed occupancy by Scottish health board. The data is separated by age, sex, Scottish index of multiple deprivation and medical specialty.
A&E is the first point of contact for most patients in secondary care, and therefore an A&E dataset was used to answer the question about winter crisis effect. As it provided monthly data rather than quarterly data, December, January and February were specifically targeted for this winter crisis analysis.
Inpatient datasets from 2017 to 2022 were used to answer the questions about demographics and effects of Covid-19 on acute care across each health board.
Further details of the project description are located within the
planning
folder.
Mandip Farmahan:
- Exploratory analysis of Covid-19 data;
- Designing and implementing the dashboard application.
Sarah Henry:
- Exploratory analysis of patient demographics and deprivation data;
- Statistical analysis of winter effect.
Mark MacDonald:
- Exploratory analysis of A&E and bed occupancy data;
- Integration of exploratory analysis with dashboard application.
Vera Shcherbina:
- Exploratory analysis of speciality data;
- Regulations and ethics.
All:
- Project planning;
- Dashboard application troubleshooting;
- Presentation.
The following datasets were obtained from www.opendata.nhs.scot for analysis:
Activity by Board of Treatment, Age and Sex
Activity by Board of Treatment and Deprivation
Activity by Board of Treatment and Specialty
Beds by Board of Treatment and Specialty
Health Board 2014 - Health Board 2019
Monthly Accident and Emergency Waiting Times
The data cleaning scripts are located in the cleaning_scripts
folder.
The libraries required to run the data cleaning scripts are:
library(here)
library(janitor)
library(tidyverse)
The following data cleaning tasks were carried out in all scripts:
- Import the data from the CSV file;
- Clean the column names;
- Remove any special health boards;
- Recode health board codes with name of health board area;
- Replace any zeroes with NA in numerical columns;
- Remove any non-essential columns;
- Export clean data to CSV file.
The data analysis scripts are located in the
analysis_scripts_and_reports
folder. The libraries required to run the
data analysis scripts are:
library(here)
library(tidyverse)
The analysis contained within these files guided the final analysis
within server.R
of the dashboard application.
The dashboard application has five tabs:
The statistical analysis report investigating if the media reported
"winter crises" exists is located in the analysis_scripts_and_reports
folder. The main findings are:
- Reduction in number of A&E admissions in winter compared to the rest of the year across the five year period.
- Reduction in number of A&E admissions in winter compared to the rest of the year before Covid-19 and after Covid-19.
- In summer more people were sent home, compared to winter when patients were more likely to be kept in hospital.
Distributed under the MIT License. See LICENSE.txt
for more
information.