Hot Spot Analysis (Getis-Ord Gi*) (Spatial Statistics)

Calculates the Getis-Ord Gi* statistic for hot spot analysis.

Learn more about how Hot Spot Analysis: Getis-Ord Gi* works


Illustration

Hot Spot Analysis (Getis-Ord Gi*) illustration

Usage Tips

Syntax

HotSpots_stats (Input_Feature_Class, Input_Field, Output_Feature_Class, Conceptualization_of_Spatial_Relationships, Distance_Method, Standardization, Distance_Band_or_Threshold_Distance, Self_Potential_Field, Weights_Matrix_File)
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.

  • Inverse Distance—The impact of one feature on another feature decreases with distance.
  • Inverse Distance Squared—Same as Inverse Distance, but the impact decreases more sharply over distance.
  • Fixed Distance Band—Everything within a specified critical distance is included in the analysis; everything outside the critical distance is excluded.
  • Zone of Indifference—A combination of Inverse Distance and Fixed Distance Band. Anything up to a critical distance has an impact on your analysis. Once that critical distance is exceeded, the level of impact quickly drops off.
  • Polygon Contiguity (First Order)—The neighbors of each feature are only those with which the feature shares a boundary. All other features have no influence.
  • Get Spatial Weights From File—Spatial relationships are defined in a spatial weights file. The pathname to the spatial weights file is specified in the Weights Matrix File parameter.

String
Distance Method (Required)

Specifies how distances are calculated when measuring concentrations.

  • Euclidean (as the crow flies)—The straight-line distance between two points.
  • Manhattan (city block)—The distance between two points measured along axes at right angles. Calculated by summing the (absolute) differences between point coordinates.

String
Standardization (Required)

The standardization of spatial weights provides more accurate results.

  • None—No standardization of spatial weights is applied. This is the default.
  • Row—Spatial weights are standardized by row. Each weight is divided by its row sum.

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 self-potential: 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
Data types for geoprocessing tool parameters

Script Example

# 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 Getis-Ord Gi* statistic
    # Process: Hot Spot Analysis (Getis-Ord 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)

See Also

  • Cluster and Outlier Analysis: Anselin Local Moran's I (Spatial Statistics)
  • Cluster/Outlier Analysis with Rendering (Spatial Statistics)
  • Hot Spot Analysis with Rendering (Spatial Statistics)
  • Modeling spatial relationships