Skip to contents

Get Autobahn roadwork details

Usage

autobahn_roadwork_details(roadwork_id, flatten = FALSE, flatten_mode = "json")

Arguments

roadwork_id

Roadwork identifier.

flatten

Logical; if TRUE, simplify nested list columns according to flatten_mode. Default FALSE keeps 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 one-row tibble for the selected roadwork with the same columns as autobahn_roadworks(). road_id is typically NA for detail calls.

Details

Returns full details for a single roadwork entry. API documentation: https://autobahn.api.bund.dev.

Examples

if (FALSE) { # \dontrun{
roads <- autobahn_roads()
roadworks <- autobahn_roadworks(roads$road_id[[1]])
autobahn_roadwork_details(roadworks$identifier[[1]])
} # }