geodata.plot.ds_ts_aggregate
============================

.. py:function:: geodata.plot.ds_ts_aggregate(ds: Union[xarray.Dataset, xarray.DataArray], agg_method: ReductionType) -> Union[xarray.DataArray, xarray.Dataset]

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

   :param ds: The xarray Dataset.
   :type ds: Union[xr.Dataset, xr.DataArray]
   :param agg_method: 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.
   :type agg_method: Literal["mean", "sum"]

   :returns: The aggregated xarray Dataset.
   :rtype: Union[xr.Dataset, xr.DataArray]

   :raises NotImplementedError: If the aggregation method is not supported.

