Skip to content

Commit 488f87d

Browse files
committed
whitespace, dropping afhsb
1 parent 54ee545 commit 488f87d

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

vignettes/endpoints.Rmd

+32-32
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,35 @@ Some endpoints allow for the use of `*` to access data at all locations. Check t
2727

2828
## COVIDcast Main Endpoint
2929

30-
All of these signals use the command `covidcast`, with variation in which source and signal are used.
30+
All of these signals use the command `covidcast`, with variation in which source and signal are used.
3131

3232
Data Sources and Signals documentation: <https://cmu-delphi.github.io/delphi-epidata/api/covidcast_signals.html>
3333

3434
Function reference: <https://cmu-delphi.github.io/epidatr/reference/covidcast.html>
3535

36-
To understand the available sources better, use `covidcast_epidata()` and `covidcast_meta()`.
36+
To understand the available sources better, use `covidcast_epidata()` and `covidcast_meta()`.
37+
3738
```{r}
3839
covidcast_epidata()
3940
```
41+
4042
For example, let's see what kind of smoothed signals come out of the [facebook survey](https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/fb-survey.html) source:
43+
4144
```{r}
4245
cm <- covidcast_meta() %>%
4346
fetch_tbl() %>%
4447
dplyr::filter(grepl("smoothed", signal), data_source == "fb-survey")
4548
```
49+
4650
grabbing the first smoothed signal as an example:
51+
4752
```{r}
4853
cm[1, ] %>% print(width = 100)
4954
cm[1, "signal"]
5055
```
56+
5157
and actually fetching some data from this source
58+
5259
```{r}
5360
covidcast(
5461
data_source = "fb-survey",
@@ -59,8 +66,10 @@ covidcast(
5966
geo_values = "06059"
6067
) %>% fetch_tbl()
6168
```
69+
6270
County geo_values are [FIPS codes](https://en.wikipedia.org/wiki/List_of_United_States_FIPS_codes_by_county) and are discussed more here: <https://cmu-delphi.github.io/delphi-epidata/api/covidcast_geography.html>. The example above is for Orange County, California.
6371
Since `covidcast` is an endpoint which supports `*`, here is an example of its use:
72+
6473
```{r}
6574
covidcast(
6675
data_source = "fb-survey",
@@ -81,6 +90,7 @@ API docs: <https://cmu-delphi.github.io/delphi-epidata/api/covid_hosp_facility_l
8190
Function reference: <https://cmu-delphi.github.io/epidatr/reference/covid_hosp_facility_lookup.html>
8291

8392
Example calls:
93+
8494
```{r}
8595
covid_hosp_facility_lookup(city = "southlake") %>% fetch_tbl()
8696
```
@@ -122,7 +132,7 @@ Example call:
122132
covid_hosp_state_timeseries(states = "MA", dates = "20200510") %>% fetch_tbl()
123133
```
124134

125-
## Flu Endpoints
135+
## Flu Endpoints
126136

127137
### Delphi's ILINet forecasts
128138

@@ -172,6 +182,7 @@ Example call:
172182
```{r}
173183
fluview_clinical(regions = "nat", epiweeks = epirange(201601, 201701)) %>% fetch_tbl()
174184
```
185+
175186
### Fluview metadata
176187

177188
Function reference: <https://cmu-delphi.github.io/epidatr/reference/fluview_metadata.html>
@@ -183,6 +194,7 @@ fluview_meta() %>% fetch_tbl()
183194
```
184195

185196
### Google Flu Trends data
197+
186198
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/gft.html>
187199

188200
Function reference: <https://cmu-delphi.github.io/epidatr/reference/gft.html>
@@ -192,14 +204,17 @@ gft(locations = "hhs1", epiweeks = epirange(201201, 202001)) %>% fetch_tbl()
192204
```
193205

194206
### KCDC ILI
207+
195208
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/kcdc_ili.html>
196209

197210
Function reference: <https://cmu-delphi.github.io/epidatr/reference/kcdc_ili.html>
198211

199212
```{r}
200213
kcdc_ili(regions = "ROK", epiweeks = 200436) %>% fetch_tbl()
201214
```
215+
202216
### NIDSS Flu
217+
203218
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/nidss_flu.html>
204219

205220
Function reference: <https://cmu-delphi.github.io/epidatr/reference/nidss_flu.html>
@@ -208,7 +223,8 @@ Function reference: <https://cmu-delphi.github.io/epidatr/reference/nidss_flu.ht
208223
nidss_flu(regions = "taipei", epiweeks = epirange(200901, 201301)) %>% fetch_tbl()
209224
```
210225

211-
### ILI Nearby Nowcast
226+
### ILI Nearby Nowcast
227+
212228
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/nowcast.html>
213229

214230
Function reference: <https://cmu-delphi.github.io/epidatr/reference/nowcast.html>
@@ -232,6 +248,7 @@ dengue_nowcast(locations = "pr", epiweeks = epirange(201401, 202301)) %>% fetch_
232248
```
233249

234250
### NIDSS dengue
251+
235252
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/nidss_dengue.html>
236253

237254
Function reference: <https://cmu-delphi.github.io/epidatr/reference/nidss_dengue.html>
@@ -251,53 +268,29 @@ paho_dengue(regions = "ca", epiweeks = epirange(200201, 202319)) %>% fetch_tbl()
251268
```
252269

253270
## Other Endpoints
271+
254272
### Wikipedia Access
273+
255274
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/wiki.html>
256275

257276
Function reference: <https://cmu-delphi.github.io/epidatr/reference/wiki.html>
258277

259278
```{r}
260279
wiki(language = "en", articles = "influenza", epiweeks = epirange(202001, 202319)) %>% fetch_tbl()
261280
```
281+
262282
# Private methods
263283

264284
These require private access keys to use. To actually run these locally, you will need to store these secrets in your `.Reviron` file, or set them as environmental variables.
265285

266-
### AFHSB metadata
267-
268-
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/meta_afhsb.html>
269-
270-
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_meta_afhsb.html>
271-
272-
Example call:
273-
```{r, eval=FALSE}
274-
pvt_meta_afhsb(auth = Sys.getenv("SECRET_API_AUTH_AFHSB")) %>% fetch_classic()
275-
```
276-
TODO internal server error
277-
not on the server I was given access to
278-
279-
### AFHSB data
280-
281-
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/afhsb.html>
282-
283-
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_afhsb.html>
284-
285-
Example call:
286-
287-
```{r, eval=FALSE}
288-
pvt_afhsb(auth = Sys.getenv("SECRET_API_AUTH_AFHSB"), locations = "mn", epiweeks = epirange(202002, 202110), flu_types = "flu1") %>% fetch_tbl()
289-
```
290-
291-
TODO 500 internal server error
292-
not on the server I was given access to
293-
294286
### CDC
295287

296288
API docs: <https://cmu-delphi.github.io/delphi-epidata/api/cdc.html>
297289

298290
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_cdc.html>
299291

300292
Example call:
293+
301294
```{r, eval=FALSE}
302295
pvt_cdc(auth = Sys.getenv("SECRET_API_AUTH_CDC"), epiweeks = epirange(202003, 202304), locations = "ma") %>% fetch_tbl()
303296
```
@@ -321,6 +314,7 @@ API docs: <https://cmu-delphi.github.io/delphi-epidata/api/ght.html>
321314
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_ght.html>
322315

323316
Example call:
317+
324318
```{r, eval=FALSE}
325319
pvt_ght(auth = Sys.getenv("SECRET_API_AUTH_GHT"), epiweeks = epirange(199301, 202304), locations = "ma", query = "how to get over the flu") %>% fetch_tbl()
326320
```
@@ -332,6 +326,7 @@ API docs: <https://cmu-delphi.github.io/delphi-epidata/api/meta_norostat.html>
332326
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_meta_norostat.html>
333327

334328
Example call:
329+
335330
```{r, eval=FALSE}
336331
pvt_meta_norostat(auth = Sys.getenv("SECRET_API_AUTH_NOROSTAT")) %>% fetch_classic()
337332
```
@@ -343,9 +338,11 @@ API docs: <https://cmu-delphi.github.io/delphi-epidata/api/norostat.html>
343338
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_norostat.html>
344339

345340
Example call:
341+
346342
```{r, eval=FALSE}
347343
pvt_norostat(auth = Sys.getenv("SECRET_API_AUTH_NOROSTAT"), locations = "ma", epiweeks = epirange(199001, 202105)) %>% fetch_classic()
348344
```
345+
349346
TODO can't seem to get a relevant sample, the example in the reference section is borked.
350347

351348
### Quidel Covid and Influenza testing
@@ -355,6 +352,7 @@ API docs: <https://cmu-delphi.github.io/delphi-epidata/api/quidel.html>
355352
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_quidel.html>
356353

357354
Example call:
355+
358356
```{r, eval=FALSE}
359357
pvt_quidel(auth = Sys.getenv("SECRET_API_AUTH_QUIDEL"), locations = "hhs1", epiweeks = epirange(200301, 202105)) %>% fetch_tbl()
360358
```
@@ -366,6 +364,7 @@ API docs: <https://cmu-delphi.github.io/delphi-epidata/api/sensors.html>
366364
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_sensors.html>
367365

368366
Example call:
367+
369368
```{r, eval=FALSE}
370369
pvt_sensors(auth = Sys.getenv("SECRET_API_AUTH_SENSORS"), names = "sar3", locations = "nat", epiweeks = epirange(200301, 202105)) %>% fetch_tbl()
371370
```
@@ -377,6 +376,7 @@ API docs: <https://cmu-delphi.github.io/delphi-epidata/api/twitter.html>
377376
Function reference: <https://cmu-delphi.github.io/epidatr/reference/pvt_twitter.html>
378377

379378
Example call:
379+
380380
```{r, eval=FALSE}
381381
pvt_twitter(auth = Sys.getenv("SECRET_API_AUTH_TWITTER"), locations = "nat", epiweeks = epirange(200301, 202105)) %>% fetch_tbl()
382382
```

0 commit comments

Comments
 (0)