02. Data Viz

Examples, good and bad. Theory underlying what makes a viz good and bad. Tools to implement viz tasks.

Author
Published

August 27, 2025

Three monsters are painting data viz portraits.  Two of the monsters carry boxes labeled `themes` and `geoms`.  All of the data viz portraits look like ggplot figures.

Artwork by @allison_horst.

Agenda

August 27, 2025

  1. Grammar of graphics
  2. ggplot

Readings

Reflection questions

  • When creating a graph, try to sketch / image the graph before you code it. What do you want R to do (what is the goal)? In order to do that, what does R need to know?

  • What should the goal of a plot be? What should the goal of your plot be?

  • What different aspects deconstruct a plot?

Ethics considerations

  • Does your plot make the comparison of interest: easily? and accurately?

  • Did you add alt text to your images (see Writing Alt Text for Data Visualization)?

  • Is your plot accessible to those who are color blind or looking at the image in black and white?

Slides

Additional Resources