Back to Home TR

AI-Powered Flood Early Warning System

Daily Risk Analysis for Turkey using MGM, Open-Meteo and Deep Learning (LSTM)

Flood Risk Map

Project Summary

This project is an AI system that performs daily flood risk prediction for 939 districts across Turkey. Trained using meteorological data (precipitation, temperature, wind) and geographical features (slope, river flow), the LSTM (Long Short-Term Memory) model detects potential flood risks in advance with a 96% success rate (Recall).

The system runs automatically every day, fetching current data, performing risk analysis, and generating an interactive choropleth map. It also scans news sources to learn from actual flood events and continuously improves itself (Fine-tuning).

Technologies Used

Category Technologies
AI / ML TensorFlow, Keras, LSTM Neural Networks
Data Processing Pandas, NumPy, Scikit-learn
Visualization Folium (Leaflet.js), Matplotlib
Data Sources MGM (Turkish State Meteorological Service), Open-Meteo API, Google News RSS
Automation Python Scripts, Windows Task Scheduler

Key Features

System Architecture

The model analyzes the last 7 days of data for each district.

Input Features:

  1. Dynamic: Total Precipitation, Soil Moisture, Temperature (Max/Min), Wind Speed
  2. Static: Terrain Slope, River Flow (Expected Flow), Geographical Risk Score

Model Training and Performance

Below is the loss and accuracy graph showing the model's learning process:

Model Training

Code Snippet (LSTM Architecture)

model = Sequential([
    # Time series input (7 days x 10 features)
    LSTM(128, input_shape=(7, 10), return_sequences=True),
    Dropout(0.3),
    BatchNormalization(),
    
    # Deep feature extraction
    LSTM(64, return_sequences=False),
    Dropout(0.3),
    
    # Classification
    Dense(32, activation='relu'),
    Dense(1, activation='sigmoid') # Flood probability between 0-1
])

Results

This project demonstrates the power of artificial intelligence in disaster management and early warning systems.