Field story 04 · accessibility · every building in Bihar
Distance on a map is a lie; what matters is distance along roads. We stamped every building in Bihar with its true road distance to the nearest of 1,276 hospitals — the whole state, in one function call — and then asked the question a health department actually budgets around: where would one new hospital help the most?
"There's a hospital 8 km away" can mean 8 minutes or 80, depending on whether a road actually goes there. Accessibility studies that use straight-line distance systematically flatter the worst-served places. The honest version needs the real network — and the trick that makes it cheap is that one shortest-path run can start from all 1,276 hospitals at once.
Hospitals come out of OpenStreetMap. Each one snaps to its nearest road point, and those become simultaneous starting points for a single Dijkstra sweep — the flood-fill version of "how far is the nearest one", covering all 11.2 million road points in 1.4 seconds. Every building then inherits the answer of its nearest road point. For the planning question, we let each of the 15 worst-served towns audition as a new hospital, re-ran one sweep per candidate, and kept the one that cut the population-weighted distance most.
"Nearest of many" doesn't need many searches. Start the flood from everywhere at once and read off where the waves meet.
dist = dijkstra(road_graph, indices=all_hospital_nodes, min_only=True)
building_dist = dist[nearest_road_node_of_each_building] # 38M answers

Health-access studies at this scale are usually commissioned, funded, and delivered in months. The computation inside them is one graph sweep and an argmin. Knowing that changes who gets to ask the question — and how often it can be re-asked as the road network changes.