Skip to content

imadmali/NBAapi

Repository files navigation

NBAapi

An R package that documents the NBA API, providing functions to pull data from stats.nba.com.

Disclaimer: This R package is in no way affiliated with the NBA.

Installation

This package is not available on CRAN and needs to be installed from this GitHub repository. To do this you need to run the following:

devtools::install_github("imadmali/NBAapi")

Brief Overview

The functions to pull data have the get_* naming convention. For example if we want to access shot chart data from the "shot chart detail" endpoint we can use get_shotchart(...) (use the documentation to understand the appropriate arguments). Similarly, if we want play-by-play data we can use the get_pbp(...) function.

Tasks

  • Box Scores (boxscoretraditionalv2, boxscorescoringv2)
  • Play by Play (playbyplay, playbyplayv2)
  • Shot Charts (shotchartdetail)
  • Draft Combine
  • Player Info (commonallplayers, commonteamroster)
  • Team Info (commonTeamYears)
  • Player/team ID/maps
  • Graphics for shot charts (scatter, hex, heat, lattice)
  • Light unit tests
  • ...

Details on some of the active (and seemingly inactive) endpoints are available here.

About

R package that documents the NBA API with additional functionality

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages