IAT 814 Visualization Representation: Design Idioms 1

93
IAT 814 Visualization Representation: Design Idioms 1 Lyn Bartram These slides borrow heavily from T. Munzner and S. Few, and may be incompletely attributed. Work in progress.

Transcript of IAT 814 Visualization Representation: Design Idioms 1

Page 1: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 Visualization

Representation: Design Idioms 1 Lyn Bartram

These slides borrow heavily from T. Munzner and S. Few, and may be incompletely attributed. Work in progress.

Page 2: IAT 814 Visualization Representation: Design Idioms 1

Recall: Data Abstractions

•  Tables •  Data item (row) with attributes (columns) : row=key, cells = values

•  Networks •  Item (node) with attributes (features) and relations (links) •  Trees (hierarchy) •  Node = key, node-node, link = key, cell = value

•  Text/Logs •  Grammar •  Bag of words •  Derived values

•  Image •  2d location = key, pixel value expresses single attribute or combo of attributes

according to coding (RGB)

IAT 814 | Design Choices 1 2

Page 3: IAT 814 Visualization Representation: Design Idioms 1

Recall: Why

IAT 814 | Design Choices 1 3

Page 4: IAT 814 Visualization Representation: Design Idioms 1

Vis tasks and targets [Munzner]

IAT 814 | Design Choices 1 4

Page 5: IAT 814 Visualization Representation: Design Idioms 1

User Tasks (why)

•  Amar & Stasko created a taxonomy of user tasks in visualization environments

•  10 basic actions •  Retrieve Value, Filter, Compute Derived Value, Find

Extremum, Sort, Determine Range, Characterize Distribution, Find Anomalies, Cluster, Correlate

IAT 814 | Design Choices 1 5

Page 6: IAT 814 Visualization Representation: Design Idioms 1

1. Retrieve Value

•  General Description: •  Given a set of specific items, find attributes-related values of

those items.

•  Examples: •  What is the mileage per gallon of the Audi TT? •  How long is the movie Gone with the Wind?

IAT 814 | Design Choices 1 6

Page 7: IAT 814 Visualization Representation: Design Idioms 1

2. Filter

•  General Description: •  Given some concrete conditions on attribute values, find data

cases satisfying those conditions.

•  Examples: •  What Kellogg's cereals have high fiber? •  What comedies have won awards? •  Which funds underperformed the S&P-500?

IAT 814 | Design Choices 1 7

Page 8: IAT 814 Visualization Representation: Design Idioms 1

3. Compute Derived Value

•  General Description: •  Given a set of data cases, compute an aggregate numeric

representation of those data cases.

•  Examples: •  What is the gross income of all stores combined? •  How many manufacturers of cars are there? •  What is the average calorie content of Post cereals?

IAT 814 | Design Choices 1 8

Page 9: IAT 814 Visualization Representation: Design Idioms 1

4. Find Extreme

•  General Description: •  Find data cases possessing an extreme value of an attribute

over its range within the data set.

•  Examples: •  What is the car with the highest MPG? •  What director/film has won the most awards? •  Which national hockey team has won the most Olympic Gold

medals since 1912?

IAT 814 | Design Choices 1 9

Page 10: IAT 814 Visualization Representation: Design Idioms 1

5. Sort/Order

•  General Description: •  Given a set of data cases, rank them according to some ordinal

metric.

•  Examples: •  Order the cars by weight. •  Rank the cereals by calories.

IAT 814 | Design Choices 1 10

Page 11: IAT 814 Visualization Representation: Design Idioms 1

6. Determine Range

•  General Description: •  Given a set of data cases and an attribute of interest, find the

span of values within the set.

•  Examples: •  What is the range of film lengths? •  What is the range of car horsepowers? •  What actresses are in the data set?

IAT 814 | Design Choices 1 11

Page 12: IAT 814 Visualization Representation: Design Idioms 1

7. Characterize Distribution

•  General Description: •  Given a set of data cases and a quantitative attribute of

