High/Low Clustering (GetisOrd General G) (Spatial Statistics)
Summary
Measures the degree of clustering for either high values or low values using the GetisOrd General G statistic. Results are accessible from the Results window.
Learn more about how High/Low Clustering: GetisOrd General G works
Illustration
Usage

The High/Low Clustering tool returns 5 values: Observed General G, Expected General G, Variance, zscore, and pvalue. These values are accessible from the Results window and are also passed as derived output values for potential use in models or scripts. Optionally, this tool will create an HTML file with a graphical summary of results. Doubleclicking on the HTML file in the Results window will open the HTML file in the default Internet browser. Rightclicking on the Messages entry in the Results window and selecting View will display the results in a Message dialog box.
Note: If this tool is part of a custom model tool, the HTML link will only appear in the Results window if it is set as a model parameter prior to running the tool.
 For best display of HTML graphics, ensure your monitor is set for 96 DPI.

The Input Field should contain a variety of nonnegative values. You will get an error message if the Input Field contains negative values. In addition, the math for this statistic requires some variation in the variable being analyzed; it cannot solve if all input values are 1, for example. If you want to use this tool to analyze the spatial pattern of incident data, consider aggregating your incident data.

The zscore and pvalue are measures of statistical significance which tell you whether or not to reject the null hypothesis. For this tool, the null hypothsis states that the values associated with features are randomly distributed.

The zscore is based on the randomization null hypothesis computation. For more information on zscores, see What is a zscore? What is a pvalue?

The higher (or lower) the zscore, the stronger the intensity of the clustering. A zscore near zero indicates no apparent clustering within the study area. A positive zscore indicates clustering of high values. A negative zscores indicates clustering of low values.

Calculations based on either Euclidean or Manhattan distance require projected data to accurately measure distances.

For line and polygon features, feature centroids are used in distance computations. For multipoints, polylines, or polygons with multiple parts, the centroid is computed using the weighted mean center of all feature parts. The weighting for point features is 1, for line features is length, and for polygon features is area.

In ArcGIS 10, optional graphical output is no longer displayed automatically. Instead, an HTML file summarizing results is created. To view results, doubleclick on the HTML file in the Results window. Custom scripts or model tools created prior to ArcGIS 10 that use this tool may need to be rebuilt. To rebuild these custom tools, open them, remove the Display Results Graphically parameter, then resave.

Your choice for the Conceptualization of Spatial Relationships parameter should reflect inherent relationships among the features you are analyzing. The more realistically you can model how features interact with each other in space, the more accurate your results will be. Click here for recommendations. Here are some additional tips:
 A binary weighting scheme is recommended for this statistic. Select Fixed Distance Band, Polygon Contiguity, K Nearest Neighbors, or Delaunay Triangulation for the Conceptualization of Spatial Relationships parameter. Select None for the Standardization parameter.
 Fixed Distance Band
The default Distance Band or Threshold Distance will ensure each feature has at least one neighbor, and this is important. But often, this default will not be the most appropriate distance to use for your analysis. For more information about the Distance Band or Threshold Distance parameter, click here.
 Inverse Distance or Inverse Distance Squared (not recommended)
When zero is entered for the Distance Band or Threshold Distance parameter, all features are considered neighbors of all other features; when this parameter is left blank, the default threshold distance will be applied.
Weights for distances less than 1 become unstable. The weighting for features separated by less than 1 unit of distance (common with Geographic Coordinate System projections), are given a weight of 1.
Caution:Analysis on features with a Geographic Coordinate System projection is not recommended when you select any of the inverse distance based spatial conceptualization methods (Inverse Distance, Inverse Distance Squared, or Zone of Indifference).
For the Inverse Distance options (Inverse Distance, Inverse Distance Squared, or Zone of Indifference), any two points that are coincident will be given a weight of one to avoid zero division. This assures features are not excluded from analysis.

