In this notebook I use the SentinelHub statistical API to gather NDVI data in a 3 year timespan for two agricultural fields in Flanders region.
Download the source .TIFF file from this link
- Copy this file to
data/sentinel2/source
Download the source geodata for agricultural areas in Flanders from this link
- Extract this file into
data/agriculture_geodata
Create a virtual environment with Python 3.10
Install the necessary libraries with
pip install -r requirements.txt
- Run the Jupyter notebook
sentinel-stat-ndvi.ipynb
in your favorite IDE.
External scripts, classes and functions are located in the scripts
folder
Outputs from UTM conversion will be saved in the data/processed
folder
Sentinel requests for specific fields will be saved in the data/sentinel2/fields
folder
Outputs from the violin-charts will be saved in the data/export
folder
- Obtaining the labels
- Conversion to UTM31
- Selecting two fields
- Obtaining statistical data from Sentinel2
- Cleaning the data
- Cloud cover
- Cloud probability
- Snow cover
- Result
- Violin charts
We obtain the following chart of the NDVI of the two fields for a 3 years time period.
This notebook accompanies my article on Medium
This notebook was written by Frank Trioen, April 2023.