I want to analyze traffic behavior in my city for a project in urban studies. I´ve been able to get some traffic information from OSM, and maps from Google, but the google traffic info is slightly better. Has anyone been able to download such information using R and the Google Maps API?
Asked
Active
Viewed 961 times
1
-
1Feel free to share what you got from OSM and how you did that. Check out the googleway package and e.g. `google_map(key = "...myapikey...") %>% add_traffic()` for adding traffic layers. However, I don't think you can export the raw data. – lukeA Mar 09 '17 at 14:47
-
1To highlight; to use the `add_traffic()` function you currently need to use [development version](https://github.com/SymbolixAU/googleway). However, I also don't think it will give you what you need. – SymbolixAU Mar 09 '17 at 21:12
-
Also see [this answer](http://stackoverflow.com/a/6245718/5977215) – SymbolixAU Mar 09 '17 at 21:15
-
Thanks! I mistakenly said traffic data when a raster image with traffic colors is enough. This should work! – supercontra Mar 10 '17 at 16:59
1 Answers
2
As you're not actually after the traffic data and just want a map of the traffic, you can use you googleway
package to do this (with a valid Google Maps API key)
library(googleway)
google_map(key = 'map_api_key') %>%
add_traffic()

SymbolixAU
- 25,502
- 4
- 67
- 139