graph construction - dbdmg.polito.it

149
Graph Construction Data Management and Visualization Version 2.6.0 © Marco Torchiano, 2020

Upload: others

Post on 01-Dec-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Graph Construction - dbdmg.polito.it

Graph Construction

Data Management and Visualization

Version 2.6.0© Marco Torchiano, 2020

Page 2: Graph Construction - dbdmg.polito.it

2

Licensing Note

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

You are free: to copy, distribute, display, and perform the work

Under the following conditions:

▪ Attribution. You must attribute the work in the manner specified by the author or licensor.

▪ Non-commercial. You may not use this work for commercial purposes.

▪ No Derivative Works. You may not alter, transform, or build upon this work.

▪ For any reuse or distribution, you must make clear to others the license terms of this work.

▪ Any of these conditions can be waived if you get permission from the copyright holder.

Your fair use and other rights are in no way affected by the above.

Page 3: Graph Construction - dbdmg.polito.it

Grammar of Graphics

▪ Theory behind graphics construction

Separation of data from aesthetic

Definition of common plot/chart elements

Composition of such common elements

▪ Building a graphic involves

1. Specification

2. Assembly

3. Display

3

Leland Wilkinson, The grammar of graphics

Page 4: Graph Construction - dbdmg.polito.it

Specification

▪ DATA: a set of data operations that create variables from datasets

Link variables (e.g., by index or id)

▪ TRANS: variable transformations (e.g., rank)

▪ SCALE: scale transformations (e.g., log)

▪ COORD: a coordinate system (e.g., polar)

▪ ELEMENT: visual objects (e.g., points) and their aesthetic attributes (e.g., color, position)

▪ GUIDE: guides (e.g., axes, legends)

4

Page 5: Graph Construction - dbdmg.polito.it

Specification for a scatter plot

▪ DATA: x = x

▪ DATA: y = y

▪ TRANS: x = x

▪ TRANS: y = y

▪ SCALE: linear(dim(1))

▪ SCALE: linear(dim(2))

▪ COORD: rect(dim(1, 2))

▪ GUIDE: axis(dim(1))

▪ GUIDE: axis(dim(2))

▪ ELEMENT: point(position(x*y))

5

Page 6: Graph Construction - dbdmg.polito.it

Graph visual components

▪ Data components

Visual objects associated to measures

Visual attributes

▪ Layout

Positioning rules (e.g. cartesian coord)

▪ Support components

Axes

Labels

Legends

6

Page 7: Graph Construction - dbdmg.polito.it

Visual Encoding

▪ Given a variable (measure), identify:

Visual object

Visual attribute

▪ Main distinction

Quantitative (interval, ratio, absolute)

Categorical (nominal, ordinal)

7

Page 8: Graph Construction - dbdmg.polito.it

VISUAL RELATIONSHIPS

8

Page 9: Graph Construction - dbdmg.polito.it

Data Visualization

Visual PerceptionVisual Properties & Objects

Quantitative ReasoningQuantitative Relationship & Comparison

Information VisualizationVisual Patterns, Trends, Exceptions

Understanding

Data

Representation/Encoding

Page 10: Graph Construction - dbdmg.polito.it

Relationships

▪ Within a category

Nominal comparison

Ranking

Part-to-whole

Distribution

▪ Between measures

Time series

Deviation

Correlation

10

Page 11: Graph Construction - dbdmg.polito.it

Quantitative encoding

11

Page 12: Graph Construction - dbdmg.polito.it

Nominal comparison

▪ Compare quantitative values corresponding to categorical levels

Small differences are difficult to see

– Non zero-based scale can emphasize

Dot plots can be used for small differences

– They do not require zero based scale

12

Page 13: Graph Construction - dbdmg.polito.it

Line length - Bars chart

0 20 40 60 80 100

Large

Medium

Small

Micro

Number of companies

Size

13

Page 14: Graph Construction - dbdmg.polito.it

Vertical Bars (aka Columns)

0

20

40

60

80

100

Large Medium Small Micro

Num

ber

of

com

panie

s

Size of the company

14

Page 15: Graph Construction - dbdmg.polito.it

