Skip to contents

Low level loader for reading in college basketball data in bulk.

Installation

You can install the stable version of cbbreadr from CRAN with:

install.packages("cbbreadr")

You can install the development version of cbbreadr from github using devtools:

devtools::install_github("https://github.com/john-b-edwards/cbbreadr")

Examples

Most functions take in a seasons argument for seasons to query. Data is typically available between 2003 and the present season, but an error is thrown if data is not available for a specified season. Calling functions as-is will load data from the most recent (or current) college basketball season.

library(cbbreadr)
# with no argument, returns most recent season
load_games()
# specify a single season
load_games(2023)
# specify a range of seasons
load_games(2010:2015)

To return all available seasons for a given resource, just pass TRUE as an argument to the function.

# return all available seasons
load_games(TRUE)

Some functions load resources that do not to be specified by year, and thus do not take an argument.

# does not take any arguments
load_conferences()

Acknowledgements

This package is only possible thanks to the CollegeBasketballData.com API. The API is maintained by Bill Radjewski, who is kind enough to make this data available for free.

The API does have premium tiers but maintaining this package requires only the free tier, so no money is needed for upkeep for the package. If you would like to support this package, rather than send any money my way, I encourage you to instead donate or subscribe to Bill’s Patreon so that he can continue developing and maintaining this wonderful project.

I have been a developer with the nflverse organization for a few years now, and have learned much from my talented teammates (who themselves have contributed to cbbreadr’s development, either directly or indirectly). The structure and code of this project looks quite similar to our NFL pipelines for good reason, and this project would not have been possible without their expertise. My thanks goes out to the entire nflverse organization.

Automation Status

cbbreadr relies on several automated pipelines from GitHub to keep data resources updated. For largely static data objects (such as load_conferences()), these pipelines will run once a year. For more frequently updated data objects (such as load_plays()), these pipelines run daily during the college basketball season. To view when a data resource was most recently updated, see below.

Data Status Last Updated
Conferences update-conferences conferences
Games update-games games
Lines update-lines lines
Media update-media media
Player Box Scores update-player-box player-box
Player Stats update-player-stats player-stats
Plays update-plays plays
Rankings update-rankings rankings
Recruiting update-recruiting recruiting
Rosters update-rosters rosters
Team Box Scores update-team-box team-box
Team Stats update-team-stats team-stats
Teams update-teams teams
Venues update-venues venues