From 11b77fd2a22b1e85de4e8c5d6ae7859706e9ad89 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:39:32 -0500 Subject: [PATCH 1/7] redocument --- man/get_api_key.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/get_api_key.Rd b/man/get_api_key.Rd index 18f7ae65..40774c66 100644 --- a/man/get_api_key.Rd +++ b/man/get_api_key.Rd @@ -52,7 +52,7 @@ Delphi Epidata API Registration Form. \url{https://api.delphi.cmu.edu/epidata/admin/registration_form} } \seealso{ -\code{\link[usethis:edit_r_environ]{usethis::edit_r_environ()}} to automatically edit the \code{.Renviron} -file; \code{\link[usethis:edit_r_profile]{usethis::edit_r_profile()}} to automatically edit the \code{.Rprofile} +\code{\link[usethis:edit]{usethis::edit_r_environ()}} to automatically edit the \code{.Renviron} +file; \code{\link[usethis:edit]{usethis::edit_r_profile()}} to automatically edit the \code{.Rprofile} file } From 7e2642122d36094642980ee1bf0ba556d42f8194 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:43:30 -0500 Subject: [PATCH 2/7] fetch description typo --- R/epidatacall.R | 4 ++-- man/epidata_call.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/epidatacall.R b/R/epidatacall.R index c67de901..34b6c39f 100644 --- a/R/epidatacall.R +++ b/R/epidatacall.R @@ -6,8 +6,8 @@ #' `epidata_call` objects are generated internally by endpoint functions like #' [`pub_covidcast`]; by default, they are piped directly into the `fetch` #' function to fetch and format the data. For most endpoints this will return -#' a tibble, but a few non-COVIDCAST endpoints only support will return a -#' JSON-like list instead. +#' a tibble, but a few non-COVIDCAST endpoints will return a JSON-like list +#' instead. #' #' @details #' `create_epidata_call` is the constructor for `epidata_call` objects, but you diff --git a/man/epidata_call.Rd b/man/epidata_call.Rd index dab13c9c..d0b62e73 100644 --- a/man/epidata_call.Rd +++ b/man/epidata_call.Rd @@ -41,8 +41,8 @@ fetch(epidata_call, fetch_args = fetch_args_list()) \code{epidata_call} objects are generated internally by endpoint functions like \code{\link{pub_covidcast}}; by default, they are piped directly into the \code{fetch} function to fetch and format the data. For most endpoints this will return -a tibble, but a few non-COVIDCAST endpoints only support will return a -JSON-like list instead. +a tibble, but a few non-COVIDCAST endpoints will return a JSON-like list +instead. } \details{ \code{create_epidata_call} is the constructor for \code{epidata_call} objects, but you From 910702f7c9ed73df49ffba3c49e82cd88b7fa247 Mon Sep 17 00:00:00 2001 From: nmdefries Date: Fri, 10 Nov 2023 16:45:46 +0000 Subject: [PATCH 3/7] docs: document (GHA) --- man/get_api_key.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/get_api_key.Rd b/man/get_api_key.Rd index 40774c66..18f7ae65 100644 --- a/man/get_api_key.Rd +++ b/man/get_api_key.Rd @@ -52,7 +52,7 @@ Delphi Epidata API Registration Form. \url{https://api.delphi.cmu.edu/epidata/admin/registration_form} } \seealso{ -\code{\link[usethis:edit]{usethis::edit_r_environ()}} to automatically edit the \code{.Renviron} -file; \code{\link[usethis:edit]{usethis::edit_r_profile()}} to automatically edit the \code{.Rprofile} +\code{\link[usethis:edit_r_environ]{usethis::edit_r_environ()}} to automatically edit the \code{.Renviron} +file; \code{\link[usethis:edit_r_profile]{usethis::edit_r_profile()}} to automatically edit the \code{.Rprofile} file } From 6afbb25a5db1c4adbe06ae108f1a55e1d55c04fe Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:46:12 -0500 Subject: [PATCH 4/7] make geo_values plural in arg error message --- R/endpoints.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/endpoints.R b/R/endpoints.R index c8ba2497..cb58ebcb 100644 --- a/R/endpoints.R +++ b/R/endpoints.R @@ -717,10 +717,11 @@ pub_covidcast <- function( missing(signals) || missing(time_type) || missing(geo_type) || - missing(time_values) || missing(geo_values) + missing(time_values) || + missing(geo_values) ) { stop( - "`source`, `signals`, `time_type`, `geo_type`, `time_values`, and `geo_value` are all required" + "`source`, `signals`, `time_type`, `geo_type`, `time_values`, and `geo_values` are all required" ) } From 6a2cc52a7124dd4ed2b35396de0bfd85c36230ae Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:48:56 -0500 Subject: [PATCH 5/7] update reference to old covidcast() fn --- R/covidcast.R | 2 +- man/covidcast_epidata.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/covidcast.R b/R/covidcast.R index 66263be1..32868499 100644 --- a/R/covidcast.R +++ b/R/covidcast.R @@ -127,7 +127,7 @@ print.covidcast_data_source <- function(x, ...) { #' ``` #' #' These objects can be used directly to fetch data, without requiring us to use -#' the `covidcast()` function. Simply use the `$call` attribute of the object: +#' the `pub_covidcast()` function. Simply use the `$call` attribute of the object: #' #' ```{r} #' epidata$signals$`fb-survey:smoothed_cli`$call("state", "pa", diff --git a/man/covidcast_epidata.Rd b/man/covidcast_epidata.Rd index 2ab9fd75..2ca1d0cf 100644 --- a/man/covidcast_epidata.Rd +++ b/man/covidcast_epidata.Rd @@ -56,7 +56,7 @@ to access them we rely on the backtick operator: }\if{html}{\out{}} These objects can be used directly to fetch data, without requiring us to use -the \code{covidcast()} function. Simply use the \verb{$call} attribute of the object: +the \code{pub_covidcast()} function. Simply use the \verb{$call} attribute of the object: \if{html}{\out{
}}\preformatted{epidata$signals$`fb-survey:smoothed_cli`$call("state", "pa", epirange(20210405, 20210410)) From ab97ca4d7ab388e3fc9e5271d4de5cab2e11e9ce Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 10 Nov 2023 18:21:26 -0500 Subject: [PATCH 6/7] make new signal discover fn ref section --- _pkgdown.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 3dd28794..0dc0e230 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -37,10 +37,14 @@ reference: desc: Set API keys and handle API data types - contents: - get_api_key - - avail_endpoints - epirange - timeset - - title: Control Caching behavior + - title: Data source and signal discovery + desc: Quickly explore endpoints, and API signal and source names + - contents: + - avail_endpoints + - covidcast_epidata + - title: Control caching behavior desc: Configure an optional persistent cache - contents: - set_cache @@ -58,7 +62,3 @@ reference: desc: These endpoints require additional authorization to use - contents: - starts_with("pvt_") - - title: Autocomplete helpers - desc: Objects that can autocomplete API signals names for faster exploration - - contents: - - covidcast_epidata From 6820111b6d327982dd6dc8c9037e2dc29e7e1d94 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:11:43 -0500 Subject: [PATCH 7/7] move endpoints and data discovery higher in fn ref list --- _pkgdown.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 0dc0e230..e7307e8d 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -33,17 +33,24 @@ home: href: https://cmu-delphi.github.io/epidatasets/ reference: + - title: Data source and signal discovery + desc: Quickly explore endpoints, and API signal and source names + - contents: + - avail_endpoints + - covidcast_epidata + - title: Make API requests + desc: Query Delphi Epidata endpoints + - contents: + - epidata_call + - fetch_args_list + - has_keyword("endpoint") + - -starts_with("pvt_") - title: Configuration and utilities desc: Set API keys and handle API data types - contents: - get_api_key - epirange - timeset - - title: Data source and signal discovery - desc: Quickly explore endpoints, and API signal and source names - - contents: - - avail_endpoints - - covidcast_epidata - title: Control caching behavior desc: Configure an optional persistent cache - contents: @@ -51,13 +58,6 @@ reference: - clear_cache - disable_cache - cache_info - - title: Make API requests - desc: Query Delphi Epidata endpoints - - contents: - - epidata_call - - fetch_args_list - - has_keyword("endpoint") - - -starts_with("pvt_") - title: Make requests to private API endpoints desc: These endpoints require additional authorization to use - contents: