Basic line chart in ggplot2

In this lesson, we’ll build line charts, which are great for showing trends and are frequently used in time series.

Let’s begin with importing the gapminder package, which contains a subset of the gapminder dataset on life expectancy, GDP per capita, and population by country. We’ll also print the first few rows of the gapminder dataset.

Get hands-on with 1200+ tech skills courses.