1 of 55

Visual Encoding Design

CSE 442 - Data Visualization

Jeffrey Heer University of Washington

2 of 55

Review: Expressiveness & Effectiveness / APT

3 of 55

Choosing Visual Encodings

Assume k visual encodings and n data attributes. We would like to pick the “best” encoding among a combinatorial set of possibilities of size (n+1)k

Principle of Consistency

The properties of the image (visual variables) should match the properties of the data.

Principle of Importance Ordering

Encode the most important information in the most effective way.

4 of 55

Design Criteria [Mackinlay 86]

Expressiveness

A set of facts is expressible in a visual language if

the sentences (i.e. the visualizations) in the language express all the facts in the set of data, and only the facts in the data.

Effectiveness

A visualization is more effective than another visualization if the information conveyed by one visualization is more readily perceived than the information in the other visualization.

5 of 55

Design Criteria Translated

Tell the truth and nothing but the truth

(don’t lie, and don’t lie by omission)

Use encodings that people decode better

(where better = faster and/or more accurate)

6 of 55

Effectiveness Rankings [Mackinlay 86]

QUANTITATIVE

Position Length Angle Slope Area (Size) Volume

Density (Value) Color Sat Color Hue Texture Connection Containment Shape

ORDINAL

Position Density (Value) Color Sat Color Hue Texture Connection Containment Length

Angle Slope Area (Size) Volume Shape

NOMINAL

Position Color Hue Texture Connection Containment

Density (Value) Color Sat Shape

Length Angle Slope Area Volume

7 of 55

Effectiveness Rankings [Mackinlay 86]

QUANTITATIVE

ORDINAL

Position

Density (Value)

Position Length Angle

Slope Area (Size) Volume

Density (Value) Color Sat Color Hue Texture Connection Containment Shape

Color Sat Color Hue Texture Connection Containment Length Angle

Slope Area (Size) Volume Shape

NOMINAL

Position Color Hue Texture Connection Containment

Density (Value) Color Sat Shape

Length Angle Slope Area Volume

8 of 55

Effectiveness Rankings [Mackinlay 86]

QUANTITATIVE

Position Length Angle Slope Area (Size) Volume

Density (Value) Color Sat Color Hue Texture Connection Containment Shape

ORDINAL

Position Density (Value) Color Sat Color Hue Texture Connection Containment Length

Angle Slope Area (Size) Volume Shape

NOMINAL

Position Color Hue Texture Connection Containment

Density (Value) Color Sat Shape

Length Angle Slope Area Volume

9 of 55

Mackinlay’s Design Algorithm

APT - “A Presentation Tool”, 1986

User formally specifies data model and type

Input: ordered list of data variables to show

APT searches over design space

Test expressiveness of each visual encoding Generate encodings that pass test

Rank by perceptual effectiveness criteria

Output the “most effective” visualization

10 of 55

APT

Automatically generate chart for car data

Input variables:

  1. Price
  2. Mileage
  3. Repair
  4. Weight

11 of 55

Design Examples

12 of 55

Color Encoding

13 of 55

Area Encoding

14 of 55

Gene Expression Time-Series [Meyer et al ’11]

Color Encoding Position Encoding

15 of 55

Artery Visualization [Borkin et al ’11]

2D

3D

92%

Rainbow Palette Diverging Palette

62%

71%

39%

16 of 55

Other Visual Encoding Channels?

17 of 55

A Design Space of Visual Encodings

18 of 55

Mapping Data to Visual Variables

Assign data fields (e.g., with N, O, Q types) to visual channels (x, y, color, shape, size, …) for a chosen graphical mark type (point, bar, line, …).

Additional concerns include choosing appropriate encoding parameters (log scale, sorting, …) and data transformations (bin, group, aggregate, …).

These options define a large combinatorial space, containing both useful and questionable charts!

19 of 55

1D: Nominal

Raw Aggregate (Count)

20 of 55

Expressive?

Raw Aggregate (Count)

21 of 55

1D: Quantitative

Raw

Aggregate (Count)

22 of 55

Expressive?

Raw

Aggregate (Count)

23 of 55

Raw (with Layout Algorithm)

Treemap

Bubble Chart

Box Plot

Violin Plot

high

