Skip to contents

Get ESPN college football PBP data

Usage

espn_cfb_pbp(game_id, epa_wpa = FALSE)

Arguments

game_id

Game ID

epa_wpa

Logical parameter (TRUE/FALSE) to return the Expected Points Added/Win Probability Added variables

Author

Saiem Gilani

Examples

 # \donttest{
   try(espn_cfb_pbp(game_id = 401282614))
#> ── Play-by-play data from ESPN.com ─────────────────────────── cfbfastR 1.9.3 ──
#>  Data updated: 2022-11-24 08:46:37 UTC
#> # A tibble: 195 × 80
#>    drive_id   drive_de…¹ drive…² drive…³ drive…⁴ drive…⁵ drive…⁶ drive…⁷ drive…⁸
#>    <chr>      <chr>        <int> <lgl>     <int> <chr>   <chr>   <chr>   <chr>  
#>  1 4012826141 5 plays, …      75 TRUE          5 TD      TD      Touchd… Fighti…
#>  2 4012826141 5 plays, …      75 TRUE          5 TD      TD      Touchd… Fighti…
#>  3 4012826141 5 plays, …      75 TRUE          5 TD      TD      Touchd… Fighti…
#>  4 4012826141 5 plays, …      75 TRUE          5 TD      TD      Touchd… Fighti…
#>  5 4012826141 5 plays, …      75 TRUE          5 TD      TD      Touchd… Fighti…
#>  6 4012826141 5 plays, …      75 TRUE          5 TD      TD      Touchd… Fighti…
#>  7 4012826141 5 plays, …      75 TRUE          5 TD      TD      Touchd… Fighti…
#>  8 4012826142 3 plays, …     -10 FALSE         3 PUNT    PUNT    Punt    Semino…
#>  9 4012826142 3 plays, …     -10 FALSE         3 PUNT    PUNT    Punt    Semino…
#> 10 4012826142 3 plays, …     -10 FALSE         3 PUNT    PUNT    Punt    Semino…
#> # … with 185 more rows, 71 more variables: drive_team_abbreviation <chr>,
#> #   drive_team_display_name <chr>, drive_team_short_display_name <chr>,
#> #   drive_start_yard_line <int>, drive_start_text <chr>,
#> #   drive_start_period_type <chr>, drive_start_period_number <int>,
#> #   drive_start_clock_display_value <chr>, drive_end_yard_line <int>,
#> #   drive_end_text <chr>, drive_end_period_type <chr>,
#> #   drive_end_period_number <int>, drive_end_clock_display_value <chr>, …
 # }