# aviskarrr/landproj-ioe architecture

> Architecture diagram of the GitHub repository aviskarrr/landproj-ioe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aviskarrr/landproj-ioe
- Repository: https://github.com/aviskarrr/landproj-ioe

## Overview

This repository documents a landslide-susceptibility workflow for Ilam: geospatial conditioning layers and an inventory feed tabular preparation, model training and evaluation, then pixel-wise raster prediction for GIS visualization. Its sampled Python pipeline implements configuration, data preparation, Random Forest utilities, and raster inference; XGBoost experiments and tuning are notebook-driven. QGIS preparation and map composition are major documented capabilities, but their project logic is not sampled here, so those connections rely on README statements. The tree does not show the README’s referenced aligned-raster directories or output artifacts.

Main entry points: [`ml/src/raster_prediction.py`](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/raster_prediction.py) (Probability raster), [`ml/src/model.py`](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/model.py) (Random Forest), [`ml/src/data_preprocessing.py`](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/data_preprocessing.py) (Clean and split), [`qgis-projects/DEM-DERIVATIVES`](https://github.com/aviskarrr/landproj-ioe/tree/main/qgis-projects/DEM-DERIVATIVES) (QGIS conditioning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_geo["Geospatial preparation"]
  node_source_inputs[("Inventory and rasters")]
  node_qgis_prep["QGIS conditioning"]
end

subgraph group_prep["Tabular preparation"]
  node_tabular_data[("Prepared dataset<br/>[dataset-final.csv]")]
  node_config["Pipeline configuration<br/>[config.py]"]
  node_preprocessing["Clean and split"]
end

subgraph group_models["Modeling and evaluation"]
  node_rf_model["Random Forest<br/>[model.py]"]
  node_xgb_experiments["XGBoost experiments"]
  node_evaluation["Model evaluation<br/>[model.py]"]
end

subgraph group_mapping["Raster mapping"]
  node_raster_stack["Raster stack and checks"]
  node_probability_map[("Probability raster")]
  node_map_export["GIS map composition"]
  node_conversion["8-bit conversion<br/>[8bitconv.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"prepares layers"| node_qgis_prep
node_source_inputs -->|"provides source data"| node_qgis_prep
node_qgis_prep -->|"exports conditioning data"| node_tabular_data
node_analyst -->|"starts preparation"| node_preprocessing
node_preprocessing -->|"reads CSV"| node_tabular_data
node_preprocessing -->|"uses settings"| node_config
node_analyst -->|"trains model"| node_rf_model
node_rf_model -->|"uses RF defaults"| node_config
node_analyst -->|"runs experiments"| node_xgb_experiments
node_analyst -->|"evaluates model"| node_evaluation
node_evaluation -->|"evaluates predictions"| node_rf_model
node_analyst -->|"starts mapping"| node_raster_stack
node_raster_stack -->|"uses raster paths"| node_config
node_rf_model -->|"supplies trained model"| node_probability_map
node_xgb_experiments -->|"supplies trained model"| node_probability_map
node_raster_stack -->|"predicts valid pixels"| node_probability_map
node_probability_map -->|"feeds GIS visualization"| node_map_export
node_conversion -->|"reads probability raster"| node_probability_map

click node_source_inputs "https://github.com/aviskarrr/landproj-ioe/tree/main/data-raw"
click node_qgis_prep "https://github.com/aviskarrr/landproj-ioe/tree/main/qgis-projects/DEM-DERIVATIVES"
click node_tabular_data "https://github.com/aviskarrr/landproj-ioe/blob/main/ml/dataset-final.csv"
click node_config "https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/config.py"
click node_preprocessing "https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/data_preprocessing.py"
click node_rf_model "https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/model.py"
click node_xgb_experiments "https://github.com/aviskarrr/landproj-ioe/tree/main/ml/notebooks/xgboost_notebooks"
click node_evaluation "https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/model.py"
click node_raster_stack "https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/raster_prediction.py"
click node_probability_map "https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/raster_prediction.py"
click node_map_export "https://github.com/aviskarrr/landproj-ioe/tree/main/qgis-projects/Prediction%20Map%20Export"
click node_conversion "https://github.com/aviskarrr/landproj-ioe/blob/main/qgis-projects/Prediction%20Map%20Export/scripts/8bitconv.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_source_inputs,node_qgis_prep toneBlue
class node_tabular_data,node_config,node_preprocessing toneAmber
class node_rf_model,node_xgb_experiments,node_evaluation toneMint
class node_raster_stack,node_probability_map,node_map_export,node_conversion toneRose
class node_analyst toneIndigo
```

## Components

### Geospatial preparation

- [Inventory and rasters](https://github.com/aviskarrr/landproj-ioe/tree/main/data-raw): `data-raw`
- [QGIS conditioning](https://github.com/aviskarrr/landproj-ioe/tree/main/qgis-projects/DEM-DERIVATIVES): `qgis-projects/DEM-DERIVATIVES`

### Tabular preparation

- [Prepared dataset](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/dataset-final.csv): `ml/dataset-final.csv`
- [Pipeline configuration](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/config.py): `ml/src/config.py`
- [Clean and split](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/data_preprocessing.py): `ml/src/data_preprocessing.py`

### Modeling and evaluation

- [Random Forest](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/model.py): `ml/src/model.py`
- [XGBoost experiments](https://github.com/aviskarrr/landproj-ioe/tree/main/ml/notebooks/xgboost_notebooks): `ml/notebooks/xgboost_notebooks`
- [Model evaluation](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/model.py): `ml/src/model.py`

### Raster mapping

- [Raster stack and checks](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/raster_prediction.py): `ml/src/raster_prediction.py`
- [Probability raster](https://github.com/aviskarrr/landproj-ioe/blob/main/ml/src/raster_prediction.py): `ml/src/raster_prediction.py`
- [GIS map composition](https://github.com/aviskarrr/landproj-ioe/tree/main/qgis-projects/Prediction%20Map%20Export): `qgis-projects/Prediction Map Export`
- [8-bit conversion](https://github.com/aviskarrr/landproj-ioe/blob/main/qgis-projects/Prediction%20Map%20Export/scripts/8bitconv.py): `qgis-projects/Prediction Map Export/scripts/8bitconv.py`

### Other components

- **Analyst**

## Connections

- Analyst → QGIS conditioning: prepares layers (evidence: `README.md`)
- Inventory and rasters → QGIS conditioning: provides source data (evidence: `README.md`)
- QGIS conditioning → Prepared dataset: exports conditioning data (evidence: `README.md`)
- Analyst → Clean and split: starts preparation (evidence: `README.md`)
- Clean and split → Prepared dataset: reads CSV (evidence: `ml/src/data_preprocessing.py`)
- Clean and split → Pipeline configuration: uses settings (evidence: `ml/src/data_preprocessing.py`)
- Analyst → Random Forest: trains model (evidence: `README.md`)
- Random Forest → Pipeline configuration: uses RF defaults (evidence: `ml/src/model.py`)
- Analyst → XGBoost experiments: runs experiments (evidence: `README.md`)
- Analyst → Model evaluation: evaluates model (evidence: `README.md`)
- Model evaluation → Random Forest: evaluates predictions (evidence: `ml/src/model.py`)
- Analyst → Raster stack and checks: starts mapping (evidence: `README.md`)
- Raster stack and checks → Pipeline configuration: uses raster paths (evidence: `ml/src/raster_prediction.py`)
- Random Forest → Probability raster: supplies trained model (evidence: `README.md`)
- XGBoost experiments → Probability raster: supplies trained model (evidence: `README.md`)
- Raster stack and checks → Probability raster: predicts valid pixels (evidence: `ml/src/raster_prediction.py`)
- Probability raster → GIS map composition: feeds GIS visualization (evidence: `README.md`)
- 8-bit conversion → Probability raster: reads probability raster (evidence: `qgis-projects/Prediction Map Export/scripts/8bitconv.py`)
