Exercise

Basic line plots

Here, we'll use the economics dataset to make some line plots. The dataset contains a time series for unemployment and population statistics from the Federal Reserve Bank of St. Louis in the United States. The data is contained in the ggplot2 package.

To begin with, you can look at how the median unemployment time and the unemployment rate (the number of unemployed people as a proportion of the population) change over time.

Instructions 1/2

undefined XP
  • 1
    • Print the head of the economics dataset.
    • Plot unemploy vs. date as a line plot.
  • 2
    • Adjust the y-axis aesthetic of the plot so that it represents the proportion of the population that is unemployed.