The EightyTwentyAnalysis task performs Pareto analysis and creates point clusters, lines, or polygons based on the number of associated incidents. In the context of geography, Pareto analysis (also known as the 80-20 rule) posits that a disproportionate number of incidents (80 percent) occur at a small subset of locations (20 percent). The EightyTwentyAnalysis task calculates a cumulative percentage field to identify the locations where incidents are disproportionately occurring.

Request URL

Use dark colors for code blocksCopy
1
https://<analysis url>/EightyTwentyAnalysis/submitJob

Request parameters

NameRequiredTypeDefaultDescription
inputLayer Required featuresThe point layer representing incident locations.
aggregationMethod Required stringPointClusterSpecifies whether the points will be aggregated using clustering or a comparison feature.
clusterTolerance Optional linear unitThe maximum distance at which points will be considered part of the same cluster.
inComparisonFeatures Sometimes required featuresThe line or polygon layer used to aggregate points by the closest feature.
matchFields Optional stringPairs of fields used for attribute matching.
outFields Optional field The fields from the input features that will be transferred to the output.
outputName Optional string The name of the output feature service.
context Optional stringThe extent and output spatial reference environments.
f Optional stringhtmlThe response format.

required Required sometimes required Sometimes required optional Optional

inputLayer

feature | required

The point features that will be used to calculate the locations where incidents are disproportionately occurring.

Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:

  • A URL to a feature service layer with an optional filter to select specific features
  • A feature collection

Examples:

  • {"url": <feature service layer url>, "filter": <where clause>}
  • {"layerDefinition": {}, "featureSet": {}, "filter": <where clause>}

aggregationMethod

string | required

Default value: PointCluster

Accepted values: PointCluster | ClosestFeature

Specifies how the input points will be aggregated. The following methods are available:

  • PointCluster—The input points will be clustered based on the Defined distance (DBSCAN) clustering method, which identifies clusters by searching within a specified search distance. This method is appropriate when all the meaningful clusters have similar densities.

  • ClosestFeature—The input points will be associated with the closest lines or polygons from the inComparisonFeatures layer.

Example: aggregationMethod: ClosestFeature

clusterTolerance

linear unit | optional

Accepted unit values: FEET |YARDS | MILES | METERS | KILOMETERS

Specifies the maximum distance separating points at which they will be considered part of the same cluster. If no cluster tolerance is specified, the tool will create clusters where multiple point features are in the same location.

This parameter is available when PointCluster is chosen for aggregationMethod.

Syntax: {"distance":<double>, "units":<string>}

Examples:

  • {"distance":500, "units":"FEET"}

  • {"distance":2.5, "units":"KILOMETERS"}

inComparisonFeatures

feature | sometimes required

Specifies the input line or polygon features used to aggregate the input points.

This parameter is required when ClosestFeature is chosen for aggregationMethod.

Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:

  • A URL to a feature service layer with an optional filter to select specific features
  • A feature collection

matchFields

string | optional

Specifies pairs of fields from inputLayer and inComparisonFeatures that will be used for attribute matching. Only the records from inputLayer that share match field values with inComparisonFeatures will be included in the aggregation. For example, a street name field could be used in a crime analysis in which inComparisonFeatures are the street centerlines. If matchFields is not set, the tool will aggregate points to the nearest feature based on distance alone.

This parameter is available when ClosestFeature is chosen for aggregationMethod.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
[
  {
    "Point Fields":"fieldNameA",
    "Comparison Fields":"fieldNameB"
  }
]

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
[
  {
    "Point Fields":"BasinName",
    "Comparison Fields":"BASIN"
  },
  {
    "Point Fields":"ActiveStatus",
    "Comparison Fields":"Status"
  }
]

outFields

field | optional

Specifies the fields that will be included in the output result layer. The chosen fields are used to assign attributes to the output dataset that can help identify individual features.

If PointCluster is chosen for aggregationMethod, the output fields are chosen from inputLayer. When multiple features exist at the same location, the field value from the first feature is used. If ClosestFeature is chosen for aggregationMethod, the output fields are chosen from inComparisonFeatures.

