Calculate Composite Index
The CalculateCompositeIndex task combines multiple numeric variables to create a single index.
Learn more about how Calculate Composite Index works
Request URL
http://<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: Syntax: |
context | The Context parameter contains the following additional settings that affect task operation:
Syntax:
|
f | The response format. The default response format is html. Values: html | json |
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 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: 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.
See Feature Output for more information about how the result layer or collection is accessed. |