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.3 ──
#>  Data updated: 2022-09-23 03:23:09 UTC
#> # A tibble: 48 × 60
#>    game_id team  confe…¹ home_…² team_…³ athle…⁴ athle…⁵ defen…⁶ defen…⁷ defen…⁸
#>      <int> <chr> <chr>   <chr>     <int>   <int> <chr>     <dbl>   <dbl>   <dbl>
#>  1  4.01e8 Alab… SEC     away         52 4241478 DeVont…       1       0       0
#>  2  4.01e8 Alab… SEC     away         52 4685723 Roydel…      NA      NA      NA
#>  3  4.01e8 Alab… SEC     away         52 4567140 DJ Dale      NA      NA      NA
#>  4  4.01e8 Alab… SEC     away         52 4567123 Byron …      NA      NA      NA
#>  5  4.01e8 Alab… SEC     away         52 4372025 Jaylen…      NA      NA      NA
#>  6  4.01e8 Alab… SEC     away         52 4261098 Charli…      NA      NA      NA
#>  7  4.01e8 Alab… SEC     away         52 4567104 Will R…      NA      NA      NA
#>  8  4.01e8 Alab… SEC     away         52 4241474 Brian …      NA      NA      NA
#>  9  4.01e8 Alab… SEC     away         52 4692025 Brian …      NA      NA      NA
#> 10  4.01e8 Alab… SEC     away         52 4430823 Thaiu …      NA      NA      NA
#> # … with 38 more rows, 50 more variables: 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>, punt_returns_avg <dbl>, punt_returns_yds <dbl>, …

  try(cfbd_game_player_stats(2013, week = 1, team = "Florida State", category = "passing"))
#> ── Game player stats data from CollegeFootballData.com ─────── cfbfastR 1.9.3 ──
#>  Data updated: 2022-09-23 03:23:09 UTC
#> # A tibble: 3 × 60
#>    game_id team  confe…¹ home_…² team_…³ athle…⁴ athle…⁵ defen…⁶ defen…⁷ defen…⁸
#>      <int> <chr> <chr>   <chr>     <int>   <int> <chr>     <dbl>   <dbl>   <dbl>
#> 1   3.32e8 Flor… ACC     away         41  530308 Jameis…      NA      NA      NA
#> 2   3.32e8 Flor… ACC     away         41  514124 Jake C…      NA      NA      NA
#> 3   3.32e8 Pitt… ACC     home         13  514116 Tom Sa…      NA      NA      NA
#> # … with 50 more variables: 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>,
#> #   punt_returns_avg <dbl>, punt_returns_yds <dbl>, punt_returns_no <dbl>, …
# }