🗓️ Session 8: Data visualization

Published

13 11 2026

Modified

18 09 2026

One area for which R is particulary well-known for is the area of visualization. This is particularly because of the package ggplot2. This session introduces ggplot2 and the general approach to generate visualization in R. The good thing is that if you follow the approach described here, you can basically create every visualization type you can think of.

👨‍🏫 Lecture Slides

Download the slides of this session (PDF)

🎥 Lecture videos

All the videos are available via this playlist.

📚 Mandatory Reading

Further Reading

  • Wickham (2010), who introduces the theory underlying ggplot2
  • ggplot2 cheat sheet
  • Browse the website from Data to Viz and try to re-create some of the figures yourself
  • I like this blog from Yan Holtz, the creator of from Data to Viz; it helps highlighting the relevance of often under-appreciated aspects of a graph, such as its title

✍️ Coursework

  • Do the exercises Visualization1 from the DataScienceExercises package
learnr::run_tutorial(
  name = "Visualization1", 
  package = "DataScienceExercises", 
  shiny_args=list("launch.browser"=TRUE))

References

Gräbner-Radkowitsch, C. (2026) “Visualization with Ggplot2” C. Gräbner-Radkowitsch (ed.), Method and Inquiry, available at https://euf-methodology-hub.netlify.app/resources/visualization-ggplot2.
Wickham, H. (2010) “A Layered Grammar of Graphics,” Journal of Computational and Graphical Statistics 19(1): 3–28.