knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of epidatr is to provide a convenient way for R users to access data released by the Delphi group's Epidata API. Currently, it provides accesss only to the FluView and COVID-19 API endpoints. This is not an official R client for the API in any sense. Rather it is simply one contributed option.
This package may be installed from GitHub with:
# install.packages("devtools") devtools::install_github("e3bo/epidatr")
View the covid data available:
library(epidatr) covidcast(source = "covidcast_meta")$epidata
Make a request with the default query:
covidcast()
Choose a different set of dates and view the data frame:
covidcast(time_values = "20200412-20200415,20200418")$epidata
Provide a query string:
query <- "source=covidcast&data_source=fb-survey&signal=smoothed_cli&time_type=day&geo_type=county&time_values=20200406&geo_value=01000" covidcast(query=query)$epidata
Access archived ILInet data:
fluview(epiweeks = "202001", regions = "flusight", lag = 0)$epidata
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.