Graph for SQL Practitioners
-
Upload
karthik-guruswamy -
Category
Data & Analytics
-
view
2.279 -
download
0
Transcript of Graph for SQL Practitioners
![Page 1: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/1.jpg)
Airline Routing with Aster Graph
![Page 2: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/2.jpg)
2
• OPENFLIGHTS.ORG data (as of Jan 12)
– 59,036 routes between 3,209 airports on 531 airlines
– Downloaded airports.dat, airlines.dat and routes.dat files
Demo data
![Page 3: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/3.jpg)
3
• AIRPORTS • ROUTES • AIRLINES
© 2014 Teradata
Loaded Data to Three Aster Tables (DDL next slide)
![Page 4: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/4.jpg)
4
• AIRPORTS • ROUTES • AIRLINES
© 2014 Teradata
Aster DDL & Load script
![Page 5: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/5.jpg)
5
US only routes. Edge Score is the # of airlines flying in a route. Higher Edge Score is colored more green. Max Airlines Found in a route = 22
Visualizing routes in Tableau
© 2014 Teradata
1,343 Cities (Vertices)
5,136 Direct Flights (Edges)
![Page 6: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/6.jpg)
6
Flights connections from San Francisco. Users can use the Filter to visualize per city connections
Visualizing routes in Tableau
© 2014 Teradata
![Page 7: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/7.jpg)
7
All International routes. Edge Score is the # of airlines flying in a route. Higher Edge Score is colored more green. Max Edge Score = 22
Visualizing routes in Tableau
© 2014 Teradata
6,977 Cities (Vertices)
34,747 Direct Flights (Edges)
![Page 8: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/8.jpg)
8
• Graph Analysis – Centrality Measures
– Which Cities or Metros are located in the center of the Graph ?
- Centrality determined by # of airlines connections and distance from other cities
– Which Cities or Metros are more prominent ?
- Prominence determined by connections to cities which are in turn well connected
– What cities are key in connecting isolated clusters of routes ?
- Also known as ‘Lynch Pin’ nodes and can be potential congestion bottlenecks
• Graph Analysis – Routing
– How many minimum hops are required between any two cities
– What is the average # of hops between any two cities in US ?
Aster Analytics – US Cities
© 2014 Teradata
![Page 9: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/9.jpg)
9
Example: Centrality Measures (Intuition)Multi-genre Graph Analytics for Transportation Network
Degree Centrality
Max neighbors, popular
destinations
Betweenness
Lynch pin nodes,
community
connectors
Closeness
Optimal distance
from everyone else.
EigenVector,
Katz, PageRank
Power
concentration,
Prominence
Hubs, Metros
![Page 10: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/10.jpg)
10
Which Cities have Highest Centrality ?
© 2014 Teradata
![Page 11: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/11.jpg)
11
Which Cities are “Prominent” in US Airline Network ?
© 2014 Teradata
![Page 12: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/12.jpg)
12
What are the Cities (within US) that are key connectors ?
© 2014 Teradata
![Page 13: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/13.jpg)
13
Top 10 cities that are separated by the most # of layovers
Minimum # of Hops between any two cities
© 2014 Teradata
![Page 14: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/14.jpg)
14
Insight – Greatest # of US Cities are separated by 3 hops!
Histogram - # of Hops between any two US cities
© 2014 Teradata
![Page 15: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/15.jpg)
Analytics for – International Airlines & Routes
© 2014 Teradata
![Page 16: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/16.jpg)
16
Which Cities have Highest Centrality ?
© 2014 Teradata
![Page 17: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/17.jpg)
17
Which Cities are “Prominent” in the Airline Network ?
© 2014 Teradata
![Page 18: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/18.jpg)
18
Top 10 cities that are separated by the most # of layovers
Minimum # of Hops between any two cities in the world
© 2014 Teradata
![Page 19: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/19.jpg)
19
Insight – Greatest # of World Cities are separated by 4 hops!
Histogram - # of Hops between any two cities in the world
© 2014 Teradata
![Page 20: Graph for SQL Practitioners](https://reader033.fdocuments.us/reader033/viewer/2022050613/58f0e03d1a28ab31708b4639/html5/thumbnails/20.jpg)
20