/SpatialGenie

Read a shapefile, and print a tabulated Spatial Gini coefficient

Primary LanguagePython

SpatialGenie

This script is dependent on the following packages:

  • numpy
  • pysal
  • tabulate
  • argparse

All of these packages are available via pip.

pip install numpy pysal tabulate argparse

This script is intended to take a shapefile ID (to differentiate rows), and path to the shapefile, and print out a tabulated Spatial Gini coefficient for each column in the shapefile DBF file.

python SpatialGenie.py

There are other optional flags, including limiting the fields on which to calculate the Spatial Gini Coefficient

python SpatialGenie.py --fields [field1 field2 field3]