1

I have used Reducer.mean to get mean values of two different image collections. To export these values into a table, I need to rename "mean" for one of them, but have not been abled to do so. If I am not mistaken, it should come after a part of the code that looks like this:

// Getting the mean temperature for each region for per day
    var timeseries_temp = coll_var.map(function(img) {
      return img.select('mean_2m_air_temperature').reduceRegions({
        collection: regions,
        reducer: ee.Reducer.mean(),
        scale: 10000
      }).filter(ee.Filter.neq('mean', null))
      .map(function(f){
        return f.set('Day', img.id());
      });
    }).flatten();

1 Answers1

3

You can rename the output(s) of a reducer using setOutputs. For example, this might be useful to distinguish different images:

        reducer: ee.Reducer.mean().setOutputs(["mean_" + img.id()]),
Kevin Reid
  • 37,492
  • 13
  • 80
  • 108