xrspatial.local.cell_stats

xrspatial.local.cell_stats(raster, data_vars=None, func='sum')[source]

Calculates statistics of raster dataset on a cell-by-cell basis.

Parameters
  • raster (xarray.Dataset) – 2D or 3D labelled array.

  • data_vars (list of string) – Variable name list.

  • func (string, default=sum) – Statistic type. The supported types are max, mean, median, min, std, and sum.

Returns

final_arr

Return type

xarray.DataArray

References