
Load cleaned MBB player core (identity + bio) from the data repo
Source:R/load_mbb.R
load_mbb_player_core.Rdhelper that loads multiple seasons of ESPN MBB athlete core records – identity and biographical fields, one row per athlete who appeared in the season – from the sportsdataverse-data release repo, either into memory or into a database via forwarded arguments in the dots.
This is the only source of athlete bio in the pipeline: the player season stats payload carries no identity at all – not even the athlete id.
Two properties of the source are worth knowing before joining:
current_team_idis the athlete's CURRENT team, not their team in the requested season. Season team lives inload_mbb_player_box()/load_mbb_player_stats().Bio (height / weight / jersey) is a current snapshot that ESPN overwrites in place; it is not era-correct for a historical season. The season dimension here is participation, not the bio's vintage.
Field coverage is era-dependent by nature – headshots exist only for modern players, while college and date of birth thin out the other way.
Usage
load_mbb_player_core(
seasons = most_recent_mbb_season(),
...,
dbConnection = NULL,
tablename = NULL
)Arguments
- seasons
A vector of 4-digit years associated with given MBB seasons. (Min: 2003)
- ...
Additional arguments passed to an underlying function that writes the season data into a database (used by
update_mbb_db()).- dbConnection
A
DBIConnectionobject, as returned byDBI::dbConnect().- tablename
The name of the player core data table within the database.