Skip to contents

Load and Install Packages

if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load(dplyr,tidyr, gt)
## Installing package into '/home/runner/work/_temp/Library'
## (as 'lib' is unspecified)
## also installing the dependencies 'V8', 'reactR', 'bigD', 'bitops', 'htmlwidgets', 'juicyjuice', 'reactable'
## 
## gt installed
pacman::p_load_current_gh("sportsdataverse/cfbfastR")
## Warning in p_install_gh(package, dependencies = dependencies, ...): The following may have incorrect capitalization specification:
## 
## cfbfastR

Get Betting information from games

cfbd_betting_lines(year = 2018, week = 12, team = "Florida State")
## ── Betting lines data from CollegeFootballData.com ─────────── cfbfastR 1.9.5 ──
##  Data updated: 2024-02-01 16:02:49 UTC
## # A tibble: 4 × 19
##     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            
## # ℹ 12 more variables: home_score <int>, away_team <chr>,
## #   away_conference <chr>, away_score <int>, provider <chr>, spread <chr>,
## #   formatted_spread <chr>, spread_open <lgl>, over_under <chr>,
## #   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 1.9.5 ──
##  Data updated: 2024-02-01 16:02:49 UTC
## # A tibble: 4 × 19
##     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            
## # ℹ 12 more variables: home_score <int>, away_team <chr>,
## #   away_conference <chr>, away_score <int>, provider <chr>, spread <chr>,
## #   formatted_spread <chr>, spread_open <lgl>, over_under <chr>,
## #   over_under_open <lgl>, home_moneyline <lgl>, away_moneyline <lgl>