interest, characterize the distribution of that attribute values over the set.

•  Examples: •  What is the distribution of carbohydrates in cereals? •  What is the age distribution of shoppers?

IAT 814 | Design Choices 1 12

Page 13: IAT 814 Visualization Representation: Design Idioms 1

7a. Part-whole

•  General Description: •  Given a set of data items that differ in values in one category,

reveal the portion that each value represents to some whole.

•  Examples: •  How many Conservatives are women? •  How do our tax dollars get spent? •  What is the recommended daily caloric intake across food

types for pregnant women?

IAT 814 | Design Choices 1 13

Page 14: IAT 814 Visualization Representation: Design Idioms 1

8. Find Anomalies

•  General Description: •  Identify any anomalies within a given set of data cases with

respect to a given relationship or expectation, e.g. statistical outliers.

•  Examples: •  Are there any cereals that have high calories but low sugar? •  Are there exceptions to the relationship between horsepower

and acceleration?

IAT 814 | Design Choices 1 14

Page 15: IAT 814 Visualization Representation: Design Idioms 1

9. Cluster

•  General Description: •  Given a set of data cases, find clusters of similar attribute

values. •  Note: you need to determine what “similar” is

•  Examples: •  Are there groups of cereals w/ similar fat/calories/sugar? •  Are all comedies the same length?

IAT 814 | Design Choices 1 15

Page 16: IAT 814 Visualization Representation: Design Idioms 1

10. Correlate

•  General Description: •  Given a set of data cases and two attributes, determine useful

relationships between the values of those attributes.

•  Examples: •  Is there a correlation between carbohydrates and fat? •  Is there a correlation between country of origin and MPG? •  Do different genders have a preferred payment method? •  Is there a trend of increasing film length over the years?

IAT 814 | Design Choices 1 16

Page 17: IAT 814 Visualization Representation: Design Idioms 1

Discussion: Compound Tasks

•  “Sort the cereal manufacturers by average fat content” •  Compute derived value; Sort

•  “Which actors have co-starred with Julia Roberts?” •  Filter; Retrieve value

•  “What’s the variation in cereal sugar content”? •  Compute derived value; determine range; characterise

distribution

IAT 814 | Design Choices 1 17

Page 18: IAT 814 Visualization Representation: Design Idioms 1

What was left out? Aha analytics!

•  Basic math •  “Which cereal has more sugar, Cheerios or Special K?” •  “Compare the average MPG of American and Japanese cars.”

•  Uncertain criteria •  “Does cereal (X, Y, Z…) sound tasty?” •  “What are the characteristics of the most valued customers?”

•  Higher-level tasks •  “How do mutual funds get rated?” •  “Are there car aspects that Toyota has concentrated on?”

•  More qualitative comparison •  “How does the Toyota RAV4 compare to the Honda CRV?” •  “What other cereals are most similar to Trix?”

IAT 814 | Design Choices 1 18

Page 19: IAT 814 Visualization Representation: Design Idioms 1

Fundamental principles: how

Expressiveness: •  the visual encoding should express all of, and only, the

information in the dataset attributes

Effectiveness: •  the importance of the attribute should match the

salience of the channel. •  Use the strongest and most accurate channels for the

most important interpretation tasks (data)

IAT 814 | Design Choices 1 19

Page 20: IAT 814 Visualization Representation: Design Idioms 1

Recall How version 1: Channel Expressiveness and Effectiveness

IAT 814 | Design Choices 1 20

Credit: T. Munzner, 2014

Page 21: IAT 814 Visualization Representation: Design Idioms 1

Roadmap so far

Part 1: principles •  Data •  Perception •  Visual encoding •  (interaction to come

later)

Part 2: Methods (How v2!) •  What defines the

design space? •  Taxonomy of design

considerations •  How many views?

•  How to reduce

IAT 814 | Design Choices 1 21

Page 22: IAT 814 Visualization Representation: Design Idioms 1

A Framework for Analysis (Munzner)

IAT 814 | Design Choices 1 22

