ALPROS is a comprehensive landslide risk prediction and monitoring system designed for Kerala's vulnerable regions. It combines classical statistical analysis with state-of-the-art machine learning to provide accurate, real-time landslide hazard assessments across micro-scale geographic zones.
ALPROS features three integrated modules:
- CLI Risk Analyzer (
landslide.py) - Traditional rule-based assessment - ML Risk Predictor (
train_model_with_soil.py&landslide_model.pkl) - XGBoost-based classification - Web Dashboard (
app.py) - Real-time micro-zone grid visualization
- Live Weather Integration: Fetches current precipitation via OpenWeatherMap API
- Elevation & Slope Calculation: Uses Open Elevation API for precise topographic analysis
- Soil Factor Classification: Distinguishes between rock, laterite, clay, and weathered soil
- Machine Learning Model: XGBoost classifier trained on 3,000+ synthetic realistic scenarios
- 5-Factor Risk Evaluation:
- 24-hour rainfall accumulation
- 72-hour rainfall accumulation
- Terrain slope angle (0-1 normalized scale)
- Digital elevation data
- Soil composition factor (0.1-0.9 scale)
- Probability-based Scoring: Returns landslide probability (0.0-1.0)
- Divided Coverage: Geographic area segmented into 5×5 micro-zones
- Color-coded Risk Levels:
- GREEN: Low risk (probability < 0.4)
- YELLOW: Moderate risk (0.4 ≤ probability < 0.7)
- RED: High risk (probability ≥ 0.7)
- Predefined Regions:
- Kavalappara
- Munnar
- Wayanad
- Malappuram
- Each region is defined by latitude/longitude bounding boxes and linked to the nearest OpenWeatherMap city for rainfall data.
- Grid Risk API:
/grid_risk?region=<region>- Returns risk assessment for all micro-zones in the specified region. - Regions API:
/regions- Lists all available regions with their display names and associated cities.
- Synthetic Data Generation: Simulates realistic rainfall, slope, elevation, and soil conditions.
- Logical Landslide Condition: Incorporates domain knowledge to define landslide-prone scenarios.
- XGBoost Classifier: Trained on 3,000 samples with a test accuracy of ~90%.
- Feature Importance:
- Rainfall (72-hour) and slope are the most critical factors influencing landslide risk.
- Elevation Cache: Stores elevation data for lat/lon coordinates to reduce API calls.
- Rainfall Cache: Caches rainfall data for cities to optimize OpenWeatherMap API usage.
- Soil Factor Cache: Caches soil classification data retrieved from Bhuvan WMS.
-
Clone the repository:
git clone https://github.com/your-repo/alpros.git cd alpros -
Install dependencies:
pip install -r requirements.txt
-
Add your OpenWeather
Map
API key:
- Replace
YOUR_OPENWEATHER_API_KEYinapp.pywith your actual API key.
-
Run the Flask app:
python app.py
-
Access the web dashboard at
http://127.0.0.1:5000/dashboard.
To retrain the model, run:
python train_model_with_soil.pyThis will generate a new [landslide_model.pkl]
- Home: [
http://127.0.0.1:5000/] - Regions: [
http://127.0.0.1:5000/regions] - Grid Risk: [
http://127.0.0.1:5000/grid_risk?region=<region>]
- Add support for additional regions.
- Integrate more advanced soil and geological data sources.
- Improve real-time data handling for rainfall and elevation.