Week 3 Lab


Introducing ggplot2


September 19, 2023


Visualization is an important aspect of data science because it can reveal patterns that are not immediately obvious in raw data, and it can be used to quickly and effectively communicate about data. This lab is focused on introducing an approach to visualization using a “grammar of graphics”. In this lab you will

  • Understand the “grammar of graphics” approach and how it is implemented in the ggplot2 package

  • Look at how to plot combinations of categorical and numerical data as amounts, distributions, and relationships using bar charts, histograms, boxplots, and scattterplots

  • How to use aesthetic mapping to look at multiple variables in the same graph.