Design IDIOM

Data IDIOM

Task IDIOM

Page 23: IAT 814 Visualization Representation: Design Idioms 1

•  A visualisation idiom is a distinct approach to creating and manipulating visual representations.

•  Data: the types and hierarchical salience of the information to represent

•  Design: the visual encoding and organisation choices •  Interaction: the methods to man

IAT 814 | Design Choices 1 23

Page 24: IAT 814 Visualization Representation: Design Idioms 1

Slide adapted from Jeff Heer 2014

From data model to type

IAT 814 | Design Choices 1 24 Sepia and petal length for three species of iris [Fisher 1936]

Q O N

Page 25: IAT 814 Visualization Representation: Design Idioms 1

Possible views – scatter plot – why?

IAT 814 | Design Choices 1 25

Distribution and correlations between variables

Page 26: IAT 814 Visualization Representation: Design Idioms 1

Possible views – scatter plot – why?

IAT 814 | Design Choices 1 26

Easy with 2/3 dimensions

Page 27: IAT 814 Visualization Representation: Design Idioms 1

•  www

IAT 814 | Design Choices 1 27

Harder with more !!

Page 28: IAT 814 Visualization Representation: Design Idioms 1

We can remodel the data

IAT 814 | Design Choices 1 28

•  Add abstraction

Page 29: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1 29

2 Nominal

Page 30: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1 30

Change representation

Page 31: IAT 814 Visualization Representation: Design Idioms 1

Perfect positive : r=1 Strong positive : r=0.97 positive : r=0.8

Strong negative : r=10.98 No correlation: r = 0.16 Nonlinear correlation

Scatter plots show correlations

IAT 814 | Design Choices 1 31

Page 32: IAT 814 Visualization Representation: Design Idioms 1

However …

•  Scatter plots can be difficult to understand

•  What alternatives are there?

•  More generally, what kinds of techniques are best for what kinds of problems?

IAT 814 | Design Choices 1 32

Page 33: IAT 814 Visualization Representation: Design Idioms 1

33

Common 2D design idioms

IAT 814 | Design Choices 1

Page 34: IAT 814 Visualization Representation: Design Idioms 1

Design choices for tabular data

Tabular data are KeyàValue vectors.

•  Key/Attribute: property of the data that can be used to index into (sort by/look up) the set. (independent variable) •  N, O

•  Value : the actual value of an individual item •  N,O,Q,

IAT 814 | Design Choices 1 34

Credit: T. Munzner, 2014

Page 35: IAT 814 Visualization Representation: Design Idioms 1

If all you want is a single precise value ….

IAT 814 | Design Choices 1 35

Page 36: IAT 814 Visualization Representation: Design Idioms 1

The first question: Table or graph? []

•  Will the data be used to look up and compare individual values, or will the data need to be precise? If so, you should display it in a table.

•  Is the message contained in the shape of the data—in trends, patterns, exceptions, or comparisons that involve more than a few values? If so, you should display it in a graph.

•  NOTE: (You can use both. Next time and beyond).

IAT 814 | Design Choices 1 36

Page 37: IAT 814 Visualization Representation: Design Idioms 1

Key-value question defines idiom choice (1) [Munzner]

•  2values

•  1 Key and 1 value

•  2 Keys and 1 value

IAT 814 | Design Choices 1 37

0

10

20

30

40

50

60

70

80

90

100

0 5 10 15

Circumference (ft)

Heig

ht (f

t)

1

2

Page 38: IAT 814 Visualization Representation: Design Idioms 1

Compared to what defines choice (2) [Few]

7 interesting relationships 1.  Time Series

•  Quantitative across equal intervals (of time) 2.  Ranking

•  Sequenced by size of attribute value 3.  Part-Whole

•  portion that each value represents to some whole, 4.  Deviation

•  Differ from reference (baseline) 5.  Distribution 6.  Correlation

•  How one value affects another 7.  Nominal

•  Simple categorical

IAT 814 | Design Choices 1 38

