Trouble Requesting Data - Historical Traffic - here-api

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.

Related

HERE traffic api - Getting historical traffic data

I would like to get a traffic data map tile for a specific time. To do this,
https://developer.here.com/documentation/map-tile/dev_guide/topics/resource-traffic-flowbasetile.html as written in the documentation, I passed the "time" parameter. however, it looks like it does not work properly.
Requested example URL:
https://1.traffic.maps.ls.hereapi.com/maptile/2.1/traffictile/newest/normal.day/13/4358/2842/512/png?apiKey=apikey&ppi=500&time=2021-08-03T16:00:00Z
The response of real time traffic data on 2021-09-21T16:31:00z. I got this result without passing time parameter at exactly this time 2021-09-21T16:31:00z.
https://1.traffic.maps.ls.hereapi.com/maptile/2.1/traffictile/newest/normal.day/13/4358/2842/512/png?apiKey={apikey}&ppi=500
The response of data when I passed the time parameter.
https://1.traffic.maps.ls.hereapi.com/maptile/2.1/traffictile/newest/normal.day/13/4358/2842/512/png?apiKey={apikey}&ppi=500&time=2021-09-21T16:31:00z
As I tested the historical data response with my already saved response(when i requested to realtime traffic data) they are not same. Historical traffic data always returns similar response with little changes but they are not right.
It even returns result for future dates like 2022. Is the API broken? It works for realtime traffic data but has problems when i specify the time.
In Here Map Tile V2, you need to pass a timestamp after 2009, as a time before the year 2009 is not supported. For rest, the historical traffic data tile works well.
To achieve your request you should not use a time before year 2009 as this is not supported.
Response with Time parameter --
https://1.traffic.maps.ls.hereapi.com/maptile/2.1/traffictile/newest/normal.day/13/4358/2842/512/png?apiKey={YOUR_API_KEY}&ppi=500&time=2021-09-13T16:00:00z
Also please check the documentation for your reference.
https://developer.here.com/documentation/map-tile/dev_guide/topics/resource-traffic-traffictile.html

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

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

HERE Traffic Incident API Call Not Displaying Accidents

I am using a HERE API call to request traffic incident data from a particular start time. Whenever I include the "type" key and specify "Accident" as the value, no response is returned. However, switching the value to "Construction" does provide a response.
Does anyone have information on how to make the API call return accident data specifically?
Here is the exact call I am using:
https://traffic.api.here.com/traffic/6.3/incidents.json?app_id={{app_id}}&app_code={{app_code}}&startTime=2017-01-01T00:00:00-05:00&type=Accident&bbox=52.5233,13.4035;52.5181,13.4159
There is no data returned as there are no “Accident” type incidents in that location. This can be seen when skipping the “type” parameter:
https://traffic.api.here.com/traffic/6.3/incidents.xml?app_id=APP_ID&app_code=APP_CODE&startTime=2017-01-01T00:00:00-05:00&bbox=52.5233,13.4035;52.5181,13.4159
Traffic Data is dynamic data. Accident can be located somewhere and disappear in a matter of minutes. We recommend to use wego.here.com to locate an accident, or Bing maps (they are all using our services and traffic data).
We were able to find one in Germany right now (should be there until 13:34 German time):
https://traffic.api.here.com/traffic/6.3/incidents.xml?app_id=app_id&app_code=app_code&startTime=2017-01-01T00:00:00-05:00&prox=51.52427,11.85887,15&type=Accident
Hope this helps! Happy Coding!

Google Map API Get Duration without traffic

I know that the durationIntraffic is depracated now.
I just cant find a way to get the duration without traffic using google api.
already tried the matrix using DrivingOptions and trafficModel but the duration and duration_in_traffic did not match the duration without traffic in Maps.Google.com
Any help on how to get the duration without traffic data using API?
Image
Duration gives average time and duration in Traffic gives time in traffic .sometimes you run googleApi at midnignt you will find duration in Traffic time is lesser than duration time means duration is not without traffic time.
According to this Google Maps API should return an element called duration as well as an element called duration_in_traffic. Duration will be time without traffic while duration_in_traffic is time with traffic conditions.
Just to set the correct expectations, you shouldn't expect the Web Services API and the Google Maps website to work in the exact same way. These are different products managed by different teams at Google. The search stack is also different, so results may differ.
The result you get in duration field is an approximation of the average travel time for the route. This takes into account average traffic conditions of the last several weeks for a time when you execute a request. That means that the duration can change during the day.
Applying the departure time and traffic_model you can add further information to your requests to get the travel time in the current traffic, this will be provided in a duration_in_traffic field.
Resuming, currently there is no way to get duration without traffic. You will get the average travel time via the API.

Can I grab historic weather data from the api?

My use case would be to send an API request in the morning, based on a lat/long.
I would hope to get back weather data that was recorded every 4 hours.
Can't find any documentation, is something like this possible?
With the existing APIs available for weather data, we are not providing any historic weather data API. However if the demand from users surge, this can be developed as we have this data available.
Please drop your request at
www.here.com/contact?cid=www.here.com_navigatyesion-company

Resources