FRAMES | NO FRAMES

 

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

Profile Comparison Chart Endpoint

Compares a target profile to a base profile.

 

Availability: Business Analyst Server.

 

URL Example

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

Specific Parameters

Parameter

Description

BaseProfile (required)

Base segmentation profile. Type ProfileData.

IndexThreshold (required)

Index threshold. Type double.

TargetProfile (required)

Target segmentation profile. Type ProfileData.

TargetGroup (optional)

Target group. Type TargetGroupData.

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. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Variable of type TaskResultOutput

Remarks

Segmentation Charts graphically display values for each Tapestry segment when comparing two or more profiles. These charts are used to illustrate the values in a Customer Tapestry Profile Report.

 

The BaseProfile parameter specifies the base tapestry segmentation profile used for calculation the index and the TargetProfile parameter specifies the target profile used to create the bar chart.

 

The IndexThreshold parameter specifies the position of y-axis on the bar chart.

 

If the TargetGroup parameter is specified, the bars for Tapestry segments are colored with respect to the major groups to which the segments belong.

How Does it Work

The ProfileComparisonChart endpoint compares a target profile to a base profile and creates the bar chart.

 

A sample profile comparison bar chart is illustrated below. The y-axis contains a bar for each of the Tapestry segments, and the x-axis is scale dependent on the index values of a profile comparison.

 

 

Each bar within the chart displays important of information:

 

• The bar length displays the index value of the cluster segment of the profile comparison. The index estimates the propensity of a specific segment to consume the target profile. The base value of 100 is average and is a central reference point of this chart. If a segment has an index value of 100, the target profile has the same propensity to consume the target profile as the base. Therefore, a value of less than 100 indicates that the target profile consumes less than average, and a value greater than 100 indicates that the target profile consumes at a rate higher than the base.

 

• The color of the bar is based on the major group to which the Tapestry segment belongs.

 

• The width of each bar is determined by the relative size of the percent penetration of the segment. Percent penetration is calculated by dividing the target total for each segment by the base total and multiplying by 100. For example, if there were 1,000 customers in segment 06 and 100,000 households in the base, the percent penetration would be 1 percent.

Usage Tips

• The base segmentation profile can be generated using the Profile by Area Summation endpoint.

• Usually the target segmentation profile is based on customer records.

• The target segmentation profile can be generated using the Profile by Table Geocoding endpoint.

• Customers in the target profile should be wholly contained within the base profile.

• If you are unclear what to use as the base profile, you can use the whole United States.

Example Usage

The example below illustrates a workflow to create a Profile Comparison Chart. This workflow includes the preliminary steps of creating of a target customer profile from a table of customers and their cumulative purchase amounts and creation of a base profile for the sales territory.

 

NOTE: The example uses the "Drive Time Polygons 1" polygon layer already created in the Trade Areas folder of the San Francisco Tutorial Project of the Default Workspace.

 

STEP 1: Create a base profile

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/ProfileByAreaSummation/execute?
Boundaries={"Item":{
  "WorkspaceName":"Default Workspace",
  "ProjectName":"San Francisco Tutorial Project",
  "folderType":"esriFolderTradeAreas",
  "itemName":"Drive Time Polygons 1"
}}&
SegmentationBase=Total Households&AreaIDField=RING&
OutputItem={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegProfiles",
  "itemName":"sampleBaseSegProfile_ProfileComparisonChart"
}&
f=PJSON

 

STEP 2: Create a target profile

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/ProfileByImportFromTable/execute?
DataTable={"RecordSet":{"features":[
  {"geometry":{},"attributes":{"OID":1,"CUST_TYPE":"Target1","SEG_CODE":"1","COUNT":12320}},
  {"geometry":{},"attributes":{"OID":2,"CUST_TYPE":"Target2","SEG_CODE":"3","COUNT":3415}},
  {"geometry":{},"attributes":{"OID":3,"CUST_TYPE":"Target3","SEG_CODE":"9","COUNT":13415}}
]}}&
IDField=SEG_CODE&
CountField=COUNT&OutputItem={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegProfiles",
  "itemName":"sampleTargetSegProfile_ProfileComparisonChart"
}&
f=PJSON

 

STEP 3: Execute the ProfileComparisonChart request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/ProfileComparisonChart/execute?
BaseProfile={"Item":{
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegProfiles",
  "itemName":"sampleBaseSegProfile_ProfileComparisonChart"
  }}&
TargetProfile={"Item":{
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegProfiles",
  "itemName":"sampleTargetSegProfile_ProfileComparisonChart"
}}&
IndexThreshold=110&StandardReportOptions={
  "ReportFormat":"PDF",
  "ReportHeader":[{"key":"subtitle","value":"Custom Report Title"}]
}&
OutputType=GetReport&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"Profile comparison bar chart.PDF",
      "dataType":"GPDataFile",
      "value":
      {
        "url":"http://localhost/arcgisoutput/_ags_T54D336D304312B6402C135566054B.pdf"
      }
    }
  ],
  "messages":
  [
  ]
}

 

See Also

Multi-profile Bar Chart Endpoint

Tapestry Profile Report Endpoint

Business Analyst Server REST Reference