This package is a part of our open-source R pipeline to download and clean public data related to health and social care. The aim is to provide analysts, primarily at the Health Foundation, with clean and ready for analysis data.
monstR - making ONS tables readable is a package that queries the Office for National Statistics (ONS) API to download data. It can be used to retrieve publically available data and meta data from the ONS.
ons_available_datasets()
returns information about available datasetsons_available_versions()
returns information about available dataset versionsons_available_editions()
returns information about available dataset editionsons_download()
downloads the specified data
If you have cloned a local copy of the repo, you should be able to load it using devtools
library(devtools) setwd("{location of monstR repo}") devtools::load_all()
or to install direct from Github
remotes::install_github("HFAnalyticsLab/monstR", build_vignettes = TRUE )
The monstrR Open Data Pipeline is designed to work well with tidyverse and in particular within pipelines created by the %>%
pipe operator. With this in mind, most functions take a data structure in the first argument and return a data structure which has been augmented in some way. Typically this is metadata about the actual data, although once the data has been cleaned it can be accessed using monstr_data(metadata)
to get at a tidyverse tibble of the data.
This project is licensed under the MIT License.