I'm trying to extract specific field data which is in shapefile. There was an error while executing the following code in GEE as argument invalid type. the screenshot shows the error message.
Can you help to solve the problem?
var startYear = 2018;
var endYear = 2019;
print(countries)
for(var i=0;i<countries.size().getInfo();i++){
var startMonth =countries.filter(ee.Filter.eq('startMonth',i));
for(var j=0;j<countries.size().getInfo();j++){
var startDay = countries.filter(ee.Filter.eq('startDay',j));
var start = ee.Date.fromYMD(startYear, startMonth,startDay);
}
}
for(var i=0;i<countries.size().getInfo();i++){
var endMonth =countries.filter(ee.Filter.eq('endMonth',i));
for(var j=0;j<countries.size().getInfo();j++){
var endDay = countries.filter(ee.Filter.eq('endDay',j));
var end = ee.Date.fromYMD(endYear, endMonth, endDay);
//print(typeof endMonth)
}
}
print(typeof startDay)
print(start)
print(end)
Here startMonth,startDay and endMonth,endDate are the fields in attribute table(in shapefile) I want to extract these field data based on the country.special thing is there is another column country as 'ADM0_NAME'.