MyNixOS website logo
Description

Access Men's Basketball Play by Play Data.

A utility to quickly obtain clean and tidy men's basketball play by play data. Provides functions to access live play by play and box score data from ESPN<https://www.espn.com> with shot locations when available. It is also a full NBA Stats API<https://www.nba.com/stats/> wrapper. It is also a scraping and aggregating interface for Ken Pomeroy's men's college basketball statistics website<https://kenpom.com>. It provides users with an active subscription the capability to scrape the website tables and analyze the data for themselves.

hoopR

CRANstatus CRANdownloads Version-Number R-CMD-check Lifecycle:maturing

Contributors

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.

Installation

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 pacman package using the following code:
if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load_current_gh("sportsdataverse/hoopR", dependencies = TRUE, update = TRUE)

Quick Start

NBA full play-by-play seasons (2002-2024) ~ 1-2 minutes

tictoc::tic()
progressr::with_progress({
  nba_pbp <- hoopR::load_nba_pbp()
})
tictoc::toc()
## 1.02 sec elapsed

## 109783 rows of NBA play-by-play data from 230 games.

Men’s college basketball full play-by-play seasons (2006-2024) ~ 2-3 minutes

tictoc::tic()
progressr::with_progress({
  mbb_pbp <-  hoopR::load_mbb_pbp()
})
tictoc::toc()
## 1.62 sec elapsed

## 360517 rows of men's college basketball play-by-play data from 1074 games.

Documentation

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

Breaking Changes

Full News on Releases

Follow the SportsDataverse (@SportsDataverse) on Twitter and star this repo

GitHubstars

Our Authors

  • Saiem Gilani (@saiemgilani)

@saiemgilani

Our Contributors (they’re awesome)

  • Jason Lee (@theFirmAISports)

    @papagorgio23

  • Billy Fryer (@_b4billy_)

    @billyfryer

  • Ross Drucker (@rossdrucker9)

    @rossdrucker

  • Vladislav Shufinskiy (@vshufinskiy)

    @shufinskiy

Citations

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}
}
Metadata

Version

2.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows