Skip to contents

SPCreporter 0.2.0.9000

Feature addition

Useability

Bugfix

  • The report now respects the include_dq_icon argument to spcr_make_report. When set to FALSE, the icons are removed from both the individual metric summary rows, and from the key at the bottom of the report.

SPCreporter 0.2.0

Feature addition

  • BREAKING CHANGE - Added the ability to create rare-event charts of type “T” (time-between).
  • The report is now mobile friendly, and works on very narrow screens. The breakpoint from wide to narrow layout is 768px.
  • The ability to add commentary was added previously, but now the method is demonstrated in the example config docs.
  • Added explanation of the data-quality icons to the footer of the report.
  • Added the ability to output “.pdf” reports, which include tidy page-breaks.

Useability

  • Added the optional columns to the example excel config documents, to aid onboarding for new users.
  • BREAKING CHANGE - The argument export_csv to spcr_make_report() has been disused and replaced with output_type which is now a vector of the required output types. Current valid options are “html”, “pdf”, and “csv”. This method will allow addition of more report types in future.
  • File size reduced by approx 30% by handling plot resolution differently, and by a further 0.6MB by removing javascript, css, and font files bundled as part of RMarkdown. As a result of the latter change the template behaves less like standard Rmd and is more reliant on custom CSS, but as it is rarely edited the file size reduction is worth this trade-off.

Bugfix

  • All spaces in the report name are now replaced with underscores. Previously only the first space was replaced.
  • The CSV output now respects the output_directory argument. Previously this file was saved in the working directory regardless of the output_directory argument.

Details of breaking changes

Associated with the addition of rare-event charts: * The report_config now includes a mandatory column spc_chart_type. Valid values in this column are “xmr” or “t”.
* The measure_data now includes a mandatory list item (or excel worksheet) called “events”. * The data_cutoff_dttm argument has been moved from spcr_make_report() to spcr_make_data_bundle() to support the calculation of the final plotted point, which is placed to illustrate what would happen were an event to happen on this date.

Associated with the addition of pdf and csv output types: * The the argument export_csv to spcr_make_report() has been disused and replaced with output_type.


SPCreporter 0.1.6

Feature addition

  • There is a new argument “annotate_limits” available for spcr_make_report(). By default it is TRUE, and adds labels for the numeric values of the control limits and mean to the right of the plot.

Bugfix

  • Fixed a bug which caused status messages to be printed in the main report if report generation is done on a slow computer.
  • Fixed minor README argument name mistake, which would have thrown an error for new users.

SPCreporter 0.1.5.6

This version introduces a large number of changes to the package. Some additional tests have been written, and existing tests amended to match the latest versions of functions.

Bug fixes

  • The align_rebase_dates() function now ensures that rebase dates not matching up with a data point are still observed and included in charts. This is achieved by moving the rebase date to the nearest data point following the rebase date. This should fix issue #35.

Bundle creation

  • The data bundle creation process now uses a more streamlined pipeline. This aims to make the various data preparation steps easier to follow and debug.
  • The data bundle generated by spcr_make_data_bundle() is less comprehensive than in previous versions, omitting SPC chart data and focusing on providing human-readable source data for spcr_make_report().

Report creation

  • SPC data parcel creation and SPC chart creation are now handled within spcr_make_report() rather than being part of the data bundle.
  • Chart generation in the report is now based around an RMarkdown partial template (inst/Rmd/details_template.Rmd) which is mapped over by code within the main RMarkdown report template. This replaces the {htmltools} approach used in previous versions.
  • Chart PNGs are now created as temp files and then converted to URI strings using knitr::image_uri(). These are injected into the HTML code directly, instead of using hyperlinks to PNG files.
  • The report now gets a custom title (it can be set in the document_title field) that is used for the <title> tag in the HTML output. This is then shown as the document title in a browser tab.
  • The export_csv argument to spcr_make_report now allows easy creation of a CSV file of the source data for the report, with the same timestamp as the HTML file. This addresses issue #17.
  • The report no longer auto-opens in the browser, nor plays a beep, when the creation process is complete. This behaviour could easily be restored if desired.

Package structure and function naming

  • Only the main user-facing functions now have the spcr_ prefix. Other package functions are collected into two files, checking_functions and helper_functions.
  • Several functions have been removed, being replaced or made obsolete by steps in the new bundle generation process.

Example data

  • Example data already supplied with the package (as xlsx files in the inst folder) is now also available as internal package data, which can be used as example data for demonstrating package functions and also for facilitating testing.

SPCreporter 0.1.5

Feature addition

  • Rebasing of SPC charts is now supported. Pass in a date string in “YYYY-MM-DD” format, or multiple date strings. '"2020-01-01"', or '"2020-01-01", "2021-05-01"'

  • Stale data is now highlighted in the report. By default data is highlighted as stale if the report cutoff is after the data update date (as defined by the updated_to argument for the data, and the data_cutoff_dttm for the report). Optionally, a column called allowable_days_lag can be included in the measure_config. This can be used to delay the flagging of stale data. For example using a value of 31 in the allowable_days_lag column will enable a measure to be reported a month in arrears without being flagged as stale.

Useability

  • Fixes an issue where if there are mismatches in measure_name across any of the 3 supplied dataframes (measure_data, report_config, measure_config) the error message throw reported missing data. Error: spcr_check_dataset_is_complete: Data is missing for 1 report items. The first is ref 1, M1, monthly. The correct and more helpful error in this case is to complain of the name mismatch: Error: spcr_check_measure_names: There is a name mismatch for measure ref: 1. Check for typos or mismatching refs or data.
  • Improved progress messages during spcr_make_data_bundle() to support debugging of incoming data.

Bugfix

  • Fix a bug relating to NAs in the dataset which was causing printed warnings in the final report, as well as blank space in the charts. The new behaviour strips NAs from all data, meaning that the chart axis starts at the first data point, and ends at the last.

SPCreporter 0.1.4

Feature addition

  • Add two new optional columns to the measure_config: “Reviewed At”, and “Escalated To”. If present the text in these fields is rendered into the final report below each chart.

Bugfix

  • Fixed an error caused when measure_data contained NAs. The package will now tolerate NAs in the data.

SPCreporter 0.1.3

Useability improvements

  • Significant improvements to error messages relating to measure_data, report_config, and measure_config. Error messages now explicitly name any required columns which the user has not supplied. This is intended to make troubleshooting simpler to do.
  • The data source for metrics is now named in charts as a caption.
  • Other minor useability improvements intended to make working with real-world config documents easier to do.

SPCreporter 0.1.2

Useability improvements

  • measure_data requires data for only one (or more) of “week” or “month”.
  • measure_data tolerates capitalised list (worksheet) names.
  • Use the base pipe |> in place of %>%.
  • Throw a helpful error if insufficient data items have been provided for a given report.

SPCreporter 0.1.1

Bugfix

  • Fixes an error occurring when targets are not set for any of the reported measures

SPCreporter 0.1.0