Logo Lanfrica

iamchiboy/Ghana-Rain-Forecast

Domain:

climate

Record type:

software
Creator:
iam
Host:
# Ghana Rain Nowcasting (30-Minute Prediction) **An AI-powered machine learning system for real-time rainfall forecasting in Accra, Ghana** This project collects real-time weather data, engineers predictive features, trains a machine learning model, and provides 30-minute rain forecasts through an interactive web dashboard. ## 🌟 Features - βœ… **Real-time Data Collection** - Automatic weather data fetching every 10 minutes - βœ… **Advanced Feature Engineering** - Rolling windows, lag features, derived meteorological indicators - βœ… **Robust ML Model** - Random Forest with cross-validation and performance metrics - βœ… **Prediction Confidence** - Probability scores and confidence levels for each forecast - βœ… **Interactive Dashboard** - Beautiful Streamlit interface with charts and metrics - βœ… **Production-Ready** - Error handling, logging, validation, and monitoring - βœ… **Secure** - Environment variable management for API keys ## πŸ—οΈ System Architecture ``` OpenWeather API (10-min interval) ↓ Data Collection & Validation ↓ Feature Engineering (rolling, lag, derived features) ↓ Data Cleaning & Preprocessing ↓ Train/Test Split with Stratification ↓ Random Forest Classifier (300 trees) ↓ Cross-Validation & Metrics ↓ Live Prediction Module ↓ Streamlit Dashboard (Real-time visualization) ``` ## πŸ“ Project Structure ``` Ghana Rain Forecast/ β”œβ”€β”€ app/ β”‚ └── dashboard.py # Streamlit web dashboard β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ config.py # Centralized configuration β”‚ β”œβ”€β”€ logger.py # Logging setup β”‚ β”œβ”€β”€ collect_data.py # API data collection with validation β”‚ β”œβ”€β”€ preprocess.py # Feature engineering & preprocessing β”‚ β”œβ”€β”€ train_model.py # Model training with validation β”‚ β”œβ”€β”€ predict.py # Prediction module with confidence scores β”‚ β”œβ”€β”€ rain_model.pkl # Trained model (generated) β”‚ β”œβ”€β”€ model_metrics.json # Model evaluation metrics (generated) β”‚ └── feat …

Languages