Bar charts

▪ Categorical values are encoded as position along an axis

▪ Quantitative values are encoded only as length of the bars

The axis is a supporting element

▪ Width of bars plays no role

Bars are just very thick lines

▪ Bars require a zero-based scale

See: Lie factor!

15

Page 16: Graph Construction - dbdmg.polito.it

Comparison - Barplot

16

Page 17: Graph Construction - dbdmg.polito.it

Barplot (non zero based scale)

17

Page 18: Graph Construction - dbdmg.polito.it

Barplot (non zero based scale)

18

Proportionality:

Page 19: Graph Construction - dbdmg.polito.it

Barplot vertical labels

19

Page 20: Graph Construction - dbdmg.polito.it

Bars Guidelines

▪ Use horizontal bars when

A descending order ranking

Categorical label don’t fit

▪ Proximity

Use a 1:1 bar:spacing ratio ±50%

No spacing between bars that are not labeled on the axis (legend categories)

No overlapping bars

20

Page 21: Graph Construction - dbdmg.polito.it

Position - Dots plot

21

0 20 40 60 80 100

Large

Medium

Small

Micro

Size

Number of Companies

Page 22: Graph Construction - dbdmg.polito.it

Dot plots

▪ Categorical values are encoded as position along an axis

▪ Quantitative values are encoded as position along an axis

There is no need to have a zero based axis range

22

Page 23: Graph Construction - dbdmg.polito.it

Comparison – Dot plot

23

Page 24: Graph Construction - dbdmg.polito.it

Area - Bubble plot

24

Extremely difficult to compare size

Page 25: Graph Construction - dbdmg.polito.it

Count - Isotype

▪ Isotype

International System Of Typographic Picture Education

▪ Marie and Otto Neurath

Vienna, 1936

25

Page 26: Graph Construction - dbdmg.polito.it

Ranking

26

▪ Same type as nominal comparison

▪ Pay attention to order

Bar graphs

Dot plot

– Allow non zero-based axes

Page 27: Graph Construction - dbdmg.polito.it

Ranking

27

Purpose Sort order Chart orientation

Highlight the highest value

DescendingH: highest on topV: highest on left

Highlight the lowest value

AscendingH: lowest on topV: lowest on left

Page 28: Graph Construction - dbdmg.polito.it

Ranking - Barplot

28

Page 29: Graph Construction - dbdmg.polito.it

Ranking – Dot plot

29

Page 30: Graph Construction - dbdmg.polito.it

Lollypop (non zero based scale)

30

Page 31: Graph Construction - dbdmg.polito.it

Lollypop (zero based scale)

31

Page 32: Graph Construction - dbdmg.polito.it

Deviation

▪ To what degree one or more sets of values differ in relation to primary values.

Points (dots)

Gauge

Bars

Bullet

32

Page 33: Graph Construction - dbdmg.polito.it

Angle + Position - Gauge

33

Satisfaction

Page 34: Graph Construction - dbdmg.polito.it

Length+Position- Bullet Graph

34

https://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf

Page 35: Graph Construction - dbdmg.polito.it

Pre-post variation

▪ Comparing several categorical values typically two conditions

Pre vs. post

With vs. without

35

Page 36: Graph Construction - dbdmg.polito.it

Slope chart

36

Page 37: Graph Construction - dbdmg.polito.it

Dumbbell plot

37

Page 38: Graph Construction - dbdmg.polito.it

Clustered bars

38

Page 39: Graph Construction - dbdmg.polito.it

Proportion (Part-to-whole)

▪ Best unit: percentage

▪ Stacked bar graph

Difficult to read individual values

▪ Stacked area

▪ Treemap

▪ Gridplot

▪ Pie / Donut

▪ Marimekko

39

Page 40: Graph Construction - dbdmg.polito.it

Length – Stacked Bar

40

Page 41: Graph Construction - dbdmg.polito.it

Beware MS-Excel Default

41

98%

99%

99%

99%

99%

99%

100%

100%

100%

100%

1

NO

YES

A B

1 YES 99%

2 NO 1%

Page 42: Graph Construction - dbdmg.polito.it

