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.3 ──
#>  Data updated: 2022-09-23 03:23:40 UTC
#> # A tibble: 1 × 60
#>     game_id  week team   oppon…¹ off_p…² off_d…³ off_ppa off_t…⁴ off_s…⁵ off_e…⁶
#>       <int> <int> <chr>  <chr>     <int>   <int>   <dbl>   <dbl>   <dbl>   <dbl>
#> 1 401012347    12 Texas… UAB          55      10   0.423    23.3   0.545    1.15
#> # … with 50 more variables: 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>,
#> #   off_passing_downs_success_rate <dbl>, …

   try(cfbd_stats_game_advanced(2019, team = "LSU"))
#> ── Advanced game stats from CollegeFootballData.com ────────── cfbfastR 1.9.3 ──
#>  Data updated: 2022-09-23 03:23:40 UTC
#> # A tibble: 15 × 60
#>      game_id  week team  oppon…¹ off_p…² off_d…³ off_ppa off_t…⁴ off_s…⁵ off_e…⁶
#>        <int> <int> <chr> <chr>     <int>   <int>   <dbl>   <dbl>   <dbl>   <dbl>
#>  1 401110725     1 LSU   Georgi…      73      13   0.377    27.5   0.562   1.11 
#>  2 401110778     2 LSU   Texas        70      12   0.484    33.9   0.571   1.24 
#>  3 401110790     3 LSU   Northw…      69      12   0.598    41.3   0.710   1.08 
#>  4 401110805     4 LSU   Vander…      74      17   0.286    21.2   0.514   1.41 
#>  5 401110813     6 LSU   Utah S…      89      13   0.379    33.8   0.562   1.13 
#>  6 401110819     7 LSU   Florida      48      11   0.736    35.3   0.583   1.62 
#>  7 401110828     8 LSU   Missis…      63      13   0.215    13.6   0.508   0.974
#>  8 401110833     9 LSU   Auburn       88      15   0.119    10.4   0.489   0.966
#>  9 401110842    11 LSU   Alabama      82      14   0.285    23.3   0.561   1.17 
#> 10 401110850    12 LSU   Ole Mi…      83      14   0.493    40.9   0.602   1.27 
#> 11 401110859    13 LSU   Arkans…      47      12   0.861    40.5   0.596   1.80 
#> 12 401110869    14 LSU   Texas …      77      13   0.422    32.5   0.532   1.38 
#> 13 401132981    15 LSU   Georgia      77      11   0.323    24.9   0.506   1.17 
#> 14 401135278     1 LSU   Oklaho…      73      12   0.632    46.2   0.603   1.43 
#> 15 401135295     1 LSU   Clemson      80      15   0.423    33.8   0.5     1.42 
#> # … with 50 more variables: 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>,
#> #   off_passing_downs_success_rate <dbl>, …

   try(cfbd_stats_game_advanced(2013, team = "Florida State"))
#> ── Advanced game stats from CollegeFootballData.com ────────── cfbfastR 1.9.3 ──
#>  Data updated: 2022-09-23 03:23:41 UTC
#> # A tibble: 14 × 60
#>     game_id  week team  oppon…¹ off_p…² off_d…³  off_ppa off_t…⁴ off_s…⁵ off_e…⁶
#>       <int> <int> <chr> <chr>     <int>   <int>    <dbl>   <dbl>   <dbl>   <dbl>
#>  1   3.32e8     1 Flor… Pittsb…      58      10  4.46e-1 25.9      0.621   0.924
#>  2   3.33e8     3 Flor… Nevada       56      12  4.37e-1 24.5      0.607   0.930
#>  3   3.33e8     4 Flor… Bethun…      55      11  3.34e-1 18.3      0.582   0.989
#>  4   3.33e8     5 Flor… Boston…      56      12  2.23e-1 12.5      0.571   0.864
#>  5   3.33e8     6 Flor… Maryla…      72      12  2.76e-1 19.9      0.486   1.23 
#>  6   3.33e8     8 Flor… Clemson      68      12  2.40e-1 16.3      0.515   0.843
#>  7   3.33e8     9 Flor… NC Sta…      58      14  3.53e-1 20.5      0.552   1.11 
#>  8   3.33e8    10 Flor… Miami        69      11  3.07e-1 21.2      0.507   1.12 
#>  9   3.33e8    11 Flor… Wake F…      64      14 -4.27e-4 -0.0274   0.438   0.794
#> 10   3.33e8    12 Flor… Syracu…      36      10  4.50e-1 16.2      0.611   1.14 
#> 11   3.33e8    13 Flor… Idaho        68      14  2.12e-1 14.4      0.485   1.20 
#> 12   3.33e8    14 Flor… Florida      60      11  2.12e-1 12.7      0.417   1.25 
#> 13   3.33e8    15 Flor… Duke         69      15  2.31e-1 15.9      0.522   0.918
#> 14   3.40e8     1 Flor… Auburn       61      12  2.20e-1 13.4      0.443   0.925
#> # … with 50 more variables: 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>,
#> #   off_passing_downs_success_rate <dbl>, …
# }