mapshader.core.point_aggregation#

mapshader.core.point_aggregation(cvs, data, xfield, yfield, zfield, geometry_field, agg_func)[source]#

Compute a reduction by pixel, mapping data to pixels as points.

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

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

  • xfield (str) – Column names for the x, y, and z coordinates of each point.

  • yfield (str) – Column names for the x, y, and z coordinates of each point.

  • zfield (str) – Column names for the x, y, and z coordinates of each point.

  • geometry_field (str) – Column name for geometry field. If provided, the xfield and yfield arguments will be ignored

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

Returns:

agg – The transformed datasource.

Return type:

xarray.DataArray