Years ago I made a "real time web based traffic map" for a USDOT/MODOT project. We used traffic sensors made by 3M that sent data to a local 911 center that was also setup under the same project.
The sensors sent traffic counts every few minutes and I used that data to draw greeen/yellow/red lines of the areas covered on a road map.
http://multimedia.3m.com/mws/media/362275O/3-monitoring-traf...