using space effectively displaying data in graphs …...2009/02/02 · the elements of graphing...
TRANSCRIPT
stanford / cs448b
http://cs448b.stanford.edu2 February 2009
Using Space Effectively
Jeffrey Heerassistant: Jason Chuang
Topics
Displaying data in graphsBanking to 45 degreesZoomable viewsFocus+Context and spatial distortions
Displaying Data in Graphs
Effective use of spaceWhich graph is better?
Government payrolls in 1937 [How To Lie With Statistics. Huff 93]
Aspect ratio
Yearly CO2 concentrations [Cleveland 85]
Clearly mark scale breaks
Well marked scale break [Cleveland 85]
Poor scale break [Cleveland 85]
Scale break vs. Log scale
[Cleveland 85]
Scale break vs. Log scale
Both increase visual resolutionLog scale - easy comparisons of all dataScale break – more difficult to compare across break
Linear scale vs. Log scale
MSFT
MSFT0
10
2030
604050
0
10
20
30
60
40
50
Linear scale vs. Log scale Linear scaleAbsolute change
Log scaleSmall fluctuationsPercent changed(10,20) = d(30,60)
MSFT
MSFT0
10
2030
604050
0
10
20
30
60
40
50
Exponential functions (y = kamx) transform into lineslog(y) = log(k) + log(a)mxIntercept: log(k)Slope: log(a)m
Semilog graph: Exponential growth
y = 60.5x, slope in semilog space: log(6)*0.5 = 0.3891
Exponential functions (y = kamx) transform into lineslog(y) = log(k) + log(a)mxIntercept: log(k)Slope: log(a)m
Semilog graph: Exponential decay
y = 0.52x, slope in semilog space: log(0.7)*2 = -0.3098
Exponential functions (y = kamx) transform into lineslog(y) = log(k) + log(a)mxIntercept: log(k)Slope: log(a)m
Semilog graph: Lines
y = x, slope in semilog gives instantaneous : log(a)m
Power functions (y = kxa) transform into linesExample - Steven’s power laws:
S = kIp log S = log k + p log I
Log-Log graph
10
1
100
1
0
2
log(
Sens
atio
n)
Sens
atio
n
0 1 2
1 10 100Intensity
log(Intensity)
[The Elements of Graphing Data. Cleveland 94] [The Elements of Graphing Data. Cleveland 94]
[The Elements of Graphing Data. Cleveland 94] [The Elements of Graphing Data. Cleveland 94]
Transforming dataHow well does curve fit data?
[Cleveland 85]
Residual graphPlot vertical distance from best fit curveResidual graph shows accuracy of fit
[Cleveland 85]
Banking to 45 Degrees
William S. ClevelandThe Elements of Graphing Data
Banking to 45° [Cleveland]
Two line segments are maximally discriminable when their average absolute angle is 45°
Optimize the aspect ratio to bank to 45°
To facilitate perception of trends, maximize the discriminability of line segment orientations
Aspect-Ratio Banking Techniques
Median-Absolute-Slope
Average-Absolute-OrientationUnweighted
Weighted
Average-Absolute-Slope
Max-Orientation-ResolutionGlobal (over all i, j s.t. i≠j)
Local (over adjacent segments)
| ( ) | 45i
i nθ α
= °∑
| ( ) | ( )45
( )
i ii
ii
l
l
θ α α
α= °
∑
∑
2| ( ) ( ) |i ji j
θ α θ α−∑∑
21| ( ) ( ) |i i
iθ α θ α+−∑
mean | | /i x ys R Rα =median | | /i x ys R Rα =
Slopeless Line Culling
Exclude line segments with zero or infinite slope
Standard, Aspect Ratio = 1.97 Culled, Aspect Ratio = 4.00
Comparison (Data Sets)CO2 Measurements (co2) PRMTX Mutual Fund (prmtx)
Prefuse Downloads (prefuse) Sunspot Cycles (sunspot)
Comparison (Results)
ms msc as asc ao aoc awo awoc gor gorc lor lorc
5
10
15
20
25
Asp
ect
Ratio
co2 prefuse prmtx sunspot
ms msc as asc ao aoc awo awoc gor gorc lor lorcms msc as asc ao aoc awo awoc gor gorc lor lorc
5
10
15
20
25
Asp
ect
R atio
5
10
15
20
25
Asp
ect
R atio
co2 prefuse prmtx sunspot
Average-slope (as) and Average-weighted-orientation (awo) provide similar ratios
Comparison (Results)
ms msc as asc ao aoc awo awoc gor gorc lor lorc
5
10
15
20
25
Asp
ect
R atio
ms msc as asc ao aoc awo awoc gor gorc lor lorcms msc as asc ao aoc awo awoc gor gorc lor lorc
5
10
15
20
25
Asp
ect
R atio
5
10
15
20
25
Asp
ect
R atio
Average-orientation (ao) and Global-orientation-resolution (gor) provide similar ratios
co2 prefuse prmtx sunspot
Discussion
Due to computational complexity…Prefer avg-slope to avg-weighted-orientPrefer avg-orient to global-orient-resolution
But due to perceptual effectiveness… ?Cleveland recommends weighted-avg-orientBut, goal is to maximize discriminability
Perceptual experiments needed to clarifyCO2 Measurements
William S. ClevelandVisualizing Data
Aspect Ratio = 1.17
Aspect Ratio = 7.87
Multi-Scale Banking to 45°Goal
Optimized aspect ratios for varying scales
ApproachIdentify Scales of Interest Generate Scale-Specific Trend LinesBank Trend Lines to 45°Filter Resulting Aspect Ratios
Multi-Scale Banking to 45°
Use Spectral Analysis to identify trendsFind strong frequency componentsLowpass filter to create trend lines
Compute Power Spectrum
Take Discrete Fourier TransformCompute squared magnitudes
Original Data
Power Spectrum
Smooth the Spectrum
Convolve with Gaussian filterwindow size = 3, σ = 1
Smoothed Power Spectrum
Power Spectrum
Smoothed Power Spectrum
Thresholded Power Spectrum
Threshold the Spectrum
Threshold at µ + kσ (k=0 by default)Retain last values of contiguous runs
Generate Trend Lines
Generate trend lines with lowpass filterTrend Lines
Thresholded Power Spectrum
Trend Lines
Bank Trend Lines to 45°
Bank each trend line to 45°
Aspect Ratios Filtered Aspect Ratios
Aspect Ratios
Filter Aspect Ratios
Filter similar aspect ratiosKeep if αi+1 > cαi (c=1.25 by default)
Yearly values 1700-1987
Aspect Ratios
Power Spectrum
Aspect Ratio = 14.55
Aspect Ratio = 4.23
Sunspot CyclesMonthly concentrationsfrom the Mauna Loa Observatory, 1950-1990
Aspect Ratios
Power Spectrum
Aspect Ratio = 7.87
Aspect Ratio = 1.17
CO2
Small Multiples Displays
Sparklines
ApplicationsTrend Explorer
Banking can be applied to create sparklines, data‐intense, word‐sized graphics. A plot might be included inline , supporting uninterrupted reading.
Zooming
Zooming
Eames’ Powers of Ten [http://www.powersof10.com/]
Overview + Detail
[Hornbaek et al. 2002]
Interactive zooming
Pad++ [Bederson and Hollan 94]
Semantic zooming
Change representations as zoom level changes
PAD [Perlin and Fox 93]
Speed-Dependent Zooming
Integrate Pan and Zoom into single interationAutomatically zoom to maintain optical flowSemantic zooming can simplify zoomed-out view
http://www-ui.is.s.u-tokyo.ac.jp/~takeo/java/autozoom/autozoom.htm [Igarashi 00]
Halo [Baudisch 03]
Focus + Context
Degree-of-Interest [Furnas 81, 06]
Estimate the saliency of information to displayCan affect what is shown and/or how to show it
DOI ~ f(Current Focus, A Priori Importance)
Example: Google SearchCurrent Focus = Query Hits (e.g., TF.IDF score)A Priori Importance = PageRankWhat: Top N results, How: List
TableLens [Rao & Card 94]
DateLens
[Bederson et al. 04]
Single view focus + contextFocus area – local detailsDe-magnified area – surrounding contextLike a rubber sheet with borders tacked down
Nonlinear Magnification Infocenter [http://www.cs.indiana.edu/~tkeahey/research/nlm/nlm.html]
Bifocal display [Leung and Apperley 94]
2D distortion
Multifocal display [Leung and Apperley 94]
Fisheye [Leung and Apperley 94]
1D 2D
Polar
Nonlinear magnification [Leung and Apperley 94]
1D 2D
Multifocal
Perspective wall Perspective allows more context
Perspective Wall [Mackinlay et al. 91]
Cartographic Distortions
Cartograms: Distort areas
Scale area by data[From Cartography, Dent]
Election 2004 map
http://www-personal.umich.edu/~mejn/election/
% voted democrat% voted republican
Election 2004 map
http://www-personal.umich.edu/~mejn/election/
% voted democrat% voted republican
Election 2004 map
http://www-personal.umich.edu/~mejn/election/
Statistical map with shading
[Cleveland and McGill 84]
Framed rectangle chart
[Cleveland and McGill 84]
Rectangular cartogram
American population [van Kreveld and Speckmann 04]
Rectangular cartogram
Native American population [van Kreveld and Speckmann 04]
Dorling cartogram
http://www.ncgia.ucsb.edu/projects/Cartogram_Central/types.html
States as nodes in a graph
Graphical fisheye views of graphs [Sarkar & Brown 92]
Distorting distances
Scale distance by data[From Cartography, Dent]
London underground
http://www.thetube.com/content/history/map.asp
Comparison to geographic map
Distorted Undistorted
Summary
Spatial layout is the most important visual encodingGeometric properties of spatial transforms support
geometric reasoningShow data with as much resolution as possible Emphasize important information
Important to consider what to show, not just how