The Epidata API includes numerous data streams – medical claims data, cases and deaths, mobility, and many others – covering different geographic regions. This can make it a challenge to find the data stream that you are most interested in.
Example queries with all the endpoint functions available in this package are given below.
The Epidata documentation lists all the data sources and signals available through the API for COVID-19 and for other diseases. The site also includes a search tool if you have a keyword (e.g. “Taiwan”) in mind.
Some endpoints have partner metadata available that provides information about the signals that are available, for example, what time ranges they are available for, and when they have been updated.
We provide a couple epidatr functions to help find data
sources and signals.
The avail_endpoints() function lists endpoints, each of
which, except for COVIDcast, corresponds to a single data source.
avail_endpoints() outputs a tibble of
endpoints and brief descriptions, which explicitly state when they cover
non-US locations:
The covidcast_epidata() function lets you look more
in-depth at the data sources available through the COVIDcast endpoint.
The function describes all available data sources and signals:
Each source is included as an entry in the
covid_sources$sources list, associated with a
tibble describing included signals.
If you use an editor that supports tab completion, such as RStudio,
type covid_sources$source$ and wait for the tab completion
popup. You will be able to browse the list of data sources.
If you use an editor that supports tab completion, type
covid_sources$signals$ and wait for the tab completion
popup. You will be able to type the name of signals and have the
autocomplete feature select them from the list for you. In the
tab-completion popup, signal names are prefixed with the name of the
data source for filtering convenience.
Note that some signal names have dashes in them, so to access them we rely on the backtick operator:
These signal objects can be used directly to fetch data, without
requiring us to use the pub_covidcast() function. Simply
use the $call attribute of the object:
API docs: https://cmu-delphi.github.io/delphi-epidata/api/covidcast_signals.html
County geo_values are FIPS codes and are discussed in the API docs here. The example below is for Orange County, California.
pub_covidcast(
source = "fb-survey",
signals = "smoothed_accept_covid_vaccine",
geo_type = "county",
time_type = "day",
time_values = epirange(20201221, 20201225),
geo_values = "06059"
)The covidcast endpoint supports * in its
time and geo fields:
API docs: https://cmu-delphi.github.io/delphi-epidata/api/covid_hosp_facility_lookup.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/covid_hosp_facility.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/covid_hosp.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/delphi.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/flusurv.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/fluview.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/fluview_clinical.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/fluview_meta.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/gft.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/ecdc_ili.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/kcdc_ili.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/nidss_flu.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/nowcast.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/dengue_nowcast.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/nidss_dengue.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/paho_dengue.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/wiki.html
These require private access keys to use (separate from the Delphi
Epidata API key). To actually run these locally, you will need to store
these secrets in your .Reviron file, or set them as
environmental variables.
API docs: https://cmu-delphi.github.io/delphi-epidata/api/cdc.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/dengue_sensors.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/ght.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/meta_norostat.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/norostat.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/quidel.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/sensors.html
API docs: https://cmu-delphi.github.io/delphi-epidata/api/twitter.html