Data and Image Models
Jeffrey Heer University of Washington
InfoVis vs. SciVis?
Information Visualization
Scientific visualization
Informative vs. Aesthetic?
Data & Image Models
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
Topics
Properties of Data Properties of Images Mapping Data to Images
Data
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
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]
Nominal, Ordinal & Quantitative
Nominal, Ordinal & Quantitative
N - Nominal (labels or categories)
Nominal, Ordinal & Quantitative
N - Nominal (labels or categories)
O - Ordered
Nominal, Ordinal & Quantitative
N - Nominal (labels or categories)
O - Ordered
Q - Interval (location of zero arbitrary)
Nominal, Ordinal & Quantitative
N - Nominal (labels or categories)
O - Ordered
Q - Interval (location of zero arbitrary)
Q - Ratio (zero fixed)
Nominal, Ordinal & Quantitative
N - Nominal (labels or categories)
O - Ordered
Q - Interval (location of zero arbitrary)
Q - Ratio (zero fixed)
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)
Sepal and petal lengths and widths for three species of iris [Fisher 1936].
N
O Q
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…
Example: U.S. Census Data
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, …
Example: U.S. Census
People Count Year
Age Sex
Marital Status
2,348 data points
Census: N, O, Q?
People Count Year
Age Sex
Marital Status
Q-Ratio
Q-Interval (O)
Q-Ratio (O)
N N
Census: Dimension or Measure?
People Count Year
Age Sex
Marital Status
Measure Dimension Depends!
Dimension Dimension
Data Transformation
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)
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, …)
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
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;
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
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
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?
Image
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
Bertin’s Semiology of Graphics
∴ Encode quantitative variables
C
B
A
"Resemblance, order and proportion are the three signfields in graphics.” - Bertin
Visual Encoding Variables
Position (x 2) Size
Value Texture Color Orientation Shape
Visual Encoding Variables
Position Length Area Volume Value Texture Color Orientation Shape
Transparency Blur / Focus …
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
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
Deconstructions
Playfair 1786
William Playfair, 1786
X-axis: year (Q)
Y-axis: currency (Q)
Color: imports/exports (N, O)
Wattenberg 1998
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)
Minard 1869: Napoleon’s March
Single-Axis Composition
+
=
Mark Composition
Y-axis: temperature (Q)
X-axis: longitude (Q) / time (O)
+
=
Temp over space/time (Q x Q)
Mark Composition
Y-axis: longitude (Q)
X-axis: latitude (Q)
Width: army size (Q)
+
+
=
Army position (Q x Q) and army size (Q)
longitude (Q)
latitude (Q) army size (Q)
temperature (Q)
latitude (Q) / time (O)
Minard 1869: Napoleon’s March
Depicts at least 5 quantitative variables. Any others?
Formalizing Design
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.
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.
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.
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
Expresses facts not in the data
A length is interpreted as a quantitative value.
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.
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.
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.
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)
Mackinlay’s Ranking
Conjectured effectiveness of encodings by data type
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
Mackinlay’s Design Algorithm
Mackinlay’s Design Algorithm
APT
Automatically generate chart for car data
Input variables:
Limitations of APT?
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
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…