Aggregate (Distributions)

middle 50%

low

median

24 of 55

2D: Nominal x Nominal

Raw Aggregate (Count)

25 of 55

2D: Quantitative x Quantitative

Raw Aggregate (Count)

26 of 55

2D: Nominal x Quantitative

Raw Aggregate (Mean)

27 of 55

Treemap

Bubble Chart

Beeswarm Plot

Raw (with Layout Algorithm)

28 of 55

3D and Higher

Two variables [x,y] Can map to 2D points. Scatterplots, maps, …

Third variable [z]

Often use one of size, color, opacity, shape, etc. Or, one can further partition space.

What about 3D rendering?

[Bertin]

29 of 55

Administrivia

30 of 55

A2: Exploratory Data Analysis

Use visualization software to form & answer questions

First steps:

Step 1: Pick domain & data Step 2: Pose questions Step 3: Profile the data Iterate as needed

Create visualizations Interact with data Refine your questions

Author a report

Screenshots of most insightful views (10+)

Include titles and captions for each view

Due by 11:59pm

Monday, Oct 16

31 of 55

Multidimensional Data

32 of 55

Visual Encoding Variables

Position (X) Position (Y) Size

Value Texture

Color Orientation Shape

~8 dimensions?

33 of 55

Example: Coffee Sales

Sales figures for a fictional coffee chain

Sales Profit Marketing

Product Type Market

Q-Ratio Q-Ratio Q-Ratio

N {Coffee, Espresso, Herbal Tea, Tea}

N {Central, East, South, West}

34 of 55

Encode “Sales” (Q) and “Profit” (Q) using Position

35 of 55

Encode “Product Type” (N) using Hue

36 of 55

Encode “Market” (N) using Shape

37 of 55

Encode “Marketing” (Q) using Size

38 of 55

Trellis Plots

A trellis plot subdivides space to enable comparison across multiple plots.

Typically nominal or ordinal variables are used as dimensions for subdivision.

39 of 55

Small Multiples

[MacEachren ’95, Figure 2.11, p. 38]

40 of 55

Small Multiples

[MacEachren ’95, Figure 2.11, p. 38]

41 of 55

Scatterplot Matrix (SPLOM)

Scatter plots for pairwise comparison of each data dimension.

42 of 55

Multiple Coordinated Views

select high salaries

avg career HRs vs avg career hits

(batting ability)

avg assists vs avg putouts (fielding ability)

how long in majors

distribution of positions played

43 of 55

Linking Assists to Position

44 of 55

Parallel Coordinates

45 of 55

Parallel Coordinates [Inselberg]

46 of 55

Parallel Coordinates [Inselberg]

Visualize up to ~two dozen dimensions at once

  1. Draw parallel axes for each variable
  2. For each tuple, connect points on each axis

Between adjacent axes: line crossings imply neg. correlation, shared slopes imply pos. correlation.

Full plot can be cluttered. Interactive selection

can be used to assess multivariate relationships.

Highly sensitive to axis scale and ordering. Expertise required to use effectively!

47 of 55

Radar Plot / Star Graph

“Parallel” dimensions in polar coordinate space Best if same units apply to each axis

48 of 55

Dimensionality Reduction

49 of 55

Dimensionality Reduction

50 of 55

Principal Components Analysis

  1. Mean-center the data.
  2. Find basis vectors that maximize the data variance.
  3. Plot the data using the top vectors.

51 of 55

PCA of Genomes [Demiralp et al. ’13]

52 of 55

Time Curves [Bach et al. ’16]

Wikipedia “Chocolate” Article

U.S. Precipitation over 1 Year

53 of 55

Many Reduction Techniques!

Principal Components Analysis (PCA) Multidimensional Scaling (MDS) Locally Linear Embedding (LLE)

t-Dist. Stochastic Neighbor Embedding (t-SNE) Isomap

Auto-Encoder Neural Networks Topological Methods

54 of 55

distill.pub

55 of 55

Visual Encoding Design

Use expressive and effective encodings Avoid over-encoding

Reduce the problem space

Use space and small multiples intelligently Use interaction to generate relevant views

Rarely does a single visualization answer all questions. Instead, the ability to generate appropriate visualizations quickly is critical!