I am aware there are a lot of similar questions to this on here like
- Time series analysis of NDVI using Google Earth Engine
- Creating NDVI time series from single polygon of shapefile using Google Earth Engine
but I couldn't quite find one that helped me.
I am looking at tree death from drought and I have on ground survey data as polygons(plots) and points.
I am trying to get an NDVI time series graph for each buffered point (user defined in map window as geometry2
) using Landsat 8 32 day composites. Id like to see if NDVI can show the decline in tree health (and death) over time at these point locations (with 100m buffer).
Ideally I would like a mean value for each poly or point(buffered 100m) for every L8 32day NDVI composite from Dec2017-Dec2020(present).
I keep getting the error: "image" is not defined in this scope. in , line 122 But the code doesn't have a line 122.
// Load Landsat 8 Collection 1 Tier 1 32-Day NDVI Composite input imagery.
var landsat8NDVI32d = ee.ImageCollection('LANDSAT/LC08/C01/T1_32DAY_NDVI')
.filterDate('2017-12-01', '2020-12-01')
.select('B[1]');
// Define regions of interest as 100M buffers around points.
var geometry = ee.Geometry.Point(geometry2).buffer(100);
// Reduce the region.
var meanDictionary = image.reduceRegion({
reducer: ee.Reducer.mean(),
geometry: region.geometry(),
scale: 30,
maxPixels: 1e9
});
// Create a graph of the time-series.
var graph = ui.Chart.image.seriesByRegion({
imageCollection: landsat8NDVI32d,
regions: geometry,
reducer: ee.Reducer.mean()
})
print(graph)