Skip to content

Commit

Permalink
Merge pull request #218 from cmu-delphi/ndefries/avail-endpoint-descr…
Browse files Browse the repository at this point in the history
…iptions

Add more detail to `avail_endpoint` descriptions
  • Loading branch information
nmdefries authored Nov 18, 2023
2 parents 9a7e505 + 3f7897e commit 73ea679
Show file tree
Hide file tree
Showing 28 changed files with 68 additions and 55 deletions.
1 change: 1 addition & 0 deletions R/avail_endpoints.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ avail_endpoints <- function() {
Endpoint = paste0(h$Name, "()"),
Description = h$Title
)
cli::cli_inform(c("i" = "Data is available for the US only, unless otherwise specified"))
tib %>% print(n = 50)
}
60 changes: 32 additions & 28 deletions R/endpoints.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' CDC page hits
#' CDC total and by topic webpage visits
#'
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/cdc.html>
Expand Down Expand Up @@ -51,7 +51,7 @@ pvt_cdc <- function(auth, locations, epiweeks, fetch_args = fetch_args_list()) {
) %>% fetch(fetch_args = fetch_args)
}

#' COVID hospitalization facility identifiers
#' Helper for finding COVID hospitalization facilities
#'
#' @description
#' API docs:
Expand Down Expand Up @@ -135,7 +135,7 @@ pub_covid_hosp_facility_lookup <- function(
) %>% fetch(fetch_args = fetch_args)
}

#' COVID hospitalization data for specific facilities
#' COVID hospitalizations by facility
#'
#' @description
#' API docs:
Expand Down Expand Up @@ -437,7 +437,7 @@ pub_covid_hosp_facility <- function(
) %>% fetch(fetch_args = fetch_args)
}

#' COVID hospitalization data by state
#' COVID hospitalizations by state
#'
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/covid_hosp.html>.
Expand Down Expand Up @@ -647,7 +647,7 @@ pub_covidcast_meta <- function(fetch_args = fetch_args_list()) {
) %>% fetch(fetch_args = fetch_args)
}

#' COVID data via the covidcast endpoint
#' Various COVID and flu signals via the COVIDcast endpoint
#'
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/covidcast_signals.html>
Expand Down Expand Up @@ -790,7 +790,7 @@ pub_covidcast <- function(
) %>% fetch(fetch_args = fetch_args)
}

#' Delphi's ILINet forecasts
#' Delphi's ILINet outpatient doctor visits forecasts
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/delphi.html>
#'
Expand Down Expand Up @@ -821,7 +821,7 @@ pub_delphi <- function(system, epiweek, fetch_args = fetch_args_list()) {
) %>% fetch(fetch_args = fetch_args)
}

#' Delphi's PAHO Dengue nowcast
#' Delphi's PAHO dengue nowcasts (North and South America)
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/dengue_nowcast.html>
#'
Expand Down Expand Up @@ -855,7 +855,7 @@ pub_dengue_nowcast <- function(locations, epiweeks, fetch_args = fetch_args_list
) %>% fetch(fetch_args = fetch_args)
}

#' Dengue digital surveillance sensors in PAHO member countries
#' PAHO dengue digital surveillance sensors (North and South America)
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/dengue_sensors.html>
#'
Expand Down Expand Up @@ -900,7 +900,7 @@ pvt_dengue_sensors <- function(auth, names, locations, epiweeks, fetch_args = fe
) %>% fetch(fetch_args = fetch_args)
}

#' ECDC ILI data
#' ECDC ILI incidence (Europe)
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/ecdc_ili.html>.
#'
Expand Down Expand Up @@ -958,11 +958,11 @@ pub_ecdc_ili <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetc
) %>% fetch(fetch_args = fetch_args)
}

#' FluSurv hospitalization data
#' CDC FluSurv flu hospitalizations
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/flusurv.html>.
#'
#' Obtain information on flu hospitalization rates from the Center of Disease
#' Obtain information on influenza hospitalization rates from the Center of Disease
#' Control.
#'
#' See also <https://gis.cdc.gov/GRASP/Fluview/FluHospRates.html>.
Expand Down Expand Up @@ -1022,7 +1022,7 @@ pub_flusurv <- function(locations, epiweeks, ..., issues = NULL, lag = NULL, fet
) %>% fetch(fetch_args = fetch_args)
}

#' FluView virological data from clinical labs
#' CDC FluView flu tests from clinical labs
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/fluview_clinical.html>
#'
Expand Down Expand Up @@ -1080,7 +1080,7 @@ pub_fluview_clinical <- function(regions, epiweeks, ..., issues = NULL, lag = NU
) %>% fetch(fetch_args = fetch_args)
}

#' FluView metadata
#' Metadata for the FluView endpoint
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/fluview_meta.html>
#' Returns information about the fluview endpoint.
Expand All @@ -1092,6 +1092,7 @@ pub_fluview_clinical <- function(regions, epiweeks, ..., issues = NULL, lag = NU
#' @param fetch_args [`fetch_args`]. Additional arguments to pass to `fetch()`.
#'
#' @return [`tibble::tibble`]
#' @seealso [`pub_fluview()`]
#' @keywords endpoint
#' @export
pub_fluview_meta <- function(fetch_args = fetch_args_list()) {
Expand All @@ -1103,11 +1104,11 @@ pub_fluview_meta <- function(fetch_args = fetch_args_list()) {
create_epidata_field_info("latest_issue", "date"),
create_epidata_field_info("table_rows", "int")
)
)
) %>% fetch(fetch_args = fetch_args)
}


