1 of 72

Data and Image Models

Jeffrey Heer University of Washington

2 of 72

InfoVis vs. SciVis?

3 of 72

Information Visualization

  • Information visualization is the practice of representing data in a meaningful, visual way that users can interpret and easily comprehend. 

  • It is often used to communicate insights and trends to non-expert audiences, and is typically designed with a specific audience and use case in mind

4 of 72

Scientific visualization

  • Scientific visualization, on the other hand, is the representation of scientific data in a visual format. 
  • It is often used in scientific research and analysis to help researchers understand complex data sets and make discoveries.
  • Scientific visualizations may include 3D models, simulations, and animations, and are often used to explore and analyze data sets that are too complex to be easily understood through other means

5 of 72

Informative vs. Aesthetic?

6 of 72

Data & Image Models

7 of 72

The Big Picture

task

questions, goals assumptions

data

physical data type conceptual data type

domain metadata semantics conventions

processing algorithms

mapping

visual encoding

image

visual channel graphical marks

8 of 72

Topics

Properties of Data Properties of Images Mapping Data to Images

9 of 72

Data

10 of 72

Data Models / Conceptual Models

Data models are low-level descriptions Math: sets with operations on them Example: integers with + and x operators

Conceptual models are mental constructions Include semantics and support reasoning

Examples (data vs. conceptual) 1D floats vs. temperatures

3D vector of floats vs. spatial location

11 of 72

Taxonomy of Data Types (?)

1D (sets and sequences) Temporal

2D (maps) 3D (shapes)

nD (relational) Trees (hierarchies) Networks (graphs)

Are there others?

The eyes have it: A task by data type taxonomy for information visualization [Shneiderman 96]

12 of 72

Nominal, Ordinal & Quantitative

13 of 72

Nominal, Ordinal & Quantitative

N - Nominal (labels or categories)

  • Fruits: apples, oranges, …

14 of 72

Nominal, Ordinal & Quantitative

N - Nominal (labels or categories)

  • Fruits: apples, oranges, …

O - Ordered

  • Quality of meat: Grade A, AA, AAA

15 of 72

Nominal, Ordinal & Quantitative

N - Nominal (labels or categories)

  • Fruits: apples, oranges, …

O - Ordered

  • Quality of meat: Grade A, AA, AAA

Q - Interval (location of zero arbitrary)

  • Dates: Jan, 19, 2006; Location: (LAT 33.98, LONG -118.45)
  • Only differences (i.e. intervals) may be compared

16 of 72

Nominal, Ordinal & Quantitative

N - Nominal (labels or categories)

  • Fruits: apples, oranges, …

O - Ordered

  • Quality of meat: Grade A, AA, AAA

Q - Interval (location of zero arbitrary)

  • Dates: Jan, 19, 2006; Location: (LAT 33.98, LONG -118.45)
  • Only differences (i.e. intervals) may be compared

Q - Ratio (zero fixed)

  • Physical measurement: Length, Mass, Temp, …
  • Counts and amounts

17 of 72

Nominal, Ordinal & Quantitative

N - Nominal (labels or categories)

  • Operations: =,

O - Ordered

  • Operations: =, , <, >

Q - Interval (location of zero arbitrary)

  • Operations: =, , <, >, -
  • Can measure distances or spans

Q - Ratio (zero fixed)

  • Operations: =, , <, >, -, %
  • Can measure ratios or proportions

18 of 72

From Data Model to N, O, Q

Data Model

32.5, 54.0, -17.3, …

Floating point numbers

Conceptual Model

Temperature (°C)

Data Type

Burned vs. Not-Burned (N) Hot, Warm, Cold (O) Temperature Value (Q)

19 of 72

Sepal and petal lengths and widths for three species of iris [Fisher 1936].

20 of 72

N

O Q

21 of 72

Dimensions & Measures

Dimensions (~ independent variables) Discrete variables describing data (N, O) Categories, dates, binned quantities

Measures (~ dependent variables) Data values that can be aggregated (Q) Numbers to be analyzed

Aggregate as sum, count, avg, std. dev…

22 of 72

Example: U.S. Census Data

23 of 72

Example: U.S. Census Data

People Count: # of people in group

Year: 1850 – 2000 (every decade)

Age: 0 – 90+

Sex: Male, Female

Marital Status: Single, Married, Divorced, …

24 of 72

Example: U.S. Census

People Count Year

Age Sex

Marital Status

2,348 data points

25 of 72

Census: N, O, Q?

People Count Year

Age Sex

Marital Status

Q-Ratio

Q-Interval (O)

Q-Ratio (O)

N N

26 of 72

Census: Dimension or Measure?

People Count Year

Age Sex

Marital Status

Measure Dimension Depends!

Dimension Dimension

27 of 72

Data Transformation

28 of 72

Relational Data Model

Represent data as a table (relation) Each row (tuple) represents a record

Each record is a fixed-length tuple

Each column (attribute) represents a variable Each attribute has a name and a data type

A table’s schema is the set of names and types A database is a collection of tables (relations)

29 of 72

Relational Algebra [Codd ’70]

Data Transformations (sql) Projection (select) - selects columns Selection (where) - filters rows Sorting (order by)

Aggregation (group by, sum, min, max, …) Combine relations (union, join, …)

30 of 72

Roll-Up and Drill-Down

Want to examine marital status in each decade?

Roll-up the data along the desired dimensions

Dimensions Measure

SELECT year, marst, sum(people) FROM census

GROUP BY year, marst;

Dimensions

31 of 72

Roll-Up and Drill-Down

