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). Required year filter (along with one of week, team, or conference), unless game_id is specified

week

(Integer optional): Week - values range from 1-15, 1-14 for seasons pre-playoff, i.e. 2013 or earlier. Required if team and conference not specified.

season_type

(String default: regular): Select Season Type - regular, postseason, both, allstar, spring_regular, spring_postseason

team

(String optional): D-I Team. Required if week and conference not specified.

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 Required if week and team not specified.

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:

col_nametypesdescription
game_idintegerReferencing game id.
teamcharacterTeam name.
conferencecharacterConference of the team.
home_awaycharacterHome/Away Flag.
opponentcharacterOpponent team name.
opponent_conferencecharacterConference of the opponent team.
pointsintegerTeam points.
total_yardscharacterTeam total yards.
net_passing_yardscharacterTeam net passing yards.
completion_attemptscharacterTeam completion attempts.
passing_tdscharacterTeam passing touchdowns.
yards_per_passcharacterTeam game yards per pass.
passes_interceptedcharacterTeam passes intercepted.
interception_yardscharacterInterception yards.
interception_tdscharacterInterceptions returned for a touchdown.
rushing_attemptscharacterTeam rushing attempts.
rushing_yardscharacterTeam rushing yards.
rush_tdscharacterTeam rushing touchdowns.
yards_per_rush_attemptcharacterTeam yards per rush attempt.
first_downscharacterFirst downs earned by the team.
third_down_effcharacterThird down efficiency.
fourth_down_effcharacterFourth down efficiency.
punt_returnscharacterTeam punt returns.
punt_return_yardscharacterTeam punt return yards.
punt_return_tdscharacterTeam punt return touchdowns.
kick_return_yardscharacterTeam kick return yards.
kick_return_tdscharacterTeam kick return touchdowns.
kick_returnscharacterTeam kick returns.
kicking_pointscharacterTeam points from kicking the ball.
fumbles_recoveredcharacterTeam fumbles recovered.
fumbles_lostcharacterTeam fumbles lost.
total_fumblescharacterTeam total fumbles.
tacklescharacterTeam tackles.
tackles_for_losscharacterTeam tackles for a loss.
sackscharacterTeam sacks.
qb_hurriescharacterTeam QB hurries.
interceptionscharacterTeam interceptions.
passes_deflectedcharacterTeam passes deflected.
turnoverscharacterTeam turnovers.
defensive_tdscharacterTeam defensive touchdowns.
total_penalties_yardscharacterTeam total penalty yards.
possession_timecharacterTeam time of possession.
points_allowedintegerPoints for the opponent.
total_yards_allowedcharacterOpponent total yards.
net_passing_yards_allowedcharacterOpponent net passing yards.
completion_attempts_allowedcharacterOpponent completion attempts.
passing_tds_allowedcharacterOpponent passing TDs.
yards_per_pass_allowedcharacterOpponent yards per pass allowed.
passes_intercepted_allowedcharacterOpponent passes intercepted.
interception_yards_allowedcharacterOpponent interception yards.
interception_tds_allowedcharacterOpponent interception TDs.
rushing_attempts_allowedcharacterOpponent rushing attempts.
rushing_yards_allowedcharacterOpponent rushing yards.
rush_tds_allowedcharacterOpponent rushing touchdowns.
yards_per_rush_attempt_allowedcharacterOpponent rushing yards per attempt.
first_downs_allowedcharacterOpponent first downs.
third_down_eff_allowedcharacterOpponent third down efficiency.
fourth_down_eff_allowedcharacterOpponent fourth down efficiency.
punt_returns_allowedcharacterOpponent punt returns.
punt_return_yards_allowedcharacterOpponent punt return yards.
punt_return_tds_allowedcharacterOpponent punt return touchdowns.
kick_return_yards_allowedcharacterOpponent kick return yards.
kick_return_tds_allowedcharacterOpponent kick return touchdowns.
kick_returns_allowedcharacterOpponent kick returns.
kicking_points_allowedcharacterOpponent points from kicking.
fumbles_recovered_allowedcharacterOpponent fumbles recovered.
fumbles_lost_allowedcharacterOpponent fumbles lost.
total_fumbles_allowedcharacterOpponent total number of fumbles.
tackles_allowedcharacterOpponent tackles.
tackles_for_loss_allowedcharacterOpponent tackles for loss.
sacks_allowedcharacterOpponent sacks.
qb_hurries_allowedcharacterOpponent quarterback hurries.
interceptions_allowedcharacterOpponent interceptions.
passes_deflected_allowedcharacterOpponent passes deflected.
turnovers_allowedcharacterOpponent turnovers.
defensive_tds_allowedcharacterOpponent defensive touchdowns.
total_penalties_yards_allowedcharacterOpponent total penalty yards.
possession_time_allowedcharacterOpponent time of possession.

Examples

# \donttest{
  try(cfbd_game_team_stats(2022, team = "LSU"))
#> ── Team stats data from CollegeFootballData.com ────────────── cfbfastR 2.3.0 ──
#>  Data updated: 2026-06-24 02:02:05 UTC
#> # A tibble: 26 × 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 401403923 Ole Miss  SEC        away      LSU       SEC                     20
#>  3 401403939 Arkansas  SEC        home      LSU       SEC                     10
#>  4 401403939 LSU       SEC        away      Arkansas  SEC                     13
#>  5 401403873 Southern  SWAC       away      LSU       SEC                     17
#>  6 401403873 LSU       SEC        home      Southern  SWAC                    65
#>  7 401403963 Texas A&M SEC        home      LSU       SEC                     38
#>  8 401403963 LSU       SEC        away      Texas A&M SEC                     23
#>  9 401403903 Auburn    SEC        home      LSU       SEC                     17
#> 10 401403903 LSU       SEC        away      Auburn    SEC                     21
#> # ℹ 16 more rows
#> # ℹ 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>, …

  try(cfbd_game_team_stats(2013, team = "Florida State"))
#> ── Team stats data from CollegeFootballData.com ────────────── cfbfastR 2.3.0 ──
#>  Data updated: 2026-06-24 02:02:05 UTC
#> # A tibble: 26 × 78
#>      game_id school     conference home_away opponent opponent_conference points
#>        <int> <chr>      <chr>      <chr>     <chr>    <chr>                <int>
#>  1 332640052 Florida S… ACC        home      Bethune… MEAC                    54
#>  2 332640052 Bethune-C… MEAC       away      Florida… ACC                      6
#>  3 332450221 Pittsburgh ACC        home      Florida… ACC                     13
#>  4 332450221 Florida S… ACC        away      Pittsbu… ACC                     41
#>  5 332570052 Florida S… ACC        home      Nevada   Mountain West           62
#>  6 332570052 Nevada     Mountain … away      Florida… ACC                      7
#>  7 332710103 Boston Co… ACC        home      Florida… ACC                     34
#>  8 332710103 Florida S… ACC        away      Boston … ACC                     48
#>  9 332780052 Florida S… ACC        home      Maryland ACC                     63
#> 10 332780052 Maryland   ACC        away      Florida… ACC                      0
#> # ℹ 16 more rows
#> # ℹ 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>, …
# }