Learn R Programming

hyd1d (version 0.4.6)

waterLevel: 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)

Value

An object of class WaterLevelDataFrame.

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.

References

busch_einheitliche_2009hyd1d

hkv_hydrokontor_erstellung_2014hyd1d

bundesanstalt_fur_gewasserkunde_flys_2016hyd1d

wsv_pegelonline_2018hyd1d

See Also

plotShiny

Examples

Run this code
# 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)

Run the code above in your browser using DataLab