You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [Delphi `epidatr` package](https://cmu-delphi.github.io/epidatr/) is an R front-end for the [Delphi Epidata API](https://cmu-delphi.github.io/delphi-epidata/), which provides real-time access to epidemiological surveillance data for influenza, COVID-19, and other diseases. `epidatr` is built and maintained by the Carnegie Mellon University [Delphi research group](https://delphi.cmu.edu/).
25
-
26
-
Data is available for the United States and a handful of other countries at various geographical resolutions, both from official government sources such as the [US Center for Disease Control (CDC)](https://www.cdc.gov/datastatistics/index.html), and private partners such as [Facebook](https://delphi.cmu.edu/blog/2020/08/26/covid-19-symptom-surveys-through-facebook/) and [Change Healthcare](https://www.changehealthcare.com/). The API stores a historical record of all data, including corrections and updates, which is particularly useful for accurately backtesting forecasting models.
27
-
28
-
`epidatr` is designed to streamline the downloading and usage of data from the Epidata API. The package provides a simple R interface to the API, including functions for downloading data, parsing the results, and converting the data into a tidy format. We also provide the [epiprocess](https://github.com/cmu-delphi/epiprocess) package for downstream data processing and [epipredict](https://github.com/cmu-delphi/epipredict) for modeling.
24
+
The [Delphi Epidata API](https://cmu-delphi.github.io/delphi-epidata/) provides
25
+
real-time access to epidemiological surveillance data for influenza, COVID-19,
26
+
and other diseases from both official government sources such as the [Centers
27
+
for Disease Control and Prevention
28
+
(CDC)](https://www.cdc.gov/datastatistics/index.html), private partners such as
# Obtain the smoothed covid-like illness (CLI) signal from Delphi's US COVID-19
51
+
# Trends and Impact Survey (CTIS), in partnership with Facebook, as it was on
52
+
# April 10, 2021 for the US at the national level
53
+
epidata <- pub_covidcast(
54
+
source = "fb-survey",
55
+
signals = "smoothed_cli",
56
+
geo_type = "nation",
57
+
time_type = "day",
58
+
geo_values = "us",
59
+
time_values = epirange(20210101, 20210601),
60
+
as_of = 20210601
61
+
)
62
+
epidata
63
+
```
29
64
30
-
Consult the [Epidata API documentation](https://cmu-delphi.github.io/delphi-epidata/) for details on the data included in the API, API key registration, licensing, and how to cite this data in your work. The documentation lists all the data sources and signals available through this API for [COVID-19](https://cmu-delphi.github.io/delphi-epidata/api/covidcast_signals.html) and for [other diseases](https://cmu-delphi.github.io/delphi-epidata/api/README.html#source-specific-parameters).
65
+
## Installation
31
66
32
-
**To get started** using this package, view the Getting Started guide at `vignette("epidatr")`.
67
+
Installing the package is straightforward.
33
68
34
-
## For users of the `covidcast` R package
69
+
```R
70
+
# Install the CRAN version
71
+
pak::pkg_install("epidatr")
72
+
# Install the development version from the GitHub dev branch
73
+
pak::pkg_install("cmu-delphi/epidatr@dev")
74
+
```
35
75
36
-
`epidatr` is a complete rewrite of the [`covidcast` package](https://cmu-delphi.github.io/covidcast/covidcastR/), with a focus on speed, reliability, and ease of use. The `covidcast` package is deprecated and will no longer be updated.
76
+
### API Keys
77
+
78
+
The Delphi API requires a (free) API key for full functionality. To generate
79
+
your key, register for a pseudo-anonymous account
80
+
[here](https://api.delphi.cmu.edu/epidata/admin/registration_form) and see more
81
+
discussion on the [general API
82
+
website](https://cmu-delphi.github.io/delphi-epidata/api/api_keys.html). The
83
+
`epidatr` client will automatically look for this key in the environment
84
+
variable `DELPHI_EPIDATA_KEY`. We recommend storing your key in your `.Renviron`
85
+
file, which R will read by default.
86
+
87
+
Note that for the time being, the private endpoints (i.e. those prefixed with
88
+
`pvt`) will require a separate key that needs to be passed as an argument.
89
+
90
+
## For users of the covidcast R package
91
+
92
+
The `covidcast` package is deprecated and will no longer be updated. The
93
+
`epidatr` package is a complete rewrite of the [`covidcast`
94
+
package](https://cmu-delphi.github.io/covidcast/covidcastR/), with a focus on
95
+
speed, reliability, and ease of use. It also supports more endpoints and data
96
+
sources than `covidcast`. When migrating from that package, you will need to use
0 commit comments