{"categories":[{"label":"GIS","url":"https://skillfed.io/packages/category/scientific-engineering-gis"}],"enrichment":{"capability":"Calculates over 40 segregation indices\u2014both aspatial and spatial\u2014to measure patterns of urban segregation, and tests their statistical significance and decomposes differences into spatial and demographic components.","skillfed_tags":["spatial-analysis","demographics","segregation-indices"],"use_cases":["Calculate dissimilarity or isolation indices to measure how evenly a demographic group is distributed across neighborhoods.","Compare segregation levels between two cities or time periods using inference tests to determine statistical significance.","Decompose changes in segregation into components driven by shifts in spatial structure versus demographic composition.","Compute local segregation indices to identify neighborhoods with high or low segregation relative to the city overall.","Analyze segregation using multiscalar definitions or distance-decay models to understand patterns at different geographic scales."],"what_it_does":"Segregation is a PySAL package for quantifying and analyzing patterns of urban segregation using demographic data. It implements a large suite of segregation indices\u2014ranging from classic measures like dissimilarity and isolation to modern spatial variants\u2014and wraps them as classes that accept a pandas or geopandas DataFrame, a group-of-interest column, and a total-population column to produce point estimates. Beyond calculation, the package provides statistical inference (testing whether estimates are significant or comparing two estimates) and decomposition (breaking differences into spatial-structure and demographic-structure components).\n\nThe package is built on a stack of geospatial and scientific Python libraries: geopandas for geometry handling, scikit-learn and scipy for statistical methods, numba for numerical acceleration, and joblib for parallelization. It targets researchers and practitioners analyzing residential patterns, income distribution, or other demographic segregation in urban areas. Spatial indices can use PySAL weights matrices, Euclidean distances, or topological relationships, giving users fine control over how distance and adjacency are defined.","worth_installing":"Yes. The package is actively maintained, has no known vulnerabilities, and fills a specialized but well-defined niche in spatial demographic analysis. Low install friction and a permissive license make adoption straightforward. Install it if you need to compute segregation indices or test segregation hypotheses; skip it if your work does not involve demographic or residential segregation measurement."},"id":"segregation","links":{"html":"https://skillfed.io/packages/segregation","md":"https://skillfed.io/packages/segregation.md","pypi":"https://pypi.org/project/segregation/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-18","license_spdx":null,"license_treatment":"permissive","name":"segregation","python_support":"supports_current","summary":"Analytics for spatial and non-spatial segregation in Python."},"popularity":{"monthly_downloads":150740,"position":10956,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.5.5"}
