Traffic Data Download

23 views
Skip to first unread message

Abby Smith

unread,
Jun 4, 2024, 11:42:51 PMJun 4
to 511sfbaydevel...@googlegroups.com
Hello,

I am working on a project that looks at possible EV locations in San Francisco. For this project, I would like to access general traffic data. I have an API token but I have only figured out how to download GTFS data and data for construction events/closures. Is there a way that I can download general traffic data like that which is displayed on your website(https://511.org/) in a way that I can project it onto a map?

Thank you,
Abby

Nicolas Favre-Felix

unread,
Jun 14, 2024, 11:31:42 PMJun 14
to 511sfbaydevel...@googlegroups.com, Abby Smith
Hello,

If I correctly understand what you are referring to (colored lines over the roads?), the general traffic data on the map is very likely an option that's enabled on the embedded map provided by Google Maps. This traffic intensity overlay comes directly from Google Maps – *not* from 511.
Check out the button at the top right of the map that says "Map Options": click on it to make the options menu appear, expand the Traffic section, and right-click on "Speed Lines" or any text in that area, then select "Inspect" to show the HTML.

You'll see elements like this one:

<input type="checkbox" ng-disabled="vm.googleLayers.Traffic.disabled == true" id="layer-Speed Lines" name="layer-checkboxes"
    ng-click="vm.updateTimestamp(vm.googleLayers.Traffic)" ng-change="vm.toggleLayer(vm.googleLayers.Traffic)" ng-model="vm.googleLayers.Traffic.show" ...


This checkbox is reacting to events and changing the Google Maps display options ("googleLayers.Traffic") as you click on it.
Another way to tell: if you open the "Network" tab of your browser's developer tools and flip the Speed Lines option a couple of times, you'll see requests being sent to Google Maps to fetch new map tiles that either have the green-yellow-orange road overlays or not, based on your selection.

TL;DR: This data does not come from 511, but from Google Maps. You'll have to source it from somewhere else, if it's even available anywhere.
From what I understand, Google builds these based on a number of metrics including density of cell phones (see this cool project). I don't know if they make it available through the Google Maps APIs.

Best of luck for your project,
Nicolas

--
You received this message because you are subscribed to the Google Groups "511SFBayDeveloperResources" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 511sfbaydeveloperre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/511sfbaydeveloperresources/CAFwDuN5otv%3D1PFYB0YUMtgGLfx9D45bXBEtsmO1JGmqCrJCvFw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages