Skip to content

London Underground: a diagram for every line ​

  • 17 views
  • 377 stations
  • dot layout, left to right

This is a model of the London Underground subway network: its stations, the connections between them on each line, and the districts and postcode areas the stations sit in. Every line has its own color. One project draws a single line, several lines together, or the whole map, depending on the view chosen.

The Jubilee line from Stanmore to Stratford: stations in hexagons, interchange stations as heavy circles, grouped by district and postcode area
Open the interactive diagramThe Jubilee view. It opens in a new tab, where it can be zoomed and hovered.
The Central line and the Docklands Light Railway drawn together, with the interchanges between them
Open the interactive diagramThe Central line and the DLR together, in a view of their own.
The entire London Underground with all tube lines depicted: stations in hexagons, interchange stations as heavy circles, grouped by district and postcode area.
Open the interactive diagramThe whole map of the London Underground, with all stations, interchanges, and tube lines depicted.

Data sources. The data in this example was compiled by hand from publicly available information and entered into a spreadsheet. It is not an export or a mirror of any site's data, and the sites are not affiliated with this example. Data was last checked on 25-Nov-2024 and may no longer be current. Check the sources below for the most up-to-date information.

SourceTopic
Transport for London (TfL)Tube map
Transport for London (TfL)Stations, stops & piers
Mapping LondonThe Tube Map
dannycox.me.ukStations by line
dannycox.me.ukStation List
WikipediaList of London Underground stations
doogal.co.ukLondon Stations
doogal.co.ukUK Postcodes

Key aspects ​

  • Views. A view is a named set of styles that are switched on. Every line has a style, so the Jubilee view switches on the Jubilee line's style and leaves out the rest, and Central and DLR switches on two. See Styles.

    The Styles tab: a row for each tube line, with a picture of its colored line, and a column for each view with a tick where the view uses that lineThe Styles tab in the dark theme: a row for each tube line, with a picture of its colored line, and a column for each view with a tick where the view uses that line

    The Styles tab: each style is a row and each view is a column. The ticks form a diagonal, because each line's view uses that line.

  • A title for every view. The {view} placeholder puts the name of the view being drawn on each diagram. See Placeholders.

  • Clusters. The stations are grouped by district and by postcode area, in boxes inside boxes. See Group rows into clusters.

  • Short queries. Three short SQL queries make the model from the spreadsheet: one for the connections, one for the stations and one for the title. See The SQL tab.

  • Tooltips. Including informative tooltips makes graphs easier to explore.

    Example tooltip for the Hounslow Central station

    In this example each tooltip surfaces key details directly in the SVG output:

    • Stations and Interchanges tooltips show name, neighborhood, postal area, postal code, latitude and longitude.
    • Line tooltips display the from station and to station
    • Cluster tooltips show the geographic region used for grouping.

    Tooltips appear only when the graph is published as SVG. Set the file extension to svg before pressing the Publish button on the Graphviz ribbon tab to view the interactive tooltips.

    Why tooltips matter

    Large network diagrams can be visually dense, especially when many lines and stations overlap. Tooltips provide a lightweight way to surface key details without cluttering the map. They let you explore stations, interchanges, lines, and postal regions directly in the SVG, giving you context on demand while keeping the diagram clean and readable.

Knowledge Graph ​

The Jubilee view as a Knowledge Graph: 27 stations, 17 clusters (the districts and postcode areas) and 26 connections, about 13,300 characters written compactly, or an estimated 3,600 tokens. The file lists every style with its meaning, and each station with its tooltip and its cluster, so a program can answer what the picture only shows, such as which stations on the line are interchanges (ten).

Open the viewer on its own pageRaw and tree views, search, copy and save. It opens in a new tab.

See The Knowledge Graph tab.

Download ​

Download the project

The project, the spreadsheet and the Knowledge Graph of the Jubilee view.

Download (94 KB)

If you use Graph Modeler for client work, a commercial license is needed; for learning and your own projects it is free.