library(readxl)
StatsOG <- read_excel("Copy of Copy of Nextech Stats Showdown (2).xlsx")
StatsStepOne <- StatsOG[order(StatsOG$win_ratio, decreasing = TRUE),]
StatsXStepOne <- StatsStepOne[1:50,]
StatsStepTwo <- StatsXStepOne[order(StatsXStepOne$average_ppg, decreasing = TRUE),]
StatsXStepTwo <- StatsStepTwo[1:40,]
StatsStepThree <- StatsXStepTwo[order(StatsXStepTwo$rebound_differential, decreasing = TRUE),]
StatsXStepThree <- StatsStepThree[1:30,]
StatsStepFour <- StatsXStepThree[order(StatsXStepThree$three_point_perc, decreasing = TRUE),]
StatsXStepFour <- StatsStepFour[1:20,]
StatsStepFive <- StatsXStepFour[order(StatsXStepFour$free_throw_perc, decreasing = TRUE),]
StatsXStepFive <- StatsStepFive[1:10,]
StatsStepFinal <- StatsXStepFive[order(StatsXStepFive$win_ratio, decreasing = TRUE),]
print(StatsStepFinal)
## # A tibble: 10 × 8
## team game_count wins win_ratio three_p…¹ free_…² rebou…³ avera…⁴
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Arizona 34 31 0.912 0.356 0.736 265 84.6
## 2 Gonzaga 29 26 0.897 0.364 0.737 261 87.8
## 3 South Dakota St. 34 30 0.882 0.45 0.75 136 86.7
## 4 Duke 34 28 0.824 0.364 0.765 136 80.2
## 5 Kansas 34 28 0.824 0.353 0.723 160 78.6
## 6 Chattanooga 34 27 0.794 0.348 0.75 170 74.8
## 7 Montana St. 34 27 0.794 0.35 0.727 170 77
## 8 Kentucky 33 26 0.788 0.353 0.765 330 79.5
## 9 North Carolina 33 24 0.727 0.364 0.778 264 77.5
## 10 Colgate 34 23 0.676 0.375 0.733 102 76.1
## # … with abbreviated variable names ¹three_point_perc, ²free_throw_perc,
## # ³rebound_differential, ⁴average_ppg
In Trying to find the algorithm I wanted I first started with what I considered to be the most important parts to a basketball team’s success in my opinion: Win/Loss Ratio, Average Points per Game, rebound differential, 3 pointer percentage, and free throw percentage. With these in mind I thinned out the data set to those values, (creating the win loss ratio column in excel in the process,) and cleaned up the column names as well as excluding the previous years to keep it simple. The way the program works is by sorting the set 5 times by each of these categories in order of importance (supplied above) and eliminating the bottom 10 each time. In the end i got my list of ten which I sorted by win/loss again to get my official order: 1 Arizona 2 Gonzaga 3 South Dakota St. 4 Duke 5 Kansas 6 Chattanooga 7 Montana St. 8 Kentucky 9 North Carolina 10 Colgate