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")
## 
## * checking for file ‘/tmp/RtmpaKDLGy/remotes6b6b63650f99/sportsdataverse-cfbfastR-ee45431/DESCRIPTION’ ... OK
## * preparing ‘cfbfastR’:
## * checking DESCRIPTION meta-information ... OK
## * checking for LF line-endings in source and make files and shell scripts
## * checking for empty or unneeded directories
## * building ‘cfbfastR_1.9.0.tar.gz’

Get Betting information from games

cfbd_betting_lines(year = 2018, week = 12, team = "Florida State")
## ── Betting lines data from CollegeFootballData.com ─────────── cfbfastR 1.9.0 ──
##  Data updated: 2022-06-15 19:52:57 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            
## # … with 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.0 ──
##  Data updated: 2022-06-15 19:52:57 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            
## # … with 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>