feat(03-02): add NWSL to canonicalization pipeline

- Import NWSL_TEAMS from nwsl module
- Add NWSL_DIVISIONS dict (single league structure, no divisions)
- Add NWSL to sport_mappings for team canonicalization
- Add NWSL team abbreviation aliases (ANG, GOTHAM, NCC, BAY, etc.)
- Add NWSL stadium aliases (CPKC Stadium, SeatGeek Stadium, WakeMed, etc.)

Total teams: 180 (13 NWSL teams added)
Final breakdown: NBA(30) + MLB(30) + NHL(32) + NFL(32) + MLS(30) + WNBA(13) + NWSL(13)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-10 09:43:18 -06:00
parent 285bc075d7
commit 81f620defe
3 changed files with 42 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ from typing import Optional
from scrape_schedules import NBA_TEAMS, MLB_TEAMS, NHL_TEAMS, NFL_TEAMS
from mls import MLS_TEAMS
from wnba import WNBA_TEAMS
from nwsl import NWSL_TEAMS
# =============================================================================
@@ -270,6 +271,23 @@ WNBA_DIVISIONS = {
'WAS': ('wnba', None),
}
NWSL_DIVISIONS = {
# NWSL has no divisions (single league structure)
'LA': ('nwsl', None), # Angel City FC
'SJ': ('nwsl', None), # Bay FC
'CHI': ('nwsl', None), # Chicago Red Stars
'HOU': ('nwsl', None), # Houston Dash
'KC': ('nwsl', None), # Kansas City Current
'NJ': ('nwsl', None), # NJ/NY Gotham FC
'NC': ('nwsl', None), # North Carolina Courage
'ORL': ('nwsl', None), # Orlando Pride
'POR': ('nwsl', None), # Portland Thorns FC
'SEA': ('nwsl', None), # Seattle Reign FC
'SD': ('nwsl', None), # San Diego Wave FC
'UTA': ('nwsl', None), # Utah Royals FC
'WAS': ('nwsl', None), # Washington Spirit
}
# =============================================================================
# FUZZY MATCHING
@@ -430,6 +448,7 @@ def canonicalize_teams(
'NFL': NFL_DIVISIONS,
'MLS': MLS_DIVISIONS,
'WNBA': WNBA_DIVISIONS,
'NWSL': NWSL_DIVISIONS,
}.get(sport, {})
for abbrev, info in team_mappings.items():
@@ -505,6 +524,7 @@ def canonicalize_all_teams(
('NFL', NFL_TEAMS),
('MLS', MLS_TEAMS),
('WNBA', WNBA_TEAMS),
('NWSL', NWSL_TEAMS),
]
for sport, team_map in sport_mappings: