FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.2   R E S T    R E P O R T    T A S K

Customer Demographic Comparison Endpoint

Compares the demographic profiles of two customer layers and reports the differences.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/CustomerDemographicComparison/execute

Specific Parameters

Parameter

Description

AnalysisExtent (required)

Extent of the customers to be analyzed. Type ExtentData.

FirstCustomerLayer (required)

The first customer layer to analyze. Type PointLayer.

GeographyLayerID (required)

ID of a standard geography layer to get demography. Type string.

SecondCustomerLayer (required)

The second customer layer to analyze. Type PointLayer.

Summarizations (required)

Summarization fields to compare customer layers. Type array of string.

Other Parameters

Parameter

Description

OutputType (required)

Array of task output options. Options for this method include creating a report (GetReport). Type array of TaskOutputType.

StandardReportOptions (required)

Report parameters. Type ReportOptions. The TemplateName parameter is ignored.

ActiveDatasetID (optional)

ID of the active dataset. Type string.

Default: ID of the first available dataset.

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

IsFullErrorMessage (optional)

Mode for composing error messages. Type boolean.

Default: false.

OutputReportItem (optional)

Configuration options for storing the output report in the repository. This will enable viewing and working with the output result in subsequent tasks. Type esriFolderItem.

token

Authentication token. In Business Analyst Server, this parameter is required if your Business Analyst Server is secured. Type string.

Returns

Variable of type TaskResultOutput

Remarks

The Customer Demographic Comparison report allows you to contrast the demographic attributes of one set of customers against another. Think of the report as using a combination of Customer Profiling and the Benchmark Report. It takes a profile of the underlying geographies that intersect your customer points and compares it to another customer profile. The differences are shown by total number and percentage.

Usage Tips

• The customers layers must be point feature layers.

• Use the block group layer as the geography level. This is the lowest level of geography containing demographic data and will provide the most accurate results.

• Because a point-in-polygon procedure is used with each customer record, this report may take awhile to execute if you have many customer records.

Example Usage

The example below generates a Customer Demographic Comparison report.

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/CustomerDemographicComparison/execute?
FirstCustomerLayer={"Points":[
  {"name":"jane_smith","latitude":32.74198,"longitude":-117.24996,"storeId":"5","description":"Jane Smith"},
  {"name":"miguel_sanchez","latitude":32.781143,"longitude":-117.235664,"storeId":"5","description":"Miguel Sanchez"}
]}&
SecondCustomerLayer={"Points":[
  {"name":"pam_lee","latitude":32.811494,"longitude":-117.231709,"storeId":"5","description":"Pam Lee"},
  {"name":"byron_jackson","latitude":32.854672,"longitude":-117.204533,"storeId":"5","description":"Byron Jackson"}
]}&
AnalysisExtent={"Extent":{
  "spatialReference":{"wkid":4326},
  "xmin":-117.559,
  "xmax":-117.122,
  "ymin":32.7117,
  "ymax":32.9567
}}&
Summarizations=TOTPOP_CY;TOTHH_CY;FAMPOP_CY&
GeographyLayerID=US.BlockGroups&StandardReportOptions={
  "ReportFormat":"PDF",
  "ReportHeader":[{"key":"subtitle","value":"Custom Report Title"}]
}&
OutputType=GetReport&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"Customer Demographic Comparison Report.PDF",
      "dataType":"GPDataFile",
      "value":
      {
        "url":"http://localhost/arcgisoutput/_ags_T3ADEC38404AEF90C6432AFEC90ECF.pdf"
      }
    }
  ],
  "messages":
  [
  ]
}

See Also

Customer Demographic Profile Endpoint

Business Analyst Server REST Reference