Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.14 KB

README.md

File metadata and controls

35 lines (23 loc) · 1.14 KB

UKHSA Dashboard API R Wrapper

This is a wrapper for the UKHSA Dashboard API, so that this data can be easily imported natively into R.

Further detailed documentation on the UKHSA dashboard API is available here.

This package is based upon the ukcovid19 package previously published by Public Health England; the source code for this package is housed here.

Installation

At present this package is only available on github and can be installed as follows:

remotes::install_github("silverfoxdoc/UKHSAdashR")

Pagination

This API wrapper will bypass the pagination process and always download the full dataset for the specified metric, however, only a single metric can be downloaded at a time.

Example

To obtain the daily reported cases of COVID-19, use the following:

get_data(
  theme = "infectious_disease",
  sub_theme = "respiratory",
  topic = "COVID-19",
  geography_type = "Nation",
  geography = "England",
  metric = "COVID-19_cases_casesByDay"
)