diff --git a/DESCRIPTION b/DESCRIPTION index 68f19ba..7d28773 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,10 @@ Package: EGLVgauges -Title: R Interface for data acquisition from pegel.eglv.de -Version: 0.2.4 +Title: Web-scraping EGLV gauge (meta-)data +Version: 0.2.5 Date: 2024-12-26 Authors@R: person("Dimitri", "Falk", , "falk.dimitri@eglv.de", role = c("aut", "cre")) -Description: Grants easy access to EGLV gauge data and metadata. +Description: Granting easy access to gauge (meta-)data published at pegel.eglv.de. License: AGPL (>= 3) Encoding: UTF-8 Roxygen: list(markdown = TRUE) diff --git a/R/get_gauges.R b/R/get_gauges.R index fa1e494..78f4121 100644 --- a/R/get_gauges.R +++ b/R/get_gauges.R @@ -1,4 +1,4 @@ -#' Get gauge locations +#' Get gauge metadata (simplified), locations and latest measurements #' #' @return Sf object. #' @export diff --git a/R/get_measurements.R b/R/get_measurements.R index f4ecb2f..6ada223 100644 --- a/R/get_measurements.R +++ b/R/get_measurements.R @@ -1,6 +1,7 @@ -#' Get water level or discharge measurements +#' Get water level or discharge measurements for selected gauges #' -#' @param x Tibble as provided by `get_gauges()`. +#' @param x Sf object containing gauges to be used for subsequent queries, +#' as provided by `get_gauges()`. #' @param discharge logical. Retrieve water level or discharge data? #' #' @return List of xts objects. diff --git a/R/get_meta.R b/R/get_meta.R index 91e36ca..8d816f6 100644 --- a/R/get_meta.R +++ b/R/get_meta.R @@ -1,8 +1,9 @@ -#' Get gauge metadata +#' Get (extended) metadata for selected gauges #' -#' @param x character. Station ID. +#' @param x Sf object containing gauges to be used for subsequent queries, +#' as provided by `get_gauges()`. #' -#' @return Tibble. +#' @return Tibble containing metadata. #' @export #' #' @seealso [get_gauges()] diff --git a/README.Rmd b/README.Rmd index 5879c3e..bcc2480 100644 --- a/README.Rmd +++ b/README.Rmd @@ -39,7 +39,7 @@ library(EGLVgauges) ## Basic examples -### Get gauge metadata and latest measurements +### Get gauge metadata, locations and latest measurements ```{r} # fetch all available gauges @@ -51,13 +51,13 @@ gauge <- gauges |> dplyr::filter(id == "10119") gauge ``` -### Get (extended) metadata for specific gauge +### Get (extended) metadata for selected gauges ```{r} get_meta(gauge) ``` -### Get available measurements for specific gauge +### Get available measurements for selected gauges ```{r} # fetch water level measurements diff --git a/README.md b/README.md index 9cdfdd1..5b70ce8 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,12 @@ and load the package via ``` r library(EGLVgauges) -#> 0.2.4 +#> 0.2.5 ``` ## Basic examples -### Get gauge metadata and latest measurements +### Get gauge metadata, locations and latest measurements ``` r # fetch all available gauges @@ -80,7 +80,7 @@ gauge #> # geometry ``` -### Get (extended) metadata for specific gauge +### Get (extended) metadata for selected gauges ``` r get_meta(gauge) @@ -91,7 +91,7 @@ get_meta(gauge) #> # ℹ 1 more variable: level_zero ``` -### Get available measurements for specific gauge +### Get available measurements for selected gauges ``` r # fetch water level measurements @@ -101,27 +101,27 @@ meas #> NOTE: set 'options(xts_check_TZ = FALSE)' to disable this warning #> This note is displayed once per session #> Wasserstand -#> 2024-10-28 17:30:00 68 -#> 2024-10-28 17:35:00 68 -#> 2024-10-28 17:40:00 68 -#> 2024-10-28 17:45:00 68 -#> 2024-10-28 17:50:00 68 -#> 2024-10-28 17:55:00 68 -#> 2024-10-28 18:00:00 68 -#> 2024-10-28 18:05:00 68 -#> 2024-10-28 18:10:00 68 -#> 2024-10-28 18:15:00 68 +#> 2024-10-28 21:20:00 68 +#> 2024-10-28 21:25:00 68 +#> 2024-10-28 21:30:00 68 +#> 2024-10-28 21:35:00 68 +#> 2024-10-28 21:40:00 68 +#> 2024-10-28 21:45:00 68 +#> 2024-10-28 21:50:00 69 +#> 2024-10-28 21:55:00 69 +#> 2024-10-28 22:00:00 69 +#> 2024-10-28 22:05:00 69 #> ... -#> 2024-12-26 16:40:00 85 -#> 2024-12-26 16:45:00 85 -#> 2024-12-26 16:50:00 85 -#> 2024-12-26 16:55:00 85 -#> 2024-12-26 17:00:00 85 -#> 2024-12-26 17:05:00 85 -#> 2024-12-26 17:10:00 85 -#> 2024-12-26 17:15:00 85 -#> 2024-12-26 17:20:00 85 -#> 2024-12-26 17:25:00 85 +#> 2024-12-26 20:30:00 85 +#> 2024-12-26 20:35:00 85 +#> 2024-12-26 20:40:00 86 +#> 2024-12-26 20:45:00 86 +#> 2024-12-26 20:50:00 86 +#> 2024-12-26 20:55:00 86 +#> 2024-12-26 21:00:00 86 +#> 2024-12-26 21:05:00 86 +#> 2024-12-26 21:10:00 86 +#> 2024-12-26 21:15:00 86 class(meas) #> [1] "xts" "zoo" diff --git a/man/figures/README-unnamed-chunk-5-1.png b/man/figures/README-unnamed-chunk-5-1.png index 36c6f87..4c78824 100644 Binary files a/man/figures/README-unnamed-chunk-5-1.png and b/man/figures/README-unnamed-chunk-5-1.png differ diff --git a/man/get_gauges.Rd b/man/get_gauges.Rd index ce90581..25ef076 100644 --- a/man/get_gauges.Rd +++ b/man/get_gauges.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/get_gauges.R \name{get_gauges} \alias{get_gauges} -\title{Get gauge locations} +\title{Get gauge metadata (simplified), locations and latest measurements} \usage{ get_gauges() } @@ -10,7 +10,7 @@ get_gauges() Sf object. } \description{ -Get gauge locations +Get gauge metadata (simplified), locations and latest measurements } \examples{ \dontrun{ diff --git a/man/get_measurements.Rd b/man/get_measurements.Rd index fb29594..f0dbb3b 100644 --- a/man/get_measurements.Rd +++ b/man/get_measurements.Rd @@ -2,12 +2,13 @@ % Please edit documentation in R/get_measurements.R \name{get_measurements} \alias{get_measurements} -\title{Get water level or discharge measurements} +\title{Get water level or discharge measurements for selected gauges} \usage{ get_measurements(x = NULL, discharge = FALSE) } \arguments{ -\item{x}{Tibble as provided by \code{get_gauges()}.} +\item{x}{Sf object containing gauges to be used for subsequent queries, +as provided by \code{get_gauges()}.} \item{discharge}{logical. Retrieve water level or discharge data?} } @@ -15,7 +16,7 @@ get_measurements(x = NULL, discharge = FALSE) List of xts objects. } \description{ -Get water level or discharge measurements +Get water level or discharge measurements for selected gauges } \examples{ \dontrun{ diff --git a/man/get_meta.Rd b/man/get_meta.Rd index e58f04b..167a746 100644 --- a/man/get_meta.Rd +++ b/man/get_meta.Rd @@ -2,18 +2,19 @@ % Please edit documentation in R/get_meta.R \name{get_meta} \alias{get_meta} -\title{Get gauge metadata} +\title{Get (extended) metadata for selected gauges} \usage{ get_meta(x = NULL) } \arguments{ -\item{x}{character. Station ID.} +\item{x}{Sf object containing gauges to be used for subsequent queries, +as provided by \code{get_gauges()}.} } \value{ -Tibble. +Tibble containing metadata. } \description{ -Get gauge metadata +Get (extended) metadata for selected gauges } \examples{ \dontrun{