Vegetation index

Using satellite images, we can see how green Aruba is at different times to see how rainfall, climate change, and human activity impact local plants.

Green coverage basic protocol

  1. Identify dates / seasons / locations of interest
  2. Obtain georeferenced raster imagery
  3. Load into GIS software
  4. Overlay and trim with region of interest (if applicable)
  5. Calculate NDVI
  6. Identify threshold value for green coverage
  7. Perform raster statistics to count percentage of pixels above threshold

Using Google Earth Engine

Google Earth Engine is an online GIS platform that allows a lot of mapping and spatial analysis to be done by directly accessing public GIS datasets and performing analysis using javascript code.

Before you can use it, you’ll need to fill out this form to apply for access using your Google account:!/

You’ll get an email after a bit, hopefully saying you’ve been approved, which you can use to start coding your GIS analyses. To start coding, you’ll need to check out this link:

A good place to start is with their introductory tutorial, which you can find here:

Earth Engine example

The script for this example is accessible at the following link, under the users/sevold/ndvi repository. The script is called Arikok-NDVI-example.

  1. Identify dates / seasons / locations of interest
    • e.g. Aruba, at the end of the 2018 dry season (September 2018 was the last month with <20mm of rainfall)
  2. Obtain georeferenced raster imagery and
  3. …load into GIS software
    • The code to import the data is below.
// Import the Landsat 8 dataset

var landsat8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA');
  1. Overlay and trim with region of interest (if applicable)
    • If you have a specific shape you want to explore, you’ll need to import a shapefile of your region. That process is explained here. Our example of Arikok has already been uploaded and made public, so you’ll be able to load it from our database using the code below. If you don’t need such a specific area, you can also draw a shape or a rectangle using the tools on the map, or even just pick a point to center on. Once that is done, you can use the following code to filter your imagery using your location and date range.
// Import your location of interest

var ROI = ee.FeatureCollection("users/sevold/Aruba");

// Filter the Landsat 8 data using your location of interest

var spatialFiltered = landsat8.filterBounds(ROI);

// Then filter it using your dates of interest

var temporalFiltered = spatialFiltered.filterDate('2018-09-01', '2018-09-30');
  1. Calculate NDVI
    • This process takes us from a collection of images to a single ndvi map of Aruba
// This is a function to calculate NDVI from a Landsat 8 raster and add it as another layer

var addNDVI = function(image) {
  var ndvi = image.normalizedDifference(['B5', 'B4']).rename('NDVI');
  return image.addBands(ndvi);

// Here we apply the function above to our filtered image collection

var withNDVI =;

// Collect peak "greenness" from our images into one map

var greenest = withNDVI.qualityMosaic('NDVI');

// And cut it out to the shape of our region

var greenROI = greenest.clip(ROI);

// Display the result by it's NDVI value

var visParams = {min: -1, max: 1, bands: ['NDVI'], palette: ['blue', 'white', 'green']};

Map.centerObject(ROI, 11);

Map.addLayer(greenROI, visParams, 'Max NDVI mosiac');
  1. Identify threshold value for green coverage
    • Technically speaking, any NDVI above 0 has some level of vegetation, but the value that represents healthy vegetation depends on the ecosystem you’re looking at.
// Set a threshold for vegetation on the NDVI index

var threshold = 0.2;
  1.  Perform raster statistics to count percentage of pixels above threshold
    • This step is a bit awkward but it works. It will output a value from 0 to 1, indicating what fraction of the area has vegetation. (Multiply by 100 to get it as a percentage)
// This makes a map with 0 values for non-vegetation, and 1 values for vegetation

var vegetation ='NDVI').gt(threshold);

// This takes the average (mean) value of our vegetation map, aka the Green Coverage

var green = vegetation.reduceRegion({
  reducer: ee.Reducer.mean(),
  geometry: ROI,
  scale: 30

// Print out the value of our green coverage in the console so you can write it down!


=== Data sets ===

{| class=”wikitable”


! Dataset

! Dates

! Aruba?

! NIR band

! Resolution

! Notes

! Link


| Landsat 8

| 2013 – present

| yes

| B5

| 30m




| Landsat 7

| 1999 – present

| yes

| B4

| 30m

| missing data 2003 –



| Landsat 5

| 1984 – 2012

| no!

| B4

| 30m

| someone deleted Aruba



| Landsat 4

| 1982 – 1993

| maybe

| B4

| 30m




| Sentinel-2 MSI

| 2015 – present

| maybe

| B8

| 10m




== Python with Planet data==

;Tutorial 1


;Tutorial 2




;Image stitching



:[ Python + Planet Vegetation Mapping]

== QGIS landcover classification ==


:Semi-Automatic Classification Plugin



;User Manual


;Image stitching


== Notes ==

Current workflow:

#Planet Explorer search — find images of interest and place order

#Download order once ready

#Copy analytic .tif files into /data folder and rename 1, 2, 3, 4, etc..

#Run gdal python code to merge

#Run NDVI to analyze merged image

#Repeat for another date

#Compare using QGIS

=== Aruba’s climate data ===

Rainy season:

Dry season:

[ Meteo climate data (PDF format)]

[ Rainfall data from Meteo (Google sheet)]


Installing Python, packages, and jupyter:

install sublime

install miniconda

install python libraries

*pip install planet

*pip install rasterio

*pip install numpy

*pip install matplotlib

*pip install requests

*pip install jupyter

*pip install pandas


Image search and NDVI with Planet API:

Tutorial code:

ROI GeoJSON tool:

Aruba boundaries:


Data from Planet:

Open Street Map data downloading using QGIS or Python:

Less cool option but with only one button:

Medium cool option with graphical interface:



Image stitching:

Layer > Add Layer > Add Raster Layer

Open various raster files (aruba_ndvi#.tif)

Raster > Miscellaneous > Merge

*issue: need to ignore “no data” cells in merge


Vegetation indices:

Landcover classification