Summarize Attributes

Summarize Attributes takes an input layer and summarizes and calculate statistics on like values. The most basic statistic is the count of the number of features with a specified value, but you can get other statistics as well.
For example, suppose you have a point layer of store locations with a field representing the DISTRICT_MANAGER_NAME and you want to summarize coffee sales by manager. You can specify the field DISTRICT_MANAGER_NAME as the field to dissolve on, and all rows of data representing individual managers will be summarized. This means all store locations managed by Manager1 will be summarized into one row with summary statistics calculated. In this instance, statistics such as the number of stores and the sum of TOTAL_SALES for all stores that Manager1 manages would be calculated as well as for any other manager listed in the DISTRICT_MANAGER_NAME field.
Request URL
http://<analysis url>/SummarizeAttributes/submitJob
Request parameters
Parameter | Description |
|---|---|
inputLayer (Required) | The features that will be summarized. Syntax: As described in Feature input, this parameter can be one of the following:
REST web example:
REST scripting example:
|
fields (Required) | The fields that will be used to summarize like features. For example, if you chose a field called property type with the values of commercial and residential, all of the features with property type residential would be summarized together with summary statistics calculated and all of the commercial features would be summarized together. REST web examples:
REST scripting examples:
|
summaryFields | A list of field names and statistical summary types you want to calculate for features that are summarized together. Note that the count of features with the same fields values is always returned. By default, all statistics are returned. Syntax: [{"statisticType" : "<statistic type>", "onStatisticField" : "<field name>" }, ...] fieldName is the name of the fields in the input point layer. statisticType is one of the following for numeric fields:
statisticType is one of the following for string fields:
REST web examples:
REST scripting examples:
|
outputName (Required) | The task will create a feature service of the results. You define the name of the service. REST web example: myOutput REST scripting example: "outputName" : "myOutput" |
context | Context contains additional settings that affect task execution. For this task, there is one setting:
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.
{
"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 Checking job status. 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:
https://<analysis url>/SummarizeAttributes/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:
http://<analysis url>/SummarizeAttributes/jobs/<jobId>/results/output?token=<your token>&f=json
Parameter | Description |
|---|---|
output |
The output will always contain a table. Request: The result has properties for parameter name, data type, and value. The contents of value depend on the outputName parameter provided in the initial request. The value contains the URL of the feature service layer. See Feature output for more information about how the result layer is accessed. |