Project Status: Published
Ambulance services are under immense pressure. This analysis looks at ambulance service performance and explores contributing factors and priorities for improvement.
The findings will be published as a Health Foundation long chart
This repository only includes code for the charts in the above publication and is not an extensive reference list for the publication.
This repository outlines how to download the data, process, analyse and visualise the data used in the publication. The analysis and charts can be reproduced using the latest data by updating the data source links, updating the data range for some of the sources and creating a 'data' folder within your projects main folder.
It must be noted that we use AWS S3 cloud storage therefore where necessary the code for saving and retrieving files will need to be adapted based on your local storage structure.
These scripts were written in R version 4.0.02 and RStudio Workbench Version 1.1.383. The following R packages (available on CRAN) are needed:
- tidyverse
- ISO week
- lubridate
- curl
- rio
- readxl
- janitor
- ggplot2
- tsibble
- ggtext
- readr
- stirngr
- ggh4x
In addition our plots make use of our in house style package THFstyle available here on GitHub.
The src folder contains
- 01_data_load.R - Download data- links need to be updated for the latest data
- 02_ambulance_data_cleaning.R- Clean and save ambulance quality indicator variables (including response times, calls and incidents)
- 03_ambulance_response_times_visualisation.R - Visualising ambulance response times
- 04_ambulance_incidents_visualisations.R - Visualising number of incidents handled by the ambulance services
- 05_ambulance_calls_visualisation.R- Visualising number of calls to the ambulance services
- 06_workforce_data_cleaning.R - Clean and save workforce variables (includes staff sickness and absence rate)
- 07_workforce_data_visualisation.R - Visualise workforce data including staff sickness and absence rate
- 08_bed_occupancy_data_cleaning.R - Clean and save bed occupancy data
- 09_bed_occupancy_visualisation.R - Visualise bed occupancy
- 10_ambulance_handover_times_data_cleaning.R- Clean and save ambulance handover times data
- 11_handover_times_visualisation.R - Visualise ambulance handover times
- 12_AE_attendances_data_cleaning_and_visualisation.R - Clean, save and visualise A&E attendances
Project team also consisted of Ellen Coughlan, Josh Keith and Charles Tallack.
This project is licensed under the MIT License.
Code from COVID_19_social_care_open_data was adapted for this respository.