Calculates the GetisOrd Gi* statistic for hot spot analysis.
Learn more about how Hot Spot Analysis: GetisOrd Gi* works
Given a set of weighted data points, the GetisOrd Gi* statistic identifies those clusters of points with values higher in magnitude than you might expect to find by random chance. (For line and polygon features, centroids are calculated prior to analysis.)
The output of the Gi function is a z score for each feature. The z score represents the statistical significance of clustering for a specified distance. In this tool, the Z Score is based on Randomization Null Hypothesis computation. For more information on Z Scores, see What is a Z Score?.
The Gi function creates a new feature class that duplicates the input feature class, then adds a new Results column for the Gi z score. The name of the output field is Gi<distance_method>. If a field of this name already exists in the input feature class, it will be overwritten in the output feature class.
A high z score for a feature indicates its neighbors have high attribute values, and vice versa. The higher (or lower) the z score, the stronger the association. A z score near zero indicates no apparent concentration (neighbors have a range of values).
To determine if the z score is statistically significant, you compare it to the range of values for a particular confidence level. For example, at a significance level of 0.05, a z score would have to be less than –1.96 or greater than 1.96 to be statistically significant.
The units of the "Distance Band or Threshold Distance" parameter are the units of the input feature class' coordinate system. There is one exception to this rule. When the Output Coordinate System environment variable is set, then the units of the distance band will be the units of the coordinate system set in that environment.
For line and polygon features, geometric centroids are calculated before the central feature is identified. The geometric centroid of a feature may be located outside a feature's boundary. If centroids must be within feature boundaries, use the Features to Points (Inside option) to create centroids before performing the GetisOrd Gi* operation.
This function creates as derived output the name of the Gi z score field created. This output is useful when using the tool in conjunction with a rendering tool in both the model building and scripting environments.
Calculations are based on either Euclidean or Manhattan distance and require projected data to accurately measure distances.
When the spatial conceptualization is an Inverse Distance method (for example, Inverse Distance, Inverse Distance Squared, or Zone of Indifference) any two points that are coincident will be given a weight of one to avoid a divide by zero errors. This assures that no local features are excluded from the analysis.
This tool computes the Gi* statistic; however, if you specify a Self Potential field in which all values are zero, the simple Gi statistic will be computed.
Current map layers may be used to define the input feature class. When using layers, only the currently selected features are used in the GetisOrd Gi* operation.
In ArcGIS version 9.2, the "Global" standardization option has been removed. Global standardization returns the same results as no standardization. Models built with previous versions of ArcGIS that use the Hot Spot Analysis tool with the Global standardization option will need to be rebuilt.
The following environment settings affect this tool: Cluster Tolerance, Extent, M Domain, Configuration Keyword, Coordinate System, Output has M Values, Output Spatial Grid, Output has Z Values, Default Z Value, Output XY Domain, and Output Z Domain.
Parameter  Explanation  Datatype 

Input Feature Class (Required) 
The feature class for which hot spot analysis will be performed.

Feature Layer 
(Enter the dialog displayName for this parameter here.) (Required) 
The numeric count field (number of victims, crimes, jobs, and so on) to be evaluated.

Field 
Output Feature Class (Required) 
The output feature class to receive the Results field and Gi z score.

Feature Class 
Conceptualization of Spatial Relationships (Required) 
Specifies how spatial relationships between features are conceptualized.

String 
Distance Method (Required) 
Specifies how distances are calculated when measuring concentrations.

String 
Standardization (Required) 
The standardization of spatial weights provides more accurate results.

String 
Distance Band or Threshold Distance (Required) 
Specifies a distance cutoff value. Features outside the specified Distance Band or Threshold Distance are ignored in the hot spot analysis. The value entered for this parameter should be in the units of the Input Feature Class' coordinate system. There is one exception. If the Output Coordinate System environment variable is set, the value entered for this parameter should be in the units of the coordinate system set in that environment.A value of zero indicates that no threshold distance is applied. This is only valid with the "Inverse Distance" and "Inverse Distance Squared" spatial conceptualizations.This parameter has no effect when "Polygon Contiguity" and "Get Spatial Weights From File" spatial conceptualizations are selected.

Double 
Self Potential Field (Optional) 
The field representing selfpotential: The distance or weight between a feature and itself.

Field 
Weights Matrix File (Optional) 
The pathname to a file containing spatial weights that define spatial relationships between features.

File 
# Perform Hot Spot Analysis for assault incidents # Import system modules import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() # Local variables... workspace = "C:/project93/data" input = "assaults.shp" collect_output = "collect_output.shp" collect_count_field = "Count" hotspot_output = "hotspot_output.shp" hotspot_output_rendered = "hotspot_output_rendered.lyr" z_score_field_name = "GiInvDst" try: # Set the current workspace (to avoid having to specify the full path to the feature classes each time) gp.workspace = workspace # Convert assault incidents into weighted point data # Process: Collect Events... gp.CollectEvents_stats(input, collect_output) # Calculate GetisOrd Gi* statistic # Process: Hot Spot Analysis (GetisOrd Gi*)... gp.HotSpots_stats(collect_output, collect_count_field, hotspot_output, "Inverse Distance", "Euclidean Distance", "None", "#", "#", "#") # Render hot spot analysis # Process: Z Score Rendering... gp.ZRenderer_stats(hotspot_output, z_score_field_name, hotspot_output_rendered) except: # If an error occurred when running the tool, print out the error message. print gp.GetMessages(2)