After loading the data using 1 - Load London Transport.py, you can visually explore the graph in Neo4j Aura.
- Go to the Neo4j Aura Console (https://console.neo4j.io)
- Click on your instance (e.g.,
london_transport) - In the left sidebar under Tools, click on Explore
If you see "No instance connected", click the Connect to instance button.
- Click Connect to instance
- Your instance should connect automatically (green indicator shows "Instance: london_transport")
- You'll see the Explore interface with a search bar and options
To visualize all stations and their tube line connections:
- In the search bar at the top, construct the pattern:
- Click Station (orange node)
- Click the relationship connector
—(any)— - Click Station (orange node)
This creates the pattern: Station — (any) — Station
-
You'll see the available properties for Station nodes:
station_id: valuename: valuepostcode: valuezone: valuelatitude: valuelongitude: value
-
Click Search the graph (or press TAB and select it)
You should now see a beautiful visualization of the London Transport Network:
- Orange nodes = Station nodes
- Colored edges = Different tube lines (BAKERLOO, CENTRAL, CIRCLE, etc.)
- Each relationship type has a different color for easy identification
- Zoom: Scroll wheel or pinch gesture
- Pan: Click and drag the canvas
- Center: Double-click on empty space
- Click on a node to see its properties
- Click on a relationship to see its type
- Expand nodes to see more connections
You can filter stations by specific properties:
- Zone:
Station zone: value— Enter a zone number (1, 2, 3, etc.) - Name:
Station name: value— Search for specific stations (e.g., "King's Cross") - Postcode:
Station postcode: value— Filter by postcode area
To see only specific tube lines, use the relationship filter:
- Click the relationship selector
—(any)— - Choose a specific line type:
BAKERLOOCENTRALCIRCLEDISTRICTHAMMERSMITH_AND_CITYJUBILEEMETROPOLITANNORTHERNPICCADILLYVICTORIAWATERLOO_AND_CITY
Example: Station — BAKERLOO → Station shows only Bakerloo line connections
Major interchanges will have many connections (multiple colored edges):
- Look for nodes with 6+ connections
- Examples: King's Cross St. Pancras, Oxford Circus, Bank
- Select a specific tube line relationship (e.g.,
CENTRAL) - Follow the path from end to end
- See which stations it connects
- Use
Station zone: valuefilter - Enter zone number (e.g.,
1for central London) - See all zone 1 stations
- Right-click on a station (e.g., "King's Cross St. Pancras")
- Select "Find shortest path"
- Right-click on another station (e.g., "Victoria")
- View the shortest connection between them
Neo4j Aura includes built-in Graph Data Science (GDS) capabilities to analyze your network and discover insights. Here's how to apply algorithms to identify important stations:
- In the left sidebar, click the Graph Data Science icon (looks like interconnected nodes)
- You'll see the GDS panel open on the left side of the screen
Degree Centrality identifies the most connected stations (major hubs and interchanges):
- Click Add algorithm in the GDS panel
- From the algorithm dropdown, select Degree Centrality
- Read the description: "Degree centrality measures the number of incoming and outgoing relationships from a node"
- Click Apply algorithm
The algorithm will run and calculate centrality scores for all 302 stations.
After the algorithm completes, visualize the results:
- You'll see a success message: "652 scores added by Degree Centrality"
- Two options appear:
- Size nodes based on scores - Makes hub stations larger
- Apply color gradient based on scores - Colors nodes by importance
- Click Apply color gradient based on scores
Note: Scores only exist within the visualization and are not written to the database.
Your graph will now display a color-coded visualization:
- Darker/brighter nodes = Higher degree centrality (major interchanges like King's Cross, Oxford Circus, Bank)
- Lighter nodes = Lower degree centrality (end-of-line or less connected stations)
This visualization immediately reveals:
- Major interchange stations with 6+ tube line connections
- Network bottlenecks where multiple lines converge
- Peripheral stations with fewer connections
Try these algorithms for different insights:
- Betweenness Centrality - Identifies stations that act as bridges between different parts of the network
- PageRank - Finds stations that are connected to other important stations (transfer hubs)
- Community Detection (Louvain) - Groups stations into geographic clusters
- Shortest Path - Finds optimal routes between stations (available via right-click menu)
Neo4j Aura Explore uses Perspectives to customize your view:
- Default Perspective: Basic node and relationship display
- Custom Perspectives: Create your own color schemes and layouts
- Export: Save your perspective settings for future use
You can customize:
- Node colors by label or property
- Relationship colors by type
- Node size by property values
- Display captions (what property to show on nodes)
For more advanced exploration, switch to the Query tab to run Cypher queries directly:
Example queries:
// Count stations by zone
MATCH (s:Station)
WHERE s.zone IS NOT NULL
RETURN s.zone as zone, count(s) as stations
ORDER BY zone
// Find busiest interchange stations
MATCH (s:Station)-[r]-()
RETURN s.name as station, count(r) as connections
ORDER BY connections DESC
LIMIT 10
// Shortest path between two stations
MATCH path = shortestPath(
(from:Station {name: "King's Cross St. Pancras"})-[*]-(to:Station {name: "Victoria"})
)
RETURN path- Try the Text-to-Cypher Agent: Use
labs/2 - Query London Transport.pyto ask questions in natural language - Build Dashboards: Create custom visualizations in the Dashboards section
- Learn Cypher: Explore the Developer hub for Cypher query tutorials
Enjoy exploring the London Transport Network! 🚇





