Skip to main content

Spatial Interaction Modeling Package

Continuous Integration codecov Documentation Status PyPI version Conda Version SPEC 0 — Minimum Supported Dependencies

The Spatial Interaction Modeling (SpInt) module seeks to provide a collection of tools to study spatial interaction processes and analyze spatial interaction data.

The initial development of the module was carried out as a Google Summer of Code project (summer 2016). Documentation of the project progress can be found on the project blog.

The module currently supports the calibration of the 'family' of spatial interaction models (Wilson, 1971) which are derived using an entropy maximizing (EM) framework or the equivalent information minimizing (IM) framework. As such, it is able to derive parameters for the following Poisson count models:

Models

  • unconstrained gravity model
  • production-constrained model (origin-constrained)
  • attraction-constrained model (destination-constrained)
  • doubly-constrained model

Calibration is carried out using iteratively weighted least squares in a generalized linear modleing framework (Cameron & Trivedi, 2013). These model results have been verified against comparable routines laid out in (Fotheringham and O’Kelly, 1989; Willimans and Fotheringham, 1984) and functions avaialble in R such as GL or Pythons statsmodels. The estimation of the constrained routines are carried out using sparse data strucutres for lower memory overhead and faster computations.

Additional Features

  • QuasiPoisson model estimation
  • Regression-based tests for overdispersion
  • Model fit statistics including typical GLM metrics, standardized root mean square error, and Sorensen similarit index
  • Vector-based Moran's I statistic for testing for spatial autcorrelation in spatial interaction data
  • Local subset model calibration for mappable sets of parameter estimates and model diagnostics
  • Three types of spatial interaction spatial weights: origin-destination contiguity weights, network-based weights, and vector-based distance weights

In Progress

  • Spatial Autoregressive (Lag) model spatial interaction specification

Future Work

  • Parameter estimation via maximum likelihood and gradient-based optimization
  • Zero-inflated Poisson model
  • Negative Binomial model/zero-inflated negative binomial model
  • Functions to compute competing destinations
  • Functions to compute eigenvector spatial filters
  • Parameter estimation via neural networks
  • Universal (determinsitic) models such as the Radiation model and Inverse Population Weighted model

Background

  • Cameron, C. A. and Trivedi, P. K. (2014). Regression analyis of count data. Cambridge University Press. DOI: 10.1017/CBO9781139013567
  • Fotheringham, A. S. and O'Kelly, M. E. (1989). Spatial Interaction Models: Formulations and Applications. London: Kluwer Academic Publishers.
  • Williams, P. A. and Fotheringham, A. S. (1984), The Calibration of Spatial Interaction Models by Maximum Likelihood Estimation with Program SIMODEL, Geographic Monograph Series, 7, Department of Geography, Indiana University.
  • Wilson, A. G. (1971). A Family of Spatial Interaction Models, and Associated Developments. Environment and Planning A, 3, 1–32. DOI: 10.1068/a030001

Release files for spint 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spint 1.1.0
File Size Uploaded
spint-1.1.0.tar.gz 654.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spint 1.1.0
File Interpreter ABI Platform
spint-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / spint-1.1.0.tar.gz

Download URL spint-1.1.0.tar.gz
Size 654.7 kB
Tags Source
SHA-256 checksum
How to use checksums
33fec949d9ac1bb258dac8599f33cd3e9c70af241938fa49312ec8ac7cf116ea
BLAKE2b-256 checksum
How to use checksums
a58445fc0592ccc4fb597cae790751d33ad124394cee5add9623adae8c028a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / spint-1.1.0-py3-none-any.whl

Download URL spint-1.1.0-py3-none-any.whl
Size 614.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdbcd2ab8440d46baaea682f444816c7fff83ee3845e4f6461927de3ea5201eb
BLAKE2b-256 checksum
How to use checksums
0776808952958592ce42f419c91543f8d3a2159346e750d8e80a4582d30b6918
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.7

1 release file

1.0.6

2 release files

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page