Is your area well connected by public transport? Explore the affinity between different areas of a city, based on it's public transport network: https://transit-affinity.urbanuru.in/
- Install dependencies with
pnpm install(ornpm install) - Process data with
python3 scripts/parse.py <gtfs_dir> <city_code> [<geojson_path>] [<hexagon_resolution>] - Start local dev server with
pnpm run dev(ornpm run dev) - Build site deployment assets with
pnpm run build(ornpm run build)
- Data sourced from published GTFS feeds of various transit agencies (stored in scripts/gtfs/)
- Processing of data done by scripts/parse.py
- Frontend built with SvelteKit and MapLibre
- Hosted on Cloudflare Pages
GTFS schedule data is parsed for each city, and transit stops are mapped onto a grid of H3 hexagons (and, where boundaries are available, administrative wards). For every pair of areas, an affinity score is computed from the number of daily transit trips that directly connect them, so that areas linked by more frequent direct routes score higher. Connectivity is derived by walking the ordered stop sequence of each trip and counting, for every origin area, the trips that reach each reachable destination area. Scores are color-coded from low (red) to high (green), and the routes connecting any selected pair of areas are surfaced alongside.
The source for the various GTFS datasets used:
- Bengaluru: bmtc-gtfs and bmrcl-gtfs
- Chennai: ChennaiGTFS
- Hyderabad: TGSRTC Open Data
- Pune: pmpml-gtfs
- Indian Railways: indianrailways-gtfs
- Andhra Pradesh: apsrtc-gtfs
The code is licensed under MIT. The data is available under ODbL.
Components of this repository, including code and documentation, were written with assistance from Claude AI.