segregation.inference.sim_dual_composition

segregation.inference.sim_dual_composition(df1, df2, group_pop_var1, total_pop_var1, group_pop_var2, total_pop_var2)[source]

Apply the ‘composition’ for both minority and complementary groups.

Parameters:
df1pandas.DataFrame or geopandas.GeoDataFrame

dataframe for first dataset with columns holding group and total population counts

df2pandas.DataFrame or geopandas.GeoDataFrame

dataframe for second dataset with columns holding group and total population counts

group_pop_var1str

column holding population counts for group of interest on input df1

total_pop_var1str

column holding total population counts on input df1

group_pop_var2str

column holding population counts for group of interest on input df2

total_pop_var2str

column holding total population counts on input df2

Returns:
two pandas.DataFrame

dataframes with simulated population columns appended