Week 1: Review of Data Visualization

Stat 431


(Since Week 1 consists of review of Stat 331 material, you should be able to skip some of the required readings and viewings. It is your responsibility to decide which areas you need to review before diving into Stat 431.)


Time Estimates:
     Videos: 6 min
     Readings: 0-90 min
     Activities: 0-15 min
     Check-ins: 2



Extra Resources:

The Grammar of Graphics

You should feel comfortable with:

  • Knowing what goes into an aesthetic (aes()) versus the geometry (geom_*())

  • Identifying these elements of existing plots


Required Video: Grammar of Graphics with ggplot2




Check-In 1: Grammar of Graphics


Identify the elements of the following plot as

  1. The aesthetic
  2. The geometry
  3. The scales
  4. None of the above

  1. The x-axis is age
  2. The y-axis is “Urge to run up the down escalator”
  3. The y-axis ranges from “Weak” to “Strong”
  4. This is a line graph
  5. The two lines are “What I was supposed to feel” and “What I’ve actually felt”
  6. The lines are labeled with text
  7. Only even ages are labelled
  8. Stick figure people are sliding down the line

Canvas Link     

Using ggplot2

You should be comfortable with:

  • Using the “big 5” geometries

  • Changing optional arguments.

  • faceting


Required Reading: RStudio Primer: Data Visualization



Recommended Reading: R4DS Chapter 3: Data Visualisation



Check-In 2: ggplot


Fill in the blanks for the following plot:

starwars %>%
  filter(species == "Human") %>%
  ggplot(aes(  = height,  = mass,      = gender)) +
  geom_     (    = 17) +
         ("Heights and Weights of Humans in Star Wars")

Canvas Link