ee.Reducer.group

Groups reducer records by the value of a given input, and reduces each group with the given reducer.

UsageReturns
Reducer.group(groupField, groupName)Reducer
ArgumentTypeDetails
this: reducerReducerThe reducer to apply to each group, without the group field.
groupFieldInteger, default: 0The field that contains record groups.
groupNameString, default: "group"The dictionary key that contains the group. Defaults to 'group'.