An AI-powered weather forecasting system that predicts weather patterns across Kenya based on El Nino and La Nina (ENSO) conditions, environmental indicators, and machine learning models.
# Kenyan Climate & Weather Prediction System
An AI-powered weather forecasting system that predicts weather patterns across Kenya based on El Nino and La Nina (ENSO) conditions, environmental indicators, and machine learning models.
## System Overview
This system combines climate science, machine learning, and real-time weather analytics to help predict how El Nino and La Nina conditions may affect weather patterns across Kenya's 47 counties and major towns.
### Key Features
- **Climate Intelligence**: Real-time ENSO monitoring with ONI (Oceanic Nino Index) tracking
- **ML-Powered Predictions**: Random Forest, Gradient Boosting, and Logistic Regression models
- **Location-Based Forecasts**: Support for all Kenyan counties and towns
- **Risk Assessment**: Drought, flood, and extreme weather risk analysis
- **Interactive Dashboards**: Grafana analytics with climate monitoring
- **Real-time Alerts**: Climate alert system with subscription management
- **Historical Analysis**: Weather trend comparison and anomaly detection
## Architecture
```
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ React/ │────▶│ Nginx │────▶│ FastAPI │
│ Next.js │ │ (Reverse │ │ Backend │
│ Frontend │◀────│ Proxy) │◀────│ (Port │
│ (Vercel) │ │ │ │ 8000) │
└─────────────┘ └─────────────┘ └──────┬──────┘
│
┌─────────────┐ │
│ Grafana │◀───────────┤
│ (Port │ │
│ 3001) │ │
└─────────────┘ │
│
┌─────────────┐ ┌────┴──────┐
│ ML │◀────│ Aiven │
│ Service │ │ PostgreSQL │
│ (Port │ │ │
│ 5001) │ └────────────┘
└─────────────┘
```
## Technology Stack
### Frontend
- **Next.js 14** with React 18
- **Tailwind CSS** for styling
- **Chart.js** for data visualization
- **Framer Motion** for animations
- **Lucide React** for icons
- Deployed on **Vercel**
### Backend
- **FastAPI** (Python) fo …