segregation.multigroup.GlobalDistortion

class segregation.multigroup.GlobalDistortion(data, groups=None, metric='euclidean', network=None, distance_matrix=None, normalize=True, n_seeds=4, **kwargs)[source]

Multigroup Global Distortion Index.

Parameters:
datapandas.DataFrame or geopandas.GeoDataFrame, required

dataframe or geodataframe if spatial index holding data for location of interest

groupslist, required

list of columns on dataframe holding population totals for each group

metricstr (optional; ‘euclidean’ by default)

Distance metric for calculating pairwise distances, Accepts any inputs to scipy.spatial.distance.pdist. Ignored if passing a network or distance matrix

network: pandarm.Network object (optional, None by default)

A pandarm Network object used to compute distance between observations

distance_matrix: numpy.array (optional; None by default)

numpy array of distances between observations in the dataset

normalize: bool (optional; True by default)

If True, divide by the theoretical maximum Distortion: the largest local coefficient in the most segregated configuration possible given the study region’s group totals. Note that 1.0 is not reachable for the global index – see Notes.

n_seeds: int (optional; 4 by default)

Number of corner positions used to build the maximally-segregated reference landscape. Raising this tightens the normalization constant at the cost of one extra divergence profile per seed. Ignored when normalize is False.

Attributes:
statisticspandas.Series

KL Divergence coefficients

core_dataa pandas DataFrame

DataFrame that contains the columns used to perform the estimate.

normalization_constantfloat or None

The maximal-segregation distortion coefficient used to normalize the index, or None when normalize is False.

Notes

The index is the population-weighted mean of the local Distortion coefficients (de Bézenac et al. 2022, Eq. 4).

When normalize is True, the divisor is the theoretical maximum Distortion, which the source defines for a local unit: “the maximum local distortion in the most segregated configuration possible given the global distribution of the population” (Note 4). Dividing a population-weighted mean by that local maximum means the normalized global index does not reach 1.0 even for a maximally segregated landscape. This is intended, not a defect – the authors state plainly that “the Global Distortion upper bound is comparably out of reach” because “the normalization process is in fact formulated for the local unit … and does not refer to a set of possible global configurations (unlike the two others) but to the most segregated unit of an ethnically concentric city” (p. 10).

Consequently the normalized global value is not comparable to Dissimilarity or the H-index on a shared 0-1 scale. To compare across cities or over time, the source compares relative variation between measurements (the gradient of each measure) rather than effective values. Do not “fix” this by normalizing with the global index of the extreme configuration – that would depart from the published definition.

Based on Bézenac, C., Clark, W. A. V., Olteanu, M., & Randon‐Furling, J. (2022). Measuring and Visualizing Patterns of Ethnic Concentration: The Role of Distortion Coefficients. Geographical Analysis, 54(1), 173–196. https://doi.org/10.1111/gean.12271

Reference: [Bézenac et al., 2022].

__init__(data, groups=None, metric='euclidean', network=None, distance_matrix=None, normalize=True, n_seeds=4, **kwargs)[source]

Init.

Methods

__init__(data[, groups, metric, network, ...])

Init.