Skip to contents

Get Player Stats Leaders by Metric

Usage

kp_playerstats(
  metric = "eFG",
  conf = NULL,
  conf_only = FALSE,
  year = most_recent_mbb_season()
)

Arguments

metric

Used to get leaders for different metrics. Available values are:
'ORtg', 'Min', 'eFG', 'Poss', Shots', 'OR', 'DR', 'TO', 'ARate', 'Blk',
'FTRate', 'Stl', 'TS', 'FC40', 'FD40', '2P', '3P', 'FT'.
Default is 'eFG'. 'ORtg' returns a list of four dataframes, as there are four tables:
players that used more than 28 percent of possessions, more than 24 percent of possessions, more than 20 percent of possessions, and with no possession restriction.

conf

Used to limit to players in a specific conference. Allowed values are: 'A10', 'ACC', 'AE', 'AMER',
'ASUN', 'B10', 'B12', 'BE', 'BSKY', 'BSTH', 'BW', 'CAA', 'CUSA', 'HORZ', 'IND', IVY',
'MAAC', 'MAC', 'MEAC', 'MVC', 'MWC', 'NEC', 'OVC', 'P12', 'PAT', 'SB', 'SC', 'SEC', 'SLND',
'SUM', 'SWAC', 'WAC', 'WCC'.
If you try to use a conference that doesn't exist for a given season, like 'IND' and '2018',
you'll get an empty table, as kenpom.com doesn't serve 404 pages for invalid table queries like that.
No filter applied by default.

conf_only

Used to define whether stats should reflect conference games only.
Only available if specific conference is defined. Only available for season after 2013, FALSE by default.

year

Year of data to pull (earliest year of data available: 2004)

Value

Returns a tibble of player stats

col_nametypes
rkcharacter
playercharacter
teamcharacter
e_fgcharacter
hgtcharacter
wgtcharacter
yrcharacter
yearnumeric

See also

Examples

# \donttest{
  try(kp_playerstats(metric = 'eFG', conf_only = FALSE, year=2021))
#> 2023-11-28 22:12:35.32085: Invalid arguments or no player stats data for 2021 eFG available!
#> Error in kp_playerstats(metric = "eFG", conf_only = FALSE, year = 2021) : 
#>   object 'kenpom' not found
# }