-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNHS-R Conference 2023 - CADEAS.Rmd
122 lines (87 loc) · 4.39 KB
/
NHS-R Conference 2023 - CADEAS.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
title: "Dashboard Design for a Varied Customer Base"
subtitle: "NHS-R Community Conference 2023"
author: "Cancer Alliance Data Evaluation and Analysis Service (CADEAS)"
date: "2023-10-17"
output:
ioslides_presentation:
widescreen: yes
logo: ./NHS_logo/NHSE.jpg
css: style.css
smaller: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## Introduction
- **Who are we?** Cancer Alliance Data, Evidence and Analysis Service, part of the NHS England National Cancer Programme.
- **Who are our stakeholders?** Performance leads, policy makers and analysts.
- **What products do we produce?** A range of weekly and monthly regular reports and other ad-hoc pieces.
## The challenges
- **Resource intensive**
- Historically consisted of 8 separate Excel based weekly reports
- Expected to be 'publication ready' within a tight timescale (around 2.5 hours) 😰😰😰
<center>
```{r, fig.show="hold", out.width = "200px"}
knitr::include_graphics("images/excel.gif", dpi = 20)
```
</center>
- **Business as usual**
- A diverse range of stakeholders
- Stakeholders mostly with limited exposure to R (primarily familiar with MS Office products such as Excel and PowerPoint)
## The challenges (continued)
- **Technical challenges**
- Diverse geographical interests and policy driven requirements
- Limited resource and time
- No Shiny server hosting capacity (at least not yet)
- Static PowerPoint slide style products were preferred over interactive dashboards by some
<center>
```{r, fig.show="hold", out.width = "400px"}
knitr::include_graphics("images/shiny.gif", dpi = 20)
```
</center>
## The solution
- A Rmarkdown dashboard that is interactive, reproducible and user friendly
- Built to cater to a wide range of audiences. Data presented and downloadable in multiple formats (visuals, raw data etc), clear tips on how to use interactive elements and interpret the data.
- Workaround for the technical challenges
- A combination of R packages such as *flexdashboard*, *crosstalk*, *plotly*, *DT* and *flextable*
- Minimal amount of Javascript and CSS to create an "illusion" of dependency dropdown 😵
## The solution (continued)
**Javascript** 😫
``` javascript
$(document).ready(function() {
document.getElementById("PTL_TS_Primary_Selection").getElementsByClassName("selectized")[0].selectize.removeOption("");
document.getElementById("PTL_TS_Primary_Selection").getElementsByClassName("selectized")[0].selectize.setValue("National", false);
document.getElementById("PTL_TS_Prov_Selection").getElementsByClassName("selectized")[0].selectize.removeOption("");
document.getElementById("PTL_TS_Regional_Selection").getElementsByClassName("selectized")[0].selectize.removeOption("");
});
var ct_filter = new crosstalk.FilterHandle('PTL_TS');
$('#PTL_TS_Primary_Selection').on("change", function() {
if(document.getElementById("PTL_TS_Primary_Selection").getElementsByClassName("selectized")[0].value == "National"){
document.getElementById("PTL_TS_Prov_Selection").getElementsByClassName("selectized")[0].selectize.setValue(null, false);
document.getElementById("PTL_TS_Regional_Selection").getElementsByClassName("selectized")[0].selectize.setValue(null, false);
document.getElementById("PTL_TS_Regional_Selection").style.display = "none";
document.getElementById("PTL_TS_Prov_Selection").style.display = "none";
} else if(...
```
## The solution (continued)
<!-- ```{r, fig.show="hold", fig.align='center', out.width="70%"} -->
<!-- knitr::include_graphics("images/screenshot2.PNG", dpi = 100) -->
<!-- ``` -->
<!-- ```{r, fig.show="hold"} -->
<!-- knitr::include_graphics("images/screenshot1.PNG", dpi = 100) -->
<!-- ``` -->
<center>
```{r}
knitr::include_graphics("images/Capture2.png", dpi = 200)
```
</center>
## Conclusion
- *Rmarkdown* in conjunction with *plotly*, *crosstalk* and *flexashboard* can be used as a workaround to develop interactive dashboards where shiny app hosting is not avaialble
- This allows data to be shared in multiple formats to best support a whide range of audiences and promotes self service.
- This in turn frees up analytical resource and enures analytical products are produced as efficiently as possible.
<center>
```{r, fig.show="hold", out.width = "400px"}
knitr::include_graphics("images/question.gif", dpi = 200)
```
</center>