healthdata: Access Delphi's collection of healthdata.gov data

View source: R/api.R

healthdataR Documentation

Access Delphi's collection of healthdata.gov data

Description

healthdata provides an interface to the API documented at https://cmu-delphi.github.io/delphi-epidata/api/covid_hosp.html

Usage

healthdata(
  dates = "20200510",
  states = "hhs_states",
  issues = NULL,
  query = NULL
)

Arguments

states

String specifying two-letter abbreviations of states or DC, PR, and VI. The string "hhs_states" requests the complete set. Multiple state abbreviations can be separated with commas.

issues

String specifying a list of "issue" dates or date ranges.

query

String with query for API that overides other arguments if provided.

Details

There is a simple R script available in the delphi-epidata git repository which also can be used to access the API in R.

Value

An S3 object which is simply a list which has its own print method. The list's elements are:

epidata

a data frame with rows containing elements of the epidata list returned from the API

url

the URL used in the API request

response

the full response.

Examples

healthdata(states = "hhs_states")
healthdata(states="MA",dates="20200101-20201116",issue="20201116")

e3bo/epidatr documentation built on Oct. 19, 2023, 12:37 a.m.