Skip to main content
Version: 0.1.5

MBB — additional Python functions

Hand-written wrappers, loaders, and helpers in sportsdataverse.mbb not covered by the generated API-endpoint reference above.

Highlights​

FunctionSummary
espn_mbb_game_rostersespn_mbb_game_rosters() - Pull the game by id.
espn_mbb_pbpespn_mbb_pbp() - Pull the game by id. Data from API endpoints: mens-college-basketball/playbyplay, mens-college-basketball/summary
espn_mbb_player_statsPull a men's-college-basketball athlete's ESPN season stat line.
espn_mbb_scheduleespn_mbb_schedule - look up the men's college basketball scheduler for a given season
espn_mbb_teamsespn_mbb_teams - look up the men's college basketball teams
most_recent_mbb_seasonReturn the most recent men's college basketball season year.
ncaa_mbb_play_by_playScrape many MBB games' play-by-play (bigballR get_play_by_play).
ncaa_mbb_team_rosterScrape a men's team roster from stats.ncaa.org.
ncaa_mbb_team_scheduleScrape a men's team's season schedule from stats.ncaa.org.

ESPN​

FunctionSummary
scoreboard_event_parsingFlatten one ESPN scoreboard event for the schedule frame, in place.

stats.ncaa.org​

FunctionSummary
BadLineupClumpA run of consecutive bad :class:`~sportsdataverse.mbb.mbb_ncaa_models
FieldAverageLeague average + estimated HCA for one stat field (ts:620-625).
GameBreakEventA break in play (timeout, end of period, etc.) short of the end of
GameEndEventThe end of the game (Model.GameEndEvent, ExtractorUtils.scala:878-881).
IterationResultReturn of run_iterative_adjustment_with_hca (ts:314-317).
LineupBuildingStateState for building raw lineup data across a fold over play-by-play
NcaaFetchConfigRuntime configuration for the stats.ncaa.org fetch layer.
NcaaFetcherCache-first stats.ncaa.org fetcher, proxy-bound per the binding directive.
OtherOpponentEventA non-sub event belonging to the opponent (Model.OtherOpponentEvent,
OtherTeamEventA non-sub event belonging to the team under analysis
ParseErrorA parse-time error (ParseError, ParseError.scala:9).
PbpBuildersOne version-era's HTML finder functions (``PlayByPlayParser
PeekableIteratorA stateful iterator with one element of look-ahead, the Python
PossessionSplitsHome/away/neutral possession totals for one team (ts:143-152).
ScheduleBuildersOne version-era's HTML finder functions (``TeamScheduleParser
ShotEventBuildersThe HTML finder-function table (ShotEventParser.base_builders,
ShotMapDimensionsSVG shot-map pixel<->feet conversion constants, taken from the
StrengthAdjustedResultThe compute output of build_strength_adjusted_stats.
SubInEventA player subs into the game (Model.SubInEvent, ExtractorUtils.scala:850-853).
SubOutEventA player subs out of the game (Model.SubOutEvent, ExtractorUtils.scala:854-857).
TeamStrengthAdjustedOne team's raw / adjusted / HCA-adjusted rates (ts:642-648).
ValidationErrorThe 3 ways a lineup can be declared invalid, in Scala declaration
add_missing_playersBack-fills a clump whose lineups carry TOO FEW players
add_stats_to_lineupsEnrich a lineup with play-by-play stats for both team and opponent
alias_combosPair each of combos' three name variants with a shared alias
analyze_and_fix_clumpsRuns the full self-healing fixer pipeline over one bad-lineup clump
attr_regex_filterJSoup [attr~=regex]: candidates whose attr value matches
build_available_team_listBuilds a per-conference team-index JSON fragment for
build_base_eventFills in the fields a shot event can borrow straight from the
build_lineup_cli_arrayBuilds the per-conference team array for lineups-cli.sh files
build_lineup_idBuilds a lineup id from a list of players (ExtractorUtils.scala:602-606):
build_new_player_listBuilds a player list from the previous (or current, if pre-initialized)
build_partial_lineup_listConverts a stream of partially parsed events into a list of lineup
build_player_codeBuild a short player code from a name, in any of the NCAA formats
build_strength_adjusted_statsRun the full strength-adjustment compute over a team list.
build_sub_errorBuild a location-less ParseError from id fragments
cached_pathReturn the on-disk cache file path for path, without touching it.
categorize_bad_lineupsAggregates bad lineup events for display, by clump-leader player count
clump_bad_lineupsGroups consecutive bad lineup events into BadLineupClump\ s
combosGenerate the three name-string variants NCAA sources use for one
compute_league_averages_from_per_gamePossession-weighted league means per field (computeLeagueAveragesFromPerGame, ts:189-221).
compute_opponent_strengthsSchedule-weighted opponent strength per field (computeOpponentStrengths, ts:253-299).
compute_possession_splitsHome/away/neutral possession totals for a team (computePossessionSplits, ts:154-186).
create_lineup_dataCombines the different methods to build a set of lineup events
create_player_eventsSplit a lineup event into one :class:`~sportsdataverse.mbb
create_shot_event_dataParses a game page's SVG shot map into a list of :class:`~sportsdataverse
duration_from_periodThe game duration (minutes elapsed) once period has completed
enrich_and_reverse_game_eventsInserts game-break events and turns descending per-row times into
enrich_lineupPopulate pts/plus_minus from the score delta, then run the
enrich_shot_events_with_pbpEnrich each shot with its play-by-play event + on-floor lineup
enrich_statsFold a lineup's raw events into a counting-stat tree (``protected def
enrich_sub_errorAdds top-level location information to a single sub-error, returning a
enrich_sub_errorsAdds top-level location information to a list of sub-errors generated
ensure_ev_uniquenessNudge each event's min by a tiny per-index delta so truly
extract_player_from_evResolve the player named in pbp_event to a
field_keysOff/def stat-key names for a field (fieldKeys, ts:77-79).
filter_matching_ownJSoup :matchesOwn(regex) applied to an already-computed candidate
find_lineupFind the lineup (stint) event on the floor for shot
find_missing_subsTrims a clump whose lineups carry TOO MANY players by identifying the
find_pbp_clumpGather every play-by-play shot/assist event sharing shot_time
fix_combosPair each of combos' three name variants with a shared
fix_possible_score_swap_bugUndo a rare NCAA data bug where the scores get transposed
get_ascending_timeConverts the descending in-period clock time to an ascending
get_box_lineupGets the boxscore lineup from the HTML page (``BoxscoreParser
get_configReturn the live NcaaFetchConfig singleton.
get_game_weightWeight for one game/field/side (getGameWeight, ts:119-140).
get_neutral_gamesExtracts the set of neutral/away-marked game dates from a saved NCAA
get_per_game_rawPer-game raw shooting rate from one opponent row (getPerGameRaw, ts:82-116).
get_sorted_pbp_eventsHandy util to return the play-by-play events in chronological order,
get_team_raw_from_per_gameA team's field rate as the weighted mean of its per-game raws (getTeamRawFromPerGame, ts:224-250).
get_team_triplesExtracts (team, NCAA id, conference) triples from a saved NCAA
get_unified_ncaa_idGets a player's lowest cross-season NCAA id from a saved player page
handle_common_sub_bugFixes the "2-in-1-out then a compensating 1-out" substitution bug
inject_starting_lineup_into_boxInfer the starting five and reorder the box-score roster so they lead
inject_validated_playersValidates box players against the roster (if available) and any
is_cachedReturn whether path already has a cache file on disk.
is_end_of_game_fouling_vs_fastbreakCheck for intentional fouling to prolong the game, specifically so it
is_gen2Detect the new/"gen2" NCAA event format (EventUtils.is_gen2,
is_scrambleFigure out if (each event of) the current clump is part of a
is_team_shooting_left_to_startInfers which side of the SVG court the team under analysis shoots
is_women_gameInfers men's vs. women's game from timing evidence
jsoup_textJSoup Element.text(): all descendant text, whitespace-collapsed.
lineup_stats_bucketAssemble one lineup's full 254-field {value} bucket.
lineup_stats_bucketsGroup events by lineup, fold each group's stats, and mint one bucket per lineup.
load_proxybonanza_poolResolve a ProxyBonanza package into a list of http://login:pass@ip:port URLs.
matching_playerWhether the player in pbp_event matches shot's shooter
misspellingsTeam-scoped misspelling map, falling back to the generic map
name_in_v0_box_formatSwitch a v1-box-format name ("first_name names") to v0-box format
ncaa_mbb_box_scoresBox scores for one or more NCAA games (bigballR get_box_scores port).
ncaa_mbb_date_gamesDiscover every NCAA MBB game played on a date (bigballR get_date_games).
ncaa_mbb_join_pbp_shotsAttach shot-chart coordinates to play-by-play rows (bigballR
ncaa_mbb_player_statsAggregate bigballR-contract play-by-play into per-player box stats.
ncaa_mbb_possessionsAggregate bigballR-contract play-by-play into one row per possession.
ncaa_mbb_shot_locationsScrape MBB shot locations for one or more games (bigballR
ncaa_mbb_team_statsAggregate bigballR-contract play-by-play into per-team game stats.
phase1_shot_event_enrichmentThe court-geometry enrichment pass: ascending time, coordinate
playwright_transportBuild the suggested stats.ncaa.org game-detail scraping transport.
remove_diacriticsStrip diacritical marks, e.g. "Juhász" -> "Juhasz"
remove_html_encodingUndo a handful of literal HTML entity escapes (``ExtractorUtils
reorder_and_reverseOrders same-minute play-by-play events so subs never enclose the plays
reset_configReset the active config to its env-var-derived defaults.
right_kind_of_shotWhether pbp_event's shot type is compatible with shot's
run_iterative_adjustment_with_hcaKenPom-style SoS + HCA fixed-point solver (runIterativeAdjustmentWithHCA, ts:306-527).
same_schoolWhether two team-name spellings denote the same school.
select_containsJSoup root.select(sel + ":contains(text)"): candidates whose full
select_matchingJSoup root.select(sel + ":matches(regex)"): candidates whose full
select_matching_ownJSoup root.select(sel + ":matchesOwn(regex)"): candidates whose
shot_js_to_htmlConverts client-side addShot(...) JS calls into parseable
start_time_from_periodThe game-clock time (minutes elapsed) a period starts at
sum_event_statsField-wise add two :class:`~sportsdataverse.mbb.mbb_ncaa_models
sum_shot_infosField-wise sum a list of :class:`~sportsdataverse.mbb.mbb_ncaa_models
td_atJSoup row >?> element("td:eq(n)"): the n-th <td> child.
transform_shot_locationTransforms a raw SVG pixel location into feet from the basket, always
update_configUpdate the active config in place.
validate_box_scoreChecks there are no duplicates in the lineup (``BoxscoreParser
validate_lineupFlags a lineup stint as internally inconsistent, via 3 independent

KenPom​

FunctionSummary
has_kenpom_loginWhether KenPom credentials are set in the environment.
kenpom_loginLog into kenpom.com and return the authenticated session.

Fox Sports API​

FunctionSummary
fox_mbb_boxscoreMBB boxscore (long: one row per player-stat).
fox_mbb_event_matchupFox Sports cbk pregame team-stat comparison (one row per stat).
fox_mbb_event_recapFox Sports cbk postgame top performers (one row per player).
fox_mbb_event_standingsFox Sports cbk the two teams' standings context.
fox_mbb_league_conferencesFox Sports cbk conference / group directory.
fox_mbb_league_headerFox Sports cbk league header (one row).
fox_mbb_league_leadersMBB statistical leaders (stats-con); who=player|team.
fox_mbb_league_oddsFox Sports cbk league odds board (one row per team per game).
fox_mbb_league_player_newsFox Sports cbk league-wide player news feed.
fox_mbb_league_pollsFox Sports cbk rankings / polls rendered as standings tables.
fox_mbb_league_scheduleFox Sports cbk league schedule nav selections.
fox_mbb_league_scoresFox Sports cbk league scores nav selections.
fox_mbb_league_standingsFox Sports cbk league-wide standings tables.
fox_mbb_league_stat_leadersFox Sports cbk league stats landing leaders.
fox_mbb_oddsMBB game odds six-pack (spread / to-win / total per team).
fox_mbb_pbpMBB play-by-play (one row per play; period-based).
fox_mbb_scoreboardFox Sports cbk scoreboard nav selections (weeks / dates / groups).
fox_mbb_scorechipFox Sports cbk compact live score chip (raw dict -- live-only, uncaptured shape).
fox_mbb_scores_segmentFox Sports cbk one row per game in a scoreboard segment.
fox_mbb_standingsMBB standings for a team's conference/division.
fox_mbb_team_gamelogMBB team game log (long: one row per game-stat).
fox_mbb_team_headerFox Sports cbk team header (one row).
fox_mbb_team_rosterMBB team roster (one row per player).
fox_mbb_team_statsMBB team stat leaders by category.
fox_mbb_teamnavFox Sports cbk team directory (one row per team).
fox_mbb_teamsMBB team directory for one seed team's conference.
fox_mbb_teams_allFull MBB team directory by walking seed ids across conferences.

Play-by-play processing​

FunctionSummary
build_athlete_identity_lookupR build_athlete_identity_lookup: athlete_id -> identity from team rosters.
build_mbb_player_identity_lookupR build_identity_lookup(season): athlete_id -> identity from the
classify_point_value2 or 3 from basket-relative geometry (arc radius + corner band).
classify_zone_geometryShot zone from geometry: rim | paint | mid | corner3 | abovebreak3.
classify_zone_typeCollapse a source shot-type label to rim | arc3 | jump.
espn_shots_to_canonicalESPN load_mbb_shots frame -> the canonical shot frame.
fit_espn_court_scaleFit the ESPN raw-coordinate court scale: (origin_x, origin_y, feet_per_unit).
mbb_pbp_diskRead a saved ESPN MBB play-by-play payload from disk.
mbb_shot_dataSeason(s) of shots in the canonical frame (the spine's data entry point).
ncaa_mbb_game_pbpScrape one MBB game's play-by-play (bigballR scrape_game).
shot_events_to_frameFlatten NCAA HTML ShotEvent objects to the canonical frame.

Models and calculators​

FunctionSummary
AssistEventOne assist relationship's counts (LineupEventStats.AssistEvent,
AssistInfoDetailed assist info, split into given/received
ConferenceIdCBB conference identifier (ConferenceId, ``models/ConferenceId
CutdownShotEventA narrowed ShotEvent, keeping only the fields needed once a
DirectionWhich team is in possession (RawGameEvent.Direction, :119-121).
FieldGoalStatsField-goal counting stats (LineupEventStats.FieldGoalStats,
LeagueConstantsPer-league fitted constants for the prediction & tournament stack.
LineupEventA portion of a game during which a given lineup was on the floor
LineupEventStatsA lineup event's full counting-stat tree (LineupEventStats,
LineupIdThe set of players on the floor, as an opaque id string
LocationTypeGame location (Game.LocationType, Game.scala:36-38).
PlayerCodeIdA player's within-team-season code paired with their full identity
PlayerEventA lineup event's stats, narrowed to one player (PlayerEvent,
PlayerShotInfoPer-player shot-quality info, keyed by lineup slot
PlayerValueConstantsPer-league constants for the player-value spine.
PossCalcFragmentRunning stats needed to calculate possessions for one lineup event,
PossessionEventDecomposes RawGameEvent\ s into attacking/defending sides
RapmConfigPort of RapmConfig (RapmUtils.ts:175-179).
RapmPlayerContextPort of RapmPlayerContext (RapmUtils.ts:147-173).
RapmPreProcDiagnosticsPort of RapmPreProcDiagnostics (RapmUtils.ts:187-194) -- the
RapmPriorInfoPort of RapmPriorInfo (RapmUtils.ts:124-133).
RapmProcessingInputsPort of RapmProcessingInputs (RapmUtils.ts:196-203).
RawGameEventA single NCAA play-by-play event line (LineupEvent.RawGameEvent,
RosterEntryAn entry in an NCAA team roster (RosterEntry, ``models/ncaa
ScoreInfoScore context at the start/end of a lineup event
ShotClockStatsCounting stats broken down by shot-clock segment
ShotEventInfo about one shot taken during a game, all distances in feet
ShotGeoA shot's synthetic lat/lon, for geo-aware visualization tooling
ShotLocationA shot's court-relative coordinates, in feet (ShotEvent.ShotLocation,
TeamIdCBB team identifier (TeamId, TeamId.scala, AnyVal).
TeamSeasonIdA team's season identifier (TeamSeasonId, TeamSeasonId.scala).
adjust_efficiencyIterative opponent-adjusted efficiency -> AdjO / AdjD / AdjEM per team-season.
adjust_off_rating_statsApply a missing-possession correction factor to an ORtgDiagnostics dict in place.
adjust_tempoOpponent-adjusted tempo (possessions/40) per team-season.
aggregate_player_seasonsCanonical per-player-season counting frame from the boxscore release.
apply_weak_priorsBuild a closure that nudges ridge-regressed RAPM back towards its weak prior.
as_of_ratings_splitFilter a results frame to games strictly before a cutoff date (leakage boundary).
as_of_season_splitRows strictly before target_season -- the leakage boundary.
bootstrap_ariCluster stability: mean ARI between the full fit and bootstrap refits.
brier_scoreMean squared error between predicted probabilities and binary outcomes.
build_d_rtgIndividual defensive rating (Dean-Oliver DRtg) + diagnostics.
build_mbb_season_wpA season's play-by-play with win-probability columns joined in.
build_net_pointsDecompose ORtg/DRtg + RAPM into a Net-Points-like breakdown.
build_o_rtgIndividual offensive rating (Dean-Oliver ORtg) + diagnostics.
build_player_contextBuild the context object the RAPM matrix-solve layer consumes.
build_priorsBuild strong/weak per-player RAPM priors for every column.
build_productivityPublic port of RatingUtils.buildProductivity (RatingUtils.ts:963-990).
build_weak_prior_from_rapmWrap a flat RAPM-estimate vector into playersWeak-shaped dicts.
calc_collinearity_diagMulti-collinearity diagnostic between the players in an off/def design matrix.
calc_lineup_outputsBuild the off/def target vectors the RAPM design matrices are fit against.
calc_player_weightsBuild the off/def player-weight (design) matrices for the RAPM solve.
calc_slow_pseudo_inversePer-parameter variance terms for the ridge-regression standard errors.
calculate_predicted_outPredict per-lineup outputs from fitted per-player RAPM values.
calculate_rapmApply a regression solver matrix to a target-outputs vector.
calculate_residual_errorSum of squared residuals between actual and predicted lineup outputs.
calculate_sd_rapmPer-player RAPM standard errors.
calibration_tableBucket predicted probabilities into bins and compare to actual outcome rates.
fit_shrinkage_kFit the talent shrinkage k split-half (see module docstring).
get_constantsReturn the LeagueConstants for a league.
get_player_value_constantsReturn the PlayerValueConstants for a league.
in_game_featuresPer-play in-game win-probability features from a load_mbb_pbp frame.
inject_rapm_into_playersWrite pick_ridge_regression's RAPM predictions back onto each player.
kmeans_fitSeeded Lloyd's KMeans, best-of-n_init by inertia.
load_artifactRead a bundled player-value artifact (mbb/models/<name>.json).
log_loss_scoreBinary cross-entropy loss between predicted probabilities and outcomes.
logistic_fitL2-penalized logistic regression via L-BFGS (intercept unpenalized).
maeMean absolute error between two arrays.
mbb_box_bpmPer-player-season box Plus/Minus (offense, defense, total).
mbb_bracket_simSingle-elimination Monte Carlo over a bracket-ordered field.
mbb_draft_projectionDraft probability, projected pick, and pro tier per player-season.
mbb_in_game_win_probPer-play home win probability from the bundled in-game logistic.
mbb_predict_gamesVectorized pregame predictions for a schedule of games.
mbb_recruiting_projectionExpected freshman box-BPM per recruit + over/under-performance residual.
mbb_season_simMonte Carlo the remaining schedule: expected wins + title odds.
mbb_shooter_talentPer-shooter EB-regressed make% over expected + points over expected.
mbb_shot_qualityScore each shot with xmake / xpoints from the cell table.
mbb_shot_quality_modelEmpirical-Bayes zone x type make-rate / xPoints table.
mbb_team_ratingsOpponent-adjusted team ratings (AdjO/AdjD/AdjEM/AdjTempo) per team-season.
mbb_transfer_projectionProjected post-transfer box-BPM for each transfer arriving in seasons.
pick_ridge_regressionAdaptively pick a ridge-regression lambda and blend in the RAPM priors.
player_per100_featuresPer-100 / rate features for every (player_id, season).
poss_calc_fragment_sumField-wise add two PossCalcFragment\ s
predict_marginExpected home-minus-away margin from two adjusted efficiency margins.
predict_totalExpected total points from adjusted efficiencies and tempos.
rank_corrSpearman rank correlation between two arrays.
raw_game_efficiencyPer-team, per-game possessions + raw offensive/defensive efficiency.
ridge_cv_lambdaPick lambda by leave-one-group-out CV (groups = seasons/classes).
ridge_fitClosed-form ridge with an unpenalized intercept (coefficient 0).
roc_aucArea under the ROC curve via the rank-sum (Mann-Whitney) identity.
save_artifactWrite a bundled artifact (dev/fitter use -- writes into the source tree).
score_to_tupleParse a "scored-allowed" score string (ExtractorUtils.score_to_tuple,
simulate_gameSample one game outcome: margin ~ Normal(exp_margin, margin_sd).
slow_regressionBuild the Tikhonov (ridge) regression solver matrix.
spearman_corrSpearman rank correlation between two arrays.
talent_split_mseWeighted MSE of the k-regressed first half predicting the raw second half.
transfer_cohortOne row per transfer: same player_id, different team_id in
win_prob_from_marginHome win probability from an expected margin (normal-CDF closed form).

Analytics​

FunctionSummary
ConcurrentClumpA clump of concurrent raw events, together with the lineups that end
PossStateRunning state threaded through calculate_possessions_by_event
apply_relative_positional_overridesRecursively re-shuffle an ordered lineup per RELATIVE_POSITION_FIXES.
assign_to_right_lineupAssign a clump's possessions to the lineup(s) ending in it
build_3p_shot_info3P-only shot-decomposition wrapper.
build_adjusted_3p3P-only approx-unassisted/assisted-FG% wrapper.
build_efficiency_marginsDerive off_net / off_raw_net on a stat set, in place.
build_exp_3pExpected made-3P count given a player's shot-type mix + shooting %s.
build_positionClassify a player into a position label + diagnostic trace string.
build_position_confidencesBuild the 5-way positional confidence vector for a player.
build_positional_aware_filterDecompose a search-filter string into positionally-aware +ve/-ve fragments.
calc_def_player_luck_adjDefensive 3P-luck adjustment for a single player.
calc_def_team_luck_adjDefensive 3P-luck adjustment for a team (or lineup).
calc_off_player_luck_adjOffensive 3P-luck adjustment for a single player.
calc_off_team_luck_adjOffensive 3P-luck adjustment for a team (or lineup).
calculate_aggregated_lineup_statsCombine all lineups into a single team stat set.
calculate_possessionsTop-level entry point: calculate team/opponent possessions for a
calculate_possessions_by_eventDrive the batch loop + per-clump scoring over an already-flattened
calculate_statsCalculate one direction's possession-fragment for one merged clump
complete_weighted_avgFinish a weighted_avg accumulator into true weighted averages.
concurrent_event_handlerBatch a stream of singleton/boundary clumps into merged
count_matchingCount events on one side matching any of the given parsers.
get_stats_diffStraight (unweighted) field-by-field diff of two team stat sets.
incorporate_heightReweight positional confidences by height (Bayesian-ish height prior).
inject_luckReversibly mutate a stat set in place with luck-adjustment deltas.
lineup_as_raw_clumpsTurn one lineup's raw events into unprocessed singleton clumps, plus a
lineup_balancerAttribute this clump's possessions to the candidate lineup(s)
lineup_fixerClamp obviously-broken possession counts (``PossessionUtils
lineup_to_team_reportBuild per-player on/off splits out of a team's lineups.
mbb_archetypesPer-player-season role archetype from the bundled KMeans centers.
mbb_bracketologyProjected tournament field for a season from the released ESPN data.
mbb_shot_selectionPer shooter/team expected points per attempt vs the league-average mix.
mbb_strength_of_scheduleSeason-level SoS / Quad / WAB résumé from the released ESPN data.
ncaa_mbb_lineupsAggregate bigballR-contract play-by-play into per-lineup stats.
ncaa_mbb_on_offTeam stats for every on/off combination of the given players.
ncaa_mbb_player_combosTeam stats for every n-player combination on the court together.
ncaa_mbb_player_lineupsFilter a lineups frame by on-court player membership.
order_lineupOrder a 5-man lineup X1_X2_X3_X4_X5 into PG/SG/SF/PF/C slot order.
pos_class_to_scoreOrdinal "positional weight" for a position class, PG=1000..C=8000.
project_bracketSelect and seed a tournament field from a per-team résumé frame.
regress_shot_qualityShrink a small-sample shot-quality stat toward its positional average.
strength_of_schedulePer-team SoS + Quad 1-4 record + WAB from completed games and ratings.
test_positional_aware_filterCheck a positional-aware filter (from build_positional_aware_filter)
using_roster_posReconcile a stats-derived position class against roster metadata.
weighted_avgMerge obj into mutable_acc with possession weighting.

IDs and crosswalks​

FunctionSummary
FuzzyMatchErrorA failed fuzzy_box_match resolution (Scala's Left[String]
NoSurnameMatchNo candidate surname fragment scored well enough
StrongSurnameMatchA surname fragment matched and the whole-name score cleared
TidyPlayerContextPrecomputed box-score lookup tables + resolution cache for
WeakSurnameMatchA surname fragment matched, but the whole-name score fell short of
box_aware_compareScore how well a single play-by-play candidate name fits a single
build_tidy_player_contextBuild the alternative player-code lookup maps for a box-score lineup
code_from_boxResolve a tidied player NAME to the box roster's own PlayerCodeId.
convert_from_digitsResolve a jersey-number-only name to its box-score player
convert_from_initialsResolve a 2-initial name ("A B" / "B, A") to the single
display_name_to_roster_keyBox-score and shot-chart pages render a player as "Surname, First",
fuzzy_box_matchPick the single unassigned box-score name a mis-spelled play-by-play
mbb_player_crosswalkBuild the MBB cross-source player crosswalk (ESPN / Fox).
mbb_schedule_crosswalkBuild the MBB cross-source schedule crosswalk (ESPN / Torvik).
mbb_team_crosswalkBuild the MBB cross-source team crosswalk (ESPN / Fox / Torvik / KenPom).
name_is_initialsDetect a 2-initial name shorthand, e.g. "A B" or "B, A"
ncaa_espn_team_crosswalkSeason-keyed stats.ncaa.org -> ESPN team-id crosswalk.
ncaa_mbb_team_idsMen's-basketball (team, season) -> stats.ncaa.org id crosswalk.
refresh_ncaa_team_idsExtend the bundled crosswalk with a new season (update_team_ids recipe).
resolve_ncaa_team_idResolve a school name + season to its stats.ncaa.org team id.
tidy_playerResolve a raw play-by-play name to its box-score full name, via an