Phase 2: Stadium Foundation - 2 plans created - 5 total tasks defined - Ready for execution Plan 02-01: Audit & complete hardcoded stadium data Plan 02-02: Regenerate canonical data and verify pipeline Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6.2 KiB
phase, plan, type
| phase | plan | type |
|---|---|---|
| 02-stadium-foundation | 02 | execute |
Purpose: Ensure hardcoded stadium data flows correctly through canonicalization to bundled JSON. Output: Updated bundled stadiums_canonical.json with complete data for all 4 sports.
<execution_context> ~/.claude/get-shit-done/workflows/execute-phase.md ~/.claude/get-shit-done/templates/summary.md ~/.claude/get-shit-done/references/checkpoints.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/02-stadium-foundation/02-01-SUMMARY.mdKey files: @Scripts/scrape_schedules.py @Scripts/run_canonicalization_pipeline.py @Scripts/canonicalize_stadiums.py
Pipeline flow:
scrape_schedules.py --stadiums-updatecallsscrape_all_stadiums()→data/stadiums.jsonrun_canonicalization_pipeline.pyreads stadiums.json → canonicalizes →data/stadiums_canonical.json- Copy to
SportsTime/Resources/stadiums_canonical.json
Expected output:
- stadiums_canonical.json with all fields populated: canonical_id, name, city, state, latitude, longitude, capacity, sport, primary_team_abbrevs, year_opened
- stadium_aliases.json with historical name mappings
- Stadium counts: MLB:30, NBA:30, NHL:32, NFL:30 = 122 core stadiums
Pre-requisites:
- Plan 02-01 complete (year_opened added to all modules)
If errors occur, debug and fix before proceeding. Common issues:
- Import errors: Check module paths and init.py
- Missing fields: Verify Stadium dataclass in core.py ls -la data/stadiums*.json && cat data/stadiums_canonical.json | python3 -c "import json,sys; d=json.load(sys.stdin); print(f'Total: {len(d)}'); sports={}; [sports.setitem(s['sport'], sports.get(s['sport'],0)+1) for s in d]; print(sports)" stadiums_canonical.json exists with MLB:30, NBA:30, NHL:32, NFL:30 stadiums
-
Verify data completeness by checking sample records:
- All state fields populated (not empty string)
- All capacity fields > 0
- All year_opened fields not null
- All lat/lng reasonable (US coordinates: lat 24-49, lng -125 to -66)
-
If any fields empty, trace back to source:
- Check raw stadiums.json has the field
- Check canonicalize_stadiums.py preserves the field
- Fix the break in the chain cat SportsTime/Resources/stadiums_canonical.json | python3 -c "import json,sys; d=json.load(sys.stdin); empty_state=sum(1 for s in d if not s.get('state')); zero_cap=sum(1 for s in d if not s.get('capacity')); null_year=sum(1 for s in d if s.get('year_opened') is None); print(f'Empty state: {empty_state}, Zero capacity: {zero_cap}, Null year: {null_year}')" Bundled JSON has 0 empty states, 0 zero capacities, 0 null year_opened values
<success_criteria>
- Pipeline completes successfully
- All stadium fields populated (no empty state, zero capacity, or null year_opened)
- Bundled JSON has correct stadium counts for MLB, NBA, NHL, NFL
- Phase 2 complete: Stadium Foundation established </success_criteria>
Phase 2 Plan 02: Pipeline Regeneration & Verification Summary
[Substantive one-liner]
Accomplishments
- [Pipeline executed successfully]
- [Bundled JSON updated with complete data]
Files Created/Modified
data/stadiums.json- Raw stadium datadata/stadiums_canonical.json- Canonical outputdata/stadium_aliases.json- Historical aliasesSportsTime/Resources/stadiums_canonical.json- Bundled canonical dataSportsTime/Resources/stadium_aliases.json- Bundled aliases
Decisions Made
[Any decisions about included sports, data sources]
Issues Encountered
[Any pipeline issues and fixes]
Phase 2 Complete
Phase 2: Stadium Foundation is complete:
- All 4 core sports have complete stadium data
- Data includes: canonical_id, name, city, state, lat/lng, capacity, year_opened, teams
- Historical aliases in place for renamed stadiums
- Ready for Phase 3: Alias Systems