-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbd88bf
commit 30b58f5
Showing
80 changed files
with
232 additions
and
232 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
######################. | ||
### Load functions ### | ||
######################. | ||
|
||
# Author: Charlie Smith | ||
# Date: 2023-11-14 | ||
|
||
|
||
source('./02_setup/save_df_as_parquet.R') | ||
source("./07_publication/script/functions/retrieve_save_data.R") | ||
source('./07_publication/script/functions/get_referrals_quarterly.R') | ||
source('./07_publication/script/functions/get_referrals_monthly_sco.R') | ||
source('./07_publication/script/functions/get_referrals_sex_age.R') | ||
source('./07_publication/script/functions/get_referrals_simd.R') | ||
|
||
source('./07_publication/script/functions/create_table_refs_quarterly.R') | ||
source('./07_publication/script/functions/get_annual_summary_figures.R') | ||
|
||
source('./07_publication/script/functions/make_chart_referrals_sco.R') | ||
source('./07_publication/script/functions/make_chart_referrals_sex_age.R') | ||
source('./07_publication/script/functions/make_chart_referrals_rate_simd.R') | ||
|
||
source('./07_publication/script/functions/compile_excel_doc.R') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
#####################. | ||
### Set constants ### | ||
#####################. | ||
|
||
# Author: Charlie Smith | ||
# Date: 2023-11-14 | ||
|
||
|
||
|
||
|
||
# 1 - Establish data time frame ------------------------------------------- | ||
|
||
month_end <- ymd(month_end) | ||
month_start <- ymd(month_end) - months(14) | ||
date_range <- seq.Date(from = month_start, to = month_end, by = "month") | ||
|
||
range_12_month <- seq.Date(from = month_end - months(11), to = month_end, by = "month") | ||
|
||
# 2 - Production data ----------------------------------------------------- | ||
publication_month <- month_end + months(3) | ||
|
||
|
||
production_date <- Sys.Date() | ||
production_month <- format(as.Date(production_date), "%B %Y") | ||
|
||
# 3 - Set safe place to save working data --------------------------------- | ||
|
||
data_working_safe <- "../../../output/publication/data/" | ||
|
||
reference_files_dir <- paste0(data_working_safe, 'reference_files/') | ||
dir.create(paste0(data_working_safe, publication_month, '_release')) | ||
|
||
data_working_safe <- paste0(data_working_safe, publication_month, '_release/') | ||
|
||
|
||
|
||
|
||
# 4 - Reference ----------------------------------------------------------- | ||
|
||
# create HB vector | ||
hb_vector <- c("NHS Scotland", | ||
"NHS Ayrshire and Arran", | ||
"NHS Borders", | ||
"NHS Dumfries and Galloway", | ||
"NHS Fife", | ||
"NHS Forth Valley", | ||
"NHS Grampian", | ||
"NHS Greater Glasgow and Clyde", | ||
"NHS Highland", | ||
"NHS Lanarkshire", | ||
"NHS Lothian", | ||
"NHS Orkney", | ||
"NHS Shetland", | ||
"NHS Tayside", | ||
"NHS Western Isles", | ||
"NHS 24") | ||
|
||
|
||
# chart dimensions | ||
chart_width <- 24 | ||
chart_height <- 16 | ||
|
||
|
||
# 6 - Get next pub date --------------------------------------------------- | ||
# (6 months after month_end, 1st Tuesday) | ||
# next_pub_date <- id_next_pub(data_last = month_end) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.