This project develops a spatiotemporal climate forecasting system using Graph Neural Networks and Deep Learning models. The objective is to improve forecasting accuracy by modeling both temporal climate patterns and spatial relationships among geographically distributed sensors.
Traditional forecasting methods often ignore interactions between neighboring locations. This project addresses that limitation by representing climate sensors as nodes in a graph and applying Graph Neural Networks to capture spatial dependencies.
The project implements and compares multiple forecasting approaches:
- ARIMA
- LSTM
- Graph Convolutional Network (GCN)
- Graph Attention Network (GAT)
- Hybrid GCN-LSTM
The hybrid GCN-LSTM architecture combines graph-based spatial learning with temporal sequence modeling to achieve the strongest forecasting performance.
Live API URL
https://gnn-climate-forecast.onrender.com
Swagger UI
https://gnn-climate-forecast.onrender.com/docs
ReDoc Documentation
https://gnn-climate-forecast.onrender.com/redoc
| Method | Endpoint | Description |
|---|---|---|
| GET | / | Project Information |
| GET | /health | Health Check |
| POST | /predict | Climate Prediction |
Accurate climate forecasting has significant real-world applications:
- Disaster preparedness and early warning systems
- Agricultural planning and crop management
- Water resource optimization
- Energy demand forecasting
- Climate resilience and sustainability initiatives
This project demonstrates how modern Graph AI techniques can support environmental intelligence systems and improve forecasting reliability.
Most forecasting models treat climate observations independently. However, climate sensors naturally form a connected network where nearby locations influence each other.
Graph Neural Networks provide a mechanism to model these relationships directly. By incorporating geographic structure into the forecasting process, the model can learn both local and global climate patterns that traditional methods often miss.
The dataset contains climate-related measurements such as:
- Temperature
- Humidity
- Rainfall
Data preprocessing includes:
- Missing value handling
- Feature normalization
- Time-series sequence generation
A K-Nearest Neighbor (KNN) graph is constructed where:
- Nodes represent climate sensors
- Edges represent geographic proximity
The following models were implemented and evaluated:
- ARIMA
- LSTM
- GCN
- GAT
- GCN-LSTM
Performance is evaluated using:
- Root Mean Squared Error (RMSE)
- Mean Absolute Error (MAE)
- Prediction vs Actual Analysis
| Model | RMSE |
|---|---|
| ARIMA | 4.81 |
| LSTM | 30.28 |
| GCN | 1.79 |
| GAT | 0.80 |
| GCN-LSTM | 0.61 |
- GCN-LSTM
- GAT
- GCN
- ARIMA
- LSTM
The GCN-LSTM architecture combines two complementary learning mechanisms.
Captures:
- Spatial relationships between sensors
- Geographic dependencies
- Neighbor-to-neighbor climate interactions
Captures:
- Temporal dependencies
- Historical climate trends
- Sequential forecasting patterns
By jointly learning spatial and temporal information, GCN-LSTM significantly improves forecasting accuracy compared to traditional statistical and standalone deep learning models.
The project generates multiple evaluation visualizations.
Visual representation of climate sensor connectivity.
Comparison between observed and forecasted climate values.
Performance comparison across all forecasting models.
REST API endpoints:
- GET /
- GET /health
- POST /predict
Containerized deployment for reproducibility and portability.
The forecasting API is deployed on Render and publicly accessible through a production endpoint.
Features:
- Public REST API
- Interactive Swagger Documentation
- Health Monitoring Endpoint
- Containerized Deployment
- Continuous Deployment via GitHub
{
"temperature": 45,
"humidity": 79,
"rainfall": 25
}{
"temperature": 45,
"humidity": 79,
"rainfall": 25,
"predicted_value": 51.2
}gnn-climate-forecast/
├── configs/
├── data/
│ └── raw/
├── deployment/
│ ├── app.py
│ └── Dockerfile
├── results/
├── src/
├── tests/
├── .gitignore
├── README.md
└── requirements.txt
The project includes validation and testing components for:
- Data preprocessing
- Graph construction
- Model execution
- Training pipeline verification
- API endpoint testing
Potential future enhancements include:
- Transformer-based climate forecasting
- Dynamic graph learning
- Real-time streaming climate data
- Explainable AI for climate decision support
- Multi-region forecasting systems
- Large-scale environmental intelligence systems
- Python
- FastAPI
- Graph Neural Networks (GCN, GAT)
- Deep Learning
- LSTM Networks
- PyTorch
- Docker
- REST API Development
- Machine Learning Evaluation
- Data Visualization
- Git & GitHub
- Cloud Deployment (Render)
- Developed a hybrid GCN-LSTM model for climate forecasting, outperforming traditional forecasting baselines.
- Implemented Graph Neural Network architectures including GCN and GAT for spatial-temporal climate modeling.
- Built an end-to-end forecasting pipeline covering data preprocessing, graph construction, model training, evaluation, and deployment.
- Designed and deployed a production-ready FastAPI service with interactive API documentation.
- Containerized the application using Docker and deployed it on Render Cloud for public access.
Sakshi Mavani
Data Science & Machine Learning Enthusiast
GitHub: https://github.com/sakshi-mavani
Project Repository: https://github.com/sakshi-mavani/gnn-climate-forecast