Welcome to splot’s documentation!¶
- Release
1.1.3
- Date
Mar 23, 2020
splot provides PySAL users with a lightweight visualization interface to explore their data and quickly iterate through static and dynamic visualisations.
Installation¶
Installing dependencies¶
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. Please make sure that you are operating in a Python 3 environment.
splot also uses
numpy
seaborn
mapclassify
Ipywidgets
Depending on your spatial analysis workflow and the PySAL objects you would like to visualize, splot relies on:
PySAL >=2.0
or the installation of separate packages found in the PySAL stack:
esda
libpysal
spreg
giddy
Installing the newest release¶
There are two ways of accessing splot. First, splot is installed with the PySAL 2.0 metapackage through:
`$ pip install -U pysal`
or
`$ conda install -c conda-forge pysal`
Second, splot can be installed as a separate package. If you are using Anaconda, install splot via the conda utility:
`$ conda install -c conda-forge splot`
Otherwise, you can install splot from PyPI with pip:
`$ pip install splot`
Troubleshooting¶
Most common installation errors are due to splot’s dependency on GeoPandas.
It often helps to first install GeoPandas separately from conda-forge with:
`$ conda install --channel conda-forge geopandas`
before installing splot (preferably also from conda, alternatively from pip).
For more information on troubleshooting the installation of GeoPandas with pip, see the GeoPandas docuemntation.
It is also possible to install splot with a later Python version (>3.7) through the separate installation of GeoPandas or through installation with conda-forge. (Note that splot is currently only tested for Python version 3.6 and 3.7)
Installing the development version¶
Potentially, you might want to use the newest features in the development version of splot on github - pysal/splot while have not been incorporated in the Pypi released version. You can achieve that by installing pysal/splot by running the following from a command shell:
pip install git+https://github.com/pysal/splot.git
You can also fork the pysal/splot repo and create a local clone of your fork. By making changes to your local clone and submitting a pull request to pysal/splot, you can contribute to the splot development.
API reference¶
splot.giddy
¶
Provides visualisations for the Geospatial Distribution Dynamics - giddy module. giddy provides a tool for space–time analytics that consider the role of space in the evolution of distributions over time.
Directional LISA analytics¶
|
Heatmap indicating significant transition of LISA values over time inbetween Moran Scatterplot quadrants |
|
Plot dynamic LISA values in a rose diagram. |
|
Plot vectors of positional transition of LISA values in Moran scatterplot |
|
Composite visualisation for dynamic LISA values over two points in time. |
|
Interactive exploration of dynamic LISA values for different dates in a dataframe. |
splot.esda
¶
Provides visualisations for the esda subpackage. esda provides tools for exploratory spatial data analysis that consider the role of space in a distribution of attribute values.
Moran analytics¶
|
Moran Scatterplot |
|
Global Moran’s I simulated reference distribution. |
|
Global Moran’s I simulated reference distribution and scatterplot. |
|
Bivariate Moran’s I simulated reference distribution. |
|
Bivariate Moran’s I simulated reference distribution and scatterplot. |
|
Create a LISA Cluster map |
|
Produce three-plot visualisation of Moran Scatteprlot, LISA cluster and Choropleth maps, with Local Moran region and quadrant masking |
|
Moran Facet visualization. |
splot.libpysal
¶
Provides visualisations for all core components of Python Spatial Analysis Library in libpysal.
libpysal weights¶
|
Plot spatial weights network. |
splot.mapping
¶
Provides Choropleth visualizations and mapping utilities.
Value-by-Alpha maps¶
|
Calculates Value by Alpha rgba values |
|
Value by Alpha Choropleth |
|
Creates Value by Alpha heatmap used as choropleth legend. |
|
Classify your data with pysal.mapclassify Note: Input parameters are dependent on classifier used. |
Colormap utilities¶
|
Function to offset the “center” of a colormap. |
|
Function to truncate a colormap by selecting a subset of the original colormap’s values |