Skip to content

Commit

Permalink
Update to pub data table automatic text.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-smith committed Sep 24, 2024
1 parent 5a3d124 commit de1aa58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# protect worksheets
# save separate output


compile_pub_data_tables <- function(dataset_choice = c("CAMHS", "PT")){

assign(x = "dataset_choice", value = dataset_choice, envir = .GlobalEnv)
Expand Down
13 changes: 12 additions & 1 deletion 07_publication/script/functions/update_dt_wording.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ update_dt_wording <- function(wb){
addStyle(wb, sheet = "Cover", style = style_text, rows = 2, cols = 3)


para_period <- paste0("This document summarises CAPTND data by quarter ending for the period ",
format(as.Date(month_start), "%B %Y") , " to ",
format(as.Date(month_end), "%B %Y"), ".")

writeData(wb, sheet = "Cover",
x = para_period,
startCol = 2, startRow = 5, headerStyle = style_text)
addStyle(wb, sheet = "Cover", style = style_text, cols = 3, rows = 5)



# All chart tabs - tab title on (B2)
vec_tabs <- c("Tab 1", "Tab 2", "Tab 3")
paras <- c(" referrals by health board name and quarter ending",
Expand All @@ -29,8 +40,8 @@ update_dt_wording <- function(wb){
addStyle(wb, vec_tabs[i], style = createStyle(fontName = 'Arial', fontSize = 11,
textDecoration = "bold"), rows = 2, cols = 2)
}



# All chart tabs - date range statement (B5)
para_period <- paste0("CAPTND data by quarter, for the period ",
format(as.Date(month_start), "%B %Y") , " to ",
Expand Down

0 comments on commit de1aa58

Please sign in to comment.