I am trying to calculate the temperature per district in Afghanistan with the following code. However, I receive the following error when trying to calculate the mean per district:
Unrecognized arguments (collection) to function: Image.reduceRegion(image, reducer, geometry, scale, crs, crsTransform, bestEffort, maxPixels, tileScale)
///Code
var region = ee.FeatureCollection('users/mm/countries')
.filterMetadata('COUNTRY', 'equals', 'Afghanistan');
var districts = ee.FeatureCollection('users/mm/AFG_districts')
var modisLSTday = ee.ImageCollection('MODIS/MOD11A2')
.select('LST_Day_1km');
var modLSTday = modisLSTday.map(function(img) {return img.multiply(0.02)
.subtract(273.15)
.copyProperties(img,['system:time_start','system:time_end']);});
var collectionday = ee.ImageCollection(modLSTday).filterDate('2014-01-01', '2015-01-01');
var clippedday = collectionday.mean().clip(region);
var clippedday_district = clippedday.reduceRegion({
collection: districts,
reducer: ee.Reducer.mean(),
scale: 400,
})
;