segregation.inference.simulate_systematic_geo_permutation

segregation.inference.simulate_systematic_geo_permutation(df, group=None, total=None, groups=None)[source]

Simulate systematic redistribution followed by random permutation of geographic units.

Parameters:
dfgeopandas.GeoDataFrame

geodataframe with population data to be randomized

groupstr, optional

name of column on geodataframe that holds the group total (for use with single group indices)

totalstr, optional

name of column on geodataframe that holds the total population for each unit (for use with single group indices)

groupslist, optional

list of columns on input dataframe that hold total population counts for each group of interest

Returns:
geopandas.GeoDataFrame

geodataframe with systematically randomized population groups