Exercise: Visualize the Gapminder dataset

Create a scatter plot using ggplot() and visualize the gapminder_2007 dataset with the GDP per capita gdpPercap on the x-axis and the life expectancy lifeExp of each country on the y-axis.

The ggplot2 package is already loaded. Follow these steps to create the plot:

  1. Specify the gapminder_2007 dataset through the ggplot() function
  2. Specify a geometric point layer with geom_point().
  3. Map the gdpPercap to the x-axis and the lifeExp to the y-axis with aes()

Submit code to see output here.

Create a scatter plot with ggplot