Get NFL play-by-play for a specific game from ESPN's API

get_nfl_pbp(game_id)

Arguments

game_id

character

Value

Returns a tibble

Examples

# Get NFL play-by-play for a specific game
get_nfl_pbp(game_id = "300912027")
#> # A tibble: 164 × 74
#>    game_id   game_uid season seaso…¹ date   week drive…² pos_t…³ play_id play_…⁴
#>    <chr>     <chr>     <int>   <int> <chr> <int> <chr>   <chr>   <chr>   <chr>  
#>  1 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Rush   
#>  2 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Rush   
#>  3 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Rush   
#>  4 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Rush   
#>  5 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Pass   
#>  6 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Pass   
#>  7 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Rush   
#>  8 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Rush   
#>  9 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Pass   
#> 10 300912027 s:20~l:…   2010       2 2010…     1 300912… TB      300912… Punt   
#> # … with 154 more rows, 64 more variables: yards_gained <int>, play_desc <chr>,
#> #   drive_desc <chr>, pos_team_name <chr>, pos_team_full <chr>, logo <chr>,
#> #   drive_start_qtr <int>, drive_start_clock <chr>, drive_start_yardline <int>,
#> #   drive_start_text <chr>, drive_end_qtr <int>, drive_end_clock <chr>,
#> #   drive_end_yardline <int>, drive_end_text <chr>, drive_time <chr>,
#> #   drive_yds <int>, drive_result_score <int>, drive_plays <int>,
#> #   drive_result <chr>, sequenceNumber <chr>, away_score <int>, …