waterLevel: Compute a 1d water level dataset

View source: R/waterLevel.R

waterLevelR Documentation

Compute a 1d water level dataset

Description

Functions to compute 1d water level information and store it as column w of an S4 object of type WaterLevelDataFrame.

Usage

waterLevel(wldf, shiny = FALSE)

waterLevelPegelonline(wldf, shiny = FALSE)

Arguments

wldf

an object of class WaterLevelDataFrame.

shiny

logical determing whether columns (section, weight_x, weight_y) relevant for the plotShiny()-function are appended to the resulting WaterLevelDataFrame.

Details

waterLevel interpolates 1d water level along the river axis of Elbe and Rhine based on daily averaged, mostly validated gauging data stored in the internal dataset df.gauging_data. Internally stored gauging data are available from 1960-01-01 until yesterday.

waterLevelPegelonline carries out the interpolation with gauging data obtained through a REST service from https://pegelonline.wsv.de/gast/start. The gauging data from PEGELONLINE have a high temporal resolution of 15 minutes, enabling meaningful linear temporal interpolation. Since data from PEGELONLINE expire after 31 days, this function is only applicable for WaterLevelDataFrames with a time-slot set to appropriate values within the last 31 days before function call.

Value

An object of class WaterLevelDataFrame.

References

\insertRef

busch_einheitliche_2009hyd1d

\insertRef

hkv_hydrokontor_erstellung_2014hyd1d

\insertRef

bundesanstalt_fur_gewasserkunde_flys_2016hyd1d

\insertRef

wsv_pegelonline_2018hyd1d

See Also

plotShiny

Examples


# waterLevel
wldf <- WaterLevelDataFrame(river   = "Elbe",
                            time    = as.POSIXct("2016-12-21"),
                            station = seq(257, 262, 0.1))
wldf <- waterLevel(wldf)

# waterLevelPegelonline
wldf1 <- wldf
setTime(wldf1) <- Sys.time() - as.difftime(60, units = "mins")
wldf1 <- waterLevelPegelonline(wldf1)


hyd1d documentation built on April 3, 2025, 11:55 p.m.