Is there statistical significance corresponding to the relationship between NBA centers’ ability to attempt and make three-point shots at a high volume and the amount of playing time they have?
To collect and transform my data into a workable state, I used Python to both call the API and to save the data into a CSV.
q = "https://www.balldontlie.io/api/v1/players?per_page=100"
valid = True
page=1
#Instantiate variable lists to store player info
p_id=[]
f_name=[]
l_name=[]
t_id=[]
t_name=[]
#This loop allows for pagination until there are no pages left
while (page!=None):
#Build query string and request
response = requests.get(q + f'&page={page}')
data = response.json()
players = data['data']
#Loop through response to filter out positions
for line in players:
if (line['height_feet'] == None):
if ((line['position'] == 'C') or (line['position']== 'F-C')):
#Now that conditions are met, save player data
p_id.append(line['id'])
f_name.append(line['first_name'])
l_name.append(line['last_name'])
t_id.append(line['team']['id'])
t_name.append(line['team']['full_name'])
else:
continue
elif ((line['height_feet']*12+line['height_inches'])>=83):
#Some players above 6'11" tall play center despite their position stating otherwise
p_id.append(line['id'])
f_name.append(line['first_name'])
l_name.append(line['last_name'])
t_id.append(line['team']['id'])
t_name.append(line['team']['full_name'])
#Assign next page value to page to check if != None
page=data['meta']['next_page']
#Sleep to avoid request limitations
time.sleep(1)
d = {'player_id': p_id, 'first_name': f_name,
'last_name': l_name, 'team_id': t_id, 'team_name': t_name}
#Finished player dataset
df = pd.DataFrame(data=d)
df_players=dfOnce I had a dataset of all the centers in NBA history, I then
gathered season average stats for each player by iterating through my
list of player_ids to request data from every season
between 1979-2021.
szn = 2021
while (szn >= 1979):
df_init = df_players
p_id=[]
season = []
mins = []
fg3m = []
fg3a = []
fg3_pct = []
oreb = []
dreb = []
reb = []
ast = []
stl = []
blk = []
my_q = build_q(df_players.player_id.tolist(), f"https://www.balldontlie.io/api/v1/season_averages?season={szn}")
response = requests.get(my_q)
avgs = response.json()
avgs = avgs['data']
time.sleep(1)
for i in range(len(avgs)):
p_id.append(avgs[i]['player_id'])
season.append(avgs[i]['season'])
mins.append(avgs[i]['min'])
fg3m.append(avgs[i]['fg3m'])
fg3a.append(avgs[i]['fg3a'])
fg3_pct.append(avgs[i]['fg3_pct'])
oreb.append(avgs[i]['oreb'])
dreb.append(avgs[i]['dreb'])
reb.append(avgs[i]['reb'])
ast.append(avgs[i]['ast'])
stl.append(avgs[i]['stl'])
blk.append(avgs[i]['blk'])
df_temp = pd.DataFrame(data={'player_id': p_id, 'season': season,
'mins': mins, 'fg3m': fg3m, 'fg3a': fg3a,
'fg3_pct': fg3_pct, 'oreb': oreb, 'dreb': dreb,
'reb': reb, 'ast': ast, 'stl': stl, 'blk': blk})
df_init = df_init.set_index('player_id').join(df_temp.set_index('player_id'))
df_init = df_init.dropna()
df_final = pd.concat([df_final,df_init])
szn-=1## Rows: 832
## Columns: 18
## Rowwise: player_id
## $ player_id <int> 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,…
## $ first_name <chr> "Steven", "Steven", "Steven", "Steven", "Steven", "Steven",…
## $ last_name <chr> "Adams", "Adams", "Adams", "Adams", "Adams", "Adams", "Adam…
## $ team_id <int> 15, 15, 15, 15, 15, 15, 15, 15, 15, 3, 3, 3, 3, 3, 3, 3, 3,…
## $ team_name <chr> "Memphis Grizzlies", "Memphis Grizzlies", "Memphis Grizzlie…
## $ season <int> 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2006,…
## $ mins <int> 14, 25, 25, 29, 32, 33, 26, 27, 26, 22, 34, 37, 37, 39, 36,…
## $ secs <int> 46, 17, 10, 52, 43, 19, 40, 39, 17, 5, 51, 5, 27, 38, 15, 4…
## $ fg3m <dbl> 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.02, 0.00, 0.00, 0.00,…
## $ fg3a <dbl> 0.00, 0.03, 0.00, 0.01, 0.03, 0.03, 0.05, 0.05, 0.01, 0.03,…
## $ fg3_pct <dbl> 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.333, 0.000, 0.0…
## $ oreb <dbl> 1.75, 2.84, 2.74, 3.51, 5.05, 4.89, 3.30, 3.67, 4.59, 2.29,…
## $ dreb <dbl> 2.35, 4.63, 3.93, 4.15, 3.96, 4.61, 5.94, 5.19, 5.41, 2.67,…
## $ reb <dbl> 4.10, 7.47, 6.66, 7.66, 9.01, 9.50, 9.24, 8.86, 10.00, 4.95…
## $ ast <dbl> 0.53, 0.94, 0.78, 1.08, 1.16, 1.55, 2.32, 1.91, 3.37, 0.38,…
## $ stl <dbl> 0.49, 0.54, 0.53, 1.11, 1.21, 1.48, 0.81, 0.93, 0.86, 0.35,…
## $ blk <dbl> 0.70, 1.23, 1.11, 0.98, 1.03, 0.95, 1.08, 0.66, 0.79, 1.16,…
## $ full_name <chr> "Steven Adams", "Steven Adams", "Steven Adams", "Steven Ada…
## player_id first_name last_name team_id
## Min. : 3 Length:832 Length:832 Min. : 1.00
## 1st Qu.: 179 Class :character Class :character 1st Qu.: 8.00
## Median : 325 Mode :character Mode :character Median :16.00
## Mean : 832753 Mean :15.47
## 3rd Qu.: 460 3rd Qu.:22.25
## Max. :24572055 Max. :30.00
## team_name season mins secs
## Length:832 Min. :1996 Min. : 0.00 Min. : 0.00
## Class :character 1st Qu.:2012 1st Qu.:12.00 1st Qu.:15.00
## Mode :character Median :2017 Median :20.00 Median :30.00
## Mean :2015 Mean :19.98 Mean :29.78
## 3rd Qu.:2019 3rd Qu.:29.00 3rd Qu.:45.00
## Max. :2021 Max. :39.00 Max. :59.00
## fg3m fg3a fg3_pct oreb
## Min. :0.0000 Min. :0.0000 Min. :0.0000 Min. :0.000
## 1st Qu.:0.0000 1st Qu.:0.0200 1st Qu.:0.0000 1st Qu.:0.910
## Median :0.0200 Median :0.1300 Median :0.1820 Median :1.600
## Mean :0.3171 Mean :0.9279 Mean :0.1872 Mean :1.764
## 3rd Qu.:0.4200 3rd Qu.:1.3225 3rd Qu.:0.3410 3rd Qu.:2.500
## Max. :3.0000 Max. :7.2900 Max. :1.0000 Max. :5.430
## dreb reb ast stl
## Min. : 0.000 Min. : 0.000 Min. :0.000 Min. :0.0000
## 1st Qu.: 2.285 1st Qu.: 3.265 1st Qu.:0.480 1st Qu.:0.2800
## Median : 3.790 Median : 5.410 Median :0.950 Median :0.4900
## Mean : 4.148 Mean : 5.912 Mean :1.280 Mean :0.5378
## 3rd Qu.: 5.790 3rd Qu.: 8.162 3rd Qu.:1.685 3rd Qu.:0.7425
## Max. :11.190 Max. :15.990 Max. :8.320 Max. :1.9100
## blk full_name
## Min. :0.0000 Length:832
## 1st Qu.:0.4300 Class :character
## Median :0.7950 Mode :character
## Mean :0.8933
## 3rd Qu.:1.2425
## Max. :3.6800
To begin exploring my data, my first thought was to fit a linear model to identify the best predictors for playing time
##
## Call:
## lm(formula = mins ~ ., data = subset)
##
## Coefficients:
## (Intercept) player_id fg3m fg3a fg3_pct oreb
## 3.243e+00 -1.581e-07 7.748e+00 -1.850e+00 4.854e-01 -1.256e+01
## dreb reb ast stl blk
## -1.372e+01 1.491e+01 1.434e+00 4.021e+00 3.315e+00
##
## Call:
## lm(formula = mins ~ ., data = subset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -12.5560 -2.4811 -0.2939 2.2751 12.6629
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.243e+00 3.249e-01 9.981 < 2e-16 ***
## player_id -1.581e-07 3.855e-08 -4.102 4.50e-05 ***
## fg3m 7.748e+00 1.722e+00 4.501 7.76e-06 ***
## fg3a -1.850e+00 6.320e-01 -2.927 0.00352 **
## fg3_pct 4.854e-01 7.770e-01 0.625 0.53238
## oreb -1.256e+01 2.812e+01 -0.447 0.65533
## dreb -1.372e+01 2.812e+01 -0.488 0.62560
## reb 1.491e+01 2.812e+01 0.530 0.59601
## ast 1.434e+00 1.749e-01 8.199 9.29e-16 ***
## stl 4.021e+00 5.750e-01 6.994 5.55e-12 ***
## blk 3.315e+00 2.907e-01 11.404 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.754 on 821 degrees of freedom
## Multiple R-squared: 0.8615, Adjusted R-squared: 0.8598
## F-statistic: 510.6 on 10 and 821 DF, p-value: < 2.2e-16
Upon first inspection, looks like 3-Point field goal attempts is a solid variable to look into. Out of curiosity, let’s see the change in the correlation matrices from both 2010 and 2021 to compare.
## List of 93
## $ line :List of 6
## ..$ colour : chr "black"
## ..$ size : num 0.5
## ..$ linetype : num 1
## ..$ lineend : chr "butt"
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ rect :List of 5
## ..$ fill : chr "white"
## ..$ colour : chr "black"
## ..$ size : num 0.5
## ..$ linetype : num 1
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_rect" "element"
## $ text :List of 11
## ..$ family : chr ""
## ..$ face : chr "plain"
## ..$ colour : chr "black"
## ..$ size : num 11
## ..$ hjust : num 0.5
## ..$ vjust : num 0.5
## ..$ angle : num 0
## ..$ lineheight : num 0.9
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ title : NULL
## $ aspect.ratio : NULL
## $ axis.title : NULL
## $ axis.title.x :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 2.75points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.x.top :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 2.75points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.x.bottom : NULL
## $ axis.title.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : num 90
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 2.75points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.y.left : NULL
## $ axis.title.y.right :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : num -90
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.75points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : chr "grey30"
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 2.2points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x.top :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 2.2points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x.bottom : NULL
## $ axis.text.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 1
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 2.2points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.y.left : NULL
## $ axis.text.y.right :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.2points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.ticks : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ axis.ticks.x : NULL
## $ axis.ticks.x.top : NULL
## $ axis.ticks.x.bottom : NULL
## $ axis.ticks.y : NULL
## $ axis.ticks.y.left : NULL
## $ axis.ticks.y.right : NULL
## $ axis.ticks.length : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## $ axis.ticks.length.x : NULL
## $ axis.ticks.length.x.top : NULL
## $ axis.ticks.length.x.bottom: NULL
## $ axis.ticks.length.y : NULL
## $ axis.ticks.length.y.left : NULL
## $ axis.ticks.length.y.right : NULL
## $ axis.line : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ axis.line.x : NULL
## $ axis.line.x.top : NULL
## $ axis.line.x.bottom : NULL
## $ axis.line.y : NULL
## $ axis.line.y.left : NULL
## $ axis.line.y.right : NULL
## $ legend.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
## ..- attr(*, "unit")= int 8
## $ legend.spacing : 'simpleUnit' num 11points
## ..- attr(*, "unit")= int 8
## $ legend.spacing.x : NULL
## $ legend.spacing.y : NULL
## $ legend.key : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.key.size : 'simpleUnit' num 1.2lines
## ..- attr(*, "unit")= int 3
## $ legend.key.height : NULL
## $ legend.key.width : NULL
## $ legend.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.text.align : NULL
## $ legend.title :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.title.align : NULL
## $ legend.position : chr "right"
## $ legend.direction : NULL
## $ legend.justification : chr "center"
## $ legend.box : NULL
## $ legend.box.just : NULL
## $ legend.box.margin : 'margin' num [1:4] 0cm 0cm 0cm 0cm
## ..- attr(*, "unit")= int 1
## $ legend.box.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.box.spacing : 'simpleUnit' num 11points
## ..- attr(*, "unit")= int 8
## $ panel.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ panel.border : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ panel.spacing : 'simpleUnit' num 5.5points
## ..- attr(*, "unit")= int 8
## $ panel.spacing.x : NULL
## $ panel.spacing.y : NULL
## $ panel.grid :List of 6
## ..$ colour : chr "grey92"
## ..$ size : NULL
## ..$ linetype : NULL
## ..$ lineend : NULL
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ panel.grid.major : NULL
## $ panel.grid.minor :List of 6
## ..$ colour : NULL
## ..$ size : 'rel' num 0.5
## ..$ linetype : NULL
## ..$ lineend : NULL
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ panel.grid.major.x : NULL
## $ panel.grid.major.y : NULL
## $ panel.grid.minor.x : NULL
## $ panel.grid.minor.y : NULL
## $ panel.ontop : logi FALSE
## $ plot.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ plot.title :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 1.2
## ..$ hjust : num 0
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.title.position : chr "panel"
## $ plot.subtitle :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.caption :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 0.8
## ..$ hjust : num 1
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 5.5points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.caption.position : chr "panel"
## $ plot.tag :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 1.2
## ..$ hjust : num 0.5
## ..$ vjust : num 0.5
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.tag.position : chr "topleft"
## $ plot.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
## ..- attr(*, "unit")= int 8
## $ strip.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ strip.background.x : NULL
## $ strip.background.y : NULL
## $ strip.placement : chr "inside"
## $ strip.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : chr "grey10"
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 4.4points 4.4points 4.4points 4.4points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.text.x : NULL
## $ strip.text.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : num -90
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.switch.pad.grid : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## $ strip.switch.pad.wrap : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## $ strip.text.y.left :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : num 90
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## - attr(*, "class")= chr [1:2] "theme" "gg"
## - attr(*, "complete")= logi TRUE
## - attr(*, "validate")= logi TRUE
pairs <- read.csv('centers_final.csv') %>%
select(season, mins, fg3m, reb, ast, stl, blk)
pairs <- pairs %>%
filter(season==2021)
pairs <- pairs %>%
select(mins, fg3m, reb, ast, stl, blk)
ggpairs(pairs, title="Correlation Matrix w/ ggpairs")