Skip to contents

Gets player info associated by play

Usage

cfbd_play_stats_player(
  year = NULL,
  week = NULL,
  team = NULL,
  game_id = NULL,
  athlete_id = NULL,
  stat_type_id = NULL,
  season_type = "regular"
)

Arguments

year

(Integer optional): 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

game_id

(Integer optional): Game ID filter for querying a single game Can be found using the cfbd_game_info() function

athlete_id

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

stat_type_id

(Integer optional): Stat Type ID filter for querying a single stat type Can be found using the cfbd_play_stats_types() function

season_type

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

Value

cfbd_play_stats_player() - A data frame with 54 variables:

play_id: character.

Referencing play id.

game_id: integer.

Referencing game id.

season: integer.

Season of the play.

week: integer.

Week of the play.

opponent: character.

Opponent of the offense on the play.

team_score: integer.

Offense team score.

opponent_score: integer.

Defense team score.

drive_id: character.

Referencing drive id.

period: integer.

Game period (quarter) of the play.

yards_to_goal: integer.

Yards to the goal line (~0-100).

down: integer.

Down of the play.

distance: integer.

Distance to the sticks, i.e. 1st down or goal-line in goal-to-go situations.

reception_player_id: character.

Pass receiver player reference id.

reception_player: character.

Pass receiver player name.

reception_yds: integer.

Reception yards.

completion_player_id: character.

Passing player reference id.

completion_player: character.

Passing player name.

completion_yds: integer.

Passing yards.

rush_player_id: character.

Rushing player reference id.

rush_player: character.

Rushing player name.

rush_yds: integer.

Rushing yards.

interception_player_id: character.

Intercepting player reference id.

interception_player: character.

Intercepting player name.

interception_stat: integer.

Intercepting stat.

interception_thrown_player_id: character.

Interception passing player reference id.

interception_thrown_player: character.

Interception passing player name.

interception_thrown_stat: integer.

Interception thrown stat.

touchdown_player_id: character.

Touchdown scoring player reference id.

touchdown_player: character.

Touchdown scoring player name.

touchdown_stat: integer.

Touchdown scoring stat.

incompletion_player_id: character.

Incomplete receiver player reference id.

incompletion_player: character.

Incomplete receiver player name.

incompletion_stat: integer.

Incomplete stat.

target_player_id: character.

Targeted receiver player reference id.

target_player: character.

Targeted receiver player name.

target_stat: integer.

Target stat.

fumble_recovered_player_id: logical.

Fumble recovering player reference id.

fumble_recovered_player: logical.

Fumble recovering player name.

fumble_recovered_stat: logical.

Fumble recovered stat.

fumble_forced_player_id: logical.

Fumble forcing player reference id.

fumble_forced_player: logical.

Fumble forcing player name.

fumble_forced_stat: logical.

Fumble forced stat.

fumble_player_id: logical.

Fumbling player reference id.

fumble_player: logical.

Fumbling player name.

fumble_stat: logical.

Fumble stat.

sack_player_id: character.

Sacking player(s) reference id.

sack_player: character.

Sacking player(s) name.

sack_stat: integer.

Sack stat.

sack_taken_player_id: character.

Sack taking player reference id.

sack_taken_player: character.

Sack taking player name.

sack_taken_stat: integer.

Sack taken stat.

pass_breakup_player_id: logical.

Pass breakup player reference id.

pass_breakup_player: logical.

Pass breakup player name.

pass_breakup_stat: logical.

Pass breakup (PBU) stat.

Examples

# \donttest{
  try(cfbd_play_stats_player(game_id = 401110722))
#> ── Play-level player data from CollegeFootballData.com ─────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-09-10 01:23:44 UTC
#> # A tibble: 144 × 54
#>    play_id      game_id season  week opponent team_score opponent_score drive_id
#>    <chr>          <int>  <int> <int> <chr>         <int>          <int> <chr>   
#>  1 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  2 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  3 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  4 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  5 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  6 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  7 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  8 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#>  9 40111072210…  4.01e8   2019     1 Auburn            0              0 4011107…
#> 10 40111072210…  4.01e8   2019     1 Auburn            7              0 4011107…
#> # ℹ 134 more rows
#> # ℹ 46 more variables: period <int>, yards_to_goal <int>, down <int>,
#> #   distance <int>, reception_player_id <chr>, reception_player <chr>,
#> #   reception_yds <int>, completion_player_id <chr>, completion_player <chr>,
#> #   completion_yds <int>, rush_player_id <chr>, rush_player <chr>,
#> #   rush_yds <int>, interception_player_id <chr>, interception_player <chr>,
#> #   interception_stat <int>, interception_thrown_player_id <chr>, …
# }