Fetch SMARD table data
Arguments
- filter
Filter id.
- region
Region code.
- timestamp
Timestamp from indices (ms), POSIXct, or Date.
Timestamps are interpreted in the Europe/Berlin timezone.
- safe
Logical; if
TRUE(default), apply rate-limiting and cache GET responses totools::R_user_dir("bunddev", "cache").- refresh
Logical; if
TRUE, ignore cached responses and re-fetch from the API (defaultFALSE).
Value
A tibble with one row per returned value/version:
- timestamp
Timestamp in milliseconds since epoch (numeric).
- time
Timestamp as
POSIXctin Europe/Berlin.- value
Reported value (numeric).
- name
Version/series label when provided by the API (character).
Details
Returns table-style SMARD data for a single timestamp. Use
smard_indices() to obtain a valid timestamp. API documentation: https://smard.api.bund.dev.
See also
smard_indices() for timestamps and smard_timeseries() for time series.
Other SMARD:
smard_indices(),
smard_timeseries()
Examples
if (FALSE) { # \dontrun{
indices <- smard_indices(410, region = "DE", resolution = "hour")
smard_table(410, region = "DE", timestamp = indices$timestamp[[1]])
} # }