Visual analytics for spatial analysis with PySAL.
What is splot?
splot connects spatial analysis done in
PySAL to different popular visualization toolkits like
splot package allows you to create both static plots ready for publication and interactive visualizations for quick iteration and spatial data exploration. The primary goal of
splot is to enable you to visualize popular
PySAL objects and gives you different views on your spatial analysis workflow.
splot is compatible with
Python 3.6 and 3.7 and depends on
geopandas 0.4.0 or later and
matplotlib 2.2.2 or later.
splot also uses
Depending on your spatial analysis workflow and the
PySAL objects you would like to visualize,
splot relies on:
- PySAL 2.0
or separate packages found in the
There are two ways of accessing
splot is installed with the PySAL 2.0 metapackage through:
$ pip install -U pysal or $ conda install -c conda-forge pysal
splot can be installed as a separate package. If you are using Anaconda, install
splot via the
$ conda install -c conda-forge splot
Otherwise you can install
PyPI with pip:
$ pip install splot
Usage examples for different spatial statistical workflows are provided as notebooks:
- for creating value-by-alpha maps
- for assessing the relationship between neighboring polygons
- for the visualization of space-time autocorrelation, also documented in giddy
- for visualizing spatial autocorrelation of univariate or multivariate variable analysis
You can also check our documentation for examples on how to use each function. A detailed report about the development, structure and usage of
splot can be found here. More tutorials for the whole
PySAL ecosystem can be found in our notebooks book project.
Contributing to splot
splot is an open source project within the Python Spatial Analysis Library that is supported by a community of Geographers, visualization lovers, map fans, users and data scientists. As a community we work together to create splot as our own spatial visualization toolkit and will gratefully and humbly accept any contributions and ideas you might bring into this project.
Feel free to check out our discussion spaces, add ideas and contributions:
- Idea collection which PySAL objects to support and how new visualizations could look like
- Discussion about the splot API
- Ideas how to integrate other popular visualization toolkits like
If you have never contributed before or you are just discovering what
splot have to offer, reading through """Doc-strings""" and correcting our Documentation can be a great way to start. Check for spelling and grammar mistakes or use pep8 and pyflakes to clean our
.py files. This will allow you to get used to working with git and generally allows you to familiarize yourself with the
PySAL code base.
If you have already used
splot and you are missing object-specific views for your analysis feel free to add to our code-base or discuss your ideas. Please make sure you include unit test, documentation and examples or (create an issue so someone else can work together with you). The common
splot API design discussed here can help you to decide how to best integrate your visualization prototype into
Beyond working on documentation and prototyping new visualizations, you can always write a bug report or feature request on Github issues. Whether large or small, any contribution makes a big difference and we hope you enjoy being part of our community as much as we do! The only thing we ask is that you abide principles of openness, respect, and consideration of others as described in the PySAL Code of Conduct.
We are planning on extending
splot's visualization toolkit in future. Functionality we plan to implement includes:
- visualisations for density methods (mapping density estimations)
- cross-hatching fill styles for maps (to allow choropleth visualizations without class intervals)
- legendgrams (map legends that visualize the distribution of observations by color in a given map)
If you are interested in working on one of these or any other methods, check out the linked issues or get in touch!