Logo Lanfrica

rayane-bouyakoub/algiers-climate-ai-agent

Domaine:

climate

Type de record:

software
Créateur:
ray
Hôte:
Multi-agent AI system for Algerian climate analysis — weather forecasting, chart generation, and PDF report generation via a LangGraph orchestrator with Streamlit UI. # 🌡️ Algiers Climate AI Agent A multi-agent AI system for analyzing climate change and weather forecasting in Algeria (Algiers), powered by LangGraph, Mistral, and Streamlit. ## What it does - Forecasts weather columns (temperature, precipitation, wind, ET0...) for any date or date range using a trained Random Forest model - Generates charts from natural language prompts ("Bar chart of average temperature per month in 2020") - Answers analytical questions about the dataset ("What was the hottest year on record?") - Generates full PDF research reports with embedded charts and tables - The agent can update its own rules when it makes mistakes ## Architecture | File | Role | |------|------| | `main.py` | Orchestrator agent + all tool definitions | | `app.py` | Streamlit chat UI | | `Drawer.py` | Chart generation subprocess (PandasAI) | | `ExpertCSV.py` | CSV analysis subprocess (LangChain pandas agent) | | `base.txt` | Agent system prompt | | `RULES.txt` | Self-updating rules file | | `algiers-weather-forecast-RF.ipynb` | RF model training notebook | ## Dataset - **Algiers Weather Data** (2000–2024, daily) - Columns: temperature (max/min/mean), apparent temperature, precipitation, wind speed, ET0 evapotranspiration, and more - Sample dataset included in `data/Algiers_Weather_Data.csv` ## Setup ### 1. Clone the repo ```bash git clone github.com cd algiers-climate-ai-agent ``` ### 2. Install dependencies ```bash pip install -r requirements.txt ``` ### 3. Configure environment variables Create a `.env` file based on `.env.example`: ```env MISTRAL_API_KEY=your_mistral_key MISTRAL_MODEL_NAME=mistral-large-latest MISTRAL_API_BASE=api.mistral.ai API_KEY=your_openrouter_key # for Drawer.py OPENAI_API_KEY=your_openai_key # for seeChart (gpt-4.1-mini) ``` Get your API keys here: - Mistral AI - OpenRouter - OpenAI ### 4. Train the model (or use pre-trained) Open and run `algiers-weather-forec …