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

Get Team Info

cfbd_team_info(conference = "SEC")
## ── Team information from CollegeFootballData.com ───────────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:49 UTC
## # A tibble: 14 × 28
##    team_id school   mascot abbre…¹ alt_n…² alt_n…³ alt_n…⁴ confe…⁵ class…⁶ color
##      <int> <chr>    <chr>  <chr>   <chr>   <chr>   <chr>   <chr>   <chr>   <chr>
##  1     333 Alabama  Crims… ALA     NA      ALA     Alabama SEC     fbs     #690…
##  2       8 Arkansas Razor… ARK     NA      ARK     Arkans… SEC     fbs     #9c1…
##  3       2 Auburn   Tigers AUB     NA      AUB     Auburn  SEC     fbs     #032…
##  4      57 Florida  Gators FLA     NA      FLA     Florida SEC     fbs     #002…
##  5      61 Georgia  Bulld… UGA     NA      UGA     Georgia SEC     fbs     #CC0…
##  6      96 Kentucky Wildc… UK      NA      UK      Kentuc… SEC     fbs     #005…
##  7      99 LSU      Tigers LSU     Louisi… LSU     LSU     SEC     fbs     #fdd…
##  8     344 Mississ… Bulld… MSST    NA      MSST    Miss St SEC     fbs     #762…
##  9     142 Missouri Tigers MIZ     NA      MIZ     Missou… SEC     fbs     #000…
## 10     145 Ole Miss Rebels MISS    NA      MISS    Ole Mi… SEC     fbs     #001…
## 11    2579 South C… Gamec… SC      NA      SC      South … SEC     fbs     #670…
## 12    2633 Tenness… Volun… TENN    NA      TENN    Tennes… SEC     fbs     #EE9…
## 13     245 Texas A… Aggies TA&M    NA      TA&M    Texas … SEC     fbs     #5C0…
## 14     238 Vanderb… Commo… VAN     NA      VAN     Vander… SEC     fbs     #000…
## # … with 18 more variables: alt_color <chr>, logo <chr>, logo_2 <chr>,
## #   twitter <chr>, venue_id <int>, venue_name <chr>, city <chr>, state <chr>,
## #   zip <chr>, country_code <chr>, timezone <chr>, latitude <dbl>,
## #   longitude <dbl>, elevation <chr>, capacity <int>, year_constructed <int>,
## #   grass <lgl>, dome <lgl>, and abbreviated variable names ¹​abbreviation,
## #   ²​alt_name1, ³​alt_name2, ⁴​alt_name3, ⁵​conference, ⁶​classification
cfbd_team_info(conference = "Ind")
## ── Team information from CollegeFootballData.com ───────────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:49 UTC
## # A tibble: 7 × 28
##   team_id school    mascot abbre…¹ alt_n…² alt_n…³ alt_n…⁴ confe…⁵ class…⁶ color
##     <int> <chr>     <chr>  <chr>   <chr>   <chr>   <chr>   <chr>   <chr>   <chr>
## 1     349 Army      Black… ARMY    NA      ARMY    Army    FBS In… fbs     #ce9…
## 2     252 BYU       Couga… BYU     Brigha… BYU     BYU     FBS In… fbs     #001…
## 3      41 Connecti… Huski… CONN    NA      CONN    UConn   FBS In… fbs     #001…
## 4    2335 Liberty   Flames LIB     NA      LIB     Liberty FBS In… fbs     #071…
## 5     166 New Mexi… Aggies NMSU    NA      NMSU    New Me… FBS In… fbs     #891…
## 6      87 Notre Da… Fight… ND      NA      ND      Notre … FBS In… fbs     #001…
## 7     113 UMass     Minut… UMASS   NA      UMASS   UMass   FBS In… fbs     #880…
## # … with 18 more variables: alt_color <chr>, logo <chr>, logo_2 <chr>,
## #   twitter <chr>, venue_id <int>, venue_name <chr>, city <chr>, state <chr>,
## #   zip <chr>, country_code <chr>, timezone <chr>, latitude <dbl>,
## #   longitude <dbl>, elevation <chr>, capacity <int>, year_constructed <int>,
## #   grass <lgl>, dome <lgl>, and abbreviated variable names ¹​abbreviation,
## #   ²​alt_name1, ³​alt_name2, ⁴​alt_name3, ⁵​conference, ⁶​classification
cfbd_team_info(year = 2019)
## ── Team information from CollegeFootballData.com ───────────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:49 UTC
## # A tibble: 130 × 28
##    team_id school   mascot abbre…¹ alt_n…² alt_n…³ alt_n…⁴ confe…⁵ divis…⁶ color
##      <int> <chr>    <chr>  <chr>   <chr>   <chr>   <chr>   <chr>   <chr>   <chr>
##  1    2005 Air For… Falco… AFA     NA      AFA     Air Fo… Mounta… Mounta… #004…
##  2    2006 Akron    Zips   AKR     NA      AKR     Akron   Mid-Am… East    #002…
##  3     333 Alabama  Crims… ALA     NA      ALA     Alabama SEC     West    #690…
##  4    2026 Appalac… Mount… APP     NA      APP     Appala… Sun Be… West    #000…
##  5      12 Arizona  Wildc… ARIZ    NA      ARIZ    Arizona Pac-12  South   #002…
##  6       9 Arizona… Sun D… ASU     NA      ASU     Arizon… Pac-12  South   #942…
##  7       8 Arkansas Razor… ARK     NA      ARK     Arkans… SEC     West    #9c1…
##  8    2032 Arkansa… Red W… ARST    NA      ARST    Arkans… Sun Be… East    #e81…
##  9     349 Army     Black… ARMY    NA      ARMY    Army    FBS In… NA      #ce9…
## 10       2 Auburn   Tigers AUB     NA      AUB     Auburn  SEC     West    #032…
## # … with 120 more rows, 18 more variables: alt_color <chr>, logo <chr>,
## #   logo_2 <chr>, twitter <chr>, venue_id <int>, venue_name <chr>, city <chr>,
## #   state <chr>, zip <chr>, country_code <chr>, timezone <chr>, latitude <dbl>,
## #   longitude <dbl>, elevation <chr>, capacity <int>, year_constructed <int>,
## #   grass <lgl>, dome <lgl>, and abbreviated variable names ¹​abbreviation,
## #   ²​alt_name1, ³​alt_name2, ⁴​alt_name3, ⁵​conference, ⁶​division

