1. Learn
  2. /
  3. Courses
  4. /
  5. Visualization Best Practices in R

Exercise

Orienting with the data

Let's take our first look at the new speeding dataset.

First, print the data frame to your screen and try and get a sense of it. You can use filter()s, group_by()s or any of your tidyverse functions to do this.

The supplied code is what we used to make the histogram of blue car speeds in the slides. Modify this code to look at how many miles-per-hour red cars were going over the speed limit (speed_over). Give the plot a title while you're at it to let people know what they're looking at.

Instructions

100 XP
  • Print the md_speeding data frame to the console and investigate it.
  • Change filter() to 'RED' cars.
  • Change column of interest to speed_over.
  • Title plot 'MPH over speed limit | Red cars'