# Module:Adjacent stations/London Underground

local x = "%1 station"  
local rs = "%1 railway station"  
local default = "%1 tube station"  
local Q_type = "<span class=\"error\">Specify a type</span>"  

local p = {  
["system title"] = "London Underground",  
["system icon"] = "",  
["station format"] = {  
default,  

-- Multi-line stations  
["Bank"] = "Bank and Monument stations",  
["Barking"] = x,  
["Blackfriars"] = x,  
["Bond Street"] = x,  
["Cannon Street"] = x,  
["Charing Cross"] = {  
default,  
["District"] = "Embankment tube station"  
},  
["Denham"] = rs,  
["Edgware Road"] = {  
"Edgware Road tube station (Circle, District and Hammersmith & City lines)",  
["Bakerloo"] = "Edgware Road tube station (Bakerloo line)"  
},  
["Ealing Broadway"] = x,  
["Farringdon"] = x,  
["Finsbury Park"] = x,  
["Hammersmith"] = {  
"Hammersmith tube station (Circle and Hammersmith & City lines)",  
["District"] = "Hammersmith tube station (District and Piccadilly lines)",  
["Piccadilly"] = "Hammersmith tube station (District and Piccadilly lines)"  
},  
["Leigh-on-Sea"] = rs,  
["Liverpool Street"] = x,  
["London Bridge"] = x,  
["Monument"] = "Bank and Monument stations",  
["Moorgate"] = x,  
["Paddington"] = {  
"Paddington tube station (Bakerloo, Circle and District lines)",  
["Hammersmith & City"] = "Paddington tube station (Circle and Hammersmith & City lines)",  
["Circle"] = {  
["section 1"] = "Paddington tube station (Circle and Hammersmith & City lines)",  
["section 6"] = "Paddington tube station (Bakerloo, Circle and District lines)"  
},  
["Metropolitan Railway"] = "Paddington tube station (Circle and Hammersmith & City lines)",  
["Great Western Railway"] = "Paddington tube station (Circle and Hammersmith & City lines)"  
},  
["Shepherd's Bush"] = {  
default,  
["Metropolitan"] = "Shepherd's Bush Market tube station",  
["London and South Western Railway"] = "Shepherd's Bush railway station (1869–1916)"  
},  
["Shoeburyness"] = rs,  
["Stratford"] = x,  
["Southend Central"] = rs,  
["Sutton"] = "Sutton railway station (London)",  
["Sutton Common"] = rs,  
["Swiss Cottage"] =  
{  
default,  
["Metropolitan"] = "Swiss Cottage tube station (1868–1940)"  
},  
["Terminals 2 & 3"] = "Heathrow Terminals 2 & 3 tube station",  
["Terminal 4"] = "Heathrow Terminal 4 tube station",  
["Tottenham Court Road"] = x,  
["West Ham"] = x,  
["Wood Green"] = {  
default,  
["Great Northern & Strand"] = "Alexandra Palace railway station"  
},  
["Wood Lane"] = {  
default,  
["Central"] = "Wood Lane tube station (Central line)",  
["Metropolitan"] = "Wood Lane tube station (Metropolitan line)"  
},  

-- Bakerloo line  
["Bushey"] = rs,  
["Carpenders Park"] = rs,  
["Harlesden"] = x,  
["Harrow & Wealdstone"] = x,  
["Hatch End"] = rs,  
["Headstone Lane"] = rs,  
["North Wembley"] = x,  
["Old Oak Common"] = rs,  
["Queen's Park"] = "Queen's Park station (England)",  
["South Kenton"] = x,  
["Stonebridge Park"] = x,  
["Victoria"] = "London Victoria station",  
["Wembley Central"] = x,  
["Whitechapel"] = x,  
["Willesden Junction"] = x,  

-- Central line  
["Greenford"] = x,  
["North Weald"] = rs,  
["Ongar"] = rs,  
["Post Office"] = "St Paul's tube station",  
["South Ruislip"] = x,  
["West Ruislip"] = x,  

-- Circle line  

-- District line  
["Gunnersbury"] = x,  
["Hanwell"] = rs,  
["Heston & Hounslow"] = "Hounslow Central tube station",  
["Hounslow Barracks"] = "Hounslow West tube station",  
["Kew Gardens"] = "Kew Gardens station (London)",  
["Langley"] = rs,  
["Morden (Village)"] = "Morden",  
["Richmond"] = "Richmond station (London)",  
["Slough"] = rs,  
["South Acton"] = "South Acton railway station (England)",  
["Southall"] = rs,  
["Upminster"] = x,  
["West Brompton"] = x,  
["West Drayton"] = rs,  
["West Ealing"] = rs,  
["Wimbledon"] = x,  
["Windsor"] = "Windsor & Eton Central railway station",  

-- Hammersmith & City line  

-- Jubilee line  
["Canada Water"] = x,  
["Canning Town"] = x,  
["Fenchurch Street"] = rs,  
["Silvertown"] = rs,  

-- Metropolitan line  
["Amersham"] = x,  
["Aylesbury"] = rs,  
["Brill"] = rs,  
["Chalfont & Latimer"] = x,  
["Chorleywood"] = x,  
["Great Missenden"] = rs,  
["Harrow-on-the-Hill"] = x,  
["Kensington (Addison Road)"] = "Kensington (Olympia) station",  
["Quainton Road"] = rs,  
["Rickmansworth"] = x,  
["Stoke Mandeville"] = rs,  
["Verney Junction"] = rs,  
["Watford High Street"] = rs,  
["Watford Junction"] = rs,  
["Wendover"] = rs,  

-- Northern line  
["Alexandra Palace"] = "Alexandra Palace railway station (1873–1954)",  
["Balham"] = x,  
["Cranley Gardens"] = rs,  
["Crouch End"] = rs,  
["Essex Road"] = rs,  
["Kentish Town"] = x,  
["Mill Hill (The Hale)"] = rs,  
["Muswell Hill"] = rs,  
["Old Street"] = x,  
["Stroud Green"] = rs,  

-- Piccadilly line  
["Dover Street"] = "Green Park tube station",  
["Heathrow Terminal 5"] = x,  
--psudo station entry for display as terminal  
["Heathrow"] = "Heathrow Airport (Terminal 4 or Terminal 5)",  

-- Victoria line  
["Blackhorse Road"] = x,  
["Highbury & Islington"] = x,  
["Seven Sisters"] = x,  
["Vauxhall"] = x,  
["Tottenham Hale"] = x,  
["Walthamstow Central"] = x,  
["Walthamstow Wood Street"] = "Wood Street railway station",  

-- Waterloo & City line  

-- Historical lines  
["Addison Road"] = "Kensington (Olympia) station",  
["Custom House"] = x,  
["Deptford Road"] = "Surrey Quays railway station",  
["Drayton Park"] = rs,  
["Gillespie Road"] = "Arsenal tube station",  
["Hammersmith (Grove Road)"] = rs,  
["Harringay"] = rs,  
["Harrow"] = {  
default,  
["Metropolitan Railway"] = "Harrow-on-the-Hill station"  
},  
["Hornsey"] = rs,  
["New Cross"] = rs,  
["New Cross Gate"] = rs,  
["Putney Bridge & Fulham"] = "Putney Bridge tube station",  
["Rotherhithe"] = rs,  
["Shadwell"] = rs,  
["St Pancras"] = rs,  
["Strand"] = "Aldwych tube station",  
["Surrey Docks"] = "Surrey Quays railway station",  
["Surrey Quays"] = rs,  
["Wapping"] = rs,  
["Woolwich Arsenal"] = x  
},  
["lines"] = {  
["_default"] = {  
["title"] = "%1 line",  
["color"] = "10069f",  
["text color"] = "ffffff"  
},  
["Bakerloo"] = {  
["color"] = "a45a2a",  
["icon"] = "",  
[" terminus"] = "Harrow & Wealdstone",  
[" terminus"] = "Elephant & Castle",  
["types"] = {  
["Stanmore"] = {  
["title"] = "Stanmore branch (1939–1979)",  
[" terminus"] = "Stanmore",  
[" terminus"] = "Elephant & Castle"  
}  
}  
},  
["Central"] = {  
["title"] = "Central line",  
["color"] = "da291c",  
["icon"] = "",  
[" terminus"] = {"Ealing Broadway", "West Ruislip"},  
[" terminus"] = {"Epping", "Hainault", "Woodford", ["via"] = "Newbury Park"},  
["types"] = {  
["Ealing Broadway"] = {  
["title"] = "Ealing Broadway branch",  
[" terminus"] = "Ealing Broadway"  
},  
["Ruislip"] = {  
["title"] = "Ruislip Branch",  
[" terminus"] = "West Ruislip"  
}  
}  
},  
["Circle"] = {  
["title"] = "Circle line",  
["color"] = "ffcd00",  
["text color"] = "10069f",  
["icon"] = "",  
["circular"] = true, --for custom links to terminus  
[" terminus"] = Q_type,  
[" terminus"] = Q_type,  
["types"] = {  
["section 1"] = {  
["title"] = "",  
[" terminus"] = "Hammersmith",  
[" terminus"] = {"Edgware Road", ["via"] = "Aldgate"}  
},  
["section 2"] = {  
["title"] = "",  
[" terminus"] = {"Hammersmith", ["via"] = "King's Cross St Pancras"},  
[" terminus"] = {"Edgware Road", ["via"] = "Victoria"}  
},  
["section 3"] = {  
["title"] = "",  
[" terminus"] = {"Edgware Road", ["via"] = "Victoria"},  
[" terminus"] = {"Hammersmith", ["via"] = "King's Cross St Pancras"}  
},  
["section 4"] = {  
["title"] = "",  
[" terminus"] = {"Edgware Road", ["via"] = "Victoria"},  
[" terminus"] = {"Hammersmith", ["via"] = "Tower Hill"}  
},  
["section 5"] = {  
["title"] = "",  
[" terminus"] = "Edgware Road",  
[" terminus"] = {"Hammersmith", ["via"] = "Tower Hill"}  
},  
["section 6"] = {  
["title"] = "",  
[" terminus"] = {"Hammersmith", ["via"] = "Tower Hill"},  
[" terminus"] = "Edgware Road"  
}  
}  
},  
["Chelsea-Hackney"] = {  
["color"] = "8cc63e",  
["text color"] = "10069f"  
},  
["District"] = {  
["color"] = "007a33",  
["icon"] = "",  
[" terminus"] = {"Wimbledon", "Richmond", "Ealing Broadway"},  
[" terminus"] = {"Upminster", "High Street Kensington", "Edgware Road"},  
["types"] = {  
["Deep"] = { --Abandoned plan  
["title"] = "Deep-level route\n(1898–1908)",  
[" terminus"] = {"Wimbledon", "Richmond", "Ealing Broadway", "Hounslow West"},  
[" terminus"] = "Mansion House"  
},  
["Ealing Broadway"] = {  
["title"] = "",  
[" terminus"] = "Ealing Broadway",  
[" terminus"] = {"Upminster", "High Street Kensington"}  
},  
["Edgware"] = {  
["title"] = "",  
[" terminus"] = "Wimbledon",  
[" terminus"] = "Edgware Road"  
},  
["Richmond"] = {  
["title"] = "",  
[" terminus"] = "Richmond",  
[" terminus"] = "Upminster"  
},  
["Upminster"] = {  
["title"] = "",  
[" terminus"] = "Upminster"  
},  
["Uxbridge"] = {  
["title"] = "(1910–1933)",  
[" terminus"] = "Uxbridge",  
[" terminus"] = "Upminster"  
},  
["West"] = {  
["title"] = "",  
[" terminus"] = {"Ealing Broadway", "Richmond"},  
[" terminus"] = {"Upminster", "High Street Kensington"}  
},  
["Wimbledon"] = {  
["title"] = "",  
[" terminus"] = "Wimbledon",  
[" terminus"] = {"Edgware Road", "Upminster"}  
}  
}  
},  
["East London"] = {  
["color"] = "ffa300",  
["text color"] = "10069f",  
["title"] = "East London line",  
[" terminus"] = "Shoreditch",  
[" terminus"] = {"New Cross", "New Cross Gate"}  
},  
["Fleet"] = {  
["color"] = "5b6770"  
},  
["Great Northern & Strand"] = {  
["title"] = "Great Northern & Strand",  
["color"] = "10069f",  
[" terminus"] = "Strand",  
[" terminus"] = "Wood Green"  
},  
["Hammersmith & City"] = {  
["color"] = "e89cae",  
["text color"] = "10069f",  
["icon"] = "",  
[" terminus"] = "Hammersmith",  
[" terminus"] = "Barking"  
},  
["Hampstead"] = {  
["title"] = "Hampstead Tube",  
["color"] = "da291c",  
[" terminus"] = {"Edgware","Archway"},  
[" terminus"] = "Kennington",  
["types"] = {  
["Edgware"] = {  
["title"] = "Edgware branch",  
[" terminus"] = "Edgware"  
},  
["Archway"] = {  
["title"] = "Archway branch",  
[" terminus"] = "Archway"  
}  
}  
},  
["Jubilee"] = {  
["color"] = "7c878e",  
["icon"] = "",  
[" terminus"] = "Stanmore",  
[" terminus"] = "Stratford",  
["types"] = {  
["phase 2"] = {  
["title"] = "Phase 2 (never constructed)",  
[" terminus"] = {"New Cross Gate", "Lewisham"}  
},  
["phase 3"] = {  
["title"] = "Phase 3 (1980) (never constructed)",  
[" terminus"] = {"Woolwich Arsenal", "Beckton"}  
}  
}  
},  
["Metropolitan"] = {  
["color"] = "840b55",  
["icon"] = "",  
[" terminus"] = {"Uxbridge", "Amersham", "Chesham", "Watford"},  
[" terminus"] = {"Baker Street", "Aldgate"},  
["types"] = {  
["1868–1939"] = {  
["title"] = "(1868–1939)",  
[" terminus"] = {"Uxbridge", "Aylesbury", "Chesham", "Watford"}  
},  
["Stanmore"] = {  
["title"] = "Stanmore branch (1932–1939)",  
[" terminus"] = "Stanmore",  
[" terminus"] = {"Baker Street", "Aldgate"}  
},  
["Two"] = {  
["title"] = "",  
[" terminus"] = {"Amersham", "Chesham"}  
},  
["Three"] = {  
["title"] = "",  
[" terminus"] = {"Amersham", "Chesham", "Watford"}  
},  
["Uxbridge"] = {  
["title"] = "Uxbridge branch",  
[" terminus"] = "Uxbridge"  
}  
}  
},  
["Northern"] = {  
["line title"] = "Northern line",  
["color"] = "000000",  
["icon"] = "",  
[" terminus"] = {"Edgware", "Mill Hill East", "High Barnet"},  
[" terminus"] = {"Battersea Power Station", "Morden"},  
["types"] = {  
["Charing Cross"] = {  
["title"] = "Charing Cross Branch",  
[" terminus"] = {"Battersea Power Station", "Morden", "Kennington"}  
},  
["Bank"] = {  
["title"] = "Bank Branch",  
[" terminus"] = "Morden"  
},  
["Edgware"] = {  
["title"] = "Edgware branch",  
[" terminus"] = "Edgware",  
[" terminus"] = {"Battersea Power Station", "Morden", "Kennington"}  
},  
["High Barnet"] = {  
["title"] = "High Barnet branch",  
[" terminus"] = {"High Barnet", "Mill Hill East"},  
[" terminus"] = {"Battersea Power Station", "Morden", "Kennington"}  
},  
["Morden"] = {  
["title"] = "Morden branch",  
[" terminus"] = {"Edgware", "High Barnet", "Mill Hill East"},  
[" terminus"] = "Morden"  
},  
["Northern Heights"] = {  
["title"] = "",  
[" terminus"] = "Bushey Heath",  
[" terminus"] = {"Morden", "Kennington"}  
},  
["Archway"] = {  
["title"] = "Archway branch",  
[" terminus"] = "Archway",  
[" terminus"] = "Kennington"  
}  
}  
},  
["Piccadilly"] = {  
["color"] = "10069f",  
["icon"] = "",  
[" terminus"] = {"Uxbridge", "Rayners Lane", "Heathrow"},  
[" terminus"] = {"Cockfosters", "Arnos Grove"},  
["types"] = {  
["Cockfosters"] = {  
["title"] = "",  
[" terminus"] = "Cockfosters"  
},  
["Heathrow"] = {  
["title"] = "Heathrow branch",  
[" terminus"] = "Heathrow"  
},  
["Uxbridge"] = {  
["title"] = "Uxbridge branch",  
[" terminus"] = {"Uxbridge", "Rayners Lane"}  
}  
}  
},  
["Victoria"] = {  
["color"] = "00a3e0",  
["icon"] = "",  
[" terminus"] = "Brixton",  
[" terminus"] = "Walthamstow Central"  
},  
["Waterloo & City"] = {  
["color"] = "6eceb2",  
["text color"] = "10069f",  
["icon"] = "",  
[" terminus"] = "Waterloo",  
[" terminus"] = "Bank"  
},  
-- Old railway lines, all out of use and using what would eventually become London Underground stations  
["District Railway"] = {  
["title"] = "District Railway",  
["note-mid"] = "(1868–1933)",  
["color"] = "007a33",  
[" terminus"] = "West Brompton",  
[" terminus"] = "Mansion House"  
},  
["London and South Western Railway"] = {  
["title"] = "London and South Western Railway",  
["note-mid"] = "(1869–1916)",  
["color"] = "CC9999",  
[" terminus"] = "Richmond",  
[" terminus"] = "West Brompton"  
},  
["Metropolitan Railway"] = {  
["title"] = "Metropolitan Railway",  
["note-mid"] = "(1877–1906)",  
["color"] = "810541",  
[" terminus"] = "Richmond",  
[" terminus"] = "Paddington"  
},  
["Great Western Railway"] = {  
["title"] = "Great Western Railway",  
["note-mid"] = "(1894–1910)",  
["color"] = "8f691e",  
[" terminus"] = "Richmond",  
[" terminus"] = "Paddington"  
},  
["Midland Railway"] = {  
["title"] = "Midland Railway",  
["note-mid"] = "(1878–1880)",  
["color"] = "DC143C",  
[" terminus"] = "St Pancras",  
[" terminus"] = "Earl's Court"  
},  
-- Colours only for backward compatiblity with LUL colour template  
["Crossrail 2"] = {  
["title"] = "Crossrail 2",  
["color"] = "e1eb5b",  
[" terminus"] = "?",  
[" terminus"] = "?"  
},  
["London Cable Car"] = {  
["title"] = "London Cable Car",  
["color"] = "c8102e",  
[" terminus"] = "?",  
[" terminus"] = "?"  
},  
["London River Services"] = {  
["title"] = "London River Services",  
["color"] = "00a3e0",  
[" terminus"] = "?",  
[" terminus"] = "?"  
}  
},  
["aliases"] = {  
["bakerloo"] = "Bakerloo",  
["brown"] = "Bakerloo",  
["central"] = "Central",  
["red"] = "Central",  
["yellow"] = "Circle",  
["circle"] = "Circle",  
["district"] = "District",  
["green"] = "District",  
["hammersmith"] = "Hammersmith & City",  
["pink"] = "Hammersmith & City",  
["jubilee"] = "Jubilee",  
["grey"] = "Jubilee",  
["magenta"] = "Metropolitan",  
["met"] = "Metropolitan",  
["metropolitan"] = "Metropolitan",  
["northern"] = "Northern",  
["north"] = "Northern",  
["black"] = "Northern",  
["piccadilly"] = "Piccadilly",  
["dark-blue"] = "Piccadilly",  
["light-blue"] = "Victoria",  
["victoria"] = "Victoria",  
["waterloo"] = "Waterloo & City",  
["turquoise"] = "Waterloo & City",  
["eal"] = "London Cable Car",  
["river"] = "London River Services"  
}  
}  

return p