xrspatial.classify.box_plot#

xrspatial.classify.box_plot(agg: DataArray, hinge: float = 1.5, name: str | None = 'box_plot') DataArray[source]#

Classify data using box plot breakpoints.

Uses Q1, median (Q2), Q3, and the whiskers (Q1 - hinge*IQR, Q3 + hinge*IQR) as class boundaries.

Parameters:
  • agg (xr.DataArray or xr.Dataset) – 2D NumPy, CuPy, NumPy-backed Dask, or CuPy-backed Dask array of values to be classified.

  • hinge (float, default=1.5) – Multiplier for the IQR to determine whisker extent.

  • name (str, default='box_plot') – Name of output aggregate array.

Returns:

box_plot_agg – 2D aggregate array of box plot classifications. All other input attributes are preserved. If agg is a Dataset, returns a Dataset with each variable classified independently.

Return type:

xr.DataArray or xr.Dataset

References