geodata.plot.ds_ts_aggregate

geodata.plot.ds_ts_aggregate#

geodata.plot.ds_ts_aggregate(ds: xarray.Dataset | xarray.DataArray, agg_method: ReductionType) xarray.DataArray | xarray.Dataset#

Aggregate the xarray.Dataset or xarray.DataArray along the lat and lon dimensions.

Parameters:
  • ds (Union[xr.Dataset, xr.DataArray]) – The xarray Dataset.

  • agg_method (Literal["mean", "sum"]) – The aggregation method. If “mean”, the mean of all of the values will be taken. If “sum”, the sum of all of the values will be taken.

Returns:

The aggregated xarray Dataset.

Return type:

Union[xr.Dataset, xr.DataArray]

Raises:

NotImplementedError – If the aggregation method is not supported.