Exercise: Plot life expectancy of Brazil

Create your first line graph showing the life expectancy of people from Brazil over time.

  1. Use the ggplot() function and specify the gapminder_brazil dataset as input
  2. Add a geom_line() layer to the plot
  3. Map the year to the x-axis and the life expectancy lifeExp to the y-axis with the aes() function
Output

Submit code to see output here.

Create a line graph with ggplot