Stacked bar graph

42

?

Page 43: Graph Construction - dbdmg.polito.it

Stacked bars w/percentage

43

Page 44: Graph Construction - dbdmg.polito.it

Area - Treemap

44

Page 45: Graph Construction - dbdmg.polito.it

Area - Treemap

45

Page 46: Graph Construction - dbdmg.polito.it

Area + Count – Waffle / Grid

46

Page 47: Graph Construction - dbdmg.polito.it

Area + Angle – Pie Chart

47

Page 48: Graph Construction - dbdmg.polito.it

Pies

48

Page 49: Graph Construction - dbdmg.polito.it

Pies vs. Bars

49

Page 50: Graph Construction - dbdmg.polito.it

Pie Charts: guidelines

▪ Have serious limitations

To represent part-whole relationship

Only with a small number of categories

– Up to four

– Avoid rainbow pie

When proportions are distinct enough

▪ Remember to ease reading

Labels placed close to slices

Labels include values (percentages)

50

Page 51: Graph Construction - dbdmg.polito.it

Area/Angle/Length – Donut

51

Page 52: Graph Construction - dbdmg.polito.it

Pareto chart

52

Page 53: Graph Construction - dbdmg.polito.it

Marimekko Chart

53https://www.fusioncharts.com/chart-primers/marimekko-chart/

Page 54: Graph Construction - dbdmg.polito.it

Distribution

▪ Two main types

Show distribution of single set of values

Show and compare two or more distributions

54

Page 55: Graph Construction - dbdmg.polito.it

Single distribution

▪ Histogram Vertical bar graph

Frequency for subdivision– Quantitative ranges

– Categories

Emphasis on number of occurrences

▪ Frequency polygon Line graphs

Frequency density function

Emphasis on the shape of the distribution

▪ Boxplot Summary

55

Page 56: Graph Construction - dbdmg.polito.it

Histogram

56

Page 57: Graph Construction - dbdmg.polito.it

Frequency polygon

57

Page 58: Graph Construction - dbdmg.polito.it

Boxplot

58

▪ Max value

▪ 3rd quartile

▪ Median

2nd quartile

▪ 1st quartile

▪ Min value

▪ Outlier

Page 59: Graph Construction - dbdmg.polito.it

Violin plot

59

▪ Max value

▪ Frequency polygon

mirrored

▪ Min value

Page 60: Graph Construction - dbdmg.polito.it

Violin + Boxplot

60

▪ Overlaying a box plot over the violin provides additional details

Page 61: Graph Construction - dbdmg.polito.it

Multiple distribution

▪ Histogram is not suitable

▪ Frequency polygon

Line graphs

Frequency density function

▪ Boxplot

Summary

Less distracting with high number of categories

61

Page 62: Graph Construction - dbdmg.polito.it

Paired diverging bargraph

62

https://unstats.un.org/unsd/genderstatmanual/Print.aspx?Page=Presentation-of-gender-statistics-in-graphs

Page 63: Graph Construction - dbdmg.polito.it

Multiple Frequency polygons

63

Page 64: Graph Construction - dbdmg.polito.it

Multiple Box plot

64

Page 65: Graph Construction - dbdmg.polito.it

Violin plot

65

Page 66: Graph Construction - dbdmg.polito.it

Multiple box plots

66

Page 67: Graph Construction - dbdmg.polito.it

Multiple violin plots

67

Page 68: Graph Construction - dbdmg.polito.it

Confidence Intervals

68

Error Bars Considered Harmful: Exploring Alternate Encodings for Mean and Error Michael Correll, and Michael GleicherIEEE Transactions on Visualization and Computer Graphics, Dec. 2014

Page 69: Graph Construction - dbdmg.polito.it

Interval may be Asymmetric

69

It is physically impossible to

modify -6 files

Page 70: Graph Construction - dbdmg.polito.it

Likert / Agreement

▪ Likert scale:

Measures agreement / disagreement with a given statement

Response on an ordinal scale, e.g.– Definitely No

– Mostly No

– Undecided

– Mostly Yes

– Definitely Yes

▪ Often used to measure positive vs. negative perception

70

