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.3 ──
#>  Data updated: 2022-09-23 03:23:10 UTC
#> # A tibble: 3 × 78
#>    game_id school confe…¹ home_…² oppon…³ oppon…⁴ points total…⁵ net_p…⁶ compl…⁷
#>      <int> <chr>  <chr>   <chr>   <chr>   <chr>    <int> <chr>   <chr>   <chr>  
#> 1   4.01e8 LSU    SEC     home    Southe… SWAC        65 550     320     23-34  
#> 2   4.01e8 LSU    SEC     away    Florid… ACC         23 348     209     25-35  
#> 3   4.01e8 LSU    SEC     home    Missis… SEC         31 416     210     22-37  
#> # … with 68 more variables: 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>,
#> #   kick_returns <chr>, kicking_points <chr>, fumbles_recovered <chr>, …

  try(cfbd_game_team_stats(2013, team = "Florida State"))
#> ── Team stats data from CollegeFootballData.com ────────────── cfbfastR 1.9.3 ──
#>  Data updated: 2022-09-23 03:23:11 UTC
#> # A tibble: 13 × 78
#>    game_id school confe…¹ home_…² oppon…³ oppon…⁴ points total…⁵ net_p…⁶ compl…⁷
#>      <int> <chr>  <chr>   <chr>   <chr>   <chr>    <int> <chr>   <chr>   <chr>  
#>  1  3.33e8 Flori… ACC     home    Bethun… MEAC        54 492     226     13-25  
#>  2  3.33e8 Flori… ACC     home    Syracu… ACC         59 523     298     22-26  
#>  3  3.32e8 Flori… ACC     away    Pittsb… ACC         41 533     377     27-29  
#>  4  3.33e8 Flori… ACC     home    Nevada  Mounta…     62 617     240     17-22  
#>  5  3.33e8 Flori… ACC     away    Boston… ACC         48 489     330     17-27  
#>  6  3.33e8 Flori… ACC     home    Maryla… ACC         63 614     431     26-39  
#>  7  3.33e8 Flori… ACC     home    NC Sta… ACC         49 566     342     20-34  
#>  8  3.33e8 Flori… ACC     home    Miami   ACC         41 517     325     21-29  
#>  9  3.33e8 Flori… ACC     away    Florida SEC         37 456     327     19-31  
#> 10  3.33e8 Flori… ACC     home    Duke    ACC         45 569     330     19-32  
#> 11  3.33e8 Flori… ACC     away    Wake F… ACC         59 296     207     22-39  
#> 12  3.33e8 Flori… ACC     away    Clemson ACC         51 565     444     22-35  
#> 13  3.33e8 Flori… ACC     home    Idaho   FBS In…     80 645     309     23-39  
#> # … with 68 more variables: 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>,
#> #   kick_returns <chr>, kicking_points <chr>, fumbles_recovered <chr>, …
# }