SAI Assessment 1
LeBron James data visualizations
Introduction
In this assessment I will use a data set on NBA star LeBron James, from the 2022/23 season with the LA Lakers. The visualizations will include, his field goal % across multiple variables, his shot frequency and also shooting maps based on success/failure. All data that is produced from the original data set was coded in RStudio, and will now be presented in Quarto.
LeBrons makes vs misses per quarter (Inc OT)
This graphic below represents the distribution of LeBrons total shots across the game, split by the Four quarters plus Overtime. As we can see, his misses are highest in the 4th quarter, highlighting the effect of fatigue. We can also see his total shot volume is down in the 1st quarter, as he is known to pass the ball more in this period to get his teammates involved in the play.
Average shot distance vs each opponent in the NBA
This graphic represents mean shot distance that LeBron took against each team across the course of the entire season. This can be a great visualization to understand which types of teams play a certain defense that allows him to get shots closer to the basket, like Chicago and Minnesota, or that force him further away, such as Boston or the Clippers.
In these two court maps, we can see where LeBron is hitting or missing shots at higher rates. As expected, he makes a lot of shots very close to the basket. We can also see that he misses significantly more 3 point attempts (represented with triangles) than he makes. At a further dive into the shot numbers, we can see that does not make a lot of mid range shots (shots outside the painted area, but inside the 3 point line). This may be due to the lack of value in them, which means players will usually try for an easier shot in the paint, or recycle the ball back out behind the 3 point arc. The two point shots in this ‘Mid range’ are likely shots hes had to settle for, due to shot clock or defensive pressure.
We can further see that with the heat map of LeBrons total shots taken. Shots around the basket like dunks and layups have the highest frequency, followed by the left hand side of behind the 3 point arc. This makes sense as LeBron is right handed, making this side more favorable to shoot from.
The below pie chart shows a percentage breakdown of the total shots LeBron took, per quarter (Inc OT). Whilst the segments of the four quarters look largely similar, we can see that there is nearly a 6% difference between the third and fourth quarters. a defensive teams analyst could use this data, alongside further pass attempt data, to inform whoever is defending LeBron of what hes most likely to do based on the period of the game.
Below is a stacked bar chart, that represents not only the variance in frequency of each shot type ( 2pointer vs 3 pointer), but also the field goal percentage of both. Field goal percentage (FG%) is calculated by taking the number of successful shots taken and dividing it by the number of total shots. Here we can see a large contrast in the volume and also the accuracy of the LeBron between the two shot types.
The below plot visualizes the change in FG% as time progresses in each quarter, as well as the number of shots. Each quarter is further broken down into 3 minute bins. Each bin the has a data point for 2 pointers and 3 pointers. The size of the point represents the frequency of shots in this period, and the colour represents the FG%.
The use of a court to visualize shot data can be particularly useful for defensive teams looking to develop a scheme to limit LeBron. The below court map with FG% based on distance shows that he is more accurate from 18-24 feet, than he is from 12-18. Insight such as this would allow teams to set up in a way that would put LeBron, or any other player, in the worst position for them to succeed, based on prior shooting data.
Like previously mentioned, the mid-range shot in basketball is slowly being faded out of the game, and the below graphic shows that LeBron is no different to his piers. The high frequency is evident in the bar height influx for 0-6 feet (shots around the basket) and 24-30 feet (shots behind the 3 point line). This is contrasted by the FG% line, showing that it steadily declines as the distance gets further, but the reward for a 3 pointer is 50% greater than a 2 pointer, so the frequency is just.
The last graphic shows us the difference in LeBrons shooting trends when his team is trailing vs when they are leading. When his team is trailing, his volume of 3 point shots over a quarter a lot more even that when he is leading. His 3 point shot share drops as low as 15% when there is 5 minutes to go, and jumping to nearly 50% of his shots in the last minute of a quarter. We can also see the large increase in shot attempts in the final minute of a quarter when hes trailing, indicating his self belief to take the last shot.
Conclusion
These are just some of many interesting data visualizations that can be performed in Rstudio for a basketball players shot data. The use of court maps and FG% graphics give us a deeper insight into the ability of a player, at specific times, locations and in different game siuataions.