Skip to contents

Load and Install Packages

if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load(dplyr,tidyr, gt)
pacman::p_load_current_gh("sportsdataverse/cfbfastR")
## Warning in p_install_gh(package, dependencies = dependencies, ...): The following may have incorrect capitalization specification:
## 
## cfbfastR

Get game information

df_2018_wk_1 <- cfbfastR::cfbd_game_info(year=2018, week = 1)
 
df_2018_wk_7_ind <- cfbfastR::cfbd_game_info(year=2018, week = 7, conference = "Ind")
 
line_scores <- cfbfastR::cfbd_game_info(year=2018, week = 13, team = "Texas A&M", quarter_scores = TRUE)

Get calendar weeks and dates

cfbfastR::cfbd_calendar(2019)

Find game broadcast and media information

cfbfastR::cfbd_game_media(2019, week = 4, conference = "ACC")

Get CFBD Advanced Game Box Scores (by game_id)

cfbfastR::cfbd_game_box_advanced(game_id = 401114233)

Get CFBD Game Team Box Scores

cfbfastR::cfbd_game_team_stats(2019, team = "LSU")
## ── Team stats data from CollegeFootballData.com ────────────── cfbfastR 1.9.3 ──
##  Data updated: 2023-03-23 02:34:06 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  4.01e8 LSU    SEC     away    Texas   Big 12      45 573     471     31-39  
##  2  4.01e8 LSU    SEC     away    Missis… SEC         36 413     327     25-35  
##  3  4.01e8 LSU    SEC     away    Alabama SEC         46 559     393     31-39  
##  4  4.01e8 LSU    SEC     home    Auburn  SEC         23 508     321     32-42  
##  5  4.01e8 LSU    SEC     away    Ole Mi… SEC         58 714     489     32-42  
##  6  4.01e8 LSU    SEC     home    Texas … SEC         50 553     425     25-36  
##  7  4.01e8 LSU    SEC     home    Arkans… SEC         56 612     352     25-32  
##  8  4.01e8 LSU    SEC     home    Florida SEC         42 511     293     21-24  
##  9  4.01e8 LSU    SEC     home    Utah S… Mounta…     42 601     353     28-39  
## 10  4.01e8 LSU    SEC     home    Georgi… Sun Be…     55 472     350     30-39  
## 11  4.01e8 LSU    SEC     home    Northw… Southl…     65 610     488     29-33  
## 12  4.01e8 LSU    SEC     away    Vander… SEC         66 599     418     26-38  
## 13  4.01e8 LSU    SEC     home    Georgia SEC         37 481     349     28-38  
## # … 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>, …
cfbfastR::cfbd_game_team_stats(2013, team = "Florida State")
## ── Team stats data from CollegeFootballData.com ────────────── cfbfastR 1.9.3 ──
##  Data updated: 2023-03-23 02:34:06 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.32e8 Flori… ACC     away    Pittsb… ACC         41 533     377     27-29  
##  3  3.33e8 Flori… ACC     away    Boston… ACC         48 489     330     17-27  
##  4  3.33e8 Flori… ACC     home    Nevada  Mounta…     62 617     240     17-22  
##  5  3.33e8 Flori… ACC     home    Maryla… ACC         63 614     431     26-39  
##  6  3.33e8 Flori… ACC     home    NC Sta… ACC         49 566     342     20-34  
##  7  3.33e8 Flori… ACC     home    Syracu… ACC         59 523     298     22-26  
##  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     home    Idaho   FBS In…     80 645     309     23-39  
## 13  3.33e8 Flori… ACC     away    Clemson ACC         51 565     444     22-35  
## # … 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>, …

Get CFBD Game Player Box Scores

cfbfastR::cfbd_game_player_stats(2018, week = 15, conference = "Ind")

cfbfastR::cfbd_game_player_stats(2013, week = 1, team = "Florida State", category = "passing")

Get CFBD Team Game Records

cfbfastR::cfbd_game_records(2018, team = "Notre Dame")
   
cfbfastR::cfbd_game_records(2013, team = "Florida State")