Session Ready
Exercise

A first analysis

To start, let's look at the distribution of the shooting streaks. Along with the data frame, we also loaded the custom function calc_streak() into the workspace.

We'll use this function to calculate the lengths of all shooting streaks and then look at the distribution with a barplot. Note that a bar plot is preferable to a histogram here since our variable is discrete (we're dealing with counts) instead of continuous.

Instructions
100 XP
  • Use the function calc_streak() to calculate the length of Kobe's streaks (by using the variable basket) and assign the result to kobe_streak.
  • Draw a barplot of kobe_streak.