Skip to contents

Get player game averages for predicted points added (PPA)

Usage

cfbd_metrics_ppa_players_games(
  year = NULL,
  week = NULL,
  team = NULL,
  position = NULL,
  athlete_id = NULL,
  threshold = 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. Required if year not provided.

position

(string optional): Position abbreviation of the player you are searching for. Position Group - options include:

  • Offense: QB, RB, FB, TE, OL, G, OT, C, WR

  • Defense: DB, CB, S, LB, DE, DT, NT, DL

  • Special Teams: K, P, LS, PK

athlete_id

(Integer optional): Athlete ID filter for querying a single athlete Can be found using the cfbd_player_info() function.

threshold

(Integer optional): Minimum threshold of plays.

excl_garbage_time

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

Value

cfbd_metrics_ppa_players_games() - A data frame with 9 variables:

season: integer.

Season of the game.

week: integer.

Game week of the season.

name: character.

Athlete name.

position: character.

Athlete position.

team: character.

Team name.

opponent: character.

Team Opponent name.

avg_PPA_all: double.

Average overall predicted points added (PPA).

avg_PPA_pass: double.

Average passing predicted points added (PPA).

avg_PPA_rush: double.

Average rushing predicted points added (PPA).

Examples

# \donttest{
  try(cfbd_metrics_ppa_players_games(year = 2019, week = 3, team = "TCU"))
#> ── Player PPA data from CollegeFootballData.com ────────────── cfbfastR 1.9.3 ──
#>  Data updated: 2022-09-23 03:23:14 UTC
#> # A tibble: 8 × 9
#>   season  week name            position team  opponent avg_PPA…¹ avg_P…² avg_P…³
#>    <int> <int> <chr>           <chr>    <chr> <chr>        <dbl>   <dbl>   <dbl>
#> 1   2019     3 Alex Delton     QB       TCU   Purdue      -0.861  -1.05   -0.192
#> 2   2019     3 Max Duggan      QB       TCU   Purdue      -0.184  -0.234  -0.085
#> 3   2019     3 Emari Demercado RB       TCU   Purdue      -0.08   NA      -0.08 
#> 4   2019     3 Jalen Reagor    WR       TCU   Purdue       0.008   0.164  -0.201
#> 5   2019     3 Pro Wells       TE       TCU   Purdue       0.129   0.129  NA    
#> 6   2019     3 Sewo Olonilua   RB       TCU   Purdue       0.374  -0.471   0.468
#> 7   2019     3 Darius Anderson RB       TCU   Purdue       0.629  -0.451   0.764
#> 8   2019     3 Al'Dontre Davis WR       TCU   Purdue       3.18    3.18   NA    
#> # … with abbreviated variable names ¹​avg_PPA_all, ²​avg_PPA_pass, ³​avg_PPA_rush
# }