2

I am trying to find a way to get the travel time for both walking and driving for my dataset. Using ArcGIS I was able to get the liner/planar line that connects them but I do not know how to get the travel times. After days spent trying, I am switching to a more practical solution in R!

edit: I have a dataset with 2 sets of coordinates, origin and destination, where each point has its own origin (where the journey started) and a destination (where the journey ended). What I want to do is calculate the driving time and the walking time for these points.

Thank you!

M--
  • 25,431
  • 8
  • 61
  • 93
Alexvtrix
  • 21
  • 2
  • So, I have a basemap layer with just my points (origin) and my destinations. they are already linked by ID so each origin point has its own destination. What I am trying to do is get the car driving time form origin to destination and the walking time too. I hope this clarifies – Alexvtrix Jul 02 '20 at 14:39

1 Answers1

0

Google is perhaps the best API for driving distance, Googleway is an R package allowing you to compute distances

https://www.rdocumentation.org/packages/googleway/versions/2.7.1

I did the same kind of task but directly from Gsheet/Appscript then sending it back to R: https://developers.google.com/apps-script/quickstart/custom-functions

I'm not sure it answers your question but hope it help.

Tibo
  • 68
  • 1
  • 7
  • Thanks, I will check it out; I am just wondering, how did you convert your coordinates? I am assuming I need to use Long and Lat for that right? – Alexvtrix Jul 02 '20 at 15:27
  • Has I said i did it on appscript. I had a vector of adresses and google maps api handle adresses. But there is also a function to go from adress to lat / long: var geo = Maps.newGeocoder().geocode(adress).results[0].geometry.viewport.southwest.lng I believe you can reverse it if needed. I would usually not advise someone to use google and gsheet instead of R, but really... they currently have the best API for road distance. – Tibo Jul 03 '20 at 13:27
  • Thank you :) I will check it out! – Alexvtrix Jul 03 '20 at 15:22