image collections 3

Calculate NDVI for each image in the collection

step 1: add a geometry to the map

step 2: copy the code below and fill out the ??

var l8 = ee.ImageCollection("??");

// filter for location
l8 = l8.filterBounds(??);

// print number of images

// filter for date;
l8 = l8.filterDate("2014-02-01","2018-12-31");

// print number of images

function removeClouds(image){

// get QA band
var QA ="pixel_qa");
var shadow = QA.bitwiseAnd(8).neq(0);
var cloud = QA.bitwiseAnd(32).neq(0);
return image.updateMask(shadow.not()).updateMask(cloud.not());

function calculateNDVI(image){
return ndvi = image.normalizedDifference(['??','??'])

l8 =
var ndvi =




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s