Visual Model & Visual
Encoding
Credit: prof. Nam Wook Kim
Goal
Learn how data is mapped
to images
The Big Picture
Domain
goals, questions,
assumptions
Processing
algorithms
Data data transformation Image
conceptual model
marks & channels
data model
Visual encoding
Analysis task mapping from data to image
identify, compare
summarize
[Slides from J. Heer]
Topics
• Properties of Data
• Properties of Images
• Visual encoding: Mapping Data to Images
Properties of Data
Taxonomy of Datasets
1D (sets and sequences)
Temporal
2D (maps) 3D
(shapes) nD
(relational)
Trees (hierarchies)
Networks (graphs)
and combinations…
Levels of measurement
• Stevens (1946) classified variables into four levels.
These are referered to as levels of measurement, or
levels of data.
• N - Nominal
• O - Ordinal
• Q – Quantitative
• Interval
• Ratio
Nominal level measurement
• Merely classifies units into non-ordered categories
• Examples
• Male/Female
• Eye colors
• Car models
Ordinal level measurement
• Classifies units into ranks or ordered categories
• Examples
• Ranks: 1st, 2nd, 3rd... place finishers in race
• Ordered categories: {none = 0, low=1, medium=2, high=3}
Interval level measurement
• Distances (absolute differences) are meaningful
• any arithmetic operation, such as multiplication, is not
• A fixed difference anywhere on the measurement scale
always corresponds to the same difference on the trait
being measured
• The zero state of an interval scale is not a true zero
value
• A temperature reading of 0°C does not mean there is no
temperature
• Examples
• Temperature oF
• A one-degree temperature (°F) difference always means the
same thing
• The absolute difference between 60°F and 61°F is the same
as between 100°F and 101°F
Ratio level measurement
• Both differences and ratios are meaningful
• There is a true zero
• A zero on a ratio scale means there is a total absence of the
variable you are measuring.
• Examples
• Length, area, and population
• The relative difference between a 10- and a 20-year-old is the
same as the difference between a 40- and an 80-year-old
(‘twice as old’).
• Celsius and Fahrenheit are interval scales, Kelvin is a ratio
scale
• Kelvin scale has a true zero (0 K) where nothing can be colder.
• Zero is just another temperature value in Celsius and Fahrenheit
Properties of images
Image Models
Visual Language is a Sign System
Images perceived as a set of signs
Sender encodes information in signs
Receiver decodes information from signs
Semiology of Graphics, 1967
Jacques Bertin
Cartographer
[1918-2010]
Image Models
Visual Marks (Đối tượng biểu diễn) Points Lines Areas
Basic graphical elements in an image Position
Represent information
Size
Value
Perceptual Channels (Biến thị giác) Texture
Control the appearance of marks
Color
Encode information
Orientation
Shape
Visual marks to represent items
Visual marks to represent links
Visual marks to represent links (2)
Nested containment
Perceptual Channels
• Control the appearance of marks
• Encode information
Perceptual channels: Position
• Can encode quantitative variables (Q)
1. A, B, C are distinguishable
2. B is between A and C.
3. BC is twice as long as AB.
"Resemblance, order and proportional are the three signfields
in graphics.” — Bertin
Perceptual channels: Position
• The most used perceptual channel
• Suitable for most data types
Perceptual channels: Size
• Length, area, volume
• Good for 1D, 2D
• Easy to compare
Encoding Information in Color and Value
• Value (lightness) is perceived as ordered
• Encode ordinal variables (O) [better]
• Encode continuous variables (Q)
• Hue is normally perceived as unordered
• Encode nominal variables (N)
Perceptual channels: Color
• Should limit the number of colors
Not good
Perceptual channels: Shape
• Encode nominal variables (N)
• No ordered
Encoding information in perceptual channels
Quantitative/Ordered Nominal
Bertin’s Levels of Organization
Position N O Q Nominal
Size N O Q Ordinal
Value N O Q Quantitative
Texture N o Note: Q ⊂O ⊂N
Color N
Orientation N
Shape N
Mackinlay’s Ranking
• Expanded Bertin’s variables and conjectured effectiveness of
encodings by data type.
[Mackinlay 86]
Jock D. Mackinlay
Vice President
Tableau Software
Example: Deconstructions
William Playfair, 1786
William Playfair, 1786
Color:
Imports/exports (N)
Y-axis:
Currency (Q)
X-axis:
Year (Q)
Wattenberg’s Map of the Market
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)
Color Value:
magnitude of loss or gain (Q)
Minard 1869: Napoleon’s March
Minard 1869: Napoleon’s March
Minard 1869: Napoleon’s March
Y-axis:
latitude (Q)
Width:
army size (Q)
Color:
march / return
X-axis:
longitude (Q)
Minard 1869: Napoleon’s March
Y-axis:
temperature (Q)
X-axis:
longitude (Q) / time (O)
Example: Encoding Data
Example: Coffee Sales
• Sales figures for a fictional coffee chain
• Sales Q-Ratio
• Profit Q-Ratio
• Marketing Q-Ratio
• Product Type N {Coffee, Espresso, Herbal Tea, Tea}
• Market N {Central, East, South, West}
Encode “Profit” (Q)
— Y-Position
Encode “Sales” (Q)
— X-Position
Encode “Product Type” (N)
— Hue (Color)
Encode “Market” (N)
— Shape
Encode “Marketing” (Q)
—Size
Avoid over-encoding
• Use trellis plots (small multiples/facets) that subdivide
space to enable comparison across multiple plots.
Visual encoding
Choosing visual encodings
• Assume k visual channels and n data attributes. We
would like to pick the “best” encoding among a
combinatorial set of possibilities of size nk
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 nk
• 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
• Effectiveness
Design Criteria [Mackinlay 86]
• Expressiveness
• A set of facts is expressible in a visualization if it expresses all
the facts and only the facts in the data.
• Tell the truth and nothing but the truth
• (don’t lie, and don’t lie by omission)
Dot plot
Can not express the facts
The relationship among multiple data attributes may not be
expressed in a single horizontal dot plot.
Single horizontal dot plot
Can not express the facts
The relationship among multiple data attributes may not be
expressed in a single horizontal dot plot.
Single horizontal dot plot
Categories in different positions
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 visualization if it expresses all
the facts and only the facts in the data.
• Tell the truth and nothing but the truth
• (don’t lie, and don’t lie by omission)
• Effectiveness
• A visualization is more effective than another one if the
information conveyed is more readily perceived.
• Use encodings that people decode better
• (where better = faster and/or more accurate)
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
APT
• Automatically generate a chart
for input variables:
1. Price
2. Mileage
3. Repair
4. Weight
Polaris [Stolte et al 2002]
Tableau
Take away: 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!