Skip to contents

Load and Install Packages

if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load(dplyr,tidyr, gt, cfbfastR)
# pacman::p_load_current_gh("sportsdataverse/cfbfastR")

Get Betting information from games

cfbd_betting_lines(year = 2018, week = 12, team = "Florida State")
## ── Betting lines data from CollegeFootballData.com ─────────── cfbfastR 2.0.0 ──
##  Data updated: 2025-08-25 19:43:42 UTC
## # A tibble: 4 × 21
##     game_id season season_type  week start_date        home_team home_conference
##       <int>  <int> <chr>       <int> <chr>             <chr>     <chr>          
## 1 401013175   2018 regular        12 2018-11-17T20:30… Florida … ACC            
## 2 401013175   2018 regular        12 2018-11-17T20:30… Florida … ACC            
## 3 401013175   2018 regular        12 2018-11-17T20:30… Florida … ACC            
## 4 401013175   2018 regular        12 2018-11-17T20:30… Florida … ACC            
## # ℹ 14 more variables: home_classification <chr>, home_score <int>,
## #   away_team <chr>, away_conference <chr>, away_classification <chr>,
## #   away_score <int>, provider <chr>, spread <dbl>, formatted_spread <chr>,
## #   spread_open <lgl>, over_under <dbl>, over_under_open <lgl>,
## #   home_moneyline <lgl>, away_moneyline <lgl>
# 7 OTs LSU at TAMU
cfbd_betting_lines(year = 2018, week = 13, team = "Texas A&M", conference = "SEC")
## ── Betting lines data from CollegeFootballData.com ─────────── cfbfastR 2.0.0 ──
##  Data updated: 2025-08-25 19:43:43 UTC
## # A tibble: 4 × 21
##     game_id season season_type  week start_date        home_team home_conference
##       <int>  <int> <chr>       <int> <chr>             <chr>     <chr>          
## 1 401012356   2018 regular        13 2018-11-25T00:30… Texas A&M SEC            
## 2 401012356   2018 regular        13 2018-11-25T00:30… Texas A&M SEC            
## 3 401012356   2018 regular        13 2018-11-25T00:30… Texas A&M SEC            
## 4 401012356   2018 regular        13 2018-11-25T00:30… Texas A&M SEC            
## # ℹ 14 more variables: home_classification <chr>, home_score <int>,
## #   away_team <chr>, away_conference <chr>, away_classification <chr>,
## #   away_score <int>, provider <chr>, spread <int>, formatted_spread <chr>,
## #   spread_open <lgl>, over_under <dbl>, over_under_open <lgl>,
## #   home_moneyline <lgl>, away_moneyline <lgl>