dcfemtech / hackforgood-waba-map

DCFemTech Hack for Good 2016 - WABA Bike Map Project
MIT License
10 stars 9 forks source link

Isochrone (travel time) - long term upgrade #63

Open NealHumphrey opened 7 years ago

NealHumphrey commented 7 years ago

Phase 2 (or 3) of this project could use actual streets/directions/travel time to create the buffers rather than crow-fly distances. Creating issue now to have a place to save reference info.

Several working examples: https://wiki.openstreetmap.org/wiki/Isochrone http://www.opentripplanner.org/

alulsh commented 7 years ago

This would be a great question for Nelle from WABA! Not sure if WABA wants to visualize 1 mile as the crow flies or 1 mile in terms of actual biking distance when routed.

Either way, this could also make for an interesting comparison visualization - 1 mile as the crow flies vs. 1 mile in actual biking distance.

alulsh commented 7 years ago

@nellepierson - now that you are on GitHub, what do you think of this issue?

WABA-Comms commented 7 years ago

All about this. I'm pretty confident when it comes to biking, but I'll never be able to travel as the crow flies. So yes, if it's possible, if there's human power behind this upgrade, I'm all about making our representation of access more accurate. Thanks for raising this, @NealHumphrey!

NealHumphrey commented 7 years ago

The opentripplanner is made in Java, but it looks like it would be pretty good for doing this as a one-time analysis and it shouldn't be very hard to learn. You can just download the executable and run it from the command line: http://opentripplanner.readthedocs.io/en/latest/Basic-Usage/

For using Mapbox directly, the duration matrix of the distance API looks like the best bet. Unfortunately it only returns travel time (although you can do it for a biking-optimized route!), so there would need to be an assumption to back calculate approximate distance. The option that provides distance is the Directions API, but it only works for 2 points at a time instead of a matrix of 100, and has some rate limits.

This is definitely not an optimized procedure for this. But, it would get the job done and isn't too hard to code. At a minimum, it can provide a starting point for thinking about a better optimized method.

The lanes:

'Destination' points:

Travel time (distance)

That'll give you all the buffers you need for travel times under 1 mile, since the calculation would produce travel times for everything less as well - and you'll only ever need to do it once.