Skip to contents

Load and Install Packages

if (!requireNamespace('pak', quietly = TRUE)){
  install.packages('pak')
}
pak::pak(c("dplyr", "tidyr", "gt"))
##  Loading metadata database
##  Loading metadata database ... done
## 
## 
## → Package library at /home/runner/work/_temp/Library.
##  All system requirements are already installed.
## 
##  No downloads are needed
##  Installing system requirements
##  Executing `sudo sh -c apt-get -y update`
## Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
## Hit:6 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
## Hit:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
## Hit:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
## Hit:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
## Hit:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
## Hit:7 https://dl.google.com/linux/chrome-stable/deb stable InRelease
## Reading package lists...
##  Executing `sudo sh -c apt-get -y install libicu-dev libcurl4-openssl-dev libssl-dev cmake make libuv1-dev pandoc libnode-dev libxml2-dev`
## Reading package lists...
## Building dependency tree...
## Reading state information...
## libicu-dev is already the newest version (70.1-2).
## make is already the newest version (4.3-4.1build1).
## pandoc is already the newest version (2.9.2.1-3ubuntu2).
## cmake is already the newest version (3.22.1-1ubuntu1.22.04.2).
## libcurl4-openssl-dev is already the newest version (7.81.0-1ubuntu1.27).
## libssl-dev is already the newest version (3.0.2-0ubuntu1.29).
## libuv1-dev is already the newest version (1.43.0-1ubuntu0.1).
## libxml2-dev is already the newest version (2.9.13+dfsg-1ubuntu0.12).
## libnode-dev is already the newest version (12.22.9~dfsg-1ubuntu3.6).
## 0 upgraded, 0 newly installed, 0 to remove and 86 not upgraded.
##  3 pkgs + 56 deps: kept 59 [9s]
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(tidyr)
library(gt)
# cfbfastR is deliberately NOT in the pak() list above. pkgdown and
# R CMD check render this vignette against the package being built, and
# installing from CRAN here would overwrite that dev build with the last
# release -- so any function added since it would vanish mid-render.
library(cfbfastR)
# pak::pak("sportsdataverse/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 3.0.0.9000 ──
##  Data updated: 2026-09-19 04:18:21 UTC
## # A tibble: 26 × 78
##      game_id school     conference home_away opponent opponent_conference points
##        <int> <chr>      <chr>      <chr>     <chr>    <chr>                <int>
##  1 401110828 Mississip… SEC        home      LSU      SEC                     13
##  2 401110828 LSU        SEC        away      Mississ… SEC                     36
##  3 401110805 Vanderbilt SEC        home      LSU      SEC                     38
##  4 401110805 LSU        SEC        away      Vanderb… SEC                     66
##  5 401110813 Utah State Mountain … away      LSU      SEC                      6
##  6 401110813 LSU        SEC        home      Utah St… Mountain West           42
##  7 401110819 Florida    SEC        away      LSU      SEC                     28
##  8 401110819 LSU        SEC        home      Florida  SEC                     42
##  9 401110778 Texas      Big 12     home      LSU      SEC                     38
## 10 401110778 LSU        SEC        away      Texas    Big 12                  45
## # ℹ 16 more rows
## # ℹ 71 more variables: total_yards <chr>, net_passing_yards <chr>,
## #   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>, …
cfbfastR::cfbd_game_team_stats(2013, team = "Florida State")
## ── Team stats data from CollegeFootballData.com ───────── cfbfastR 3.0.0.9000 ──
##  Data updated: 2026-09-19 04:18:22 UTC
## # A tibble: 26 × 78
##      game_id school     conference home_away opponent opponent_conference points
##        <int> <chr>      <chr>      <chr>     <chr>    <chr>                <int>
##  1 332640052 Florida S… ACC        home      Bethune… MEAC                    54
##  2 332640052 Bethune-C… MEAC       away      Florida… ACC                      6
##  3 332450221 Pittsburgh ACC        home      Florida… ACC                     13
##  4 332450221 Florida S… ACC        away      Pittsbu… ACC                     41
##  5 332570052 Florida S… ACC        home      Nevada   Mountain West           62
##  6 332570052 Nevada     Mountain … away      Florida… ACC                      7
##  7 332990052 Florida S… ACC        home      NC State ACC                     49
##  8 332990052 NC State   ACC        away      Florida… ACC                     17
##  9 333060052 Florida S… ACC        home      Miami    ACC                     41
## 10 333060052 Miami      ACC        away      Florida… ACC                     14
## # ℹ 16 more rows
## # ℹ 71 more variables: total_yards <chr>, net_passing_yards <chr>,
## #   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>, …

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")

Our Authors

Citation

To cite the cfbfastR R package in publications, use:

BibTeX Citation

@misc{cfbfastr,
  author = {Saiem Gilani and Akshay Easwaran and Jared Lee and Eric Hess},
  title = {cfbfastR: Access College Football Play by Play Data},
  url = {https://cfbfastR.sportsdataverse.org/},
  year = {2021}
}