#' FluView ILINet data
#' CDC FluView ILINet outpatient doctor visits
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/fluview.html>. For
#'
Expand Down Expand Up @@ -1192,7 +1193,7 @@ pub_fluview <- function(
) %>% fetch(fetch_args = fetch_args)
}

#' Google Flu Trends data
#' Google Flu Trends flu search volume
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/gft.html>
#'
Expand Down Expand Up @@ -1234,7 +1235,7 @@ pub_gft <- function(locations, epiweeks, fetch_args = fetch_args_list()) {
) %>% fetch(fetch_args = fetch_args)
}

#' Google Health Trends data
#' Google Health Trends health topics search volume
#'
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/ght.html>
Expand Down Expand Up @@ -1281,7 +1282,7 @@ pvt_ght <- function(auth, locations, epiweeks, query, fetch_args = fetch_args_li
) %>% fetch(fetch_args = fetch_args)
}

#' KCDC ILI data
#' KCDC ILI incidence (Korea)
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/kcdc_ili.html>
#'
Expand Down Expand Up @@ -1332,7 +1333,7 @@ pub_kcdc_ili <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetc
) %>% fetch(fetch_args = fetch_args)
}

#' NoroSTAT metadata
#' Metadata for the NoroSTAT endpoint
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/meta_norostat.html>
#'
Expand All @@ -1343,6 +1344,7 @@ pub_kcdc_ili <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetc
#' @param auth string. Restricted access key (not the same as API key).
#' @param fetch_args [`fetch_args`]. Additional arguments to pass to `fetch()`.
#' @return [`list`]
#' @seealso [`pvt_norostat()`]
#' @keywords endpoint
#' @export
pvt_meta_norostat <- function(auth, fetch_args = fetch_args_list()) {
Expand All @@ -1355,7 +1357,7 @@ pvt_meta_norostat <- function(auth, fetch_args = fetch_args_list()) {
) %>% fetch(fetch_args = fetch_args)
}

#' API metadata
#' Metadata for the Delphi Epidata API
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/meta.html>
#'
Expand All @@ -1368,7 +1370,7 @@ pub_meta <- function(fetch_args = fetch_args_list()) {
create_epidata_call("meta/", list(), only_supports_classic = TRUE) %>% fetch(fetch_args = fetch_args)
}

#' NIDSS dengue data
#' NIDSS dengue cases (Taiwan)
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/nidss_dengue.html>
#'
Expand Down Expand Up @@ -1408,7 +1410,7 @@ pub_nidss_dengue <- function(locations, epiweeks, fetch_args = fetch_args_list()
) %>% fetch(fetch_args = fetch_args)
}

#' NIDSS flu data
#' NIDSS flu doctor visits (Taiwan)
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/nidss_flu.html>
#'
Expand Down Expand Up @@ -1466,8 +1468,10 @@ pub_nidss_flu <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fet
}


#' NoroSTAT data (point data, no min/max)
#' CDC NoroSTAT norovirus outbreaks
#' @description
#' This is point data only, and does not include minima or maxima.
#'
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/norostat.html>
#'
#' This is the documentation of the API for accessing the NoroSTAT (norostat)
Expand Down Expand Up @@ -1509,7 +1513,7 @@ pvt_norostat <- function(auth, locations, epiweeks, fetch_args = fetch_args_list
) %>% fetch(fetch_args = fetch_args)
}

#' Delphi's ILI nowcast
#' Delphi's ILI Nearby nowcasts
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/nowcast.html>.
#'
Expand Down Expand Up @@ -1545,7 +1549,7 @@ pub_nowcast <- function(locations, epiweeks, fetch_args = fetch_args_list()) {
) %>% fetch(fetch_args = fetch_args)
}

#' PAHO Dengue data
#' PAHO dengue data (North and South America)
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/paho_dengue.html>
#'
Expand Down Expand Up @@ -1640,7 +1644,7 @@ pvt_quidel <- function(auth, locations, epiweeks, fetch_args = fetch_args_list()
) %>% fetch(fetch_args = fetch_args)
}

#' Digital surveillance sensors
#' Influenza and dengue digital surveillance sensors
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/sensors.html>
#'
Expand Down Expand Up @@ -1696,7 +1700,7 @@ pvt_sensors <- function(auth, names, locations, epiweeks, fetch_args = fetch_arg
) %>% fetch(fetch_args = fetch_args)
}

#' HealthTweets data
#' HealthTweets total and influenza-related tweets
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/twitter.html>
#'
Expand Down Expand Up @@ -1757,7 +1761,7 @@ pvt_twitter <- function(auth, locations, ..., dates = NULL, epiweeks = NULL, fet
) %>% fetch(fetch_args = fetch_args)
}

#' Wikipedia access data
#' Wikipedia webpage counts by article
#' @description
#' API docs: <https://cmu-delphi.github.io/delphi-epidata/api/wiki.html>
#
Expand Down
2 changes: 1 addition & 1 deletion man/pub_covid_hosp_facility.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_covid_hosp_facility_lookup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_covid_hosp_state_timeseries.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_covidcast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_delphi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_dengue_nowcast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_ecdc_ili.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/pub_flusurv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_fluview.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_fluview_clinical.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/pub_fluview_meta.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pub_gft.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 73ea679

Please sign in to comment.