đ Women's college basketball with sportsdataverse-py
Welcome to the women's college hoops corner of the SportsDataverse! đ In a handful of lines you're about to pull rosters, schedules, play-by-play, live scoreboards, AP rankings, ESPN's Basketball Power Index (BPI), in-game win-probability curves, and season-long parquet releases â all returned as tidy polars DataFrames that are ready to model. đ
sportsdataverse.wbb leads with ESPN's deep espn_wbb_* women's-college-basketball surface â over a hundred endpoints â plus blazing-fast load_wbb_* data loaders. If you know the R package wehoop, these names will feel like home. Let's go scout some hoopers! đ
đ§° The toolboxâ
Every accessor returns a tidy polars DataFrame by default â pass return_as_pandas=True for pandas. The â rows are the premium ESPN analytics surfaces we lead with. Click any name for the full reference:
| Function | What it gives you | Source |
|---|---|---|
espn_wbb_teams | Every D-I program, one wide row each | ESPN |
espn_wbb_team_roster | A team's roster, one row per player | ESPN |
espn_wbb_schedule | Games for a date / date-range | ESPN |
espn_wbb_team_schedule | One program's full season slate | ESPN |
espn_wbb_scoreboard | â Live + final scoreboard, one row per game | ESPN |
espn_wbb_pbp | Full play-by-play + boxscore for a game | ESPN |
espn_wbb_player_gamelog | A player's game-by-game log | ESPN |
espn_wbb_player_splits | A player's situational stat splits | ESPN |
espn_wbb_team_stats | A team's season stat splits | ESPN |
espn_wbb_standings | Conference standings + records | ESPN |
espn_wbb_conferences | Conference groups + group ids | ESPN |
espn_wbb_rankings | â AP / Coaches poll rankings | ESPN |
espn_wbb_leaders | â League statistical leaders | ESPN |
espn_wbb_injuries | â Active injury report | ESPN |
espn_wbb_season_powerindex | â BPI ratings, one row per team | ESPN |
espn_wbb_season_powerindex_leaders | â BPI / SOS / SOR category leaders | ESPN |
espn_wbb_game_predictor | â BPI matchup projection for a game | ESPN |
espn_wbb_game_probabilities | â Play-by-play win-probability curve | ESPN |
espn_wbb_calendar | Valid game dates for a season | ESPN |
load_wbb_schedule | Season-long schedule (parquet release) | release |
load_wbb_pbp | Season-long play-by-play (parquet, back to 2002) | release |
load_wbb_team_boxscore | Season-long team boxscores (parquet) | release |
load_wbb_player_boxscore | Season-long player boxscores (parquet) | release |
đ Setupâ
pip install sportsdataverse
No API key needed â the ESPN endpoints and the parquet releases are all public. đ
import polars as pl
import sportsdataverse as sdv
import sportsdataverse.wbb as wbb
SEASON = 2025 # the 2024-25 season â UConn's title run
print('most recent wbb season:', wbb.most_recent_wbb_season())
most recent wbb season: 2026
ESPN's live endpoints are seasonal â polls, injuries, and live scoreboards go quiet in the offseason, and any network call can hiccup. So we use a tiny safe() helper: you get the frame when the feed is up, and a friendly one-liner when it isn't (never a scary traceback). đ The load_wbb_* parquet loaders are rock-solid year-round, so we lean on those for anything historical.
def safe(label, thunk):
"""Run a live call defensively; return None (with a note) if it can't."""
try:
out = thunk()
ok = out is not None and (not hasattr(out, 'height') or out.height > 0)
print(f"{'â
' if ok else 'đĄ'} {label}" + ('' if ok else ' (no rows right now)'))
return out
except Exception as e: # noqa: BLE001 -- demo resilience
print(f"âī¸ {label}: unavailable right now ({type(e).__name__})")
return None
def has_rows(df):
return df is not None and hasattr(df, 'height') and df.height > 0
đī¸ Teamsâ
espn_wbb_teams returns one wide row per Division-I program. The team_id here is the key you'll feed to roster, stats, and leader endpoints. (NCAA team frames carry no conference column â that comes from espn_wbb_standings() / espn_wbb_conferences() below.)
teams = safe('teams', wbb.espn_wbb_teams)
(teams.select(['team_id', 'team_location', 'team_name', 'team_abbreviation', 'team_display_name']).head(10)
if has_rows(teams) else 'teams unavailable')
â
teams
shape: (10, 5)
âââââââââââŦââââââââââââââââââââââŦâââââââââââââââŦââââââââââââââââââââŦâââââââââââââââââââââââââââââ
â team_id â team_location â team_name â team_abbreviation â team_display_name â
â --- â --- â --- â --- â --- â
â str â str â str â str â str â
âââââââââââĒââââââââââââââââââââââĒâââââââââââââââĒââââââââââââââââââââĒâââââââââââââââââââââââââââââĄ
â 2000 â Abilene Christian â Wildcats â ACU â Abilene Christian Wildcats â
â 2005 â Air Force â Falcons â AF â Air Force Falcons â
â 2006 â Akron â Zips â AKR â Akron Zips â
â 2010 â Alabama A&M â Bulldogs â AAMU â Alabama A&M Bulldogs â
â 333 â Alabama â Crimson Tide â ALA â Alabama Crimson Tide â
â 2011 â Alabama State â Lady Hornets â ALST â Alabama State Lady Hornets â
â 2016 â Alcorn State â Lady Braves â ALCN â Alcorn State Lady Braves â
â 44 â American University â Eagles â AMER â American University Eagles â
â 2026 â App State â Mountaineers â APP â App State Mountaineers â
â 9 â Arizona State â Sun Devils â ASU â Arizona State Sun Devils â
âââââââââââ´ââââââââââââââââââââââ´âââââââââââââââ´ââââââââââââââââââââ´âââââââââââââââââââââââââââââ
đĨ Team rosterâ
espn_wbb_team_roster takes a team_id and season and returns one row per player. Here's the 2024-25 UConn Huskies (team_id=2509) â the eventual national champions, led by Paige Bueckers.
uconn = safe('UConn roster', lambda: wbb.espn_wbb_team_roster(team_id=2509, season=SEASON))
(uconn.select(['athlete_id', 'full_name', 'jersey', 'position_abbreviation', 'display_height', 'display_weight']).head(12)
if has_rows(uconn) else 'roster unavailable')
â
UConn roster
shape: (12, 6)
ââââââââââââââŦâââââââââââââââââââââŦâââââââââŦââââââââââââââââââââââŦâââââââââââââââââŦâââââââââââââââââ
â athlete_id â full_name â jersey â position_abbreviati â display_height â display_weight â
â --- â --- â --- â on â --- â --- â
â str â str â str â --- â str â str â
â â â â str â â â
ââââââââââââââĒâââââââââââââââââââââĒâââââââââĒââââââââââââââââââââââĒâââââââââââââââââĒâââââââââââââââââĄ
â 5311737 â Carley Barrett â 24 â G â 5' 7" â null â
â 5106182 â Tara Daye â 44 â G â 5' 10" â null â
â 5107710 â Taylor Feldman â 5 â G â 5' 8" â null â
â 5311739 â Avery Gordon â 55 â F â 6' 7" â null â
â 5108895 â Taylor Henderson â 2 â G â 5' 11" â null â
â âĻ â âĻ â âĻ â âĻ â âĻ â âĻ â
â 4433438 â Madison Layden-Zay â 33 â G â 6' 1" â null â
â 5240041 â Lana McCarthy â 35 â F â 6' 4" â null â
â 5240040 â Kendall Puryear â 22 â F â 6' 3" â null â
â 5239064 â Kiki Smith â 23 â G â 5' 7" â null â
â 5243531 â Nya Smith â 3 â G â 5' 9" â null â
ââââââââââââââ´âââââââââââââââââââââ´âââââââââ´ââââââââââââââââââââââ´âââââââââââââââââ´âââââââââââââââââ
đ Schedule & scoreboardâ
Two complementary views of a slate:
| Function | Best for |
|---|---|
espn_wbb_schedule | a clean game list for a date or 'YYYYMMDD-YYYYMMDD' range |
espn_wbb_scoreboard | â a richer live/final scoreboard (status, venue, scores) |
April 4, 2025 was the women's Final Four. Note: home_score / away_score from espn_wbb_schedule arrive as strings, so cast before arithmetic.
final_four = safe('Final Four schedule', lambda: wbb.espn_wbb_schedule(dates=20250404))
(final_four.select(['id', 'date', 'away_display_name', 'away_score', 'home_display_name', 'home_score', 'status_type_completed'])
if has_rows(final_four) else 'schedule unavailable')
â
Final Four schedule
shape: (2, 7)
âââââââââââââŦââââââââââââââââŦâââââââââââââââŦâââââââââââââŦâââââââââââââââŦâââââââââââââŦâââââââââââââââ
â id â date â away_display â away_score â home_display â home_score â status_type_ â
â --- â --- â _name â --- â _name â --- â completed â
â str â str â --- â str â --- â str â --- â
â â â str â â str â â bool â
âââââââââââââĒââââââââââââââââĒâââââââââââââââĒâââââââââââââĒâââââââââââââââĒâââââââââââââĒâââââââââââââââĄ
â 401746073 â 2025-04-04T23 â Texas â 57 â South â 74 â true â
â â :00Z â Longhorns â â Carolina â â â
â â â â â Gamecocks â â â
â 401746074 â 2025-04-05T01 â UConn â 85 â UCLA Bruins â 51 â true â
â â :30Z â Huskies â â â â â
âââââââââââââ´ââââââââââââââââ´âââââââââââââââ´âââââââââââââ´âââââââââââââââ´âââââââââââââ´âââââââââââââââ
# â The scoreboard view of the same date â richer game-state columns
board = safe('Final Four scoreboard', lambda: wbb.espn_wbb_scoreboard(dates=20250404))
keep = ['game_id', 'short_name', 'status_type_completed', 'home_team_short_display_name',
'home_team_score', 'away_team_short_display_name', 'away_team_score']
(board.select([c for c in keep if c in board.columns])
if has_rows(board) else 'scoreboard unavailable')
â
Final Four scoreboard
shape: (2, 3)
âââââââââââââŦâââââââââââââââŦââââââââââââââââââââââââ
â game_id â short_name â status_type_completed â
â --- â --- â --- â
â str â str â bool â
âââââââââââââĒâââââââââââââââĒââââââââââââââââââââââââĄ
â 401746073 â TEX VS SC â true â
â 401746074 â CONN VS UCLA â true â
âââââââââââââ´â ââââââââââââââ´ââââââââââââââââââââââââ
đŦ Play-by-playâ
espn_wbb_pbp returns a dict of game components (plays, boxscore, header, winprobability, âĻ). The plays value is a list of dicts â build a frame with pl.DataFrame(pbp['plays'], infer_schema_length=None). Columns use ESPN dot-notation (period.number, clock.displayValue, type.text, scoringPlay).
Game 401746075 is the 2025 national championship: South Carolina vs. UConn.
pbp = safe('championship pbp', lambda: wbb.espn_wbb_pbp(game_id=401746075))
plays = None
if pbp is not None and isinstance(pbp, dict) and pbp.get('plays'):
plays = pl.DataFrame(pbp['plays'], infer_schema_length=None)
print('plays shape:', plays.shape, '| components:', list(pbp.keys())[:8])
(plays.select(['period.number', 'clock.displayValue', 'type.text', 'scoringPlay', 'text']).head()
if plays is not None else 'pbp unavailable')
â
championship pbp
plays shape: (443, 58) | components: ['gameId', 'plays', 'winprobability', 'boxscore', 'header', 'format', 'broadcasts', 'videos']
shape: (5, 5)
âââââââââââââââââŦâââââââââââââââââââââŦââââââââââââââââââââŦââââââââââââââŦââââââââââââââââââââââââââââ
â period.number â clock.displayValue â type.text â scoringPlay â text â
â --- â --- â --- â --- â --- â
â i64 â str â str â bool â str â
âââââââââââââââââĒâââââââââââââââââââââĒââââââââââââââââââââĒââââââââââââââĒââââââââââââââââââââââââââââĄ
â 1 â 10:00 â Jumpball â false â Start game â
â 1 â 9:57 â Jumpball â false â Jump Ball won by UConn â
â 1 â 9:57 â Jumpball â false â Jump Ball lost by South â
â â â â â CaroliâĻ â
â 1 â 9:40 â JumpShot â false â Kaitlyn Chen missed Three â
â â â â â PoinâĻ â
â 1 â 9:33 â Offensive Rebound â false â Paige Bueckers Offensive â
â â â â â RebouâĻ â
âââââââââââââââââ´âââââââââââââââââââââ´ââââââââââââââââââââ´ââââââââââââââ´ââââââââââââââââââââââââââââ
# Scoring plays only, with the running score
(plays.filter(pl.col('scoringPlay') == True)
.select(['period.number', 'clock.displayValue', 'awayScore', 'homeScore', 'text']).head(8)
if plays is not None else 'pbp unavailable')
shape: (8, 5)
âââââââââââââââââŦâââââââââââââââââââââŦââââââââââââŦââââââââââââŦââââââââââââââââââââââââââââââââââ
â period.number â clock.displayValue â awayScore â homeScore â text â
â --- â --- â --- â --- â --- â
â i64 â str â i64 â i64 â str â
âââââââââââââââââĒâââââââââââââââââââââĒââââââââââââĒââââââââââââĒââââââââââââââââââââââââââââââââââĄ
â 1 â 9:18 â 0 â 3 â Te-Hina Paopao made Three PoinâĻ â
â 1 â 8:58 â 2 â 3 â Sarah Strong made Jumper. â
â 1 â 8:36 â 2 â 5 â Chloe Kitts made Jumper. â
â 1 â 8:13 â 4 â 5 â Paige Bueckers made Jumper. â
â 1 â 7:24 â 6 â 5 â Azzi Fudd made Jumper. AssisteâĻ â
â 1 â 7:00 â 6 â 7 â Raven Johnson made Layup. AssiâĻ â
â 1 â 6:40 â 8 â 7 â Kaitlyn Chen made Jumper. â
â 1 â 6:23 â 8 â 9 â Bree Hall made Jumper. â
âââââââââââââââââ´âââââââââââââââââââââ´ââââââââââââ´ââââââââââââ´ââââââââââââââââââââââââââââââââââ
â Premium ESPN analyticsâ
This is where espn_wbb_* shines. Three live league-wide feeds, each one line:
| Function | Gives you |
|---|---|
espn_wbb_rankings | the current AP / Coaches poll |
espn_wbb_leaders | league statistical leaders (PPG, RPG, APG, âĻ) |
espn_wbb_injuries | the active injury report |
These are in-season feeds, so out of season they return empty â our safe() helper handles that gracefully.
rankings = safe('rankings (AP/Coaches poll)', wbb.espn_wbb_rankings)
(rankings.head(12) if has_rows(rankings)
else 'no poll published right now (offseason) â try during the season')
đĄ rankings (AP/Coaches poll) (no rows right now)
'no poll published right now (offseason) â try during the season'
injuries = safe('injury report', wbb.espn_wbb_injuries)
(injuries.head(10) if has_rows(injuries)
else 'no active injuries posted right now (offseason)')
đĄ injury report (no rows right now)
'no active injuries posted right now (offseason)'
đ Basketball Power Index (BPI)â
ESPN's BPI is a forward-looking team-strength rating â expected point margin per 70 possessions against an average opponent on a neutral floor. espn_wbb_season_powerindex returns one row per ranked team, with a nested stats list (BPI, BPI rank, SOS, SOR, âĻ). Let's unnest it into a clean BPI leaderboard for 2024-25.
import ast
spi = safe('season BPI', lambda: wbb.espn_wbb_season_powerindex(season=SEASON))
def pick(stats, name):
# The nested `stats` value arrives as a Python-repr string â parse it safely
if isinstance(stats, str):
try:
stats = ast.literal_eval(stats)
except (ValueError, SyntaxError):
return None
for s in (stats or []):
if isinstance(s, dict) and s.get('name') == name:
return s.get('value')
return None
if has_rows(spi):
rows = [
{
'bpi_rank': pick(r['stats'], 'bpirank'),
'bpi': pick(r['stats'], 'bpi'),
'conference_id': r.get('conference_id'),
'team_ref': r.get('team_$ref'),
}
for r in spi.to_dicts()
]
out = pl.DataFrame(rows).sort('bpi', descending=True, nulls_last=True).head(12)
else:
out = 'BPI unavailable right now'
out
â
season BPI
shape: (12, 4)
ââââââââââââŦââââââââââŦââââââââââââââââŦââââââââââââââââââââââââââââââââââ
â bpi_rank â bpi â conference_id â team_ref â
â --- â --- â --- â --- â
â f64 â f64 â i64 â str â
ââââââââââââĒââââââââââĒââââââââââââââââĒââââââââââââââââââââââââââââââââââĄ
â 1.0 â 38.1724 â 4 â http://sports.core.api.espn.coâĻ â
â 2.0 â 36.4436 â 23 â http://sports.core.api.espn.coâĻ â
â 3.0 â 33.1668 â 23 â http://sports.core.api.espn.coâĻ â
â 4.0 â 32.1685 â 2 â http://sports.core.api.espn.coâĻ â
â 5.0 â 31.8751 â 7 â http://sports.core.api.espn.coâĻ â
â âĻ â âĻ â âĻ â âĻ â
â 8.0 â 28.45 â 23 â http://sports.core.api.espn.coâĻ â
â 9.0 â 26.9175 â 8 â http://sports.core.api.espn.coâĻ â
â 10.0 â 26.1062 â 23 â http://sports.core.api.espn.coâĻ â
â 11.0 â 25.8556 â 23 â http://sports.core.api.espn.coâĻ â
â 12.0 â 25.5795 â 8 â http://sports.core.api.espn.coâĻ â
ââââââââââââ´ââââââââââ´ââââââââââââââââ´ââââââââââââââââââââââââââââââââââ
And espn_wbb_season_powerindex_leaders lists the category leaders â who tops BPI, strength-of-schedule, strength-of-record, and more.
spi_leaders = safe('BPI category leaders', lambda: wbb.espn_wbb_season_powerindex_leaders(season=SEASON))
(spi_leaders.select(['name', 'display_name']).head(10)
if has_rows(spi_leaders) else 'BPI leaders unavailable')
â
BPI category leaders
shape: (9, 2)
âââââââââââââââââââââââââŦââââââââââââââââââââââ
â name â display_name â
â --- â --- â
â str â str â
âââââââââââââââââââââââââĒââââââââââââââââââââââĄ
â bpi â BPI Leader â
â rpirank â NCAAM RPI Leader â
â sospast â SOS Leader â
â sor â SOR Leader â
â bpioffense â BPI Off Leader â
â bpidefense â BPI Def Leader â
â bpisevendaychangerank â 7-Day RK CHG Leader â
â top50bpiwins â Most Quality Wins â
â sosoutofconfpast â Non-Conf SOS Leader â
âââââââââââââââââââââââââ´ââââââââââââââââââââââ
đ Standings & conferencesâ
espn_wbb_standings returns one wide row per team â records, win %, points for/against, and conference membership. espn_wbb_conferences lists the conference groups with their group_ids (handy for filtering).
standings = safe('2025 standings', lambda: wbb.espn_wbb_standings(season=SEASON))
(standings.select(['team_display_name', 'conference_abbreviation', 'wins', 'losses', 'win_percent', 'points_for', 'points_against'])
.sort('win_percent', descending=True, nulls_last=True).head(10)
if has_rows(standings) else 'standings unavailable')
â
2025 standings
shape: (10, 7)
âââââââââââââââââââââŦâââââââââââââââââââŦâââââââŦâââââââââŦââââââââââââââŦâââââââââââââŦâââââââââââââââââ
â team_display_name â conference_abbre â wins â losses â win_percent â points_for â points_against â
â --- â viation â --- â --- â --- â --- â --- â
â str â --- â i64 â i64 â f64 â f64 â f64 â
â â str â â â â â â
âââââââââââââââââââââĒâââââââââââââââââââĒâââââââĒâââââââââĒââââââââââââââĒâââââââââââââĒâââââââââââââââââĄ
â Florida Gulf â ASUN â 18 â 0 â 1.0 â 1367.0 â 983.0 â
â Coast Eagles â â â â â â â
â UConn Huskies â bige â 18 â 0 â 1.0 â 1480.0 â 866.0 â
â Norfolk State â meac â 14 â 0 â 1.0 â 1145.0 â 747.0 â
â Spartans â â â â â â â
â Fairleigh â neast â 16 â 0 â 1.0 â 1086.0 â 805.0 â
â Dickinson Knights â â â â â â â
â South Dakota â summ â 16 â 0 â 1.0 â 1258.0 â 933.0 â
â State Jackrabbits â â â â â â â
â James Madison â belt â 18 â 0 â 1.0 â 1358.0 â 1072.0 â
â Dukes â â â â â â â
â Grand Canyon â wac â 16 â 0 â 1.0 â 1219.0 â 894.0 â
â Lopes â â â â â â â
â Green Bay Phoenix â hor â 19 â 1 â 0.95 â 1408.0 â 1037.0 â
â Fairfield Stags â maac â 19 â 1 â 0.95 â 1498.0 â 1034.0 â
â SE Louisiana Lady â land â 19 â 1 â 0.95 â 1330.0 â 1013.0 â
â Lions â â â â â â â
âââââââââââââââââââââ´âââââââââââââââââââ´âââââââ´âââââââââ´ââââââââââââââ´âââââââââââââ´âââââââââââââââââ
conferences = safe('conferences', wbb.espn_wbb_conferences)
(conferences.select(['group_id', 'name', 'abbreviation', 'short_name']).head(12)
if has_rows(conferences) else 'conferences unavailable')
â
conferences
shape: (12, 4)
ââââââââââââŦââââââââââââââââââââââââââââŦâââââââââââââââŦâââââââââââââ
â group_id â name â abbreviation â short_name â
â --- â --- â --- â --- â
â str â str â str â str â
ââââââââââââĒââââââââââââââââââââââââââââĒâââââââââââââââĒâââââââââââââĄ
â null â NCAA Division I â NCAA â null â
â null â America East Conference â aeast â null â
â null â American Conference â American â null â
â null â Atlantic 10 Conference â atl10 â null â
â null â Atlantic Coast Conference â acc â null â
â âĻ â âĻ â âĻ â âĻ â
â null â Big East Conference â bige â null â
â null â Big Sky Conference â bsky â null â
â null â Big South Conference â bsou â null â
â null â Big Ten Conference â big10 â null â
â null â Big West Conference â bigw â null â
ââââââââââââ´ââââââââââââââââââââââââââââ´âââââââââââââââ´âââââââââââââ
đŗ Cookbook: common WBB tasksâ
Now the fun part â real tasks you'll reach for constantly, each built on the premium functions above. The load_wbb_* loaders below read pre-built parquet releases from wehoop-wbb-data, so they're fast and reliable year-round. We base most season-wide recipes on 2024 because that release is fully published; swap the season once newer parquet drops.
First, pull the three season-long parquet releases we'll lean on across the Cookbook â player boxscores, team boxscores, and play-by-play for 2024. One load, many recipes.
player_box = wbb.load_wbb_player_boxscore(seasons=[2024])
team_box = wbb.load_wbb_team_boxscore(seasons=[2024])
season_pbp = wbb.load_wbb_pbp(seasons=[2024])
print('player_box:', player_box.shape, '| team_box:', team_box.shape, '| pbp:', season_pbp.shape)
player_box: (167412, 55) | team_box: (11796, 56) | pbp: (1908679, 61)
Recipe 1 â Win-probability ride of a championship đâ
espn_wbb_game_probabilities returns ESPN's play-by-play win-probability snapshots for a game. Let's watch how UConn's win odds evolved through the 2025 title game (event 401746075).
wp = safe('win probability', lambda: wbb.espn_wbb_game_probabilities(event_id=401746075))
if has_rows(wp):
ride = wp.select(['sequence_number', 'home_win_percentage', 'away_win_percentage', 'tie_percentage'])
print('snapshots:', ride.height,
'| opening home win%:', round(float(ride['home_win_percentage'][0]) * 100, 1),
'| final home win%:', round(float(ride['home_win_percentage'][-1]) * 100, 1))
out = ride.head(6)
else:
out = 'win probability unavailable'
out
â
win probability
snapshots: 300 | opening home win%: 42.9 | final home win%: 2.1
shape: (6, 4)
âââââââââââââââââââŦââââââââââââââââââââââŦââââââââââââââââââââââŦâââââââââââââââââ
â sequence_number â home_win_percentage â away_win_percentage â tie_percentage â
â --- â --- â --- â --- â
â str â f64 â f64 â f64 â
âââââââââââââââââââĒââââââââââââââââââââââĒââââââââââââââââââââââĒâââââââââââââââââĄ
â 113521784 â 0.429 â 0.571 â 0.0 â
â 113521785 â 0.416 â 0.584 â 0.0 â
â 113521801 â 0.468 â 0.532 â 0.0 â
â 113521802 â 0.473 â 0.527 â 0.0 â
â 113521803 â 0.514 â 0.486 â 0.0 â
â 113521804 â 0.474 â 0.526 â 0.0 â
âââââââââââââââââââ´ââââââââââââââââââââââ´ââââââââââââââââââââââ´âââââââââââââââââ
Recipe 2 â BPI matchup preview for a game đŽâ
espn_wbb_game_predictor gives ESPN's BPI-based projection for a single game â matchup quality, projected game score, and each side's predicted point total. Here's the championship preview.
pred = safe('game predictor (BPI)', lambda: wbb.espn_wbb_game_predictor(event_id=401746075))
if has_rows(pred):
home_stats = pred['home_team_statistics'][0]
if isinstance(home_stats, str): # arrives as a Python-repr string
home_stats = ast.literal_eval(home_stats)
preview = pl.DataFrame([
{'stat': s.get('displayName'), 'value': s.get('displayValue')}
for s in home_stats if isinstance(s, dict)
])
out = preview.head(10)
else:
out = 'predictor unavailable'
out
â
game predictor (BPI)
shape: (8, 2)
âââââââââââââââââââââŦââââââââ
â stat â value â
â --- â --- â
â str â str â
âââââââââââââââââââââĒââââââââĄ
â MATCHUP QUALITY â 99.0 â
â GAME SCORE â â
â WIN PROB â 42.9% â
â PRED PT DIFF â -1.9 â
â OPPONENT WIN PROB â 57.1% â
â WIN PROB â 42.9 â
â OPPONENT WIN PROB â 57.1 â
â null â 0.0 â
âââââââââââââââââââââ´ââââââââ