Fetch DWD nowcast warnings
Usage
dwd_warnings_nowcast(
language = c("de", "en"),
safe = TRUE,
refresh = FALSE,
flatten = FALSE,
flatten_mode = "json"
)Arguments
- language
Language code ("de" or "en").
- 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).- flatten
Logical; if
TRUE, simplify nested list columns according toflatten_mode. DefaultFALSEkeeps list columns as-is.- flatten_mode
How to handle list columns when
flatten = TRUE:"drop"Remove list columns entirely. Use when nested data is not needed.
"json"Convert each list element to a JSON string. Preserves all data in a text-queryable format. This is the default.
"unnest"Expand list columns into multiple rows via
tidyr::unnest_longer(). Warning: this can significantly increase the number of rows.
Value
A tibble with one row per warning:
- type
Warning type code (numeric).
- level
Warning severity level (numeric).
- start
Start timestamp in milliseconds (numeric).
- start_time
Parsed start time (POSIXct).
- end
End timestamp in milliseconds (numeric).
- end_time
Parsed end time (POSIXct).
- description
Warning description HTML (character).
- description_text
Warning description plain text (character).
- event
Event name (character).
- headline
Warning headline (character).
- regions
Affected regions (list-column).
- urls
Related URLs (list-column).
- is_vorabinfo
Whether this is a preliminary warning (logical).
With flatten = TRUE, the list-columns are transformed according to
flatten_mode.
Details
Retrieves nowcast weather warnings from the DWD App API. API documentation: https://dwd.api.bund.dev.