library(osrm)
library(leaflet)
library(glue)Day 13 of 30DayMapChallenge: « 10 minute map » (previously).
Where can you go in 10 minutes (by car) from Les Minutes?
Data
We use {osrm} to build the isochrone. The service is based on OpenStreetMap data.
loc <- c(4.1485138, 45.8725235)
isochrone <- osrmIsochrone(loc = loc,
breaks = 10, res = 50)Easy…
Map
Easily too, and fast with {leaflet}.
isochrone |>
leaflet() |>
addTiles(attribution = glue("<a href='https://r.iresmi.net'>r.iresmi.net</a> – {Sys.Date()}. Data OSRM & <a href='https://www.openstreetmap.org/copyright'>© OpenStreetMap</a>, ODbL ; <a href='https://openstreetmap.org/fixthemap'>Fix the map</a>")) |>
addPolygons() |>
addAwesomeMarkers(lng = loc[1], lat = loc[2])In less than 10 minutes…
