Releases: sportsdataverse/hoopR
Releases · sportsdataverse/hoopR
Release list
hoopR 3.0.0
HTTP Backend Migration
- Breaking: Replaced
httrwithhttr2as the HTTP backend for all API requests across the package. - Removed
httrfrom package dependencies (Imports). request_with_proxy()now useshttr2request/retry pipeline instead ofrvest::session()withhttrconfig arguments, resolving segfaults on systems with libcurl >= 8.x / curl R package >= 7.0.0.- All ESPN, NBA Stats, NBA G-League, NCAA, and KenPom HTTP calls now use shared internal helpers (
.retry_request(),.resp_text()) backed byhttr2. check_status()now useshttr2::resp_status()instead ofhttr::status_code().- KenPom (
kp_*) functions now usehttr2cookie jar authentication vialogin(),.kp_get_page(), and.kp_request()helpers.
Messaging Migration (usethis → cli)
- Replaced all
usethis::ui_*()messaging calls in database builder and loader functions withcliequivalents. usethis::ui_stop()→cli::cli_abort(),usethis::ui_oops()→cli::cli_alert_danger(),usethis::ui_todo()→cli::cli_ul(),usethis::ui_info()→cli::cli_alert_info().- Inline markup converted:
usethis::ui_value()→{.val},usethis::ui_path()→{.file},usethis::ui_code()→{.code}. - Moved
usethisfromImportstoSuggests(retained forusethis::edit_r_environ()documentation references).
Social Branding (Twitter → X)
- Updated all social media links and badges from Twitter to X across README, pkgdown site, and vignettes.
- Shields.io badge
logo=twitter→logo=x; profile URLstwitter.com→x.com. - pkgdown navbar icon updated from
fa-twittertofa-x-twitter.
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(), andnba_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()andnba_pbps()now default toversion = "v3"(previously"v2"). Passversion = "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 fromnba_boxscoretraditionalv3()for name-to-ID resolution during V3-to-V2 conversion..players_on_court_v3()internal helper rewritten — now usesnba_gamerotation()stint data with interval mapping for robust on-court player determination (replaces previous substitution-parsing approach).nba_pbp()pparameter is now optional (default:NULL) — previously required even when not using progress tracking.- Removed
stringr::str_matchimport 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
nba_commonteamyears()function added — returns team IDs with their active year ranges.nba_dunkscoreleaders()function added — returns dunk tracking data with biomechanics, scores, and style metrics.nba_gravityleaders()function added — returns gravity scores measuring how much defensive attention each player draws.nba_iststandings()function added — returns In-Season Tournament (NBA Cup) standings.nba_scheduleleaguev2int()function added — returns international schedule data with broadcaster information.nba_teamandplayersvsplayers()function added — returns team and player lineup comparison stats (5 datasets).nba_videoeventsasset()function added — returns video event asset data for a given game event.
ESPN & G-League Functions
espn_nba_team_current_roster()function added — returns current team roster from ESPN.espn_mbb_team_current_roster()function added — returns current MBB team roster from ESPN.nbagl_live_pbp()function added — returns live G-League play-by-play data.nbagl_live_boxscore()function added — returns live G-League box score data.
Other Improvements
- Internal
nba_endpoint()registry updated with all V3 boxscore endpoints andboxscoresummaryv3. - Removed deprecated
qsdependency. - Updated GitHub Actions to v4.
- Cleaned up
.Rbuildignoreduplicates. - Added comprehensive
CONTRIBUTING.mdwith naming conventions and test environment documentation. - Moved
furrrandfuturedependencies to Suggests with version requirements for users who want to use parallel features, but not required for core functionality. - Add
lifecycledependency and deprecation warnings for unstable functions/endpoints to guide users to maintained alternatives.
Bug Fixes
- Fixed
df_listnot initialized beforetryCatchin 147 NBA Stats API wrapper functions, preventing crashes on API errors. - Fixed
nba_data_pbp()plays_dfnot initialized beforetryCatch. - Fixed
helper-skip.Rtest 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
datanot initialized beforetryCatchinnba_playbyplayv3()andnba_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
- Deprecated
nba_boxscorefourfactorsv2()in favor ofnba_boxscorefourfactorsv3()due to unstable/partial V2 API responses. - Deprecated
nba_boxscoremiscv2()in favor ofnba_boxscoremiscv3()due to unstable/partial V2 API responses. - Deprecated
nba_boxscorescoringv2()in favor ofnba_boxscorescoringv3()due to unstable/partial V2 API responses. - Deprecated
nba_boxscoreusagev2()in favor ofnba_boxscoreusagev3()due to unstable/partial V2 API responses. - Deprecated
nba_boxscoreplayertrackv2()in favor ofnba_boxscoreplayertrackv3()due to unstable/partial V2 API responses. - Deprecated
nba_boxscorehustlev2()in favor ofnba_hustlestatsboxscore()due to unstable/partial V2 API responses. - Deprecated
nba_homepageleaders()in favor ofnba_leagueleaders()due to unstable/empty endpoint responses. - Deprecated
nba_homepagev2()in favor ofnba_leagueleaders()due to unstable/empty endpoint responses. - Deprecated
nba_leaderstiles()in favor ofnba_leagueleaders()due to unstable/empty endpoint responses. - Deprecated
nba_teamgamestreakfinder()in favor ofnba_teamgamelogs()due to unstable/empty endpoint responses. - Deprecated
nba_teamhistoricalleaders()in favor ofnba_franchiseleaders()due to unstable/empty endpoint responses. - Deprecated
nba_videodetails()in favor ofnba_videodetailsasset()due to unstable/empty endpoint responses. - Deprecated
nba_winprobabilitypbp()in favor ofnba_playbyplayv3()due to unstable/empty endpoint responses. - Deprecated
nba_playercareerbycollege()in favor ofnba_playercareerbycollegerollup()/nba_leaguedashplayerbiostats()due to unstable/empty endpoint responses. - Deprecated
nba_playernextngames()in favor ofnba_playerprofilev2()due to unstable/empty endpoint responses. - Deprecated
nba_scoreboard()in favor ofnba_scoreboardv3()due to unstable/empty endpoint responses. - Deprecated
nba_scoreboardv2()in favor ofnba_scoreboardv3()due to unstable/partial endpoint responses.
Test Improvements
- Converted 400+
expect_equal(colnames())assertions toexpect_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()andskip_ncaa_wbb_test()helpers. - Updated ESPN test expectations for current API responses.
- Updated NBAGL tests to validate NBA Stats-backed return shapes (
nbagl_players()andnbagl_standings()named-list returns, and current schedule/PBP core columns).
hoopR 2.1.0
load_nba_*()functions now usesportsdataverse-datareleases url instead ofhoopR-datarepository URLload_mbb_*()functions now usesportsdataverse-datareleases url instead ofhoopR-datarepository URL
nba_pbp()andnba_pbps()functions add parameteron_court(defaultTRUE) to return on-court players for each play event, courtesy of @shufinskiy
hoopR 2.0.0
NBA Stats API Live Endpoints
nba_live_pbp()function added.nba_live_boxscore()function added.nba_todays_scoreboard()function added.
NBA Boxscore V3 (and V3-styled) Endpoints Added
nba_scoreboardv3()function added.nba_boxscoretraditionalv3()function added.nba_boxscoreadvancedv3()function added.nba_boxscoremiscv3()function added.nba_boxscorescoringv3()function added.nba_boxscoreusagev3()function added.nba_boxscorefourfactorsv3()function added.nba_boxscoreplayertrackv3()function added.nba_boxscorematchupsv3()function added.nba_boxscorehustlev2()function added.nba_boxscoredefensivev2()function added.
Other NBA Stats API functions added
nba_shotchartlineupdetail()function added.nba_synergyplaytypes()function added.nba_franchiseleaderswrank()function added.nba_videodetailsasset()function added.nba_infographicfanduelplayer()function added.nba_teams()function added.
Other Functions Added
ncaa_mbb_teams()function added.
Proxy Capability Added and Other Notes
- Add rlang dots option for passing
httr::use_proxy()option tonba_*()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
- Takes care of tidyselect deprecation of data masking for certain tidyr and dplyr functions.
- Regular minor maintenance on
kp_*functions espn_mbb_game_rosters()function added.espn_nba_game_rosters()function added.
hoopR 1.8.1
espn_mbb_player_stats()function exported properly.espn_nba_player_stats()function exported properly.- Fixing headers for
kp_functions.
hoopR 1.8.0
espn_mbb_player_stats()function added.espn_mbb_team_stats()function added.espn_nba_player_stats()function added.espn_nba_team_stats()function added.nba_pbps()function added, courtesy of @papagorgio23.nbagl_players()function added, courtesy of @billyfryer.nbagl_schedule()function added, courtesy of @billyfryer.nbagl_pbp()function added, courtesy of @billyfryer.nbagl_standings()function added, courtesy of @billyfryer.nba_gamerotation()function added.nba_playerindex()function added.nba_playerheadshot()function added.nba_drafthistory()function added.
hoopR 1.5.0
- hoopR v1.5.0 on the CRAN, third package of the sportsdataverse to make it's way onto CRAN thus far
- 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_linksinternal dataset for 2022 (need a better solve here) - Added
nba_teamsdataset for working with the NBA Stats API
hoopR 1.4.0
hoopR::espn_mbb_betting()
function addedhoopR::espn_nba_betting()
function added