# Extract daily area average value of ERA-5 minimum temperature of 30 years using GEE?

I'm struggling in finding a way to extract daily minimum temperatures for a particular month (at present for january) and a study area (an imported shapefile as chamoli), for a selected period of time (1990-2021(30 years)). For now, I have extracted the daily minimum temperature for the study area. I need to have one average value for each day of the study area as table.

```````var era5_2mt = ee.ImageCollection('ECMWF/ERA5/DAILY')
.select('minimum_2m_air_temperature')
.filter(ee.Filter.calendarRange(1990,2021,'year'))
.filter(ee.Filter.calendarRange(1,1,'month'));
var study_area = era5_2mt.map
(function(era5_2mt){
return era5_2mt.clip(table);
});
var vis2mt = {
min: 250,
max: 320,
palette: [
'#000080', '#0000D9', '#4000FF', '#8000FF',
'#0080FF', '#00FFFF', '#00FF80',
'#80FF00', '#DAFF00', '#FFFF00', '#FFF500',
'#FFDA00', '#FFB000', '#FFA400',
'#FF4F00', '#FF2500', '#FF0A00', '#FF00FF'
]
};
``````

Geometry in your asset is not available so, I assumed one arbitrarily in USA. For 'minimum_2m_air_temperature' in Celsius degrees, following code works as expected.

``````var geometry = ee.Geometry.Polygon(
[[[-106.62578125, 37.316033269641146],
[-106.62578125, 35.97625743920629],
[-104.780078125, 35.97625743920629],
[-104.780078125, 37.316033269641146]]], null, false);

var era5_2mt = ee.ImageCollection('ECMWF/ERA5/DAILY')
.select('minimum_2m_air_temperature')
.filter(ee.Filter.calendarRange(1990,2010,'year'))
.filter(ee.Filter.calendarRange(1,1,'month'));

var era5_2mt_list = era5_2mt.toList(era5_2mt.size());

print(era5_2mt_list);

var study_area = era5_2mt_list.map(function(img){

var date = ee.Date(ee.Image(img).get('system:time_start')).format().slice(0, 10);
img = ee.Image(img).subtract(273.15);

// Reducing region and getting value
var value_temp = ee.Image(img)
.reduceRegion(ee.Reducer.mean(), geometry)
.get('minimum_2m_air_temperature');

return [date, value_temp];

});

var vis2mt = {
min: -20,
max: -10,
palette: [
'#000080', '#0000D9', '#4000FF', '#8000FF', '#0080FF', '#00FFFF', '#00FF80',
'#80FF00', '#DAFF00', '#FFFF00', '#FFF500', '#FFDA00', '#FFB000', '#FFA400',
'#FF4F00', '#FF2500', '#FF0A00', '#FF00FF'
]
};

var image = ee.Image(era5_2mt_list.get(0))
.subtract(273.15)
.clip(geometry);

print(image);

Map.centerObject(image);

print(study_area);

var myFeatures = ee.FeatureCollection(study_area.map(function(el){
el = ee.List(el); // cast every element of the list

return ee.Feature(null, {
'date': el.get(0),
'temp_min': el.get(1),
});
}));

print(myFeatures);

// Export features, specifying corresponding names.
Export.table.toDrive(myFeatures,