Skip to content

PAkash7/SolarCast-India

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

SolarCast-India — Hackathon-Ready Prototype (Python + Streamlit)

By Akash Pandey

A polished end-to-end solar forecasting demo that predicts intensity (irradiance & AC kW) over regions and sites, with uncertainty bands and an aesthetic Streamlit UI. It runs fully offline using simulated satellite/NWP data so you can demo anywhere, then swap in real feeds later.

Features

  • Regional heatmaps (tile-level) for the next 6 hours (nowcast) and 48 hours (blend).
  • Site-level power forecasts with P10/P50/P90 bands → convert irradiance to AC power with pvlib (falls back gracefully if missing).
  • Model monitor: rolling MAE/CRPS on synthetic "truth" to showcase MLOps thinking.
  • Upload your plant config (CSV) or use sample plants.
  • Architecture set up for easy swap-in of real INSAT/NWP data and advanced models.

Quickstart

# 1) Create & activate a venv (recommended)
python -m venv .venv && source .venv/bin/activate  # Windows: .venv\Scripts\activate

# 2) Install dependencies
pip install -r requirements.txt

# 3) Run the app
streamlit run app.py

Open the local URL from Streamlit.

Project Structure

solar_forecast_hackathon/By Akash Pandey
├─ app.py                       # Streamlit app (multi-page style in one file)
├─ requirements.txt
├─ config.yaml                  # App/theme/config toggles
├─ data/
│  ├─ sample_sites.csv          # Example sites (lat/lon/tilt/azimuth/size)
│  └─ simulate.py               # Synthetic satellite/NWP + truth generator
├─ models/
│  ├─ nowcast.py                # Lightweight cloud-field nowcaster
│  ├─ blend.py                  # Blend nowcast + "NWP-like" medium-term + calibration
│  └─ uncertainty.py            # Quantile generation & reliability calibration
├─ pv/
│  └─ pvlib_wrap.py             # AC conversion (pvlib PVWatts; with safe fallback)
├─ utils/
│  ├─ geo.py                    # Regional grid/tiling helpers
│  ├─ schema.py                 # Data schemas & validators
│  └─ theming.py                # UI theme helpers
└─ README.md

Swap in Real Data (later)

  • Replace data/simulate.py providers with INSAT-3D/3DR cloud products and NWP (ECMWF/GFS/IMD).
  • Keep the same interfaces so models/nowcast.py and models/blend.py continue to work.
  • Use the pv/pvlib_wrap.py as the single place to convert irradiance → AC.

Good luck — Akash Pandey


Running the API

uvicorn backend.api:app --reload --port 8000

Try:

curl http://localhost:8000/health
curl "http://localhost:8000/tiles/forecast?horizon=blend&minutes=720"
curl -X POST "http://localhost:8000/site/forecast?horizon=nowcast&minutes=360"   -H "Content-Type: application/json"   -d '{"lat":26.9,"lon":75.8,"tilt":15,"azimuth":180,"dc_kw":1000,"inv_kw":900}'

About

Hackathon-Ready Prototype (Python + Streamlit) By Akash Pandey

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages