Does Here have an API to collect annual average daily traffic on their road segments? - here-api

I am trying to construct a dataset including road links, their geometries, and information about the roads such as number of lanes, functional class, and average daily traffic. I have been unable to determine whether Here has an API to retrieve something approximating average annual daily traffic for each road link. Is it feasible to retrieve this data?
I've found an API to get general road link information which does not include traffic:
https://developer.here.com/documentation/platform-data/dev_guide/topics/quick-start-view-map-data.html
I've found an API to retrieve map tile images built from historic data (given a day of week and time of day) that shows traffic flow, but does not provide the underlying data:
https://developer.here.com/documentation/map-tile/dev_guide/topics/example-traffic.html
My desired result would be something structured as {road_link_id, annual_average_daily_traffic}, so that I can connect the link with other associated information.

The HERE Traffic API is what you are looking for. It offers:
Traffic Incident Data - provides aggregated information about traffic incidents in XML or JSON, including the type and location of each traffic incident, status, start and end time, and other relevant data. This data is useful to dynamically optimize route calculations.
Traffic Flow Data - provides access to real-time traffic flow data in XML or JSON, including information on speed and congestion for the region(s) defined in each request. The API can also deliver additional data such as the geometry of the road segments in relation to the flow.
Traffic Flow Availability - allows client applications to access traffic flow information (excluding incidents) in an area, if available.
Traffic Map Tile Overlays (Traffic Tiles) - delivers pre-rendered map tile overlays with traffic information that you can readily display with your mapping application. You can request map tiles that show traffic data for a specific area.
See documentation: https://developer.here.com/documentation/traffic/dev_guide/topics/what-is.html

Related

create visualization in Kibana of a geographical map with heat map showing latitude/longitude of transactions

I have an application that handles payment network transactions (from MasterCard via a third party issuer processor). For an approved auth we're able to ascertain (via a separate third party) the latitude and longitude of the merchant store where the transaction was initiated.
I'm logging the latitude and longitude to the stdout as follows:
Latitude: {latitude}
Longitude: {longitude}
Logs like this (and may others) get propagated through to ElasticSearch (in Elastic Cloud).
Using the latitude/longitude; how would I go about creating a visualization (in Kibana) of a geographical map with a heat map overlay that shows where the all transactions are coming from?
I'm thinking something like this (which is just an image from Google images):
or:
Ideally as you scroll in, the heat map precision would also get more detailed.
FWIW I have complete control over the log message in the source app, as well as various components in the telemetry pipeline where I could preform transformations (e.g. Logstash and Elastic ingest pipelines).
The most performant solution would be to index latitude longitude data as geo_point field.
Another, less performant solution, is to create a geo_point runtime field.
Once your data is available as geo_point, you can use Maps to visualize the data on a map.

Trouble Requesting Data - Historical Traffic

I am trying to extract historical traffic data.
The documentation specified the time needs to be in the format: 2022-08-31T00:00:00-07:00 (midnight today).
My issue is that no matter what time I enter it only returns data associated with right now.
I have written a function that would extract traffic data every 15 minutes for a historical date and bounding box, however, it does not return unique data.
An example request URL is as follows:
https://traffic.ls.hereapi.com/traffic/6.2/flow.json?apiKey=#############&bbox=50.08518,-123.237232;49.447285,-123.049602&units=metric&responseattributes=shape&time=2022-08-31T00:00:00-07:00&minjamfactor=0
Could anyone assist with how exactly to extract historical traffic data for a given time?
Sorry for the inconvenience. But the current HERE traffic API V6.2/V7 provides the real-time traffic and incidents, not the historical traffic data.

How to get the city and state/country information from the HERE Traffic API?

I am using the HERE Traffic API v7 to get incident information within a radius. The response contains the street but no other easily discernible location information. Are there parameters I can add to get the city and country information?
The Traffic API v7 was designed to work with a local map, so that information (which doesn't change between traffic's every minute updates) isn't included in the API response.
You can use one of the location referencing options to map match the traffic information to your map: https://developer.here.com/documentation/traffic-api/dev_guide/topics/concepts/location-referencing.html
Depending on your use case (i.e. if you don't have a large area you are looking at), you could take the shape points location reference and then reverse geocode the coordinates: https://developer.here.com/documentation/geocoding-search-api/dev_guide/index.html

Static traffic pattern table does not exist

I am trying to find the description for the static traffic pattern table on the Here Maps website, but it keeps telling me that "The page you are looking for doesn't exist". I am wondering if the static pattern tables have been removed from Here Maps API?
Here is the link to the page I was referring to:
https://tcs.ext.here.com/pde/scontent?region=NA&release=19135&url_root=pde.api.here.com&content=TRAFFIC_PATTERN
The response to the request contains the following information blocks:
name of each layer,
each layer mapping between layers and features tile level for each
layer
https://s.fleet.ls.hereapi.com/1/doc/layer.json
?layer=LINK_ATTRIBUTE_FC3
&apiKey={YOUR_API_KEY}
TRAFFIC_PATTERN_FC1...5 Typical link speed per time of day and weekday
TRAFFIC_SIGN_FC1...5 Traffic sign info for driver alerts
TRAFFIC_SPEED_RECORD_FC1...5 Live traffic info recorded from the last days, in 15 minute resolution

How to use HERE Maps to develop custom routing algorithms?

I am trying to use HERE Maps to implement the eco-routing algorithm which we developed in our lab that requires real time traffic data as an input to the routing algorithm. So far, we were using INRIX dataset to verify our algorithms, but we decided to move to HERE Maps, and use the Traffic API to harness the power of real time traffic data.
Traffic API was very simple to use, and I managed to get the traffic data for a bounding box. It seems like that the traffic flow is passed for each TMC. My question is how to assign the traffic flow data to the links of the map using TMC. More specifically, I am wondering if there is a way to transform the TMC values to an adjacency matrix so that I can assign the traffics to each link and run my optimization algorithm over that graph? Also is it possible to overlay Open Street Maps (OSM) with the HERE Maps traffic data?
Thanks
You can associate the TMC data you get from the traffic data response to a particular link by using PDE layers LINK_TMC_FC1..5. You have look into our PDE documentation in developer site and tcs.ext.here.com/pde/maps?url_root=pde.api.here.com to see the list of layers provided.
Below is a sample PDE request for the Link TMC. Replace app id and code placeholders with actuals:
https://pde.api.here.com/1/tile.json?&layer=LINK_TMC_FC1&level=9&tilex=496&tiley=358&region=WEU&release=18131&url_root=pde.api.here.com&app_id={YOUR-APP-ID}&app_code={YOUR-APP-CODE}
For all your other questions on creating a matrix and OSM overlay, you have to write your own algorithm. There is no straight forward function provided by Here.

Resources