Optimized Hot Spot Analysis (Spatial Statistics)

License Level:BasicStandardAdvanced

Summary

Given incident points or weighted features (points or polygons), creates a map of statistically significant hot and cold spots using the Getis-Ord Gi* statistic. It evaluates the characteristics of the input feature class to produce optimal results.

Learn more about how Optimized Hot Spot Analysis works

Illustration

Optimized Hot Spot Analysis

Usage

Syntax

OptimizedHotSpotAnalysis_stats (Input_Features, Output_Features, {Analysis_Field}, {Incident_Data_Aggregation_Method}, {Bounding_Polygons_Defining_Where_Incidents_Are_Possible}, {Polygons_For_Aggregating_Incidents_Into_Counts}, {Density_Surface})
ParameterExplanationData Type
Input_Features

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

Feature Layer
Output_Features

The output feature class to receive the z-score, p-value, and Gi_Bin results.

Feature Class
Analysis_Field
(Optional)

The numeric field (number of incidents, crime rates, test scores, and so on) to be evaluated.

Field
Incident_Data_Aggregation_Method
(Optional)

The aggregation method to use to create weighted features for analysis from incident point data.

  • COUNT_INCIDENTS_WITHIN_FISHNET_POLYGONSA fishnet polygon mesh will overlay the incident point data and the number of incidents within each polygon cell will be counted. If no bounding polygon is provided in the Bounding Polygons Defining Where Incidents Are Possible parameter, only cells with at least one incident will be used in the analysis; otherwise, all cells within the bounding polygons will be analyzed.
  • COUNT_INCIDENTS_WITHIN_AGGREGATION_POLYGONSYou provide aggregation polygons to overlay the incident point data in the Polygons For Aggregating Incidents Into Counts parameter. The incidents within each polygon are counted.
  • SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTSNearby incidents will be aggregated together to create a single weighted point. The weight for each point is the number of aggregated incidents at that location.
String
Bounding_Polygons_Defining_Where_Incidents_Are_Possible
(Optional)

A polygon feature class defining where the incident Input Features could possibly occur.

Feature Layer
Polygons_For_Aggregating_Incidents_Into_Counts
(Optional)

The polygons to use to aggregate the incident Input Features in order to get an incident count for each polygon feature.

Feature Layer
Density_Surface
(Optional)

The output density surface of point input features. This parameter is only enabled when Input Features are points and you have the ArcGIS Spatial Analyst extension. The output surface created will be clipped to the raster analysis mask specified in your environment settings. If no raster mask is specified, the output raster layer will be clipped to a convex hull of the input features.

Raster Dataset

Code Sample

OptimizedHotSpotAnalysis example 1 (Python window)

The following Python window script demonstrates how to use the OptimizedHotSpotAnalysis tool.

import arcpy
arcpy.env.workspace = r"C:\OHSA"
arcpy.OptimizedHotSpotAnalysis_stats("911Count.shp", "911OptimizedHotSpots.shp", "#", "SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTS", "#", "#", "calls911Surface.tif")
OptimizedHotSpotAnalysis example 2 (stand-alone Python script)

The following stand-alone Python script demonstrates how to use the OptimizedHotSpotAnalysis tool.

# Analyze the spatial distribution of 911 calls in a metropolitan area

# Import system modules
import arcpy

# Set geoprocessor object property to overwrite existing output, by default
arcpy.overwriteOutput = True

# Local variables...
workspace = r"C:\OHSA\data.gdb"

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

   # Create a polygon that defines where incidents are possible  
   # Process: Minimum Bounding Geometry of 911 call data
    arcpy.MinimumBoundingGeometry_management("Calls911", "Calls911_MBG", "CONVEX_HULL", "ALL", 
                                             "#", "NO_MBG_FIELDS")

    # Optimized Hot Spot Analysis of 911 call data using fishnet aggregation method with a bounding polygon of 911 call data
# Process: Optimized Hot Spot Analysis 
    ohsa = arcpy.OptimizedHotSpotAnalysis_stats("Calls911", "Calls911_ohsaFishnet", "#", "COUNT_INCIDENTS_WITHIN_FISHNET_POLYGONS", 
                                                "Calls911_MBG", "#", "#") 

except:
    # If any error occurred when running the tool, print the messages
    print arcpy.GetMessages()

Environments

Output Coordinate System

Feature geometry is projected to the Output Coordinate System prior to analysis. All mathematical computations are based on the Output Coordinate System spatial reference. When the Output Coordinate System is based on degrees, minutes, and seconds, geodesic distances are estimated using chordal distances.

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
8/26/2014