Get ESPN NBA PBP data
Value
A play-by-play data frame.
Plays
col_name | types |
id | character |
sequence_number | character |
text | character |
away_score | integer |
home_score | integer |
scoring_play | logical |
score_value | integer |
wallclock | character |
shooting_play | logical |
type_id | integer |
type_text | character |
period_number | integer |
period_display_value | character |
clock_display_value | character |
team_id | integer |
coordinate_x_raw | numeric |
coordinate_y_raw | numeric |
coordinate_x | numeric |
coordinate_y | numeric |
play_id | character |
athlete_id_1 | integer |
athlete_id_2 | integer |
athlete_id_3 | integer |
home_team_id | integer |
home_team_mascot | character |
home_team_name | character |
home_team_abbrev | character |
home_team_logo | character |
home_team_logo_dark | character |
home_team_full_name | character |
home_team_color | character |
home_team_alternate_color | character |
home_team_score | integer |
home_team_winner | logical |
home_team_record | character |
away_team_id | integer |
away_team_mascot | character |
away_team_name | character |
away_team_abbrev | character |
away_team_logo | character |
away_team_logo_dark | character |
away_team_full_name | character |
away_team_color | character |
away_team_alternate_color | character |
away_team_score | integer |
away_team_winner | logical |
away_team_record | character |
game_id | integer |
season | integer |
season_type | integer |
game_date | Date |
game_date_time | POSIXct |
See also
Other ESPN NBA Functions:
espn_nba_betting()
,
espn_nba_game_all()
,
espn_nba_game_rosters()
,
espn_nba_player_box()
,
espn_nba_player_stats()
,
espn_nba_scoreboard()
,
espn_nba_standings()
,
espn_nba_team_box()
,
espn_nba_team_stats()
,
espn_nba_teams()
,
espn_nba_wp()
Examples
# \donttest{
try(espn_nba_pbp(game_id = 401071880))
#> ── ESPN NBA Play-by-Play Information from ESPN.com ────────────── hoopR 2.1.0 ──
#> ℹ Data updated: 2023-11-28 22:10:04 UTC
#> # A tibble: 475 × 52
#> id sequence_number text away_score home_score scoring_play score_value
#> <chr> <chr> <chr> <int> <int> <lgl> <int>
#> 1 4010718… 4 Jahl… 0 0 FALSE 0
#> 2 4010718… 7 Nema… 0 3 TRUE 3
#> 3 4010718… 9 Elfr… 2 3 TRUE 2
#> 4 4010718… 10 Ian … 2 3 FALSE 0
#> 5 4010718… 12 Kenr… 2 3 FALSE 0
#> 6 4010718… 13 Jahl… 4 3 TRUE 2
#> 7 4010718… 15 Harr… 4 5 TRUE 2
#> 8 4010718… 16 King… 4 5 FALSE 0
#> 9 4010718… 17 Ian … 7 5 TRUE 3
#> 10 4010718… 19 Chri… 7 5 FALSE 0
#> # ℹ 465 more rows
#> # ℹ 45 more variables: wallclock <chr>, shooting_play <lgl>, type_id <int>,
#> # type_text <chr>, period_number <int>, period_display_value <chr>,
#> # clock_display_value <chr>, team_id <int>, coordinate_x_raw <dbl>,
#> # coordinate_y_raw <dbl>, coordinate_x <dbl>, coordinate_y <dbl>,
#> # play_id <chr>, athlete_id_1 <int>, athlete_id_2 <int>, athlete_id_3 <int>,
#> # home_team_id <int>, home_team_mascot <chr>, home_team_name <chr>, …
# }