-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathREADME.Rmd
More file actions
78 lines (51 loc) · 2.99 KB
/
README.Rmd
File metadata and controls
78 lines (51 loc) · 2.99 KB
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
---
output: github_document
---
<!-- badges: start -->
[](https://github.com/ThomUK/SPCreporter/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup}
#| include: false
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# {SPCreporter}
{SPCreporter} is a simple way to add value to your performance reporting using statistical process control. It produces reports similar to this [**example report**](report_examples/My_Example_Report.html).
**Help sort signals from noise, and ensure your leadership are talking about signals that matter.**
The layout and method are heavily inspired by the NHS England & Improvement ["Making Data Count" programme](https://bmjleader.bmj.com/content/5/4/252), which encourages the use of SPC and time-series charts to replace "red, amber, green" threshold performance reporting.
The SPC calculations are made using the {NHSRplotthedots} package, from the [NHS-R Community](https://nhsrcommunity.com/).
This is a link to my [2022 NHS-R Conference](https://nhsrcommunity.com/events/nhs-r-online-speaker-conference-2022-9th-november-2022/) talk, where I presented an overview of the package:
<iframe class="youtube-video" src="https://www.youtube.com/embed/fWYehE5U6Vs?si=lNEoHaXxEVUB5Bk2&start=2862" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
## Installation
You can install the development version of SPCreporter from [GitHub](https://github.com/ThomUK/SPCreporter) with:
```{r install}
#| eval: false
# install.packages("remotes")
remotes::install_github("ThomUK/SPCreporter", build_vignettes = TRUE)
```
## Package concept
Two main functions are used to make a report.
The first creates a "data bundle" which contains all the metric-level information needed by the report. The second takes this bundle as raw input, and converts it into the html report.
```{r}
#| eval: false
library(SPCreporter)
# create a data_bundle, using 3 arguments
data_bundle <- spcr_make_data_bundle(
measure_data, # your data to plot
report_config, # config for the report (section titles, etc)
measure_config # config for the measures (details required by SPC)
)
# pass the bundle into the make_report function
spcr_make_report(
data_bundle = data_bundle,
... # various report arguments - see full docs for details
)
```
### See the vignettes for additional examples:
[Get Started vignette](https://thomuk.github.io/SPCreporter/articles/get_started.html) - Start here to produce your first report using data that is bundled into this package.
[Creating multiple reports](https://thomuk.github.io/SPCreporter/articles/multiple_reports.html) - An example of how to use {purrr} to automate groups of reports.