Learn R Programming

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

Copy Link

Version

Install

install.packages('ukhsadatR')

Monthly Downloads

106

Version

0.1.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Ollie Lloyd

Last Published

June 18th, 2025

Functions in ukhsadatR (0.1.1)

get_data

Get Data
get_paginated_data

Get Paginated Data