Page 71: Graph Construction - dbdmg.polito.it

Diverging stacked bars

71

Macroarea N° Domanda

1Il carico di studio complessivo degli insegnamenti previsti nel

periodo didattico è accettabile?

2L'orario degli insegnamenti del periodo didattico è ben

organizzato?

3Le regole d'esame, gli obiettivi e il programma

dell'insegnamento sono stati resi noti in modo chiaro?

4L'insegnamento è stato svolto in maniera coerente con quanto

dichiarato sul portale della didattica?

5Le conoscenze preliminari da me possedute sono risultate

sufficienti per la comprensione della materia ?

6Il carico di studio richiesto da questo insegnamento è

proporzionato ai crediti assegnati?

7Il materiale didattico, indicato o fornito, è adeguato per lo

studio della materia?

8Le attività didattiche integrative (esercitazioni, lab, seminari,

visite, ecc.) sono utili per l'apprendimento della materia?

9Il docente rispetta gli orari di svolgimento dell'attività

didattica?

10 Il docente è disponibile a fornire chiarimenti e spiegazioni?

11Il docente interagisce efficacemente con gli studenti,

stimolando l'interesse verso la materia?

12 Il docente espone gli argomenti in modo chiaro?

13 Le aule in cui si svolgono le lezioni sono adeguate?

14I locali e le attrezzature per le attività didattiche integrative

sono adeguati?

15Sono interessato agli argomenti di questo insegnamento?

(indipendentemente da come è stato svolto)

16 Sono soddisfatto di come è stato svolto questo insegnamento?

17Al fine dell apprendimento, la frequenza alle attività didattiche

è utile?

Organizzazione del

periodo didattico

Organizzazione di

questo insegnamento

Efficacia del docente

Infrastrutture

Interesse e

soddisfazione

-50% 0% 50% 100%

D1

D2

D3

D4

D5

D6

D7

D8

D9

D10

D11

D12

D13

D14

-50% 0% 50% 100%

D15

D16

D17

Page 72: Graph Construction - dbdmg.polito.it

Time series

▪ Series of relationships between quantitative values that are associated with categorical subdivisions of time

▪ Communicate

Change

Rise

Increase

Fluctuate

72

Grow

Decline

Decrease

Trend

Page 73: Graph Construction - dbdmg.polito.it

Time series

▪ Time grows from left to right

Cultural convention

▪ Vertical bars

highlight individual points in time

hide overall trend

73

Page 74: Graph Construction - dbdmg.polito.it

Line plot

74

Page 75: Graph Construction - dbdmg.polito.it

Bars

75

Page 76: Graph Construction - dbdmg.polito.it

Streamgraph

76http://www.neoformix.com/2008/TwitterTopicStream.html

Page 77: Graph Construction - dbdmg.polito.it

Correlation

▪ Relationships between two paired sets of quantitative values

Scatter plot w/possible trend line

– Ok for educated audience

Paired bar graph

77

Page 78: Graph Construction - dbdmg.polito.it

Points

0

1

2

3

4

5

6

7

8

9

10

0 5 10 15 20 25

78

Page 79: Graph Construction - dbdmg.polito.it

Points Guidelines

▪ Points must be clearly distinguished

Enlarge points

Select radically distinct shapes (✚)

Balance size of points and graph

Use outlined shapes

▪ Lines must not obscure points

79

Page 80: Graph Construction - dbdmg.polito.it

Scatter plot

80

Page 81: Graph Construction - dbdmg.polito.it

Overplotting

▪ Phenomenon related to multiple points (or shapes) overlapping

Discrete (integer) measure

Very large dataset

▪ Solutions

Small shapes

Outlined shapes

Transparent shapes (alpha)

Jittering

81

Page 82: Graph Construction - dbdmg.polito.it

Overplotting example

82

Page 83: Graph Construction - dbdmg.polito.it

Overplotting - Small

83

Page 84: Graph Construction - dbdmg.polito.it

Overplotting - Outlined

84

Page 85: Graph Construction - dbdmg.polito.it

Overplotting - Transparent

85

Page 86: Graph Construction - dbdmg.polito.it

