High/Low Clustering (Getis-Ord General G) (Spatial Statistics)


Measures the degree of clustering for either high values or low values using the Getis-Ord General G statistic. Results are accessible from the Results window.

Learn more about how High/Low Clustering: Getis-Ord General G works


High/Low Clustering (Getis-Ord General G) illustration



HighLowClustering_stats (Input_Feature_Class, Input_Field, Generate_Report, Conceptualization_of_Spatial_Relationships, Distance_Method, Standardization, Distance_Band_or_Threshold_Distance, {Weights_Matrix_File})
ParameterExplanationData Type

The feature class for which the General G statistic will be calculated.

Feature Layer

The numeric field to be evaluated.

  • NO_REPORTNo graphical summary will be created (default).
  • GENERATE_REPORTA graphical summary will be created as an HTML file.

Specifies how spatial relationships among features are conceptualized.

  • INVERSE_DISTANCENearby neighboring features have a larger influence on the computations for a target feature than features that are far away.
  • INVERSE_DISTANCE_SQUAREDSame as INVERSE_DISTANCE except that the slope is sharper so influence drops off more quickly and only a target feature's closest neighbors will exert substantial influence on computations for that feature.
  • FIXED_DISTANCE_BANDEach feature is analyzed within the context of neighboring features. Neighboring features inside the specified critical distance receive a weight of 1, and exert influence on computations for the target feature. Neighboring features outside the critical distance receive a weight of zero and have no influence on a target feature's computations.
  • ZONE_OF_INDIFFERENCEFeatures within the specified critical distance of a target feature receive a weight of 1 and influence computations for that feature. Once the critical distance is exceeded, weights (and the influence a neighboring feature has on target feature computations) diminish with distance.
  • POLYGON_CONTIGUITY_(FIRST_ORDER)Only neighboring polygon features that share a boundary will influence computations for the target polygon feature. (Requires an ArcInfo license)
  • GET_SPATIAL_WEIGHTS_FROM_FILESpatial relationships are defined in a spatial weights file. The path to the spatial weights file is specified in the Weights Matrix File parameter.

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

  • EUCLIDEAN_DISTANCEThe straight-line distance between two points (as the crow flies)
  • MANHATTAN_DISTANCEThe distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates

Row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.

  • 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).

Specifies a cutoff distance for Inverse Distance and Fixed Distance options. Features outside the specified cutoff for a target feature are ignored in analyses for that feature. However, for Zone of Indifference, the influence of features outside the given distance is reduced with distance, while those inside the distance threshold are equally considered. The value entered should match that of the output coordinate system.

For the Inverse Distance conceptualizations of spatial relationships, a value of 0 indicates that no threshold distance is applied; when this parameter is left blank, a default threshold value is computed and applied. This default value is the Euclidean distance that ensures every feature has at least one neighbor.

This parameter has no effect when Polygon Contiguity or Get Spatial Weights From File spatial conceptualizations are selected.


The path to a file containing spatial weights that define spatial relationships among features.


Code Sample

HighLowClustering Example (Python Window)

The following Python Window script demonstrates how to use the High/Low Clustering tool.

import arcpy
arcpy.env.workspace = r"C:\data"
arcpy.HighLowClustering_stats("911Count.shp", "ICOUNT","false", "GET_SPATIAL_WEIGHTS_FROM_FILE","EUCLIDEAN_DISTANCE", "NONE","#", "euclidean6Neighs.swm")
HighLowClustering Example (Stand-alone Python script)

The following stand-alone Python script demonstrates how to use the High/Low Clustering tool.

# Analyze the spatial distribution of 911 calls in a metropolitan area
# using the High/Low Clustering (Getis-Ord General G) tool
# Import system modules
import arcpy
# Set the geoprocessor object property to overwrite existing outputs
arcpy.gp.overwriteOutput = True
# Local variables...
workspace = r"C:\Data"

    # 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 500 feet
    # Process: Copy Features and Integrate
    cf = arcpy.CopyFeatures_management("911Calls.shp", "911Copied.shp",
                         "#", 0, 0, 0)

    integrate = arcpy.Integrate_management("911Copied.shp #", "500 Feet")

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

    # Add a unique ID field to the count feature class
    # Process: Add Field and Calculate Field
    af = arcpy.AddField_management("911Count.shp", "MyID", "LONG", "#", "#", "#", "#",
                     "NON_NULLABLE", "NON_REQUIRED", "#",
    cf = arcpy.CalculateField_management("911Count.shp", "MyID", "[FID]", "VB")

    # Create Spatial Weights Matrix for Calculations
    # Process: Generate Spatial Weights Matrix... 
    swm = arcpy.GenerateSpatialWeightsMatrix_stats("911Count.shp", "MYID",
                        "#", "#", "#", 6,

    # Cluster Analysis of 911 Calls
    # Process: High/Low Clustering (Getis-Ord General G)
    hs = arcpy.HighLowClustering_stats("911Count.shp", "ICOUNT", 
                        "EUCLIDEAN_DISTANCE", "NONE",
                        "#", "euclidean6Neighs.swm")

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


Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes