traffordDataLab / leaflet.reachability

Plugin for the Leaflet JavaScript library to show areas of reachability based on time or distance for different modes of travel using the openrouteservice isochrones API.
MIT License
64 stars 7 forks source link

Connect custom data for isochrone analysis? #10

Open ArterialMapping opened 2 years ago

ArterialMapping commented 2 years ago

Hello! Really like your all's project here.

I was wondering if it was possible to customize the data sourced within the isochrones? I would like to include my own population variables, jobs, buildings, etc..?

Do you happen to know how I would go about adding my own dataset for analysis, other than the one the ORS API provides?

Thanks!

itsozz commented 2 years ago

Hi, thanks very much for getting in contact and for your interest.

It's an interesting question! My initial thought would be to perform a spatial join on each of the isochrones returned from the ORS API to your local dataset, e.g. point-in-polygon, intersection etc. This would require your local data to be a spatial dataset, i.e. have geometries. For example you could do this in R using the "leaflet.extras" package to get this plugin and the "sf" package to perform the spatial join. I'm sure there are other language/platform options!

In case it's useful, ORS have a section on their website for people to ask questions about the API. There may be some further ideas discussed there that could help.

Hope this helps, good luck with your project!