library(trelliscopejs)
library(dplyr)
library(ggplot2)
data <- read.csv("regularStats.csv")
data %>%
filter(MINS >= 1300) %>%
ggplot(aes(x = PTS.G, y = FG.)) +
geom_point(aes(color = TEAM)) +
guides(color = "none") +
geom_text(aes(label = ifelse(PTS.G>25.0 | FG. >0.65, NAME,"")),
size = 2,
vjust = -0.5
) +
facet_trelliscope(~ YEAR,
name = "Points per Game v Field Goal Percentage",
desc = "From the 2015 to 2023 NBA season",
nrow = 2,
ncol = 3,
scales = c("same", "same"),
path = "./nba_trelliscope",
self_contained = TRUE
)
My data set is one that I had created for my undergraduate Honors Thesis based on data from the well known sports reference site and their NBA specific one, basketball reference. My data set is comprised of majority per game statistics for regular box score statistics as well as things such as the year, player name, team name, and different measures of efficiency such as field goal percentage.
The variables I am graphing in my plots are those of FG% (Field Goal Percentage), represented by “FG.” and PTS/G (Points Per Game) represented by “PTS.G”. I chose to look at these as they are often regarded as the most important statistics in basketball. The first measures how efficient your are at scoring, meaning less wasted possessions and the second measures how much you score, measuring your overall ability to score. I chose to facet on the NBA season, denoted by YEAR. I did this because I believed this could give use a good view over how the game of basketball has developed from the 2000 NBA season to the 2023 NBA season.
I did not have any super serious challenges when making these graphs, the only things I really felt would be beneficial is the labeling of the outliers of the graph, those players with either high PTS/G which I decided was 25.0, or those with high FG% which I decided was 0.65 or 65%. I also wanted a way to make the plots more appealing and easier to read, to do so I limited the players plotted to only be those with greater than or equal to 1300 minutes played in a season (the limit to be eligible for an award) and to change the color of the points based on team. This second one is less valuable but breaks up the points a bit so that they are more easily seen. One thing I noticed from these graphs is that over time more and more players have achieved the high FG% and high PTS/G. This made me interested in the Cognostic measures of FG._median and PTS.G_median. PTS.G_median was interesting for me because is shows that the median players of the NBA have increased in PTS/G over the years, going from the high 11s to the mid to high 14s by the end of the window. I think this is because of the changes in the game over time, with higher pace and higher amounts of three point shots attempted by the average player. I also thought FG._median was interesting in turn with this because it had not seen much of a change over the study even though the top players in the statistic have become more noticeable. I think this is because the game had partly been “solved” in which analytics have made bigs (Power Forwards and Centers) stay in the paint while guards (Point Guard and Shooting Guards) stay on the perimeter. Leading to the lower shot percentage three point shot and the high efficiency field goals in the paint balancing out.