Skip to content

excise afhsb and afhsb_meta, they're not upstream #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ export(nidss_flu)
export(nowcast)
export(paho_dengue)
export(parse_timeset_input)
export(pvt_afhsb)
export(pvt_cdc)
export(pvt_dengue_sensors)
export(pvt_ght)
export(pvt_meta_afhsb)
export(pvt_meta_norostat)
export(pvt_norostat)
export(pvt_quidel)
Expand Down
58 changes: 0 additions & 58 deletions R/endpoints.R
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
#' Fetch AFHSB data (point data, no min/max)
#'
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/afhsb.html
#'
#' @param auth string. Restricted access key (not the same as API key).
#' @param locations character vector. Locations to fetch (see docs).
#' @param epiweeks [`timeset`]. Epiweeks to fetch.
#' @param flu_types string. Flu types to fetch (see docs).
#' @return [`epidata_call`]
#'
#' @examples
#' \dontrun{
#' pvt_afhsb(
#' auth = "yourkey",
#' "fl,ca",
#' epirange(202001, 202110),
#' "flu1,flu2-flu1"
#' ) %>% fetch_tbl()
#' }
#' @export
pvt_afhsb <- function(auth, locations, epiweeks, flu_types) {
assert_character_param("auth", auth, len = 1)
assert_character_param("locations", locations)
assert_timeset_param("epiweeks", epiweeks)
assert_character_param("flu_types", flu_types)
epiweeks <- parse_timeset_input(epiweeks)

create_epidata_call(
"afhsb/",
list(
auth = auth,
locations = locations,
epiweeks = epiweeks,
flu_types = flu_types
),
list(
create_epidata_field_info("location", "text"),
create_epidata_field_info("flu_type", "text"),
create_epidata_field_info("epiweek", "epiweek"),
create_epidata_field_info("visit_num", "int")
)
)
}

#' Fetch CDC page hits
#'
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/cdc.html
Expand Down Expand Up @@ -1248,20 +1204,6 @@ kcdc_ili <- function(regions, epiweeks, issues = NULL, lag = NULL) {
)
}

#' Fetch AFHSB metadata
#'
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/meta_afhsb.html
#'
#' @param auth string. Restricted access key (not the same as API key).
#' @return [`epidata_call`]
#'
#' @export
pvt_meta_afhsb <- function(auth) {
assert_character_param("auth", auth, len = 1)

create_epidata_call("meta_afhsb/", list(auth = auth), only_supports_classic = TRUE)
}

#' Fetch NoroSTAT metadata
#'
#' API docs: https://cmu-delphi.github.io/delphi-epidata/api/meta_norostat.html
Expand Down
33 changes: 0 additions & 33 deletions man/pvt_afhsb.Rd

This file was deleted.

17 changes: 0 additions & 17 deletions man/pvt_meta_afhsb.Rd

This file was deleted.

4 changes: 0 additions & 4 deletions tests/testthat/test-endpoints.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
test_that("basic_epidata_call", {
expect_no_error(pvt_afhsb(auth = "yourkey", "fl,ca", epirange(202001, 202110), "flu1,flu2-flu1"))
expect_no_error(pvt_cdc(auth = "yourkey", "fl,ca", epirange(201501, 201601)))
expect_no_error(covid_hosp_facility_lookup(state = "fl"))
expect_no_error(covid_hosp_facility(hospital_pks = "100075", collection_weeks = epirange(20200101, 20200501)))
Expand All @@ -17,7 +16,6 @@ test_that("basic_epidata_call", {
expect_no_error(gft(locations = "hhs1", epiweeks = epirange(201201, 202001)))
expect_no_error(pvt_ght(auth = "yourkey", locations = "ca", epiweeks = epirange(201201, 202001), query = "?"))
expect_no_error(kcdc_ili(regions = "?", epiweeks = epirange(201201, 202001)))
expect_no_error(pvt_meta_afhsb(auth = "yourkey"))
expect_no_error(pvt_meta_norostat(auth = "yourkey"))
expect_no_error(meta())
expect_no_error(nidss_dengue(locations = "taipei", epiweeks = epirange(201201, 202001)))
Expand All @@ -30,7 +28,6 @@ test_that("basic_epidata_call", {
expect_no_error(pvt_twitter(auth = "yourkey", locations = "CA", epiweeks = epirange(201501, 202001)))
expect_no_error(wiki(articles = "avian_influenza", epiweeks = epirange(201501, 202001)))

expect_no_error(pvt_afhsb(auth = "yourkey", "fl,ca", epirange(202001, 202110), "flu1,flu2-flu1") %>% request_url())
expect_no_error(pvt_cdc(auth = "yourkey", "fl,ca", epirange(201501, 201601)) %>% request_url())
expect_no_error(covid_hosp_facility_lookup(state = "fl") %>% request_url())
expect_no_error(covid_hosp_facility(hospital_pks = "100075", collection_weeks = epirange(20200101, 20200501)) %>% request_url())
Expand All @@ -48,7 +45,6 @@ test_that("basic_epidata_call", {
expect_no_error(gft(locations = "hhs1", epiweeks = epirange(201201, 202001)) %>% request_url())
expect_no_error(pvt_ght(auth = "yourkey", locations = "ca", epiweeks = epirange(201201, 202001), query = "?") %>% request_url())
expect_no_error(kcdc_ili(regions = "?", epiweeks = epirange(201201, 202001)) %>% request_url())
expect_no_error(pvt_meta_afhsb(auth = "yourkey") %>% request_url())
expect_no_error(pvt_meta_norostat(auth = "yourkey") %>% request_url())
expect_no_error(meta() %>% request_url())
expect_no_error(nidss_dengue(locations = "taipei", epiweeks = epirange(201201, 202001)) %>% request_url())
Expand Down