Session Ready
Exercise

Rectangling Star Wars movies

Let's pretend you're a big Star Wars fan and decided to scrape some data from the Star Wars API. You've already loaded the JSON-formatted response into R, and now have two lists of movies named movie_list and movie_planets_list. Your goal is to turn these into rectangular data frames with one row per movie so that you can start crunching those movie stats.

The dplyr package has been pre-loaded for you.

Instructions 1/4
undefined XP
  • 1
    • Create a tibble with a single column called movie out of the input movie_list.
    • 2
      • Widen the dataset by unnesting the movie column over multiple columns.
    • 3
      • Re-create the tibble with a single column called movie out of movie_planets_list.
    • 4
      • Unnest the planets column to a wider format.