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.5 ──
##  Data updated: 2024-09-10 01:26:03 UTC
## # A tibble: 16 × 28
##    team_id school   mascot abbreviation alt_name1 alt_name2 alt_name3 conference
##      <int> <chr>    <chr>  <chr>        <chr>     <chr>     <chr>     <chr>     
##  1     333 Alabama  Crims… ALA          NA        ALA       Alabama   SEC       
##  2       8 Arkansas Razor… ARK          NA        ARK       Arkansas  SEC       
##  3       2 Auburn   Tigers AUB          NA        AUB       Auburn    SEC       
##  4      57 Florida  Gators FLA          NA        FLA       Florida   SEC       
##  5      61 Georgia  Bulld… UGA          NA        UGA       Georgia   SEC       
##  6      96 Kentucky Wildc… UK           NA        UK        Kentucky  SEC       
##  7      99 LSU      Tigers LSU          Louisian… LSU       LSU       SEC       
##  8     344 Mississ… Bulld… MSST         NA        MSST      Miss St   SEC       
##  9     142 Missouri Tigers MIZ          NA        MIZ       Missouri  SEC       
## 10     201 Oklahoma Soone… OKLA         NA        OKLA      Oklahoma  SEC       
## 11     145 Ole Miss Rebels MISS         NA        MISS      Ole Miss  SEC       
## 12    2579 South C… Gamec… SC           NA        SC        South Ca… SEC       
## 13    2633 Tenness… Volun… TENN         NA        TENN      Tennessee SEC       
## 14     251 Texas    Longh… TEX          NA        TEX       Texas     SEC       
## 15     245 Texas A… Aggies TA&M         NA        TA&M      Texas A&M SEC       
## 16     238 Vanderb… Commo… VAN          NA        VAN       Vanderbi… SEC       
## # ℹ 20 more variables: classification <chr>, color <chr>, 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>
cfbd_team_info(conference = "Ind")
## ── Team information from CollegeFootballData.com ───────────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:03 UTC
## # A tibble: 3 × 28
##   team_id school    mascot abbreviation alt_name1 alt_name2 alt_name3 conference
##     <int> <chr>     <chr>  <chr>        <lgl>     <chr>     <chr>     <chr>     
## 1      41 Connecti… Huski… CONN         NA        CONN      UConn     FBS Indep…
## 2      87 Notre Da… Fight… ND           NA        ND        Notre Da… FBS Indep…
## 3     113 UMass     Minut… UMASS        NA        UMASS     UMass     FBS Indep…
## # ℹ 20 more variables: classification <chr>, color <chr>, 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>
cfbd_team_info(year = 2019)
## ── Team information from CollegeFootballData.com ───────────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:03 UTC
## # A tibble: 130 × 28
##    team_id school   mascot abbreviation alt_name1 alt_name2 alt_name3 conference
##      <int> <chr>    <chr>  <chr>        <chr>     <chr>     <chr>     <chr>     
##  1    2005 Air For… Falco… AFA          NA        AFA       Air Force Mountain …
##  2    2006 Akron    Zips   AKR          NA        AKR       Akron     Mid-Ameri…
##  3     333 Alabama  Crims… ALA          NA        ALA       Alabama   SEC       
##  4    2026 Appalac… Mount… APP          NA        APP       Appalach… Sun Belt  
##  5      12 Arizona  Wildc… ARIZ         NA        ARIZ      Arizona   Pac-12    
##  6       9 Arizona… Sun D… ASU          NA        ASU       Arizona … Pac-12    
##  7       8 Arkansas Razor… ARK          NA        ARK       Arkansas  SEC       
##  8    2032 Arkansa… Red W… ARST         NA        ARST      Arkansas… Sun Belt  
##  9     349 Army     Black… ARMY         NA        ARMY      Army      FBS Indep…
## 10       2 Auburn   Tigers AUB          NA        AUB       Auburn    SEC       
## # ℹ 120 more rows
## # ℹ 20 more variables: division <chr>, color <chr>, 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>

Get Team Matchup History (Total Record)

