Incremental Spatial Autocorrelation (Spatial Statistics)

License Level:BasicStandardAdvanced

Summary

Measures spatial autocorrelation for a series of distances and optionally creates a line graph of those distances and their corresponding z-scores. Z-scores reflect the intensity of spatial clustering, and statistically significant peak z-scores indicate distances where spatial processes promoting clustering are most pronounced. These peak distances are often appropriate values to use for tools with a Distance Band or Distance Radius parameter.

Illustration

Incremental Spatial Autocorrelation
Z-score peaks reflect distances where the spatial processes promoting clustering are most pronounced.

Usage

Syntax

IncrementalSpatialAutocorrelation_stats (Input_Features, Input_Field, Number_of_Distance_Bands, {Beginning_Distance}, {Distance_Increment}, {Distance_Method}, {Row_Standardization}, {Output_Table}, {Output_Report_File})
ParameterExplanationData Type
Input_Features

The feature class for which spatial autocorrelation will be measured over a series of distances.

Feature Layer
Input_Field

The numeric field used in assessing spatial autocorrelation.

Field
Number_of_Distance_Bands

The number of times to increment the neighborhood size and analyze the dataset for spatial autocorrelation. The starting point and size of the increment are specified in the Beginning Distance and Distance Increment parameters, respectively.

Long
Beginning_Distance
(Optional)

The distance at which to start the analysis of spatial autocorrelation and the distance from which to increment. The value entered for this parameter should be in the units of the Output Coordinate System environment setting.

Double
Distance_Increment
(Optional)

The distance to increase after each iteration. The distance used in the analysis starts at the Beginning Distance and increases by the amount specified in the Distance Increment. The value entered for this parameter should be in the units of the Output Coordinate System environment setting.

Double
Distance_Method
(Optional)

Specifies how distances are calculated from each feature to neighboring features.

  • EUCLIDEANThe straight-line distance between two points (as the crow flies)
  • MANHATTANThe distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates
String
Row_Standardization
(Optional)
  • NONENo standardization of spatial weights is applied.
  • ROWSpatial weights are standardized; each weight is divided by its row sum (the sum of the weights of all neighboring features).
Boolean
Output_Table
(Optional)

The table to be created with each distance band and associated z-score result.

Table
Output_Report_File
(Optional)

The PDF file to be created containing a line graph summarizing results.

File

Code Sample

IncrementalSpatialAutocorrelation example 1 (Python window)

The following Python window script demonstrates how to use the IncrementalSpatialAutocorrelation tool.

import arcpy, os
import arcpy.stats as SS
arcpy.env.workspace = r"C:\ISA"
SS.IncrementalSpatialAutocorrelation("911CallsCount.shp", "ICOUNT", "20", "", "", "EUCLIDEAN",
                                           "ROW_STANDARDIZATION", "outTable.dbf", "outReport.pdf")
IncrementalSpatialAutocorrelation example (stand-alone Python script)

The following stand-alone Python script demonstrates how to use the IncrementalSpatialAutocorrelation tool.

# Hot Spot Analysis of 911 calls in a metropolitan area
# using the Incremental Spatial Autocorrelation and Hot Spot Analysis Tool

# Import system modules
import arcpy, os
import arcpy.stats as SS

# Set geoprocessor object property to overwrite existing output, by default
arcpy.gp.overwriteOutput = True

# Local variables
workspace = r"C:\ISA"

try:
    # Set the current workspace (to avoid having to specify the full path to the feature classes each time)
    arcpy.env.workspace = workspace

    # Copy the input feature class and integrate the points to snap together at 30 feet
    # Process: Copy Features and Integrate
    cf = arcpy.CopyFeatures_management("911Calls.shp", "911Copied.shp","#", 0, 0, 0)
    integrate = arcpy.Integrate_management("911Copied.shp #", "30 Feet")

    # Use Collect Events to count the number of calls at each location
    # Process: Collect Events
    ce = SS.CollectEvents("911Copied.shp", "911Count.shp")

    # Use Incremental Spatial Autocorrelation to get the peak distance
    # Process: Incremental Spatial Autocorrelation
    isa = SS.IncrementalSpatialAutocorrelation(ce, "ICOUNT", "20", "", "", "EUCLIDEAN",
                                                     "ROW_STANDARDIZATION", "outTable.dbf", "outReport.pdf")

    # Hot Spot Analysis of 911 Calls
    # Process: Hot Spot Analysis (Getis-Ord Gi*)
    distance = isa.getOutput(2)
    hs = SS.HotSpots(ce, "ICOUNT", "911HotSpots.shp", "Fixed Distance Band",
                           "Euclidean Distance", "None",  distance, "", "")

except:
    # If an error occurred when running the tool, print out the error message.
    print arcpy.GetMessages()

Environments

Output Coordinate System

Feature geometry is projected to the Output Coordinate System prior to analysis. All mathematical computations are based on the Output Coordinate System spatial reference.

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
4/18/2013