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.0 ──
#>  Data updated: 2022-06-15 19:51:21 UTC
#> # A tibble: 195 × 80
#>    drive_id   drive_description      drive_yards drive_is_score drive_offensive…
#>    <chr>      <chr>                        <int> <lgl>                     <int>
#>  1 4012826141 5 plays, 75 yards, 2:…          75 TRUE                          5
#>  2 4012826141 5 plays, 75 yards, 2:…          75 TRUE                          5
#>  3 4012826141 5 plays, 75 yards, 2:…          75 TRUE                          5
#>  4 4012826141 5 plays, 75 yards, 2:…          75 TRUE                          5
#>  5 4012826141 5 plays, 75 yards, 2:…          75 TRUE                          5
#>  6 4012826141 5 plays, 75 yards, 2:…          75 TRUE                          5
#>  7 4012826141 5 plays, 75 yards, 2:…          75 TRUE                          5
#>  8 4012826142 3 plays, -10 yards, 1…         -10 FALSE                         3
#>  9 4012826142 3 plays, -10 yards, 1…         -10 FALSE                         3
#> 10 4012826142 3 plays, -10 yards, 1…         -10 FALSE                         3
#> # … with 185 more rows, and 75 more variables: drive_result <chr>,
#> #   drive_short_display_result <chr>, drive_display_result <chr>,
#> #   drive_team_name <chr>, 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>, …
 # }