S. Few, Effectively Communicating Numbers:Selecting the Best Means and Manner of Display

Page 39: IAT 814 Visualization Representation: Design Idioms 1

Categorical What/where Planar position Hue Shape Stipple/texture Relational/Same category Grouping Containment (2D) Connection Similarity (other channels) Proximity (position)

Ordered/Quantitiative How Much Position common scale Position unaligned scale Length Tilt/angle Area Curvature Lightness Saturation Texture density

IAT 814 | Design Choices 1 39

The Power of Space

Page 40: IAT 814 Visualization Representation: Design Idioms 1

Categorical What/where Planar position Hue Shape Stipple/texture Relational/Same category Grouping Containment (2D) Connection Similarity (other channels) Proximity (position)

Ordered/Quantitiative How Much Position common scale Position unaligned scale Length Tilt/angle Area Curvature Lightness Saturation Texture density

IAT 814 | Design Choices 1 40

The Power of Space

Page 41: IAT 814 Visualization Representation: Design Idioms 1

We encode data spatially to

•  Express (show) values

•  Arrange data groupings •  Separate /distinguish regions by categorical key •  Order groups by ordinal key •  Align for visual comparison along reference

value

IAT 814 | Design Choices 1 41

Page 42: IAT 814 Visualization Representation: Design Idioms 1

Space

IAT 814 | Design Choices 1 42

Spatial Channels

Regions

Express Values

Separate

order

Given Use

Fields

Geographic

scalar

1D

2D

Align

Spatial Layouts

Parallel

Rectilinear

Radial

Spacefilling

Dense

Page 43: IAT 814 Visualization Representation: Design Idioms 1

Design choices [Munzner]

IAT 814 | Design Choices 1 43

Page 44: IAT 814 Visualization Representation: Design Idioms 1

Single view methods

•  All information integrated in one view •  basic visual encodings

•  spatial position •  color •  other channels •  pixel-oriented techniques

•  visual layering •  global compositing •  item-level stacking

•  glyphs

IAT 814 | Design Choices 1 44

Page 45: IAT 814 Visualization Representation: Design Idioms 1

Expressing values

•  Scatterplots •  Axes encode 2D

values •  Color for key/

category •  Additional value

in size

IAT 814 | Design Choices 1 45

Page 46: IAT 814 Visualization Representation: Design Idioms 1

Scatterplot idiom

IAT 814 | Design Choices 1 46

0

10

20

30

40

50

60

70

80

90

100

0 5 10 15

Circumference (ft)

Heig

ht (f

t)

Page 47: IAT 814 Visualization Representation: Design Idioms 1

Data transformations can enhance value

IAT 814 | Design Choices 1 47

Log transformations show strong correlation between size and price

Page 48: IAT 814 Visualization Representation: Design Idioms 1

Organising data

•  List alignment •  Can be ordered along the list

axis or by value •  Nominal and ranking (if axis

ordered) •  Emphasises individual values

IAT 814 | Design Choices 1 48

Page 49: IAT 814 Visualization Representation: Design Idioms 1

Bar chart idiom

•  Categorical attributes match well with spatial regions •  Separate, order, align •  Can be hard to find patterns in the data “shape”

IAT 814 | Design Choices 1 49

Credit: T. Munzner, 2014

1

2

Page 50: IAT 814 Visualization Representation: Design Idioms 1

Stacked bars

•  Multidimensional tables with 2 keys/attributes •  Typically use colour or texture for 2nd

IAT 814 | Design Choices 1 50

Page 51: IAT 814 Visualization Representation: Design Idioms 1

Few’s correlation bar graph

IAT 814 | Design Choices 1

Page 52: IAT 814 Visualization Representation: Design Idioms 1

Paired Bar graph with trend lines (Few)

IAT 814 | Design Choices 1

Page 53: IAT 814 Visualization Representation: Design Idioms 1

Streamgraphs

•  Stacked time series

IAT 814 | Design Choices 1 53

•  Show shape of the data and part-whole relationships

