Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Spatial Statistics toolbox > Mapping Clusters toolset > Tools

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

Release 9.3
Last modified January 28, 2009
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

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 Illustration

Usage tips

Command line syntax
An overview of the Command Line window
HotSpots_stats <Input_Feature_Class> <Input_Field> <Output_Feature_Class> <Fixed Distance Band | Inverse Distance | Inverse Distance Squared | Zone of Indifference | Polygon Contiguity (First Order) | Get Spatial Weights From File> <Euclidean Distance | Manhattan Distance> <None | Row | Global> <Distance_Band_or_Threshold_Distance> {Self_Potential_Field} {Weights_Matrix_File}

Parameter Explanation Data Type
<Input_Feature_Class>

The feature class for which hot spot analysis will be performed.

Feature Layer
<Input_Field>

The numeric count field (number of victims, crimes, jobs, and so on) to be evaluated.

Field
<Output_Feature_Class>

The output feature class to receive the Results field and Gi z score.

Feature Class
<Fixed Distance Band | Inverse Distance | Inverse Distance Squared | Zone of Indifference | Polygon Contiguity (First Order) | Get Spatial Weights From File>

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 on computations. Requires an ArcInfo license.
  • 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.

Polygon contiguity is only available with an ArcInfo license.

String
<Euclidean Distance | Manhattan Distance>

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
<None | Row | Global>

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>

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 those of the Output Coordinate System.For the Inverse Distance conceptualizations of spatial relationships: A value of zero for this parameter indicates that no threshold distance is applied; when this parameter is left blank, a default threshold value will be computed and applied.This parameter has no effect when "Polygon Contiguity" or "Get Spatial Weights From File" spatial conceptualizations are selected.

Double
{Self_Potential_Field}

The field representing self-potential: The distance or weight between a feature and itself.

Field
{Weights_Matrix_File}

The pathname to a file containing spatial weights that define spatial relationships between features.

File
Data types for geoprocessing tool parameters


Command line example

workspace e:\project93\data
HotSpot tracts.shp AGE_65_UP tract65.shp 'Inverse Distance' 'Euclidean Distance' None # # # 

Scripting syntax
About getting started with writing geoprocessing scripts
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 Data Type
Input_Feature_Class (Required)

The feature class for which hot spot analysis will be performed.

Feature Layer
Input_Field (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 on computations. Requires an ArcInfo license.
  • 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.

Polygon contiguity is only available with an ArcInfo license.

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 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 those of the Output Coordinate System.For the Inverse Distance conceptualizations of spatial relationships: A value of zero for this parameter indicates that no threshold distance is applied; when this parameter is left blank, a default threshold value will be computed and applied.This parameter has no effect when "Polygon Contiguity" or "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

# Analyze the spatial distribution of 911 calls in a metropolitan area
# using the Hot-Spot Analysis Tool (Local Gi*)
# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create(9.3)
gp.OverwriteOutput = 1

# Local variables...
workspace = "C:\Data\911Call"

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

    # Copy the input feature class and integrate the points to snap
    # together at 500 feet
    # Process: Copy Features and Integrate
    cf = gp.CopyFeatures("911Calls.shp", "911Copied.shp",
                         "#", 0, 0, 0)

    integrate = gp.Integrate("911Copied.shp #", "500 Feet")

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

    # Add a unique ID field to the count feature class
    # Process: Add Field and Calculate Field
    af = gp.AddField("911Count.shp", "MyID", "LONG", "#", "#", "#", "#",
                     "NON_NULLABLE", "NON_REQUIRED", "#",
                     "911Count.shp")

    cf = gp.CalculateField("911Count.shp", "MyID", "[FID]", "VB")

    # Create Spatial Weights Matrix for Calculations
    # Process: Generate Spatial Weights Matrix... 
    swm = gp.GenerateSpatialWeightsMatrix("911Count.shp", "MYID",
                        "euclidean6Neighs.swm",
                        "K_NEAREST_NEIGHBORS",
                        "#", "#", "#", 6,
                        "NO_STANDARDIZATION") 

    # Hot Spot Analysis of 911 Calls
    # Process: Hot Spot Analysis (Getis-Ord Gi*)
    hs = gp.HotSpots("911Count.shp", "ICOUNT", "911HotSpots.shp", 
                     "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 gp.GetMessages()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.