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 = Sys.time() - 60 * 60 * 24 * 7, url_only = FALSE)
aoi |
|
---|---|
from |
|
url_only | boolean, only return the generated URLs ( |
An sf
object containing the traffic incidents.
The maximum width and height of the bounding box of the input AOIs is 10 degrees.
This means that each polygon (= one row) in the AOI sf
object should fit in a 10 x 10 degree bbox.
# Provide an API Key for a HERE project set_key("<YOUR API KEY>") # All traffic incidents from the beginning of 2018 incidents <- incident( aoi = aoi, from = as.POSIXct("2018-01-01 00:00:00"), url_only = TRUE )