Skip to contents

Get team statistics by game

Usage

cfbd_game_team_stats(
  year,
  week = NULL,
  season_type = "regular",
  team = NULL,
  conference = NULL,
  game_id = NULL,
  division = "fbs",
  rows_per_team = 1
)

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

season_type

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

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

game_id

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

division

(String optional): Division abbreviation - Select a valid division: fbs/fcs/ii/iii

rows_per_team

(Integer default 1): Both Teams for each game on one or two row(s), Options: 1 or 2

Value

cfbd_game_team_stats() - A data frame with 78 variables:

game_id: integer.

Referencing game id.

school: character.

Team name.

conference: character.

Conference of the team.

home_away: character.

Home/Away Flag.

opponent: character.

Opponent team name.

opponent_conference: character.

Conference of the opponent team.

points: integer.

Team points.

total_yards: character.

Team total yards.

net_passing_yards: character.

Team net passing yards.

completion_attempts:character.

Team completion attempts.

passing_tds: character.

Team passing touchdowns.

yards_per_pass: character.

Team game yards per pass.

passes_intercepted: character.

Team passes intercepted.

interception_yards: character.

Interception yards.

interception_tds: character.

Interceptions returned for a touchdown.

rushing_attempts: character.

Team rushing attempts. see also: ESTABLISH IT.

rushing_yards: character.

Team rushing yards.

rush_tds: character.

Team rushing touchdowns.

yards_per_rush_attempt: character.

Team yards per rush attempt.

first_downs: character.

First downs earned by the team.

third_down_eff: character.

Third down efficiency.

fourth_down_eff: character.

Fourth down efficiency.

punt_returns: character.

Team punt returns.

punt_return_yards: character.

Team punt return yards.

punt_return_tds: character.

Team punt return touchdowns.

kick_return_yards: character.

Team kick return yards.

kick_return_tds: character.

Team kick return touchdowns.

kick_returns: character.

Team kick returns.

kicking_points: character.

Team points from kicking the ball.

fumbles_recovered: character.

Team fumbles recovered.

fumbles_lost: character.

Team fumbles lost.

total_fumbles: character.

Team total fumbles.

tackles: character.

Team tackles.

tackles_for_loss: character.

Team tackles for a loss.

sacks: character.

Team sacks.

qb_hurries: character.

Team QB hurries.

interceptions: character.

Team interceptions.

passes_deflected: character.

Team passes deflected.

turnovers: character.

Team turnovers.

defensive_tds: character.

Team defensive touchdowns.

total_penalties_yards: character.

Team total penalty yards.

possession_time: character.

Team time of possession.

points_allowed: integer.

Points for the opponent.

total_yards_allowed: character.

Opponent total yards.

net_passing_yards_allowed: character.

Opponent net passing yards.

completion_attempts_allowed: character.

Oppponent completion attempts.

passing_tds_allowed: character.

Opponent passing TDs.

yards_per_pass_allowed: character.

Opponent yards per pass allowed.

passes_intercepted_allowed: character.

Opponent passes intercepted.

interception_yards_allowed: character.

Opponent interception yards.

interception_tds_allowed: character.

Opponent interception TDs.

rushing_attempts_allowed: character.

Opponent rushing attempts.

rushing_yards_allowed: character.

Opponent rushing yards.

rush_tds_allowed: character.

Opponent rushing touchdowns.

yards_per_rush_attempt_allowed: character.

Opponent rushing yards per attempt.

first_downs_allowed: character.

Opponent first downs.

third_down_eff_allowed: character.

Opponent third down efficiency.

fourth_down_eff_allowed: character.

Opponent fourth down efficiency.

punt_returns_allowed: character.

Opponent punt returns.

punt_return_yards_allowed: character.

Opponent punt return yards.

punt_return_tds_allowed: character.

Opponent punt return touchdowns.

kick_return_yards_allowed: character.

Opponent kick return yards.

kick_return_tds_allowed: character.

Opponent kick return touchdowns.

kick_returns_allowed: character.

Opponent kick returns.

kicking_points_allowed: character.

Opponent points from kicking.

fumbles_recovered_allowed: character.

Opponent fumbles recovered.

fumbles_lost_allowed: character.

Opponent fumbles lost.

total_fumbles_allowed:character.

Opponent total number of fumbles.

tackles_allowed:character.

Opponent tackles.

tackles_for_loss_allowed: character.

Opponent tackles for loss.

sacks_allowed: character.

Opponent sacks.

qb_hurries_allowed: character.

Opponent quarterback hurries.

interceptions_allowed: character.

Opponent interceptions.