Get Team Matchup History (Total Record)

cfbd_team_matchup_records("Texas", "Oklahoma")
## ── Team matchup record from CollegeFootballData.com ────────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:49 UTC
## # A tibble: 1 × 7
##   start_year end_year team1 team1_wins team2    team2_wins ties 
##   <chr>      <chr>    <chr> <chr>      <chr>    <chr>      <chr>
## 1 ""         ""       Texas 60         Oklahoma 50         5
cfbd_team_matchup_records("Texas A&M", "TCU", min_year = 1975)
## ── Team matchup record from CollegeFootballData.com ────────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:49 UTC
## # A tibble: 1 × 7
##   start_year end_year team1     team1_wins team2 team2_wins ties 
##   <chr>      <chr>    <chr>     <chr>      <chr> <chr>      <chr>
## 1 1975       ""       Texas A&M 22         TCU   0          0

Get Team Matchup History

cfbd_team_matchup("Texas", "Oklahoma")
## ── Team matchup history from CollegeFootballData.com ───────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:50 UTC
## # A tibble: 115 × 11
##    season  week season_type date   neutr…¹ venue home_…² home_…³ away_…⁴ away_…⁵
##     <int> <int> <chr>       <chr>  <lgl>   <chr> <chr>     <int> <chr>     <int>
##  1   1902     4 regular     1902-… FALSE   NA    Texas        22 Oklaho…       6
##  2   1903     6 regular     1903-… FALSE   NA    Oklaho…       6 Texas         6
##  3   1903    10 regular     1903-… FALSE   NA    Oklaho…       5 Texas        11
##  4   1904    10 regular     1904-… FALSE   NA    Texas        40 Oklaho…      10
##  5   1905     8 regular     1905-… FALSE   NA    Oklaho…       2 Texas         0
##  6   1906     7 regular     1906-… FALSE   NA    Oklaho…       9 Texas        10
##  7   1907     9 regular     1907-… FALSE   NA    Texas        29 Oklaho…      10
##  8   1908     9 regular     1908-… FALSE   NA    Oklaho…      50 Texas         0
##  9   1909    10 regular     1909-… FALSE   NA    Texas        30 Oklaho…       0
## 10   1910    11 regular     1910-… FALSE   NA    Texas         0 Oklaho…       3
## # … with 105 more rows, 1 more variable: winner <chr>, and abbreviated variable
## #   names ¹​neutral_site, ²​home_team, ³​home_score, ⁴​away_team, ⁵​away_score
cfbd_team_matchup("Texas A&M", "TCU")
## ── Team matchup history from CollegeFootballData.com ───────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:50 UTC
## # A tibble: 89 × 11
##    season  week season_type date   neutr…¹ venue home_…² home_…³ away_…⁴ away_…⁵
##     <int> <int> <chr>       <chr>  <lgl>   <lgl> <chr>     <int> <chr>     <int>
##  1   1903    12 regular     1903-… FALSE   NA    Texas …      14 TCU           6
##  2   1903     5 regular     1903-… FALSE   NA    Texas …      11 TCU           0
##  3   1903    10 regular     1903-… FALSE   NA    Texas …      16 TCU           0
##  4   1904     6 regular     1904-… FALSE   NA    Texas …      29 TCU           0
##  5   1905     3 regular     1905-… FALSE   NA    Texas …      20 TCU           0
##  6   1905     8 regular     1905-… FALSE   NA    Texas …      24 TCU          11
##  7   1906     6 regular     1906-… FALSE   NA    Texas …      42 TCU           0
##  8   1906     8 regular     1906-… FALSE   NA    Texas …      22 TCU           0
##  9   1907     8 regular     1907-… FALSE   NA    Texas …      32 TCU           5
## 10   1908     7 regular     1908-… FALSE   NA    Texas …      13 TCU          10
## # … with 79 more rows, 1 more variable: winner <chr>, and abbreviated variable
## #   names ¹​neutral_site, ²​home_team, ³​home_score, ⁴​away_team, ⁵​away_score
cfbd_team_matchup("Texas A&M", "TCU", min_year = 1975)
## ── Team matchup history from CollegeFootballData.com ───────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:50 UTC
## # A tibble: 22 × 11
##    season  week season_type date   neutr…¹ venue home_…² home_…³ away_…⁴ away_…⁵
##     <int> <int> <chr>       <chr>  <lgl>   <lgl> <chr>     <int> <chr>     <int>
##  1   1975     7 regular     1975-… FALSE   NA    TCU           6 Texas …      14
##  2   1976    12 regular     1976-… FALSE   NA    Texas …      59 TCU          10
##  3   1977    12 regular     1977-… FALSE   NA    TCU          23 Texas …      52
##  4   1978    13 regular     1978-… FALSE   NA    Texas …      15 TCU           7
##  5   1979    13 regular     1979-… FALSE   NA    TCU           7 Texas …      30
##  6   1980    13 regular     1980-… FALSE   NA    Texas …      13 TCU          10
##  7   1981    12 regular     1981-… FALSE   NA    TCU           7 Texas …      37
##  8   1982    12 regular     1982-… FALSE   NA    Texas …      34 TCU          14
##  9   1983    13 regular     1983-… FALSE   NA    TCU          10 Texas …      20
## 10   1984    14 regular     1984-… FALSE   NA    Texas …      35 TCU          21
## # … with 12 more rows, 1 more variable: winner <chr>, and abbreviated variable
## #   names ¹​neutral_site, ²​home_team, ³​home_score, ⁴​away_team, ⁵​away_score
cfbd_team_matchup("Florida State", "Florida", min_year = 1975)
## ── Team matchup history from CollegeFootballData.com ───────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:50 UTC
## # A tibble: 48 × 11
##    season  week season_type date   neutr…¹ venue home_…² home_…³ away_…⁴ away_…⁵
##     <int> <int> <chr>       <chr>  <lgl>   <chr> <chr>     <int> <chr>     <int>
##  1   1975     7 regular     1975-… FALSE   NA    Florida      34 Florid…       8
##  2   1976     7 regular     1976-… FALSE   NA    Florid…      26 Florida      33
##  3   1977    14 regular     1977-… FALSE   NA    Florida       9 Florid…      37
##  4   1978    13 regular     1978-… FALSE   NA    Florid…      38 Florida      21
##  5   1979    13 regular     1979-… FALSE   NA    Florida      16 Florid…      27
##  6   1980    15 regular     1980-… FALSE   NA    Florid…      17 Florida      13
##  7   1981    13 regular     1981-… FALSE   NA    Florida      35 Florid…       3
##  8   1982    14 regular     1982-… FALSE   NA    Florid…      10 Florida      13
##  9   1983    15 regular     1983-… FALSE   NA    Florida      53 Florid…      14
## 10   1984    15 regular     1984-… FALSE   NA    Florid…      17 Florida      27
## # … with 38 more rows, 1 more variable: winner <chr>, and abbreviated variable
## #   names ¹​neutral_site, ²​home_team, ³​home_score, ⁴​away_team, ⁵​away_score

