Skip to main content

Ndvi2Gif: Multi-Seasonal Remote Sensing Index Composites

DOI PyPI version PyPI downloads Conda version Conda downloads Build status

NDVI2GIF Köln Richter's stained glass in Cologne Cathedral. Inspiration for this library.

Ndvi2Gif is a Python library for multi-temporal remote sensing analysis with Google Earth Engine. It provides seasonal compositing, 40+ vegetation and environmental indices, SAR preprocessing, time series analytics, land cover classification, and hydroperiod analysis — all server-side, without downloading raw data.

Built on top of Google Earth Engine and geemap. Adapted and extended through its use in the eLTER and SUMHAL projects.


📚 Documentation

https://digdgeo.github.io/Ndvi2Gif/


✨ What's New in v1.4.0

Dispersion reducers — four new key options ('std', 'variance', 'range', 'cv') that map how much an index varies inside each period instead of its typical level, useful for phenological change, disturbances and unstable surfaces such as flooded areas. They work with every sensor and index, and the composites keep the usual period band names, so they export, animate and analyse like any other.

Downloadable water masksHydroperiodAnalyzer.get_water_masks_stack() flattens the per-date binary masks into a single uint8 image (one band per acquisition date), and include_masks=True sends them to Drive or to an Earth Engine asset alongside the hydroperiod. Cloudy pixels and pixels no satellite ever saw get their own codes, so a time series can tell them apart.

Previously, in v1.3.0: SpatialPhenologyAnalyzer, GEE-native per-pixel phenology rasters (SOS/POS/EOS) with threshold, derivative and harmonic methods. See CHANGELOG for details.


Modules

Module Description
NdviSeasonality Core engine: seasonal compositing, 40+ indices, 7 sensors, flexible ROI input
HydroperiodAnalyzer Wetland flood duration analysis (days/year) with multi-year anomaly detection
TimeSeriesAnalyzer Trend detection (Mann-Kendall, Sen's slope), phenology metrics, dashboards
SpatialPhenologyAnalyzer Per-pixel phenology rasters (SOS/POS/EOS) via threshold, derivative or harmonic methods
S1ARDProcessor Sentinel-1 SAR preprocessing: terrain correction, speckle filtering
LandCoverClassifier Supervised (RF, SVM, CART) and unsupervised (K-means, LDA) classification

Installation

pip install ndvi2gif
conda install -c conda-forge ndvi2gif

Quick Start

import ee
from ndvi2gif import NdviSeasonality

ee.Authenticate()
ee.Initialize(project='your-project-id')

# Monthly NDVI composites from Sentinel-2 (2018–2024)
ndvi = NdviSeasonality(
    roi=your_roi, sat='S2', periods=12,
    start_year=2018, end_year=2024,
    key='percentile', percentile=85, index='ndvi'
)

ndvi.get_gif(name='ndvi_evolution.gif')

Yes, it makes nice GIFs — but it's much more than that.

GIF Example Crop pattern dance around Los Palacios y Villafranca (SW Spain)


What you can do with it

  • Compute pixel-wise statistics over any region and time span — seasonal medians, percentiles, multi-year aggregations, or dispersion (std, variance, range, CV) to map variability instead of level
  • Monitor 40+ indices across Sentinel-1/2/3, Landsat (4–9), MODIS, ERA5-Land, and CHIRPS
  • Analyse wetland hydroperiod and multi-year flood anomalies with HydroperiodAnalyzer
  • Detect trends and phenology (SOS, EOS, POS, Length of Season) with TimeSeriesAnalyzer
  • Classify land cover with multi-temporal feature stacks and Random Forest, SVM, or K-means
  • Preprocess Sentinel-1 SAR with terrain correction and speckle filtering
  • Export to GeoTIFF, Google Drive, or Earth Engine Assets
  • Use any ROI: shapefile, GeoJSON, drawn geometry, eLTER DEIMS ID, Sentinel-2 tile, or Landsat path/row

Supported Sensors

Sentinel-1 (SAR) · Sentinel-2 SR · Sentinel-3 OLCI · Landsat 4–9 SR · MODIS MOD09A1 · ERA5-Land · CHIRPS


Contributing

Bug reports and feature requests: GitHub Issues

Pull requests are welcome. See CONTRIBUTING.md for guidelines — it includes step-by-step instructions for adding new indices and datasets.


Citation

If you use Ndvi2Gif in your research, please cite the JOSS paper:

@article{GarciaDiaz2026,
  author    = {García Díaz, Diego},
  title     = {Ndvi2Gif: A Python Package for Multi-Seasonal Remote Sensing Analysis with Google Earth Engine},
  journal   = {Journal of Open Source Software},
  year      = {2026},
  volume    = {11},
  number    = {124},
  pages     = {10654},
  publisher = {The Open Journal},
  doi       = {10.21105/joss.10654},
  url       = {https://doi.org/10.21105/joss.10654}
}

Acknowledgments

Special thanks to Qiusheng Wu for his invaluable work in developing and promoting open-source geospatial software, to the Google Earth Engine team, and to the broader open-source geospatial community.

License

MIT — see LICENSE.txt

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndvi2gif-1.4.0.tar.gz (130.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ndvi2gif-1.4.0-py3-none-any.whl (111.7 kB view details)

Uploaded Python 3

File details

Details for the file ndvi2gif-1.4.0.tar.gz.

File metadata

  • Download URL: ndvi2gif-1.4.0.tar.gz
  • Upload date:
  • Size: 130.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for ndvi2gif-1.4.0.tar.gz
Algorithm Hash digest
SHA256 82bfa4f2180f7b47abc26fbb7256c1b9b2ba282555814068676907a0ea47be9b
MD5 38873d8e5abbeba9b0f2695199c467b9
BLAKE2b-256 cb922520105d6eea25570e1fb6fc853863d99f7c59c8e8e85662790d755f8e25

See more details on using hashes here.

File details

Details for the file ndvi2gif-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: ndvi2gif-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 111.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for ndvi2gif-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3759a0a1eaf18b924d87cc93c4d356187650ea44b78d92d458d80f63c7d8420d
MD5 3e65344d3306e303e8b73a4ba6ac35de
BLAKE2b-256 5ccb3b16016916ed8c9c24c34578b8b6dd78145fffd0649119dbadba38f7c983

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.0

2 files

This release

1.4.0 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.5

2 files

0.1.4

2 files

0.1.2

2 files

0.1.1

2 files

0.0.9

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

1 file

0.0.4

2 files

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page