Session Ready
Exercise

Plotting a line over time

In the last chapter, you learned how to summarize() the votes dataset by year, particularly the percentage of votes in each year that were "yes".

You'll now use the ggplot2 package to turn your results into a visualization of the percentage of "yes" votes over time.

Instructions
100 XP

The by_year dataset has the number of votes and percentage of "yes" votes each year.

  • Load the ggplot2 package.
  • Use ggplot() with the geom_line layer to create a line plot with year on the x-axis and percent_yes on the y-axis.