Graph of UK train stations

23
UK Train Fares Daniyar Mukhanov, Hein Min Htike

Transcript of Graph of UK train stations

Page 1: Graph of UK train stations

UK Train FaresDaniyar Mukhanov, Hein Min Htike

Page 2: Graph of UK train stations

Ideas

Silk road

Flights from Myanmar to Kazakhstan

Family tree tradition of Kazakhstan

Twitter analytics of hashtag #StormImogen

Connection of Marvel heroes

Page 3: Graph of UK train stations

Silk Road

Lack of data

Page 4: Graph of UK train stations

Flights

Too simple graph

Page 5: Graph of UK train stations

Family tree

Tree is also graph, but...

Page 6: Graph of UK train stations

Storm Imogen

Problem with retrieving data

Page 7: Graph of UK train stations

Tools

- NodeXL for Microsoft Excel

- Scraper Wiki

- Next Analytics

Page 8: Graph of UK train stations

Marvel

Too complicated

Page 9: Graph of UK train stations

Quick look

Page 10: Graph of UK train stations

Train fares among UK

Page 11: Graph of UK train stations

Ticket splitting

Page 12: Graph of UK train stations

Aim

●Create a network of train stations in UK cities using ticket price as attribute for the edges.

●Analyse the graph; find cheapest way to travel

●To explore Gephi and apply graph theory

Page 13: Graph of UK train stations

Gephi bugs

- Importing CSV tables

- Finding shortest path

- other minor bugs

Page 14: Graph of UK train stations

Dataset

●Created manually○ 3pm, 9th Feb

●Nodes are stations

●Edges - connections between stations○ Weight - ticket fares

Page 15: Graph of UK train stations

Dataset

Excerpts from data lab

Page 16: Graph of UK train stations

Layout

●Fruchterman Reingold○ Node size ∝ Degree

○ Edge size ∝ Weight

Page 17: Graph of UK train stations

Statistics of the Graph

●Nodes - 26

●Edges - 68

●Undirected Graph (same fare in both direction)

●Average degree - 5.231 (Avg. num of connected stations)

●Network diameter - 3 (maximum connections to reach from one station to another in the graph)

Page 18: Graph of UK train stations

Filter - Degree Range

Degree range: 10 - 13

Stations with at least 10 neigbours.

Page 19: Graph of UK train stations

Filter - Edge Weight

Edge weight range: £5.5 - £15

Train fares less than £15

Page 20: Graph of UK train stations

Filter - Ego NetworkEgo Network of Cardiff

(Depth 1)Shows directedly connected stations.

(Depth 2)Connection with one intermediate station inbetween.

Page 21: Graph of UK train stations

Analysis - Shortest Path● Main aim of this graph analysis.● Gephi provides a button to obtain

shortest path between two nodes. (Using Dijkstra’s algorithm)

● Eg: Cheapest ticket between Edinburghand Cardiff

○ Edinburgh > London > Bristol Parkway > Cardiff

■ £72.5○ Edinburgh > London > Cardiff

■ £100○ Edinburgh > Cardiff

■ £87

Page 22: Graph of UK train stations

Analysis - Heatmap

●Visualise the cost of travel fromEdinburgh to all other stations.

○ Lighter color -> More expensive.

●Gephi provides a button called heatmap to obtain this data.

●This function also givesMax distance = 167.1

○ max possible cost to travel to anystation on the network is £167.1

Page 23: Graph of UK train stations

Conclusion

●What We Did○ Created our own graph

○ Analysed it in Gephi

○ Explored functionalites provided by Gephi & Graph Theory

●What to improve○ small dataset (time limitation)

○ a lot of principles from graph theory do not have real-world meaning in our graph due to the size of its dataset and underlying simplicity.

○ explore other tools (Gephi is extremely buggy).