Data Viz

Drawn from Fundamentals of Data Visualization by Claus O. Wilke

Ugly, bad, and wrong figures

plot of chunk unnamed-chunk-1

3D figures are confusing

Representing multi-dimensional data

plot of chunk unnamed-chunk-4

Make things readable

plot of chunk unnamed-chunk-5

Make things readable

plot of chunk unnamed-chunk-6

Make things easy

If there is a clear visual ordering in your data, make sure to match it in the legend.

plot of chunk unnamed-chunk-7

Make things easy

If there is a clear visual ordering in your data, make sure to match it in the legend.

plot of chunk unnamed-chunk-8

Make things easy

Show the patterns and no extraneous information

plot of chunk unnamed-chunk-9

Make things easy

Show the patterns and no extraneous information

plot of chunk unnamed-chunk-10

Make things easy

Show the patterns and no extraneous information

plot of chunk unnamed-chunk-11

Qualitative Color Scales

Recommended: Okabe Ito, ColorBrewer Dark2, ggplot2 hue

plot of chunk unnamed-chunk-12

Qualitative Color Scales

Recommended: Colorbrewer Blues, Heat, Viridis

plot of chunk unnamed-chunk-14

Diverging color scales

Recommended: CARTO Earth, ColorBrewer PiYG, Blue-Red

plot of chunk unnamed-chunk-15

Adding highlights

Recommended: Okabe Ito Accent, Grays with accent, ColorBrewer Accent

plot of chunk unnamed-chunk-16

Use color for a purpose

plot of chunk unnamed-chunk-18

Make sure it grayscales

plot of chunk unnamed-chunk-19

Don't include too much information

Use qualitative color scales for three to five different categories

plot of chunk unnamed-chunk-20

Consider color deficiencies: sequential scale

A properly designed sequential scale (e.g. Heat) presents a continuous gradient from dark to light colors

plot of chunk unnamed-chunk-21

Consider color deficiencies: diverging scales

Popular color contrasts in diverging scales can become indistinguishable for some forms of color-vision deficiency. ColorBrewer PiYG (pink to yellow-green) works for all forms of color-vision deficiency.

plot of chunk unnamed-chunk-22

Consider color deficiencies: qualitative scales

Qualitative scales (e.g. Okabe Ito) require that many different colors are distinguishable from each other under all forms of cvd.

plot of chunk unnamed-chunk-23

Visualizing uncertainty

Error bars don't represent the variation within each category or the uncertainty of the sample means well.

plot of chunk unnamed-chunk-24

Visualizing uncertainty

Kernel density plots help to visualize several distributions at once.

plot of chunk unnamed-chunk-25

Consider what you want to communicate

plot of chunk unnamed-chunk-26

Consider what you want to communicate

plot of chunk unnamed-chunk-27