Skip to contents

Get WNBA Stats API play-by-play (Multiple Games)

Get WNBA Stats API play-by-play (Multiple Games)

Usage

wnba_pbps(
  game_ids = NULL,
  on_court = TRUE,
  version = "v2",
  nest_data = FALSE,
  ...
)

Arguments

game_ids

Game IDs

on_court

IF TRUE will be added ID of players on court

version

Play-by-play version ("v2" available from 2016-17 onwards)

nest_data

If TRUE returns nested data by game

...

Additional arguments passed to an underlying function like httr.

Value

Returns a data frame: PlayByPlay

col_nametypes
game_idcharacter
event_numcharacter
event_typecharacter
event_action_typecharacter
periodnumeric
minute_gamenumeric
time_remainingnumeric
wc_time_stringcharacter
time_quartercharacter
minute_remaining_quarternumeric
seconds_remaining_quarternumeric
home_descriptioncharacter
neutral_descriptioncharacter
visitor_descriptioncharacter
scorecharacter
away_scorenumeric
home_scorenumeric
score_margincharacter
person1typecharacter
player1_idcharacter
player1_namecharacter
player1_team_idcharacter
player1_team_citycharacter
player1_team_nicknamecharacter
player1_team_abbreviationcharacter
person2typecharacter
player2_idcharacter
player2_namecharacter
player2_team_idcharacter
player2_team_citycharacter
player2_team_nicknamecharacter
player2_team_abbreviationcharacter
person3typecharacter
player3_idcharacter
player3_namecharacter
player3_team_idcharacter
player3_team_citycharacter
player3_team_nicknamecharacter
player3_team_abbreviationcharacter
video_available_flagcharacter
team_leadingcharacter
away_player1numeric
away_player2numeric
away_player3numeric
away_player4numeric
away_player5numeric
home_player1numeric
home_player2numeric
home_player3numeric
home_player4numeric
home_player5numeric

Details

y <- c("1022200034", "1022200035" )

wnba_pbps(game_ids = y, version = "v2")

See also

Other WNBA PBP Functions: wnba_data_pbp(), wnba_live_pbp(), wnba_pbp()

Author

Jason Lee