Session Ready
Exercise

Bonus: Visualizing every president's approval

In this exercise, you will create and graph a moving of approval ratings for all the presidents since the early 1900s.

The zoo, dplyr, and ggplot packages have already been loaded for you.

Instructions
100 XP
  • Use the rollmean() function from the zoo package to average each president's approval rating, stored in the Approve variable.
  • Add a geom_line layer to the plot.