data visualization: supplementary slides · 2018. 5. 10. · tufte’s design principles clear,...

71
Data Visualization: Supplementary slides Sungkyu Jung

Upload: others

Post on 18-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Data Visualization:

Supplementary

slides

Sungkyu Jung

Page 2: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Statistical Graph Types

http://xkcd.com/523/

Based on material created by Hanspeter Pfister and Marc Streit

Page 3: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

http://extremepresentation.typepad.com/blog/files/choosing_a_good_chart.pdf

Page 4: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Comparisons

Page 5: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Bar Chart

http://nbviewer.ipython.org/gist/olgabot/5357268

Page 6: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Direction

Nicolas Rapp

Page 7: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Trends OverTime

http://xkcd.com/605/

Page 8: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Line Charts

matplotlib gallery

Page 9: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Linear vs. Logarithmic Scale

Linear Scale

Log Scale

http://finance.yahoo.com/echarts?s=AAPLApple Stock Price

http://xkcd.com/1162/

Page 10: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Bars vs. LinesLines imply connections - do not use for categorical data

Zacks 1999

Page 11: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Aspect Ratios

eagereyes.org

Page 12: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Correlations

Page 13: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Scatterplots

Page 14: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

No Border

Scatterplots

Black BorderLight Grey Border

http://nbviewer.ipython.org/5357268

Page 15: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Overplotting

alpha = 1/100

Page 16: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Trend Lines

Page 17: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Don‘t

matplot3d tutorial

fare

age

class

Page 18: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Compositions

Page 19: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Pie Charts

http://xkcd.com/197/

Page 20: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Pie vs. Bar Charts

Page 21: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Stacked Bar Chart

Page 22: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Stacked Bar Chart

vs.

VizWiz Blog

Page 23: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Comparison of bar chart types

Small

Multiples

Stacked bar chartPie Chart

Layered

Bar

Chart

Grouped

Bar

Chart

Streit & Gehlenborg, PoV, Nature Methods, 2014

Page 24: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

LineUp

Video at http://lineup.caleydo.org

Page 25: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Stacked Area Chart

http://stackoverflow.com/questions/2225995/how-can-i-create-stacked-line-graph-with-matplotlib

Page 26: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

100% Stacked Area Chart

http://stackoverflow.com/questions/16875546/create-a-100-stacked-area-chart-with-matplotlib

Page 27: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Stacked Area vs.Line Graphs

leancrew.com &

Practically Efficient

Page 28: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Distributions

Page 29: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

10 Bins

20 Bins

age

age

Histogram# passengers

# passengers

Page 30: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Density Plots

http://web.stanford.edu/~mwaskom/software/seaborn/tutorial/plotting_distributions.html

Page 31: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Heat Maps

2D Density Plots

Page 32: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Box Plotsaka Box-and-Whisker Plot

Wikipedia

Page 33: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Comparison

Streit & Gehlenborg, PoV, Nature Methods, 2014

Page 34: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Spatial visualization

Page 35: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Minard’s Map Napoleon’s March on Moscow

Page 36: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Wikimedia Commons

Detect the expected – discover the unexpected

John Snow (1813 – 1858)

Page 37: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

EffectiveVisualizations

Page 38: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Not Effective...

Sources:USTreasury andWHO reports

Page 39: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Also not effective...

Source:Nature

Page 40: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should
Page 41: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

EdwardTufte

Page 42: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Scale Distortions

Page 43: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

GlobalWarming?

The Daily Mail, UK,Jan 2012

Page 44: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

GlobalWarming?

Mother Jones

Page 45: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

GlobalWarming!

Mother Jones

Page 46: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Lying with Scales

Uniform scale in both x and y

Ward, Grinstein, Keim, 2011

Larger scale in y

Larger scale in x Larger scale in x and y

Same data - different scales

Page 47: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Scales are critical!

What are your bounds – upper and lower?

What scale works?

Linear? Log? Clipping? Breaks?

Relative or absolute values?

How can you make things comparable?

Page 48: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

The Lie Factor

Tufte,VDQI

Size of effect shown in graphic

Size of effect in data

Page 49: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should
Page 50: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

0%

10%

20%

30%

RIM Other Apple Palm Motorola Nokia

7,4

3,1

9,8

19,521,2

40%

39,0

U.S. SmartPhone Marketshare

Page 51: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Maximize Data-Ink Ratio

0-$24,999 $25,000+ 0-$24,999 $25,000+

Data ink

Total ink used in graphicData-Ink Ratio =

EdwardTufte

Page 52: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Maximize Data-Ink Ratio

0

175

350

525

700

Males Females

0-$24,999 $25,000+ 0-$24,999 $25,000+

Data ink

Total ink used in graphicData-Ink Ratio =

EdwardTufte

Page 53: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

What do colors mean?

Proc SPIE Int Soc Opt Eng. 2014 Mar 21; 9034: 90342L.Published online 2014 Feb 15. doi: 10.1117/12.2042720

Page 54: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Don’t Use 3D

matplotlib gallery

Excel Charts Blog

Page 55: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

3D Bar Plot

Gehlenborg & Wong, PoV, Nature Methods, 2012

Which one is the tallest bar? What is the pattern in the data?

Page 56: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Exception: 3D Phenomena

Gehlenborg & Wong, PoV, Nature Methods, 2012

Depth cues enable us to perceive 2D images as 3D objects

Page 57: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Exception: 3D Phenomena

Proc SPIE Int Soc Opt Eng. 2014 Mar 21; 9034: 90342L.Published online 2014 Feb 15. doi: 10.1117/12.2042720

Page 58: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Avoid Chart Junk

ongoing,Tim Brey

Extraneous visual elements that distract from the message

Page 59: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Extraneous visual elements that distract from the message

ongoing,Tim Brey

Avoid Chart Junk

Page 60: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Extraneous visual elements that distract from the message

ongoing,Tim Brey

Avoid Chart Junk

Page 61: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Extraneous visual elements that distract from the message

ongoing,Tim Brey

Avoid Chart Junk

Page 62: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Extraneous visual elements that distract from the message

ongoing,Tim Brey

Avoid Chart Junk

Page 63: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Extraneous visual elements that distract from the message

ongoing,Tim Brey

Avoid Chart Junk

Page 64: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Tufte’s Design Principles

Clear, detailed,and thorough labeling and appropriate scales

Size of the graphic effect should be directly proportional to the numerical quantities (“lie factor”)

Maximize data-ink ratio

Avoid chart junk

Page 65: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Visualization Critique

Page 66: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Death to Pie Charts

Cole Nussbaumerwww.storytellingwithdata.com/2011/07/death-to-pie-charts.html

“I hate pie charts.

I mean,really hate them.”

Page 67: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Redesign

Page 68: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Harvard’sTroubles

Junk Charts

Page 69: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Redesign 1

Junk Charts

Page 70: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Redesign II

Junk Charts

Page 71: Data Visualization: Supplementary slides · 2018. 5. 10. · Tufte’s Design Principles Clear, detailed,and thorough labeling and appropriate scales Size of the graphic effect should

Redesign III

Junk Charts