3.principles of Data Visualization
3.principles of Data Visualization
data visualization
Edward Tufte
American Statistician
A pioneer in the field of data
visualization
Noted
for his writing on Information Design.
(also for his criticism of Power Point!)
Main idea:
Minimalism: Show as much data as
possible with as little ornamentation
He wrote, designed, and self-published 4 classic books on data
as Possible.
visualization.
Tufte’s Main DataViz Design Idea
infovis-wiki.net/wiki/Tufte,_Edward
Tufte’s Principle
Graphical Integrity
Data-ink Ratio
Chart Junk
Data Density
Small multiples
https://en.wikipedia.org/wiki/Misleading_graph
Intentional Distortion of Data
Dramatic viz
but misleading:
As a reader, you
simply look at
how the lines
have grown and
conclude that the
fuel economy is
not only
improving but
improving more
and more rapidly
as the lines get
bigger and bigger
faster.
This graphic was originally published by the NY Times. It tries to show the mandated fuel economy standards for autos set by the US Department of Transportation.
Data Integrity: Lie Factor
In Graph:
(5.3 – 0.6)/0.6=7.83
In Data:
(27.5 – 18)/18=0.53
Lie Factor:
7.83/0.53 = 14.77
https://infovis-wiki.net/wiki/Lie_Factor
Fuel Economy Standard
Truthful representation of the data
by Tufte
Data Integrity
Lie Factor: 1
Compute & Compare Lie Factor
Size of effect shown in graph: (15-5)/5 = 2
Compute&Compare Lie Factor
Size of effect shown in graph: (15-5)/5 = 2 Size of effect shown in graph: 10/40 = 0.25
Lie Factor =
2/0.25 = 8
Data Integrity: Lie Factor
Show data variation not design variation.
Note:
Area is less efficient for mapping data.
https://infovis-wiki.net/wiki/Data-Ink_Ratio
Tufte’s Principle: Data-Ink Ratio
https://infovis-
wiki.net/wiki/Data
-Ink_Ratio
Terrible Data-Ink Ratio
Analysis:
The data-ink ratio is abysmally low.
There are only 11 data points in this
entire graphic.
An electroencephalogram: a graph that records the electrical activity from the brain, has a data-ink ratio of 1.
3D Bar Chart:
There is no information in the use of
the 3rd dimension which heavily
influences the pictures and very
much drives the attention towards
the depth of the bars and the
underlying grid. But this is not at all
the information which should be
transported.
https://infovis-wiki.net/wiki/Chart_Junk
Chart Junk: Example
Confusing Graphics:
The logos giving a hint what the
lines are dealing with are far more
than the minimum needed to
present the desired information.
https://en.wikipedia.org/wiki/Chartjunk
Tufte’s Principle:
• Data Density
The data density of a graph is the proportion of the total size of the
graph that is dedicated displaying data.
High Data Density
Minard's map of Napoleon's disastrous Russian campaign of 1812.
A cartographic depiction of numerical data on a map of Napoleon's disastrous losses suffered during the Russian campaign of 1812. The illustration depicts
Napoleon's army departing the Polish-Russian border. The visiualization is notable for its representation in two dimensions of five types of data:
(i) the number of Napoleon's troops (thickness) (ii) distance (inset) (iii) temperature (bottom plot) (iv) direction of travel; and (v) location relative to specific
dates. [source: https://en.wikipedia.org/wiki/Charles_Joseph_Minard#Work]
This type of band graph for illustration of flows was later called a Sankey diagram.
Tufte’s Principle: Small multiples
https://www.juiceanalytics.com/writing/better-
know-visualization-small-multiples/
Sparklines
Wiki
Tufte’s Principle: Small multiples
Wiki
Tufte’s Principle: Small multiples
Wiki
Tufte’s Design Principles: Summary
Note:
Tufte’s principles are a good starting point for data visualization.
They are not a religion.
https://blog.plotly.com/post/143370337552/above-
all-else-show-the-data
Data Visualization
PRINCIPLES
Human Visual functions are
extremely fast and efficient
Cognitive functions are much
Designing slower and less efficient.
Visualization Designing visual functions that
should take advantage of the
strengths of visual functions and
help in cognitive function.
Visual Processing of
Information
Visual Pathway
Signal from the eye is passed onto
the optic nerve, the primary set of
cells that transmit signal to the brain.
At optic chiasm, the optic nerves from
each eye cross.
The optic chiasm superimposes
information from both eyes together,
so that you only see one image.
From there it passes through lateral
geniculate nucleus and finally
reaches the primary visual cortex, the
main area of the brain that interprets
visual data. This is where our mind
starts to recognize that the eyes are
seeing.
http://thebrain.mcgill.ca/
Stages of Visual Processing
RODS CONES
Black and white vision Daytime and colour vision
Can’t discriminate colours Excellent visual acuity – sharp and
clean images
Operate well in low level light – night
vision Concentrated in the fovea
Sensitive to brightness, darkness and Not useful at night.
movement
Outnumbered by rods 19:1
Mainly located in outer part of retina
Poor acuity (low sharpness and
focus)
Excellent for peripheral vision rather
than direct
19x the number of cones
Retinal Ganglion Cells
Wiki
Transmission
Wiki
Selection
Wiki
Law of prägnanz:
Fundamental Gestalt Principle
We tend to order our experience in a manner that is
regular,
orderly,
symmetrical, and
simple.
So Keep it simple. Arrange data logically wherever possible.
Wiki
1. Gestalt Law of Proximity
Closure:
We want to see the things to be simple and fit into the
constructs that are already in our head.
Fido?
5. Gestalt Law of Closure (contd.)
• Metastability arises
because of the difficulties
with establishing contour
Love or
lines death
• Reversible figures change
the ownership of the
contour lines
Gestalt Law Figure/Ground and
Metastability
We tend to separate the important aspects of the figure
from the surroundings (background). We focus or give
our attention to the figure.
Real or imagined contour lines separate the figure and
ground
Ensure there is enough contrast between your
foreground and background so that charts and graphs
are more legible.
Metastability
https://emeeks.github.io/gestaltdataviz/section4.html
Figure and Ground
https://en.wikipedia.org/wiki/M%C3%BCller-Lyer_illusion
Theory of Perceptual Compromise
Possible size
misinterpretation
in bubble charts
https://visual.ly/blog/illusions-in-data-visualization/
Visual Attention
Visual Attention
Color is important
Why we need it?
To represent data
To bring the data layer to the front
Confirm to design requirement
(recap) Effectiveness of Visual properties
for Different Types of Data
Quantitative Ordinal Nominal
Position on the axis Position on the axis Position on the axis
Length of line or object Color Saturation Color Hue
Area of shape Color Hue Color Saturation
Color Saturation Shape
Color in plotting packages
Plotly Default Color choices
Plotly Default Color choices
Color Preference
Wiki
Color Preference (By Gender)
Most Favorite Color Male Female
Source:
http://munsell.com/color-
blog/best-color-infographics/
Data:
http://www.joehallock.com/edu/COM498/surveydata.html
Color Preference (by gender)
Source: http://munsell.com/color-blog/best-color-infographics/
Data: http://www.joehallock.com/edu/COM498/surveydata.html
Color Preference (by gender)
Source:
http://munsell.com/color-
blog/best-color-infographics/
Data:
http://www.joehallock.com/edu/COM498/surveydata.html
Color Preference (by gender)
https://munsell.com/color-
blog/best-color-infographics/
Color Preference: (By gender)
Least Favorite Color Male Female
Source:
http://munsell.com/color-
blog/best-color-infographics/
Data:
http://www.joehallock.com/edu/COM498/surveydata.html
Color Preference By Gender
Men-Women
Color Names
What may be “purple” to men, is
“grape”, “eggplant” or “plum” or
any other fruit/flower to Women
http://munsell.com/color-blog/best-color-
infographics/
Data Source:
http://www.datapointed.net/visualization
s/color/men-women-color-names-d3/
Color Association
Findings from a global survey of 200K people
Happy – Yellow Powerful - Red (tomato)
Pure – White Dependable – Blue
Good Luck – Green High Quality – Gold
Good-tasting - Red Nausea - Muted Yellow
(tomato) Deity – White
Dignity - Dark Blue Bad Luck – Black
High Technology – Silver Favorite Color – Blue
Mourning – Black Least Favorite Color - Dark
Expensive – Gold Yellow
Inexpensive – Brown
https://www.colorcom.com/global-color-survey
Color: Meaning and Association
References:
Color Psychology: https://www.nickkolenda.com/color-psychology/
color-theory-for-designers-part-1-the-meaning-of-color:
https://www.smashingmagazine.com/2010/01/color-theory-for-
designers-part-1-the-meaning-of-color/
Best color for infographics: https://munsell.com/color-blog/best-color-
infographics/
Warm and Cool Colors
https://www.webopedia.com/TERM/C/cool_colors.html
Warm vs Cool Colors
It is ironic that
the hotter stars radiate blue (cool) light, and the cooler radiate
red (warm) light.
Wiki
Warm vs Cool Colors
Warm colors
tend to advance or appear more active in a visualization,
whereas cool color tend to recede.
are said to stimulate the viewer, where as cool color tend
to calm and relax the viewer
Children prefer cool colors over warm colors.
Wiki
Warm Color: Red
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Warm Color: Red
Cultural differences:
In some eastern culture,
red is the color of prosperity and happiness, and is said to attract
good luck.
red is worn by brides on their wedding days.
In South Africa, however, red is the color of mourning.
Red is also associated with communism.
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Warm Color: Red
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Warm Color: Orange
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Warm Color: Yellow
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Warm Color: Yellow
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Cool Color: Green
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Cool Color: Green
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Cool Color: Purple
https://www.smashingmagazine.com/2010/01/color-
theory-for-designers-part-1-the-meaning-of-color/
Color Representation
Color Names vs Digital Representation
Modern browsers support 147 different color names, only 16 out of which
are standard colors (W3.org).
Standard color names are: aqua, black, blue, fuchsia, gray, green, lime,
maroon, navy, olive, purple, red, silver, teal, white, and yellow.
147 names are derived from these names.
Human visual system can distinguish (Gibson, et al., 2017) close to a million
different colors in nature.
Color display or print devices can reproduce hundreds of thousands of
colors.
Hence a digital representation when a larger number of colors or a color
set are needed.
RGB Color Model
Additive Mixing Red, Green and Blue Colors
Pro:
A large number of colors can be represented
Total colors possible: 256 x 256 x 256
Cons:
Not intuitive
Artist’s Color Models
Color Mixing:
The mixing of color “pigments”
ex:
Red, Yellow, Blue (Artist paint)
Cyan, Magenta, Yellow (printing ink)
Color Wheel
Artists Organize Color in a Color Wheel
Primary Colors
Red,
yellow, and
blue
Secondary Colors
violet (or purple),
orange, and
green (VOG)
formed by mixing equal amounts of red
and blue, red and yellow, and blue and
yellow, respectively
Hues:
Colors in Color wheel, also called Pure
colors https://drawpaintacademy.com/a-comprehensive-guide-
to-color-theory-for-artists/
Hue: Pure Colors
Tints:
Add white to Pure color
Shades:
Add black to Pure color
Tone:
Add gray to Pure color
https://en.wikipedia.org/wiki/Tints_and_shades
Color Solid
https://en.wikipedia.org/wiki/File:Hsv_color_circle.svg
Color Representation in HSL and HSV
HSV model:
the V value of 100% means all colors and tones are at their brightest
form,
HSL model:
the L value 100% means all colors
tints are indistinguishable from white.
HSL model attempts to match the lightness of all the pure colors and
their tones to the same value.
HSL and HSV
https://www.franklinpainting.com/blog/home/choosing-colors-interior-
painting/
Color Wheel: Analogous colors
Colors that are adjacent on the color wheel, for example, blue and
blue-green, orange and red-orange.
Color Wheel: Complimentary Color
Picking the right color
Highlighting opposite
property: Complementary
https://www.storytellingwithdata.com/blog/2020/5/6/picking-the-right-colors
Picking the right color (contd..)
https://www.storytellingwithdata.com/blog/2020/5/6/picking-the-right-colors
Color and Human Eye
Human Visual System
From : SPIE Commercial + Scientific Sensing and Imaging, At Los Angeles, Volume: 10223
The Eye
Human Retina
The Retina : An Approachable Part of the Brain by J.E. Dowling, Belknap Press, page: 14-15
Retina
Light
http://white.stanford.edu/~brian/numbers/numbers.html
Retina: Photoreceptors
Photoreceptors which
Photoreceptors
• 3 Types of cones: S, M, L
In Fovea (64%L, 32%M, 2%S)
3 numbers?
We can’t distinguish certain colors
Such colors are metamers of each other
Taking advantage of metamerism
P P
X X
400 700
400 700
Unlike humans who have three different color sensitive cone cells in
their retina (blue (S), green (M) and red (R)) dogs have only two
(blue, yelllow).
Dogs can not distinguish yellow or red objects based on their color.
Ref: https://dog-vision.com/
Color Deficieny
Cone Photoreceptors
http://www.colourblindawareness.org/business/
Color Deficiency/Blindness
In India estimated
8% of male population
less than 1% female population : ~0.4%
Colorblindness is most present in males due to the way genetics
work.
Red and green color deficiency being the most common form of
color-blindness
The Supreme Court has directed the Film and Television Institute of India (FTII) not to exclude
candidates suffering from color blindness from its courses on film making and editing and
asked it to make changes to its curriculum instead.
Source:
https://indianexpress.com/article/explained/everyday-explainers/what-is-colour-blindness-7867542/
April 13, 2022
Color Deficiency
Wiki
Normal Vision
www.color-blindness.com/coblis1-color-blindness-simulator/
Protanopia
Red-Blind Red-Weak
www.color-blindness.com/coblis1-color-blindness-simulator/
Types of Color Deficiency
Green-Blind Green-Weak
www.color-blindness.com/coblis1-color-blindness-simulator/
Types of Color Deficiency
(continued)
Blue/yellow Color Blindness: Rarer than red/green color blindness. It
involves the missing or limited functions of the blue cone photo
pigment (also called tritan).
Tritanopia: Loss in Blue cone. Blue appears greener and yellow appears
violet or light grey. (<1% of males and females)
Tritanomaly: Blue cone is weak: Blue appears greener and it is difficult to see
yellow and red from pink.
Blue-Blind Blue-Weak
www.color-blindness.com/coblis1-color-blindness-simulator/
Types of Color Deficiency
(continued)
Monochromacy: Complete inability to see color.
only a single channel for conveying information about color.
Two types:
Rod monochromacy: no cones
vision in lights of normal intensity is difficult. While normally rare
Cone monochromacy: One type of cone
good pattern vision at normal daylight levels, but can not distinguish hues
Rare among humans
Many animal species, such as marine mammals, the owl
monkey and the Australian sea lion are monochromats.
Diagnosis: Ishihara color test.
Wiki
Different Color Visions
https://wearecolorblind.com/articles/a-quick-introduction-to-color-blindness/
(recap) Color Deficiency
In India estimated
8% of male population
less than 1% female population : ~0.4%
Colorblindness is most present in males due to the way genetics
work.
Red and green color deficiency being the most common form of
color-blindness
Source:
https://indianexpress.com/article/explained/everyday-explainers/what-is-colour-blindness-7867542/
April 13, 2022
(recap) Different color visions
https://wearecolorblind.com/articles/a-quick-introduction-to-color-blindness/
Qualitative color scale:
Color for Categorical data
Qualitative color scale: a finite set of specific colors that are chosen
To look clearly distinct from each other while also being equivalent to
each other
no one color should stand out relative to the others
the colors should not create the impression of an order, as would be the
case with a sequence of colors that get successively lighter.
Plotly: Qualitative Color choices
Plotly: Qualitative Color choices
Source: https://www.mapsofindia.com/maps/india/population.htm
Diverging Color Scale:
Color for Quantitative data
Two sequential palettes stitched together at a common midpoint,
which usually is represented by a light color
px.choropleth(…
color_continuous_scale=px.colors.diverging.BrBG,
color_continuous_midpoint=avg_lifeExp,
title=…)
How to Choose Color?
http://colorbrewer2.org
Colorbrewer
Colorbrewer: How to use?
Single Hue
https://theblog.adobe.com/the-power-of-the-palette-
why-color-is-key-in-data-visualization-and-how-to-use-it/
Colorbrewer: How to use?
Sequential Scheme: Color is generated by combining value with Hue
Darker color for larger value, lighter for smaller value
Multiple Hue
Colorbrewer: How to use?
Diverging Scheme:
used to represent sequence, but in this
case there is a meaningful mid-point to
our scale.
useful for making comparisons with
some critical value in the data. Order
Ex: Positive-Negative population growth
compared to certain base line (could
be mean)
Ex: greenhouse gas emission reductions
to emphasize how much more some
countries have reduced their emissions
beyond the target specified in a treaty
can be constructed using two sequential
schemes fused at the middle
Can have a larger number of levels
compared to Sequential scheme
https://theblog.adobe.com/the-power-of-the-palette-
why-color-is-key-in-data-visualization-and-how-to-use-it/
Colorbrewer: How to use?
Diverging Scheme
Colorbrewer: How to use?
https://theblog.adobe.com/the-power-of-the-palette-
why-color-is-key-in-data-visualization-and-how-to-use-it/
Colorbrewer: How to use?
https://theblog.adobe.com/the-power-of-the-palette-
why-color-is-key-in-data-visualization-and-how-to-use-it/
Colorbrewer: How to use?
Qualitative Scheme
Colorbrewer
Common pitfalls of color use
encoding too many different items in different colors
Bad
Common pitfalls of color use
Better
Bad
Common pitfalls of color use
Good
Common pitfalls of color use