Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sportsdataverse/cfbfastR
An R package to quickly obtain clean and tidy college football play by play data
https://github.com/sportsdataverse/cfbfastR
cfb-data college-football college-football-players collegefootballdata-api espn football football-api football-data football-scores footballdata ncaaf r rstats sports sports-analytics sports-betting sports-data sports-stats sportsanalytics sportsdataverse
Last synced: 3 months ago
JSON representation
An R package to quickly obtain clean and tidy college football play by play data
- Host: GitHub
- URL: https://github.com/sportsdataverse/cfbfastR
- Owner: sportsdataverse
- License: other
- Created: 2021-04-02T16:16:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-07T15:35:29.000Z (7 months ago)
- Last Synced: 2024-05-21T12:36:46.876Z (6 months ago)
- Topics: cfb-data, college-football, college-football-players, collegefootballdata-api, espn, football, football-api, football-data, football-scores, footballdata, ncaaf, r, rstats, sports, sports-analytics, sports-betting, sports-data, sports-stats, sportsanalytics, sportsdataverse
- Language: R
- Homepage: https://cfbfastR.sportsdataverse.org
- Size: 92.5 MB
- Stars: 68
- Watchers: 8
- Forks: 8
- Open Issues: 12
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - sportsdataverse/cfbfastR - An R package to quickly obtain clean and tidy college football play by play data (R)
README
---
output: github_document
---#
# **cfbfastR**
```{r, include = FALSE}
require(knitr)
if (!requireNamespace('issue') & !requireNamespace('pacman')){
install.packages('pacman')
}
pacman::p_load(magick, grid, dplyr, lubridate)```
[![CRAN version](https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=success&label=CRAN%20version&prefix=v&query=%24.Version&url=https%3A%2F%2Fcrandb.r-pkg.org%2FcfbfastR)](https://CRAN.R-project.org/package=cfbfastR)
[![CRAN downloads](https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=success&label=Downloads&query=%24%5B0%5D.downloads&url=https%3A%2F%2Fcranlogs.r-pkg.org%2Fdownloads%2Ftotal%2F2021-10-26%3Alast-day%2FcfbfastR)](https://CRAN.R-project.org/package=cfbfastR)
[![Version-Number](https://img.shields.io/github/r-package/v/sportsdataverse/cfbfastR?label=cfbfastR&logo=R&style=for-the-badge)](https://github.com/sportsdataverse/cfbfastR/)
[![R-CMD-check](https://img.shields.io/github/actions/workflow/status/sportsdataverse/cfbfastR/R-CMD-check.yaml?branch=main&label=R-CMD-Check&logo=R&logoColor=white&style=for-the-badge)](https://github.com/sportsdataverse/cfbfastR/actions/workflows/R-CMD-check.yaml) [![Lifecycle:maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg?style=for-the-badge&logo=github)](https://github.com/sportsdataverse/cfbfastR/) [![Contributors](https://img.shields.io/github/contributors/sportsdataverse/cfbfastR?style=for-the-badge)](https://github.com/sportsdataverse/cfbfastR/graphs/contributors) [![Twitter Follow](https://img.shields.io/twitter/follow/cfbfastR?color=blue&label=%40cfbfastR&logo=twitter&style=for-the-badge)](https://twitter.com/cfbfastR) [![Twitter Follow](https://img.shields.io/twitter/follow/SportsDataverse?color=blue&label=%40SportsDataverse&logo=twitter&style=for-the-badge)](https://twitter.com/SportsDataverse)The goal of [**```cfbfastR```**](https://cfbfastR.sportsdataverse.org/) is to provide the community with an R package for working with CFB data. It is an R API wrapper around [https://collegefootballdata.com/](https://collegefootballdata.com/). Beyond data aggregation and tidying ease, one of the multitude of services that [**```cfbfastR```**](https://cfbfastR.sportsdataverse.org/) provides is for benchmarking open-source expected points and win probability metrics.
## **Installation**
You can install the CRAN version of [**```cfbfastR```** ](https://CRAN.R-project.org/package=cfbfastR) with:
```r
install.packages("cfbfastR")
```You can install the released version of [**```cfbfastR```**](https://github.com/sportsdataverse/cfbfastR/) from [GitHub](https://github.com/sportsdataverse/cfbfastR) with:
```r
# You can install using the pacman package using the following code:
if (!requireNamespace('pacman', quietly = TRUE)){
install.packages('pacman')
}
pacman::p_load_current_gh("sportsdataverse/cfbfastR", dependencies = TRUE, update = TRUE)
```## **Breaking Changes**
[**Full News on Releases**](https://cfbfastR.sportsdataverse.org/news/index.html)
#### **College Football Data API Keys**
The [CollegeFootballData API](https://collegefootballdata.com/) now requires an API key, here's a quick run-down:
* To get an API key, follow the directions here: [College Football Data Key Registration.](https://collegefootballdata.com/key)
* Using the key: You can save the key for consistent usage by adding `CFBD_API_KEY=YOUR-API-KEY-HERE` to your .Renviron file (easily accessed via [**`usethis::edit_r_environ()`**](https://usethis.r-lib.org/reference/edit.html)). Run [**`usethis::edit_r_environ()`**](https://usethis.r-lib.org/reference/edit.html), a new script will pop open named `.Renviron`, **THEN** paste the following in the new script that pops up (with**out** quotations)
```r
CFBD_API_KEY = YOUR-API-KEY-HERE
```
Save the script and restart your RStudio session, by clicking `Session` (in between `Plots` and `Build`) and click `Restart R` (there also exists the shortcut `Ctrl + Shift + F10` to restart your session). If set correctly, from then on you should be able to use any of the `cfbd_` functions without any other changes.* For less consistent usage: At the beginning of every session or within an R environment, save your API key as the environment variable `CFBD_API_KEY` (with quotations) using a command like the following.
```{r}
Sys.setenv(CFBD_API_KEY = "YOUR-API-KEY-HERE")
```## Follow [cfbfastR](https://twitter.com/cfbfastR) and the [SportsDataverse](https://twitter.com/SportsDataverse) on Twitter and star this repo
[![Twitter Follow](https://img.shields.io/twitter/follow/cfbfastR?color=blue&label=%40cfbfastR&logo=twitter&style=for-the-badge)](https://twitter.com/cfbfastR)
[![Twitter Follow](https://img.shields.io/twitter/follow/SportsDataverse?color=blue&label=%40SportsDataverse&logo=twitter&style=for-the-badge)](https://twitter.com/SportsDataverse)[![GitHub stars](https://img.shields.io/github/stars/sportsdataverse/cfbfastR.svg?color=eee&logo=github&style=for-the-badge&label=Star%20cfbfastR&maxAge=2592000)](https://github.com/sportsdataverse/cfbfastR/stargazers/)
## **Our Authors**
- [Saiem Gilani](https://twitter.com/saiemgilani)
- [Akshay Easwaran](https://twitter.com/akeaswaran)
- [Jared Lee](https://twitter.com/JaredDLee)
- [Eric Hess](https://twitter.com/arbitanalytics)
# **Our Contributors (they're awesome)**
- [Nate Manzo](https://twitter.com/cfbnate)
- [Michael Egle](https://twitter.com/deceptivespeed_)
- [Jason DeLoach](https://twitter.com/CFBNumbers)
- [Tej Seth](https://twitter.com/Tejseth41)
- [Conor McQuiston](https://twitter.com/ConorMcQ5)
- [Tan Ho](https://twitter.com/_TanHo)
- [Keegan Abdoo](https://twitter.com/KeeganAbdoo)
- [Matt Spencer](https://twitter.com/Maatspencer)
- [Sebastian Carl](https://twitter.com/mrcaseb)
- [John Edwards](https://twitter.com/John_B_Edwards)
# **Authors Emeritus - `cfbscrapR`[archived]**
- [Meyappan Subbiah](https://twitter.com/msubbaiah1)
- [Parker Fleming](https://twitter.com/statsowar)
# **Special Thanks**
- [Nick Tice](https://github.com/NickTice)
## **Citations**
To cite the [**`cfbfastR`**](https://cfbfastR.sportsdataverse.org/) R package in publications, use:
BibTex Citation
```bibtex
@misc{gilani_et_al_2021_cfbfastr,
author = {Saiem Gilani and Akshay Easwaran and Jared Lee and Eric Hess},
title = {cfbfastR: The SportsDataverse's R Package for College Football Data.},
url = {https://cfbfastR.sportsdataverse.org/},
year = {2021}
}
```