Line Networks
The Line Networks service provides information about the connections between stations that belong to the various lines on the London Underground.
Each "line" has both a name and an index (ranging from 0 to 12 inclusive), as listed below:
| Line index | Name |
|---|---|
| 0 | Bakerloo |
| 1 | Central |
| 2 | Circle |
| 3 | District |
| 4 | Hammersmith & City |
| 5 | Jubilee |
| 6 | Metropolitan |
| 7 | Northern |
| 8 | Piccadilly |
| 9 | Victoria |
| 10 | Waterloo & City |
| 11 | Docklands Light Railway |
Querying this service will return the connections that belong to the network provided. The main page details a service that allows you to translate between the indexes of the lines and their names.
Querying
Query for the connections that belong to a line: https://rse-with-python.arc.ucl.ac.uk/londontube-service/line/query?line_identifier=ID.
Parameters
line_identifier: Either the name or index of a line, as per the table above. Defaults to0(Bakerloo).
Examples
https://rse-with-python.arc.ucl.ac.uk/londontube-service/line/query?line_identifier=3- fetch the connections that belong to the District line.https://rse-with-python.arc.ucl.ac.uk/londontube-service/line/query?line_identifier=Victoria- fetch the connections that belong to the Victoria line.
Return format
The service will return a .csv file without headers, each row representing a connection between two stations on the line and the travel time between them.
That is, each row has the format
station 1 index, station 2 index, time (mins)
implying that the two stations with the respective indices are directly connected by this line, and it takes time minutes to travel between them using this line.