From a9ae2b2ed77fa13630592c7e0f92310517a37676 Mon Sep 17 00:00:00 2001 From: faaiz-25 Date: Wed, 22 Nov 2023 16:25:46 +0000 Subject: [PATCH] editing summary table order levels and formatting main R script --- .DS_Store | Bin 18436 -> 18436 bytes ...barchart_summary_FY2023-ii_2023-11-22.html | 20 + .../barchart_summary_FY2023_2023-11-22.html | 1941 +++++++++++++++++ .../barchart_summary_FY2023_w_2023-11-22.html | 1941 +++++++++++++++++ index.md | 8 +- main_jan23.R | 27 +- outputs/data_DSPTmetric2023-11-22.html | 334 +++ .../icb_composite_map_16_11_23.html | 0 .../icb_trusts_map_16_11_23.html | 0 9 files changed, 4265 insertions(+), 6 deletions(-) create mode 100644 _includes/barchart_summary_FY2023-ii_2023-11-22.html create mode 100644 _includes/barchart_summary_FY2023_2023-11-22.html create mode 100644 _includes/barchart_summary_FY2023_w_2023-11-22.html create mode 100644 outputs/data_DSPTmetric2023-11-22.html rename icb_composite_map_16_11_23.html => outputs/icb_composite_map_16_11_23.html (100%) rename icb_trusts_map_16_11_23.html => outputs/icb_trusts_map_16_11_23.html (100%) diff --git a/.DS_Store b/.DS_Store index 58391380bc4f07af001dfaa16e37c89ff510f390..caece42f343a9e522aac10b7a6d5d86608da8614 100644 GIT binary patch delta 1050 zcmbW0U2GIp6vyxXT6XWW8Mxb(ZDClu?3C@QEi5Z-p;cUH2`t5IO6fR#W4+Q#%qBv0>j8&o!1OXH6gAqbPNcafR1S3zrc&D>zfJf%xX8z~g zIp^Nr`OnBGMn*B3LidGUpI7wxf?|lzv&X!<8Mx^6>GnB34$snftU1&!vI~PE6>b#A zYFkB9RiIj(sST`84-BelaV5M=wD`FgtLhZZ`iph5>Vx6P%dysuS4*NX{%pzQb6@;P%gZE$$IwR_kq?c+LQ?zRSPzQVs|n~Y4!d?RmIZ(F7@mC+is z1&qDr#JdWnT-~r5)m~C~hV>V%_f5A%i@HeRMWz2;D_8k6t}bERPzHuF+s&a#UY6(4 z+SO%@_bBN-W}#^1b8e5>>T66H+>zh8)6A8MZY-g#Wc(7_;&fh@DV9>Z%$#iQ+@ZTc z(>6Hq6^3CNl`CjTt%vd7*v4WuQ!rC|b7sLUl+;p;ZRN9ybxy)5waTzc`RQz*_@XgT z)=A~z&=ZaB`x7)2!bk&&k`A(xtS4FWA=yt(l5z44xkxUPU&x>2HhDlElK?#r;5*sv&Vb5-CfE%nR#kh|iF-W0Q_-ic0B`V{>J5ODM#t zw2Lbj$3rTAPMSfP+T7M6B`Tt$Q&oADw1t~{{RJsWMRaw`GR}+{o2IWP%FhD-Cb>)g zB98zG-;a6((TrAfVueKAhXD*?12#(BCf-4I3VBKL-i!C}F+P#Z_e<)dID(@%wh+g0 z8fS2J3jKL}i3|7&-{E^q;0Ij7Wn95kT*I&U1Gn(EI2YIL>-913;g62kHKFUbrk2}t4 z5V4^R_Phws!iqXH zApjX6gs~5C9D;%b`jEr`QW(M*&R`r_OyUBja1qnEgv*%0Rb0bO%wi7uA|7Iq@rE5u zQBL8GbLyHs4r@xs%32ogBs*_);BFbB<3M|R$H7>5J%|ukW>bbK-p&%V>)wF7&S(@# z5SFFQTkMWDN0b+rc#-E_>+oq2e&Jv(zTwb)JisH&V*yX_6pMI{S9pg{e|e7o=^5X& zsLgNCs+?OnKH&GboxYI2^cPySY{T0cLp^0^kWR23xxU& + + + + + + + + + + + + + + + +
+ + + diff --git a/_includes/barchart_summary_FY2023_2023-11-22.html b/_includes/barchart_summary_FY2023_2023-11-22.html new file mode 100644 index 0000000..faa8294 --- /dev/null +++ b/_includes/barchart_summary_FY2023_2023-11-22.html @@ -0,0 +1,1941 @@ + + + + +plotly + + + + + + + + + + + +
+
+
+ + + + diff --git a/_includes/barchart_summary_FY2023_w_2023-11-22.html b/_includes/barchart_summary_FY2023_w_2023-11-22.html new file mode 100644 index 0000000..448a23c --- /dev/null +++ b/_includes/barchart_summary_FY2023_w_2023-11-22.html @@ -0,0 +1,1941 @@ + + + + +plotly + + + + + + + + + + + +
+
+
+ + + + diff --git a/index.md b/index.md index a23aa32..4b6e83e 100644 --- a/index.md +++ b/index.md @@ -58,11 +58,11 @@ The final scaling for each of the summary metrics displayed will have an upper b
Summary statistics from the DSPT 2022/23 toolkit are shown. - +
- +
@@ -71,7 +71,7 @@ Summary statistics from the DSPT 2022/23 toolkit are shown. The compliance of individual ICBs and Trusts are mapped below, with Region boundaries. Toggle the boxes on the top right-hand side to add layers. - +
@@ -82,7 +82,7 @@ The compliance of individual ICBs and Trusts are mapped below, with Region bound The compliance of individual ICBs, made up of a composite score of 50% of the ICB score itself which and 50% of a simple average of Trust scores contained in the ICB. Region boundaries are displayed in blue. - +
diff --git a/main_jan23.R b/main_jan23.R index 7220a43..0e8803c 100644 --- a/main_jan23.R +++ b/main_jan23.R @@ -18,19 +18,42 @@ library(plotly) library(htmlwidgets) - - +#load in cuts of dspt data for cat 1 organisations trusts_dspt = read.csv('./data/DSPT Snapshots/22_23/dspt_trusts_snapshot_16_11_23.csv') icb_dspt = read.csv('./data/DSPT Snapshots/22_23/ICB_dspt_snapshot_16_11_23.csv') icb_dspt$Primary.Sector <- 'Integrated Care Board (ICB)' csu_dspt = read.csv('./data/DSPT Snapshots/22_23/CSU_dspt_snapshot_16_11_23.csv') +#select relevant column names csu_dspt <- csu_dspt %>% select(c(Code, Status, Primary.Sector)) trusts_dspt <- trusts_dspt %>% select(c(Code, Status, Primary.Sector)) icb_dspt <- icb_dspt %>% select(c(Code, Status, Primary.Sector)) +#concatenate all 3 files data_metric <- rbind(csu_dspt, trusts_dspt, icb_dspt) +## simplify status based on editions allowed +data_metric <- data_metric %>% mutate(Short.Status = case_when(Status %in% paste0("22/23 Standards Met")~"Standards Met", + Status %in% paste0("22/23 Standards Exceeded")~"Standards Exceeded", + Status %in% paste0("22/23 Standards Not Met")~"Standards Not Met", + Status %in% paste0("22/23 Approaching Standards")~"Approaching Standards", + TRUE ~ "Not Published") ) + + + +order_levels = c("Not Published","Standards Not Met","Approaching Standards","Standards Met","Standards Exceeded") + +data_metric$Short.Status <- factor(data_metric$Short.Status,levels=order_levels) + + +#### Cross table - successors +ct_final = ctable(data_metric$Primary.Sector, data_metric$Short.Status, + prop = "r", chisq = FALSE, headings = FALSE +) + +ct_final %>% print(method="browser") +ct_final %>% print(file=paste0("./outputs/data_DSPTmetric",Sys.Date(),".html")) + #### Cross table - successors diff --git a/outputs/data_DSPTmetric2023-11-22.html b/outputs/data_DSPTmetric2023-11-22.html new file mode 100644 index 0000000..e55ce26 --- /dev/null +++ b/outputs/data_DSPTmetric2023-11-22.html @@ -0,0 +1,334 @@ + + + + + + + + Cross-Tabulation + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Short.Status
+ Primary.Sector + Not
Published
Standards
Not Met
Approaching
Standards
Standards
Met
Standards
Exceeded
Total
+ Commissioning Support Unit (CSU) + 1(20.0%)0(0.0%)0(0.0%)0(0.0%)4(80.0%)5(100.0%)
+ Integrated Care Board (ICB) + 0(0.0%)0(0.0%)1(2.4%)34(81.0%)7(16.7%)42(100.0%)
+ NHS Trust + 1(0.5%)0(0.0%)57(27.0%)138(65.4%)15(7.1%)211(100.0%)
+ Total + 2(0.8%)0(0.0%)58(22.5%)172(66.7%)26(10.1%)258(100.0%)
+

Generated by summarytools 1.0.1 (R version 4.3.2)
2023-11-22

+
+ + diff --git a/icb_composite_map_16_11_23.html b/outputs/icb_composite_map_16_11_23.html similarity index 100% rename from icb_composite_map_16_11_23.html rename to outputs/icb_composite_map_16_11_23.html diff --git a/icb_trusts_map_16_11_23.html b/outputs/icb_trusts_map_16_11_23.html similarity index 100% rename from icb_trusts_map_16_11_23.html rename to outputs/icb_trusts_map_16_11_23.html