diff --git a/Scripts/canonicalize_games.py b/Scripts/canonicalize_games.py index 5becb4e..489a2c5 100644 --- a/Scripts/canonicalize_games.py +++ b/Scripts/canonicalize_games.py @@ -109,6 +109,14 @@ TEAM_ABBREV_ALIASES = { ('MLS', 'FCD'): 'team_mls_dal', # FC Dallas ('MLS', 'MON'): 'team_mls_mtl', # Montreal ('MLS', 'LAF'): 'team_mls_lafc', # LAFC alt + + # WNBA + ('WNBA', 'LV'): 'team_wnba_lva', # Las Vegas Aces + ('WNBA', 'LAS'): 'team_wnba_la', # LA Sparks + ('WNBA', 'NYL'): 'team_wnba_ny', # New York Liberty + ('WNBA', 'PHX'): 'team_wnba_pho', # Phoenix Mercury + ('WNBA', 'CONN'): 'team_wnba_con', # Connecticut Sun + ('WNBA', 'WSH'): 'team_wnba_was', # Washington Mystics } diff --git a/Scripts/canonicalize_stadiums.py b/Scripts/canonicalize_stadiums.py index a27e3bb..2ae0217 100644 --- a/Scripts/canonicalize_stadiums.py +++ b/Scripts/canonicalize_stadiums.py @@ -233,6 +233,20 @@ HISTORICAL_STADIUM_ALIASES = { {'alias_name': 'lower.com field', 'valid_from': '2021-07-01'}, # Current name with period {'alias_name': 'new crew stadium', 'valid_from': '2021-07-01', 'valid_until': '2021-07-01'}, ], + + # WNBA (most share NBA/NHL arenas with existing aliases; these are WNBA-specific arenas) + 'stadium_wnba_michelob_ultra_arena': [ + {'alias_name': 'mandalay bay events center', 'valid_from': '1999-03-01', 'valid_until': '2021-01-01'}, + ], + 'stadium_wnba_gateway_center_arena': [ + # Gateway Center Arena opened 2018, WNBA-specific venue + ], + 'stadium_wnba_wintrust_arena': [ + # Wintrust Arena opened 2017, WNBA-specific venue + ], + 'stadium_wnba_college_park_center': [ + # College Park Center opened 2012, university venue + ], } diff --git a/Scripts/canonicalize_teams.py b/Scripts/canonicalize_teams.py index 1a3676e..c1071d0 100644 --- a/Scripts/canonicalize_teams.py +++ b/Scripts/canonicalize_teams.py @@ -20,6 +20,7 @@ from typing import Optional # Import team mappings from scraper from scrape_schedules import NBA_TEAMS, MLB_TEAMS, NHL_TEAMS, NFL_TEAMS from mls import MLS_TEAMS +from wnba import WNBA_TEAMS # ============================================================================= @@ -252,6 +253,23 @@ MLS_DIVISIONS = { 'VAN': ('mls_western', None), } +WNBA_DIVISIONS = { + # WNBA has no divisions (single league structure) + 'ATL': ('wnba', None), + 'CHI': ('wnba', None), + 'CON': ('wnba', None), + 'DAL': ('wnba', None), + 'GSV': ('wnba', None), + 'IND': ('wnba', None), + 'LVA': ('wnba', None), + 'LA': ('wnba', None), + 'MIN': ('wnba', None), + 'NY': ('wnba', None), + 'PHO': ('wnba', None), + 'SEA': ('wnba', None), + 'WAS': ('wnba', None), +} + # ============================================================================= # FUZZY MATCHING @@ -402,7 +420,7 @@ def canonicalize_teams( warnings = [] # Determine arena key based on sport - arena_key = 'arena' if sport in ['NBA', 'NHL'] else 'stadium' + arena_key = 'arena' if sport in ['NBA', 'NHL', 'WNBA'] else 'stadium' # Get division structure division_map = { @@ -411,6 +429,7 @@ def canonicalize_teams( 'NHL': NHL_DIVISIONS, 'NFL': NFL_DIVISIONS, 'MLS': MLS_DIVISIONS, + 'WNBA': WNBA_DIVISIONS, }.get(sport, {}) for abbrev, info in team_mappings.items(): @@ -485,6 +504,7 @@ def canonicalize_all_teams( ('NHL', NHL_TEAMS), ('NFL', NFL_TEAMS), ('MLS', MLS_TEAMS), + ('WNBA', WNBA_TEAMS), ] for sport, team_map in sport_mappings: