Skip to content

Commit

Permalink
doc(get_*): parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dimfalk committed Dec 26, 2024
1 parent 6eed8c6 commit 9b5e286
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 45 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", 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)
Expand Down
2 changes: 1 addition & 1 deletion R/get_gauges.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Get gauge locations
#' Get gauge metadata (simplified), locations and latest measurements
#'
#' @return Sf object.
#' @export
Expand Down
5 changes: 3 additions & 2 deletions R/get_measurements.R
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 4 additions & 3 deletions R/get_meta.R
Original file line number Diff line number Diff line change
@@ -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()]
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -80,7 +80,7 @@ gauge
#> # geometry <POINT [m]>
```

### Get (extended) metadata for specific gauge
### Get (extended) metadata for selected gauges

``` r
get_meta(gauge)
Expand All @@ -91,7 +91,7 @@ get_meta(gauge)
#> # ℹ 1 more variable: level_zero <dbl>
```

### Get available measurements for specific gauge
### Get available measurements for selected gauges

``` r
# fetch water level measurements
Expand All @@ -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"
Expand Down
Binary file modified man/figures/README-unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions man/get_gauges.Rd

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

7 changes: 4 additions & 3 deletions man/get_measurements.Rd

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

9 changes: 5 additions & 4 deletions man/get_meta.Rd

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

0 comments on commit 9b5e286

Please sign in to comment.