cfbd_team_matchup_records("Texas", "Oklahoma")
## ── Team matchup record from CollegeFootballData.com ────────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:04 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 51         5
cfbd_team_matchup_records("Texas A&M", "TCU", min_year = 1975)
## ── Team matchup record from CollegeFootballData.com ────────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:04 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.5 ──
##  Data updated: 2024-09-10 01:26:04 UTC
## # A tibble: 116 × 11
##    season  week season_type date         neutral_site venue home_team home_score
##     <int> <int> <chr>       <chr>        <lgl>        <chr> <chr>          <int>
##  1   1902     4 regular     1902-10-04T… FALSE        NA    Texas             22
##  2   1903    10 regular     1903-11-13T… FALSE        NA    Oklahoma           5
##  3   1903     6 regular     1903-10-17T… FALSE        NA    Oklahoma           6
##  4   1904    10 regular     1904-11-16T… FALSE        NA    Texas             40
##  5   1905     8 regular     1905-11-03T… FALSE        NA    Oklahoma           2
##  6   1906     7 regular     1906-11-02T… FALSE        NA    Oklahoma           9
##  7   1907     9 regular     1907-11-15T… FALSE        NA    Texas             29
##  8   1908     9 regular     1908-11-13T… FALSE        NA    Oklahoma          50
##  9   1909    10 regular     1909-11-19T… FALSE        NA    Texas             30
## 10   1910    11 regular     1910-11-24T… FALSE        NA    Texas              0
## # ℹ 106 more rows
## # ℹ 3 more variables: away_team <chr>, away_score <int>, winner <chr>
cfbd_team_matchup("Texas A&M", "TCU")
## ── Team matchup history from CollegeFootballData.com ───────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:04 UTC
## # A tibble: 89 × 11
##    season  week season_type date         neutral_site venue home_team home_score
##     <int> <int> <chr>       <chr>        <lgl>        <lgl> <chr>          <int>
##  1   1903    12 regular     1903-11-28T… FALSE        NA    Texas A&M         14
##  2   1903    10 regular     1903-11-14T… FALSE        NA    Texas A&M         16
##  3   1903     5 regular     1903-10-10T… FALSE        NA    Texas A&M         11
##  4   1904     6 regular     1904-10-22T… FALSE        NA    Texas A&M         29
##  5   1905     3 regular     1905-09-30T… FALSE        NA    Texas A&M         20
##  6   1905     8 regular     1905-11-04T… FALSE        NA    Texas A&M         24
##  7   1906     6 regular     1906-10-27T… FALSE        NA    Texas A&M         42
##  8   1906     8 regular     1906-11-10T… FALSE        NA    Texas A&M         22
##  9   1907     8 regular     1907-11-05T… FALSE        NA    Texas A&M         32
## 10   1908     7 regular     1908-10-31T… FALSE        NA    Texas A&M         13
## # ℹ 79 more rows
## # ℹ 3 more variables: away_team <chr>, away_score <int>, winner <chr>
cfbd_team_matchup("Texas A&M", "TCU", min_year = 1975)
## ── Team matchup history from CollegeFootballData.com ───────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:04 UTC
## # A tibble: 22 × 11
##    season  week season_type date         neutral_site venue home_team home_score
##     <int> <int> <chr>       <chr>        <lgl>        <lgl> <chr>          <int>
##  1   1975     7 regular     1975-10-18T… FALSE        NA    TCU                6
##  2   1976    12 regular     1976-11-20T… FALSE        NA    Texas A&M         59
##  3   1977    12 regular     1977-11-19T… FALSE        NA    TCU               23
##  4   1978    13 regular     1978-11-25T… FALSE        NA    Texas A&M         15
##  5   1979    13 regular     1979-11-24T… FALSE        NA    TCU                7
##  6   1980    13 regular     1980-11-22T… FALSE        NA    Texas A&M         13
##  7   1981    12 regular     1981-11-21T… FALSE        NA    TCU                7
##  8   1982    12 regular     1982-11-20T… FALSE        NA    Texas A&M         34
##  9   1983    13 regular     1983-11-19T… FALSE        NA    TCU               10
## 10   1984    14 regular     1984-11-24T… FALSE        NA    Texas A&M         35
## # ℹ 12 more rows
## # ℹ 3 more variables: away_team <chr>, away_score <int>, winner <chr>
cfbd_team_matchup("Florida State", "Florida", min_year = 1975)
## ── Team matchup history from CollegeFootballData.com ───────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:05 UTC
## # A tibble: 50 × 11
##    season  week season_type date         neutral_site venue home_team home_score
##     <int> <int> <chr>       <chr>        <lgl>        <chr> <chr>          <int>
##  1   1975     7 regular     1975-10-18T… FALSE        NA    Florida           34
##  2   1976     7 regular     1976-10-16T… FALSE        NA    Florida …         26
##  3   1977    14 regular     1977-12-03T… FALSE        NA    Florida            9
##  4   1978    13 regular     1978-11-25T… FALSE        NA    Florida …         38
##  5   1979    13 regular     1979-11-24T… FALSE        NA    Florida           16
##  6   1980    15 regular     1980-12-06T… FALSE        NA    Florida …         17
##  7   1981    13 regular     1981-11-28T… FALSE        NA    Florida           35
##  8   1982    14 regular     1982-12-04T… FALSE        NA    Florida …         10
##  9   1983    15 regular     1983-12-03T… FALSE        NA    Florida           53
## 10   1984    15 regular     1984-12-01T… FALSE        NA    Florida …         17
## # ℹ 40 more rows
## # ℹ 3 more variables: away_team <chr>, away_score <int>, winner <chr>

