Sum daily chirps for yearly rainfall

Fix the code below to display yearly rainfall maps

// import image collection
var chirps = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY")
chirps = chirps.filterDate("??","??").??()

// filter for Sri Lanka
var countries = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw');
var country_names = ['??'];
var myCountry = countries.filter(ee.Filter.inList('Country', country_names));
var aoi = myCountry.geometry();

// add map
Map.addLayer(chirps.clip(aoi),{min:??,max:??,palette:"??,??,??"},"??");

link

Advertisements