Overplotting - Jittering

86

Page 87: Graph Construction - dbdmg.polito.it

Points and Lines

0

500

1000

1500

2000

2500

3000

3500

4000

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

87

The slope encodes the amount of change.Warning: non linear!

Page 88: Graph Construction - dbdmg.polito.it

Slope of lines

0

500

1000

1500

2000

2500

3000

3500

4000

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

88

Page 89: Graph Construction - dbdmg.polito.it

Slope of lines

0

1

2

3

4

5

6

7

8

9

10

0 5 10 15 20 25

89

Trend lineLine of best fitThe slope encodes the regression coefficient

Page 90: Graph Construction - dbdmg.polito.it

Lines

▪ Easy perception of trends and overall shape of data

▪ Best suited for time series

▪ Variation encoded as slope

Clear direction

Approximate magnitude

90

Page 91: Graph Construction - dbdmg.polito.it

Paired diverging bars

91

Page 92: Graph Construction - dbdmg.polito.it

Categorical encoding attributes

▪ Encoding of categorical levels

Position (along an axis)

Size

Color– Intensity

– Saturation

– Hue

Shape

Fill pattern

Line style

92

Ordinal

Page 93: Graph Construction - dbdmg.polito.it

Position

0

10

20

30

40

50

60

70

80

90

Large Medium Small Micro

Number of

companies

93

Page 94: Graph Construction - dbdmg.polito.it

Color (hue)

0

100.000

200.000

300.000

400.000

500.000

600.000

Q1 Q2 Q3 Q4

2003 Sales

Direct Indirect

94

Position ×

Page 95: Graph Construction - dbdmg.polito.it

Size

95

Page 96: Graph Construction - dbdmg.polito.it

Point shape

600.000

650.000

700.000

750.000

800.000

850.000

Q1 Q2 Q3 Q4

Booking Billing

96

Page 97: Graph Construction - dbdmg.polito.it

Line style

600.000

650.000

700.000

750.000

800.000

850.000

Q1 Q2 Q3 Q4

Booking

Billing

97

Page 98: Graph Construction - dbdmg.polito.it

Fill Texture

98

Page 99: Graph Construction - dbdmg.polito.it

Discretization / Quantization

▪ A data transformation that maps a quantitative measure into an ordinal one

Based on the definition of intervals

▪ Discretized measures can be encoded using an ordinal-friendly visual attribute

Size

Color

▪ Warning: details are lost in the process

99

Page 100: Graph Construction - dbdmg.polito.it

Heatmaps

100http://graphics.wsj.com/infectious-diseases-and-vaccines/

Page 101: Graph Construction - dbdmg.polito.it

Heatmaps

▪ Hues have no unique order semantics

Only intensity has one

▪ Rainbow palette have serious problems for color blinds

Roughly 5% of the population

101

Page 102: Graph Construction - dbdmg.polito.it

Heatmaps

102

Page 103: Graph Construction - dbdmg.polito.it

SUPPORT ELEMENTS

103

Page 104: Graph Construction - dbdmg.polito.it

Support elements

▪ Axes

Ticks

▪ Graph area

Grids

▪ Labels

▪ Legends

▪ References

▪ Trellies

104

Page 105: Graph Construction - dbdmg.polito.it

Axes

▪ Allow positioning of elements

Points

Extremes of bars and lines

▪ Labeled

What is the measure?

▪ Number of axis should be 2

1 is fine for bars

– continuity gestalt principle

105

Page 106: Graph Construction - dbdmg.polito.it

Tick marks

▪ Must not obscure data objects

▪ Outside the data region

▪ Avoid for categorical scales

▪ Balanced number

Too many clutter the graph

Too few make difficult to discern reference for data objects

Intervals must be equally spaced

106

Page 107: Graph Construction - dbdmg.polito.it

Multiple variables

▪ Correlation between 3+ variables

E.g. two measures in time series

▪ Multiple units of measure

Double quantitative (y) axis

Multiple graphs

One variable not encoded explicitly

107

Page 108: Graph Construction - dbdmg.polito.it

Double scale

108

Page 109: Graph Construction - dbdmg.polito.it

