Many sport leagues today are making use of data analytics to measure the value/impact a player has on the game. Knowing this information allows teams to find the best players and try to acquire them, or give more opportunities to their own players. A new metric for evaluating NBA players was recently made, called RAPTOR. The link to the article is below:
https://fivethirtyeight.com/features/introducing-raptor-our-new-metric-for-the-modern-nba/
raptor <- read.csv('latest_RAPTOR_by_player.csv')
head(raptor)
## player_name player_id season poss mp raptor_box_offense
## 1 Steven Adams adamsst01 2020 2406 1151 1.10735869
## 2 Bam Adebayo adebaba01 2020 3321 1621 -0.94971328
## 3 LaMarcus Aldridge aldrila01 2020 2982 1426 -0.29648202
## 4 Nickeil Alexander-Walker alexani01 2020 1068 488 -2.46306006
## 5 Grayson Allen allengr01 2020 1100 498 -0.05537151
## 6 Jarrett Allen allenja01 2020 2661 1253 -1.44701052
## raptor_box_defense raptor_box_total raptor_onoff_offense raptor_onoff_defense
## 1 0.7588565 1.8662152 2.056921 1.5087383
## 2 1.8378767 0.8881634 3.448555 1.9157030
## 3 0.7189402 0.4224582 -2.228883 -2.3249303
## 4 -1.6394255 -4.1024856 1.688460 -3.4831949
## 5 -1.4321936 -1.4875651 -1.398012 -2.8576064
## 6 3.2932180 1.8462075 4.126534 -0.9381903
## raptor_onoff_total raptor_offense raptor_defense raptor_total war_total
## 1 3.565660 1.3631522 0.9680782 2.3312304 2.9621261
## 2 5.364258 -0.1249835 1.9401977 1.8152142 3.7430885
## 3 -4.553813 -0.7564653 0.1693034 -0.5871619 1.5568566
## 4 -1.794735 -1.7498618 -2.0776347 -3.8274965 -0.2691600
## 5 -4.255619 -0.3303190 -1.7883294 -2.1186484 0.1611581
## 6 3.188344 -0.3555392 2.6047127 2.2491735 3.1718105
## war_reg_season war_playoffs predator_offense predator_defense predator_total
## 1 2.9621261 0 0.6289919 1.223214 1.8522056
## 2 3.7430885 0 -0.2480244 1.087785 0.8397601
## 3 1.5568566 0 -0.8111526 0.593952 -0.2172006
## 4 -0.2691600 0 -0.1376933 -2.235791 -2.3734846
## 5 0.1611581 0 -0.2830240 -2.668864 -2.9518884
## 6 3.1718105 0 -0.7801081 2.448162 1.6680539
## pace_impact
## 1 -0.7447600
## 2 -0.8784285
## 3 -1.0834163
## 4 0.3376065
## 5 0.4736383
## 6 -0.7684053
colnames(raptor)
## [1] "player_name" "player_id" "season"
## [4] "poss" "mp" "raptor_box_offense"
## [7] "raptor_box_defense" "raptor_box_total" "raptor_onoff_offense"
## [10] "raptor_onoff_defense" "raptor_onoff_total" "raptor_offense"
## [13] "raptor_defense" "raptor_total" "war_total"
## [16] "war_reg_season" "war_playoffs" "predator_offense"
## [19] "predator_defense" "predator_total" "pace_impact"
pacman::p_load(dplyr, tidyr, magrittr)
raptor %<>%
select(-c(season, war_playoffs,
war_reg_season))
raptor %<>%
rename(possessions = poss,
minutes_played = mp)
colnames(raptor)
## [1] "player_name" "player_id" "possessions"
## [4] "minutes_played" "raptor_box_offense" "raptor_box_defense"
## [7] "raptor_box_total" "raptor_onoff_offense" "raptor_onoff_defense"
## [10] "raptor_onoff_total" "raptor_offense" "raptor_defense"
## [13] "raptor_total" "war_total" "predator_offense"
## [16] "predator_defense" "predator_total" "pace_impact"
The columns in RAPTOR are likely all significant in being able to measure a player’s value, which is generalized by the column “war_total”, so I did not remove many columns. I removed season as all the data is from the same season, 2020. I removed war_playoffs and war_reg_season because the playoffs have not happened yet and is just a column of 0’s, all the information is based on regular season data. I then renamed poss to possessions and mp to minutes played as they are not intuitive names.