Skip to contents

{SPCreporter} is a simple way to add value to your performance reporting using statistical process control. It produces reports similar to this example report.

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, 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.

This is a link to my 2022 NHS-R Conference talk, where I presented an overview of the package:

Installation

You can install the development version of SPCreporter from GitHub with:

# 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.

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 - Start here to produce your first report using data that is bundled into this package.

Creating multiple reports - An example of how to use {purrr} to automate groups of reports.