Design Integrity Notes
It is key that when you build plots you maintain integrity for the underlying data.
One of the main ways discussed here for looking at data integrity was with the lie factor. Lie factor
depicts the degree to which a visualization distorts or misrepresents the data values being plotted. It
is calculated in the following way:
The delta symbol (\DeltaΔ) stands for difference or change. In words, the lie factor is the relative
change shown in the graphic divided by the actual relative change in the data. Ideally, the lie factor
should be 1: any other value means that there is some mismatch in the ratio of depicted change to
actual change.
Lie Factor in the Video
The lie factor shown in the video was in comparing the largest to the smallest doctor in terms of
pixels.
The number of pixels related to the largest image is 79,000 and 16,500 for the smallest. The
percentage change is 27% to 12%. So, the lie factor is calculated as:
Any lie factor greater than 1 suggests that your visual is misleading
The larger the factor the more misleading the visual
Factors less than 1 are hiding the magnitude of an effect.
Effective Explanatory Visual Recap
What have you learned so far?
At this point, you have all you need to make effective explanatory visuals. Simplicity is
the key to displaying your message to any audience. You know
The types of plots you can build with different variables.
The difference between exploratory and explanatory visuals.
Important visual components like position, size, color, and length.
The importance of design integrity, and how to assure your visuals maintain
integrity.
The importance of removing chart junk.
In the upcoming concepts before the end of this lesson, you will learn about some
additional effects that you can add to your visualizations. Use these when necessary, but
don't over do it.
Data can also be encoding with different shapes, but we don’t encode quantitive data with shapes, as
we probably run out of the number of shapes to encode our values. You would instead change your
data to a categorical ordinal variable, and encoding quantitive data with color can be confusing.
Look at this example , the shapes are not as great as color for differentiating the schools, and the
colors are hardly an indicator of all the different student-faculty ratios.
In general, color and shapes are best used for categorical variables, while the size of the marker can
assist in adding additional quantitative data.
** rather than addin additional encodings; try to break up;ypur visual into parts where each part of
your message can be conveyed
Only use these additional encodings when absolutely necessary. Often these
additional encodings suggest you are providing too much information in a single
plot. Instead, it might be better to break the information into multiple individual
messages, so the audience can understand every aspect of your message. You can
also build in each aspect one at a time, which you saw in the previous lesson
with Hans Rosling. This feels less overwhelming than if you just saw this plot all at
once.
Encodings
In general, color and shape are best for categorical variables, while the size of
marker can assist in adding additional quantitative data, as we demonstrated here.
Extra: Code
Some of the plots in this presentation were created using a software called R, and a
very popular library known as ggplot2. Though this is beyond the scope of this
course, the code used to create these visualizations is provided below:
[Link]('ggplot2')
library(ggplot2)
df = [Link]([Link]()) #select your dataset
df2 = head(df, 30)
qplot(df2$[Link], df2$[Link], xlab = 'Math SAT Score',
ylab = 'Verbal SAT Score', main = 'Average SAT Scores By
College')
qplot(df2$[Link], df2$[Link], xlab = 'Math SAT Score',
ylab = 'Verbal SAT Score', main = 'Average SAT Scores By
College',
color = [Link](df2$Public..1...Private..2.))
qplot(df2$[Link], df2$[Link], xlab = 'Math SAT Score',
ylab = 'Verbal SAT Score', main = 'Average SAT Scores By
College',
shape = [Link](df2$Public..1...Private..2.), color =
df2$stud..fac..ratio)
ggplot(df2, aes(x=[Link], y=[Link],
group=stud..fac..ratio)) +
geom_point(aes(shape=stud..fac..ratio,
color=[Link](df2$Public..1...Private..2.))
General design tips
Bad visuals can be avoided by:
1. Maintaining a large data-ink ratio and
removing unnecessary items from visuals.
2. Choosing visual encodings that work
to highlight insights.
3. Maintaining data Integrity in the visual.
For explanatory visuals:
1. Focus the audience's attention on the
insight you want them to act on.
2. Use color only when necessary. Simple is
often better.
3. Tell a story. More on this ahead!
Tell a story
Telling stories with data follows these steps:
1. Start with a Question
2. Repetition is a Good Thing
3. Highlight the Answer
4. Call Your Audience To Action