Isochrones
Picking a city
How far can you walk or drive in 5, 10, 15 and 20 minutes? Click any street to start from there.
Tap or click any street to start from there. Drag to pan, scroll or pinch to zoom.
The numbers
How it works
An isochrone is a line of equal travel time. The page runs Dijkstra's algorithm from the start junction, but stops caring about any destination: it settles every junction in order of travel time, t(v), and stops once the next one is more than 20 minutes away. Walking is street length at 5 km/h; driving uses each street's speed with city traffic and the junction delays for signals, stop signs and give way, exactly as on shortest path.
To turn junction times into an area, every reachable street is sampled along its length with an interpolated time, and each sample claims the grid cells within a short walk of it (50 m walking, 100 m from a car). That gives a travel-time field T(x, y) over the city. The rings are its contours at 5, 10, 15 and 20 minutes, traced with marching squares; the area is the number of cells under each time.
All of that runs in a Web Worker: the street graph is copied to it once, and each start sends back the times, the field, the area curve and the four rings, so even a 20 minute drive across Madrid never freezes the map. If workers are unavailable the same code runs on the page instead.
Run a few cities and the area chart tells their story: a grid of streets grows like a diamond, canals and rivers bite chunks out of the rings, and a fast road throws out a long finger of reach.
One priority queue, no destination, and a whole city sorts itself by how far away it is.