From 38cd972a8499b36cd82fb3c645f881f70570a097 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Fri, 8 May 2026 13:47:06 -0500 Subject: [PATCH 01/12] Update pipeline --- .gitlab-ci.yml | 8 +++++--- docker/Dockerfile | 6 +----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dfcf3492..afbf6bea1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,6 @@ workflow: default: tags: - chs-shared - - dind stages: - build @@ -36,9 +35,12 @@ variables: build-image: stage: build cache: [] - image: ${DEVOPS_REGISTRY}usgs/docker:20 + tags: + - chs-shared + - dind + image: ${DEVOPS_REGISTRY}usgs/docker:29 services: - - name: ${DEVOPS_REGISTRY}usgs/docker:20-dind + - name: ${DEVOPS_REGISTRY}usgs/docker:29-dind alias: docker script: - echo ${CI_REGISTRY_PASSWORD} | docker login -u ${CI_REGISTRY_USER} --password-stdin $CI_REGISTRY diff --git a/docker/Dockerfile b/docker/Dockerfile index 93422fde0..34cf659fb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,4 @@ -FROM code.chs.usgs.gov:5001/ctek/docker/r-lang/r-base:4.5 - -# Disable the annoying bell on WSL2 -RUN sed -i 's/^# set bell-style none$/set bell-style none/' /etc/inputrc -RUN echo 'set visualbell' >> /root/.vimrc +FROM code.chs.usgs.gov:5001/ctek/docker/r-lang/r-base:4.6 # Change the name of this environment to something which pleases you, if you # so please. But the name will not be relevant for most cases, as reticulate From abc80b3ae0d205e2e61827c10a276b79ba7996fe Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Tue, 12 May 2026 10:33:45 -0500 Subject: [PATCH 02/12] Getting CRAN ready --- DESCRIPTION | 2 +- inst/CITATION | 4 ++-- tutorials/basic_slides_deck.qmd | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e7ad2af72..f9ba7fdf4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: dataRetrieval Type: Package Title: Retrieval Functions for USGS and EPA Hydrology and Water Quality Data -Version: 2.7.24.9001 +Version: 2.7.25 Authors@R: c( person("Laura", "DeCicco", role = c("aut","cre"), email = "ldecicco@usgs.gov", diff --git a/inst/CITATION b/inst/CITATION index 0a45adf0b..a77feb353 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -37,9 +37,9 @@ bibentry(bibtype = "Manual", title = "dataRetrieval: R packages for discovering and retrieving water data available from U.S. federal hydrologic web services", publisher = "U.S. Geological Survey", address="Reston, VA", - version = "2.7.24", + version = "2.7.25", institution = "U.S. Geological Survey", year = 2026, doi = "10.5066/P9X4L3GE", - textVersion = "De Cicco, L.A., Hirsch, R.M., Lorenz, D., Watkins, W.D., Johnson, M., Blodgett, D.L., Hinman, E.D., Zemmels, J., 2026, dataRetrieval: R packages for discovering and retrieving water data available from Federal hydrologic web services, v.2.7.24, doi:10.5066/P9X4L3GE" + textVersion = "De Cicco, L.A., Hirsch, R.M., Lorenz, D., Watkins, W.D., Johnson, M., Blodgett, D.L., Hinman, E.D., Zemmels, J., 2026, dataRetrieval: R packages for discovering and retrieving water data available from Federal hydrologic web services, v.2.7.25, doi:10.5066/P9X4L3GE" ) diff --git a/tutorials/basic_slides_deck.qmd b/tutorials/basic_slides_deck.qmd index 5981d5c52..a0cb6d620 100644 --- a/tutorials/basic_slides_deck.qmd +++ b/tutorials/basic_slides_deck.qmd @@ -734,8 +734,6 @@ qw_data <- read_waterdata_samples( ncol(qw_data) ``` -R generates a few POSIXct columns to combine date, time, timezone information. - ### Python ```{python} From b1bc77ddaa1a576146cd4c1743602d689f22be24 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Tue, 12 May 2026 15:03:22 -0500 Subject: [PATCH 03/12] quick updates to docs --- tutorials/basic_slides_deck.qmd | 8 +++++--- tutorials/quick_intro_deck.qmd | 2 +- vignettes/Contributing.Rmd | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/tutorials/basic_slides_deck.qmd b/tutorials/basic_slides_deck.qmd index a0cb6d620..b9a937e54 100644 --- a/tutorials/basic_slides_deck.qmd +++ b/tutorials/basic_slides_deck.qmd @@ -201,7 +201,7 @@ or ```{bash} #| echo: true #| eval: false -conda -c conda-forge install dataretrieval +conda install conda-forge::dataretrieval ``` Then each time you open Python, you'll need to load the library: @@ -1321,8 +1321,10 @@ ts_available <- read_waterdata_ts_meta(monitoring_location_id = "USGS-04183500") ### Python ```{python} -#| eval: !expr evaluate_python -ts_avail, ts_me = waterdata.get_time_series_metadata(monitoring_location_id="USGS-04183500") +#| eval: false +#| ts_avail, ts_me = waterdata.get_time_series_metadata( + monitoring_location_id="USGS-04183500" +) ``` ::: diff --git a/tutorials/quick_intro_deck.qmd b/tutorials/quick_intro_deck.qmd index f80367aa3..771b61091 100644 --- a/tutorials/quick_intro_deck.qmd +++ b/tutorials/quick_intro_deck.qmd @@ -157,7 +157,7 @@ pip install dataretrieval ```{bash} #| echo: true #| eval: false -conda -c conda-forge install dataretrieval +conda install conda-forge::dataretrieval ``` Then each time you open Python, you'll need to load the library: diff --git a/vignettes/Contributing.Rmd b/vignettes/Contributing.Rmd index 823be0d58..1c528253f 100644 --- a/vignettes/Contributing.Rmd +++ b/vignettes/Contributing.Rmd @@ -400,6 +400,31 @@ conda activate pyclass ``` The slides will use the R package `reticulate` to manage flipping back and forth between R and Python. To help `reticulate` know where Python is installed, you will need to add an envionmnental variable to your .Renviorn file "RETICULATE_PYTHON". Run `usethis::edit_r_environ()`, then add the path to your Python installation, and restart R. RStudio can render both the R and Python in the Quarto slides. However, if you want to do troubleshooting on individual code chunks, you might want to switch to Positron which allows seamless transition between R and Python consoles. +Let's say you need to update to a new version of dataretrieval: + +1. Open the Miniforge prompt + +2. Navigate to dataRetrieval directory + +3. Activate pyclass: +``` +conda activate pyclass +``` + +4. Update package: +``` +conda install conda-forge::dataretrieval +``` + +5. Restart your python session. + + +Let's say you want to update all packages. In step 4 above, run: +``` +mamba update +``` + + # References From d43ab4bcb774539a06412f86bf711aeec205b767 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Tue, 12 May 2026 15:17:49 -0500 Subject: [PATCH 04/12] updated news --- NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7daff6a98..4ea55cd3d 100644 --- a/NEWS +++ b/NEWS @@ -17,7 +17,10 @@ Because it is impossible to tell if they intended Dates or POSIX, we cannot know for sure and therefore could add incorrect filters to the query. * The "id" column that comes back from read_waterdata_fiel_meta was changed to field_measurements_series_id to match the expectation of `read_waterdata_field_measurements` - +* New argument added to read_waterdata_stats_por: "normal_type" accepts +"DOY" and "MOY" +* New argument added to read_waterdata_stats_daterange: "interval_type" accepts +"M" (month), "CY" (calendar year), and "WY" (water year). dataRetrieval 2.7.24 From 265900b9b2eb9020ff39a30d5af88fa0999c59a7 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Tue, 12 May 2026 15:26:42 -0500 Subject: [PATCH 05/12] typo --- tutorials/basic_slides_deck.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/basic_slides_deck.qmd b/tutorials/basic_slides_deck.qmd index b9a937e54..990c450a4 100644 --- a/tutorials/basic_slides_deck.qmd +++ b/tutorials/basic_slides_deck.qmd @@ -1322,7 +1322,7 @@ ts_available <- read_waterdata_ts_meta(monitoring_location_id = "USGS-04183500") ```{python} #| eval: false -#| ts_avail, ts_me = waterdata.get_time_series_metadata( +ts_avail, ts_me = waterdata.get_time_series_metadata( monitoring_location_id="USGS-04183500" ) ``` From 733ecd3299c38b896349d5b0a1e12c89237fd5b8 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Thu, 14 May 2026 11:50:43 -0500 Subject: [PATCH 06/12] ignore python stuff --- .Rbuildignore | 4 ++++ .gitignore | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.Rbuildignore b/.Rbuildignore index bb231a66a..e2018abba 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -73,3 +73,7 @@ vignettes/Reference_Lists.Rmd environment.yml ^\.positai$ ^\.claude$ +requirements.txt +^\.venv$ +.env + diff --git a/.gitignore b/.gitignore index 892ca673e..684336f1a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ vignettes/*.R /.quarto/ **/*.quarto_ipynb .positai +/.venv/ +/.env/ From d40c7d7ced37513da85f082bfb2a632372955cde Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Thu, 14 May 2026 12:10:29 -0500 Subject: [PATCH 07/12] fix warning --- man/get_nldi_sources.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/get_nldi_sources.Rd b/man/get_nldi_sources.Rd index ceabebd11..928271eff 100644 --- a/man/get_nldi_sources.Rd +++ b/man/get_nldi_sources.Rd @@ -4,7 +4,7 @@ \alias{get_nldi_sources} \title{Get current NLDI offerings} \usage{ -get_nldi_sources(url = pkg.env$nldi_base) +get_nldi_sources(url = getOption("dataRetrieval.nldi_base")) } \arguments{ \item{url}{URL for NLDI sources. Default is supplied by package environment.} From fad6db1e49f11170bc2487c75784246cdab829e6 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Thu, 14 May 2026 12:41:27 -0500 Subject: [PATCH 08/12] Fixes #892 --- R/construct_api_requests.R | 21 +++++++++++---------- R/read_waterdata_combined_meta.R | 10 ++++++++++ R/rejigger_cols.R | 6 ++++-- man/read_waterdata_combined_meta.Rd | 10 ++++++++++ 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/R/construct_api_requests.R b/R/construct_api_requests.R index c0469f64f..937f80b0f 100644 --- a/R/construct_api_requests.R +++ b/R/construct_api_requests.R @@ -67,16 +67,6 @@ construct_api_requests <- function( skipGeometry = full_list[["skipGeometry"]] ) - time_periods <- c( - "last_modified", - "datetime", - "time", - "begin", - "end", - "begin_utc", - "end_utc" - ) - full_list <- switch_arg_id( full_list, id_name = output_id, @@ -655,3 +645,14 @@ add_api_token <- function(req) { } req } + +# Treat these columns as time: +time_periods <- c( + "last_modified", + "datetime", + "time", + "begin", + "end", + "begin_utc", + "end_utc" +) diff --git a/R/read_waterdata_combined_meta.R b/R/read_waterdata_combined_meta.R index beb3f1189..f4b75db65 100644 --- a/R/read_waterdata_combined_meta.R +++ b/R/read_waterdata_combined_meta.R @@ -121,6 +121,16 @@ #' monitoring_location_id = hucs$monitoring_location_id #' ) #' +#' # Query for instantaneous nitrate data for sites in Iowa +#' ia_sites_inst <- read_waterdata_combined_meta( +#' state_name = "Iowa", +#' parameter_code = "99133", +#' statistic_id = "00011", +#' site_type = "Stream" +#' ) +#' +#' # parse individual thresholds: +#' threshold_1 <- jsonlite::fromJSON(ia_sites_inst$thresholds[1]) #' #' } read_waterdata_combined_meta <- function( diff --git a/R/rejigger_cols.R b/R/rejigger_cols.R index acde9bfeb..39f9fe422 100644 --- a/R/rejigger_cols.R +++ b/R/rejigger_cols.R @@ -71,8 +71,10 @@ cleanup_cols <- function(df, service) { } } - if ("last_modified" %in% names(df)) { - attr(df$last_modified, "tzone") <- "UTC" + for (time_period_columns in time_periods) { + if (time_period_columns %in% names(df)) { + attr(df[[time_period_columns]], "tzone") <- "UTC" + } } df diff --git a/man/read_waterdata_combined_meta.Rd b/man/read_waterdata_combined_meta.Rd index efab47c84..aaa4c309f 100644 --- a/man/read_waterdata_combined_meta.Rd +++ b/man/read_waterdata_combined_meta.Rd @@ -336,6 +336,16 @@ site_list <- read_waterdata_combined_meta( monitoring_location_id = hucs$monitoring_location_id ) +# Query for instantaneous nitrate data for sites in Iowa +ia_sites_inst <- read_waterdata_combined_meta( + state_name = "Iowa", + parameter_code = "99133", + statistic_id = "00011", + site_type = "Stream" +) + +# parse individual thresholds: +threshold_1 <- jsonlite::fromJSON(ia_sites_inst$thresholds[1]) } \dontshow{\}) # examplesIf} From 5ba4e0da2d80786045cf2a98ffa486b9c9c175e9 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Thu, 14 May 2026 15:30:17 -0500 Subject: [PATCH 09/12] Make the default for incomplete dates in peak endpoint return as character vector instead of dates --- R/read_waterdata_combined_meta.R | 12 +++++------- R/read_waterdata_peaks.R | 30 +++++++++++++++++++++++++++++ R/rejigger_cols.R | 2 +- man/read_waterdata_combined_meta.Rd | 12 +++++------- man/read_waterdata_peaks.Rd | 11 +++++++++++ 5 files changed, 52 insertions(+), 15 deletions(-) diff --git a/R/read_waterdata_combined_meta.R b/R/read_waterdata_combined_meta.R index f4b75db65..45b2b11e8 100644 --- a/R/read_waterdata_combined_meta.R +++ b/R/read_waterdata_combined_meta.R @@ -122,15 +122,13 @@ #' ) #' #' # Query for instantaneous nitrate data for sites in Iowa -#' ia_sites_inst <- read_waterdata_combined_meta( -#' state_name = "Iowa", -#' parameter_code = "99133", -#' statistic_id = "00011", -#' site_type = "Stream" +#' sites_inst <- read_waterdata_combined_meta( +#' monitoring_location_id = "USGS-05418400", +#' parameter_code = "00065" #' ) #' -#' # parse individual thresholds: -#' threshold_1 <- jsonlite::fromJSON(ia_sites_inst$thresholds[1]) +#' # parse individual thresholds lists: +#' threshold_1 <- jsonlite::fromJSON(sites_inst$thresholds[1]) #' #' } read_waterdata_combined_meta <- function( diff --git a/R/read_waterdata_peaks.R b/R/read_waterdata_peaks.R index 3837a4c9a..1720dd375 100644 --- a/R/read_waterdata_peaks.R +++ b/R/read_waterdata_peaks.R @@ -27,6 +27,11 @@ #' `r dataRetrieval:::get_properties_for_docs("peaks", "peak_id")`. #' The default (`NA`) will return all columns of the data. #' +#' @param allow_incomplete_dates Logical whether to allow incomplete dates +#' in the "time" column to be converted to date objects (`TRUE`), or whether +#' to use the available year, month, day to get a character date only using +#' known values (`FALSE`). Default is `FALSE`. If `FALSE` but all dates are +#' complete the "time" column will remain a Date object. #' @inheritParams check_arguments_api #' @inheritParams check_arguments_non_api #' @@ -45,6 +50,10 @@ #' monitoring_location_id = wi_peaks$monitoring_location_id[1], #' parameter_code = "00060") #' +#' incomplete_dates <- read_waterdata_peaks( +#' monitoring_location_id = "USGS-06334330", +#' parameter_code = "00060") +#' #' } read_waterdata_peaks <- function( monitoring_location_id = NA_character_, @@ -64,6 +73,7 @@ read_waterdata_peaks <- function( time = NA_character_, bbox = NA, ..., + allow_incomplete_dates = FALSE, convertType = getOption("dataRetrieval.convertType"), no_paging = getOption("dataRetrieval.no_paging"), chunk_size = getOption("dataRetrieval.site_chunk_size_meta"), @@ -75,7 +85,27 @@ read_waterdata_peaks <- function( rlang::check_dots_empty() args <- mget(names(formals())) + args[["allow_incomplete_dates"]] <- NULL return_list <- get_ogc_data(args, output_id, service) + if (anyNA(return_list[, c("year", "month", "day")])) { + if (allow_incomplete_dates) { + warning("Incomplete dates are included in time column.") + } else { + parse_time <- as.character(return_list$year) + parse_time[!is.na(return_list$month)] <- paste( + parse_time[!is.na(return_list$month)], + zeroPad(return_list$month[!is.na(return_list$month)], 2), + sep = "-" + ) + parse_time[!is.na(return_list$day)] <- paste( + parse_time[!is.na(return_list$day)], + zeroPad(return_list$day[!is.na(return_list$day)], 2), + sep = "-" + ) + return_list$time <- parse_time + } + } + return(return_list) } diff --git a/R/rejigger_cols.R b/R/rejigger_cols.R index 39f9fe422..70cf651b6 100644 --- a/R/rejigger_cols.R +++ b/R/rejigger_cols.R @@ -64,7 +64,7 @@ rejigger_cols <- function(df, properties, output_id) { #' cleanup_cols <- function(df, service) { if ("time" %in% names(df)) { - if (service == "daily") { + if (service %in% c("daily", "peaks")) { df$time <- as.Date(df$time) } else { attr(df$time, "tzone") <- "UTC" diff --git a/man/read_waterdata_combined_meta.Rd b/man/read_waterdata_combined_meta.Rd index aaa4c309f..1b6c786a7 100644 --- a/man/read_waterdata_combined_meta.Rd +++ b/man/read_waterdata_combined_meta.Rd @@ -337,15 +337,13 @@ site_list <- read_waterdata_combined_meta( ) # Query for instantaneous nitrate data for sites in Iowa -ia_sites_inst <- read_waterdata_combined_meta( - state_name = "Iowa", - parameter_code = "99133", - statistic_id = "00011", - site_type = "Stream" +sites_inst <- read_waterdata_combined_meta( + monitoring_location_id = "USGS-05418400", + parameter_code = "00065" ) -# parse individual thresholds: -threshold_1 <- jsonlite::fromJSON(ia_sites_inst$thresholds[1]) +# parse individual thresholds lists: +threshold_1 <- jsonlite::fromJSON(sites_inst$thresholds[1]) } \dontshow{\}) # examplesIf} diff --git a/man/read_waterdata_peaks.Rd b/man/read_waterdata_peaks.Rd index b809a24c6..f1cf80812 100644 --- a/man/read_waterdata_peaks.Rd +++ b/man/read_waterdata_peaks.Rd @@ -22,6 +22,7 @@ read_waterdata_peaks( time = NA_character_, bbox = NA, ..., + allow_incomplete_dates = FALSE, convertType = getOption("dataRetrieval.convertType"), no_paging = getOption("dataRetrieval.no_paging"), chunk_size = getOption("dataRetrieval.site_chunk_size_meta"), @@ -103,6 +104,12 @@ Southern-most latitude, Eastern-most longitude, Northern-most longitude).} \item{...}{Not used. Included to help differentiate official Water Data API arguments from more seldom used, optional dataRetrieval-specific arguments.} +\item{allow_incomplete_dates}{Logical whether to allow incomplete dates +in the "time" column to be converted to date objects (\code{TRUE}), or whether +to use the available year, month, day to get a character date only using +known values (\code{FALSE}). Default is \code{FALSE}. If \code{FALSE} but all dates are +complete the "time" column will remain a Date object.} + \item{convertType}{logical, defaults to TRUE. If \code{TRUE}, the function will convert the data to dates, any qualifiers to string vector and reorder the returned data frame.} @@ -163,6 +170,10 @@ dv_data_sf <- read_waterdata_peaks( monitoring_location_id = wi_peaks$monitoring_location_id[1], parameter_code = "00060") +incomplete_dates <- read_waterdata_peaks( + monitoring_location_id = "USGS-06334330", + parameter_code = "00060") + } \dontshow{\}) # examplesIf} } From ff73ff68df2195180830f62c0066c63f86c323c7 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Thu, 14 May 2026 16:01:10 -0500 Subject: [PATCH 10/12] fix example --- R/read_waterdata_combined_meta.R | 2 +- man/read_waterdata_combined_meta.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/read_waterdata_combined_meta.R b/R/read_waterdata_combined_meta.R index 45b2b11e8..426f96027 100644 --- a/R/read_waterdata_combined_meta.R +++ b/R/read_waterdata_combined_meta.R @@ -128,7 +128,7 @@ #' ) #' #' # parse individual thresholds lists: -#' threshold_1 <- jsonlite::fromJSON(sites_inst$thresholds[1]) +#' threshold_1 <- jsonlite::fromJSON(sites_inst$thresholds[3]) #' #' } read_waterdata_combined_meta <- function( diff --git a/man/read_waterdata_combined_meta.Rd b/man/read_waterdata_combined_meta.Rd index 1b6c786a7..163ee6ee2 100644 --- a/man/read_waterdata_combined_meta.Rd +++ b/man/read_waterdata_combined_meta.Rd @@ -343,7 +343,7 @@ sites_inst <- read_waterdata_combined_meta( ) # parse individual thresholds lists: -threshold_1 <- jsonlite::fromJSON(sites_inst$thresholds[1]) +threshold_1 <- jsonlite::fromJSON(sites_inst$thresholds[3]) } \dontshow{\}) # examplesIf} From e3b47492b1c206f86b174ff399f11d335fbdac8a Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Fri, 15 May 2026 07:44:48 -0500 Subject: [PATCH 11/12] Update R/read_waterdata_combined_meta.R Co-authored-by: Joe Zemmels (he/him) --- R/read_waterdata_combined_meta.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/read_waterdata_combined_meta.R b/R/read_waterdata_combined_meta.R index 45b2b11e8..093b36735 100644 --- a/R/read_waterdata_combined_meta.R +++ b/R/read_waterdata_combined_meta.R @@ -121,7 +121,7 @@ #' monitoring_location_id = hucs$monitoring_location_id #' ) #' -#' # Query for instantaneous nitrate data for sites in Iowa +#' # Query for instantaneous gage height data for a site in Iowa #' sites_inst <- read_waterdata_combined_meta( #' monitoring_location_id = "USGS-05418400", #' parameter_code = "00065" From a14be24e3258101425600c5296e924538a8fce5d Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Fri, 15 May 2026 08:40:36 -0500 Subject: [PATCH 12/12] Update language --- R/read_waterdata_peaks.R | 15 ++++++++++----- man/read_waterdata_combined_meta.Rd | 2 +- man/read_waterdata_peaks.Rd | 15 ++++++++++----- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/R/read_waterdata_peaks.R b/R/read_waterdata_peaks.R index 1720dd375..b647432b2 100644 --- a/R/read_waterdata_peaks.R +++ b/R/read_waterdata_peaks.R @@ -27,11 +27,16 @@ #' `r dataRetrieval:::get_properties_for_docs("peaks", "peak_id")`. #' The default (`NA`) will return all columns of the data. #' -#' @param allow_incomplete_dates Logical whether to allow incomplete dates -#' in the "time" column to be converted to date objects (`TRUE`), or whether -#' to use the available year, month, day to get a character date only using -#' known values (`FALSE`). Default is `FALSE`. If `FALSE` but all dates are -#' complete the "time" column will remain a Date object. +#' @param allow_incomplete_dates Specifically in the peaks data, exact peak dates +#' are not always known. Sometimes peaks are known just for the year, sometimes +#' they are known to the year and month, and and sometimes to the exact date. +#' This argument determines if incomplete dates + fake month/day values are +#' allowed in the "time" column so that it can be a Date object (`TRUE`), or whether +#' to use only the available year, month, day to get a character value (`FALSE`). +#' Default is `FALSE`. If set to `FALSE` but all dates are +#' complete, the "time" column will be returned as a Date object. +#' If this argument is set to `TRUE`, fake days or months are injected into the +#' "time" column. #' @inheritParams check_arguments_api #' @inheritParams check_arguments_non_api #' diff --git a/man/read_waterdata_combined_meta.Rd b/man/read_waterdata_combined_meta.Rd index 163ee6ee2..4e7a3519a 100644 --- a/man/read_waterdata_combined_meta.Rd +++ b/man/read_waterdata_combined_meta.Rd @@ -336,7 +336,7 @@ site_list <- read_waterdata_combined_meta( monitoring_location_id = hucs$monitoring_location_id ) -# Query for instantaneous nitrate data for sites in Iowa +# Query for instantaneous gage height data for a site in Iowa sites_inst <- read_waterdata_combined_meta( monitoring_location_id = "USGS-05418400", parameter_code = "00065" diff --git a/man/read_waterdata_peaks.Rd b/man/read_waterdata_peaks.Rd index f1cf80812..0009702d3 100644 --- a/man/read_waterdata_peaks.Rd +++ b/man/read_waterdata_peaks.Rd @@ -104,11 +104,16 @@ Southern-most latitude, Eastern-most longitude, Northern-most longitude).} \item{...}{Not used. Included to help differentiate official Water Data API arguments from more seldom used, optional dataRetrieval-specific arguments.} -\item{allow_incomplete_dates}{Logical whether to allow incomplete dates -in the "time" column to be converted to date objects (\code{TRUE}), or whether -to use the available year, month, day to get a character date only using -known values (\code{FALSE}). Default is \code{FALSE}. If \code{FALSE} but all dates are -complete the "time" column will remain a Date object.} +\item{allow_incomplete_dates}{Specifically in the peaks data, exact peak dates +are not always known. Sometimes peaks are known just for the year, sometimes +they are known to the year and month, and and sometimes to the exact date. +This argument determines if incomplete dates + fake month/day values are +allowed in the "time" column so that it can be a Date object (\code{TRUE}), or whether +to use only the available year, month, day to get a character value (\code{FALSE}). +Default is \code{FALSE}. If set to \code{FALSE} but all dates are +complete, the "time" column will be returned as a Date object. +If this argument is set to \code{TRUE}, fake days or months are injected into the +"time" column.} \item{convertType}{logical, defaults to TRUE. If \code{TRUE}, the function will convert the data to dates, any qualifiers to string