27
MIS2502: Data Analytics Principles of Data Visualization Alvin Zuyin Zheng zheng@temple.edu http://community.mis.temple.edu/zuyinzheng/

MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

MIS2502:Data AnalyticsPrinciples of Data Visualization

Alvin Zuyin [email protected]

http://community.mis.temple.edu/zuyinzheng/

Page 2: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Data visualization can:

provide clear understanding of patterns in data

detect hidden structures in data

condense information

Page 3: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

What makes a good chart?

Wikipedia: Patriotic War of 1812http://en.wikipedia.org/wiki/File:Patriotic_War_of_1812_ENG_map1.svgVideo: Napoleonic Wars in 8 Minutes

Page 4: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

What can you learn from this map?

http://www.popvssoda.com/countystats/total-county.html

Page 5: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

What makes a good chart?

Zhang et al. (2010), “A case study of micro-blogging in the enterprise: use, value, and related issues,” Proceedings of the 28th International Conference on Human Factors in Computing Systems.

This is from an academic

conference paper.

What are the problems with

this chart?

Page 6: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Some basic principles (adapted from Tufte 2009)

• The chart should tell a story1

• The chart should have graphical integrity2

• The chart should minimize graphical complexity3

Tufte’s fundamental principle:Above all else show the data

Page 7: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Principle 1: The chart should tell a story

Graphics should be clear on their own

The depictions should enable meaningful comparison

The chart should yield insight beyond the text

“If the statistics are boring, then you’ve got the wrong numbers.” (Tufte 2009)

Page 8: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Do these tell a story?

http://www.evl.uic.edu/aej/491/week03.html

http://flowingdata.com/2009/11/26/fox-news-makes-the-best-pie-chart-ever/

Page 9: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Most Popular Girl Names in Map

