Airport Connections Example
Vega Airport Connections Example and the corresponding tutorial.
Vega example
NetPanorama example
Vega specification
| |
Signals required for interactivity |
|
| |
load data for background map |
|
load flight data, and apply transform to calculate total number of flights per airport |
|
Load airport data and transform: join with flight counts, remove airports with no flights, project lat/lon, remove airports with unknown location, compute Voroni cell around each airport, and sort by flight count |
|
load flight data, and transform to: remove all rows except for those whose origin is the hovered-over airport, then construct linkpath |
|
Projections and scales |
|
| |
draw shapes for states |
|
draw a circle for each airport |
|
draw an invisible Voronoi cell around each airport to act as a hover target |
|
draw a path for each flight route from the hovered node |
|
display the name of the hovered airport |
|
NetPanorama specification
| |
Define paramaters: my_selection will be directly updated by interactions, and then neighbours will be auto-updated to include its neighbours. |
|
Load data... |
|
...and assemble into a network. Then remove nodes with no connections, and calculate total flight count for each airport. |
|
Define a scale to set the node sizes. |
|
Specify which basemap to use, and which geographic region to show. |
|
Construct a layout that positions nodes correctly relative to the basemap. |
|
/ |
|
Render links to neighbours of the selected node. |
|
Render nodes. |
|
On mouseover, update the selected node. |
|
| |
Display name and IATA code for selected node. |
|
Display the basemap. |
|