Double scale (alternative)

109

Page 110: Graph Construction - dbdmg.polito.it

Multiple graphs

110

Page 111: Graph Construction - dbdmg.polito.it

Path

111

Page 112: Graph Construction - dbdmg.polito.it

Small multiples

▪ A.k.a.

Trellis

Lattice

Grid

▪ Set of aligned graphs sharing (at least one) scale and axis

Enable ease of comparison among different measures

112

Page 113: Graph Construction - dbdmg.polito.it

Small multiples

113

FT EU unemployment trackerhttp://blogs.ft.com/ftdata/2015/04/17/eu-unemployment-tracker/

Page 114: Graph Construction - dbdmg.polito.it

Trellis

▪ Sequence

Intrinsic order

Order of relevance

Order by some quantitative attribute

▪ Rules and grids

Use when spacing is not enough

Can direct the reader to scan graphs horizontally or vertically

114

Page 115: Graph Construction - dbdmg.polito.it

Log scale

▪ Reduce visual difference between quantitative data sets with significantly wide ranges

▪ Differences are proportional to percentages

115

Page 116: Graph Construction - dbdmg.polito.it

Log scale

116

100

180

324

0

100

200

300

400

A B C

100180

324

1

10

100

1000

A B C

+80

+144

+80%+80%

Same absolute gainscorrespond to same distance

Same percentage gains correspond to same distance

Page 117: Graph Construction - dbdmg.polito.it

Log scale

117

0

20000

40000

60000

80000

100000

120000

140000

Q1 Q2 Q3 Q4

North

South

1

10

100

1000

10000

100000

1000000

Q1 Q2 Q3 Q4

North

South

Parallel lines for same absolute gains

Parallel lines for same percentage gains

Page 118: Graph Construction - dbdmg.polito.it

Graph area

▪ Aspect ratio should not distort perception

Typically wider than taller

Scatter plots may be squared

▪ Grid lines must be thin and light

Useful to look-up values

Enhance comparison of values

Enhance perception of localized patterns

118

Page 119: Graph Construction - dbdmg.polito.it

Labels

▪ Important elements (e.g. titles) should be prominent

Top

Larger

119

Page 120: Graph Construction - dbdmg.polito.it

Guthenberg Diagram

120

Primary area Strong fallow area

Weak fallow area Terminal area

Page 121: Graph Construction - dbdmg.polito.it

Guthenberg Diagram

121

Primary area Strong fallow area

Weak fallow area Terminal area

Page 122: Graph Construction - dbdmg.polito.it

Legends

▪ Used for categorical attributes not associated to any axis

▪ As close as possible to the objects

▪ Less prominent than data objects

▪ Borders are used only when necessary to separate from other elements

122

Page 123: Graph Construction - dbdmg.polito.it

Legends

▪ Text should be as close as possible to the object it complements

Prefer direct labeling to separate legends

▪ Number of categorical subdivisions

Perceptual limit is between 5 and 8

Limit is independent of the visual attribute used to encode it

Joint use of attributes ease discrimination

123

Page 124: Graph Construction - dbdmg.polito.it

Legend

600.000

650.000

700.000

750.000

800.000

850.000

Q1 Q2 Q3 Q4

Booking

Billing

124

Page 125: Graph Construction - dbdmg.polito.it

Direct labeling

600.000

650.000

700.000

750.000

800.000

850.000

Q1 Q2 Q3 Q4

Booking

Billing

125

Page 126: Graph Construction - dbdmg.polito.it

Direct labeling and color

600.000

650.000

700.000

750.000

800.000

850.000

Q1 Q2 Q3 Q4

Booking

Billing

126

Page 127: Graph Construction - dbdmg.polito.it

Legend

0 100 200 300 400 500 600

Q1

Q2

Q3

Q4

Migliaia

2003 Sales Indirect

Direct

127

Page 128: Graph Construction - dbdmg.polito.it

Direct labeling

0 100 200 300 400 500 600

Q1

Q2

Q3

Q4

Migliaia

2003 SalesIndirect

Direct

128

Page 129: Graph Construction - dbdmg.polito.it

Reference lines and regions

