Skip to content

Update STATUS page #791

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 6 commits into from
Jun 16, 2025
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: 1 addition & 1 deletion R/dataRetrievals-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ NULL
#' US County Code Lookup Table
#'
#' Classic lookup table for counties. Has been replaced in functions with
#' `check_USGS_waterdata_params("counties")`.
#' `check_waterdata_sample_params("counties")`.
#'
#' @name countyCd
#' @return countyCd data frame.
Expand Down
19 changes: 14 additions & 5 deletions R/read_waterdata_samples.R
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ check_waterdata_sample_params <- function(service = "characteristicgroup",
check_group_req <- httr2::req_url_query(check_group_req,
!!!params)
}


message("GET: ", check_group_req$url)

check_group <- httr2::req_perform(check_group_req) |>
httr2::resp_body_string() |>
jsonlite::fromJSON()
Expand All @@ -385,6 +387,9 @@ check_waterdata_sample_params <- function(service = "characteristicgroup",
#' Possible values include "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
#' "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua",
#' "America/Phoenix", and "America/Metlakatla"
#' @param convertType logical, defaults to \code{TRUE}. If \code{TRUE}, the function
#' will convert the data to dates, datetimes,
#' numerics based on a standard algorithm. If false, everything is returned as a character.
#' @export
#' @rdname read_waterdata_samples
#' @examplesIf is_dataRetrieval_user()
Expand Down Expand Up @@ -429,7 +434,8 @@ read_waterdata_samples <- function(monitoringLocationIdentifier = NA,
pointLocationWithinMiles = NA,
dataType = "results",
dataProfile = NA,
tz = "UTC"){
tz = "UTC",
convertType = TRUE){

request_url <- construct_waterdata_sample_request(monitoringLocationIdentifier = monitoringLocationIdentifier,
siteTypeCode = siteTypeCode,
Expand All @@ -454,7 +460,8 @@ read_waterdata_samples <- function(monitoringLocationIdentifier = NA,
dataType = dataType,
dataProfile = dataProfile)

df <- importWQP(request_url, tz = tz)

df <- importWQP(request_url, tz = tz, convertType = convertType)
attr(df, "url") <- request_url$url
attr(df, "queryTime") <- Sys.time()
return(df)
Expand Down Expand Up @@ -531,7 +538,8 @@ read_USGS_samples <- function(monitoringLocationIdentifier = NA,
pointLocationWithinMiles = NA,
dataType = "results",
dataProfile = NA,
tz = "UTC"){
tz = "UTC",
convertType = TRUE){

.Deprecated(new = "read_waterdata_samples",
package = "dataRetrieval",
Expand Down Expand Up @@ -560,7 +568,8 @@ read_USGS_samples <- function(monitoringLocationIdentifier = NA,
pointLocationWithinMiles = pointLocationWithinMiles,
dataType = dataType,
dataProfile = dataProfile,
tz = tz)
tz = tz,
convertType = convertType)
}


Expand Down
2 changes: 1 addition & 1 deletion man/countyCd.Rd

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

10 changes: 8 additions & 2 deletions man/read_waterdata_samples.Rd

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

2 changes: 1 addition & 1 deletion vignettes/Status.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ df <- data.frame(
"read_waterdata",
rep("", 10)
),
"Available on (branch)" = c("main (CRAN)", "develop", "develop", "develop", "develop", rep("", 10))
"Available on (branch)" = c("main (CRAN)", "main (CRAN)", "main (CRAN)", "main (CRAN)", "main (CRAN)", rep("", 10))
)

knitr::kable(df, col.names = c("WaterServices (legacy) function", "Water Data (new) function", "Available on (branch name)"))
Expand Down
2 changes: 1 addition & 1 deletion vignettes/dataRetrieval.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ siteINFO <- read_waterdata_monitoring_location(siteNumbers)
```

Site information is obtained from:
<https://api.waterdata.usgs.gov/ogcapi/v0/collections/monitoring-locations/items/>
<https://api.waterdata.usgs.gov/ogcapi/v0/collections/monitoring-locations>

### read_waterdata_ts_meta

Expand Down
Loading