23
Spread and Page Rank for Interactive Maps Wm Leler - Flightstats, Inc. wm@flightstats.com

Spread and Page Rank for Interactive Maps

Embed Size (px)

DESCRIPTION

Talk presented at GIS in Action conference, Portland, OR, April 2013

Citation preview

Page 1: Spread and Page Rank for Interactive Maps

Spread and Page Rank for Interactive Maps

Wm Leler - Flightstats, [email protected]

Page 2: Spread and Page Rank for Interactive Maps

openstreetmap.org

zoom level 6

Page 3: Spread and Page Rank for Interactive Maps

openstreetmap.org

Missing: San Francisco, San Jose, Los Angeles, Las Vegas, Phoenix, Seattle, Vancouver, Detroit, Dallas, NYC, Miami

Page 4: Spread and Page Rank for Interactive Maps

Stamen Terrain

Beaverton? Hillsboro? Forest Grove? Tigard?

Page 5: Spread and Page Rank for Interactive Maps

Google Maps

Seattle? Denver? Salt Lake City? Las Vegas?

Page 6: Spread and Page Rank for Interactive Maps

MapQuest

56

where did they go?

Page 7: Spread and Page Rank for Interactive Maps

The Big Problem

• A map is a spatial display of a bunch of objects: cities, highways, parks, airports, etc.

• At most zoom levels, there are far too many objects to display.

• What is the best way to pick which objects to display (per zoom level) on a map?

Page 8: Spread and Page Rank for Interactive Maps

Our Immediate Problem

• At FlightStats we need to decide which airports to draw on a map

Every airportthat suppliesus with flightdata (4180)

Page 9: Spread and Page Rank for Interactive Maps

FAA Categories

Based on % of passenger-enplanements

1. Primary large hub (>1% of p-e)

2. Primary medium hub (.25 - 1%)

3. Primary small hub (.05 - .25%)

4. Primary non-hub (<0.05%)

5. Secondary (< 10,000 p-e / year)

Page 10: Spread and Page Rank for Interactive Maps

Bad Solution• Not so good for maps

• Airports bunch together and leave big empty spaces

Bunching

Empty Spaces

Bunching

Delay Map

Page 11: Spread and Page Rank for Interactive Maps

• South America has only 3 large primary airports

• Two serve the same city (Rio)

• Africa has one (JNB)

Even Worse Internationally

Page 12: Spread and Page Rank for Interactive Maps

• Should be dependent on zoom level

• as you zoom in, you want to see more

• Number of passengers is a bad measure

• short commuter flights to little airports should count less

• flights to other major airports should count more

More Problems

Page 13: Spread and Page Rank for Interactive Maps

Goals

• Show “important” airports

• major airports

• plus less major airports if they are the primary airport for an area

• Avoid airports “bunching up”

Page 14: Spread and Page Rank for Interactive Maps

Solution

Importance of an airport is based on:

1. How connected it is to other airports

weighted by the importance of each other airport (recursive)

2. Area for which it is the primary airport

3. Based on current map view

Page 15: Spread and Page Rank for Interactive Maps

Connectivity• Calculate connectivity using the PageRank

algorithm (by Larry Page at Google, adapted by Steve Wilson at FlightStats)

SEA

PDX

EUG

PDT

RDM

PR(PDX) = foreach airport x: flights(PDX, x) * PR(x)

Page 16: Spread and Page Rank for Interactive Maps

Connectivity• Calculate connectivity using the PageRank

algorithm (by Larry Page at Google, adapted by Steve Wilson at FlightStats)

SEA

PDX

EUG

PDT

RDM

PR(PDX) = foreach airport x: flights(PDX, x) * PR(x)

.0025

.0036

.00014

.0002.0003

Page 17: Spread and Page Rank for Interactive Maps

Spread

• (Page) Rank still suffers from bunching and empty spaces

• Add Spread – the distance to the closest airport of higher rank

• a reasonable proxy for the area

• The Spread for PDX is 111.98 nautical miles (the distance to SEA)

Page 18: Spread and Page Rank for Interactive Maps

CombiningRank and Spread

Rank Spread X

SFO 0.0040 293.5 1.19

OAK 0.0015 10.26 0.0158

SJC 0.0012 24.8 0.0287

SMF 0.0011 65.6 0.0702

The four biggest airports in Northern CA

Page 19: Spread and Page Rank for Interactive Maps

Algorithm

1. Pre-calculate Rank and Spread for all airports (they don’t change very often)

2. For each map view, display the N airports with the largest product of Rank and Spread

3. (optionally) set minimum Rank and Spread

Page 20: Spread and Page Rank for Interactive Maps

Flexibility

• Applications can pick their weighting of Rank and Spread, and value of N

• N can depend on zoom level

• Can also use them as limits

• minimum Spread to debunch airports

• minimum Rank to hide small airports

Page 21: Spread and Page Rank for Interactive Maps

Beyond Airports

• Can use Spread to space out almost anything on a map

• cities, neighborhoods, roads, parks, mountains, rivers, lakes, ...

• your data!

• Rank emphasizes connectivity over raw size or category

Page 22: Spread and Page Rank for Interactive Maps

Connectivity

gaps

noise

Page 23: Spread and Page Rank for Interactive Maps

DEMO

http://demo.flightstats-ops.com/spread

http://www.slideshare.net/wmleler/spread-20277955