Start a new topic

Speed data in the API

Is speed data posted anywhere in the API? It would be nice to poll the processor to get approach speed data. 


2 people like this idea

Thank you for the information!

Hey Eric (and others): As always, we much appreciate and value the requests and input. To be honest, we do not have any plans to implement this extra API because the same information is already provided by `/api/realtimedata/zone` (or same with the `.json` suffix).


I understand that you have to pull the minute of interest out of there, but once you write the piece of code to do that, you can fully automate it and not have to worry about it anymore. The current minute, according the processor, is provided via `Timestamp="2018-06-11T12:52:47.879"` (for example) which is provided for each zone. The minutes there, in this case 52, tells you the current minute and you could of course subtract 1 modulo 60 to get the previous minute.


In the event you're asking for a "rolling" 1-minute average speed, I will note that we don't currently have a plan to implement that in the realtime data either. That could be computed from historical count data, though.

Revisiting this request- is there any way you could post the speed data per zone on a last minute basis (overwriting the last value) in addition to the 60 minute array like it currently is presented? It would be so much easier to poll a single value than parse 60 values in an array. 

Just an FYI that speed data is available in the API via the "Realtime data by zone" API (`/api/realtimedata/zone`) on a per-minute basis or in the Snapshot. A value of `-1` indicates there is no data to report. A value of `0` means stopped. Values are as computed in How does GRIDSMART work with speed data article.


1 person likes this

City of Hamilton will be integration the GRIDSMART API with KITS, the City's ATMS central software later on this year. The GRIDSMART API data will be fed directly into the KITS congestion manger module as system inputs. Having the ability to access speed data through the API would be extremely helpful for our project. I agree with Eric that Speed Data should be part of the API.

Login to post a comment