-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMedian_Haharu_MODIS_NDVI
42 lines (32 loc) · 1009 Bytes
/
Median_Haharu_MODIS_NDVI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
**GEE_script_for_MODIS_500_NDVI**
https://code.earthengine.google.com/26d30dfd747f3dc333b898b6cb72921e
//Add the Haharu district boundary to the map
Map.addLayer(Haharu.draw({color: 'ff0000', strokeWidth: 5}), {}, 'Haharu');
//import MODIS Terra Vegetation Indices Imagery
var MODIS_Terra = ee.ImageCollection("MODIS/006/MOD13A1")
.filterDate('2000-01-01','2018-12-31')
.filterBounds(Haharu);
print(MODIS_Terra, "collection")
var ndvi = MODIS_Terra.select('NDVI');
var ndviVis = {
min: -1000.0,
max: 5000.0,
palette: [
'ffffff', 'ce7e45', 'fcd163', 'c6ca02', '22cc04', '99b718', '207401',
'012e01'
],
};
Map.addLayer(ndvi, ndviVis, 'NDVI');
// Create a chart of NDVI for region
var chart2 = ui.Chart.image.series({
imageCollection: ndvi,
region: Haharu,
reducer: ee.Reducer.median(),
scale: 30
}).setChartType('ScatterChart')
.setOptions({
title: 'Median NDVI for region',
vAxis: {title: 'NDVI'},
});
//Display the chart in the console
print (chart2);