Skip to contents

Get player statistics by game

Usage

cfbd_game_player_stats(
  year,
  week = NULL,
  season_type = "regular",
  team = NULL,
  conference = NULL,
  category = NULL,
  game_id = NULL
)

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)

season_type

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

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

category

(String optional): Category filter (e.g defensive) Offense: passing, receiving, rushing Defense: defensive, fumbles, interceptions Special Teams: punting, puntReturns, kicking, kickReturns

game_id

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

Value

cfbd_game_player_stats() - A data frame with 32 variables:

col_nametypes
game_idinteger
teamcharacter
conferencecharacter
home_awaycharacter
team_pointsinteger
athlete_idinteger
athlete_namecharacter
defensive_tdnumeric
defensive_qb_hurnumeric
defensive_pdnumeric
defensive_tflnumeric
defensive_sacksnumeric
defensive_solonumeric
defensive_totnumeric
fumbles_recnumeric
fumbles_lostnumeric
fumbles_fumnumeric
punting_longnumeric
punting_in_20numeric
punting_tbnumeric
punting_avgnumeric
punting_ydsnumeric
punting_nonumeric
kicking_ptsnumeric
kicking_longnumeric
kicking_pctnumeric
punt_returns_tdnumeric
punt_returns_longnumeric
punt_returns_avgnumeric
punt_returns_ydsnumeric
punt_returns_nonumeric
kick_returns_tdnumeric
kick_returns_longnumeric
kick_returns_avgnumeric
kick_returns_ydsnumeric
kick_returns_nonumeric
interceptions_tdnumeric
interceptions_ydsnumeric
interceptions_intnumeric
receiving_longnumeric
receiving_tdnumeric
receiving_avgnumeric
receiving_ydsnumeric
receiving_recnumeric
rushing_longnumeric
rushing_tdnumeric
rushing_avgnumeric
rushing_ydsnumeric
rushing_carnumeric
passing_intnumeric
passing_tdnumeric
passing_avgnumeric
passing_ydsnumeric
passing_completionsnumeric
passing_attemptsnumeric
passing_qbrnumeric
kicking_xpmnumeric
kicking_xpanumeric
kicking_fgmnumeric
kicking_fganumeric

Examples

# \donttest{
  try(cfbd_game_player_stats(year = 2020, week = 15, team = "Alabama"))
#> ── Game player stats data from CollegeFootballData.com ─────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-09-10 01:23:07 UTC
#> # A tibble: 48 × 60
#>      game_id team    conference home_away team_points athlete_id athlete_name   
#>        <int> <chr>   <chr>      <chr>           <int>      <int> <chr>          
#>  1 401267164 Alabama SEC        away               52    4241478 DeVonta Smith  
#>  2 401267164 Alabama SEC        away               52    4685723 Roydell Willia…
#>  3 401267164 Alabama SEC        away               52    4567140 DJ Dale        
#>  4 401267164 Alabama SEC        away               52    4567123 Byron Young    
#>  5 401267164 Alabama SEC        away               52    4372025 Jaylen Moody   
#>  6 401267164 Alabama SEC        away               52    4261098 Charlie Scott  
#>  7 401267164 Alabama SEC        away               52    4567104 Will Reichard  
#>  8 401267164 Alabama SEC        away               52    4241474 Brian Robinson…
#>  9 401267164 Alabama SEC        away               52    4692025 Brian Branch   
#> 10 401267164 Alabama SEC        away               52    4430823 Thaiu Jones-Be…
#> # ℹ 38 more rows
#> # ℹ 53 more variables: defensive_td <dbl>, defensive_qb_hur <dbl>,
#> #   defensive_pd <dbl>, defensive_tfl <dbl>, defensive_sacks <dbl>,
#> #   defensive_solo <dbl>, defensive_tot <dbl>, fumbles_rec <dbl>,
#> #   fumbles_lost <dbl>, fumbles_fum <dbl>, punting_long <dbl>,
#> #   punting_in_20 <dbl>, punting_tb <dbl>, punting_avg <dbl>,
#> #   punting_yds <dbl>, punting_no <dbl>, kicking_pts <dbl>, …

  try(cfbd_game_player_stats(2013, week = 1, team = "Florida State", category = "passing"))
#> ── Game player stats data from CollegeFootballData.com ─────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-09-10 01:23:09 UTC
#> # A tibble: 3 × 60
#>     game_id team        conference home_away team_points athlete_id athlete_name
#>       <int> <chr>       <chr>      <chr>           <int>      <int> <chr>       
#> 1 332450221 Florida St… ACC        away               41     530308 Jameis Wins…
#> 2 332450221 Florida St… ACC        away               41     514124 Jake Coker  
#> 3 332450221 Pittsburgh  ACC        home               13     514116 Tom Savage  
#> # ℹ 53 more variables: defensive_td <dbl>, defensive_qb_hur <dbl>,
#> #   defensive_pd <dbl>, defensive_tfl <dbl>, defensive_sacks <dbl>,
#> #   defensive_solo <dbl>, defensive_tot <dbl>, fumbles_rec <dbl>,
#> #   fumbles_lost <dbl>, fumbles_fum <dbl>, punting_long <dbl>,
#> #   punting_in_20 <dbl>, punting_tb <dbl>, punting_avg <dbl>,
#> #   punting_yds <dbl>, punting_no <dbl>, kicking_pts <dbl>, kicking_long <dbl>,
#> #   kicking_pct <dbl>, punt_returns_td <dbl>, punt_returns_long <dbl>, …
# }