View source: R/load_nba_stats.R
| load_nba_stats_leaguedash | R Documentation |
Loads one asset of the nba_stats_leaguedash release tag –
the parameter cube that supersedes the narrower Base-measure tags
(load_nba_stats_player_season_stats(), load_nba_stats_team_season_stats(),
load_nba_stats_lineups(), load_nba_stats_standings()). The cube
publishes 36 tables per season and is the only route to
Advanced/Misc/Scoring/Usage/Defense/Opponent/Four Factors
measures, 2/3/4-man lineup groupings, the *_bio/*_master wide joins,
and player tracking (drives, passing, touches, catch-and-shoot,
pull-up shooting, rebounding, speed/distance).
Coverage floors differ by table and are not individually enforced
here (only the global 1996 floor is): the lineups_* tables start at
the 2007-08 season and the player_tracking_* tables (other than
catchshoot/pullupshot, which go back to 1996) start at the 2013-14
season. Requesting an out-of-range season for those tables 404s
gracefully with a warning and contributes no rows, same as any other
nba_stats_* loader.
load_nba_stats_leaguedash(
seasons = most_recent_nba_stats_season(),
table = NULL,
...,
dbConnection = NULL,
tablename = NULL
)
seasons |
A vector of 4-digit years – the season's START year
(e.g. |
table |
Name of the cube table to load. One of |
... |
Additional arguments passed to an underlying function that writes the season data into a database. |
dbConnection |
A |
tablename |
The name of the data table within the database |
Returns a hoopR_data tibble of the requested cube table, one
row per player-season, team-season or lineup-season depending on
table. Column sets differ per table (11 to 625 columns); the
*_master tables are wide joins of every measure type for that entity.
Other NBA Stats loader functions:
load_nba_stats_coaches()
try(load_nba_stats_leaguedash(seasons = most_recent_nba_stats_season(),
table = "player_bio"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.