Need more detailed information?

Drill-down into additional dimensions

SELECT year, age, marst, sum(people) FROM census

GROUP BY year, age, marst;

32 of 72

All Marital Status

Age

Marital Status

Single

Married Divorced

Widowed

1970

1980

2000

1990

Year

60+

40-59

20-39

0-19

All Ages

All Years

Sum along Marital Status

S

um along Age

Sum along Year

33 of 72

All Marital Status

Age

Marital Status

Single

Married Divorced

Widowed

1970

1980

1990

2000

Year

60+

40-59

20-39

0-19

All Ages

All Years

Sum along Marital Status

S

um along Age

Sum along Year

Roll-Up

Drill-Down

34 of 72

YEAR

AGE

MARST

SEX

PEOPLE

1850

0

0

1

1,483,789

1850

5

0

1

1,411,067

1860

0

0

1

2,120,846

1860

. . .

5

0

1

1,804,467

AGE

MARST

SEX

1850

1860

. . .

0

0

1

1,483,789

2,120,846

. . .

5

0

1

1,411,067

1,804,467

. . .

. . .

Which format might we prefer?

35 of 72

Image

36 of 72

37 of 72

Visual Language is a Sign System

Images perceived as a set of signs Sender encodes information in signs Receiver decodes information from signs

Sémiologie Graphique, 1967

Jacques Bertin

38 of 72

Bertin’s Semiology of Graphics

  1. A, B, C are distinguishable
  2. B is between A and C.
  3. BC is twice as long as AB.

Encode quantitative variables

C

B

A

"Resemblance, order and proportion are the three signfields in graphics.” - Bertin

39 of 72

40 of 72

Visual Encoding Variables

Position (x 2) Size

Value Texture Color Orientation Shape

41 of 72

Visual Encoding Variables

Position Length Area Volume Value Texture Color Orientation Shape

Transparency Blur / Focus …

42 of 72

Information in Hue and Value

Value is perceived as ordered

Encode ordinal variables (O)

Encode continuous variables (Q) [not as well]

Hue is normally perceived as unordered

Encode nominal variables (N) using color

43 of 72

Bertin’s “Levels of Organization”

N

O

Q

N

O

Q

N

O

Q

N

O

N

N

N

Position

Size

Value

Texture

Color Orientation

Shape

Nominal Ordinal Quantitative Note: Q O N

44 of 72

Deconstructions

45 of 72

Playfair 1786

46 of 72

William Playfair, 1786

X-axis: year (Q)

Y-axis: currency (Q)

Color: imports/exports (N, O)

47 of 72

Wattenberg 1998

48 of 72

Wattenberg’s Map of the Market

Rectangle Area: market cap (Q)

Rectangle Position: market sector (N), market cap (Q)

Color Hue: loss vs. gain (N, O)

Color Value: magnitude of loss or gain (Q)

49 of 72

Minard 1869: Napoleon’s March

50 of 72

Single-Axis Composition

+

=

51 of 72

Mark Composition

Y-axis: temperature (Q)

X-axis: longitude (Q) / time (O)

+

=

Temp over space/time (Q x Q)

52 of 72

Mark Composition

Y-axis: longitude (Q)

X-axis: latitude (Q)

Width: army size (Q)

+

+

=

Army position (Q x Q) and army size (Q)

53 of 72

longitude (Q)

latitude (Q) army size (Q)

temperature (Q)

latitude (Q) / time (O)

54 of 72

Minard 1869: Napoleon’s March

Depicts at least 5 quantitative variables. Any others?

55 of 72

Formalizing Design

56 of 72

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.

57 of 72

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.

58 of 72

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.

59 of 72

A multivariate relation may be inexpressive in a single horizontal dot plot because multiple records are mapped to the same position.

Can not express the facts

60 of 72

Expresses facts not in the data

A length is interpreted as a quantitative value.

61 of 72

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.

62 of 72

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.

63 of 72

Design Criteria [Tversky 02]

Congruence

The structure and content of the external representation should correspond to the desired structure and content of the internal representation.

Apprehension

The structure and content of the external representation should be readily and accurately perceived and comprehended.

64 of 72

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)

65 of 72

Mackinlay’s Ranking

Conjectured effectiveness of encodings by data type

66 of 72

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

67 of 72

Mackinlay’s Design Algorithm

  • The McKinley design algorithm is a rule-based system for generating visualizations of relational data.
  • It was developed by Jock Mackinlay in 1986 and is described in his paper "Automating the Design of Graphical Presentation of Relational Information."

68 of 72

Mackinlay’s Design Algorithm

  • The algorithm takes as input a data model and a type, and generates a visualization that is both expressive and effective.
  • It does this by testing each possible visual encoding against a set of expressiveness criteria, and then ranking the encodings by perceptual effectiveness.
  • The algorithm then selects the most effective visualization and encodes the most important data using the highest ranking visual variable for the data type.

69 of 72

APT

Automatically generate chart for car data

Input variables:

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

70 of 72

Limitations of APT?

71 of 72

Limitations of APT

Does not cover many visualization techniques

Networks, hierarchies, maps, diagrams Also: 3D structure, animation, illustration, …

Does not consider interaction

Does not consider semantics / conventions Assumes single visualization as output

72 of 72

Summary: Data & Image Models

Formal specification

Data model: relational data; N,O,Q types Image model: visual encoding channels Encodings map data to visual variables

Choose expressive and effective encodings Rule-based tests of expressiveness Perceptual effectiveness rankings

Question: how do we establish effectiveness criteria? Subject of perception lectures…