This project implements an NDVI (Normalized Difference Vegetation Index) time series analysis and forecasting tool using LSTM (Long Short-Term Memory). It combines satellite imagery data with weather information to predict future NDVI values for specified geographical areas.
- Fetches and processes NDVI data from Sentinel-2 satellite imagery using Google Earth Engine
- Retrieves historical weather data for the specified location
- Applies data cleaning, filtering, and smoothing techniques to NDVI time series
- Implements LSTM models for both original and smoothed NDVI data
- Provides forecasting capabilities for future NDVI values
- Visualizes historical data, predictions, and forecasts using interactive plots
- Python 3.7+
- Google Earth Engine account
- CUDA-capable GPU (optional, for faster training)
-
Clone this repository:
git clone https://github.com/senthilkumar-dimitra/NDVI-time-series-analysis.git cd ndvi-time-series-analysis
-
Install the required packages:
pip install -r requirements.txt
-
Set up your Google Earth Engine authentication
Run the main script:
python ndvi_ts_lstm.py
You can modify the following parameters in the script:
start_date
: Start date for data retrievalend_date
: End date for data retrievaln_steps_in
: Number of time steps used for input sequencesn_steps_out
: Number of time steps to forecastlstm_units
: Number of units in the LSTM layerspercentile
: Percentile for NDVI filteringbimonthly_period
: Time interval for filteringspline_smoothing
: Smoothing parameter for the spline interpolation
The script generates:
- Interactive plots showing historical NDVI data, predictions, and forecasts
- Performance metrics for the LSTM models [WIP]