momepy.simpson_diversity#

momepy.simpson_diversity(values, bins=None, categorical=False)[source]#

Calculates the Simpson’s diversity index of data. Helper function for momepy.Simpson.

\[\lambda=\sum_{i=1}^{R} p_{i}^{2}\]
Parameters
valuespandas.Series

A list of values.

binsarray, optional

An array of top edges of classification bins. Should be equal to the result of binning.bins.

categoricalbool (default False)

Treat values as categories (will not use bins).

Returns
float

Simpson’s diversity index.

See also

momepy.Simpson

Calculates the Simpson’s diversity index.