Skip to content

Commit e8a906f

Browse files
committed
feat: adjust epidatr blog to Logan's feedback
1 parent 0cb1f98 commit e8a906f

File tree

2 files changed

+85
-39
lines changed

2 files changed

+85
-39
lines changed

content/blog/2023-09-27-epidatr.Rmd

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,39 @@ output:
1919
toc: true
2020
---
2121

22-
The [Delphi Epidata API](https://cmu-delphi.github.io/delphi-epidata/) provides real-time access to epidemiological surveillance data for influenza, COVID-19, and other diseases from both official government sources such as the [Center for Disease Control (CDC)](https://www.cdc.gov/datastatistics/index.html), 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/), and other public datasets like [Google Trends](https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/covid19-search-trends). It is built and maintained by the Carnegie Mellon University [Delphi research group](https://delphi.cmu.edu/).
23-
24-
Today we introduce the R package `epidatr`, available [on CRAN](https://cloud.r-project.org/web/packages/epidatr/index.html), with the source and development [on github](https://github.com/cmu-delphi/epidatr).
25-
26-
This package is designed to streamline the downloading and usage of data from the Delphi Epidata API. 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)).
22+
The [Delphi Epidata API](https://cmu-delphi.github.io/delphi-epidata/) provides
23+
real-time access to epidemiological surveillance data for influenza, COVID-19,
24+
and other diseases from both official government sources such as the [Centers
25+
for Disease Control and Prevention
26+
(CDC)](https://www.cdc.gov/datastatistics/index.html), private partners such as
27+
[Facebook (now
28+
Meta)](https://delphi.cmu.edu/blog/2020/08/26/covid-19-symptom-surveys-through-facebook/)
29+
and [Change Healthcare](https://www.changehealthcare.com/), and other public
30+
datasets like [Google
31+
Trends](https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/covid19-search-trends).
32+
It is built and maintained by the Carnegie Mellon University [Delphi Research
33+
Group](https://delphi.cmu.edu/).
34+
35+
Today we introduce the R package `epidatr`, available [on
36+
CRAN](https://cloud.r-project.org/web/packages/epidatr/index.html), with the
37+
source and development [on github](https://github.com/cmu-delphi/epidatr).
38+
39+
This package is designed to streamline the downloading and usage of data from
40+
the Delphi Epidata API. It provides a simple R interface to the API, including
41+
functions for downloading data, parsing the results, and converting the data
42+
into a tidy format. The API stores a historical record of all data, including
43+
corrections and updates, which is particularly useful for accurately backtesting
44+
forecasting models. We also provide packages for downstream data processing
45+
([epiprocess](https://github.com/cmu-delphi/epiprocess)) and modeling
46+
([epipredict](https://github.com/cmu-delphi/epipredict)).
2747

2848
## Usage
2949

3050
```
3151
library(epidatr)
32-
# Obtain the smoothed covid-like illness (CLI) signal from the Facebook survey as it was on April 10, 2021 for the US
52+
# Obtain the smoothed covid-like illness (CLI) signal from Delphi's US COVID-19
53+
# Trends and Impact Survey (CTIS), in partnership with Facebook, as it was on
54+
# April 10, 2021 for the US at the national level
3355
epidata <- pub_covidcast(
3456
source = "fb-survey",
3557
signals = "smoothed_cli",
@@ -66,21 +88,14 @@ epidata
6688

6789
## Installation
6890

69-
You can install the stable version of this package from CRAN:
91+
Installing the package is straightforward.
7092

7193
```
72-
install.packages("epidatr")
94+
# Install the CRAN version
7395
pak::pkg_install("epidatr")
74-
renv::install("epidatr")
75-
```
7696
77-
Or if you want the development version, install from GitHub:
78-
79-
```
80-
# Install the dev version using `pak` or `remotes`
81-
pak::pkg_install("cmu-delphi/epidatr")
82-
remotes::install_github("cmu-delphi/epidatr")
83-
renv::install("cmu-delphi/epidatr")
97+
# Install the development version from the GitHub dev branch
98+
pak::pkg_install("cmu-delphi/epidatr@dev")
8499
```
85100

86101
### API Keys
@@ -90,14 +105,20 @@ your key, register for a pseudo-anonymous account
90105
[here](https://api.delphi.cmu.edu/epidata/admin/registration_form) and see more
91106
discussion on the [general API
92107
website](https://cmu-delphi.github.io/delphi-epidata/api/api_keys.html). The
93-
`epidatr` client will automatically look for this key in the R option
94-
`delphi.epidata.key` or in the environment variable
95-
`DELPHI_EPIDATA_KEY`. We recommend storing your key in `.Renviron` file, which R
96-
will read by default.
108+
`epidatr` client will automatically look for this key in the environment
109+
variable `DELPHI_EPIDATA_KEY`. We recommend storing your key in your `.Renviron`
110+
file, which R will read by default.
97111

98112
Note that for the time being, the private endpoints (i.e. those prefixed with
99113
`pvt`) will require a separate key that needs to be passed as an argument.
100114

101115
## For users of the covidcast R package
102116

103-
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.
117+
The `covidcast` package is deprecated and will no longer be updated. The
118+
`epidatr` package is a complete rewrite of the [`covidcast`
119+
package](https://cmu-delphi.github.io/covidcast/covidcastR/), with a focus on
120+
speed, reliability, and ease of use. It also supports more endpoints and data
121+
sources than `covidcast`. When migrating from that package, you will need to use
122+
the
123+
[`pub_covidcast`](https://cmu-delphi.github.io/epidatr/reference/pub_covidcast.html)
124+
function in `epidatr`.

content/blog/2023-09-27-epidatr.html

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,35 @@
2929
</ul>
3030
</div>
3131

32-
<p>The <a href="https://cmu-delphi.github.io/delphi-epidata/">Delphi Epidata API</a> provides real-time access to epidemiological surveillance data for influenza, COVID-19, and other diseases from both official government sources such as the <a href="https://www.cdc.gov/datastatistics/index.html">Center for Disease Control (CDC)</a>, private partners such as <a href="https://delphi.cmu.edu/blog/2020/08/26/covid-19-symptom-surveys-through-facebook/">Facebook</a> and <a href="https://www.changehealthcare.com/">Change Healthcare</a>, and other public datasets like <a href="https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/covid19-search-trends">Google Trends</a>. It is built and maintained by the Carnegie Mellon University <a href="https://delphi.cmu.edu/">Delphi research group</a>.</p>
33-
<p>Today we introduce the R package <code>epidatr</code>, available <a href="https://cloud.r-project.org/web/packages/epidatr/index.html">on CRAN</a>, with the source and development <a href="https://github.com/cmu-delphi/epidatr">on github</a>.</p>
34-
<p>This package is designed to streamline the downloading and usage of data from the Delphi Epidata API. 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 (<a href="https://github.com/cmu-delphi/epiprocess">epiprocess</a>) and modeling (<a href="https://github.com/cmu-delphi/epipredict">epipredict</a>).</p>
32+
<p>The <a href="https://cmu-delphi.github.io/delphi-epidata/">Delphi Epidata API</a> provides
33+
real-time access to epidemiological surveillance data for influenza, COVID-19,
34+
and other diseases from both official government sources such as the <a href="https://www.cdc.gov/datastatistics/index.html">Centers
35+
for Disease Control and Prevention
36+
(CDC)</a>, private partners such as
37+
<a href="https://delphi.cmu.edu/blog/2020/08/26/covid-19-symptom-surveys-through-facebook/">Facebook (now
38+
Meta)</a>
39+
and <a href="https://www.changehealthcare.com/">Change Healthcare</a>, and other public
40+
datasets like <a href="https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/covid19-search-trends">Google
41+
Trends</a>.
42+
It is built and maintained by the Carnegie Mellon University <a href="https://delphi.cmu.edu/">Delphi Research
43+
Group</a>.</p>
44+
<p>Today we introduce the R package <code>epidatr</code>, available <a href="https://cloud.r-project.org/web/packages/epidatr/index.html">on
45+
CRAN</a>, with the
46+
source and development <a href="https://github.com/cmu-delphi/epidatr">on github</a>.</p>
47+
<p>This package is designed to streamline the downloading and usage of data from
48+
the Delphi Epidata API. It provides a simple R interface to the API, including
49+
functions for downloading data, parsing the results, and converting the data
50+
into a tidy format. The API stores a historical record of all data, including
51+
corrections and updates, which is particularly useful for accurately backtesting
52+
forecasting models. We also provide packages for downstream data processing
53+
(<a href="https://github.com/cmu-delphi/epiprocess">epiprocess</a>) and modeling
54+
(<a href="https://github.com/cmu-delphi/epipredict">epipredict</a>).</p>
3555
<div id="usage" class="section level2">
3656
<h2>Usage</h2>
3757
<pre><code>library(epidatr)
38-
# Obtain the smoothed covid-like illness (CLI) signal from the Facebook survey as it was on April 10, 2021 for the US
58+
# Obtain the smoothed covid-like illness (CLI) signal from Delphi&#39;s US COVID-19
59+
# Trends and Impact Survey (CTIS), in partnership with Facebook, as it was on
60+
# April 10, 2021 for the US at the national level
3961
epidata &lt;- pub_covidcast(
4062
source = &quot;fb-survey&quot;,
4163
signals = &quot;smoothed_cli&quot;,
@@ -68,31 +90,34 @@ <h2>Usage</h2>
6890
</div>
6991
<div id="installation" class="section level2">
7092
<h2>Installation</h2>
71-
<p>You can install the stable version of this package from CRAN:</p>
72-
<pre><code>install.packages(&quot;epidatr&quot;)
93+
<p>Installing the package is straightforward.</p>
94+
<pre><code># Install the CRAN version
7395
pak::pkg_install(&quot;epidatr&quot;)
74-
renv::install(&quot;epidatr&quot;)</code></pre>
75-
<p>Or if you want the development version, install from GitHub:</p>
76-
<pre><code># Install the dev version using `pak` or `remotes`
77-
pak::pkg_install(&quot;cmu-delphi/epidatr&quot;)
78-
remotes::install_github(&quot;cmu-delphi/epidatr&quot;)
79-
renv::install(&quot;cmu-delphi/epidatr&quot;)</code></pre>
96+
97+
# Install the development version from the GitHub dev branch
98+
pak::pkg_install(&quot;cmu-delphi/epidatr@dev&quot;)</code></pre>
8099
<div id="api-keys" class="section level3">
81100
<h3>API Keys</h3>
82101
<p>The Delphi API requires a (free) API key for full functionality. To generate
83102
your key, register for a pseudo-anonymous account
84103
<a href="https://api.delphi.cmu.edu/epidata/admin/registration_form">here</a> and see more
85104
discussion on the <a href="https://cmu-delphi.github.io/delphi-epidata/api/api_keys.html">general API
86105
website</a>. The
87-
<code>epidatr</code> client will automatically look for this key in the R option
88-
<code>delphi.epidata.key</code> or in the environment variable
89-
<code>DELPHI_EPIDATA_KEY</code>. We recommend storing your key in <code>.Renviron</code> file, which R
90-
will read by default.</p>
106+
<code>epidatr</code> client will automatically look for this key in the environment
107+
variable <code>DELPHI_EPIDATA_KEY</code>. We recommend storing your key in your <code>.Renviron</code>
108+
file, which R will read by default.</p>
91109
<p>Note that for the time being, the private endpoints (i.e. those prefixed with
92110
<code>pvt</code>) will require a separate key that needs to be passed as an argument.</p>
93111
</div>
94112
</div>
95113
<div id="for-users-of-the-covidcast-r-package" class="section level2">
96114
<h2>For users of the covidcast R package</h2>
97-
<p>The <code>epidatr</code> package is a complete rewrite of the <a href="https://cmu-delphi.github.io/covidcast/covidcastR/"><code>covidcast</code> package</a>, with a focus on speed, reliability, and ease of use. The <code>covidcast</code> package is deprecated and will no longer be updated.</p>
115+
<p>The <code>covidcast</code> package is deprecated and will no longer be updated. The
116+
<code>epidatr</code> package is a complete rewrite of the <a href="https://cmu-delphi.github.io/covidcast/covidcastR/"><code>covidcast</code>
117+
package</a>, with a focus on
118+
speed, reliability, and ease of use. It also supports more endpoints and data
119+
sources than <code>covidcast</code>. When migrating from that package, you will need to use
120+
the
121+
<a href="https://cmu-delphi.github.io/epidatr/reference/pub_covidcast.html"><code>pub_covidcast</code></a>
122+
function in <code>epidatr</code>.</p>
98123
</div>

0 commit comments

Comments
 (0)