From 7b72c40bc63058610147ca2ad11d7f4a689ded44 Mon Sep 17 00:00:00 2001 From: Jeremy Weiss Date: Mon, 8 Jul 2024 12:30:35 -0700 Subject: [PATCH] handle `datetime` format in `az_lwdaily()` --- R/az_lwdaily.R | 2 +- R/parse_params.R | 2 +- R/retrieve_data.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/az_lwdaily.R b/R/az_lwdaily.R index eb39904..bec33de 100644 --- a/R/az_lwdaily.R +++ b/R/az_lwdaily.R @@ -127,7 +127,7 @@ az_lwdaily <- function(station_id = NULL, start_date = NULL, end_date = NULL) { )) %>% dplyr::filter(.data$meta_station_id != "az99") %>% dplyr::mutate(date = lubridate::ymd(.data$date)) %>% - #######dplyr::mutate(datetime = lubridate::as_date(lubridate::ymd_hms(.data$datetime, tz = "America/Phoenix"))) %>% + dplyr::mutate(datetime = lubridate::ymd_hms(.data$datetime, tz = "America/Phoenix")) %>% # Convert NAs dplyr::mutate( dplyr::across( diff --git a/R/parse_params.R b/R/parse_params.R index ed5a2d2..4190c84 100644 --- a/R/parse_params.R +++ b/R/parse_params.R @@ -3,7 +3,7 @@ #' @param station_id character or numeric vector #' @param start start date or date time #' @param end end date or date time -#' @param hour logical; do `start` and `end` contain hours? +#' @param hour logical; is request for hourly data? #' @param real_time logical; is request for real-time data? #' #' @note If `hour = TRUE`, `start` and `end` can be character or POSIXct and diff --git a/R/retrieve_data.R b/R/retrieve_data.R index f9d584f..a166298 100644 --- a/R/retrieve_data.R +++ b/R/retrieve_data.R @@ -3,7 +3,7 @@ #' @param station_id character; in the format of "az01" #' @param start_f character; ISO formatted date time string #' @param time_interval character; ISO8601 formatted time interval string -#' @param endpoint character; one of "daily", "hourly", "hueto", or "fifteen" +#' @param endpoint character; one of "15min", "daily", "hourly", "hueto", "lw15min", or "lwdaily" #' @param print_call logical; when TRUE, prints the HTTP request to the AZMet API #' #' @return tibble