-
Notifications
You must be signed in to change notification settings - Fork 0
/
moisture.js
34 lines (30 loc) · 1.02 KB
/
moisture.js
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
// moisture dataset
var moisture = ee.ImageCollection("NASA_USDA/HSL/SMAP10KM_soil_moisture")
.filterBounds(Kericho)
// selecting only surface soil moisture
.filterDate('2022-01-01','2022-01-31')
.select('ssm')
.map(function(moisture){return moisture.clip(Kericho)});
// Visualization parameters
var moistureVis = {
min: 0.0,
max: 300.0,
palette: [
'ffffff', 'fcd163', '99b718', '66a000', '3e8601', '207401', '056201',
'004c00', '011301'
],
};
//drawing the roi on the map
Map.setCenter(35.2863,0.3689,5);
Map.addLayer(moisture, moistureVis, 'Moisture');
//Creating Chart for moisture
var moisturechart=ui.Chart.image.series(moisture, Kericho, ee.Reducer.mean(), 1000)
moisturechart.setOptions({
title:'Kericho Soil Moisture Assessment (mm)',
hAxis:{title:'Dates ' ,titleTextStyle:{italic:false,bold:true}},
vAxis:{
title:'Moisture Levels ' ,titleTextStyle:{italic:false,bold:true},
interpolateNulls: true
}
})
print(moisturechart)