Skip to content

Instantly share code, notes, and snippets.

@chizmw
Last active August 29, 2015 14:03
Show Gist options
  • Save chizmw/5c21916eefb299048a74 to your computer and use it in GitHub Desktop.
Save chizmw/5c21916eefb299048a74 to your computer and use it in GitHub Desktop.
LUL
= LUL
:author: Chisel Wright
:twitter: @chizcw
Some intro will go here
Data mostly from: http://en.wikipedia.org/wiki/List_of_London_Underground_stations#Stations
vim search/replace:
* s!^\([a-z]\+\) \(.\+\)$!CREATE (\1:Station { name:"\2" } )!
* s!^\([a-z]\+\) \(.\+\)$!CREATE (\1)-[:ON_LINE]->(\2)!
== Sample Data Set
//hide
//setup
[source,cypher]
----
// Create lines
CREATE (bakerloo:Line { name:"Bakerloo line" } )
CREATE (central:Line { name:"Central line" } )
CREATE (circle:Line { name:"Circle line" } )
CREATE (district:Line { name:"District line" } )
CREATE (hammersmith_city:Line { name:"Hammersmith & City line" } )
CREATE (jubilee:Line { name:"Jubilee line" } )
CREATE (metropolitan:Line { name:"Metropolitan line" } )
CREATE (northern:Line { name:"Northern line" } )
CREATE (piccadilly:Line { name:"Piccadilly line" } )
CREATE (victoria:Line { name:"Victoria line" } )
CREATE (waterloo_city:Line { name:"Waterloo & City line" } )
CREATE (actontown:Station { name:"Acton Town" } )
CREATE (aldgate:Station { name:"Aldgate" } )
CREATE (aldgateeast:Station { name:"Aldgate East" } )
CREATE (alperton:Station { name:"Alperton" } )
CREATE (amersham:Station { name:"Amersham" } )
CREATE (angel:Station { name:"Angel" } )
CREATE (archway:Station { name:"Archway" } )
CREATE (arnosgrove:Station { name:"Arnos Grove" } )
CREATE (arsenal:Station { name:"Arsenal" } )
CREATE (bakerstreet:Station { name:"Baker Street" } )
CREATE (balham:Station { name:"Balham" } )
CREATE (bank:Station { name:"Bank" } )
CREATE (barbican:Station { name:"Barbican" } )
CREATE (barking:Station { name:"Barking" } )
CREATE (barkingside:Station { name:"Barkingside" } )
CREATE (baronscourt:Station { name:"Barons Court" } )
CREATE (bayswater:Station { name:"Bayswater" } )
CREATE (becontree:Station { name:"Becontree" } )
CREATE (belsizepark:Station { name:"Belsize Park" } )
CREATE (bermondsey:Station { name:"Bermondsey" } )
CREATE (bethnalgreen:Station { name:"Bethnal Green" } )
CREATE (blackfriars:Station { name:"Blackfriars" } )
CREATE (blackhorseroad:Station { name:"Blackhorse Road" } )
CREATE (bondstreet:Station { name:"Bond Street" } )
CREATE (borough:Station { name:"Borough" } )
CREATE (bostonmanor:Station { name:"Boston Manor" } )
CREATE (boundsgreen:Station { name:"Bounds Green" } )
CREATE (bowroad:Station { name:"Bow Road" } )
CREATE (brentcross:Station { name:"Brent Cross" } )
CREATE (brixton:Station { name:"Brixton" } )
CREATE (bromleybybow:Station { name:"Bromley-by-Bow" } )
CREATE (buckhursthill:Station { name:"Buckhurst Hill" } )
CREATE (burntoak:Station { name:"Burnt Oak" } )
CREATE (caledonianroad:Station { name:"Caledonian Road" } )
CREATE (camdentown:Station { name:"Camden Town" } )
CREATE (canadawater:Station { name:"Canada Water" } )
CREATE (canarywharf:Station { name:"Canary Wharf" } )
CREATE (canningtown:Station { name:"Canning Town" } )
CREATE (cannonstreet:Station { name:"Cannon Street" } )
CREATE (canonspark:Station { name:"Canons Park" } )
CREATE (chalfontlatimer:Station { name:"Chalfont & Latimer" } )
CREATE (chalkfarm:Station { name:"Chalk Farm" } )
CREATE (chancerylane:Station { name:"Chancery Lane" } )
CREATE (charingcross:Station { name:"Charing Cross" } )
CREATE (chesham:Station { name:"Chesham" } )
CREATE (chigwell:Station { name:"Chigwell" } )
CREATE (chiswickpark:Station { name:"Chiswick Park" } )
CREATE (chorleywood:Station { name:"Chorleywood" } )
CREATE (claphamcommon:Station { name:"Clapham Common" } )
CREATE (claphamnorth:Station { name:"Clapham North" } )
CREATE (claphamsouth:Station { name:"Clapham South" } )
CREATE (cockfosters:Station { name:"Cockfosters" } )
CREATE (colindale:Station { name:"Colindale" } )
CREATE (collierswood:Station { name:"Colliers Wood" } )
CREATE (coventgarden:Station { name:"Covent Garden" } )
CREATE (croxley:Station { name:"Croxley" } )
CREATE (dagenhameast:Station { name:"Dagenham East" } )
CREATE (dagenhamheathway:Station { name:"Dagenham Heathway" } )
CREATE (debden:Station { name:"Debden" } )
CREATE (dollishill:Station { name:"Dollis Hill" } )
CREATE (ealingbroadway:Station { name:"Ealing Broadway" } )
CREATE (ealingcommon:Station { name:"Ealing Common" } )
CREATE (earlscourt:Station { name:"Earl's Court" } )
CREATE (eastacton:Station { name:"East Acton" } )
CREATE (eastfinchley:Station { name:"East Finchley" } )
CREATE (eastham:Station { name:"East Ham" } )
CREATE (eastputney:Station { name:"East Putney" } )
CREATE (eastcote:Station { name:"Eastcote" } )
CREATE (edgware:Station { name:"Edgware" } )
CREATE (edgwareroad:Station { name:"Edgware Road" } )
CREATE (elephantcastle:Station { name:"Elephant & Castle" } )
CREATE (elmpark:Station { name:"Elm Park" } )
CREATE (embankment:Station { name:"Embankment" } )
CREATE (epping:Station { name:"Epping" } )
CREATE (euston:Station { name:"Euston" } )
CREATE (eustonsquare:Station { name:"Euston Square" } )
CREATE (fairlop:Station { name:"Fairlop" } )
CREATE (farringdon:Station { name:"Farringdon" } )
CREATE (finchleycentral:Station { name:"Finchley Central" } )
CREATE (finchleyroad:Station { name:"Finchley Road" } )
CREATE (finsburypark:Station { name:"Finsbury Park" } )
CREATE (fulhambroadway:Station { name:"Fulham Broadway" } )
CREATE (gantshill:Station { name:"Gants Hill" } )
CREATE (gloucesterroad:Station { name:"Gloucester Road" } )
CREATE (goldersgreen:Station { name:"Golders Green" } )
CREATE (goldhawkroad:Station { name:"Goldhawk Road" } )
CREATE (goodgestreet:Station { name:"Goodge Street" } )
CREATE (grangehill:Station { name:"Grange Hill" } )
CREATE (greatportlandstreet:Station { name:"Great Portland Street" } )
CREATE (greenford:Station { name:"Greenford" } )
CREATE (greenpark:Station { name:"Green Park" } )
CREATE (gunnersbury:Station { name:"Gunnersbury" } )
CREATE (hainault:Station { name:"Hainult" } )
CREATE (hammersmith:Station { name:"Hammersmith" } )
CREATE (hampstead:Station { name:"Hampstead" } )
CREATE (hangerlane:Station { name:"Hanger Lane" } )
CREATE (harlesden:Station { name:"Harlesden" } )
CREATE (harrowwealdstome:Station { name:"Harrow & Wealdstone" } )
CREATE (harrowonthehill:Station { name:"Harrow-on-the-Hill" } )
CREATE (hattoncross:Station { name:"Hatton Cross" } )
CREATE (heathrow123:Station { name:"Heathrow Terminals 1, 2, 3" } )
CREATE (heathrow4:Station { name:"Heathrow Terminal 4" } )
CREATE (heathrow5:Station { name:"Heathrow Terminal 5" } )
CREATE (hendoncentral:Station { name:"Hendon Central" } )
CREATE (highbarnet:Station { name:"High Barnet" } )
CREATE (highburyislington:Station { name:"Highbury & Islington" } )
CREATE (highgate:Station { name:"Highgate" } )
CREATE (highstreetkensington:Station { name:"High Street Kensington" } )
CREATE (hillingdon:Station { name:"Hillingdon" } )
CREATE (holborn:Station { name:"Holborn" } )
CREATE (hollandpark:Station { name:"Holland Park" } )
CREATE (hollowayroad:Station { name:"Holloway Road" } )
CREATE (hornchurch:Station { name:"Hornchurch" } )
CREATE (hounslowcentral:Station { name:"Hounslow Central" } )
CREATE (hounsloweast:Station { name:"Hounslow East" } )
CREATE (hounslowwest:Station { name:"Hounslow West" } )
CREATE (hydeparkcorner:Station { name:"Hyde Park Corner" } )
CREATE (ickenham:Station { name:"Ickenham" } )
CREATE (kennington:Station { name:"Kennington" } )
CREATE (kensalgreen:Station { name:"Kensal Green" } )
CREATE (kensingtonolympia:Station { name:"Kensington (Olympia)" } )
CREATE (kentishtown:Station { name:"Kentish Town" } )
CREATE (kenton:Station { name:"Kenton" } )
CREATE (kewgardens:Station { name:"Kew Gardens" } )
CREATE (kilburn:Station { name:"Kilburn" } )
CREATE (kilburnpark:Station { name:"Kilburn Park" } )
CREATE (kingsbury:Station { name:"Kingsbury" } )
CREATE (kingscrossstpancras:Station { name:"King's Cross St. Pancras" } )
CREATE (knightsbridge:Station { name:"Knightsbridge" } )
CREATE (ladbrokegrove:Station { name:"Ladbroke Grove" } )
CREATE (lambethnorth:Station { name:"Lambeth North" } )
CREATE (lancastergate:Station { name:"Lancaster Gate" } )
CREATE (latimerroad:Station { name:"Latimer Road" } )
CREATE (leicestersquare:Station { name:"Leicester Square" } )
CREATE (leyton:Station { name:"Leyton" } )
CREATE (leytonstone:Station { name:"Leytonstone" } )
CREATE (liverpoolstreet:Station { name:"Liverpool Street" } )
CREATE (londonbridge:Station { name:"London Bridge" } )
CREATE (loughton:Station { name:"Loughton" } )
CREATE (maidavale:Station { name:"Maida Vale" } )
CREATE (manorhouse:Station { name:"Manor House" } )
CREATE (mansionhouse:Station { name:"Mansion House" } )
CREATE (marblearch:Station { name:"Marble Arch" } )
CREATE (marylebone:Station { name:"Marylebone" } )
CREATE (mileend:Station { name:"Mile End" } )
CREATE (millhilleast:Station { name:"Millo Hill East" } )
CREATE (monument:Station { name:"Monument" } )
CREATE (moorgate:Station { name:"Moorgate" } )
CREATE (moorpark:Station { name:"Moor Park" } )
CREATE (morden:Station { name:"Morden" } )
CREATE (morningtoncrescent:Station { name:"Mornington Crescent" } )
CREATE (neasden:Station { name:"Neasden" } )
CREATE (newburypark:Station { name:"Newbury Park" } )
CREATE (northacton:Station { name:"North Acton" } )
CREATE (northealing:Station { name:"North Ealing" } )
CREATE (northgreenwich:Station { name:"North Greenwich" } )
CREATE (northharrow:Station { name:"North Harrow" } )
CREATE (northwembley:Station { name:"North Wembley" } )
CREATE (northfields:Station { name:"Northfields" } )
CREATE (northolt:Station { name:"Northolt" } )
CREATE (northwickpark:Station { name:"Northwick Park" } )
CREATE (northwood:Station { name:"Northwood" } )
CREATE (northwoodhills:Station { name:"Northwood Hills" } )
CREATE (nottinghillgate:Station { name:"Notting Hill Gate" } )
CREATE (oakwood:Station { name:"Oakwood" } )
CREATE (oldstreet:Station { name:"Old Street" } )
CREATE (osterley:Station { name:"Osterley" } )
CREATE (oval:Station { name:"Oval" } )
CREATE (oxfordcircus:Station { name:"Oxford Circus" } )
CREATE (paddington:Station { name:"Paddington" } )
CREATE (parkroyal:Station { name:"Park Royal" } )
CREATE (parsonsgreen:Station { name:"Parsons Green" } )
CREATE (perivale:Station { name:"Perivale" } )
CREATE (piccadillycircus:Station { name:"Piccadilly Circus" } )
CREATE (pimlico:Station { name:"Pimlico" } )
CREATE (pinner:Station { name:"Pinner" } )
CREATE (plaistow:Station { name:"Plaistow" } )
CREATE (prestonroad:Station { name:"Preston Road" } )
CREATE (putneybridge:Station { name:"Putney Bridge" } )
CREATE (queenspark:Station { name:"Queen's Park" } )
CREATE (queensbury:Station { name:"Queensbury" } )
CREATE (queensway:Station { name:"Queensway" } )
CREATE (ravenscourtpark:Station { name:"Ravenscourt Park" } )
CREATE (raynerslane:Station { name:"Rayners Lane" } )
CREATE (redbridge:Station { name:"Redbridge" } )
CREATE (regentspark:Station { name:"Regent's Park" } )
CREATE (richmond:Station { name:"Richmond" } )
CREATE (rickmansworth:Station { name:"Rickmansworth" } )
CREATE (rodingvalley:Station { name:"Roding Valley" } )
CREATE (royaloak:Station { name:"Royal Oak" } )
CREATE (ruislip:Station { name:"Ruislip" } )
CREATE (ruislipgardens:Station { name:"Ruislip Gardens" } )
CREATE (ruislipmanor:Station { name:"Ruislip Manor" } )
CREATE (russellsquare:Station { name:"Russell Square" } )
CREATE (stjamesspark:Station { name:"St. James's Park" } )
CREATE (stjohnswood:Station { name:"St. John's Wood" } )
CREATE (stpauls:Station { name:"St. Pauls" } )
CREATE (sevensisters:Station { name:"Seven Sisters" } )
CREATE (shepherdsbush:Station { name:"Shepherd's Bush" } )
CREATE (shepherdsbushmarket:Station { name:"Shepherd's Bush Market" } )
CREATE (sloanesquare:Station { name:"Sloane Square" } )
CREATE (snaresbrook:Station { name:"Snaresbrook" } )
CREATE (southealing:Station { name:"South Ealing" } )
CREATE (southharrow:Station { name:"South Harrow" } )
CREATE (southkensington:Station { name:"South Kensington" } )
CREATE (southkenton:Station { name:"South Kenton" } )
CREATE (southruislip:Station { name:"South Ruislip" } )
CREATE (southwimbledon:Station { name:"South Wimbledon" } )
CREATE (southwoodford:Station { name:"South Woodford" } )
CREATE (southfields:Station { name:"Southfields" } )
CREATE (southgate:Station { name:"Southgate" } )
CREATE (southwark:Station { name:"Southwark" } )
CREATE (stamfordbrook:Station { name:"Stamford Brook" } )
CREATE (stanmore:Station { name:"Stanmore" } )
CREATE (stepneygreen:Station { name:"Stepney Green" } )
CREATE (stockwell:Station { name:"Stockwell" } )
CREATE (stonebridgepark:Station { name:"Stonebridge Park" } )
CREATE (stratford:Station { name:"Stratford" } )
CREATE (sudburyhill:Station { name:"Sudbury Hill" } )
CREATE (sudburytown:Station { name:"Sudbury Town" } )
CREATE (swisscottage:Station { name:"Swiss Cottage" } )
CREATE (temple:Station { name:"Temple" } )
CREATE (theydonbois:Station { name:"Theydon Bois" } )
CREATE (tootingbec:Station { name:"Tooting Bec" } )
CREATE (tootingbroadway:Station { name:"Tooting Broadway" } )
CREATE (tottenhamcourtroad:Station { name:"Tottenham Court Road" } )
CREATE (tottenhamhale:Station { name:"Tottenham Hale" } )
CREATE (totteridgewhetstone:Station { name:"Totteridge & WhetstoneV" } )
CREATE (towerhill:Station { name:"Tower Hill" } )
CREATE (tufnellpark:Station { name:"Tufnell Park" } )
CREATE (turnhamgreen:Station { name:"Turhnam Green" } )
CREATE (turnpikelane:Station { name:"Turnpike Lane" } )
CREATE (upminster:Station { name:"Upminster" } )
CREATE (upminsterbridge:Station { name:"Upminster Bridge" } )
CREATE (upney:Station { name:"Upney" } )
CREATE (uptonpark:Station { name:"Upton Park" } )
CREATE (uxbridge:Station { name:"Uxbridge" } )
CREATE (vauxhall:Station { name:"Vauxhall" } )
CREATE (victoriastn:Station { name:"Victoria" } )
CREATE (walthamstowcentral:Station { name:"Walthamstow Central" } )
CREATE (wanstead:Station { name:"Wanstead" } )
CREATE (warrenstreet:Station { name:"Warren Street" } )
CREATE (warwickavenue:Station { name:"Warwick Avenue" } )
CREATE (waterloo:Station { name:"Waterloo" } )
CREATE (watford:Station { name:"Watford" } )
CREATE (wembleycentral:Station { name:"Wembley Central" } )
CREATE (wembleypark:Station { name:"Wembley Park" } )
CREATE (westacton:Station { name:"West Acton" } )
CREATE (westbrompton:Station { name:"West Brompton" } )
CREATE (westfinchley:Station { name:"West Finchley" } )
CREATE (westham:Station { name:"West Ham" } )
CREATE (westhampstead:Station { name:"West Hampstead" } )
CREATE (westharrow:Station { name:"West Harrow" } )
CREATE (westkensington:Station { name:"West Kensington" } )
CREATE (westruislip:Station { name:"West Ruislip" } )
CREATE (westbournepark:Station { name:"Westbourne Park" } )
CREATE (westminster:Station { name:"Westminster" } )
CREATE (whitecity:Station { name:"White City" } )
CREATE (whitechapel:Station { name:"Whitechapel" } )
CREATE (willesdengreen:Station { name:"Willesden Green" } )
CREATE (willesdenjunction:Station { name:"Willesden Junction" } )
CREATE (wimbledon:Station { name:"Wimbledon" } )
CREATE (wimpledonpark:Station { name:"Wimbledon Park" } )
CREATE (woodgreen:Station { name:"Wood Green" } )
CREATE (woodlane:Station { name:"Wood Lane" } )
CREATE (woodford:Station { name:"Woodford" } )
CREATE (woodsidepark:Station { name:"Woodside Park" } )
CREATE (actontown)-[:ON_LINE]->(district)
CREATE (actontown)-[:ON_LINE]->(piccadilly)
CREATE (aldgate)-[:ON_LINE]->(circle)
CREATE (aldgate)-[:ON_LINE]->(metropolitan)
CREATE (aldgateeast)-[:ON_LINE]->(district)
CREATE (aldgateeast)-[:ON_LINE]->(hammersmith_city)
CREATE (alperton)-[:ON_LINE]->(piccadilly)
CREATE (amersham)-[:ON_LINE]->(metropolitan)
CREATE (angel)-[:ON_LINE]->(northern)
CREATE (archway)-[:ON_LINE]->(northern)
CREATE (arnosgrove)-[:ON_LINE]->(piccadilly)
CREATE (arsenal)-[:ON_LINE]->(piccadilly)
CREATE (bakerstreet)-[:ON_LINE]->(metropolitan)
CREATE (bakerstreet)-[:ON_LINE]->(bakerloo)
CREATE (bakerstreet)-[:ON_LINE]->(circle)
CREATE (bakerstreet)-[:ON_LINE]->(jubilee)
CREATE (bakerstreet)-[:ON_LINE]->(hammersmith_city)
CREATE (balham)-[:ON_LINE]->(northern)
CREATE (bank)-[:ON_LINE]->(waterloo_city)
CREATE (bank)-[:ON_LINE]->(northern)
CREATE (bank)-[:ON_LINE]->(central)
CREATE (barbican)-[:ON_LINE]->(metropolitan)
CREATE (barbican)-[:ON_LINE]->(circle)
CREATE (barbican)-[:ON_LINE]->(hammersmith_city)
CREATE (barking)-[:ON_LINE]->(district)
CREATE (barking)-[:ON_LINE]->(hammersmith_city)
CREATE (barkingside)-[:ON_LINE]->(central)
CREATE (baronscourt)-[:ON_LINE]->(district)
CREATE (baronscourt)-[:ON_LINE]->(piccadilly)
CREATE (bayswater)-[:ON_LINE]->(district)
CREATE (bayswater)-[:ON_LINE]->(circle)
CREATE (becontree)-[:ON_LINE]->(district)
CREATE (belsizepark)-[:ON_LINE]->(northern)
CREATE (bermondsey)-[:ON_LINE]->(jubilee)
CREATE (bethnalgreen)-[:ON_LINE]->(central)
CREATE (blackfriars)-[:ON_LINE]->(district)
CREATE (blackfriars)-[:ON_LINE]->(circle)
CREATE (blackhorseroad)-[:ON_LINE]->(victoria)
CREATE (bondstreet)-[:ON_LINE]->(central)
CREATE (bondstreet)-[:ON_LINE]->(jubilee)
CREATE (borough)-[:ON_LINE]->(northern)
CREATE (bostonmanor)-[:ON_LINE]->(piccadilly)
CREATE (boundsgreen)-[:ON_LINE]->(piccadilly)
CREATE (bowroad)-[:ON_LINE]->(district)
CREATE (bowroad)-[:ON_LINE]->(hammersmith_city)
CREATE (brentcross)-[:ON_LINE]->(northern)
CREATE (brixton)-[:ON_LINE]->(victoria)
CREATE (bromleybybow)-[:ON_LINE]->(district)
CREATE (bromleybybow)-[:ON_LINE]->(hammersmith_city)
CREATE (buckhursthill)-[:ON_LINE]->(central)
CREATE (burntoak)-[:ON_LINE]->(northern)
CREATE (caledonianroad)-[:ON_LINE]->(piccadilly)
CREATE (camdentown)-[:ON_LINE]->(northern)
CREATE (canadawater)-[:ON_LINE]->(jubilee)
CREATE (canarywharf)-[:ON_LINE]->(jubilee)
CREATE (canningtown)-[:ON_LINE]->(jubilee)
CREATE (cannonstreet)-[:ON_LINE]->(district)
CREATE (cannonstreet)-[:ON_LINE]->(circle)
CREATE (canonspark)-[:ON_LINE]->(jubilee)
CREATE (chalfontlatimer)-[:ON_LINE]->(metropolitan)
CREATE (chalkfarm)-[:ON_LINE]->(northern)
CREATE (chancerylane)-[:ON_LINE]->(central)
CREATE (charingcross)-[:ON_LINE]->(bakerloo)
CREATE (charingcross)-[:ON_LINE]->(northern)
CREATE (chesham)-[:ON_LINE]->(metropolitan)
CREATE (chigwell)-[:ON_LINE]->(central)
CREATE (chiswickpark)-[:ON_LINE]->(district)
CREATE (chorleywood)-[:ON_LINE]->(metropolitan)
CREATE (claphamcommon)-[:ON_LINE]->(northern)
CREATE (claphamnorth)-[:ON_LINE]->(northern)
CREATE (claphamsouth)-[:ON_LINE]->(northern)
CREATE (cockfosters)-[:ON_LINE]->(piccadilly)
CREATE (colindale)-[:ON_LINE]->(northern)
CREATE (collierswood)-[:ON_LINE]->(northern)
CREATE (coventgarden)-[:ON_LINE]->(piccadilly)
CREATE (croxley)-[:ON_LINE]->(metropolitan)
CREATE (dagenhameast)-[:ON_LINE]->(district)
CREATE (dagenhamheathway)-[:ON_LINE]->(district)
CREATE (debden)-[:ON_LINE]->(central)
CREATE (dollishill)-[:ON_LINE]->(jubilee)
CREATE (ealingbroadway)-[:ON_LINE]->(district)
CREATE (ealingbroadway)-[:ON_LINE]->(central)
CREATE (ealingcommon)-[:ON_LINE]->(district)
CREATE (ealingcommon)-[:ON_LINE]->(piccadilly)
CREATE (earlscourt)-[:ON_LINE]->(district)
CREATE (earlscourt)-[:ON_LINE]->(piccadilly)
CREATE (eastacton)-[:ON_LINE]->(central)
CREATE (eastfinchley)-[:ON_LINE]->(northern)
CREATE (eastham)-[:ON_LINE]->(district)
CREATE (eastham)-[:ON_LINE]->(hammersmith_city)
CREATE (eastputney)-[:ON_LINE]->(district)
CREATE (eastcote)-[:ON_LINE]->(metropolitan)
CREATE (eastcote)-[:ON_LINE]->(piccadilly)
CREATE (edgware)-[:ON_LINE]->(northern)
CREATE (edgwareroad)-[:ON_LINE]->(bakerloo)
CREATE (edgwareroad)-[:ON_LINE]->(hammersmith_city)
CREATE (edgwareroad)-[:ON_LINE]->(district)
CREATE (edgwareroad)-[:ON_LINE]->(circle)
CREATE (elephantcastle)-[:ON_LINE]->(northern)
CREATE (elephantcastle)-[:ON_LINE]->(bakerloo)
CREATE (elmpark)-[:ON_LINE]->(district)
CREATE (embankment)-[:ON_LINE]->(district)
CREATE (embankment)-[:ON_LINE]->(bakerloo)
CREATE (embankment)-[:ON_LINE]->(northern)
CREATE (embankment)-[:ON_LINE]->(circle)
CREATE (epping)-[:ON_LINE]->(central)
CREATE (euston)-[:ON_LINE]->(northern)
CREATE (euston)-[:ON_LINE]->(victoria)
CREATE (eustonsquare)-[:ON_LINE]->(metropolitan)
CREATE (eustonsquare)-[:ON_LINE]->(circle)
CREATE (eustonsquare)-[:ON_LINE]->(hammersmith_city)
CREATE (fairlop)-[:ON_LINE]->(central)
CREATE (farringdon)-[:ON_LINE]->(metropolitan)
CREATE (farringdon)-[:ON_LINE]->(circle)
CREATE (farringdon)-[:ON_LINE]->(hammersmith_city)
CREATE (finchleycentral)-[:ON_LINE]->(northern)
CREATE (finchleyroad)-[:ON_LINE]->(metropolitan)
CREATE (finchleyroad)-[:ON_LINE]->(jubilee)
CREATE (finsburypark)-[:ON_LINE]->(piccadilly)
CREATE (finsburypark)-[:ON_LINE]->(victoria)
CREATE (fulhambroadway)-[:ON_LINE]->(district)
CREATE (gantshill)-[:ON_LINE]->(central)
CREATE (gloucesterroad)-[:ON_LINE]->(district)
CREATE (gloucesterroad)-[:ON_LINE]->(piccadilly)
CREATE (gloucesterroad)-[:ON_LINE]->(circle)
CREATE (goldersgreen)-[:ON_LINE]->(northern)
CREATE (goldhawkroad)-[:ON_LINE]->(hammersmith_city)
CREATE (goldhawkroad)-[:ON_LINE]->(circle)
CREATE (goodgestreet)-[:ON_LINE]->(northern)
CREATE (grangehill)-[:ON_LINE]->(central)
CREATE (greatportlandstreet)-[:ON_LINE]->(metropolitan)
CREATE (greatportlandstreet)-[:ON_LINE]->(circle)
CREATE (greatportlandstreet)-[:ON_LINE]->(hammersmith_city)
CREATE (greenford)-[:ON_LINE]->(central)
CREATE (greenpark)-[:ON_LINE]->(piccadilly)
CREATE (greenpark)-[:ON_LINE]->(victoria)
CREATE (greenpark)-[:ON_LINE]->(jubilee)
CREATE (gunnersbury)-[:ON_LINE]->(district)
CREATE (hainault)-[:ON_LINE]->(central)
CREATE (hammersmith)-[:ON_LINE]->(district)
CREATE (hammersmith)-[:ON_LINE]->(piccadilly)
CREATE (hammersmith)-[:ON_LINE]->(circle)
CREATE (hammersmith)-[:ON_LINE]->(hammersmith_city)
CREATE (hampstead)-[:ON_LINE]->(northern)
CREATE (hangerlane)-[:ON_LINE]->(central)
CREATE (harlesden)-[:ON_LINE]->(bakerloo)
CREATE (harrowwealdstome)-[:ON_LINE]->(bakerloo)
CREATE (harrowonthehill)-[:ON_LINE]->(metropolitan)
CREATE (hattoncross)-[:ON_LINE]->(piccadilly)
CREATE (heathrow123)-[:ON_LINE]->(piccadilly)
CREATE (heathrow4)-[:ON_LINE]->(piccadilly)
CREATE (heathrow5)-[:ON_LINE]->(piccadilly)
CREATE (hendoncentral)-[:ON_LINE]->(northern)
CREATE (highbarnet)-[:ON_LINE]->(northern)
CREATE (highburyislington)-[:ON_LINE]->(victoria)
CREATE (highgate)-[:ON_LINE]->(northern)
CREATE (highstreetkensington)-[:ON_LINE]->(district)
CREATE (highstreetkensington)-[:ON_LINE]->(circle)
CREATE (hillingdon)-[:ON_LINE]->(metropolitan)
CREATE (hillingdon)-[:ON_LINE]->(piccadilly)
CREATE (holborn)-[:ON_LINE]->(central)
CREATE (holborn)-[:ON_LINE]->(piccadilly)
CREATE (hollandpark)-[:ON_LINE]->(central)
CREATE (hollowayroad)-[:ON_LINE]->(piccadilly)
CREATE (hornchurch)-[:ON_LINE]->(district)
CREATE (hounslowcentral)-[:ON_LINE]->(piccadilly)
CREATE (hounsloweast)-[:ON_LINE]->(piccadilly)
CREATE (hounslowwest)-[:ON_LINE]->(piccadilly)
CREATE (hydeparkcorner)-[:ON_LINE]->(piccadilly)
CREATE (ickenham)-[:ON_LINE]->(metropolitan)
CREATE (ickenham)-[:ON_LINE]->(piccadilly)
CREATE (kennington)-[:ON_LINE]->(northern)
CREATE (kensalgreen)-[:ON_LINE]->(bakerloo)
CREATE (kensingtonolympia)-[:ON_LINE]->(district)
CREATE (kentishtown)-[:ON_LINE]->(northern)
CREATE (kenton)-[:ON_LINE]->(bakerloo)
CREATE (kewgardens)-[:ON_LINE]->(district)
CREATE (kilburn)-[:ON_LINE]->(jubilee)
CREATE (kilburnpark)-[:ON_LINE]->(bakerloo)
CREATE (kingsbury)-[:ON_LINE]->(jubilee)
CREATE (kingscrossstpancras)-[:ON_LINE]->(metropolitan)
CREATE (kingscrossstpancras)-[:ON_LINE]->(northern)
CREATE (kingscrossstpancras)-[:ON_LINE]->(piccadilly)
CREATE (kingscrossstpancras)-[:ON_LINE]->(circle)
CREATE (kingscrossstpancras)-[:ON_LINE]->(victoria)
CREATE (kingscrossstpancras)-[:ON_LINE]->(hammersmith_city)
CREATE (knightsbridge)-[:ON_LINE]->(piccadilly)
CREATE (ladbrokegrove)-[:ON_LINE]->(hammersmith_city)
CREATE (ladbrokegrove)-[:ON_LINE]->(circle)
CREATE (lambethnorth)-[:ON_LINE]->(bakerloo)
CREATE (lancastergate)-[:ON_LINE]->(central)
CREATE (latimerroad)-[:ON_LINE]->(hammersmith_city)
CREATE (latimerroad)-[:ON_LINE]->(circle)
CREATE (leicestersquare)-[:ON_LINE]->(piccadilly)
CREATE (leicestersquare)-[:ON_LINE]->(northern)
CREATE (leyton)-[:ON_LINE]->(central)
CREATE (leytonstone)-[:ON_LINE]->(central)
CREATE (liverpoolstreet)-[:ON_LINE]->(metropolitan)
CREATE (liverpoolstreet)-[:ON_LINE]->(central)
CREATE (liverpoolstreet)-[:ON_LINE]->(circle)
CREATE (liverpoolstreet)-[:ON_LINE]->(hammersmith_city)
CREATE (londonbridge)-[:ON_LINE]->(northern)
CREATE (londonbridge)-[:ON_LINE]->(jubilee)
CREATE (loughton)-[:ON_LINE]->(central)
CREATE (maidavale)-[:ON_LINE]->(bakerloo)
CREATE (manorhouse)-[:ON_LINE]->(piccadilly)
CREATE (mansionhouse)-[:ON_LINE]->(district)
CREATE (mansionhouse)-[:ON_LINE]->(circle)
CREATE (marblearch)-[:ON_LINE]->(central)
CREATE (marylebone)-[:ON_LINE]->(bakerloo)
CREATE (mileend)-[:ON_LINE]->(district)
CREATE (mileend)-[:ON_LINE]->(hammersmith_city)
CREATE (mileend)-[:ON_LINE]->(central)
CREATE (millhilleast)-[:ON_LINE]->(northern)
CREATE (monument)-[:ON_LINE]->(district)
CREATE (monument)-[:ON_LINE]->(circle)
CREATE (moorgate)-[:ON_LINE]->(metropolitan)
CREATE (moorgate)-[:ON_LINE]->(northern)
CREATE (moorgate)-[:ON_LINE]->(circle)
CREATE (moorgate)-[:ON_LINE]->(hammersmith_city)
CREATE (moorpark)-[:ON_LINE]->(metropolitan)
CREATE (morden)-[:ON_LINE]->(northern)
CREATE (morningtoncrescent)-[:ON_LINE]->(northern)
CREATE (neasden)-[:ON_LINE]->(jubilee)
CREATE (newburypark)-[:ON_LINE]->(central)
CREATE (northacton)-[:ON_LINE]->(central)
CREATE (northealing)-[:ON_LINE]->(piccadilly)
CREATE (northgreenwich)-[:ON_LINE]->(jubilee)
CREATE (northharrow)-[:ON_LINE]->(metropolitan)
CREATE (northwembley)-[:ON_LINE]->(bakerloo)
CREATE (northfields)-[:ON_LINE]->(piccadilly)
CREATE (northolt)-[:ON_LINE]->(central)
CREATE (northwickpark)-[:ON_LINE]->(metropolitan)
CREATE (northwood)-[:ON_LINE]->(metropolitan)
CREATE (northwoodhills)-[:ON_LINE]->(metropolitan)
CREATE (nottinghillgate)-[:ON_LINE]->(district)
CREATE (nottinghillgate)-[:ON_LINE]->(central)
CREATE (nottinghillgate)-[:ON_LINE]->(circle)
CREATE (oakwood)-[:ON_LINE]->(piccadilly)
CREATE (oldstreet)-[:ON_LINE]->(northern)
CREATE (osterley)-[:ON_LINE]->(piccadilly)
CREATE (oval)-[:ON_LINE]->(northern)
CREATE (oxfordcircus)-[:ON_LINE]->(central)
CREATE (oxfordcircus)-[:ON_LINE]->(bakerloo)
CREATE (oxfordcircus)-[:ON_LINE]->(victoria)
CREATE (paddington)-[:ON_LINE]->(hammersmith_city)
CREATE (paddington)-[:ON_LINE]->(district)
CREATE (paddington)-[:ON_LINE]->(circle)
CREATE (paddington)-[:ON_LINE]->(bakerloo)
CREATE (parkroyal)-[:ON_LINE]->(piccadilly)
CREATE (parsonsgreen)-[:ON_LINE]->(district)
CREATE (perivale)-[:ON_LINE]->(central)
CREATE (piccadillycircus)-[:ON_LINE]->(bakerloo)
CREATE (piccadillycircus)-[:ON_LINE]->(piccadilly)
CREATE (pimlico)-[:ON_LINE]->(victoria)
CREATE (pinner)-[:ON_LINE]->(metropolitan)
CREATE (plaistow)-[:ON_LINE]->(district)
CREATE (plaistow)-[:ON_LINE]->(hammersmith_city)
CREATE (prestonroad)-[:ON_LINE]->(metropolitan)
CREATE (putneybridge)-[:ON_LINE]->(district)
CREATE (queenspark)-[:ON_LINE]->(bakerloo)
CREATE (queensbury)-[:ON_LINE]->(jubilee)
CREATE (queensway)-[:ON_LINE]->(central)
CREATE (ravenscourtpark)-[:ON_LINE]->(district)
CREATE (raynerslane)-[:ON_LINE]->(metropolitan)
CREATE (raynerslane)-[:ON_LINE]->(piccadilly)
CREATE (redbridge)-[:ON_LINE]->(central)
CREATE (regentspark)-[:ON_LINE]->(bakerloo)
CREATE (richmond)-[:ON_LINE]->(district)
CREATE (rickmansworth)-[:ON_LINE]->(metropolitan)
CREATE (rodingvalley)-[:ON_LINE]->(central)
CREATE (royaloak)-[:ON_LINE]->(hammersmith_city)
CREATE (royaloak)-[:ON_LINE]->(circle)
CREATE (ruislip)-[:ON_LINE]->(metropolitan)
CREATE (ruislip)-[:ON_LINE]->(piccadilly)
CREATE (ruislipgardens)-[:ON_LINE]->(central)
CREATE (ruislipmanor)-[:ON_LINE]->(metropolitan)
CREATE (ruislipmanor)-[:ON_LINE]->(piccadilly)
CREATE (russellsquare)-[:ON_LINE]->(piccadilly)
CREATE (stjamesspark)-[:ON_LINE]->(district)
CREATE (stjamesspark)-[:ON_LINE]->(circle)
CREATE (stjohnswood)-[:ON_LINE]->(jubilee)
CREATE (stpauls)-[:ON_LINE]->(central)
CREATE (sevensisters)-[:ON_LINE]->(victoria)
CREATE (shepherdsbush)-[:ON_LINE]->(central)
CREATE (shepherdsbushmarket)-[:ON_LINE]->(hammersmith_city)
CREATE (shepherdsbushmarket)-[:ON_LINE]->(circle)
CREATE (sloanesquare)-[:ON_LINE]->(district)
CREATE (sloanesquare)-[:ON_LINE]->(circle)
CREATE (snaresbrook)-[:ON_LINE]->(central)
CREATE (southealing)-[:ON_LINE]->(piccadilly)
CREATE (southharrow)-[:ON_LINE]->(piccadilly)
CREATE (southkensington)-[:ON_LINE]->(piccadilly)
CREATE (southkensington)-[:ON_LINE]->(circle)
CREATE (southkenton)-[:ON_LINE]->(bakerloo)
CREATE (southruislip)-[:ON_LINE]->(central)
CREATE (southwimbledon)-[:ON_LINE]->(northern)
CREATE (southwoodford)-[:ON_LINE]->(central)
CREATE (southfields)-[:ON_LINE]->(district)
CREATE (southgate)-[:ON_LINE]->(piccadilly)
CREATE (southwark)-[:ON_LINE]->(jubilee)
CREATE (stamfordbrook)-[:ON_LINE]->(district)
CREATE (stanmore)-[:ON_LINE]->(jubilee)
CREATE (stepneygreen)-[:ON_LINE]->(district)
CREATE (stepneygreen)-[:ON_LINE]->(hammersmith_city)
CREATE (stockwell)-[:ON_LINE]->(northern)
CREATE (stockwell)-[:ON_LINE]->(victoria)
CREATE (stonebridgepark)-[:ON_LINE]->(bakerloo)
CREATE (stratford)-[:ON_LINE]->(central)
CREATE (stratford)-[:ON_LINE]->(jubilee)
CREATE (sudburyhill)-[:ON_LINE]->(piccadilly)
CREATE (sudburytown)-[:ON_LINE]->(piccadilly)
CREATE (swisscottage)-[:ON_LINE]->(jubilee)
CREATE (temple)-[:ON_LINE]->(district)
CREATE (temple)-[:ON_LINE]->(circle)
CREATE (theydonbois)-[:ON_LINE]->(central)
CREATE (tootingbec)-[:ON_LINE]->(northern)
CREATE (tootingbroadway)-[:ON_LINE]->(northern)
CREATE (tottenhamcourtroad)-[:ON_LINE]->(central)
CREATE (tottenhamcourtroad)-[:ON_LINE]->(northern)
CREATE (tottenhamhale)-[:ON_LINE]->(victoria)
CREATE (totteridgewhetstone)-[:ON_LINE]->(northern)
CREATE (towerhill)-[:ON_LINE]->(circle)
CREATE (towerhill)-[:ON_LINE]->(district)
CREATE (tufnellpark)-[:ON_LINE]->(northern)
CREATE (turnhamgreen)-[:ON_LINE]->(district)
CREATE (turnhamgreen)-[:ON_LINE]->(piccadilly)
CREATE (turnpikelane)-[:ON_LINE]->(piccadilly)
CREATE (upminster)-[:ON_LINE]->(district)
CREATE (upminsterbridge)-[:ON_LINE]->(district)
CREATE (upney)-[:ON_LINE]->(district)
CREATE (uptonpark)-[:ON_LINE]->(district)
CREATE (uptonpark)-[:ON_LINE]->(hammersmith_city)
CREATE (uxbridge)-[:ON_LINE]->(metropolitan)
CREATE (uxbridge)-[:ON_LINE]->(piccadilly)
CREATE (vauxhall)-[:ON_LINE]->(victoria)
CREATE (victoriastn)-[:ON_LINE]->(victoria)
CREATE (victoriastn)-[:ON_LINE]->(district)
CREATE (victoriastn)-[:ON_LINE]->(circle)
CREATE (walthamstowcentral)-[:ON_LINE]->(victoria)
CREATE (wanstead)-[:ON_LINE]->(central)
CREATE (warrenstreet)-[:ON_LINE]->(northern)
CREATE (warrenstreet)-[:ON_LINE]->(victoria)
CREATE (warwickavenue)-[:ON_LINE]->(bakerloo)
CREATE (waterloo)-[:ON_LINE]->(waterloo_city)
CREATE (waterloo)-[:ON_LINE]->(bakerloo)
CREATE (waterloo)-[:ON_LINE]->(northern)
CREATE (waterloo)-[:ON_LINE]->(jubilee)
CREATE (watford)-[:ON_LINE]->(metropolitan)
CREATE (wembleycentral)-[:ON_LINE]->(bakerloo)
CREATE (wembleypark)-[:ON_LINE]->(metropolitan)
CREATE (wembleypark)-[:ON_LINE]->(jubilee)
CREATE (westacton)-[:ON_LINE]->(central)
CREATE (westbrompton)-[:ON_LINE]->(district)
CREATE (westfinchley)-[:ON_LINE]->(northern)
CREATE (westham)-[:ON_LINE]->(district)
CREATE (westham)-[:ON_LINE]->(hammersmith_city)
CREATE (westham)-[:ON_LINE]->(jubilee)
CREATE (westhampstead)-[:ON_LINE]->(jubilee)
CREATE (westharrow)-[:ON_LINE]->(metropolitan)
CREATE (westkensington)-[:ON_LINE]->(district)
CREATE (westbournepark)-[:ON_LINE]->(hammersmith_city)
CREATE (westbournepark)-[:ON_LINE]->(circle)
CREATE (westminster)-[:ON_LINE]->(district)
CREATE (westminster)-[:ON_LINE]->(circle)
CREATE (westminster)-[:ON_LINE]->(jubilee)
CREATE (whitecity)-[:ON_LINE]->(central)
CREATE (whitechapel)-[:ON_LINE]->(district)
CREATE (whitechapel)-[:ON_LINE]->(hammersmith_city)
CREATE (willesdengreen)-[:ON_LINE]->(jubilee)
CREATE (willesdenjunction)-[:ON_LINE]->(bakerloo)
CREATE (wimbledon)-[:ON_LINE]->(district)
CREATE (wimpledonpark)-[:ON_LINE]->(district)
CREATE (woodgreen)-[:ON_LINE]->(piccadilly)
CREATE (woodlane)-[:ON_LINE]->(hammersmith_city)
CREATE (woodlane)-[:ON_LINE]->(circle)
CREATE (woodford)-[:ON_LINE]->(central)
CREATE (woodsidepark)-[:ON_LINE]->(northern)
RETURN *
----
== Stations on multiple lines
//hide
//setup
[source,cypher]
----
MATCH (l:Line)<-[:ON_LINE]-(s:Station)-[:ON_LINE]->(x:Line)
WHERE l.name='Piccadilly line' AND l.name<>x.name
RETURN s.name,x.name;
----
//graph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment