Logo Lanfrica

AyoubJadouli/morocco-wildfire-tool

Domain:

environment and energyclimate

Record type:

dataset
Creator:
Ayo
Host:
A tool for processing and visualizing wildfire data in Morocco # Wildfire Dataset Builder This repository builds machine-learning datasets for short-lead wildfire occurrence prediction from geospatial, weather, satellite, population, calendar, and fire-history observations. The maintained implementation lives in `src/wildfire_dataset_builder`. Older prototype scripts are kept for reference, but the reproducible path is the `wildfire-dataset` CLI. ## Scientific Target The target is next-day wildfire occurrence, not same-day active-fire detection. Every row has: - `grid_id` - `feature_date` - `target_date` - `forecast_horizon_days` - location fields - features available at or before `feature_date` - target column `is_fire` The default forecast horizon is one day, so `target_date = feature_date + 1 day`. ## Build Modes - `paper_v1`: aligns with the IEEE/Kaggle Morocco dataset methodology where source data and credentials are available. Benchmark counts are validated from processed inputs, never hard-coded. - `prototype_v2`: aligns with the later Morocco prototype concept: 2 km grid, daily layers, and near-real-time style outputs. - `universal`: builds the same stable contract for any country, bbox, or GeoJSON AOI. Feature availability depends on configured providers. ## What Is Implemented - Typed YAML configuration. - Bbox and GeoJSON AOI loading. - Stable grid generation with `grid_id`, centroid fields, area, and CRS metadata. - FIRMS normalization and next-day label construction. - Station-wise past-only weather gap filling and IDW interpolation to grid/day. - Past-only lag and rolling weather features. - Calendar features. - Positive augmentation that preserves original fire rows. - Non-fire grid-day sampling with fire-buffer exclusion. - Natural-prevalence and balanced outputs. - Schema, leakage, quality, source, and dataset-card outputs. - Offline synthetic fixtures and pytest coverage. ## Requires Credentials Or Local Inputs Real NASA FIRMS, NOAA/GSOD BigQuery, vegetation, soil-moisture, population, DEM, and lan …