Get Team Rosters

cfbd_team_roster(year = 2013, team = "Florida State")
## ── Team roster data from CollegeFootballData.com ───────────── cfbfastR 1.9.3 ──
##  Data updated: 2022-11-24 08:48:50 UTC
## # A tibble: 55 × 17
##    athlete_id first_n…¹ last_…² team  weight height jersey  year posit…³ home_…⁴
##    <chr>      <chr>     <chr>   <chr>  <int>  <int>  <int> <int> <chr>   <chr>  
##  1 480772     Dan       Hicks   Flor…     NA     76      6    NA DE      Oxford 
##  2 480781     Jacobbi   McDani… Flor…     NA     72     55    NA DT      Greenv…
##  3 501075     Chad      Abram   Flor…     NA     72     41    NA FB      Lakela…
##  4 501076     Terrence  Brooks  Flor…     NA     71     31    NA DB      Dunnel…
##  5 501077     Shayne    Broxsie Flor…     NA     74     42    NA TE      Montic…
##  6 501082     Jarred    Haggins Flor…     NA     72     12    NA WR      Lakela…
##  7 501083     Christian Jones   Flor…     NA     76      7    NA LB      Winter…
##  8 501084     Lamarcus  Joyner  Flor…     NA     68     20    NA DB      Ft. La…
##  9 501095     Telvin    Smith   Flor…     NA     75     22    NA LB      Valdos…
## 10 501097     Nigel     Terrell Flor…     NA     74     43    NA LB      Helena 
## # … with 45 more rows, 7 more variables: home_state <chr>, home_country <chr>,
## #   home_latitude <chr>, home_longitude <chr>, home_county_fips <chr>,
## #   recruit_ids <list>, headshot_url <chr>, and abbreviated variable names
## #   ¹​first_name, ²​last_name, ³​position, ⁴​home_city

