{"categories":[{"label":"GIS","url":"https://skillfed.io/packages/category/scientific-engineering-gis"}],"enrichment":{"capability":"Spopt solves spatial optimization problems including regionalization, facility location, and transportation-oriented modeling using geographic data and constraint-based algorithms.","skillfed_tags":["spatial-optimization","regionalization","facility-location"],"use_cases":["Partition a country into regions for administrative planning or data collection while respecting population thresholds and geographic contiguity.","Locate emergency service facilities (hospitals, fire stations) to maximize coverage of demand points across a street network.","Group census tracts or neighborhoods into homogeneous clusters for analysis while maintaining spatial connectivity.","Solve max-p-regions problems to find the minimum number of regions that satisfy a population or attribute threshold.","Model transportation networks to optimize routing or service delivery under distance and capacity constraints."],"what_it_does":"Spopt is a Python library for solving spatial optimization problems on geographic data, originating from PySAL's region module and now actively developed as a standalone package. It handles three main problem classes: regionalization (grouping geographic units into contiguous regions under constraints), facility location (siting facilities to serve demand across a network), and transportation-oriented modeling. The library integrates tightly with geopandas for spatial data handling, libpysal for spatial weights and connectivity, and pulp for constraint programming, allowing you to define optimization objectives and constraints over geographic features.\n\nTypical workflows involve loading geographic data as GeoDataFrames, defining spatial relationships through weights matrices, and instantiating a model class (like MaxPHeuristic for regionalization or MCLP for facility location) with your data and parameters. The library handles the translation to an optimization problem, solves it via an external solver, and returns region assignments or facility locations as labels you can map back to your original data. It's designed for researchers and practitioners working with spatial planning, urban design, or resource allocation problems where geography and adjacency constraints matter.","worth_installing":"Yes. Spopt is actively maintained, has no known vulnerabilities, installs with low friction, and fills a specific niche in spatial optimization that is not easily replicated by combining other packages. Install it if you are solving regionalization, facility location, or network-based optimization problems on geographic data; skip it if your work is purely aspatial or does not require constraint-based optimization."},"id":"spopt","links":{"html":"https://skillfed.io/packages/spopt","md":"https://skillfed.io/packages/spopt.md","pypi":"https://pypi.org/project/spopt/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-07-14","license_spdx":null,"license_treatment":"permissive","name":"spopt","python_support":"supports_current","summary":"Spatial Optimization in PySAL"},"popularity":{"monthly_downloads":102102,"position":12891,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.7.0"}
