Variable: helper_nba_pickcenter
consthelper_nba_pickcenter: (pbp_txt) =>Init=NBA.pickcenter
Defined in: src/producers/espn_basketball_pbp.ts:999
NBA pickcenter metadata (sdv-py helper_nba_pickcenter(pbp_txt) ->
_espn_basketball_pbp.pickcenter_odds): spread / over-under (default 215.5) / home favorite /
availability as plain scalars, e.g. gameSpread: -8.5; the spread and the favorite come from
one provider row.
Parameters
pbp_txt
any
The trimmed game dict (or any ESPN summary payload). Reads pickcenter: a list
of provider records (a single dict counts as one record), each flattened to dotted keys
(spread, overUnder, provider.id, homeTeamOdds.favorite).
Returns
Init
{ gameSpread, overUnder, homeFavorite, gameSpreadAvailable } -- the init dict the
next stage (helper_nba_game_data) takes.
Throws
Error prefixed AttributeError: when pbp_txt is not a dict; TypeError: when
pickcenter is not a list of dicts; ValueError: when a spread / overUnder is not
float-able.
Example
const summary = await sdv.nba.espnNbaSummary({ event_id: 401360428 });
const init = sdv.nba.helper_nba_pickcenter(summary);
init.gameSpreadAvailable; // true when some provider carries a spread
Remarks
Shared by all four leagues (the others @see this block):
- No provider carries a spread:
{ gameSpread: 2.5, overUnder: <league default>, homeFavorite: true, gameSpreadAvailable: false }. Over/under defaults: NBA 215.5, WNBA 165.5, MBB 142.0, WBB 130.5. - Providers are sorted by
str(provider.id)(stable), so teamrankings"1002"sorts ahead of consensus"1004"and Caesars"45"; an absent id sorts as"nan", a null one as"None". Without anyprovider.idthe payload order stands. - The spread is ESPN's home line:
homeFavorite = spread < 0; a pick'em (0) takes that row's ownhomeTeamOdds.favorite(home when unset).overUnderis the first non-null one in sorted order, else the league default.