Additional options for the Conceptualization of Spatial Relationships parameter are available using the Generate Spatial Weights Matrix or Generate Network Spatial Weights tools. To take advantage of these additional options, use one of these tools to construct the spatial weights matrix file prior to analysis; select GET_SPATIAL_WEIGHTS_FROM_FILE for the Conceptualization of Spatial Relationships parameter; and, for the Weights Matrix File parameter, specify the path to the spatial weights file you created.

Map layers can be used to define the Input Feature Class. When using a layer with a selection, only the selected features are included in the analysis.
 If this tool is part of a custom model tool, the HTML link will only appear in the Results window if it is set as a model parameter prior to running the tool.
 For best display of HTML graphics, ensure your monitor is set for 96 DPI.
 ASCII formatted spatial weights matrix files:
 Weights are used "as is". Missing featuretofeature relationships are treated as zeros.
 If the weights are row standardized, results will likely be incorrect for analyses on selection sets. If you need to run your analysis on a selection set, convert the ASCII spatial weights file to a .swm file by reading the ASCII data into a table, then using the CONVERT_TABLE option with the Generate Spatial Weights Matrix tool.
 .SWM formatted spatial weights matrix file
 If the weights are row standardized, they will be restandardized for selection sets. Otherwise weights are used "as is".
Running your analysis with an ASCII formatted spatial weights matrix file is memory intensive. For analyses on more than about 5000 features, consider converting your ASCII formatted spatial weights matrix file into a .swm formatted file. First put your ASCII weights into a formatted table (using Excel, for example). Next run the Generate Spatial Weights Matrix tool using CONVERT_TABLE for the Conceptualization of Spatial Relationships parameter. The output will be a .swm formatted spatial weights matrix file.

The Modeling Spatial Relationships help topic provides additional information about this tool's parameters.
If you provide a Weights Matrix File with a .SWM or .swm extension, this tool is expecting a spatial weights matrix file created using either the Generate Spatial Weights Matrix or Generate Network Spatial Weights tools. Otherwise this tool is expecting an ASCII formatted spatial weights matrix file. In some cases, behavior is different depending on which type of spatial weights matrix file you use:
When using shapefiles, keep in mind that they cannot store null values. Tools or other procedures that create shapefiles from nonshapefile inputs may store or interpret null values as zero. This can lead to unexpected results. See also Geoprocessing considerations for shapefile output.
In ArcGIS 9.2, the Global standardization option was removed. Global standardization returns the same results as no standardization. Models built with previous versions of ArcGIS that use the Global standardization option may need to be rebuilt.
Syntax
Parameter  Explanation  Data Type 
Input_Feature_Class 
The feature class for which the General G statistic will be calculated.  Feature Layer 
Input_Field 
The numeric field to be evaluated.  Field 
Generate_Report 
 Boolean 
Conceptualization_of_Spatial_Relationships 
Specifies how spatial relationships among features are conceptualized.
 String 
Distance_Method 
Specifies how distances are calculated from each feature to neighboring features.
 String 
Standardization 
Row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.
 String 
Distance_Band_or_Threshold_Distance 
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.  Double 
Weights_Matrix_File (Optional) 
The path to a file containing spatial weights that define spatial relationships among features.  File 
Code Sample
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")
The following standalone 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 (GetisOrd 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" 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 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", "#", "911Count.shp") 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", "euclidean6Neighs.swm", "K_NEAREST_NEIGHBORS", "#", "#", "#", 6, "NO_STANDARDIZATION") # Cluster Analysis of 911 Calls # Process: High/Low Clustering (GetisOrd General G) hs = arcpy.HighLowClustering_stats("911Count.shp", "ICOUNT", "false", "GET_SPATIAL_WEIGHTS_FROM_FILE", "EUCLIDEAN_DISTANCE", "NONE", "#", "euclidean6Neighs.swm") except: # If an error occurred when running the tool, print out the error message. print arcpy.GetMessages()