
  - [wehoop
    <a href='https://wehoop.sportsdataverse.org'><img src="https://raw.githubusercontent.com/sportsdataverse/wehoop/main/logo.png" align="right"  width="20%" min-width="100px" alt="wehoop logo"/></a>](#wehoop-)
      - [**Installation**](#installation)
      - [**Quick Start**](#quick-start)
      - [**Documentation**](#documentation)
      - [**Breaking Changes**](#breaking-changes)
      - [Follow the SportsDataverse (@SportsDataverse) on X and star
        this
        repo](#follow-the-sportsdataverse-sportsdataverse-on-x-and-star-this-repo)
  - [**Our Authors**](#our-authors)
      - [**Citations**](#citations)

# wehoop <a href='https://wehoop.sportsdataverse.org'><img src="https://raw.githubusercontent.com/sportsdataverse/wehoop/main/logo.png" align="right"  width="20%" min-width="100px" alt="wehoop logo"/></a>

<!-- badges: start -->

[![CRAN
status](https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=success&label=CRAN%20version&prefix=v&query=%24.Version&url=https%3A%2F%2Fcrandb.r-pkg.org%2Fwehoop)](https://CRAN.R-project.org/package=wehoop)
[![CRAN
downloads](https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=success&label=Downloads&query=%24%5B0%5D.downloads&url=https%3A%2F%2Fcranlogs.r-pkg.org%2Fdownloads%2Ftotal%2F2021-10-26%3Alast-day%2Fwehoop)](https://CRAN.R-project.org/package=wehoop)
[![Version-Number](https://img.shields.io/github/r-package/v/sportsdataverse/wehoop?label=wehoop&logo=R&style=for-the-badge)](https://github.com/sportsdataverse/wehoop)
[![R-CMD-check](https://img.shields.io/github/actions/workflow/status/sportsdataverse/wehoop/R-CMD-check.yaml?branch=main&label=R-CMD-Check&logo=R&logoColor=white&style=for-the-badge)](https://github.com/sportsdataverse/wehoop/actions/workflows/R-CMD-check.yaml)
[![Lifecycle:maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg?style=for-the-badge&logo=github)](https://github.com/sportsdataverse/wehoop)
[![X
Follow](https://img.shields.io/twitter/follow/SaiemGilani?label=%40SaiemGilani&logo=x&style=for-the-badge)](https://x.com/SaiemGilani)
[![X
Follow](https://img.shields.io/twitter/follow/hutchngo?label=%40hutchngo&logo=x&style=for-the-badge)](https://x.com/hutchngo)
[![X
Follow](https://img.shields.io/twitter/follow/sportsdataverse?label=%40SportsDataverse&logo=x&style=for-the-badge)](https://x.com/sportsdataverse)

<!-- badges: end -->

`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 CRAN version of
[**`wehoop`**](https://CRAN.R-project.org/package=wehoop) with:

``` r
install.packages("wehoop")
```

This documentation describes **wehoop 3.0.0**. If the CRAN release hasn't
caught up yet, install the GitHub development version instead:

``` r
# You can install using the pak package using the following code:
if (!requireNamespace('pak', quietly = TRUE)){
  install.packages('pak')
}
pak::pak("sportsdataverse/wehoop")
```

## **Quick Start**

### **WNBA full play-by-play seasons (2002-2026) \~ 1-2 minutes**

``` r
tictoc::tic()
progressr::with_progress({
  wnba_pbp <- wehoop::load_wnba_pbp()
})
```

    ## Warning in readRDS(con): cannot open URL
    ## 'https://github.com/sportsdataverse/sportsdataverse-data/releases/download/espn_wnba_pbp/play_by_play_2026.rds':
    ## HTTP status was '404 Not Found'

    ## Warning: Failed to readRDS from
    ## <https://github.com/sportsdataverse/sportsdataverse-data/releases/download/espn_wnba_pbp/play_by_play_2026.rds>

``` r
tictoc::toc()
```

    ## 0.3 sec elapsed

    ## Warning: Unknown or uninitialised column: `game_id`.

    ## 0 rows of WNBA play-by-play data from 0 games.

### **Women’s college basketball full play-by-play seasons (2004-2026) \~ 2-3 minutes**

``` r
tictoc::tic()
progressr::with_progress({
  wbb_pbp <- wehoop::load_wbb_pbp()
})
tictoc::toc()
```

    ## 10.58 sec elapsed

    ## 2824090 rows of women's college basketball play-by-play data from 6011 games.

## **Documentation**

For more information on the package and function reference, please see
the [**`wehoop`** documentation
website](https://wehoop.sportsdataverse.org).

`wehoop` 3.0.0 ships **180 ESPN basketball endpoint wrappers** (88
`espn_wbb_*` + 92 `espn_wnba_*`) covering reference and catalog data,
team detail, athlete coverage, event-level enrichments (odds, win
probability, officials, broadcasts), WNBA-only artifacts (draft, free
agents, transactions), and league-wide catalogs. See the [ESPN
basketball endpoints
vignette](https://wehoop.sportsdataverse.org/articles/espn-endpoints.html)
for a full walkthrough.

Beyond the live ESPN scrapers, `wehoop` ships **90 `load_*()` release-dataset
loaders** that pull pre-built season parquet/rds instead of hitting the
source APIs: `load_wnba_*` / `load_wbb_*` (ESPN-backed pbp, box scores,
rosters, standings, crosswalks), `load_wnba_stats_*` (WNBA Stats API,
including `load_wnba_stats_possessions()`), and the **`load_ncaa_wbb_*`
family** (`pbp`, `shots`, `lineups`, `matchup_stints`, `possessions`,
`rapm_within_team`, `rapm` (league-wide), `player_box`, `team_box`, `rosters`,
`team_rosters`, `schedule`, `team_ids`; seasons 2010-2026, `shots` 2019-2026,
`rapm` 2011-2026) backed by the sportsdataverse-py NCAA engine. Model-dataset
loaders round out the surface: `load_wnba_player_impact()`,
`load_wbb_player_value()`, and `load_wbb_ratings()`.

## **Breaking Changes**

[**Full News on
Releases**](https://wehoop.sportsdataverse.org/news/index.html)

## Follow the SportsDataverse (@SportsDataverse) on X and star this repo

[![X
Follow](https://img.shields.io/twitter/follow/SportsDataverse?style=for-the-badge&logo=x&label=%40SportsDataverse)](https://x.com/SportsDataverse)

[![GitHub
stars](https://img.shields.io/github/stars/sportsdataverse/wehoop.svg?color=eee&logo=github&style=for-the-badge&label=Star%20wehoop&maxAge=2592000)](https://github.com/sportsdataverse/wehoop)

# **Our Authors**

  - [Saiem Gilani](https://x.com/saiemgilani)

<a href="https://x.com/saiemgilani" target="blank"><img  alt="@SaiemGilani" src="https://img.shields.io/twitter/follow/SaiemGilani?style=for-the-badge&logo=x&label=%40SaiemGilani"></a>
<a href="https://github.com/saiemgilani" target="blank"><img src="https://img.shields.io/github/followers/saiemgilani?color=eee&logo=Github&style=for-the-badge" alt="@saiemgilani" /></a>

  - [Geoff Hutchinson - RIP](https://x.com/hutchngo)

<a href="https://x.com/HutchNGo" target="blank"><img src="https://img.shields.io/twitter/follow/HutchNGo?label=%40hutchngo&logo=x&style=for-the-badge" alt="@HutchNGo" /></a>
<a href="https://github.com/hutchngo" target="blank"><img src="https://img.shields.io/github/followers/hutchngo?color=eee&logo=Github&style=for-the-badge" alt="@hutchngo" /></a>

## **Citations**

To cite the [**`wehoop`**](https://wehoop.sportsdataverse.org) R package
in publications, use:

BibTex Citation

``` bibtex
@misc{hutchinson_gilani_2021_wehoop,
  title = {wehoop: Access Women’s Basketball Play by Play Data},
  url = {http://doi.org/10.32614/CRAN.package.wehoop},
  DOI = {10.32614/cran.package.wehoop},
  journal = {CRAN: Contributed Packages},
  publisher = {The R Foundation},
  author = {Gilani,  Saiem and Hutchinson,  Geoffery},
  year = {2021},
  month = nov
}
```
