I'm trying to extract daily weather parameters using https://developers.google.com/earth-engine/datasets/catalog/IDAHO_EPSCOR_GRIDMET. I'm trying to extract tmmx, tmmn and group them county-wise. Simply I want daily min and max temperatures for counties for a specified period of time. I'm new to Earth engine and I'm not sure how to go about the problem. Following is the code I have come up with. I'm struggling to figure out a way to aggregate the data.
var tmpCollection = ee.ImageCollection('IDAHO_EPSCOR/GRIDMET')
.select('tmmx', 'tmmn')
.filterDate('2017-01-01', '2017-12-31');
print(tmpCollection, 'weatherData');
var nonCONUS = ['02','15','60','66','69','72','78']
var counties=ee.FeatureCollection('TIGER/2018/Counties').filter(ee.Filter.inList('STATEFP', nonCONUS).not());
print(counties.size(), 'counties');
// visualize
Map.addLayer(counties,{},'counties');
var countyTemp = tmpCollection.map.reduceRegions({
collection: counties,
reducer: ee.Reducer.mean(),
scale: 4000
});
print(countyTemp);
// Export ---------------------------------------------------------------------
Export.table.toDrive({
collection: countyTemp,
description: 'weather_by_county',
folder: 'weather_project',
fileFormat: 'CSV'
});