I want to read the minimum and maximum rainfall value for my study region. While using the reducer
function I can read the mean value, however, for min and max value it is showing null. I wish to extract the min and max value to control the color bar/ palette limit. How to read the min and max values.
Below is my script,
Map.addLayer(Tawi, visParams, nameLayer, shown, opacity); /Tawi is the name of shapefile
Map.centerObject(Tawi);
var ChirpsDataset = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY');
var Chirps = ChirpsDataset.filterDate('2018-07-14', '2019-07-30').sum().clip(Tawi);
print(Chirps, 'Precipitation');
var precip = Chirps.select('precipitation');
var meanValue = Chirps.reduceRegion({
reducer: ee.Reducer.mean(),
geometry: Tawi.geometry(),
crs: 'EPSG:4326',
crsTransform: [1,0,0,0,1,0],
maxPixels: 1e9
});
print('Mean precipitation:', meanValue)
var maxValue = Chirps.reduceRegion({
reducer: ee.Reducer.max(),
geometry: Tawi.geometry(),
crs: 'EPSG:4326',
crsTransform: [1,0,0,0,1,0],
maxPixels: 1e9
});
print('Max precipitation:', maxValue)
Here is the link to script.