Skip to contents

Get team game averages for predicted points added (PPA)

Usage

cfbd_metrics_ppa_games(
  year,
  week = NULL,
  team = NULL,
  conference = NULL,
  excl_garbage_time = FALSE
)

Arguments

year

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

week

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

team

(String optional): D-I Team

conference

(String optional): Conference abbreviation - Select a valid FBS conference Conference abbreviations P5: ACC, B12, B1G, SEC, PAC Conference abbreviations G5 and FBS Independents: CUSA, MAC, MWC, Ind, SBC, AAC

excl_garbage_time

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

Value

cfbd_metrics_ppa_games() - A data frame with 18 variables:

game_id: integer.

Referencing game id.

season: integer.

Season of the game.

week: integer.

Game week of the season.

conference: character.

Conference of the team.

team: character.

Team name.

opponent: character.

Team Opponent.

off_overall: character.

Offense overall predicted points added (PPA).

off_passing: character.

Offense passing predicted points added (PPA).

off_rushing: character.

Offense rushing predicted points added (PPA).

off_first_down: character.

Offense 1st down predicted points added (PPA).

off_second_down: character.

Offense 2nd down predicted points added (PPA).

off_third_down: character.

Offense 3rd down predicted points added (PPA).

def_overall: character.

Defense overall predicted points added (PPA).

def_passing: character.

Defense passing predicted points added (PPA).

def_rushing: character.

Defense rushing predicted points added (PPA).

def_first_down: character.

Defense 1st down predicted points added (PPA).

def_second_down: character.

Defense 2nd down predicted points added (PPA).

def_third_down: character.

Defense 3rd down predicted points added (PPA).

Examples

# \donttest{
  try(cfbd_metrics_ppa_games(year = 2019, team = "TCU"))
#> ── PPA data from CollegeFootballData.com ───────────────────── cfbfastR 1.9.3 ──
#>  Data updated: 2022-09-23 03:23:14 UTC
#> # A tibble: 12 × 18
#>      game_id season  week confer…¹ team  oppon…² off_o…³ off_p…⁴ off_r…⁵ off_f…⁶
#>        <int>  <int> <int> <chr>    <chr> <chr>   <chr>   <chr>   <chr>   <chr>  
#>  1 401112129   2019     1 Big 12   TCU   Arkans… 0.1089… 0.0325… 0.3433… -0.155…
#>  2 401112130   2019     3 Big 12   TCU   Purdue  0.0843… -0.446… 0.3334… 0.2707…
#>  3 401112131   2019     4 Big 12   TCU   SMU     0.1446… -0.062… 0.3788… 0.0741…
#>  4 401112100   2019     5 Big 12   TCU   Kansas  0.3893… 0.7865… 0.2296… 0.1970…
#>  5 401112088   2019     6 Big 12   TCU   Iowa S… 0.2267… 0.2826… 0.1764… 0.1488…
#>  6 401112109   2019     8 Big 12   TCU   Kansas… 0.1626… -0.124… 0.4080… 0.0273…
#>  7 401112132   2019     9 Big 12   TCU   Texas   0.2069… 0.4863… 0.0735… 0.0984…
#>  8 401112127   2019    10 Big 12   TCU   Oklaho… 0.1723… -0.057… 0.4694… -0.093…
#>  9 401112081   2019    11 Big 12   TCU   Baylor  -0.057… -0.132… 0.0027… -0.364…
#> 10 401112133   2019    12 Big 12   TCU   Texas … 0.1992… 0.3418… 0.1559… 0.0323…
#> 11 401112120   2019    13 Big 12   TCU   Oklaho… -0.026… -0.269… 0.2632… 0.0913…
#> 12 401112134   2019    14 Big 12   TCU   West V… 0.0117… -0.125… 0.1815… 0.0177…
#> # … with 8 more variables: off_second_down <chr>, off_third_down <chr>,
#> #   def_overall <chr>, def_passing <chr>, def_rushing <chr>,
#> #   def_first_down <chr>, def_second_down <chr>, def_third_down <chr>, and
#> #   abbreviated variable names ¹​conference, ²​opponent, ³​off_overall,
#> #   ⁴​off_passing, ⁵​off_rushing, ⁶​off_first_down
# }