Pipeline for processing satellite data in Google Earth Engine, masking to agricultural areas, and aggregating values by administrative boundaries. Outputs per-dataset CSV tables (e.g., NDVI, FPAR) for one or more countries. Designed for reproducible analysis and easy sharing via GitHub.
- Pulls public datasets from Earth Engine (no private assets required).
- Masks imagery to agricultural areas using ESA WorldCover (cropland / rangeland).
- Aggregates values by GAUL administrative boundaries (ADM0 / ADM1 / ADM2).
- Supports multiple countries in a single run.
- Exports results as CSV files, one per dataset.
- Optionally pushes outputs to GitHub directly from Colab.
- MODIS NDVI (MOD13Q1) β Vegetation index, 250m, monthly composites.
- MODIS FPAR (MOD15A2H) β Fraction of Photosynthetically Active Radiation, 500m, monthly composites.
(Easily extendable to Sentinel-2 NDVI, CHIRPS rainfall, ERA5 temperature, etc.)
- Clone or fork this repo.
- Open the notebook
gee_admin_pipeline.ipynbin Google Colab.
- Run the first cell and follow the authentication prompt.
Set your country list, date range, admin level, and reducer:
COUNTRIES = ["Bangladesh", "Malawi"]
ADMIN_LEVEL = 2 # 0=country, 1=ADM1, 2=ADM2
START_DATE = "2024-01-01"
END_DATE = "2024-12-31"
REDUCER = "mean" # mean, median, pctl_25, etc.
MASK_MODE = "cropland" # cropland, rangeland, cropland+rangeland- For each dataset Γ country Γ month, the script generates aggregated values.
- Outputs are saved as CSV files in
/content/gee_outputs/.
- Set
GIT_ENABLE_PUSH = Truein the notebook. - CSVs will be copied into your repoβs
data/folder and committed automatically.
repo/
ββ notebooks/
β ββ gee_admin_pipeline.ipynb # Main Colab notebook
ββ data/ # Auto-generated CSV outputs
ββ README.md
MIT License. See LICENSE for details.