Get Team Talent

## ── 247sports team talent ratings from CollegeFootballData.com ──────────────────
##  Data updated: 2022-11-24 08:48:50 UTC
## # A tibble: 1,770 × 3
##     year school     talent
##    <int> <chr>       <dbl>
##  1  2022 Alabama     1017.
##  2  2022 Georgia      990.
##  3  2022 Ohio State   983.
##  4  2022 Texas A&M    947.
##  5  2022 Clemson      943 
##  6  2022 Texas        887.
##  7  2022 Oregon       878.
##  8  2022 LSU          873.
##  9  2022 Oklahoma     870.
## 10  2022 Notre Dame   866.
## # … with 1,760 more rows
cfbd_team_talent(year = 2018)
## ── 247sports team talent ratings from CollegeFootballData.com ──────────────────
##  Data updated: 2022-11-24 08:48:50 UTC
## # A tibble: 237 × 3
##     year school        talent
##    <int> <chr>          <dbl>
##  1  2018 Ohio State      984.
##  2  2018 Alabama         979.
##  3  2018 Georgia         964 
##  4  2018 USC             934.
##  5  2018 Clemson         893.
##  6  2018 LSU             890.
##  7  2018 Florida State   889.
##  8  2018 Michigan        862.
##  9  2018 Texas           861.
## 10  2018 Notre Dame      848.
## # … with 227 more rows