Find hot spots | Documentation | Esri Developer (2024)

A hot spot analysis resulting in a new layer with statistically high population values by USA county.

What is a hot spot analysis?

A hot spot analysis is the process of determining if there are statistically significant clusters in spatial data. To execute the analysis, use the spatial analysis service and the FindHotspot operation.

Find hot spots | Documentation | Esri Developer (1)

The analysis uses the (Gi* de Getis-Ord) equation to find groups of clusters of either point or polygon data based on high (hot) or low (cold) values, which are defined as the resultant z-scores and p-values. For a feature to be in a hot spot cluster, it must have a high value and be surrounded by other clusters with high values. For a feature to be in a cold spot cluster, the feature must have a low value and be surrounded by other clusters with low values.

A hot spot analysis helps to find spatial trends and patterns in the data that may not be visible at first glance.

Real-world examples of this analysis include the following:

  • Finding high and low clusters of crime or traffic crash incidents.
  • Discovering the distribution of high and low property values in an area.
  • Determining where people are spending the most money in an area compared to another.

How to perform a hot spot analysis

  1. Review the parameters for the FindHotSpots operation.
  2. Send a request to get the spatial analysis service URL.
  3. Execute a job request with the following URL and parameters:
    • URL: https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/FindHotSpots/submitJob
    • Parameters:
      • analysisLayer: Your dataset as a hosted feature layer or feature collection.
      • analysisField: A numeric field.
      • shapeType: Fishnet or Hexagon.
      • outputName: A string representing the name of the hosted feature layer to return with the results.
  4. Check the status.
  5. Get the output layer results.

To see examples using ArcGIS API for Python, ArcGIS REST JS, and the ArcGIS REST API, go to Examples below.

URL request

Use dark colors for code blocksCopy
http://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/FindHotSpots/submitJob?<parameters>

Required parameters

NameDescriptionExamples
fThe format of the data returned.f=json f=pjson
tokenAn OAuth 2.0 access token.token=<ACCESS_TOKEN>
analysisLayerThe point or polygon feature layer.{url:"https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Average_PDX_home_values/FeatureServer/0"}
analysisFieldUse if the analysis layer contains polygons.counts, rates, averages

Key parameters

NameDescriptionExamples
shapeTypeUse if the analysis layer contains points.hexagon, fishnet
boundingPolygonLayerWhen the analysis layer contains points and no analysisField is specified, you can provide a boundary for the analysis.{url:"https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Delaware_County_Municipal_Boundaries/FeatureServer/0"}
outputNameA string representing the name of the hosted feature layer to return with the results. NOTE: If you do not include this parameter, the results are returned as a feature collection (JSON).{"serviceProperties": {"name": "<SERVICE_NAME>"}}
contextA bounding box or output spatial reference for the analysis."extent":{"xmin:", "ymin:", "xmax:", "ymax:"}

Code examples

Find traffic crash hot spots

This example uses the FindHotSpots operation to determine where there are statistically significant clusters of Traffic crashes counted within a fishnet grid. The red clusters represent a statistically high number of crashes. The blue spots represent a statistically low number of crashes.

In the analysis, the analysisLayer value is the Traffic crashes hosted feature layer. The points in the layer are counted within a fishnet, which was set in the shapeType parameter.


APIs

ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS

Expand

Use dark colors for code blocksCopy
traffic_crashes = "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Traffic_Crashes/FeatureServer/0"fishnet = "fishnet"results = find_hot_spots( analysis_layer=traffic_crashes, shape_type=fishnet, # Outputs results as a hosted feature layer. output_name="Hot spot analysis results",)result_features = results.layers[0].query()print(f"The hot spot layer has {len(result_features.features)} new records")

Expand

Go to tutorial

Service requests

Request
HTTPHTTPcURL
Use dark colors for code blocksCopy
POST arcgis.com/sharing/rest/portals/self HTTP/1.1Content-Type: application/x-www-form-urlencoded&f=json&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocksCopy
{ "helperServices": { // Other parameters "analysis": { "url": "https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer" }, "geoenrichment": { "url": "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer" } }}

Identify high and low home values

This example uses the FindHotSpots operation to determine where there are statistically significant hot and cold spots for home values in Portland. The hot and cold spots, shown as red and blue respectively, indicate whether a home's value is in a statistically high or low cluster.

In the analysis, the analysisLayer value is the Enriched Portland hexagon bins hosted feature layer. The feature layer was created using generated hexagon bins that were enriched using data from the GeoEnrichment service. To analyze home values, you set the analysisField with the AVG_CY attribute.

To learn how to generate hexagon bins, go to generate tessellations.

Hot spot analysis showing statistically significant areas of high home values.


APIs

ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS

Expand

Use dark colors for code blocksCopy
pdx_homes = { "url": "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Enriched_PDX_hex_bin_tessellations/FeatureServer/0", "filter": "AVGVAL_CY <> 0",}value = "AVGVAL_CY"results = find_hot_spots( analysis_layer=pdx_homes, analysis_field=value, # Outputs results as a hosted feature layer. output_name="Hot spot analysis results",)result_features = results.layers[0].query()print(f"The hot spot layer has {len(result_features.features)} new records")

Expand

Go to tutorial

Service requests

Request
HTTPHTTPcURL
Use dark colors for code blocksCopy
POST arcgis.com/sharing/rest/portals/self HTTP/1.1Content-Type: application/x-www-form-urlencoded&f=json&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocksCopy
{ "helperServices": { // Other parameters "analysis": { "url": "https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer" }, "geoenrichment": { "url": "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer" } }}
Find hot spots | Documentation | Esri Developer (2024)
Top Articles
Latest Posts
Article information

Author: Laurine Ryan

Last Updated:

Views: 6329

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Laurine Ryan

Birthday: 1994-12-23

Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603

Phone: +2366831109631

Job: Sales Producer

Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy

Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.