libpysal: Python Spatial Analysis Library Core


libpysal offers four modules that form the building blocks in many upstream packages in the PySAL family:

  • Spatial Weights: libpysal.weights

  • Input-and output:

  • Computational geometry:

  • Built-in example datasets libpysal.examples

Examples demonstrating some of libpysal functionality are available in the tutorial.

Details are available in the libpysal api.

For background information see [RA07].


libpysal development is hosted on github.

Discussions of development occurs on the developer list as well as discord.

Getting Involved

If you are interested in contributing to PySAL please see our development guidelines.

Bug reports

To search for or report bugs, please see libpysal’s issues.

Citing libpysal

If you use PySAL in a scientific publication, we would appreciate citations to the following paper:

PySAL: A Python Library of Spatial Analytical Methods, Rey, S.J. and L. Anselin, Review of Regional Studies 37, 5-27 2007.

Bibtex entry:

  author={Rey, Sergio J. and Anselin, Luc},
  title={{PySAL: A Python Library of Spatial Analytical Methods}},
  journal={The Review of Regional Studies},
  keywords={Open Source; Software; Spatial}

License information

See the file “LICENSE.txt” for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.


Core components of the Python Spatial Analysis Library (PySAL)