Open the demo
1st place, Open Grid DataBase Power × AITX Hackathon 2026

How BaseCast is built

Public grid data in, a ranked call list out. Pipelines, an API and an app over one immutable lake, every number traceable to its file.

sources
35
raw files
2,623
in the lake
3.88 GB
typed tables
119
marts served
31
API endpoints
33
As of September 26, 2026

The stack

Three repos. Every push to main deploys.

Public data 35 sources
ERCOT PUCT EIA Census NOAA TCEQ
basecast-airflow Airflow 3.3 on a GCP VM
raw → process → marts Python 3.12 Polars Gemini reads charts
basecast-get-data FastAPI on Cloud Run
33 endpoints Pydantic 2 Polars in memory OpenAPI 3.1
basecast-app Next.js 16 on Vercel
React 19 Tailwind 4 TanStack Query MapLibre GL
Storage on Google Cloud
GCS lakeRaw files, immutable snapshots
Cloud SQLPostgres + PostGIS, tables and marts
BigQueryThe large time series
Every answer carries its as-of date, model version and caveats.

Data sources

8 of 35 sources, by size on disk.

Load forecastsERCOT
810 MB 88 files
FilingsPUCT
595 MB 562 files
Hourly weatherNOAA
441 MB 564 files
Air permitsTCEQ
359 MB 16 files
Generator queueERCOT
211 MB 227 files
Large-load decksERCOT
73 MB 77 files
Utility salesEIA
59 MB 13 files
Hourly loadERCOT
35 MB 24 files

From raw file to mart

Each format gets its own reader. Everything lands in the same shape.

PDF
ERCOT decks, PUCT filingsText layer parsed; charts read by Gemini, unverified
XLSX
GIS queue, LTLF, CDR, hourly loadHeader found by content; Excel dates and hour 24 fixed
TXT
Census building permitsTwo-line headers read by content, not position
CSV
TCEQ air permits, BLS, PUCT directoriesTyped with Polars; personal data dropped
Typed tables
snake_case, units, UTC Source file and ingest time on every row Postgres, or BigQuery for large series
Marts
Models plus golden checks 31 served, each with as-of and caveats Ready for the API as is

Models

Queue survival

Aalen–Johansen, competing risks
In148 monthly GIS reports, project by project
OutMW of the queue that reaches operation, by county and date

Large-load realization

Realization ratio × approved stock
In60 ERCOT decks, chart values read by Gemini
OutLarge load at the summer peak, P10–P90, by weather zone

Organic peak

Peak ~ year + weather, per zone
InHourly load by weather zone, ERA5 weather
OutThe summer peak without large loads

Peak forecast

Organic + large loads + unattributed
InThe three models above
OutSummer peak to 2030, P10–P90, against LTLF and CDR

Account score

Signals, dated triggers, a rule-based action
InPUCT territories, EIA-861, TCEQ permits, transmission projects, building permits
Out107 accounts: call now, nurture, watch or hold

4CP offer

Four summer peaks, one dispatch window
InERCOT monthly peaks, 15-minute zone load
OutDollars per MW-year a fleet avoids for the co-op

Ops

Observability

  • One run log per pipeline run: status, duration, events
  • An Ops screen with service health, pipelines, requests and logs
  • Every API answer carries its as-of date and caveats

Scalability

  • One thin DAG per source, built by a factory
  • Large series in BigQuery, partitioned by month
  • Marts held in memory; the API scales on Cloud Run

Resilience

  • Raw files immutable, with sha256 manifests
  • Idempotent writes: a rerun never duplicates
  • A failed golden check keeps the last good mart live

Data traps we designed around

Trap Fix
Large loads only as aggregate PDF chartsGemini reads the charts; model stages, not projects
No county-to-weather-zone tableBuilt from ZIP-to-zone and Census ZCTA
GIS headers move, INRs repeatFind the header; dedupe on INR and snapshot
Current-year load file gets overwrittenImmutable snapshots
Hour 24:00 and DST duplicatesNormalized at parse time
2026 LTLF in flux, May CDR skippedEvery vintage versioned
ERCOT API: 30 requests a minute, US onlyThrottle and back off
RTC+B broke the price series in Dec 2025Prices kept out of the MVP