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 for the USA at various geographical resolutions, both from official government sources such as the [Center for Disease Control (CDC)](https://www.cdc.gov/datastatistics/index.html) and [Google Trends](https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/google-symptoms.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/). It is built and maintained by the Carnegie Mellon University [Delphi research group](https://delphi.cmu.edu/).
25
-
26
-
This package is designed to streamline the downloading and usage of data from the [Delphi Epidata
27
-
API](https://cmu-delphi.github.io/delphi-epidata/). It provides a simple R interface to the API, including functions for downloading data, parsing the results, and converting the data into a tidy format. The API stores a historical record of all data, including corrections and updates, which is particularly useful for accurately backtesting forecasting models. We also provide packages for downstream data processing ([epiprocess](https://github.com/cmu-delphi/epiprocess)) and modeling ([epipredict](https://github.com/cmu-delphi/epipredict)).
28
-
29
-
## Usage
30
-
31
-
You can find detailed docs here:
32
-
33
-
```{r}
34
-
library(epidatr)
35
-
# Obtain the smoothed covid-like illness (CLI) signal from the
36
-
# Facebook survey as it was on April 10, 2021 for the US
37
-
epidata <- pub_covidcast(
38
-
source = "fb-survey",
39
-
signals = "smoothed_cli",
40
-
geo_type = "nation",
41
-
time_type = "day",
42
-
geo_values = "us",
43
-
time_values = epirange(20210101, 20210601),
44
-
as_of = "2021-06-01"
45
-
)
46
-
epidata
47
-
```
24
+
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/).
48
25
49
-
```{r fb-cli-signal}
50
-
# Plot this data
51
-
library(ggplot2)
52
-
ggplot(epidata, aes(x = time_value, y = value)) +
53
-
geom_line() +
54
-
labs(
55
-
title = "Smoothed CLI from Facebook Survey",
56
-
subtitle = "US, 2021",
57
-
x = "Date",
58
-
y = "CLI"
59
-
)
60
-
```
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.
61
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.
62
29
63
-
## Installation
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).
64
31
65
-
You can install the stable version of this package from CRAN:
32
+
**To get started** using this package, view the Getting Started guide at `vignette("epidatr")`.
66
33
67
-
```R
68
-
install.packages("epidatr")
69
-
pak::pkg_install("epidatr")
70
-
renv::install("epidatr")
71
-
```
34
+
## For users of the `covidcast` R package
72
35
73
-
Or if you want the development version, install from GitHub:
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.
74
37
75
-
```R
76
-
# Install the dev version using `pak` or `remotes`
77
-
pak::pkg_install("cmu-delphi/epidatr")
78
-
remotes::install_github("cmu-delphi/epidatr")
79
-
renv::install("cmu-delphi/epidatr")
80
-
```
38
+
## Get updates
39
+
40
+
**You should consider subscribing to the [API mailing list](https://lists.andrew.cmu.edu/mailman/listinfo/delphi-covidcast-api)** to be notified of package updates, new data sources, corrections, and other updates.
81
41
82
-
### API Keys
42
+
##Usage terms and citation
83
43
84
-
The Delphi API requires a (free) API key for full functionality. To generate
85
-
your key, register for a pseudo-anonymous account
86
-
[here](https://api.delphi.cmu.edu/epidata/admin/registration_form) and see more
87
-
discussion on the [general API
88
-
website](https://cmu-delphi.github.io/delphi-epidata/api/api_keys.html). See the
89
-
`save_api_key()` function documentation for details on how to use your API key.
44
+
We request that if you use the `epidatr` package in your work, or use any of the data provided by the Delphi Epidata API through non-`covidcast` endpoints, that you cite us using the citation given by [`citation("epidatr")`](https://cmu-delphi.github.io/epidatr/dev/authors.html#citation). If you use any of the data from the `covidcast` endpoint, please use the [COVIDcast citation](https://cmu-delphi.github.io/covidcast/covidcastR/authors.html#citation) as well. See the [COVIDcast licensing documentation](https://cmu-delphi.github.io/delphi-epidata/api/covidcast_licensing.html) and the [licensing documentation for other endpoints](https://cmu-delphi.github.io/delphi-epidata/api/README.html#data-licensing) for information about citing the datasets provided by the API.
45
+
46
+
**Warning:** If you use data from the Epidata API to power a product, dashboard, app, or other service, please download the data you need and store it centrally rather than making API requests for every user. Our server resources are limited and cannot support high-volume interactive use.
47
+
48
+
See also the [Terms of Use](https://delphi.cmu.edu/covidcast/terms-of-use/), noting that the data is a research product and not warranted for a particular purpose.
90
49
91
-
Note that the private endpoints (i.e. those prefixed with `pvt_`) require a
92
-
separate key that needs to be passed as an argument. These endpoints require
You should consider subscribing to the [API mailing list](https://lists.andrew.cmu.edu/mailman/listinfo/delphi-covidcast-api) to be notified of package updates, new data sources, corrections, and other updates.
103
-
104
-
## For users of the `covidcast` R package
105
-
106
-
The `epidatr` package 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.
0 commit comments