If no fields are chosen, the output will only include generated fields.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
[
  {
    "alias":<string>,
    "defaultValue":<value>,
    "editable":<boolean>,
    "length":<integer>,
    "name":<string>,
    "nullable":<boolean>,
    "type":<fieldType>
  }
]

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[
  {
    "alias":"Name",
    "defaultValue":null,
    "editable":true,
    "length":255,
    "name":"name",
    "nullable":true,
    "type":"esriFieldTypeString"
  },
  {
    "alias":"Type",
    "defaultValue":null,
    "editable":true,
    "length":50,
    "name":"disttype",
    "nullable":true,
    "type":"esriFieldTypeString"
  },
]

outputName

string | optional

The name of the output layer.

If provided, the task will create a feature service of the results. You define the name of the service. If an outputName value is not provided, the task will return a feature collection.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "serviceProperties": {
		"name": "featureServiceName"
  }
}

You can overwrite an existing feature service by providing the itemId, serviceURL, or name value of the existing feature service and setting the overwrite property to true. Including the serviceProperties parameter is optional. As described in the Feature output topic, you must either be the owner of the feature service or have administrative privileges to perform the overwrite.

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "itemProperties": {
		"itemId": "52d34e7598e7484188228xxxxxx",
		"overwrite": true
  }
}

context

string | optional

The Context parameter contains the following additional settings that affect task operation:

  • Extent (extent)—A bounding box that defines the analysis area. Only input features that intersect the bounding box will be analyzed.
  • Output spatial reference (outSR)—The output features will be projected into the output spatial reference.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
{
"extent" : {extent},
"outSR" : {spatial reference}
}

f

string | optional

Default value: html

Accepted values: html | json

The response format.

Response

When you submit a request, the service assigns a unique job ID for the transaction.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
{
  "jobId": "<unique job identifier>",
  "jobStatus": "<job status>"
}

After the initial request is submitted, you can use the jobId to periodically check the status of the job and messages, as described in Check job status. Once the job has successfully completed, you use the jobId to retrieve the results. To track the status, you can make a request of the following form:

Use dark colors for code blocksCopy
1
https://<analysis url>/EightyTwentyAnalysis/jobs/<jobId>

Accessing results

When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:

Use dark colors for code blocksCopy
1
https://<analysis url>/EightyTwentyAnalysis/jobs/<jobId>/results/outputLayer?token=<your token>&f=json

outputLayer

features | required

outputLayer includes the clusters of associated incidents and can be points, lines, or polygons.

Fields

outputLayer includes the following fields:

  • All fields added in outFields.
  • Incident Count (ICOUNT)—The number of points found within the location.
  • Incident Percentage (PERC)—The percentage of all input features that occur at a specific location.
  • Cumulative Incident Percentage (CUMU_PERC)—The cumulative percentage of all incidents that occurred at this location plus all other locations with a higher incident count. In the 80/20 analysis ratio, this value represents the 80.
  • Cumulative Location Percentage (CUMU_LPERC)—The cumulative percentage of unique locations in the input. In the 80/20 analysis ratio, this value represents the 20.
  • Incident Count Per Mile (INC_MI)—The number of features per mile. This field is included when lines are used for inComparisonFeatures.
  • Incident Count Per Kilometer (INC_KM)—The number of features per kilometer. This field is included when lines are used for inComparisonFeatures.
  • Incident Count Per Square Mile (INC_SQMI)—The number of features per square mile. This field is included when polygons are used for inComparisonFeatures.
  • Incident Count Per Square Kilometer (INC_SQKM)—The number of features per square kilometer. This field is included when polygons are used for inComparisonFeatures.
Request example
Use dark colors for code blocksCopy
1
{"url":"https://<analysis url>/EightyTwentyAnalysis/jobs/<jobId>/results/outputLayer"}

The result has properties for parameter name, data type, and value. The contents of value depend on the outputName parameter value provided in the initial request.

If outputName is provided, value contains the URL to the feature service layer as follows:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "paramName":"output1",
  "dataType":"GPString",
  "value":{"url":"<hosted feature service layer url>"}
}

See Feature output for more information about how the result layer or collection is accessed.

Licensing

This task requires the following user type and configurations:

  • Creator, Professional, or Professional Plus user type
  • Publisher, Facilitator, or Administrator role, or an equivalent custom role

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.