passes_deflected_allowed: character.

Opponent passes deflected.

turnovers_allowed: character.

Opponent turnovers.

defensive_tds_allowed: character.

Opponent defensive touchdowns.

total_penalties_yards_allowed: character.

Opponent total penalty yards.

possession_time_allowed: character.

Opponent time of possession.

Examples

# \donttest{
  try(cfbd_game_team_stats(2022, team = "LSU"))
#> ── Team stats data from CollegeFootballData.com ────────────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-02-01 16:00:36 UTC
#> # A tibble: 13 × 78
#>      game_id school conference home_away opponent     opponent_conference points
#>        <int> <chr>  <chr>      <chr>     <chr>        <chr>                <int>
#>  1 401403923 LSU    SEC        home      Ole Miss     SEC                     45
#>  2 401403939 LSU    SEC        away      Arkansas     SEC                     13
#>  3 401403963 LSU    SEC        away      Texas A&M    SEC                     23
#>  4 401403873 LSU    SEC        home      Southern     SWAC                    65
#>  5 401403903 LSU    SEC        away      Auburn       SEC                     21
#>  6 401403885 LSU    SEC        home      Mississippi… SEC                     31
#>  7 401403867 LSU    SEC        away      Florida Sta… ACC                     23
#>  8 401403934 LSU    SEC        home      Alabama      SEC                     32
#>  9 401437036 LSU    SEC        away      Georgia      SEC                     30
#> 10 401426612 LSU    SEC        home      UAB          Conference USA          41
#> 11 401403897 LSU    SEC        home      New Mexico   Mountain West           38
#> 12 401403913 LSU    SEC        home      Tennessee    SEC                     13
#> 13 401403917 LSU    SEC        away      Florida      SEC                     45
#> # ℹ 71 more variables: total_yards <chr>, net_passing_yards <chr>,
#> #   completion_attempts <chr>, passing_tds <chr>, yards_per_pass <chr>,
#> #   passes_intercepted <chr>, interception_yards <chr>, interception_tds <chr>,
#> #   rushing_attempts <chr>, rushing_yards <chr>, rush_tds <chr>,
#> #   yards_per_rush_attempt <chr>, first_downs <chr>, third_down_eff <chr>,
#> #   fourth_down_eff <chr>, punt_returns <chr>, punt_return_yards <chr>,
#> #   punt_return_tds <chr>, kick_return_yards <chr>, kick_return_tds <chr>, …

  try(cfbd_game_team_stats(2013, team = "Florida State"))
#> ── Team stats data from CollegeFootballData.com ────────────── cfbfastR 1.9.5 ──
#>  Data updated: 2024-02-01 16:00:36 UTC
#> # A tibble: 13 × 78
#>      game_id school     conference home_away opponent opponent_conference points
#>        <int> <chr>      <chr>      <chr>     <chr>    <chr>                <int>
#>  1 332450221 Florida S… ACC        away      Pittsbu… ACC                     41
#>  2 332570052 Florida S… ACC        home      Nevada   Mountain West           62
#>  3 332710103 Florida S… ACC        away      Boston … ACC                     48
#>  4 332640052 Florida S… ACC        home      Bethune… MEAC                    54
#>  5 332780052 Florida S… ACC        home      Maryland ACC                     63
#>  6 332920228 Florida S… ACC        away      Clemson  ACC                     51
#>  7 332990052 Florida S… ACC        home      NC State ACC                     49
#>  8 333060052 Florida S… ACC        home      Miami    ACC                     41
#>  9 333200052 Florida S… ACC        home      Syracuse ACC                     59
#> 10 333270052 Florida S… ACC        home      Idaho    FBS Independents        80
#> 11 333340057 Florida S… ACC        away      Florida  SEC                     37
#> 12 333410052 Florida S… ACC        home      Duke     ACC                     45
#> 13 333130154 Florida S… ACC        away      Wake Fo… ACC                     59
#> # ℹ 71 more variables: total_yards <chr>, net_passing_yards <chr>,
#> #   completion_attempts <chr>, passing_tds <chr>, yards_per_pass <chr>,
#> #   passes_intercepted <chr>, interception_yards <chr>, interception_tds <chr>,
#> #   rushing_attempts <chr>, rushing_yards <chr>, rush_tds <chr>,
#> #   yards_per_rush_attempt <chr>, first_downs <chr>, third_down_eff <chr>,
#> #   fourth_down_eff <chr>, punt_returns <chr>, punt_return_yards <chr>,
#> #   punt_return_tds <chr>, kick_return_yards <chr>, kick_return_tds <chr>, …
# }