This R Markdown file is available on GitHub.

View the video of the presentation.

Download the slides from today’s talk



If you want to learn enough graphic design to be dangerous, get this book:

  • Robin Williams, The Non-Designer’s Design & Type Books: Design and Typographic Principles for the Visual Novice, Deluxe Edition. (Berkeley, California: Peachpit Press, 2008). (Or any more recent version too)

There are some helpful summary articles about CRAP principles online too:

There are a ton of excellent data visualization books, including two new (free!) books by Kieran Healy and Claus Wilke:

  • Kieran Healy, Data Visualization for Social Science: A practical introduction with R and ggplot2
  • Claus Wilke, Fundamentals of Data Visualization
  • Alberto Cairo, The Truthful Art: Data, Charts, and Maps for Communication (Berkeley, California: New Riders, 2016).
  • Stephanie D. H. Evergreen, Effective Data Visualization: The Right Chart for the Right Data (Thousand Oaks, CA: Sage, 2017).
  • Dona M. Wong, The Wall Street Journal Guide to Information Graphics: The Dos and Don’ts of Presenting Data, Facts, and Figures (London: W. W. Norton & Company, 2010).
  • Hadley Wickham and Garrett Grolemund, R for Data Science: Import, Tidy, Transform, Visualize, and Model Data (Sebastopol, California: O’Reilly Media, 2017). [FREE online]
  • Alberto Cairo, The Functional Art: An Introduction to Information Graphics and Visualization (Berkeley, California: New Riders, 2013).

How to select the appropriate chart type

Many people have created many useful tools for selecting the correct chart type for a given dataset or question. Here are some of the best:

  • The Data Visualisation Catalogue: Descriptions, explanations, examples, and tools for creating 60 different types of visualizations.
  • The Data Viz Project: Descriptions and examples for 150 different types of visualizations. Also allows you to search by data shape and chart function (comparison, correlation, distribution, geographical, part to whole, trend over time, etc.).
  • From Data to Viz: A decision tree for dozens of chart types with links to R and Python code.
  • The Chartmaker Directory: Examples of how to create 51 different types of visualizations in 31 different software packages, including Excel, Tableau, and R.
  • R Graph Catalog: R code for 124 ggplot graphs.
  • Emery’s Essentials: Descriptions and examples of 26 different chart types.


  • Adobe Color: Create, share, and explore rule-based and custom color palettes.
  • ColorBrewer: Sequential, diverging, and qualitative color palettes that take accessibility into account.
  • viridis: Percetually uniform color scales.
  • Scientific Colour-Maps: Perceptually uniform color scales like viridis. Use them in R with scico.
  • Colorgorical: Create color palettes based on fancy mathematical rules for perceptual distance.
  • Colorpicker for data: More fancy mathematical rules for color palettes (explanation).
  • iWantHue: Yet another perceptual distance-based color palette builder.
  • ColourLovers: Like Facebook for color palettes.
  • Photochrome: Word-based color pallettes.


Other helpful data visualization resources

🎶 Take a sad plot and make it CRAPier 🎶


By default, R graphics don’t really respect CRAP rules. In base R, everything is centered:

plot(mtcars$wt, mtcars$mpg, main = "Here's a title")

Nowadays in ggplot, titles are left aligned, but they used to be centered by default. Even so, now there are multiple alignments—things are aligned center and left (and right if you add a caption)

ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  labs(title = "Here's a title",
       caption = "I'm right aligned")