create_open_data: Open Data

View source: R/create_open_data.R

create_open_dataR Documentation

Open Data

Description

Creates csv files used by the open data team to populate open data website.

Usage

create_open_data(
  smr = NULL,
  measure = c("smr", "crude"),
  split = NULL,
  location = NULL,
  label_var = NULL,
  save = TRUE,
  filename = NULL,
  dev = NULL,
  overwrite = NULL
)

Arguments

smr

Input tibble for HSMR data.

measure

A character string specifying whether the data used is to be HSMR or crude trend data. Valid options are 'smr' and 'crude'.

split

A character string specifying the subgroup to be used to split the crude data files. Default value is NULL.

location

A character string specifying whether the resulting tibble should include data for hospitals or Health Boards & Scotland. Default value is NULL. If not NULL, valid options are 'hb' and 'hosp'.

label_var

New name of the label variable used in a few files.

save

If true it will save the file. If false it will return the object

filename

dev and overwrite. They come from the save_file function

Details

create_open_data expects a tibble produced by the create_smr_data script and a tibble produced by the create_trends_data script.


Public-Health-Scotland/hsmr documentation built on June 24, 2024, 1:48 a.m.