Skip to contents

hoopR 3.0.0

Stability and Test Robustness

  • Hardened API-facing tests against live schema drift and intermittent empty payloads.
  • Added explicit skip-on-empty guards for lineup and NCAA teams tests to avoid false negatives when upstream endpoints return no rows.
  • Updated expected columns for currently active payloads in key NBA endpoints (including nba_playercareerstats(), nba_playerdashptshotdefend(), and nba_playerprofilev2()).
  • Improved nba_playerprofilev2() assertions to validate core columns while tolerating empty optional result sets.

CI and Check Improvements

  • Added workflow-level concurrency and explicit permissions to GitHub Actions workflows.
  • Clarified optional environment variable usage in CI for live API test toggles.
  • Updated package build ignores to exclude local development folders from source checks.

NBA Play-by-Play V3

  • nba_playbyplayv3() function added — dedicated wrapper for the NBA Stats PlayByPlayV3 endpoint.
  • nba_pbp() and nba_pbps() now default to version = "v3" (previously "v2"). Pass version = "v2" to use the previous behavior.
  • .v3_to_v2_format() internal helper added — converts V3 play-by-play data to V2-compatible column format with mapped event types, player resolution, and retained V3 shot coordinate columns (x_legacy, y_legacy, shot_distance, shot_result, is_field_goal, points_total, shot_value).
  • .build_player_roster() internal helper added — retrieves player roster from nba_boxscoretraditionalv3() for name-to-ID resolution during V3-to-V2 conversion.
  • .players_on_court_v3() internal helper rewritten — now uses nba_gamerotation() stint data with interval mapping for robust on-court player determination (replaces previous substitution-parsing approach).
  • nba_pbp() p parameter is now optional (default: NULL) — previously required even when not using progress tracking.
  • Removed stringr::str_match import from NAMESPACE — V3 clock parsing now uses base R regex functions.

NBA Boxscore Summary V3

  • nba_boxscoresummaryv3() function added — returns a named list of 9 data frames: GameSummary, GameInfo, ArenaInfo, Officials, LineScore, InactivePlayers, LastFiveMeetings, OtherStats, AvailableVideo.

New NBA Stats API Endpoint Wrappers

ESPN & G-League Functions

Other Improvements

  • Internal nba_endpoint() registry updated with all V3 boxscore endpoints and boxscoresummaryv3.
  • Removed deprecated qs dependency.
  • Updated GitHub Actions to v4.
  • Cleaned up .Rbuildignore duplicates.
  • Added comprehensive CONTRIBUTING.md with naming conventions and test environment documentation.
  • Moved furrr and future dependencies to Suggests with version requirements for users who want to use parallel features, but not required for core functionality.
  • Add lifecycle dependency and deprecation warnings for unstable functions/endpoints to guide users to maintained alternatives.

Bug Fixes

  • Fixed df_list not initialized before tryCatch in 147 NBA Stats API wrapper functions, preventing crashes on API errors.
  • Fixed nba_data_pbp() plays_df not initialized before tryCatch.
  • Fixed helper-skip.R test guard functions to use proper string comparison (!= "1") instead of numeric comparison (== 0).
  • Fixed nba_dunkscoreleaders() HTTP 400 error caused by empty string parameters.
  • Fixed V3-style data.frame parsing for leader/standings endpoints.
  • Fixed nba_iststandings() nested games column flattening.
  • Fixed %||% import for R < 4.4.0 compatibility.
  • Fixed data not initialized before tryCatch in nba_playbyplayv3() and nba_pbp(), preventing crashes on API errors.
  • Fixed nbagl_pbp() to avoid on-court enrichment dependency failures for G-League game IDs by using the stable core play-by-play path.
  • Fixed NBAGL wrapper defaults for error paths where return objects were not initialized before tryCatch.

Deprecations

