|
29 | 29 | </ul> |
30 | 30 | </div> |
31 | 31 |
|
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> |
35 | 55 | <div id="usage" class="section level2"> |
36 | 56 | <h2>Usage</h2> |
37 | 57 | <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'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 |
39 | 61 | epidata <- pub_covidcast( |
40 | 62 | source = "fb-survey", |
41 | 63 | signals = "smoothed_cli", |
@@ -68,31 +90,34 @@ <h2>Usage</h2> |
68 | 90 | </div> |
69 | 91 | <div id="installation" class="section level2"> |
70 | 92 | <h2>Installation</h2> |
71 | | -<p>You can install the stable version of this package from CRAN:</p> |
72 | | -<pre><code>install.packages("epidatr") |
| 93 | +<p>Installing the package is straightforward.</p> |
| 94 | +<pre><code># Install the CRAN version |
73 | 95 | pak::pkg_install("epidatr") |
74 | | -renv::install("epidatr")</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("cmu-delphi/epidatr") |
78 | | -remotes::install_github("cmu-delphi/epidatr") |
79 | | -renv::install("cmu-delphi/epidatr")</code></pre> |
| 96 | + |
| 97 | +# Install the development version from the GitHub dev branch |
| 98 | +pak::pkg_install("cmu-delphi/epidatr@dev")</code></pre> |
80 | 99 | <div id="api-keys" class="section level3"> |
81 | 100 | <h3>API Keys</h3> |
82 | 101 | <p>The Delphi API requires a (free) API key for full functionality. To generate |
83 | 102 | your key, register for a pseudo-anonymous account |
84 | 103 | <a href="https://api.delphi.cmu.edu/epidata/admin/registration_form">here</a> and see more |
85 | 104 | discussion on the <a href="https://cmu-delphi.github.io/delphi-epidata/api/api_keys.html">general API |
86 | 105 | 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> |
91 | 109 | <p>Note that for the time being, the private endpoints (i.e. those prefixed with |
92 | 110 | <code>pvt</code>) will require a separate key that needs to be passed as an argument.</p> |
93 | 111 | </div> |
94 | 112 | </div> |
95 | 113 | <div id="for-users-of-the-covidcast-r-package" class="section level2"> |
96 | 114 | <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> |
98 | 123 | </div> |
0 commit comments