Skip to contents

Get game advanced stats

Usage

cfbd_stats_game_advanced(
  year,
  week = NULL,
  team = NULL,
  opponent = NULL,
  excl_garbage_time = FALSE,
  season_type = "both"
)

Arguments

year

(Integer required): Year, 4 digit format(YYYY)

week

(Integer optional): Week - values from 1-15, 1-14 for seasons pre-playoff (i.e. 2013 or earlier)

team

(String optional): D-I Team

opponent

(String optional): Opponent D-I Team

excl_garbage_time

(Logical default FALSE): Select whether to exclude Garbage Time (TRUE/FALSE)

season_type

(String default both): Select Season Type: regular, postseason, or both.

Value

cfbd_stats_game_advanced() - A data frame with 60 variables:

game_id: integer.

Referencing game id.

week: integer.

Game week of the season.

team: character.

Team name.

opponent: character.

Opponent team name.

off_plays: integer.

Offense plays in the game.

off_drives: integer.

Offense drives in the game.

off_ppa: double.

Offense predicted points added (PPA).

off_total_ppa: double.

Offense total predicted points added (PPA).

off_success_rate: double.

Offense success rate.

off_explosiveness: double.

Offense explosiveness rate.

off_power_success: double.

Offense power success rate.

off_stuff_rate: double.

Opponent stuff rate.

off_line_yds: double.

Offensive line yards.

off_line_yds_total: integer.

Offensive line yards total.

off_second_lvl_yds: double.

Offense second-level yards.

off_second_lvl_yds_total: integer.

Offense second-level yards total.

off_open_field_yds: integer.

Offense open field yards.

off_open_field_yds_total: integer.

Offense open field yards total.

off_standard_downs_ppa: double.

Offense standard downs predicted points added (PPA).

off_standard_downs_success_rate: double.

Offense standard downs success rate.

off_standard_downs_explosiveness: double.

Offense standard downs explosiveness rate.

off_passing_downs_ppa: double.

Offense passing downs predicted points added (PPA).

off_passing_downs_success_rate: double.

Offense passing downs success rate.

off_passing_downs_explosiveness: double.

Offense passing downs explosiveness rate.

off_rushing_plays_ppa: double.

Offense rushing plays predicted points added (PPA).

off_rushing_plays_total_ppa: double.

Offense rushing plays total predicted points added (PPA).

off_rushing_plays_success_rate: double.

Offense rushing plays success rate.

off_rushing_plays_explosiveness: double.

Offense rushing plays explosiveness rate.

off_passing_plays_ppa: double.

Offense passing plays predicted points added (PPA).

off_passing_plays_total_ppa: double.

Offense passing plays total predicted points added (PPA).

off_passing_plays_success_rate: double.

Offense passing plays success rate.

off_passing_plays_explosiveness: double.

Offense passing plays explosiveness rate.

def_plays: integer.

Defense plays in the game.

def_drives: integer.

Defense drives in the game.

def_ppa: double.

Defense predicted points added (PPA).

def_total_ppa: double.

Defense total predicted points added (PPA).

def_success_rate: double.

Defense success rate.

def_explosiveness: double.

Defense explosiveness rate.

def_power_success: double.

Defense power success rate.

def_stuff_rate: double.

Opponent stuff rate.

def_line_yds: double.

Offensive line yards.

def_line_yds_total: integer.

Offensive line yards total.

def_second_lvl_yds: double.

Defense second-level yards.

def_second_lvl_yds_total: integer.

Defense second-level yards total.

def_open_field_yds: integer.

Defense open field yards.

def_open_field_yds_total: integer.

Defense open field yards total.

def_standard_downs_ppa: double.

Defense standard downs predicted points added (PPA).

def_standard_downs_success_rate: double.

Defense standard downs success rate.

def_standard_downs_explosiveness: double.

Defense standard downs explosiveness rate.

def_passing_downs_ppa: double.

Defense passing downs predicted points added (PPA).

def_passing_downs_success_rate: double.

Defense passing downs success rate.

def_passing_downs_explosiveness: double.

Defense passing downs explosiveness rate.

def_rushing_plays_ppa: double.

Defense rushing plays predicted points added (PPA).

def_rushing_plays_total_ppa: double.

Defense rushing plays total predicted points added (PPA).

def_rushing_plays_success_rate: double.

Defense rushing plays success rate.

def_rushing_plays_explosiveness: double.

Defense rushing plays explosiveness rate.

def_passing_plays_ppa: double.

Defense passing plays predicted points added (PPA).

def_passing_plays_total_ppa: double.

Defense passing plays total predicted points added (PPA).

def_passing_plays_success_rate: double.

Defense passing plays success rate.

def_passing_plays_explosiveness: double.

Defense passing plays explosiveness rate.

Examples

# \donttest{
   try(cfbd_stats_game_advanced(year = 2018, week = 12, team = "Texas A&M"))
