WattWindow is an interactive web dashboard that visualizes Balancing Authority (BAA) regions across the United States and provides clean energy EV charging recommendations.
It displays regional grid boundaries, real-time and forecasted emissions, renewable energy share, and the best charging windows for the next 24 hours. The frontend is built using React + TypeScript + Vite, and backed by a Python forecasting pipeline using Prophet models trained on six years of historical energy-generation and weather data.
The map interface includes:
- Selectable BAA regions (e.g., CAL, SOCO, NW, etc.)
- Color-coded emissions intensity layers
- Hover tooltips with energy mix, forecasts, and suggested charging times
- Integration with an API backend serving region stats and forecasts
If you simply want to use Watt Window without installing anything locally:
- Visit the hosted version at: https://wattwindow.vercel.app/
- Explore the interactive BAA map, hover over regions, and view EV charging recommendations.
- All backend data is already live. You can directly hit the API, for example: https://watt-window.vercel.app/api (automatically used by the frontend).
- Replace SE with any region code used in the forecasting pipeline
The backend consists of a fully automated forecasting system that:
- Pulls hourly generation and weather data
- Runs 91 trained Prophet models (13 BAAs × 7 resources each)
- Generates 24-hour forecasts for each resource in each region
- Saves results to Upstash Redis
- Exposes forecasts through a Flask API hosted on Vercel
power_forecasting_main.py
- Downloads 24-hour demand forecasts from the U.S. Energy Information Administration (EIA)
- Retrieves weather and lagged weather data from OpenMeteo
- Cleans and validates incoming data (removing negatives, NaNs, invalid values)
- Loads the correct trained models for the region being processed
- Runs 24-hour forecasts for each energy resource
- Saves results to temporary .json files before they are pushed to Redis
api/index.py
- Flask API endpoint used by the frontend
- Stores JSON outputs in Upstash Redis
- Serves /api/forecast?region_code=XX for any supported region
models/
- Contains all Prophet forecasting models grouped by resource and region
- Some regions do not generate certain resources; the main pipeline handles this automatically
models_training/
- Jupyter notebooks used for training Prophet models (example included for the Southeast region)
- Each notebook pulls historical generation + weather data, cleans it, and trains the resource-specific model
cron.yml
- GitHub Action that runs power_forecasting_main.py daily
- Automatically refreshes Redis with the latest 24-hour forecasts
data-pull+preprocessing.ipynb
- This notebook was used to automate the data pull process for each region.
- The code pulled energy generation data from the EIA (Energy Information Administration) API and weather data from the OpenMeteo API, cleaned and merged the data into one large dataset which was used to train the Prophet models.
- This was only run once in the beginning for each region to pull all the data required to train our models.
- Clone the repository:
git clone https://github.com/JeevanandanRamasamy/EV-Charging-Dashboard.git
cd EV-Charging-Dashboard- Install frontend dependencies:
The React application lives inside the
frontend/directory.
cd frontend
npm install- If you want to run forecasting locally:
Navigate to the
backend/directory and install python dependencies.
pip install -r requirements.txtCreate a .env file in the root directory:
EIA_API_KEY=your_eia_key
UPSTASH_REDIS_REST_URL=your_redis_url
UPSTASH_REDIS_REST_TOKEN=your_redis_token
You won’t have our Redis credentials, so you can instead rely on the live deployed backend: https://watt-window.vercel.app/api/forecast?region_code=SE
Run the Frontend (Local Development)
From the frontend/ directory:
npm run devThis starts the React development server. Open http://localhost:5173 in your browser to view the dashboard.
The frontend will automatically proxy API calls from:
/api/*
→ https://watt-window.vercel.app/api/*
(based on your vite.config.ts proxy configuration).
Run the Backend (Local)
If you have your own keys and want to generate forecasts locally:
python power_forecasting_main.pyThis will produce files like:
power_forecasting_results_SE.json
power_forecasting_results_TEX.json
If you want to serve the API locally using Flask (However, APIs are currently set up to use Upstash database, and so will not run locally without the appropriate credentials):
python api/index.pyInside frontend/:
npm run buildThis creates a production bundle inside frontend/dist/, which can be deployed to Vercel or any static hosting provider. vercel.json is already included for automatic configuration.
Whether running locally or at the hosted URL:
- Hover over different BAA regions on the map to see real-time emissions and energy mix.
- Tooltip shows current emissions / renewables, hourly forecast, and recommended charging windows.
- Use the TimeFilter to adjust the forecast window.
- Watch the map recolor dynamically based on intensity levels.
