Learn R Programming

hereR (version 0.3.2)

traffic-defunct: HERE Traffic API: Flow and Incidents

Description

Real-time traffic flow and incident information based on the HERE 'Traffic' API in areas of interest (AOIs). The traffic flow data contains speed ("SP") and congestion (jam factor: "JF") information. Traffic incidents contain information about location, time, duration, severity, description and other details.

Usage

traffic(aoi,
  product = "flow", from = NULL, to = NULL,
  min_jam_factor = 0, url_only = FALSE
)

Arguments

aoi

sf object, Areas of Interest (POIs) of geometry type POLYGON.

product

character, traffic product of the 'Traffic API'. Supported products: "flow" and "incidents".

from

POSIXct object, datetime of the earliest traffic incidents (Note: Only takes effect if product is set to "incidents").

to

POSIXct object, datetime of the latest traffic incidents (Note: Only takes effect if product is set to "incidents").

min_jam_factor

numeric, only retrieve flow information with a jam factor greater than the value provided (Note: Only takes effect if product is set to "flow", default = 0).

url_only

boolean, only return the generated URLs (default = FALSE)?

Value

An sf object containing the requested traffic information.

References

See Also

hereR-defunct