•  De-emphasise individual values

Page 54: IAT 814 Visualization Representation: Design Idioms 1

Line charts and dotplots

•  Position to express value according to key

•  Line charts use angle/shape to show trends

•  Frequently time

IAT 814 | Design Choices 1 54

Page 55: IAT 814 Visualization Representation: Design Idioms 1

Line Chart idiom

•  Line charts, dotplots •  Good for ordered data

IAT 814 | Design Choices 1 55

Page 56: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1 56

Mind the Gap - An Economic Chart Remake

Page 57: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1 57

Mind the Gap - An Economic Chart Remake

•  ww

Page 58: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1 58

•  ww

Mind the Gap - An Economic Chart Remake

Page 59: IAT 814 Visualization Representation: Design Idioms 1

What’s wrong?

IAT 814 | Design Choices 1 59

Page 60: IAT 814 Visualization Representation: Design Idioms 1

The semantics of mark types

•  Bar charts, line charts and dotplots all encode a quantitative value against a key attribute in a rectilinear layout.

•  Often use additional encoding for other categories •  Lines also use connection marks to show inter-item

relations •  Only use for ordered data!

IAT 814 | Design Choices 1 60

Page 61: IAT 814 Visualization Representation: Design Idioms 1

Which to use when

•  Bars and bubbles emphasise comparison and association of individual values

•  Lines (explicit and implied) emphasise trends

IAT 814 | Design Choices 1 61

Page 62: IAT 814 Visualization Representation: Design Idioms 1

Lines and bars

IAT 814 | Design Choices 1 62

Je Zacks and Barbara Tversky. Bars and Lines: A Study of Graphic Communication." Memory and Cognition 27:6(1999), 1073{1079

Lines imply connections •  “the more male someone is

the taller he is”

Use when there is some ordered progression between the discrete categories on the x-axis •  “12 year olds are taller than

10 year olds”

Page 63: IAT 814 Visualization Representation: Design Idioms 1

Tufte’s Sparklines

•  Give a hint of the trend, but don’t show the actual axes and scales.

peer2patent.org

•  Good for dashboards and small spaces

IAT 814 | Design Choices 1 63

Page 64: IAT 814 Visualization Representation: Design Idioms 1

Lines: Aspect ratio matters!

•  our ability to judge angles is more accurate at exact diagonals than at arbitrary direction •  We can judge distances “off” 45 or 90 degrees (43 ) but cannot see

the difference between 20 and 22 degrees •  Multiscale banking to 45 degrees – algorithm to compute informative

aspect ratios to maximise line segments close to the diagonal

IAT 814 | Design Choices 1 64

Page 65: IAT 814 Visualization Representation: Design Idioms 1

Matrix alignment

•  Heatmap •  2 keys, 1 value •  Good for dense encoding •  Re-ordering for clusters

IAT 814 | Design Choices 1 65

Page 66: IAT 814 Visualization Representation: Design Idioms 1

Parallel layouts

•  Parallel coordinates •  Many key attributes •  Different correlations •  Value vector is a line

IAT 814 | Design Choices 1 66

Page 67: IAT 814 Visualization Representation: Design Idioms 1

Parallel coordinates

IAT 814 | Design Choices 1 67

13 items, 7 keys 16K items, 5 keys

Page 68: IAT 814 Visualization Representation: Design Idioms 1

What about Pies?

IAT 814 | Design Choices 1 68

Page 69: IAT 814 Visualization Representation: Design Idioms 1

Radial layouts

IAT 814 | Design Choices 1 69

Use polar coordinates •  1 categorical key, 1

quantitative value

Page 70: IAT 814 Visualization Representation: Design Idioms 1

radial idioms

IAT 814 | Design Choices 1 70

Idiom Star plot

What:data Table: 1 quant value, 1 categorical attribute

How: Encode length coding along point marks at 1D spatial position along axis + 1D spatial position for aligned axes

Idiom Pie chart

What:data Table: 1 quant value, 1 categorical attribute

