ESDA: Exploratory Spatial Data Analysis

ESDA is an open-source Python library for the exploratory analysis of spatial data. A subpackage of PySAL (Python Spatial Analysis Library), it is under active development and includes methods for global and local spatial autocorrelation analysis.

Installation

esda supports python 3.5 and 3.6 only. Please make sure that you are operating in a python 3 environment.

Installing released version

esda is available on the Python Package Index. Therefore, you can either install directly with pip from the command line:

pip install -U esda

or download the source distribution (.tar.gz) and decompress it to your selected destination. Open a command shell and navigate to the decompressed folder. Type:

pip install .

Installing development version

Potentially, you might want to use the newest features in the development version of esda on github - pysal/esda while have not been incorporated in the Pypi released version. You can achieve that by installing pysal/esda by running the following from a command shell:

pip install git+https://github.com/pysal/esda.git

You can also fork the pysal/esda repo and create a local clone of your fork. By making changes to your local clone and submitting a pull request to pysal/esda, you can contribute to esda development.

API reference

Gamma Statistic

esda.Gamma(y, w[, operation, standardize, …])

Gamma index for spatial autocorrelation

Geary Statistic

esda.Geary(y, w[, transformation, permutations])

Global Geary C Autocorrelation statistic

Getis-Ord Statistics

esda.G(y, w[, permutations])

Global G Autocorrelation Statistic

esda.G_Local(y, w[, transform, …])

Generalized Local G Autocorrelation

Join Count Statistics

esda.Join_Counts(y, w[, permutations])

Binary Join Counts

Moran Statistics

esda.Moran(y, w[, transformation, …])

Moran’s I Global Autocorrelation Statistic

esda.Moran_BV(x, y, w[, transformation, …])

Bivariate Moran’s I

esda.Moran_BV_matrix(variables, w[, …])

Bivariate Moran Matrix

esda.Moran_Local(y, w[, transformation, …])

Local Moran Statistics

esda.Moran_Local_BV(x, y, w[, …])

Bivariate Local Moran Statistics

esda.Moran_Rate(e, b, w[, adjusted, …])

Adjusted Moran’s I Global Autocorrelation Statistic for Rate Variables [AR99]

esda.Moran_Local_Rate(e, b, w[, adjusted, …])

Adjusted Local Moran Statistics for Rate Variables [Assuncao1999]

Spatial Pearson Statistics

esda.Spatial_Pearson([connectivity, …])

Global Spatial Pearson Statistic

esda.Local_Spatial_Pearson([connectivity, …])

Local Spatial Pearson Statistic

Modifiable Areal Unit Tests

esda.Smaup(n, k, rho)

S-maup: Statistical Test to Measure the Sensitivity to the Modifiable Areal Unit Problem

Utility Functions

esda.fdr(pvalues[, alpha])

Calculate the p-value cut-off to control for the false discovery rate (FDR) for multiple testing.

References

Ans95

Luc Anselin. Local indicators of spatial association-LISA. Geographical Analysis, 27(2):93–115, Sep 1995. URL: http://dx.doi.org/10.1111/j.1538-4632.1995.tb00338.x, doi:10.1111/j.1538-4632.1995.tb00338.x.

AR99

Renato M. Assuncao and Edna A. Reis. A new proposal to adjust Moran’s I for population density. Statistics in Medicine, 18(16):2147–2162, Aug 1999. URL: http://dx.doi.org/10.1002/(sici)1097-0258(19990830)18:16<2147::aid-sim179>3.0.co;2-i, doi:10.1002/(sici)1097-0258(19990830)18:16<2147::aid-sim179>3.0.co;2-i.

BY01

Yoav Benjamini and Daniel Yekutieli. The control of the false discovery rate in multiple testing under dependency. The Annals of Statistics, 29(4):1165–1188, 2001. URL: http://www.jstor.org/stable/2674075.

CO81

A.D. Cliff and J.K. Ord. Spatial Processes: Models and Applications. Pion, London, 1981.

dCS06

Marcia Caldas de Castro and Burton H. Singer. Controlling the false discovery rate: a new application to account for multiple and dependent tests in local statistics of spatial association. Geographical Analysis, 38(2):180–208, April 2006. URL: http://dx.doi.org/10.1111/j.0016-7363.2006.00682.x, doi:10.1111/j.0016-7363.2006.00682.x.

DLP18

Juan C. Duque, H. Laniado, and A. Polo. S-maup: statistical test to measure the sensitivity to the modifiable areal unit problem. PLOS ONE, 13(11):1–25, 11 2018. URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0207377, doi:https://doi.org/10.1371/journal.pone.0207377.

GO10

Arthur Getis and J. K. Ord. The analysis of spatial association by use of distance statistics. Geographical Analysis, 24(3):189–206, Sep 2010. URL: http://dx.doi.org/10.1111/j.1538-4632.1992.tb00261.x, doi:10.1111/j.1538-4632.1992.tb00261.x.

HGC81

L. J. Hubert, R. G. Golledge, and C. M. Costanzo. Generalized procedures for evaluating spatial autocorrelation. Geographical Analysis, 13(3):224–233, Sep 1981. URL: http://dx.doi.org/10.1111/j.1538-4632.1981.tb00731.x, doi:10.1111/j.1538-4632.1981.tb00731.x.

Lee01

Sang-Il Lee. Developing a bivariate spatial association measure: an integration of Pearson’s r and Moran’s I. Journal of Geographical Systems, 3(4):369–385, Dec 2001. URL: https://doi.org/10.1007/s101090100064, doi:10.1007/s101090100064.

OG10

J. K. Ord and Arthur Getis. Local spatial autocorrelation statistics: distributional issues and an application. Geographical Analysis, 27(4):286–306, Sep 2010. URL: http://dx.doi.org/10.1111/j.1538-4632.1995.tb00912.x, doi:10.1111/j.1538-4632.1995.tb00912.x.

Introduction

esda implements measures for the exploratory analysis spatial data and is part of the PySAL family

Details are available in the esda api.

Development

esda development is hosted on github.

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

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 esda’s issues.

Citing esda

If you use PySAL-esda 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:

@Article{pysal2007,
  author={Rey, Sergio J. and Anselin, Luc},
  title={{PySAL: A Python Library of Spatial Analytical Methods}},
  journal={The Review of Regional Studies},
  year=2007,
  volume={37},
  number={1},
  pages={5-27},
  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.