segregation.local.LocalDistortion¶
- class segregation.local.LocalDistortion(data, groups=None, metric='euclidean', network=None, distance_matrix=None, normalize=False, **kwargs)[source]¶
Multigroup Local Distortion Coefficients.
- Parameters:
- data
pandas.DataFrame
orgeopandas.GeoDataFrame
,required
dataframe or geodataframe if spatial index holding data for location of interest
- groups
list
,required
list of columns on dataframe holding population totals for each group
- metric
str
(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: pandana.Network object (optional; None by default)
A pandana Network object used to compute distance between observations
- distance_matrix:
numpy array of distances between observations in the dataset
- normalization:
NOT YET IMPLEMENTED
- data
- Attributes:
- statistics
pandas.Series
KL Divergence coefficients
- core_data
a
pandas
DataFrame
DataFrame that contains the columns used to perform the estimate.
- statistics
Notes
Olteanu et al. (2019): ‘Segregation through the multiscalar lens’. https://doi.org/10.1073/pnas.1900192116
- __init__(data, groups=None, metric='euclidean', network=None, distance_matrix=None, normalize=False, **kwargs)[source]¶
Init.
Methods
__init__
(data[, groups, metric, network, ...])Init.