mapshader.core.polygon_aggregation#

mapshader.core.polygon_aggregation(cvs, data, zfield, agg_func)[source]#

Compute a reduction by pixel, mapping data to pixels as one or more filled polygons.

Parameters:
  • cvs (datashader.Canvas) – The input canvas.

  • data (pandas.DataFrame, dask.DataFrame, or xarray.DataArray/Dataset) – The input datasource.

  • zfield (str) – Column names for z coordinate of each point.

  • agg_func (Reduction, optional) – Reduction to compute. Default is any().

Returns:

agg – The transformed datasource.

Return type:

xarray.DataArray