by Reuben Fischer-Baum (http://jezebel.com/map-sixty-years-of-the-most-popular-names-for-girls-s-1443501909)

Page 10: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Principle 2: The chart should have graphical integrity

• Basically, it shouldn’t “lie” (mislead the reader)

• Tufte’s “Lie Factor”:

– 𝐿𝑖𝑒 𝐹𝑎𝑐𝑡𝑜𝑟 =𝑠𝑖𝑧𝑒 𝑜𝑓 𝑒𝑓𝑓𝑒𝑐𝑡 𝑠ℎ𝑜𝑤𝑛 𝑖𝑛 𝑔𝑟𝑎𝑝ℎ𝑖𝑐

𝑠𝑖𝑧𝑒 𝑜𝑓 𝑒𝑓𝑓𝑒𝑐𝑡 𝑖𝑛 𝑑𝑎𝑡𝑎

Should be ~ 1

< 1 = understated effect

> 1 = exaggerated effect

Page 11: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

How is this deceptive?

http://20bits.com/articles/politics-and-tuftes-lie-factor/

The original graphic from Real Clear Politics, 2008.

(Look at the y-axis)

The adjusted graphic.

Page 12: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Other tips to avoid “lying”

Adjust for inflation

Make sure the context is presented

80

90

100

110

120

130

140

2003 2004 2005 2006 2007 2008 2009 2010

Year

Hypothetical Industries, Inc.

Revenue

Adjusted Revenue

350

360

370

380

390

400

410

2009 2010

The

fts

pe

r 1

00

00

0 c

itiz

en

s

Hypothetical City Crime

25

75

125

175

225

275

325

375

425

2003 2004 2005 2006 2007 2008 2009 2010Th

eft

s p

er

10

00

00

cit

ize

ns

Hypothetical City Crime

vs.

Page 13: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Present data in context

The original graphic from Fox News, Feb 2012.

In Reality…

http://mediamatters.org/research/2012/10/01/a-history-of-dishonest-fox-charts/190225

Page 14: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Principle 3: The chart should minimize graphical complexity

Key concepts

Sometimes a table is

betterData-ink Chartjunk

Generally, the simpler the better…

Page 15: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

When a table is better than a chart

For a few data points, a table can do just as well…

$0.00

$50,000.00

$100,000.00

$150,000.00

$200,000.00

$250,000.00

Total Sales by SalespersonSalesperson Total Sales

Peacock $225,763.68

Leverling $201,196.27

Davolio $182,500.09

Fuller $162,503.78

Callahan $123,032.67

King $116,962.99

Dodsworth $75,048.04

Suyama $72,527.63

Buchanan $68,792.25

The table carries more information in less space and is more precise.

Page 16: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

The Ultimate Table: The Box Score

• Large amount of information in a very small space

• So why does this work?

– Depends on the reader’s knowledge of the data

Page 17: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Data Ink

• The amount of “ink” devoted to data in a chart

• Tufte’s Data-Ink ratio:

– 𝐷𝑎𝑡𝑎 − 𝑖𝑛𝑘 𝑟𝑎𝑡𝑖𝑜 =𝑑𝑎𝑡𝑎−𝑖𝑛𝑘

𝑡𝑜𝑡𝑎𝑙 𝑖𝑛𝑘 𝑢𝑠𝑒𝑑 𝑖𝑛 𝑔𝑟𝑎𝑝ℎ𝑖𝑐

Should be ~ 1

< 1 = more non-data related ink in graphic

= 1 implies all ink devoted to data

Tufte’s principle:Erase ink whenever possible

Page 18: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Being conscious of data ink

25

75

125

175

225

275

325

375

425

2003 2004 2005 2006 2007 2008 2009 2010

The

fts

pe

r 1

00

00

0 c

itiz

en

s

Hypothetical City Crime

25

75

125

175

225

275

325

375

425

2003 2004 2005 2006 2007 2008 2009 2010

The

fts

pe

r 1

00

00

0 c

itiz

en

s

Hypothetical City Crime

200

270

320 330

370350

400370

2003 2004 2005 2006 2007 2008 2009 2010

Hypothetical City Crime

Lower data-ink ratio(worse)

Higher data-ink ratio(better)

Page 19: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

What makes a good chart?

0

20000

40000

60000

80000

100000

120000

140000

160000

2011 Total Sales

Order Date

Sum of Extended Price

0

20000

40000

60000

80000

100000

120000

140000

160000

2011 Total Sales

Order Date

Sum of Extended Price

Sometimes it’s really a matter of

preference.

These both minimize data ink.

Why isn’t a table better here?

Page 20: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

3-D Charts

$0.00

$50,000.00

$100,000.00

$150,000.00

$200,000.00

$250,000.00

Total Sales by Salesperson

Evaluate this from a data-ink perspective.How does it affect the clarity of the chart?

Page 21: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Chartjunk: Data Ink “gone wild”

Unnecessary visual clutter that doesn’t provide additional insight

Distraction from the story the chart is supposed to convey

When the data-ink ratio is low, chartjunk is likely to be high

Page 22: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

25

75

125

175

225

275

325

375

425

2003 2004 2005 2006 2007 2008 2009 2010

The

fts

pe

r 1

00

00

0 c

itiz

en

s

Hypothetical City Crime

Example: Moiré effects (Tufte 2009)

Creates illusion of movement

Stands out, in a bad way

$0.00

$50,000.00

$100,000.00

$150,000.00

$200,000.00

$250,000.00

Total Sales by Salesperson

Page 23: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Example: The Grid

25

75

125

175

225

275

325

375

425

2003 2004 2005 2006 2007 2008 2009 2010

The

fts

pe

r 1

00

00

0 c

itiz

en

sHypothetical City Crime

25

75

125

175

225

275

325

375

425

2003 2004 2005 2006 2007 2008 2009 2010

The

fts

pe

r 1

00

00

0 c

itiz

en

s

Hypothetical City Crime

Why are these examples of chartjunk?

What could you do to remedy

it?

Page 24: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Review: What do you think of these?

https://www.boundless.com/statistics/frequency-distributions/frequency-distributions-for-qualitative-data/interpreting-distributions-constructed-by-others/images/3-d-pie-chart/

htt

p:/

/ww

w.e

con

om

ist.

com

/no

de/

21

53

79

09

http://images.macworld.com/images/howto/graphics/134708-create-charts-good_376.jpg

Page 25: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Common Chart Types

Bars(For Comparison)

Pie(For Composition)

Line(For Evolution)

Scatterplot(Relationship)

Map(For Spatial Comparison)

Page 26: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Some Visualization Tools

• Excel (as always)

• R, Stata, Tableau, SAS (useful for Statistical Plots).

• Google Charts, FusionCharts (simple graphs as well as maps)

• Piktochart (infographics)

• Adobe Photoshop, Illustrator, etc (for graphical design)

Page 27: MIS2502: Data Analytics - Temple MIS...2017/02/07  · •Use data visualization principles to assess a visualization –Tell a story –Graphical integrity (lie factor) –Minimize

Summary

• Use data visualization principles to assess a visualization

– Tell a story

– Graphical integrity (lie factor)

– Minimize graphical complexity (data ink, chartjunk)

• Explain how a visualization can be improved based on those principles

• Types of visualization