spec: add Phase 6 post-review enhancements

Data coverage expansion (80-120 DCs, power plants, SE grid regions,
2yr backfill), map UX overhaul (dark mode, legend, floating labels,
Chapel Hill center), chart fixes, GPU calculator update, granular
Suspense boundaries for navigation performance.
This commit is contained in:
Joey Eamigh 2026-02-11 14:37:43 -05:00
parent 3edb69848d
commit deb1cdc527
No known key found for this signature in database
GPG Key ID: CE8C05DFFC53C9CB

112
SPEC.md
View File

@ -458,3 +458,115 @@ The Reviewer and Tester agents enforce this on every task. This is the real test
- [ ] Loading states (`loading.tsx`) + error boundaries (`error.tsx`)
- [ ] Disclaimer footer (educational/informational purposes, not financial advice)
- [ ] README with installation and setup docs
## Phase 6: Post-Review Enhancements
Based on comprehensive review and user feedback, the following enhancements address data coverage gaps, map UX improvements, chart fixes, and navigation performance.
### 6.1 Data Coverage Expansion
#### Datacenter Inventory (Target: 80-120 facilities)
The current 38 datacenters are insufficient. Expand to comprehensive US coverage:
- **North Carolina** (CRITICAL — this is a UNC Chapel Hill project): Add 10+ facilities including Apple Maiden, Google Lenoir, Microsoft Catawba County, AWS Richmond County ($10B campus), Digital Realty Charlotte, Compass Durham, Compass Statesville, T5 Kings Mountain, DartPoints Asheville, American Tower Raleigh.
- **Missing hyperscaler campuses**: Meta has 20+ US campuses (we have 5), Google has 23 (we have 5), AWS has hundreds (we have 5), Microsoft has 34+ (we have 6). Add at least the major 500+ MW campuses.
- **Missing operators**: Apple (5 US campuses), Cloudflare (37+ US edge locations), Switch (Las Vegas, Reno), Vantage (NoVA, Santa Clara), Compass, Stack Infrastructure, EdgeCore, T5.
- **Geographic gaps**: Fill Southeast (SC, TN, FL, KY, AL), Northwest (WA, ID), and Midwest (NE, WI, MN).
- **Sources**: Meta datacenter page (atmeta.com), Google datacenter page, DataCenterMap.com, Baxtel.com, press releases for 2024-2025 announcements, IM3 Open Source Data Center Atlas (DOE/PNNL).
#### Power Plant Data (NEW)
Add US power plants to the map from the EIA US Energy Atlas:
- **Source**: https://atlas.eia.gov/datasets/eia::power-plants/about — GeoJSON download
- **Filter**: Plants >= 50 MW nameplate capacity
- **Fields**: name, operator, fuel type, capacity MW, latitude, longitude, state
- **Schema**: New `power_plants` table in Prisma schema with `location` geography column
- **Map display**: Smaller markers (distinct from datacenters) colored by fuel type, with a different shape (e.g., diamond or triangle)
- **Seed**: Download, filter, and load into `data/power-plants.geojson`, add to seed script
#### Southeast Grid Regions (NEW)
The Southeast US has no ISO/RTO — it's served by vertically integrated utilities. Add these as grid regions:
- **DUKE** (Duke Energy Carolinas + Progress): NC/SC focus, EIA respondent codes DUK and CPLE
- **SOCO** (Southern Company): GA/AL, EIA respondent code SOCO
- **TVA** (Tennessee Valley Authority): TN and surrounding states, EIA respondent code TVA
- Requires approximate boundary polygons in `data/grid-regions.geojson`
- Add state-to-region mappings for retail price data
- Add to backfill respondent code list
#### Historical Data Depth
Extend the backfill window from 6 months to 2 years:
- EIA hourly demand data is available back to July 2015
- EIA monthly retail prices back to January 2001
- FRED commodity prices back to the 1990s
- 2 years captures the full AI boom narrative (GPT-3 June 2020, ChatGPT Nov 2022, GPT-4 March 2023)
- For chart performance, pre-aggregate to daily for data older than 3 months
### 6.2 Map UX Overhaul
#### Default Center and Zoom
- Center on Chapel Hill, NC: `{ lat: 35.9132, lng: -79.0558 }`
- Zoom level 6 (shows NC, VA, SC, GA, TN — the most data-dense region)
#### Dark Mode (2 prop changes)
- Add `colorScheme={ColorScheme.DARK}` to the `<Map>` component (Google's built-in dark theme)
- Set `disableDefaultUI={true}` to hide streetview, fullscreen, map type controls (copyright stays)
- Import `ColorScheme` from `@vis.gl/react-google-maps`
#### Map Legend (NEW component)
Create `src/components/map/map-legend.tsx`:
- Position: absolute bottom-right of map container
- Price color gradient bar: blue → cyan → yellow → red with tick labels ($0, $20, $50, $100+/MWh)
- Marker size scale: 3-4 circles with MW labels (50, 200, 500 MW)
- Pulsing indicator explanation
- Grid stress glow explanation
- Style: zinc-900/90 bg, backdrop-blur, matching existing map controls panel
#### Floating Region Price Labels (NEW)
Render `AdvancedMarker` at each region's centroid showing:
- Region code (PJM, ERCOT, etc.)
- Current average price ($XX.XX/MWh)
- Small colored border matching heatmap color
- This is the single highest-impact change for map readability
#### Breathing Animation Tuning
- Slow the breathing period from 0.5-1.25s to 6-8s (0.125 Hz)
- Only breathe regions where demand/capacity > 85% (stressed) — calm regions stay static
- Reduce animation interval from 50ms to 200ms (5 FPS)
- Reduce amplitude to very subtle (+/- 0.03 to 0.07)
#### Enhanced Datacenter Markers
- Show capacity (MW) label inside markers >= 200 MW
- Different visual treatment by status: operational (solid), under construction (dashed border), planned (hollow ring)
- Lower pulsing threshold already applied (3%)
### 6.3 Chart Fixes
#### Generation Chart Timestamp Fix
- Change X-axis `dataKey` from `dateLabel` (time-only, duplicates across days) to `timestamp` (unique epoch ms)
- Add context-aware `tickFormatter`: 24h shows "3 PM", 7d/30d shows "Jan 15 3PM", 90d/1y shows "Jan 15"
- Update tooltip `labelFormatter` to include full date + time
#### Correlation Chart Dark Theme Labels
- Add `fill: 'hsl(var(--muted-foreground))'` to XAxis and YAxis `tick` props
- Currently defaults to `#666666` which is invisible on dark background
### 6.4 GPU Calculator Update
#### Default GPU Model
- Change default from H100 SXM to B200 (1,000W TDP)
- B200 is the current-gen datacenter GPU most customers are deploying
#### NVIDIA R200 (Rubin) — Add if specs confirmed
- Announced at GTC 2025: 1,800W TDP
- Recent reports suggest revised to 2,300W TDP
- Add as "R200 (Rubin)" at 1,800W (official announced spec)
- 288 GB HBM4, NVLink 6, 2H2026 availability
### 6.5 Navigation Performance
#### Granular Suspense Boundaries
Replace full-page loading skeletons with per-section Suspense boundaries:
- Extract each data-fetching section into its own async Server Component
- Wrap each in `<Suspense fallback={<SectionSkeleton />}>`
- Page shell (headers, layout, tabs) renders instantly
- Individual sections stream in as data resolves
- Apply to all 5 pages: dashboard, map, trends, demand, generation