The Eighty 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 Eighty task calculates a cumulative percentage field to identify the locations where incidents are disproportionately occurring.
Request URL
https://<analysis url>/EightyTwentyAnalysis/submitJobRequest parameters
| Name | Required | Type | Default | Description |
|---|---|---|---|---|
inputLayer |
| features | The point layer representing incident locations. | |
aggregationMethod |
| string | Point | Specifies whether the points will be aggregated using clustering or a comparison feature. |
clusterTolerance |
| linear unit | The maximum distance at which points will be considered part of the same cluster. | |
inComparisonFeatures |
| features | The line or polygon layer used to aggregate points by the closest feature. | |
matchFields |
| string | Pairs of fields used for attribute matching. | |
outFields |
| field | The fields from the input features that will be transferred to the output. | |
outputName |
| string | The name of the output feature service. | |
context |
| string | The extent and output spatial reference environments. | |
f |
| string | html | The response format. |
Required
Sometimes required
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" : {}, "feature Set" : {}, "filter" : <where clause >}
aggregationMethod
string | required
Default value: Point
Accepted values: Point | Closest
Specifies how the input points will be aggregated. The following methods are available:
-
Point—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.Cluster -
Closest—The input points will be associated with the closest lines or polygons from theFeature inlayer.Comparison Features
Example: aggregation
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 Point is chosen for aggregation.
Syntax: {"distance"
Examples:
-
{"distance":500, "units" :" FEE T"} -
{"distance":2.5, "units" :" KILOMETER S"}
inComparisonFeatures
feature | sometimes required
Specifies the input line or polygon features used to aggregate the input points.
This parameter is required when Closest is chosen for aggregation.
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 input and in that will be used for attribute matching. Only the records from input that share match field values with in will be included in the aggregation. For example, a street name field could be used in a crime analysis in which in are the street centerlines. If match is not set, the tool will aggregate points to the nearest feature based on distance alone.
This parameter is available when Closest is chosen for aggregation.
Syntax:
[
{
"Point Fields":"fieldNameA",
"Comparison Fields":"fieldNameB"
}
]Example:
[
{
"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 Point is chosen for aggregation, the output fields are chosen from input. When multiple features exist at the same location, the field value from the first feature is used. If Closest is chosen for aggregation, the output fields are chosen from in.
If no fields are chosen, the output will only include generated fields.
Syntax:
[
{
"alias":<string>,
"defaultValue":<value>,
"editable":<boolean>,
"length":<integer>,
"name":<string>,
"nullable":<boolean>,
"type":<fieldType>
}
]Example:
[
{
"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 output value is not provided, the task will return a feature collection.
Syntax:
{
"serviceProperties": {
"name": "featureServiceName"
}
}You can overwrite an existing feature service by providing the item, service, or name value of the existing feature service and setting the overwrite property to true. Including the service 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.
{
"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 (
out)—The output features will be projected into the output spatial reference.SR
Syntax:
{
"extent" : {extent},
"outSR" : {spatial reference}
}Response
When you submit a request, the service assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}After the initial request is submitted, you can use the job 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 job to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/EightyTwentyAnalysis/jobs/<jobId>Accessing results
When the status of the job request is esri, you can access the results of the analysis by making a request of the following form:
https://<analysis url>/EightyTwentyAnalysis/jobs/<jobId>/results/outputLayer?token=<your token>&f=jsonoutputLayer
features | required
output includes the clusters of associated incidents and can be points, lines, or polygons.
Fields
output includes the following fields:
- All fields added in
out.Fields - 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)—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._PERC - Cumulative Location Percentage (
CUMU)—The cumulative percentage of unique locations in the input. In the 80/20 analysis ratio, this value represents the 20._LPERC - Incident Count Per Mile (
INC)—The number of features per mile. This field is included when lines are used for_MI in.Comparison Features - Incident Count Per Kilometer (
INC)—The number of features per kilometer. This field is included when lines are used for_KM in.Comparison Features - Incident Count Per Square Mile (
INC)—The number of features per square mile. This field is included when polygons are used for_SQMI in.Comparison Features - Incident Count Per Square Kilometer (
INC)—The number of features per square kilometer. This field is included when polygons are used for_SQKM in.Comparison Features
Request example
{"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 output parameter value provided in the initial request.
If output is provided, value contains the URL to the feature service layer as follows:
{
"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