Skip to content

Commit 9655cd9

Browse files
authored
Merge pull request #107 from dsweber2/dev
excise afhsb and afhsb_meta, they're not upstream
2 parents 00f836c + d57e613 commit 9655cd9

File tree

5 files changed

+0
-114
lines changed

5 files changed

+0
-114
lines changed

NAMESPACE

-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ export(nidss_flu)
3535
export(nowcast)
3636
export(paho_dengue)
3737
export(parse_timeset_input)
38-
export(pvt_afhsb)
3938
export(pvt_cdc)
4039
export(pvt_dengue_sensors)
4140
export(pvt_ght)
42-
export(pvt_meta_afhsb)
4341
export(pvt_meta_norostat)
4442
export(pvt_norostat)
4543
export(pvt_quidel)

R/endpoints.R

-58
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
#' Fetch AFHSB data (point data, no min/max)
2-
#'
3-
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/afhsb.html
4-
#'
5-
#' @param auth string. Restricted access key (not the same as API key).
6-
#' @param locations character vector. Locations to fetch (see docs).
7-
#' @param epiweeks [`timeset`]. Epiweeks to fetch.
8-
#' @param flu_types string. Flu types to fetch (see docs).
9-
#' @return [`epidata_call`]
10-
#'
11-
#' @examples
12-
#' \dontrun{
13-
#' pvt_afhsb(
14-
#' auth = "yourkey",
15-
#' "fl,ca",
16-
#' epirange(202001, 202110),
17-
#' "flu1,flu2-flu1"
18-
#' ) %>% fetch_tbl()
19-
#' }
20-
#' @export
21-
pvt_afhsb <- function(auth, locations, epiweeks, flu_types) {
22-
assert_character_param("auth", auth, len = 1)
23-
assert_character_param("locations", locations)
24-
assert_timeset_param("epiweeks", epiweeks)
25-
assert_character_param("flu_types", flu_types)
26-
epiweeks <- parse_timeset_input(epiweeks)
27-
28-
create_epidata_call(
29-
"afhsb/",
30-
list(
31-
auth = auth,
32-
locations = locations,
33-
epiweeks = epiweeks,
34-
flu_types = flu_types
35-
),
36-
list(
37-
create_epidata_field_info("location", "text"),
38-
create_epidata_field_info("flu_type", "text"),
39-
create_epidata_field_info("epiweek", "epiweek"),
40-
create_epidata_field_info("visit_num", "int")
41-
)
42-
)
43-
}
44-
451
#' Fetch CDC page hits
462
#'
473
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/cdc.html
@@ -1248,20 +1204,6 @@ kcdc_ili <- function(regions, epiweeks, issues = NULL, lag = NULL) {
12481204
)
12491205
}
12501206

1251-
#' Fetch AFHSB metadata
1252-
#'
1253-
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/meta_afhsb.html
1254-
#'
1255-
#' @param auth string. Restricted access key (not the same as API key).
1256-
#' @return [`epidata_call`]
1257-
#'
1258-
#' @export
1259-
pvt_meta_afhsb <- function(auth) {
1260-
assert_character_param("auth", auth, len = 1)
1261-
1262-
create_epidata_call("meta_afhsb/", list(auth = auth), only_supports_classic = TRUE)
1263-
}
1264-
12651207
#' Fetch NoroSTAT metadata
12661208
#'
12671209
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/meta_norostat.html

man/pvt_afhsb.Rd

-33
This file was deleted.

man/pvt_meta_afhsb.Rd

-17
This file was deleted.

tests/testthat/test-endpoints.R

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
test_that("basic_epidata_call", {
2-
expect_no_error(pvt_afhsb(auth = "yourkey", "fl,ca", epirange(202001, 202110), "flu1,flu2-flu1"))
32
expect_no_error(pvt_cdc(auth = "yourkey", "fl,ca", epirange(201501, 201601)))
43
expect_no_error(covid_hosp_facility_lookup(state = "fl"))
54
expect_no_error(covid_hosp_facility(hospital_pks = "100075", collection_weeks = epirange(20200101, 20200501)))
@@ -17,7 +16,6 @@ test_that("basic_epidata_call", {
1716
expect_no_error(gft(locations = "hhs1", epiweeks = epirange(201201, 202001)))
1817
expect_no_error(pvt_ght(auth = "yourkey", locations = "ca", epiweeks = epirange(201201, 202001), query = "?"))
1918
expect_no_error(kcdc_ili(regions = "?", epiweeks = epirange(201201, 202001)))
20-
expect_no_error(pvt_meta_afhsb(auth = "yourkey"))
2119
expect_no_error(pvt_meta_norostat(auth = "yourkey"))
2220
expect_no_error(meta())
2321
expect_no_error(nidss_dengue(locations = "taipei", epiweeks = epirange(201201, 202001)))
@@ -30,7 +28,6 @@ test_that("basic_epidata_call", {
3028
expect_no_error(pvt_twitter(auth = "yourkey", locations = "CA", epiweeks = epirange(201501, 202001)))
3129
expect_no_error(wiki(articles = "avian_influenza", epiweeks = epirange(201501, 202001)))
3230

33-
expect_no_error(pvt_afhsb(auth = "yourkey", "fl,ca", epirange(202001, 202110), "flu1,flu2-flu1") %>% request_url())
3431
expect_no_error(pvt_cdc(auth = "yourkey", "fl,ca", epirange(201501, 201601)) %>% request_url())
3532
expect_no_error(covid_hosp_facility_lookup(state = "fl") %>% request_url())
3633
expect_no_error(covid_hosp_facility(hospital_pks = "100075", collection_weeks = epirange(20200101, 20200501)) %>% request_url())
@@ -48,7 +45,6 @@ test_that("basic_epidata_call", {
4845
expect_no_error(gft(locations = "hhs1", epiweeks = epirange(201201, 202001)) %>% request_url())
4946
expect_no_error(pvt_ght(auth = "yourkey", locations = "ca", epiweeks = epirange(201201, 202001), query = "?") %>% request_url())
5047
expect_no_error(kcdc_ili(regions = "?", epiweeks = epirange(201201, 202001)) %>% request_url())
51-
expect_no_error(pvt_meta_afhsb(auth = "yourkey") %>% request_url())
5248
expect_no_error(pvt_meta_norostat(auth = "yourkey") %>% request_url())
5349
expect_no_error(meta() %>% request_url())
5450
expect_no_error(nidss_dengue(locations = "taipei", epiweeks = epirange(201201, 202001)) %>% request_url())

0 commit comments

Comments
 (0)