Table of Contents generated with DocToc
- hoopR
hoopR is an R package for
working with men’s basketball data.
The package has functions to access live play by play and box score
data from ESPN with shot locations when available. As of version 1.3.0,
hoopR is also a full NBA
Stats API wrapper with 127 functions added in this release.
It is additionally a scraping and aggregating interface for Ken Pomeroy’s men’s college basketball statistics website, kenpom.com. It provides users with an active subscription the capability to scrape the website tables and analyze the data for themselves.
You can install the CRAN version of
hoopR with:
install.packages("hoopR")You can install the released version of
hoopR from
GitHub with:
# You can install using the pak package using the following code:
if (!requireNamespace('pak', quietly = TRUE)){
install.packages('pak')
}
pak::pak("sportsdataverse/hoopR")tictoc::tic()
progressr::with_progress({
nba_pbp <- hoopR::load_nba_pbp()
})
tictoc::toc()## 3.55 sec elapsed
## 615581 rows of NBA play-by-play data from 1305 games.
tictoc::tic()
progressr::with_progress({
mbb_pbp <- hoopR::load_mbb_pbp()
})
tictoc::toc()## 6.94 sec elapsed
## 2112541 rows of men's college basketball play-by-play data from 5915 games.
For more information on the package and function reference, please see
the hoopR documentation
website.
- Legacy
nbagl_*wrappers now follow NBA Stats-backed payload structures. nbagl_players()andnbagl_standings()return named lists of data frames (PlayerIndex,Standings) instead of legacy flat schema assumptions.nbagl_schedule()andnbagl_pbp()return modernized core columns aligned with current upstream sources.
- Saiem Gilani (@saiemgilani)
-
Jason Lee (@theFirmAISports)
-
Billy Fryer (@_b4billy_)
-
Ross Drucker (@rossdrucker9)
-
Vladislav Shufinskiy (@vshufinskiy)
To cite the hoopR R package
in publications, use:
BibTex Citation
@misc{gilani_2021_hoopR,
author = {Gilani, Saiem},
title = {hoopR: The SportsDataverse's R Package for Men's Basketball Data.},
url = {https://hoopR.sportsdataverse.org},
year = {2021}
}