Skip to main content

Getting Started with wehoop

ยท 3 min read
@saiemgilani @saiemgilani

Welcome folks,

I'm Saiem Gilani, one of the authors of wehoop, and I hope to give the community a high-quality resource for accessing women's basketball data for statistical analysis, basketball research, and more. I am excited to show you some of what you can do with this edition of the package.

Installing R and RStudio#

  1. Head to https://cran.r-project.org
  2. Select the appropriate link for your operating system (Windows, Mac OS X, or Linux)
  • Windows - Select base and download the most recent version
  • Mac OS X - Select Latest Release, but check to make sure your OS is the correct version. Look through Binaries for Legacy OS X Systems if you are on an older release
  • Linux - Select the appropriate distro and follow the installation instructions
  1. Head to RStudio.com
  2. Follow the associated download and installation instructions for RStudio.
  3. Start peering over the RStudio IDE Cheatsheet. An IDE is an integrated development environment.

Install wehoop#

# 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")

Quick Start#

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

future::plan("multisession")tictoc::tic()progressr::with_progress({  wnba_pbp <- wehoop::load_wnba_pbp(2002:2021)})tictoc::toc()
## 16.56 sec elapsed
## 10.36 sec elapsedlength(unique(wnba_pbp$game_id))
## [1] 4575
nrow(wnba_pbp)
## [1] 1746086

WNBA full team box score seasons (2002-2021) ~ 5-30 seconds#

future::plan("multisession")tictoc::tic()progressr::with_progress({  wnba_team_box <- wehoop::load_wnba_team_box(2002:2021)})tictoc::toc()
## 8.57 sec elapsed
length(unique(wnba_team_box$game_id))
## [1] 4213
nrow(wnba_team_box)
## [1] 8426

WNBA full player box score seasons (2002-2021) ~ 5-30 seconds#

future::plan("multisession")tictoc::tic()progressr::with_progress({  wnba_player_box <- wehoop::load_wnba_player_box(2002:2021)})tictoc::toc()
## 8.51 sec elapsed
length(unique(wnba_player_box$game_id))
## [1] 4578
nrow(wnba_player_box)
## [1] 98859

Women's college basketball full play-by-play seasons (2002-2021) ~ 45-90 seconds#

future::plan("multisession")tictoc::tic()progressr::with_progress({  wbb_pbp <- wehoop::load_wbb_pbp(2002:2021)})tictoc::toc()
## 56.55 sec elapsed
length(unique(wbb_pbp$game_id))
## [1] 26023
nrow(wbb_pbp)
## [1] 8650487

Women's college basketball full team box score seasons (2002-2021) ~ 5-30 seconds#

future::plan("multisession")tictoc::tic()progressr::with_progress({  wbb_team_box <- wehoop::load_wbb_team_box(2002:2021)})tictoc::toc()
## 8.71 sec elapsed
length(unique(wbb_team_box$game_id))
## [1] 20762
nrow(wbb_team_box)
## [1] 41524

Women's college basketball full player box score seasons (2002-2021) ~ 5-30 seconds#

future::plan("multisession")tictoc::tic()progressr::with_progress({  wbb_player_box <- wehoop::load_wbb_player_box(2002:2021)})tictoc::toc()
## 10.27 sec elapsed
length(unique(wbb_player_box$game_id))
## [1] 28957
nrow(wbb_player_box)
## [1] 488041

Our Authors