-
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.
Merge pull request #1 from NHS-Transformation-Unit/aw_dev
Aw dev
- Loading branch information
Showing
20 changed files
with
3,922 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,2 +1,54 @@ | ||
# RTT_Backlog | ||
Repository for analysis to support thought piece on RTT backlog and changes since pandemic. | ||
<img src="images/TU_logo_large.png" alt="TU logo" width="200" align="right"/> | ||
|
||
# Referral to Treatment (RTT) Backlog | ||
This repository contains the scripts for the analysis of how the RTT backlog has changed since the start of the pandemic. Data on RTT Pathways is published monthly by NHS England and can be found [here](https://www.england.nhs.uk/statistics/statistical-work-areas/rtt-waiting-times/). | ||
|
||
<br/> | ||
|
||
## Using the Repository | ||
The repository can be cloned to re-run the analysis that has been carried out. This will also rely on updating the extracts of monthly published RTT data to include more recent months. | ||
|
||
<br/> | ||
|
||
## Repository Structure | ||
|
||
The structure of this repository is detailed below: | ||
|
||
``` plaintext | ||
├───data | ||
├───images | ||
└───src | ||
├───config | ||
├───outputs | ||
├───processing | ||
└───sql_extraction | ||
├───requirements | ||
└───visualisation | ||
``` | ||
|
||
<br/> | ||
|
||
### `data` | ||
Where the extracts of the monthly published RTT data are saved for loading. | ||
|
||
### `images` | ||
Images such as TU logos and branding to add to outputs. | ||
|
||
### `src` | ||
|
||
All code is stored in src. This is subdivided into five modules: | ||
|
||
1. `config`: Files for configuring the output such as the `theme.css`. | ||
2. `data`: Extracts of the monthly published RTT data. | ||
3. `processing`: Files for loading, cleaning and processing the RTT data. | ||
4. `requirements`: Requirements for undertaking the analysis such as the `packages.R` script. | ||
5. `visualisation`: Files for producing the visualisations used within the outputs. | ||
|
||
<br/> | ||
|
||
## Contributors | ||
This repository has been created and developed by: | ||
|
||
- [Andy Wilson](https://github.com/ASW-Analyst) |
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 @@ | ||
# Placeholder for publishing data folder |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
<meta http-equiv="refresh" content="0; url=https://nhs-transformation-unit.github.io/RTT_Backlog/src/outputs/rtt_report.html"> |
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,60 @@ | ||
/* Cerulean Theme CSS */ | ||
|
||
/* Global Styles */ | ||
body { | ||
background-color: #fff; /* White background */ | ||
color: #333; /* Dark text color */ | ||
font-family: Franklin Gothic; | ||
font-size: 11pt; | ||
font-weight: 300 | ||
} | ||
|
||
h1 { | ||
color: #407EC9; | ||
font-weight: 150; | ||
} | ||
|
||
h2 { | ||
color: #407EC9; | ||
font-weight: 150; | ||
} | ||
|
||
h3 { | ||
color: #407EC9; | ||
font-weight: 100; | ||
} | ||
|
||
h4 { | ||
color: #407EC9; | ||
font-weight: 50 | ||
} | ||
|
||
hr { | ||
color: #407EC9; | ||
border-color: #407EC9; | ||
} | ||
|
||
/* Navbar Styles */ | ||
.navbar { | ||
background-color: #407EC9; /* Cerulean blue background */ | ||
border-color: #407EC9; /* Cerulean blue border */ | ||
color: #fff; /* White text color */ | ||
} | ||
|
||
/* Button Styles */ | ||
.btn-primary { | ||
background-color: #407EC9; /* Cerulean blue button background */ | ||
border-color: #407EC9; /* Cerulean blue button border */ | ||
color: #fff; /* White text color */ | ||
} | ||
|
||
/* Links Styles */ | ||
a { | ||
color: #407EC9; /* Cerulean blue link color */ | ||
} | ||
|
||
/* Add more styles as needed */ | ||
|
||
.toc.float-toc { | ||
margin-bottom: 20px; /* Adjust the margin as needed */ | ||
} |
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,38 @@ | ||
|
||
# Wong Colorblind palette -------------------------------------------------- | ||
|
||
palette_wong_regions <- c("#E69F00", | ||
"#56B4E9", | ||
"#009E73", | ||
"#F0E442", | ||
"#0072B2", | ||
"#D55E00", | ||
"#CC79A7" | ||
|
||
) | ||
|
||
# Tol Colorblind palette -------------------------------------------------- | ||
|
||
palette_tol_regions <- c("#332288", | ||
"#117733", | ||
"#44AA99", | ||
"#88CCEE", | ||
"#DDCC77", | ||
"#CC6677", | ||
"#AA4499" | ||
) | ||
|
||
# TU Palette ------------------------------------------------------------- | ||
|
||
palette_tu <- c("#40C1AC", | ||
"#68D2DF", | ||
"#6CC24A", | ||
"#407EC9", | ||
"#F68D2E", | ||
"#F04E98", | ||
"#8A1538") | ||
|
||
|
||
# Select palette ---------------------------------------------------------- | ||
|
||
palette_region <- palette_tol_regions |
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,126 @@ | ||
|
||
# tu_theme_standard ------------------------------------------------------- | ||
|
||
theme_tu_standard <- function(hex_col, hex_text = "#ffffff") { | ||
theme(text = element_text(family = "Franklin Gothic Book"), | ||
strip.background = element_rect(fill = hex_col), | ||
strip.text = element_text(colour = hex_text, size = 10), | ||
axis.text = element_text(size = 10), | ||
axis.text.x = element_text(angle = 45, hjust = 1), | ||
axis.title = element_text(size = 11), | ||
plot.title = element_text(size = 16, color = hex_col), | ||
plot.subtitle = element_text(size = 12), | ||
legend.position = "bottom", | ||
legend.text = element_text(size = 8) | ||
) | ||
|
||
} | ||
|
||
# TU Theme White Background ----------------------------------------------- | ||
|
||
theme_tu_white <- function(hex_col, hex_text = "#ffffff") { | ||
theme(text = element_text(family = "Franklin Gothic Book"), | ||
strip.background = element_rect(fill = hex_col), | ||
strip.text = element_text(colour = hex_text, size = 10), | ||
axis.text = element_text(size = 10), | ||
axis.text.x = element_text(angle = 45, hjust = 1), | ||
axis.title = element_text(size = 11), | ||
plot.title = element_text(size = 16, color = hex_col), | ||
plot.subtitle = element_text(size = 12), | ||
panel.background = element_rect(fill = "#ffffff"), | ||
panel.grid.major.y = element_line(color = "#cecece", linewidth = 0.1), | ||
panel.grid.minor.y = element_blank(), | ||
axis.line = element_line(color = "#000000"), | ||
legend.position = "bottom", | ||
legend.text = element_text(size = 7.5) | ||
) | ||
|
||
} | ||
|
||
# TU Theme White Background multiple facets----------------------------------------------- | ||
|
||
theme_tu_white_mf <- function(hex_col, hex_text = "#ffffff") { | ||
theme(text = element_text(family = "Franklin Gothic Book"), | ||
strip.background = element_rect(fill = hex_col), | ||
strip.text = element_text(colour = hex_text, size = 7), | ||
axis.text = element_text(size = 8), | ||
axis.text.x = element_text(angle = 45, hjust = 1), | ||
axis.title = element_text(size = 9), | ||
plot.title = element_text(size = 16, color = hex_col), | ||
plot.subtitle = element_text(size = 12), | ||
panel.background = element_rect(fill = "#ffffff"), | ||
panel.grid.major.y = element_line(color = "#cecece", linewidth = 0.1), | ||
panel.grid.minor.y = element_blank(), | ||
axis.line = element_line(color = "#000000"), | ||
legend.position = "bottom", | ||
legend.text = element_text(size = 8) | ||
) | ||
|
||
} | ||
|
||
# TU Theme White Background multiple facets----------------------------------------------- | ||
|
||
theme_tu_white_bar_cf <- function(hex_col, hex_text = "#ffffff") { | ||
theme(text = element_text(family = "Franklin Gothic Book"), | ||
strip.background = element_rect(fill = hex_col), | ||
strip.text = element_text(colour = hex_text, size = 10), | ||
axis.text = element_text(size = 10), | ||
axis.text.x = element_text(angle = 45, hjust = 1), | ||
axis.title = element_text(size = 11), | ||
plot.title = element_text(size = 16, color = hex_col), | ||
plot.subtitle = element_text(size = 12), | ||
panel.background = element_rect(fill = "#ffffff"), | ||
panel.grid.major.x = element_line(color = "#cecece", linewidth = 0.1), | ||
panel.grid.minor.x = element_blank(), | ||
axis.line = element_line(color = "#000000"), | ||
legend.position = "bottom", | ||
legend.text = element_text(size = 8) | ||
) | ||
|
||
} | ||
|
||
# TU Theme White Background limited facets ----------------------------------------------- | ||
|
||
theme_tu_white_lf <- function(hex_col, hex_text = "#ffffff") { | ||
theme(text = element_text(family = "Franklin Gothic Book"), | ||
strip.background = element_rect(fill = hex_col), | ||
strip.text = element_text(colour = hex_text, size = 7.3), | ||
axis.text = element_text(size = 10), | ||
axis.text.x = element_text(angle = 45, hjust = 1), | ||
axis.title = element_text(size = 11), | ||
plot.title = element_text(size = 16, color = hex_col), | ||
plot.subtitle = element_text(size = 12), | ||
panel.background = element_rect(fill = "#ffffff"), | ||
panel.grid.major.y = element_line(color = "#cecece", linewidth = 0.1), | ||
panel.grid.minor.y = element_blank(), | ||
axis.line = element_line(color = "#000000"), | ||
legend.position = "bottom", | ||
legend.text = element_text(size = 8) | ||
) | ||
|
||
} | ||
|
||
# TU Theme White Background horizontal bar chart ----------------------------------------------- | ||
|
||
theme_tu_white_hbar <- function(hex_col, hex_text = "#ffffff") { | ||
theme(text = element_text(family = "Franklin Gothic Book"), | ||
strip.background = element_rect(fill = hex_col), | ||
strip.text = element_text(colour = hex_text, size = 10), | ||
axis.text = element_text(size = 10), | ||
axis.text.x = element_text(angle = 45, hjust = 1), | ||
axis.title = element_text(size = 11), | ||
plot.title = element_text(size = 16, color = hex_col), | ||
plot.subtitle = element_text(size = 12), | ||
panel.background = element_rect(fill = "#ffffff"), | ||
panel.grid.major.x = element_line(color = "#cecece", linewidth = 0.1), | ||
panel.grid.minor.x = element_blank(), | ||
axis.line = element_line(color = "#000000"), | ||
legend.position = "bottom", | ||
legend.text = element_text(size = 8) | ||
) | ||
|
||
} | ||
|
||
# selected_theme ---------------------------------------------------------- | ||
|
||
selected_theme <- theme_tu_white |
Oops, something went wrong.