wehoop is an R package for working with women’s college and professional basketball data. The package has functions to access live play by play and box score data from ESPN with shot locations when available.

A scraping and aggregating interface for ESPN’s women’s college basketball and WNBA statistics. It provides users with the capability to access the API’s game play-by-plays, box scores, standings and results to analyze the data for themselves.

Installation

You can install the released version of wehoop from GitHub with:

# You can install using the pacman package using the following code:
if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load_current_gh("saiemgilani/wehoop")
# if you would prefer devtools installation
if (!requireNamespace('devtools', quietly = TRUE)){
  install.packages('devtools')
}
# Alternatively, using the devtools package:
devtools::install_github(repo = "saiemgilani/wehoop")

Quick Start

WNBA full play-by-play seasons (2002-2021) ~ 1-2 minutes

# You can install using the pacman package using the following code:
if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load_current_gh("saiemgilani/wehoop")
future::plan("multisession")
tictoc::tic()
progressr::with_progress({
  pbp <- wehoop::load_wnba_pbp(2002:2021)
})
tictoc::toc()
## 10.36 sec elapsed
length(unique(pbp$game_id))
nrow(pbp)

Women’s college basketball full play-by-play seasons (2002-2021) ~ 2-3 minutes

# You can install using the pacman package using the following code:
if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load_current_gh("saiemgilani/wehoop")
future::plan("multisession")
tictoc::tic()
progressr::with_progress({
  pbp <- wehoop::load_wbb_pbp(2002:2021)
})
tictoc::toc()

## 73.39 sec elapsed
length(unique(pbp$game_id))
nrow(pbp)

Documentation

For more information on the package and function reference, please see the wehoop documentation website.

Breaking Changes

Full News on Releases

wehoop 1.0.0

Add team box score loaders

Add player box score loaders

Getting Started vignette

View more version news

wehoop 0.9.2

Quick fix for update db functions

Dependency pruning

This update is a non-user facing change to package dependencies to shrink the list of dependencies.

wehoop 0.9.1

Clean names and team returns

wehoop 0.9.0

Loading capabilities added to the package

wehoop 0.3.0

Dependencies

  • R version 3.5.0 or greater dependency added
  • purrr version 0.3.0 or greater dependency added
  • rvest version 1.0.0 or greater dependency added
  • progressr version 0.6.0 or greater dependency added
  • usethis version 1.6.0 or greater dependency added
  • xgboost version 1.1.0 or greater dependency added
  • tidyr version 1.0.0 or greater dependency added
  • stringr version 1.3.0 or greater dependency added
  • tibble version 3.0.0 or greater dependency added
  • furrr dependency added
  • future dependency added

Test coverage

  • Added tests for all ESPN functions ### Function Naming Convention Change
  • Similarly, data and metrics sourced from ESPN will begin with espn_ as opposed to wbb_ or wnba_.
  • Data sourced directly from the NCAA website will start the function with ncaa_

Current Issues

issue icon title labels opened_by date closed
NA NA NA NA NA NA NA

View More

issue icon title labels opened_by date closed
7 loaders wbb/wnba players/teams saiemgilani 2021-05-24 2021-05-24 19:00:13