How shaanbarca/sez-renewable-energy-dashboard works
The SEZ Renewable Energy Dashboard combines a geospatial data pipeline, renewable-energy competitiveness modeling, a FastAPI service, and a React dashboard. Analysts explore sites on a map, adjust assumptions, and inspect scorecards, detailed site analyses, and energy visualizations. The README establishes the main pipeline-to-API-to-frontend architecture and product capabilities; source-index references and excerpts support selected internal links. Some feature implementations were not sampled, so their internal connections are omitted.
Main entry points: main.py FastAPI application · scorecard.py Live scorecard · App.tsx Dashboard application · dashboard.ts Dashboard state and recomputation
Components 20
Data pipeline
- Pipeline orchestration
run_pipeline.py - Site resources and buildability
src/pipeline/build_fct_site_resource.py - Site and grid fact builders
src/pipeline - Processed tables
Analytical model
- Competitiveness model
src/model/basic_model.py - Live scorecard
src/dash/logic/scorecard.py - Per-site context
src/dash/logic/site_context.py - Model assumptions
src/assumptions.py
API backend
- FastAPI application
src/api/main.py - Scorecard endpoint
src/api/routes/scorecard.py - Map and site endpoints
src/api/routes/layers.py - Geospatial layer preparation
src/dash/map_layers.py
Frontend state
- Dashboard state and recomputation
frontend/src/store/dashboard.ts - API client
frontend/src/lib/api.ts
Dashboard experience
- Dashboard application
frontend/src/App.tsx - Interactive map
frontend/src/components/map/MapView.tsx - Assumptions and site analysis
frontend/src/components/panels - Charts and scorecard views
frontend/src/components/charts
Other components
- Analyst
- Geospatial and source data
Connections 23
- Analyst → Dashboard application: explores
README.md - Geospatial and source data → Pipeline orchestration: supplies data
README.md - Pipeline orchestration → Site resources and buildability: runs builder
run_pipeline.py - Pipeline orchestration → Site and grid fact builders: runs builders
run_pipeline.py - Site resources and buildability → Processed tables: writes results
- Site and grid fact builders → Processed tables: writes tables
README.md - Processed tables → FastAPI application: loads at startup
README.md - FastAPI application → Scorecard endpoint: mounts routes
src/api/main.py - FastAPI application → Map and site endpoints: mounts routes
src/api/main.py - FastAPI application → Geospatial layer preparation: uses layers
src/api/main.py - Scorecard endpoint → Live scorecard: recomputes scorecard
src/api/routes/scorecard.py - Live scorecard → Per-site context: assembles site context
src/dash/logic/scorecard.py - Live scorecard → Competitiveness model: uses model logic
src/dash/logic/scorecard.py - Per-site context → Competitiveness model: computes grid context
src/dash/logic/site_context.py - Live scorecard → Model assumptions: uses assumptions
src/dash/logic/scorecard.py - Dashboard application → Dashboard state and recomputation: initializes state
frontend/src/App.tsx - Dashboard application → Interactive map: renders map
frontend/src/App.tsx - Dashboard application → Assumptions and site analysis: renders panels
frontend/src/App.tsx - Dashboard state and recomputation → API client: requests data
frontend/src/store/dashboard.ts - API client → FastAPI application: calls API
README.md - Map and site endpoints → Geospatial layer preparation: serves map layers
src/api/routes/layers.py - Interactive map → Dashboard state and recomputation: reads map state
frontend/src/components/map/MapView.tsx - Dashboard state and recomputation → Charts and scorecard views: supplies scorecard data