An interactive London Underground journey planner using Breadth-First Search with a D3.js force-directed graph visualization.
Graph algorithms are one of those things that feel abstract until you apply them to something tangible. The London Underground map is essentially a graph — stations are nodes, lines are edges — so it's a natural fit for BFS shortest-path routing.
The entire application lives in a single HTML file. I embedded the full Tube network data directly in the page — every station, every connection, every line. D3.js renders it as an interactive force-directed graph that you can zoom, pan, and click through. Select your start and destination stations, and BFS finds the shortest route, highlighting it on the map.
There's a toggle for the force-directed layout, which is fun to watch as the stations settle into position based on their connections rather than geography. The journey info panel shows the computed route with interchange details.
Zero build tooling, zero npm packages, just a single HTML file that opens in any browser. Sometimes constraints breed clarity.