Test Improvements

  • Converted 400+ expect_equal(colnames()) assertions to expect_in() for subset validation, preventing test failures when APIs add new columns.
  • Added tests for all new endpoints with column validation and rate limiting.
  • Added skip_ncaa_mbb_test() and skip_ncaa_wbb_test() helpers.
  • Updated ESPN test expectations for current API responses.
  • Updated NBAGL tests to validate NBA Stats-backed return shapes (nbagl_players() and nbagl_standings() named-list returns, and current schedule/PBP core columns).

hoopR 2.1.0

CRAN release: 2023-11-25

  • load_nba_*() functions now use sportsdataverse-data releases url instead of hoopR-data repository URL
  • load_mbb_*() functions now use sportsdataverse-data releases url instead of hoopR-data repository URL
  • nba_pbp() and nba_pbps() functions add parameter on_court (default TRUE) to return on-court players for each play event, courtesy of @shufinskiy

hoopR 2.0.0

NBA Stats API Live Endpoints

NBA Boxscore V3 (and V3-styled) Endpoints Added

Other NBA Stats API functions added

Other Functions Added

Proxy Capability Added and Other Notes

  • Add rlang dots option for passing httr::use_proxy() option to nba_*() functions
  • Returns documentation added for all working NBA Stats API endpoints and ESPN functions
  • Tests added for all working NBA Stats API endpoints and ESPN functions, over 1000 tests when run locally

hoopR 1.9.1

  • Updates under-the-hood urls to the ESPN site API v2 summary endpoints

hoopR 1.9.0

hoopR 1.8.1

hoopR 1.8.0

CRAN release: 2022-06-17

hoopR 1.7.0

hoopR 1.6.0

hoopR 1.5.0

CRAN release: 2021-11-10

  • Major documentation update to include names of returned lists of data frames for all exported NBA Stats API, ESPN API, KenPom, NCAA and Data repository functions.

hoopR 1.4.5

hoopR 1.4.4

  • Remove referee ranks from kp_box() function

hoopR 1.4.3

  • Option configs changed to revert to user options

hoopR 1.4.2

  • Implement additional boxscore function parameters for nba_boxscore(.*) functions

hoopR 1.4.1

  • Update teams_links internal dataset for 2022 (need a better solve here)
  • Added nba_teams dataset for working with the NBA Stats API

hoopR 1.4.0

hoopR 1.3.1

  • Fix kp_winprob function, adding runs as third output

hoopR 1.3.0

Add Full Coverage for NBA Stats API

Adding roughly 127 functions

