Logo Lanfrica

othmaneechc/fert-recon

Domaine:

agriculture

Type de record:

software
Créateur:
oth
Hôte:
A structured Python pipeline for downloading and processing multi-source environmental and remote-sensing datasets over arbitrary countries (default: Morocco) at a uniform resolution. Outputs per-year summary statistics (mean, min, max, stdDev, percentiles) for temporal collections and static maps for single-image datasets. # Fertilizer Recommendation Reconstruction (fert-recon) ## Overview - Builds monthly, pixel-level datasets linking weather, vegetation, fertilizer inputs, and yields for wheat and maize between 2002 and 2019. - The data pipeline (under `data-pipeline/`) downloads satellite and reanalysis products from Google Earth Engine, aligns them to the Global Crop Yield 5 arc-minute grid, merges fertilizer rasters, and materializes parquet tables. - The modeling pipeline (under `modeling-pipeline/`) provides PyTorch sequence models and classical baselines for training yield predictors and simulating fertilizer response. - Recommendation utilities run coordinate-ascent over fertilizer inputs for the held-out year to produce optimized fertilizer suggestions per pixel. ## Repository Layout - `data-pipeline/` – Earth Engine exporters, raster alignment utilities, configs, and entry-point scripts. - `modeling-pipeline/` – training, evaluation, and recommendation code plus experiment configs. - `datasets_/`, `datasets_chile/`, `datasets_morocco/`, `datasets_spain/` – sample parquet outputs produced by the pipeline. - `exports_/` – monthly GeoTIFF stacks downloaded from Earth Engine (organized by feature) and masks. - `models/` – saved experiment outputs (logs, metrics, checkpoints, notebooks). - `ee_env.yml` – conda environment for the Earth Engine + raster preprocessing stack. ## Setup ### 1. Earth Engine credentials - Use a service account or user authentication for Google Earth Engine. - Configure credentials via environment variables: set `GEE_SERVICE_ACCOUNT` and `GEE_PRIVATE_KEY` (path to the key file or the JSON string), or set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key path. Avoid storing secrets in the repository. - The exporters fall back to interactive auth (`ee.Initialize()`), but service accounts are recommended for unattended runs. ### 2. Conda environment for the data pipeline ```bash conda env create -f ee_env.yml conda activate ee ``` - The environ …