Exercise: Compare populations

Compare the population growth over the last decades in the countries Austria, Hungary and Serbia.

  1. Use the data set gapminder_comparison in your ggplot() function which contains only data for the countries in question.
  2. Create a line graph with geom_line()
  3. Map the year to the x-axis and the population pop to the y-axis with aes()
  4. Map the group and the color parameter to the country variable.
Output

Submit code to see output here.

Create a line graph with ggplot