Load and Install Packages

if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load(dplyr,tidyr, gt)
pacman::p_load_current_gh("saiemgilani/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")
## # A tibble: 13 × 78
##      game_id school conference home_away points total_yards net_passing_yards
##        <int> <chr>  <chr>      <chr>      <int> <chr>       <chr>            
##  1 401110725 LSU    SEC        home          55 472         350              
##  2 401110828 LSU    SEC        away          36 413         327              
##  3 401110778 LSU    SEC        away          45 573         471              
##  4 401110842 LSU    SEC        away          46 559         393              
##  5 401110833 LSU    SEC        home          23 508         321              
##  6 401110859 LSU    SEC        home          56 612         352              
##  7 401110805 LSU    SEC        away          66 599         418              
##  8 401110850 LSU    SEC        away          58 714         489              
##  9 401110869 LSU    SEC        home          50 553         425              
## 10 401132981 LSU    SEC        home          37 481         349              
## 11 401110819 LSU    SEC        home          42 511         293              
## 12 401110813 LSU    SEC        home          42 601         353              
## 13 401110790 LSU    SEC        home          65 610         488              
## # … with 71 more variables: 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>, kick_returns <chr>, kicking_points <chr>, …
cfbfastR::cfbd_game_team_stats(2013, team = "Florida State")
## # A tibble: 13 × 78
##      game_id school     conference home_away points total_yards net_passing_yar…
##        <int> <chr>      <chr>      <chr>      <int> <chr>       <chr>           
##  1 332640052 Florida S… ACC        home          54 492         226             
##  2 332450221 Florida S… ACC        away          41 533         377             
##  3 332570052 Florida S… ACC        home          62 617         240             
##  4 332710103 Florida S… ACC        away          48 489         330             
##  5 332780052 Florida S… ACC        home          63 614         431             
##  6 332990052 Florida S… ACC        home          49 566         342             
##  7 333060052 Florida S… ACC        home          41 517         325             
##  8 333130154 Florida S… ACC        away          59 296         207             
##  9 333200052 Florida S… ACC        home          59 523         298             
## 10 333270052 Florida S… ACC        home          80 645         309             
## 11 333340057 Florida S… ACC        away          37 456         327             
## 12 333410052 Florida S… ACC        home          45 569         330             
## 13 332920228 Florida S… ACC        away          51 565         444             
## # … with 71 more variables: 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>, kick_returns <chr>, kicking_points <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")