The CalculateCompositeIndex task combines multiple numeric variables to create a single index.
Learn more about how Calculate Composite Index works
Request URLhttp://<analysis url>/CalculateCompositeIndex/submitJob
Request parameters Parameter Description
inputLayer
(Required)
The input table or features containing the variables that will be combined into the index.
Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
Examples:
inputVariables
(Required)
The variables that will be combined to create the index. Provide at least two variables. For each variable, specify the following:
Example: "inputVariables":[{"field":"median_income", "reverseVariable": true, "weight": 2}, {"field": "pct_uninsured", "reverseVariable": false, "weight": 1}, {"field": "pct_unemployed", "reverseVariable": false, "weight": 1}]
indexMethod
The method that will be used to scale the inputVariables parameter value and combine the scaled variables to create the index.
Scaling is a type of preprocessing that ensures that the variables are on a compatible scale before they are combined. The scaled variables are then combined to create a single index value. The following options are available:
Values: meanScaled | meanPercentile | meanRaw | geomeanScaled | geomeanPercentile | geomeanRaw | sumFlagsPercentile
Default: meanScaled
Example: "indexMethod": "meanPercentile"
outputIndexReverse
Specifies whether the output index values will be reversed in direction. When true, high index values will be treated as low index values and vice versa. Reversing is applied after combining the scaled variables.
Values: true | false
Default: false
Example: "outputIndexReverse": true
outputIndexMinMax
The minimum and maximum of the output index values. Specifying a minimum and maximum value will apply minimum-maximum scaling to the combined variables.
Example: "outputIndexMinMax": "[{'min': 0, 'max': 100}]"
outputName
The name of the service. If provided, the task will create a feature service of the results. If no outputName value is provided, the task will return a feature collection.
Syntax:
{
"serviceProperties": {
"name": "<service name>"
}
}
You can overwrite an existing feature service by providing the itemId 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.
Syntax:
{
"itemProperties": {
"itemId": "<itemID of the existing feature service>",
"overwrite": true
}
}
or
{
"serviceProperties": {
"name": "<existing service name>"
},
"itemProperties": {
"itemId": "<itemID of the existing feature service>",
"overwrite": true
}
}
context
The Context parameter contains the following additional settings that affect task operation:
Syntax:
{
"extent" : {extent},
"outSR" : {spatial reference}
}
f
The response format. The default response format is html.
Values: html | json
ResponseWhen 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 jobId to periodically check the status of the job and messages as described in the Checking job status topic. Once the job has successfully completed, use jobId to retrieve the results. To track the status, you can make a request of the following form:
http://<analysis url>/CalculateCompositeIndex/jobs/<jobId>
Access results
When the status of the job request is esriJobSucceded, you can access the results of the analysis by making a request of the following form:
http://analysis.arcgis.com/arcgis/rest/services/tasks/gpserver/CalculateCompositeIndex/jobs/<jobId>/results/<output parameter name>?token=<your token>&f=json
Parameter Description
indexResultLayer
The result of CalculateCompositeIndex is a layer containing the index results. The layer includes the fields containing the input variables after preprocessing (reversing and scaling), the raw index before reversing and minimum-maximum scaling, the index value, the index rank, and the index percentile. It also includes fields with the index value reclassified into quantile classes, equal interval classes, and standard deviation classes.
Example:
{"url": "http://analysis.arcgis.com/arcgis/rest/services/tasks/gpserver/CalculateCompositeIndex/jobs/<jobId>/results/indexResultLayer"}
The result has properties for parameter name, data type, and value. The contents of value depends on the OutputName value provided in the initial request.
{
"paramName":"indexResultLayer",
"dataType":"GPRecordSet",
"value":{"url":"<arcgis featureservice layer url>"}
}
{
"paramName":"indexResultLayer",
"dataType":"GPRecordSet",
"value":{"featureCollection": ... }
}
See Feature Output for more information about how the result layer or collection is accessed.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4