Skip to contents

Get NBA Stats API Player vs Player

Get NBA Stats API Player vs Player

Usage

nba_playervsplayer(
  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 = "2544",
  plus_minus = "N",
  rank = "N",
  season = year_to_season(most_recent_nba_season() - 1),
  season_segment = "",
  season_type = "Regular Season",
  vs_conference = "",
  vs_division = "",
  vs_player_id = "203076",
  ...
)

Arguments

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

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

vs_conference

vs_conference

vs_division

vs_division

vs_player_id

vs_player_id

...

Additional arguments passed to an underlying function like httr.

Value

Return a named list of data frames: OnOffCourt, Overall, PlayerInfo, ShotAreaOffCourt, ShotAreaOnCourt, ShotAreaOverall, ShotDistanceOffCourt, ShotDistanceOnCourt, ShotDistanceOverall, VsPlayerInfo

Overall

col_nametypes
GROUP_SETcharacter
GROUP_VALUEcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
GPcharacter
Wcharacter
Lcharacter
W_PCTcharacter
MINcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter
FG3Mcharacter
FG3Acharacter
FG3_PCTcharacter
FTMcharacter
FTAcharacter
FT_PCTcharacter
OREBcharacter
DREBcharacter
REBcharacter
ASTcharacter
TOVcharacter
STLcharacter
BLKcharacter
BLKAcharacter
PFcharacter
PFDcharacter
PTScharacter
PLUS_MINUScharacter
NBA_FANTASY_PTScharacter

OnOffCourt

col_nametypes
GROUP_SETcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
VS_PLAYER_IDcharacter
VS_PLAYER_NAMEcharacter
COURT_STATUScharacter
GPcharacter
Wcharacter
Lcharacter
W_PCTcharacter
MINcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter
FG3Mcharacter
FG3Acharacter
FG3_PCTcharacter
FTMcharacter
FTAcharacter
FT_PCTcharacter
OREBcharacter
DREBcharacter
REBcharacter
ASTcharacter
TOVcharacter
STLcharacter
BLKcharacter
BLKAcharacter
PFcharacter
PFDcharacter
PTScharacter
PLUS_MINUScharacter
NBA_FANTASY_PTScharacter

ShotDistanceOverall

col_nametypes
GROUP_SETcharacter
GROUP_VALUEcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter

ShotDistanceOnCourt

col_nametypes
GROUP_SETcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
VS_PLAYER_IDcharacter
VS_PLAYER_NAMEcharacter
COURT_STATUScharacter
GROUP_VALUEcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter

ShotDistanceOffCourt

col_nametypes
GROUP_SETcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
VS_PLAYER_IDcharacter
VS_PLAYER_NAMEcharacter
COURT_STATUScharacter
GROUP_VALUEcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter

ShotAreaOverall

col_nametypes
GROUP_SETcharacter
GROUP_VALUEcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter

ShotAreaOnCourt

col_nametypes
GROUP_SETcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
VS_PLAYER_IDcharacter
VS_PLAYER_NAMEcharacter
COURT_STATUScharacter
GROUP_VALUEcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter

ShotAreaOffCourt

col_nametypes
GROUP_SETcharacter
PLAYER_IDcharacter
PLAYER_NAMEcharacter
VS_PLAYER_IDcharacter
VS_PLAYER_NAMEcharacter
COURT_STATUScharacter
GROUP_VALUEcharacter
FGMcharacter
FGAcharacter
FG_PCTcharacter

PlayerInfo

col_nametypes
PERSON_IDcharacter
FIRST_NAMEcharacter
LAST_NAMEcharacter
DISPLAY_FIRST_LASTcharacter
DISPLAY_LAST_COMMA_FIRSTcharacter
DISPLAY_FI_LASTcharacter
BIRTHDATEcharacter
SCHOOLcharacter
COUNTRYcharacter
LAST_AFFILIATIONcharacter

VsPlayerInfo

col_nametypes
PERSON_IDcharacter
FIRST_NAMEcharacter
LAST_NAMEcharacter
DISPLAY_FIRST_LASTcharacter
DISPLAY_LAST_COMMA_FIRSTcharacter
DISPLAY_FI_LASTcharacter
BIRTHDATEcharacter
SCHOOLcharacter
COUNTRYcharacter
LAST_AFFILIATIONcharacter

Details

 nba_playervsplayer(player_id = '2544', vs_player_id = '203076')

Author

Saiem Gilani