Get Team Rosters

cfbd_team_roster(year = 2013, team = "Florida State")
## ── Team roster data from CollegeFootballData.com ───────────── cfbfastR 1.9.5 ──
##  Data updated: 2024-09-10 01:26:05 UTC
## # A tibble: 55 × 17
##    athlete_id first_name last_name team      weight height jersey  year position
##    <chr>      <chr>      <chr>     <chr>      <int>  <int>  <int> <int> <chr>   
##  1 480772     Dan        Hicks     Florida …     NA     76      6    NA DE      
##  2 480781     Jacobbi    McDaniel  Florida …     NA     72     55    NA DT      
##  3 501075     Chad       Abram     Florida …     NA     72     41    NA FB      
##  4 501076     Terrence   Brooks    Florida …     NA     71     31    NA DB      
##  5 501077     Shayne     Broxsie   Florida …     NA     74     42    NA TE      
##  6 501082     Jarred     Haggins   Florida …     NA     72     12    NA WR      
##  7 501083     Christian  Jones     Florida …     NA     76      7    NA LB      
##  8 501084     Lamarcus   Joyner    Florida …     NA     68     20    NA DB      
##  9 501095     Telvin     Smith     Florida …     NA     75     22    NA LB      
## 10 501097     Nigel      Terrell   Florida …     NA     74     43    NA LB      
## # ℹ 45 more rows
## # ℹ 8 more variables: home_city <chr>, home_state <chr>, home_country <chr>,
## #   home_latitude <chr>, home_longitude <chr>, home_county_fips <chr>,
## #   recruit_ids <list>, headshot_url <chr>

Get Team Talent

## ── 247sports team talent ratings from CollegeFootballData.com ──────────────────
##  Data updated: 2024-09-10 01:26:05 UTC
## # A tibble: 2,144 × 3
##     year school     talent
##    <int> <chr>       <dbl>
##  1  2024 Alabama     1018.
##  2  2024 Georgia     1007.
##  3  2024 Ohio State   999.
##  4  2024 Texas        954.
##  5  2024 Clemson      925.
##  6  2024 Oregon       917.
##  7  2024 Texas A&M    915.
##  8  2024 Oklahoma     907.
##  9  2024 LSU          906.
## 10  2024 Notre Dame   906.
## # ℹ 2,134 more rows
cfbd_team_talent(year = 2018)
## ── 247sports team talent ratings from CollegeFootballData.com ──────────────────
##  Data updated: 2024-09-10 01:26:05 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.
## # ℹ 227 more rows