Get player game averages for predicted points added (PPA)
Source:R/cfbd_metrics.R
cfbd_metrics_ppa_players_games.Rd
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.5 ──
#> ℹ Data updated: 2024-09-10 01:23:23 UTC
#> # A tibble: 8 × 9
#> season week name position team opponent avg_PPA_all avg_PPA_pass
#> <int> <int> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 2019 3 Alex Delton QB TCU Purdue -0.861 -1.05
#> 2 2019 3 Max Duggan QB TCU Purdue -0.184 -0.234
#> 3 2019 3 Emari Demercado RB TCU Purdue -0.08 NA
#> 4 2019 3 Jalen Reagor WR TCU Purdue 0.008 0.164
#> 5 2019 3 Pro Wells TE TCU Purdue 0.129 0.129
#> 6 2019 3 Sewo Olonilua RB TCU Purdue 0.374 -0.471
#> 7 2019 3 Darius Anderson RB TCU Purdue 0.629 -0.451
#> 8 2019 3 Al'Dontre Davis WR TCU Purdue 3.18 3.18
#> # ℹ 1 more variable: avg_PPA_rush <dbl>
# }