| timeseries | R Documentation |
Retrieve time series for a provider
timeseries(
x,
parameter,
stations = NULL,
start_date = NULL,
end_date = NULL,
mode = c("range", "complete"),
...
)
x |
A |
parameter |
One of "water_discharge","water_level","water_temperature","water_velocity". |
stations |
Optional character vector of station IDs. |
start_date, end_date |
|
mode |
Either |
... |
Passed to provider-specific methods. |
A tibble with columns: country, provider_id, provider_name, station_id, parameter, timestamp, value, unit, quality_code, source_url.
# Offline: construct a service object (no network)
x <- hydro_service("SE_SMHI")
# Online (opt-in): one station for a short range
st <- head(stations(x)$station_id, 1)
ts <- timeseries(x, parameter = "water_discharge",
stations = st,
start_date = "2020-01-01", end_date = "2020-01-10")
head(ts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.