Skip to content

suraj187104/power-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Power Plus (PowerPulse) - Electricity Demand Forecasting

Power Plus is a Flask web app that forecasts hourly electricity demand for six Delhi regions using a lightweight ensemble (XGBoost, LightGBM, Ridge). It pulls hourly weather from Open-Meteo and falls back to seasonal synthetic data if the API is unavailable.

Features

  • 24-hour demand forecasts per selected region
  • Ensemble predictions with a confidence score
  • Weather-driven inputs with automatic fallback data
  • Forecast plot generation saved to static/predicted_demand_plot.png
  • JSON API for single-region predictions

Project layout

app.py                 Flask entry point
app/                   Optional blueprint-based app (not used by app.py)
data/                  Cleaned input datasets
saved_models/           Trained model artifacts (xgb, lgb, ridge)
templates/             HTML templates
static/                Images and generated plots
utils/                 Predictor, weather, and plotting utilities

Quick start

  1. Install dependencies:
    pip install -r requirements.txt
  2. Run the app:
    python app.py
  3. Open: http://localhost:5000

Usage

API

POST http://localhost:5000/api/predict

Request body:

{
  "date": "2026-01-15",
  "region": "DELHI",
  "hour": 12,
  "temperature": 28.0,
  "humidity": 60.0,
  "wind_speed": 2.5
}

Response:

{
  "success": true,
  "prediction": {
    "ensemble": 3125.42,
    "xgb": 3150.12,
    "lgb": 3104.55,
    "ridge": 3008.77,
    "confidence": 0.94
  }
}

Notes

  • Models are loaded from saved_models/. If any model files are missing, the app will fail to start.
  • Weather data uses the Open-Meteo API and requires no API key.
  • Update the SECRET_KEY in app.py before any real deployment.

Contact

About

This project presents an AI-driven hybrid forecasting system that predicts real-time electricity demand and peak load requirements for the Delhi Power System, using both historical load data and weather parameters.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors