R Interface to Access UKHSA Dashboard Data

Programmatic interface to access data from the UK Health Security Agency (UKHSA) Data Dashboard API. The package was originally based on the 'ukcovid19' package by Pouria Hadjibagheri and has been substantially rewritten and extended. For more information on the API, see < https://ukhsa-dashboard.data.gov.uk/access-our-data>.


UKHSA Data Dashboard API R Package

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

Further detailed documentation on the UKHSA data 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

To install the latest release version from CRAN:

install.packages("ukhsadatR")

To install the latest development version:

remotes::install_github("silverfoxdoc/ukhsadatR")

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"
)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ukhsadatR")

0.1.1 by Ollie Lloyd, a year ago


https://github.com/silverfoxdoc/ukhsadatR


Report a bug at https://github.com/silverfoxdoc/ukhsadatR/issues


Browse source code at https://github.com/cran/ukhsadatR


Authors: Ollie Lloyd [aut, cre, cph] (ORCID: , Pouria Hadjibagheri [ctb] (Author of the original 'ukcovid19' package.)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports httr2, jsonlite, utils

Suggests testthat, knitr, rmarkdown


See at CRAN