Skip to content

Commit

Permalink
A&E Eng data updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jennajt committed Sep 3, 2024
1 parent 017c10d commit 37a8c78
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
Binary file modified R/sysdata.rda
Binary file not shown.
19 changes: 10 additions & 9 deletions data-raw/england-aande.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ lookup_icb_codes <- geographr::lookup_lsoa11_sicbl22_icb22_ltla22 |>
# Generate a dataframe with function arguments
icb_df <-
tibble(
id = query_urls |> slice(which(query_urls$id == "nhs_accident_emergency_april_22"):which(query_urls$id == "nhs_accident_emergency_december_23")) |>
id = query_urls |> slice(which(query_urls$id == "nhs_accident_emergency_april_22"):which(query_urls$id == "nhs_accident_emergency_march_24")) |>
pull(id),
sheet = rep("System Level Data", 21),
range = rep("B16:AB63", 21),
sheet = rep("System Level Data", 24),
range = rep("B16:AB63", 24),
date = c(
"April 2022", "May 2022", "June 2022", "July 2022", "August 2022", "September 2022", "October 2022", "November 2022", "December 2022",
"January 2023", "February 2023", "March 2023", "April 2023", "May 2023", "June 2023", "July 2023", "August 2023", "September 2023", "October 2023",
"November 2023", "December 2023"
"November 2023", "December 2023", "January 2024", "February 2024", "March 2024"
),
col_index = c(
rep(list(c(1, 6, 14, 24, 25)), 4),
list(c(1, 7, 15, 25, 26)),
rep(list(c(1, 6, 14, 24, 25)), 16)
rep(list(c(1, 6, 14, 24, 25)), 19)
)
)

Expand All @@ -99,18 +99,19 @@ usethis::use_data(england_icb_accidents_emergency, overwrite = TRUE)
trust_df <-
tibble(
id = query_urls |> filter(str_detect(id, "^nhs_accident_emergency")) |> pull(id),
sheet = rep("Provider Level Data", 33),
range = rep("B16:AB223", 33),
sheet = rep("Provider Level Data", 36),
range = rep("B16:AB223", 36),
date = c(
"April 2021", "May 2021", "June 2021", "July 2021", "August 2021",
"September 2021", "October 2021", "November 2021", "December 2021",
"January 2022", "February 2022", "March 2022", "April 2022", "May 2022",
"June 2022", "July 2022", "August 2022", "September 2022", "October 2022",
"November 2022", "December 2022", "January 2023", "February 2023", "March 2023",
"April 2023", "May 2023", "June 2023", "July 2023", "August 2023",
"September 2023", "October 2023", "November 2023", "December 2023"
"September 2023", "October 2023", "November 2023", "December 2023",
"January 2024", "February 2024", "March 2024"
),
col_index = rep(list(c(1, 7, 15, 25, 26)), 33)
col_index = rep(list(c(1, 7, 15, 25, 26)), 36)
)

# Build dataframe with all months
Expand Down
3 changes: 3 additions & 0 deletions data-raw/query-urls.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ query_urls <-
"A&E Attendances and Emergency Admissions", "nhs_accident_emergency_october_23", "October 2023", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2023/11/October-2023-AE-by-provider-4uCT2.xls", "https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2023-24/",
"A&E Attendances and Emergency Admissions", "nhs_accident_emergency_november_23", "November 2023", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2023/12/November-2023-AE-by-provider-gPRdZ.xls", "https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2023-24/",
"A&E Attendances and Emergency Admissions", "nhs_accident_emergency_december_23", "December 2023", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2024/01/December-2023-AE-by-provider-a5iwg.xls", "https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2023-24/",
"A&E Attendances and Emergency Admissions", "nhs_accident_emergency_january_24", "January 2024", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2024/06/January-2024-AE-revised-130624-by-provider-4qYV2-1.xls", "https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2023-24/",
"A&E Attendances and Emergency Admissions", "nhs_accident_emergency_february_24", "February 2024", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2024/06/February-2024-AE-revised-130624-by-provider-kL472-1.xls", "https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2023-24/",
"A&E Attendances and Emergency Admissions", "nhs_accident_emergency_march_24", "March 2024", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2024/06/March-2024-AE-revised-130624-by-provider-Pieag.xls", "https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2023-24/",
"A&E Providers to Acute Trusts Lookup", "acute_trust_attribution", "June 2022", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2023/02/June-2022-Acute-Trust-Attribution-File.xls", "https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2022-23/",
"Consultant-led Referral to Treatment Waiting Times Data 2024-25", "rtt_overview", "May 2024", "OGLv3", "https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2024/07/RTT-Overview-Timeseries-Including-Estimates-for-Missing-Trusts-May24-XLS-113K-89156.xlsx", "https://www.england.nhs.uk/statistics/statistical-work-areas/rtt-waiting-times/rtt-data-2024-25/",
"Crime severity", "england_wales_crime_severity", "", "", "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/crimeandjustice/datasets/crimeseverityscoreexperimentalstatistics/current/datatool.xls", "https://www.ons.gov.uk/peoplepopulationandcommunity/crimeandjustice/datasets/crimeseverityscoreexperimentalstatistics",
Expand Down
Binary file modified data/england_icb_accidents_emergency.rda
Binary file not shown.
Binary file modified data/england_trust_accidents_emergency.rda
Binary file not shown.

0 comments on commit 37a8c78

Please sign in to comment.