Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!


Project Description

This is a python module for calculating global (Moran's I [1]) and local spatial autocorrelation [1.5] using the AMOEBA algorithm [2]. This code works on shapefiles, although a base class is provided to allow the examination of other objects, e.g. from a spatial database.


The easiest way is to call `` with the name and path of the shapefile, e.g.::

python path/to/file/filename.shp

To use in other python programs::

from lcia_autocorrelation.ac_shapefile import AutocorrelationShapefile
ac = AutocorrelationShapefile("filepath")

Autocorrelation calculations are made using the PySAL library; multiple measures of autocorrelation are possible.

Local Indicators of Spatial Autocorrelation (LISA)

`Moran's I <'s_I)>`_ is a single statistic for global autocorrelation. However, the calculation of Moran's I involves summing the individual cross products of each spatial unit. Local indicators of spatial association (LISA) (Anselin, L. (1995). "Local indicators of spatial association – LISA". Geographical Analysis, 27, 93-115) uses these local indicators directly, to calculate a local measure of clustering or autocorrelation. The LISA statistic is:

.. math::

I_{i} = \frac{Z_{i}}{}\sum_{j}W_{ij}Z_{j}

.. math::

I = \sum_{i}\frac{I_{i}}{N}

Where *I* is the autocorrelation statistic, *Z* is the deviation of the variable of interest from the average, and *W* is the spatial weight linking **i** to **j**.

We use the `PySAL library <>`_ to calculate `LISA statistics <>`_.


Using pip::

pip install lcia-autocorrelation

Using easy_install::

easy_install lcia-autocorrelation


The following packages are required

* numpy
* scipy
* pysal
* rtree
* osgeo
* django
* progressbar

Copyright and License

This code was written by Chris Mutel [3] during his studies at ETH Zurich [4], and is copyright 2011 ETH Zurich. The license is 2-clause BSD.
Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
py_amoeba-0.2.3.tar.gz (8.0 kB) Copy SHA256 Checksum SHA256 Source Apr 30, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting