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:
- gdf
geopandas.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_index
SpatialImplicit
SegregationIndex
Class
a class from the library such as MultiInformationTheory, or MinMax
- groups
list
list of population groups for calculating multigroup indices
- group_pop_var
str
name of population group on gdf for calculating single group indices
- total_pop_var
str
bame of total population on gdf for calculating single group indices
- distances
list
list of floats representing bandwidth distances that define a local environment.
- network
pandana.Network
(optional
) A pandana.Network likely created with segregation.network.get_osm_network.
- decay
str
(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
- **kwargs
dict
additional keyword arguments passed to each index (e.g. for setting a random seed in indices like ModifiedGini or ModifiedDissm)
- gdf
- 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].