Skip to content

Commit 7eadc13

Browse files
committed
state epidatr is ready
1 parent 70b99f5 commit 7eadc13

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

docs/api/client_libraries.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,37 @@ nav_order: 1
88

99
For anyone looking for COVIDCast data, please visit our [COVIDCast Libraries](covidcast_clients.md).
1010

11-
We are currently working on fully-featured Epidata clients for R and Python. They are not ready
12-
for release yet, but you can track our development progress and help us test them out at:
11+
A full-featured Epidata client for R is available at
12+
[epidatr](https://github.com/cmu-delphi/epidatr) and
13+
[also on CRAN](https://cran.r-project.org/web/packages/epidatr/index.html).
1314

14-
* [epidatr](https://github.com/cmu-delphi/epidatr)
15-
* [epidatpy](https://github.com/cmu-delphi/epidatpy)
15+
We are currently working on a new full-featured Epidata client for Python. It is not ready
16+
for release yet, but you can track our development progress and help us test it out at
17+
[epidatpy](https://github.com/cmu-delphi/epidatpy).
1618

1719
In the meantime, minimalist Epidata clients remain available for
1820
[JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.js),
1921
[Python](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.py),
2022
and
2123
[R](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.R).
2224
The following samples show how to import the library and fetch Delphi's COVID-19
23-
Surveillance Streams from Facebook Survey CLI for county 06001 and days
25+
Surveillance Streams from Facebook Survey CLI for county 06001, and days
2426
`20200401` and `20200405-20200414` (11 days total).
2527

28+
### R
29+
30+
````R
31+
# [Optional] configure your API key, if desired
32+
# Interactive. See https://cmu-delphi.github.io/epidatr/articles/epidatr.html#api-keys for details.
33+
#save_api_key()
34+
# Import
35+
library(epidatr)
36+
# Fetch data
37+
res <- pub_covidcast('fb-survey', 'smoothed_cli', 'county', 'day', geo_values = '06001',
38+
time_values = c(20200401, 20200405:20200414))
39+
cat(res)
40+
````
41+
2642
### JavaScript (in a web browser)
2743

2844
The minimalist JavaScript client does not currently support API keys. If you need API key support in JavaScript, contact [email protected].
@@ -40,7 +56,6 @@ The minimalist JavaScript client does not currently support API keys. If you nee
4056

4157
### Python
4258

43-
4459
Optionally install the [package from PyPI](https://pypi.org/project/delphi-epidata/) using pip(env):
4560
````bash
4661
pip install delphi-epidata
@@ -60,15 +75,14 @@ res = Epidata.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401,
6075
print(res['result'], res['message'], len(res['epidata']))
6176
````
6277

63-
### R
64-
78+
### R (legacy)
6579

66-
````R
80+
```R
6781
# [Optional] configure your API key, if desired
6882
#option('epidata.auth', <your API key>)
6983
# Import
7084
source('delphi_epidata.R')
7185
# Fetch data
7286
res <- Epidata$covidcast('fb-survey', 'smoothed_cli', 'day', 'county', list(20200401, Epidata$range(20200405, 20200414)), '06001')
7387
cat(paste(res$result, res$message, length(res$epidata), "\n"))
74-
````
88+
```

0 commit comments

Comments
 (0)