segregation.dynamics.compute_multiscalar_profile

segregation.dynamics.compute_multiscalar_profile(gdf, segregation_index=None, groups=None, group_pop_var=None, total_pop_var=None, distances=None, network=None, decay='linear', function='triangular', precompute=True, **kwargs)[source]

Compute multiscalar segregation profile.

This function calculates several Spatial Information Theory indices with increasing distance parameters.

Parameters:
gdfgeopandas.GeoDataFrame

geodataframe with rows as observations and columns as population variables. Note that if using a network distance, the coordinate system for this gdf should be 4326. If using euclidian distance, this must be projected into planar coordinates like state plane or UTM.

segregation_indexSpatialImplicit SegregationIndex Class

a class from the library such as MultiInformationTheory, or MinMax

groupslist

list of population groups for calculating multigroup indices

group_pop_varstr

name of population group on gdf for calculating single group indices

total_pop_varstr

bame of total population on gdf for calculating single group indices

distanceslist

list of floats representing bandwidth distances that define a local environment.

networkpandana.Network (optional)

A pandana.Network likely created with segregation.network.get_osm_network.

decaystr (optional)

decay type to be used in pandana accessibility calculation options are {‘linear’, ‘exp’, ‘flat’}. The default is ‘linear’.

function: ‘str’ (optional)

which weighting function should be passed to libpysal.weights.Kernel must be one of: ‘triangular’,’uniform’,’quadratic’,’quartic’,’gaussian’

precompute: bool

Whether the pandana.Network instance should precompute the range queries. This is True by default

**kwargsdict

additional keyword arguments passed to each index (e.g. for setting a random seed in indices like ModifiedGini or ModifiedDissm)

Returns:
pandas.Series

Series with distances as index and index statistics as values

Notes

Based on Sean F. Reardon, Stephen A. Matthews, David O’Sullivan, Barrett A. Lee, Glenn Firebaugh, Chad R. Farrell, & Kendra Bischoff. (2008). The Geographic Scale of Metropolitan Racial Segregation. Demography, 45(3), 489–514. https://doi.org/10.1353/dem.0.0019.

Reference: [Sean F. Reardon et al., 2008].