Ndvi2Gif
Library to create Multi Seasonal remote sensing indexes composites
Install / Use
/learn @Digdgeo/Ndvi2GifREADME
Ndvi2Gif: Multi-Seasonal Remote Sensing Index Composites
Richter's stained glass in Cologne Cathedral. Inspiration for this library.
Ndvi2Gif is a Python library designed to simplify access to global satellite data through the Google Earth Engine platform. While its name highlights the ability to create seasonal GIF animations, the true power of this tool lies in its capability to compute and export pixel-wise statistics for any region on Earth, across any time span covered by supported remote sensing datasets.
Built on top of Google Earth Engine and Geemap, it allows you to:
- Generate annual or multi-annual composited rasters (e.g., median NDVI per season between 2001 and 2020),
- Apply multiple statistics (mean, max, flexible percentiles) across space and time,
- Export results as GeoTIFFs for further analysis,
- Retrieve zonal statistics over user-defined geometries,
- Monitor vegetation structure with advanced SAR indices,
- Handle incomplete years automatically for real-time monitoring,
- NEW in v0.6.0: Perform supervised and unsupervised land cover classification with integrated machine learning,
- NEW in v0.6.0: Export directly to Google Drive and Earth Engine Assets,
- And yes — also create colorful GIFs for easy visualization.
Whether you're monitoring crop phenology, detecting harvest events, assessing drought trends, classifying land cover, or preparing input layers for further ecological modeling, ndvi2gif makes it easier to extract reliable, multi-temporal remote sensing information at scale.
Ndvi2Gif was updated and extended as part of its integration into the eLTER and SUMHAL projects, which also enabled the use of eLTER site boundaries (via deimsPy) as one of its input sources.

📚 Documentation
Complete documentation is now available as an interactive Jupyter Book:
🔗 https://digdgeo.github.io/Ndvi2Gif/
- Getting Started Guide - Installation and authentication
- API Reference - Complete class and method documentation
- Datasets Guide - Detailed specs for all 7 platforms
- Indices Catalog - Reference for all 88 variables
- Climate Analysis Tutorial - ERA5 & CHIRPS workflows
✨ What's New in v1.0.0 / v1.1.0
- FAI (Floating Algae Index) — multi-sensor cyanobacterial bloom detection (Sentinel-2, Landsat, MODIS)
- ERA5-Land & CHIRPS climate reanalysis support (47 variables + precipitation, 1950–present)
- LandCoverClassifier — supervised and unsupervised land cover classification (RF, SVM, K-means…)
- Enhanced statistics (
sum,min), direct export to Google Drive and Earth Engine Assets - Complete Jupyter Book documentation
Why use Ndvi2Gif?
Unlike many visualization-oriented tools, Ndvi2Gif is designed as a remote sensing analytics suite that abstracts much of the complexity of working directly with Google Earth Engine, while giving you the flexibility to go far beyond GIF creation.
You can:
-
Access pixel-wise statistics over any Earth location, at any scale and time span.
- Example: Obtain the monthly median of the 85th NDVI percentile per pixel from 1984 to 2024 using Landsat data.
- Example: Calculate the maximum of the seasonal NDWI maximums between 2017 and 2023 using Sentinel-2.
- Example: Monitor crop harvest timing with bi-monthly VV/VH ratio analysis using Sentinel-1.
- Example: Track daily algal blooms with Sentinel-3 OLCI turbidity indices.
-
Perform advanced machine learning classification (NEW in v0.6.0):
- Multi-temporal land cover mapping with Random Forest
- Crop type classification with SVM
- Unsupervised clustering with K-means
- Feature importance analysis for ecological insights
-
Perform nested aggregations:
First compute temporal summaries (e.g., per-season percentiles or means), then apply a second statistical reduction across years (e.g., median, min, max). -
Run advanced time series analysis with the
TimeSeriesAnalyzer:- Trend detection (Mann-Kendall, Sen's slope, linear regression)
- Multi-panel dashboards (seasonal patterns, autocorrelation, data quality)
- Phenology metrics such as Start/End of Season, Peak, Length, amplitude, and rates of change
-
Preprocess Sentinel-1 SAR like a pro with the
S1ARDProcessor:- Radiometric terrain correction for mountainous regions
- Multiple speckle filtering options (Boxcar, Lee, Refined Lee, Gamma-MAP, Lee Sigma)
- Flexible DEM support (Copernicus and SRTM)
-
Target any ecological or phenological metric by choosing the appropriate index and analysis pipeline.
-
Work globally, without needing to download or preprocess raw satellite data — all computations are handled via Earth Engine's cloud infrastructure.
-
Handle real-time monitoring with automatic detection of available data periods for incomplete years.
In other words: if you can describe a temporal range, a spatial region, an index, and a chain of statistics — ndvi2gif can not only generate it, but now also help you classify, analyze and interpret the changes over time.
Yes, it makes nice GIFs — but it's much more than that.
Crop pattern dance around Los Palacios y Villafranca (SW Spain) and the palette color combinations shown
Supported Input Formats for ROI
| Input Type | Description | Example / Notes |
|----------------------|-------------------------------------------------------------|------------------------------------------------------|
| Drawn Geometry | Use geemap to draw a polygon directly on a map | Works in Jupyter Notebooks |
| Shapefile / GeoJSON | Provide a file path to a vector dataset | EPSG:4326 recommended |
| eLTER site ID | Use deimsPy to fetch site boundaries by DEIMS ID | e.g., deimsid:ab8278e6-0b71-4b36-a6d2-e8f34aa3df30 |
| Sentinel-2 Tile | Specify MGRS tile code (e.g., T30TYN) | Automatically fetches tile geometry |
| Landsat Path/Row | Provide WRS-2 path and row codes (e.g., 198/034) | Covers full Landsat archive |
Included Statistics
- Maximum - Peak values for cloud-free compositing
- Mean - Average values across time period
- Median - Robust central tendency, excellent for noisy data
- Sum - Total accumulation (ideal for precipitation, runoff, radiation)
- Flexible Percentiles - Any percentile from 1 to 99
- Custom percentiles like 75th, 85th, or 99th for specific applications
- Perfect for handling varying cloud contamination levels
Available Indices
🌱 Basic Optical Indices (S2, Landsat, MODIS, S3)
- NDVI - Normalized Difference Vegetation Index
- EVI - Enhanced Vegetation Index
- GNDVI - Green Normalized Difference Vegetation Index
- SAVI - Soil Adjusted Vegetation Index
- NDWI - Normalized Difference Water Index
- MNDWI - Modified Normalized Difference Water Index
- AWEI - Automated Water Extraction Index
- AEWINSH - AWEI No Shadow
- NDSI - Normalized Difference Snow Index
- NBRI - Normalized Burn Ratio Index
- NDMI - Normalized Difference Moisture Index
🌾 Advanced Optical Indices (S2, Landsat, MODIS, S3)
- MSI - Moisture Stress Index (drought monitoring)
- NMI - Normalized Multi-band Drought Index
- NDTI - Normalized Difference Tillage Index
- CRI1/CRI2 - Carotenoid Reflectance Indices
- LAI - Leaf Area Index approximation
- PRI - Photochemical Reflectance Index
- WDRVI - Wide Dynamic Range Vegetation Index
🔬 Sentinel-2 Exclusive (Red Edge B5-B7)
- IRECI - Inverted Red-Edge Chlorophyll Index (high sensitivity chlorophyll)
- MCARI - Modified Chlorophyll Absorption Ratio Index
- NDRE - Normalized Difference Red Edge (chlorophyll content)
- REIP - Red Edge Inflection Point (vegetation stress)
- PSRI - Plant Senescence Reflectance Index (crop maturity)
- CIRE - Chlorophyll Index Red Edge
- MTCI - MERIS Terrestrial Chlorophyll Index
- S2REP - Sentinel-2 Red Edge Position
- NDCI - Normalized Difference Chlorophyll Index (cyanobacteria/water quality) 🆕
- CIG - Chlorophyll Index Green
💧 Water Quality Indices (S2, Landsat, MODIS)
- FAI - Floating Algae Index (Hu 2009) — cyanobacterial bloom and floating algae detection using NIR baseline interpolation with sensor-specific wavelengths 🆕
🌊 Sentinel-3 Exclusive (OLCI 21-band)
- OCI - OLCI Chlorophyll Index (optimized for S3)
- TSI - Trophic State Index (water quality assessment)
- CDOM -