#> ── Advanced game stats from CollegeFootballData.com ────────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-09-10 01:24:12 UTC
#> # A tibble: 1 × 60
#>     game_id  week team      opponent off_plays off_drives off_ppa off_total_ppa
#>       <int> <int> <chr>     <chr>        <int>      <int>   <dbl>         <dbl>
#> 1 401012347    12 Texas A&M UAB             55         10   0.423          23.3
#> # ℹ 52 more variables: off_success_rate <dbl>, off_explosiveness <dbl>,
#> #   off_power_success <dbl>, off_stuff_rate <dbl>, off_line_yds <dbl>,
#> #   off_line_yds_total <int>, off_second_lvl_yds <dbl>,
#> #   off_second_lvl_yds_total <int>, off_open_field_yds <int>,
#> #   off_open_field_yds_total <int>, off_standard_downs_ppa <dbl>,
#> #   off_standard_downs_success_rate <dbl>,
#> #   off_standard_downs_explosiveness <dbl>, off_passing_downs_ppa <dbl>, …

   try(cfbd_stats_game_advanced(2019, team = "LSU"))
#> ── Advanced game stats from CollegeFootballData.com ────────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-09-10 01:24:12 UTC
#> # A tibble: 15 × 60
#>      game_id  week team  opponent     off_plays off_drives off_ppa off_total_ppa
#>        <int> <int> <chr> <chr>            <int>      <int>   <dbl>         <dbl>
#>  1 401110725     1 LSU   Georgia Sou…        73         13   0.377          27.5
#>  2 401110778     2 LSU   Texas               70         12   0.484          33.9
#>  3 401110790     3 LSU   Northwester…        69         12   0.598          41.3
#>  4 401110805     4 LSU   Vanderbilt          74         17   0.286          21.2
#>  5 401110813     6 LSU   Utah State          89         13   0.379          33.8
#>  6 401110819     7 LSU   Florida             48         11   0.736          35.3
#>  7 401110828     8 LSU   Mississippi…        63         13   0.215          13.6
#>  8 401110833     9 LSU   Auburn              88         15   0.119          10.4
#>  9 401110842    11 LSU   Alabama             82         14   0.285          23.3
#> 10 401110850    12 LSU   Ole Miss            83         14   0.493          40.9
#> 11 401110859    13 LSU   Arkansas            47         12   0.861          40.5
#> 12 401110869    14 LSU   Texas A&M           77         13   0.422          32.5
#> 13 401132981    15 LSU   Georgia             77         11   0.323          24.9
#> 14 401135278     1 LSU   Oklahoma            73         12   0.632          46.2
#> 15 401135295     1 LSU   Clemson             80         15   0.423          33.8
#> # ℹ 52 more variables: off_success_rate <dbl>, off_explosiveness <dbl>,
#> #   off_power_success <dbl>, off_stuff_rate <dbl>, off_line_yds <dbl>,
#> #   off_line_yds_total <int>, off_second_lvl_yds <dbl>,
#> #   off_second_lvl_yds_total <int>, off_open_field_yds <dbl>,
#> #   off_open_field_yds_total <int>, off_standard_downs_ppa <dbl>,
#> #   off_standard_downs_success_rate <dbl>,
#> #   off_standard_downs_explosiveness <dbl>, off_passing_downs_ppa <dbl>, …

   try(cfbd_stats_game_advanced(2013, team = "Florida State"))
#> ── Advanced game stats from CollegeFootballData.com ────────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-09-10 01:24:13 UTC
#> # A tibble: 14 × 60
#>      game_id  week team     opponent off_plays off_drives  off_ppa off_total_ppa
#>        <int> <int> <chr>    <chr>        <int>      <int>    <dbl>         <dbl>
#>  1 332450221     1 Florida… Pittsbu…        58         10  4.46e-1       25.9   
#>  2 332570052     3 Florida… Nevada          56         12  4.37e-1       24.5   
#>  3 332640052     4 Florida… Bethune…        55         11  3.34e-1       18.3   
#>  4 332710103     5 Florida… Boston …        56         12  2.23e-1       12.5   
#>  5 332780052     6 Florida… Maryland        72         12  2.76e-1       19.9   
#>  6 332920228     8 Florida… Clemson         68         12  2.40e-1       16.3   
#>  7 332990052     9 Florida… NC State        58         14  3.53e-1       20.5   
#>  8 333060052    10 Florida… Miami           69         11  3.07e-1       21.2   
#>  9 333130154    11 Florida… Wake Fo…        64         14 -4.27e-4       -0.0274
#> 10 333200052    12 Florida… Syracuse        36         10  4.50e-1       16.2   
#> 11 333270052    13 Florida… Idaho           68         14  2.12e-1       14.4   
#> 12 333340057    14 Florida… Florida         60         11  2.12e-1       12.7   
#> 13 333410052    15 Florida… Duke            69         15  2.31e-1       15.9   
#> 14 340060002     1 Florida… Auburn          61         12  2.20e-1       13.4   
#> # ℹ 52 more variables: off_success_rate <dbl>, off_explosiveness <dbl>,
#> #   off_power_success <dbl>, off_stuff_rate <dbl>, off_line_yds <dbl>,
#> #   off_line_yds_total <int>, off_second_lvl_yds <dbl>,
#> #   off_second_lvl_yds_total <int>, off_open_field_yds <dbl>,
#> #   off_open_field_yds_total <int>, off_standard_downs_ppa <dbl>,
#> #   off_standard_downs_success_rate <dbl>,
#> #   off_standard_downs_explosiveness <dbl>, off_passing_downs_ppa <dbl>, …
# }