Skip to contents

Get NBA Data API Play-by-Play

Get NBA Data API Play-by-Play

Usage

nba_data_pbp(game_id = "0021900001", ...)

Arguments

game_id

Game ID - 10 digits, i.e. "0021900001"

...

Additional arguments passed to an underlying function like httr.

Value

Returns a tibble

col_nametypes
game_idcharacter
leaguecharacter
periodinteger
event_numinteger
clockcharacter
descriptioncharacter
locXinteger
locYinteger
opt1integer
opt2integer
event_action_typeinteger
event_typeinteger
team_idinteger
offense_team_idinteger
player1_idinteger
player2_idinteger
player3_idinteger
home_scoreinteger
away_scoreinteger
orderinteger

Event Message Types (event_type):

1 -> MAKE

2 -> MISS

3 -> FreeThrow

4 -> Rebound

5 -> Turnover

6 -> Foul

7 -> Violation

8 -> Substitution

9 -> Timeout

10 -> JumpBall

11 -> Ejection

12 -> StartOfPeriod

13 -> EndOfPeriod

14 -> Empty

Details

 nba_data_pbp(game_id = "0021900001")

See also

Other NBA PBP Functions: nba_live_pbp(), nba_pbps(), nba_pbp(), nba_winprobabilitypbp()

Author

Saiem Gilani