Skip to contents

[Deprecated]

NBA Stats no longer returns stable data for this endpoint. This function is deprecated and now errors when called. Use nba_playbyplayv3() instead.

Usage

nba_winprobabilitypbp(game_id = "0021700807", run_type = "each second", ...)

Arguments

game_id

Game ID

run_type

Run Type

...

Additional arguments passed to an underlying function like httr.

Value

Return a named list of data frames: WinProbPBP, GameInfo

WinProbPBP

col_nametypesdescription
GAME_IDcharacterUnique game identifier.
EVENT_NUMcharacterSequential event number within the game (V2 PBP).
HOME_PCTcharacter
VISITOR_PCTcharacter
HOME_PTScharacter
VISITOR_PTScharacter
HOME_SCORE_MARGINcharacter
PERIODcharacterPeriod of the game (1-4 quarters; 5+ for OT).
SECONDS_REMAININGcharacterSeconds remaining in the period.
HOME_POSS_INDcharacter
HOME_Gcharacter
DESCRIPTIONcharacterLong-form description text.
LOCATIONcharacterLocation.
PCTIMESTRINGcharacter
ISVISIBLEcharacter

GameInfo

col_nametypesdescription
GAME_IDcharacterUnique game identifier.
GAME_DATEcharacterGame date (YYYY-MM-DD).
HOME_TEAM_IDcharacterUnique identifier for the home team.
HOME_TEAM_ABRcharacter
HOME_TEAM_PTScharacter
VISITOR_TEAM_IDcharacter
VISITOR_TEAM_ABRcharacter
VISITOR_TEAM_PTScharacter

Details

 nba_winprobabilitypbp(game_id = '0021700807', run_type = 'each second')

See also

Author

Saiem Gilani