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:
- gdf
geopandas.GeoDataFrame
geodataframe formatted as a long-form timeseries
- segregation_index
segregation.singlegroup
orsegregation.multigroup
class
a segregation index class from the pysal segregation package
- group_pop_var
str
name of column on gdf containing population counts for the group of interest
- total_pop_var
str
name of column on gdf containing total population counts for the unit
- groups
list
list of columns on gdf containing population counts for each group of interest (for multigroup indices)
- distances
list
list of distances used to define the radius of the egohood at each step of the profile
- time_index
str
column on the dataframe that denotes unique time periods, by default “year”
- n_jobs
int
, optional number of cores to use for computation. If -1, all available cores will be used, by default -1
- backend
str
, optional computation backend passed to joblib. One of {‘multiprocessing’, ‘loky’, ‘threading’}, by default “loky”
- gdf
- Returns:
geopandas.GeoDataFrame
dataframe with unique time periods as rows and estimates for each spatial extent as columns