Session Ready
Exercise

Nesting your data

In this course, you will work with a collection of economic and social indicators for 77 countries over a period of 52 years. This data is stored in the gapminder dataframe.

In this exercise, you will transform your gapminder data into a nested dataframe by using the first tool needed to build the foundation of tidy machine learning skills: nest().

Note: This is a more granular version than the dataset available from the gapminder package. This version is available in the dslabs package.

Instructions
100 XP
  • Take a look at the first six rows of gapminder.
  • Now leverage group_by() and nest() to nest your dataframes by country, save this as gap_nested.
  • Explore the first six rows of the newly created dataframe gap_nested, note the new complex column data containing tibbles.