Exercise

What's in the basket?

It's now time to see what you have in your basket! Imagine you are working with thousands of baskets, you may first want to be able to display all or part of the items of that same basket. Additionally, you would like to know how many of these items you have in your basket. In this exercise, you will plot the items of the basket you retrieved in the previous exercise, i.e. One_basket and discover what type of items are in the basket we chose earlier.

Instructions 1/3

undefined XP
  • 1
    • Plot a barplot with geom_col() with the description on the x-axis and the number of items within baskets on the y-axis.
  • 2
    • Plot the total number of items in the basket. Use reorder() to sort the number of items purchased in decreasing order.
  • 3
    • Same instruction as the previous one but this time aggregate all quantities related to an item using the sum() function.