Skip to contents

Get NBA Stats API Player Compare

Get NBA Stats API Player Compare

Usage

nba_playercompare(
  conference = "",
  date_from = "",
  date_to = "",
  game_segment = "",
  last_n_games = 0,
  league_id = "00",
  location = "",
  measure_type = "Base",
  month = 0,
  opponent_team_id = 0,
  outcome = "",
  pace_adjust = "N",
  per_mode = "Totals",
  period = 0,
  player_id_list = "202681,203078,2544,201567,203954",
  plus_minus = "N",
  rank = "N",
  season = "2020-21",
  season_segment = "",
  season_type = "Regular Season",
  shot_clock_range = "",
  vs_conference = "",
  vs_division = "",
  vs_player_id_list = "201566,201939,201935,201142,203076",
  ...
)

Arguments

conference

conference

date_from

date_from

date_to

date_to

game_segment

game_segment

last_n_games

last_n_games

league_id

League - default: '00'. Other options include '10': WNBA, '20': G-League

location

location

measure_type

measure_type

month

month

opponent_team_id

opponent_team_id

outcome

outcome

pace_adjust

pace_adjust

per_mode

per_mode

period

period

player_id_list

Player ID

plus_minus

plus_minus

rank

rank

season

Season - format 2020-21

season_segment

season_segment

season_type

Season Type - Regular Season, Playoffs, All-Star

shot_clock_range

shot_clock_range

vs_conference

vs_conference

vs_division

vs_division

vs_player_id_list

vs_player_id_list

...

Additional arguments passed to an underlying function like httr.

Value

Return a named list of data frames: Individual, OverallCompare

OverallCompare

col_nametypesdescription
GROUP_SETcharacter
DESCRIPTIONcharacterLong-form description text.
MINcharacterMinutes played.
FGMcharacterField goals made.
FGAcharacterField goal attempts.
FG_PCTcharacterField goal percentage (0-1).
FG3McharacterThree-point field goals made.
FG3AcharacterThree-point field goal attempts.
FG3_PCTcharacterThree-point field goal percentage (0-1).
FTMcharacterFree throws made.
FTAcharacterFree throw attempts.
FT_PCTcharacterFree throw percentage (0-1).
OREBcharacterOffensive rebounds.
DREBcharacterDefensive rebounds.
REBcharacterTotal rebounds.
ASTcharacterAssists.
TOVcharacterTurnovers.
STLcharacterSteals.
BLKcharacterBlocks.
BLKAcharacter
PFcharacterPersonal fouls.
PFDcharacter
PTScharacterPoints scored.
PLUS_MINUScharacterPlus/minus point differential while on court.

Individual

col_nametypesdescription
GROUP_SETcharacter
DESCRIPTIONcharacterLong-form description text.
MINcharacterMinutes played.
FGMcharacterField goals made.
FGAcharacterField goal attempts.
FG_PCTcharacterField goal percentage (0-1).
FG3McharacterThree-point field goals made.
FG3AcharacterThree-point field goal attempts.
FG3_PCTcharacterThree-point field goal percentage (0-1).
FTMcharacterFree throws made.
FTAcharacterFree throw attempts.
FT_PCTcharacterFree throw percentage (0-1).
OREBcharacterOffensive rebounds.
DREBcharacterDefensive rebounds.
REBcharacterTotal rebounds.
ASTcharacterAssists.
TOVcharacterTurnovers.
STLcharacterSteals.
BLKcharacterBlocks.
BLKAcharacter
PFcharacterPersonal fouls.
PFDcharacter
PTScharacterPoints scored.
PLUS_MINUScharacterPlus/minus point differential while on court.

Details

 nba_playercompare(player_id_list = '202681,203078,2544,201567,203954', vs_player_id_list = '201566,201939,201935,201142,203076')

Author

Saiem Gilani