How: Encode area and angle

Page 71: IAT 814 Visualization Representation: Design Idioms 1

Percent  Blue  rela,ve  to  Red?  

IAT 814 | Design Choices 1 71

Page 72: IAT 814 Visualization Representation: Design Idioms 1

Percent  Blue  rela,ve  to  Red?  

1  

2  

IAT 814 | Design Choices 1 72

Page 73: IAT 814 Visualization Representation: Design Idioms 1

Few’s criteria for an effective visualization

•  Clearly indicate the nature of the relationship •  Represent the quantities accurately •  Makes it easy to compare the quantities •  Makes it easy to see the ranked order of values •  Makes obvious how people should use the information

IAT 814 | Design Choices 1 73

Page 74: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1 74

Page 75: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1 75

Page 76: IAT 814 Visualization Representation: Design Idioms 1

Clearly indicate the nature of the relationship?

IAT 814 | Design Choices 1 76

Page 77: IAT 814 Visualization Representation: Design Idioms 1

Represents quantities accurately?

IAT 814 | Design Choices 1 77

Page 78: IAT 814 Visualization Representation: Design Idioms 1

Makes it easy to compare quantities?

IAT 814 | Design Choices 1 78

Page 79: IAT 814 Visualization Representation: Design Idioms 1

Makes it easy to see ranked values?

IAT 814 | Design Choices 1 79

Page 80: IAT 814 Visualization Representation: Design Idioms 1

Makes it easy to see how people should use information?

IAT 814 | Design Choices 1 80

Page 81: IAT 814 Visualization Representation: Design Idioms 1

A better way

IAT 814 | Design Choices 1 81

Page 82: IAT 814 Visualization Representation: Design Idioms 1

0  

5  

10  

15  

20  

25  

30  

35  

40  

45  

50  

55  

60  

65  

70  

75  

80  

body  

brain  

blood  

Percent  Water  

IAT 814 | Design Choices 1

Page 83: IAT 814 Visualization Representation: Design Idioms 1

0  

5  

10  

15  

20  

25  

30  

35  

40  

45  

50  

55  

60  

65  

70  

75  

80  

85  

body   brain   blood  

Percent  Water  

IAT 814 | Design Choices 1

Page 84: IAT 814 Visualization Representation: Design Idioms 1

0

25

50

75

100

body brain blood

Percent Water

IAT 814 | Design Choices 1

Page 85: IAT 814 Visualization Representation: Design Idioms 1

Bad  

IAT 814 | Design Choices 1 85

Page 86: IAT 814 Visualization Representation: Design Idioms 1

Be>er  

IAT 814 | Design Choices 1 86

Page 87: IAT 814 Visualization Representation: Design Idioms 1

Even  Be>er*  

IAT 814 | Design Choices 1 87

Page 88: IAT 814 Visualization Representation: Design Idioms 1

0 5 10 15 20 25 30

Too Little

About Right

Too Much

National Spending to Deal with Drug Addiction

IAT 814 | Design Choices 1

Page 89: IAT 814 Visualization Representation: Design Idioms 1

0 5 10 15 20 25 30 35 40

Too Little

About Right

Too Much

National Spending to Deal with Drug Addiction

Male  

Female  

IAT 814 | Design Choices 1

Page 90: IAT 814 Visualization Representation: Design Idioms 1

IAT 814 | Design Choices 1

Page 91: IAT 814 Visualization Representation: Design Idioms 1

- 5 10 15 20 25 30 35 40

Too Little

About Right

Too Much

National Spending to Deal with Drug Addiction

Female Male

IAT 814 | Design Choices 1

Page 92: IAT 814 Visualization Representation: Design Idioms 1

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

Male

Female

National Spending to Deal with Drug Addiction

Too Little

About Right

Too Much

IAT 814 | Design Choices 1

Page 93: IAT 814 Visualization Representation: Design Idioms 1

h>p://chartchooser.juiceanaly,cs.com/  

IAT 814 | Design Choices 1