Traffic incident information from the HERE 'Traffic' API in areas of interest (AOIs). The incidents contain information about location, duration, severity, type, description and further details.
incident(aoi, from = NULL, to = NULL, url_only = FALSE)
sf
object, Areas of Interest (POIs) of geometry type POLYGON
.
POSIXct
object, start time of the earliest traffic incidents (default = NULL
).
POSIXct
object, end time of the latest traffic incidents (default = NULL
).
boolean, only return the generated URLs (default = FALSE
)?
An sf
object containing the traffic incidents.
The maximum width and height of the bounding box of the input AOIs is 1 degree.
This means that each polygon (= one row) in the AOI sf
object should fit in a 1 x 1 degree bbox.
# Provide an API Key for a HERE project
set_key("<YOUR API KEY>")
# Traffic incidents
incidents <- incident(
aoi = aoi,
url_only = TRUE
)