geosnap.analyze.segdyn.spacetime_dyn

geosnap.analyze.segdyn.spacetime_dyn(gdf, segregation_index=None, group_pop_var=None, total_pop_var=None, groups=None, time_index='year', distances=None, n_jobs=-1, backend='loky')[source]

Batch compute multiscalar segregation profiles for each time period in parallel.

Parameters:
gdfgeopandas.GeoDataFrame

geodataframe formatted as a long-form timeseries

segregation_indexsegregation.singlegroup or segregation.multigroup class

a segregation index class from the pysal segregation package

group_pop_varstr

name of column on gdf containing population counts for the group of interest

total_pop_varstr

name of column on gdf containing total population counts for the unit

groupslist

list of columns on gdf containing population counts for each group of interest (for multigroup indices)

distanceslist

list of distances used to define the radius of the egohood at each step of the profile

time_indexstr

column on the dataframe that denotes unique time periods, by default “year”

n_jobsint, optional

number of cores to use for computation. If -1, all available cores will be used, by default -1

backendstr, optional

computation backend passed to joblib. One of {‘multiprocessing’, ‘loky’, ‘threading’}, by default “loky”

Returns:
geopandas.GeoDataFrame

dataframe with unique time periods as rows and estimates for each spatial extent as columns