Function File Location
nba_alltimeleadersgrids R/nba_stats_leaders.R
nba_assistleaders R/nba_stats_leaders.R
nba_assisttracker R/nba_stats_leaders.R
nba_boxscoreadvancedv2 R/nba_stats_boxscore.R
nba_boxscoredefensive R/nba_stats_boxscore.R
nba_boxscorefourfactorsv2 R/nba_stats_boxscore.R
nba_boxscorematchups R/nba_stats_boxscore.R
nba_boxscoremiscv2 R/nba_stats_boxscore.R
nba_boxscoreplayertrackv2 R/nba_stats_boxscore.R
nba_boxscorescoringv2 R/nba_stats_boxscore.R
nba_boxscoresimilarityscore R/nba_stats_boxscore.R
nba_boxscoresummaryv2 R/nba_stats_boxscore.R
nba_boxscoretraditionalv2 R/nba_stats_boxscore.R
nba_boxscoreusagev2 R/nba_stats_boxscore.R
nba_commonallplayers R/nba_stats_roster.R
nba_commonplayerinfo R/nba_stats_roster.R
nba_commonplayoffseries R/nba_stats_roster.R
nba_commonteamroster R/nba_stats_roster.R
nba_cumestatsplayer R/nba_stats_cume.R
nba_cumestatsplayergames R/nba_stats_cume.R
nba_cumestatsteam R/nba_stats_cume.R
nba_cumestatsteamgames R/nba_stats_cume.R
nba_defensehub R/nba_stats_leaders.R
nba_draftboard R/nba_stats_draft.R
nba_draftcombinedrillresults R/nba_stats_draft.R
nba_draftcombinenonstationaryshooting R/nba_stats_draft.R
nba_draftcombineplayeranthro R/nba_stats_draft.R
nba_draftcombinespotshooting R/nba_stats_draft.R
nba_draftcombinestats R/nba_stats_draft.R
nba_fantasywidget R/nba_stats_lineups.R
nba_franchisehistory R/nba_stats_franchise.R
nba_franchiseleaders R/nba_stats_franchise.R
nba_franchiseplayers R/nba_stats_franchise.R
nba_glalumboxscoresimilarityscore R/nba_stats_boxscore.R
nba_homepageleaders R/nba_stats_leaders.R
nba_homepagev2 R/nba_stats_leaders.R
nba_hustlestatsboxscore R/nba_stats_boxscore.R
nba_leaderstiles R/nba_stats_leaders.R
nba_leaguedashlineups R/nba_stats_lineups.R
nba_leaguedashoppptshot R/nba_stats_league_dash.R
nba_leaguedashplayerbiostats R/nba_stats_league_dash.R
nba_leaguedashplayerclutch R/nba_stats_league_dash.R
nba_leaguedashplayerptshot R/nba_stats_league_dash.R
nba_leaguedashplayershotlocations R/nba_stats_league_dash.R
nba_leaguedashplayerstats R/nba_stats_league_dash.R
nba_leaguedashptdefend R/nba_stats_league_dash.R
nba_leaguedashptstats R/nba_stats_league_dash.R
nba_leaguedashptteamdefend R/nba_stats_league_dash.R
nba_leaguedashteamclutch R/nba_stats_league_dash.R
nba_leaguedashteamptshot R/nba_stats_league_dash.R
nba_leaguedashteamshotlocations R/nba_stats_league_dash.R
nba_leaguedashteamstats R/nba_stats_league_dash.R
nba_leaguegamefinder R/nba_stats_league.R
nba_leaguegamelog R/nba_stats_league.R
nba_leaguehustlestatsplayer R/nba_stats_hustle.R
nba_leaguehustlestatsplayerleaders R/nba_stats_hustle.R
nba_leaguehustlestatsteam R/nba_stats_hustle.R
nba_leaguehustlestatsteamleaders R/nba_stats_hustle.R
nba_leagueleaders R/nba_stats_leaders.R
nba_leaguelineupviz R/nba_stats_lineups.R
nba_leagueplayerondetails R/nba_stats_lineups.R
nba_leagueseasonmatchups R/nba_stats_lineups.R
nba_leaguestandings R/nba_stats_league.R
nba_leaguestandingsv3 R/nba_stats_league.R
nba_matchupsrollup R/nba_stats_lineups.R
nba_pbp R/nba_stats_pbp.R
nba_playerawards R/nba_stats_player.R
nba_playercareerbycollege R/nba_stats_player.R
nba_playercareerbycollegerollup R/nba_stats_player.R
nba_playercareerstats R/nba_stats_player.R
nba_playercompare R/nba_stats_player.R
nba_playerdashboardbyclutch R/nba_stats_player_dash.R
nba_playerdashboardbygamesplits R/nba_stats_player_dash.R
nba_playerdashboardbygeneralsplits R/nba_stats_player_dash.R
nba_playerdashboardbylastngames R/nba_stats_player_dash.R
nba_playerdashboardbyopponent R/nba_stats_player_dash.R
nba_playerdashboardbyshootingsplits R/nba_stats_player_dash.R
nba_playerdashboardbyteamperformance R/nba_stats_player_dash.R
nba_playerdashboardbyyearoveryear R/nba_stats_player_dash.R
nba_playerdashptpass R/nba_stats_player_dash.R
nba_playerdashptreb R/nba_stats_player_dash.R
nba_playerdashptshotdefend R/nba_stats_player_dash.R
nba_playerdashptshots R/nba_stats_player_dash.R
nba_playerestimatedmetrics R/nba_stats_player.R
nba_playerfantasyprofile R/nba_stats_player.R
nba_playerfantasyprofilebargraph R/nba_stats_player.R
nba_playergamelog R/nba_stats_player.R
nba_playergamelogs R/nba_stats_player.R
nba_playergamestreakfinder R/nba_stats_player.R
nba_playernextngames R/nba_stats_player.R
nba_playerprofilev2 R/nba_stats_player.R
nba_playervsplayer R/nba_stats_player.R
nba_playoffpicture R/nba_stats_league.R
nba_schedule R/nba_stats_pbp.R
nba_scoreboard R/nba_stats_scoreboard.R
nba_scoreboardv2 R/nba_stats_scoreboard.R
nba_shotchartdetail R/nba_stats_shotchart.R
nba_shotchartleaguewide R/nba_stats_shotchart.R
nba_teamdashboardbyclutch R/nba_stats_team_dash.R
nba_teamdashboardbygamesplits R/nba_stats_team_dash.R
nba_teamdashboardbygeneralsplits R/nba_stats_team_dash.R
nba_teamdashboardbylastngames R/nba_stats_team_dash.R
nba_teamdashboardbyopponent R/nba_stats_team_dash.R
nba_teamdashboardbyshootingsplits R/nba_stats_team_dash.R
nba_teamdashboardbyteamperformance R/nba_stats_team_dash.R
nba_teamdashboardbyyearoveryear R/nba_stats_team_dash.R
nba_teamdashlineups R/nba_stats_team_dash.R
nba_teamdashptpass R/nba_stats_team_dash.R
nba_teamdashptreb R/nba_stats_team_dash.R
nba_teamdashptshots R/nba_stats_team_dash.R
nba_teamdetails R/nba_stats_team.R
nba_teamestimatedmetrics R/nba_stats_team.R
nba_teamgamelog R/nba_stats_team.R
nba_teamgamelogs R/nba_stats_team.R
nba_teamgamestreakfinder R/nba_stats_team.R
nba_teamhistoricalleaders R/nba_stats_team.R
nba_teaminfocommon R/nba_stats_team.R
nba_teamplayerdashboard R/nba_stats_team.R
nba_teamplayeronoffdetails R/nba_stats_team.R
nba_teamplayeronoffsummary R/nba_stats_team.R
nba_teamvsplayer R/nba_stats_team.R
nba_teamyearbyyearstats R/nba_stats_team.R
nba_videodetails R/nba_stats_video.R
nba_videoevents R/nba_stats_video.R
nba_videostatus R/nba_stats_video.R
nba_winprobabilitypbp R/nba_stats_scoreboard.R

hoopR 1.2.0

Add schedule loaders

hoopR 1.1.0

Add team box score loaders

Add player box score loaders

hoopR 1.0.4

Add retry

  • Adding httr::retry() to all function calls to more naturally navigate rejected/failed requests from the API.

hoopR 1.0.2-3

Quick fix for update db functions

hoopR 1.0.1-4

Dependency pruning

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

hoopR 1.0.0

Package renamed to hoopR

To reflect that the package is no longer just a men’s college basketball and KenPom package, but also an NBA package.

Clean names and team returns

Loading capabilities added to the package

hoopR 0.4

hoopR 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 KP and ESPN functions
Function Naming Convention Change
  • All functions sourced from kenpom.com will start with kp_ as opposed to get_
  • Similarly, data and metrics sourced from ESPN will begin with espn_ as opposed to cbb_. Moreover, all references to cbb_ have been changed to mbb_ as appropriate.
  • Data sourced directly from the NCAA website will start the function with ncaa_

hoopR 0.2.0-3

hoopR 0.1.0

  • Minor fixes

hoopR 0.0.0.9

Initial Commits, remaining tasks:

  • Game Prep Tables
  • Player Career Tables
  • Game Box Scores
  • Argument assertions