▪ Reference lines support an easy comparison to a given value

Mean

Threshold

▪ Reference regions allow comparison with several values

Use background color

129

Page 130: Graph Construction - dbdmg.polito.it

DASHBOARD

130

Page 131: Graph Construction - dbdmg.polito.it

Dashboard

Visualization of the most relevantinformation

needed to achieve one or more goals

which fits entirely on a single screen so it can be monitored at a glance

131

Page 132: Graph Construction - dbdmg.polito.it

Dashboard

▪ Dashboards display mechanisms are

small

concise

clear

intuitive

▪ Dashboards are customized

To suit the goals of person, group, function

132

Page 133: Graph Construction - dbdmg.polito.it

Provide context for data

▪ References allow judging the data

133

Figure 3‐3. This dashboard demonstrates the effectiveness that is sacrificed when scrolling is required to see all the information. 

3.2. Supplying Inadequate Context for the Data Measures of what's currently going on in the business rarely do well as a solo act; they need a good 

supporting cast to succeed. For example, to state that quarter‐to‐date sales total $736,502 without any 

context means little. Compared to what? Is this good or bad? How good or bad? Are we on track? Are we 

doing better than we have in the past, or worse than we've forecasted? Supplying the right context for key 

measures makes the difference between numbers that just sit there on the screen and those that enlighten 

and inspire action. 

The gauges in Figure 3‐4 could easily have incorporated useful context, but they fall short of their potential. 

For instance, the center gauge tells us only that 7,822 units have sold this year to date, and that this 

number is good (indicated by the green arrow). A quantitative scale on a graph, such as the radial scales of 

tick marks on these gauges, is meant to provide an approximation of the measure, but it can only do so if 

the scale is labeled with numbers, which these gauges lack. If the numbers had been present, the positions 

of the arrows might have been meaningful, but here the presence of the tick marks along a radial axis 

suggests useful information that hasn't actually been included. 

Figure 3‐4. These dashboard gauges fail to provide adequate context to make the measures meaningful. 

These gauges use up a great deal of space to tell us nothing whatsoever. The same information could have 

been communicated simply as text in much less space, without any loss of meaning: 

Table 3‐1.  

YTD Units  7,822 

October Units  869 

Returns Rate  0.26% 

 

Another failure of these gauges is that they tease us by coloring the arrows to indicate good or bad 

performance, without telling us how good or bad it is. They could easily have done this by labeling the 

quantitative scales and visually encoding sections along the scales as good or bad, rather than just encoding 

the arrows in this manner. Had this been done, we would be able to see at a glance how good or bad a 

measure is by how far the arrow points into the good or bad ranges. 

The gauge that appears in Figure 3‐5 does a better job of incorporating context in the form of meaningful 

comparisons. Here, the potential of the graphical display is more fully realized. The gauge measures the 

average duration of phone calls and is part of a larger dashboard of call‐center data. 

Supplying context for measures need not always involve a choice of the single best comparisonrather, 

several contexts may be given. For instance, quarter‐to‐date sales of $736,502 might benefit from 

comparisons to the budget target of $1,000,000; sales on this day last year of $856,923; and a time‐series 

of sales figures for the last six quarters. Such a display would provide much richer insight than a simple 

display of the current sales figure, with or without an indication of whether it's "good" or "bad." You must 

be careful, however, when incorporating rich context such as this to do so in a way that doesn't force the 

viewer to get bogged down in reading the details to get the basic message. It is useful to provide a visually 

prominent display of the primary information and to subdue the supporting context somewhat, so that it 

doesn't get in the way when the dashboard is being quickly scanned for key points. 

Figure 3‐5. This dashboard gauge (found in a paper entitled "Making Dashboards Actionable," written by Laurie M. Orlov and published in December 2003 by Forrester Research, Inc.) does a better job than those in Figure 3‐4 of using a gauge effectively. 

PUC

Page 134: Graph Construction - dbdmg.polito.it

Use appropriate detail

▪ Typical counter-examples

Dates with seconds detail

Decimals

134

136,0

PUC

Page 135: Graph Construction - dbdmg.polito.it

Use the right measures

▪ If you are interested in e.g. the difference, ratio, variation show such derived measure

135

-0,25

0,00

0,25

0,50

0,75

1,00

1,25

1,50

2015 2016 2017 2018 2019 2020

Variazione Debito Pubblico (% PIL)

PD M5S-L

Page 136: Graph Construction - dbdmg.polito.it

Use appropriate visualization

▪ Typical errors:

Any chart when a table would be better

Pie-charts not representing part-whole

Bubble charts

136

Page 137: Graph Construction - dbdmg.polito.it

Visualization instruments

▪ Tables

Textual information

▪ Graphs

Visual information

137

Page 138: Graph Construction - dbdmg.polito.it

Avoid decorations

▪ Skeumorphic design

▪ Backgrounds motives

▪ Color gradients

▪ Variations not encoding any measure

Typically color

138

Page 139: Graph Construction - dbdmg.polito.it

Avoid decorations

▪ Skeumorphic design

▪ Backgrounds motives

▪ Color gradients

▪ Variations not encoding any measure

Typically color

139

Page 140: Graph Construction - dbdmg.polito.it

Avoid decorations

▪ Skeumorphic design

▪ Backgrounds motives

▪ Color gradients

▪ Variations not encoding any measure

Typically color

140

A

B

Page 141: Graph Construction - dbdmg.polito.it

Avoid decorations

▪ Skeumorphic design

▪ Backgrounds motives

▪ Color gradients

▪ Variations not encoding any measure

Typically color

141

Page 142: Graph Construction - dbdmg.polito.it

3D diagrams

▪ Encoding

Axonometry typically hides some data and makes comparison hard

▪ Not encoding

Perspective deform dimensions

Depth or height distract and make comparison more difficult

142

Page 143: Graph Construction - dbdmg.polito.it

Encoding 3D

143

Ricerca

Vendite

Gestione

Contabilità

0

10

20

30

40

50

60

70

Page 144: Graph Construction - dbdmg.polito.it

Encoding 3D → 2D

144

0 20 40 60 80

Paghe

Attrezzature

Viaggi

Consumabili

Software

Altro

Ricerca

0 20 40 60 80

Vendite

0 20 40 60 80

Gestione

0 20 40 60 80

Contabilità

Page 145: Graph Construction - dbdmg.polito.it

Decorative 3D

145

0

100000

200000

300000

400000

500000

600000

700000

2015 20142013

20122011

20102009

20082007

Immatricol.

FIAT

WV

Ford

Page 146: Graph Construction - dbdmg.polito.it

Decorative 3D → 2D

146

FIAT

VW

Ford

0

100

200

300

400

500

600

2007 2009 2011 2013 2015

Immatricol.

Mig

liaia

Anno

Immatricolazioni auto per marchio

sul mercato italiano

Page 147: Graph Construction - dbdmg.polito.it

References

▪ Stephen Few, 2004. Show me the numbers. Analytics Press.

http://www.perceptualedge.com/blog/

▪ Edward R. Tufte, 1983. The Visual Display of Quantitative Information. Graphics Press.

147

Page 148: Graph Construction - dbdmg.polito.it

References

▪ Wilkinson, L. (2006). The grammar of graphics. Springer Science & Business Media.

▪ Wickham, H. (2010). A layered grammar of graphics. Journal of Computational and Graphical Statistics, 19(1), 3-28.

▪ Visual Vocabulary http://ft.com/vocabulary

148

Page 149: Graph Construction - dbdmg.polito.it

References

▪ R.Olson. Revisiting the vaccine visualization

http://www.randalolson.com/2016/03/04/revisiting-the-vaccine-visualizations/

▪ Nathan Yau. 9 Ways to Visualize Proportions – A Guide

http://flowingdata.com/2009/11/25/9-ways-to-visualize-proportions-a-guide/

▪ M.Correll, and M.Gleicher. Error Bars Considered Harmful: Exploring Alternate Encodings for Mean and Error IEEE Transactions on Visualization and Computer Graphics, Dec. 2014 http://graphics.cs.wisc.edu/Papers/2014/CG14/Prep

rint.pdf

149