https://github.com/meysubb/cfbscrapR-archived
CFB R Package
https://github.com/meysubb/cfbscrapR-archived
Last synced: 4 months ago
JSON representation
CFB R Package
- Host: GitHub
- URL: https://github.com/meysubb/cfbscrapR-archived
- Owner: meysubb
- License: gpl-3.0
- Created: 2019-06-29T01:38:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-04T15:03:30.000Z (almost 3 years ago)
- Last Synced: 2024-08-13T07:15:01.509Z (8 months ago)
- Language: R
- Size: 21.6 MB
- Stars: 25
- Watchers: 2
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - meysubb/cfbscrapR-archived - CFB R Package (R)
README
This repo has been archived. You can find the latet version of the package at:
- https://github.com/sportsdataverse/cfbfastR
# cfbscrapR
`cfbscrapR` is an R package for working with CFB data. It is an R API wrapper around https://collegefootballdata.com/. It provides users the capability to get a plethora of endpoints, and supplement that data with additional information (Expected Points Added/Win Probability added). [Documentation Page](https://meysubb.github.io/cfbscrapR/ "cfbscrapR Documentation Page")
__Note:__ The API ingests data from ESPN as well as other sources. For details on those source, please go the website linked above. Sometimes there are inconsitences in the underlying data itself. Please report issues here or to https://collegefootballdata.com/.
## Installation
You can install `cfbscrapR` from GitHub with:``` r
# install.packages("devtools")
devtools::install_github("meysubb/cfbscrapR")
```## Functions
### Scraping Data
* ```cfb_pbp_data(year,week,team,epa_wpa)```: Extract PBP data (append EPA/WPA data)
* ```cfb_game_info(2018,team="Texas A&M")```: Get information from games (Multiple options, all year, one week, one team, specific conference)
* ```cfb_play_stats_player(game_id)```: Gets player info associated by play (Game id )
* ```cfb_rankings(2018,1)```: Historical CFB poll rankings at a specific week
* ```cfb_team(conference)```: List all teams in a given D1 conference
* ```cfb_recruiting(2018,team="Texas")```: CFB recruiting information (General Year, Position groups btw years)### EPA/WPA
* ```calculate_epa <- function(clean_pbp_dat)```: Calculate EPA
* ```create_wpa <- function(df)```: Calculate WPA### Plots
* ```plot_pbp_sequencing(df)```: Plot Play by Play Sequencing per drive
* ```plot_wpa(df,away_color,home_color,winner="away")```: Plot WPA## EP/WP Model
You can find more detailed information and explanation on the EP/WP models in the `cfbscrapR-misc` repository.
Link: [cfbscrapR-misc](https://github.com/meysubb/cfbscrapR-misc "cfbscrapR-misc GitHub repository")