FRAMES | NO FRAMES

 

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

Multi-profile Bar Chart Endpoint

Compares up to three target profiles to a single base profile.

 

Availability: Business Analyst Server.

 

URL Example

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

Specific Parameters

Parameter

Description

BaseProfile (required)

Base segmentation profile. Type ProfileData.

IndexThreshold (required)

Index threshold. Type double.

TargetProfile1 (required)

Target segmentation profile 1. Type ProfileData.

TargetProfile2 (required)

Target segmentation profile 2. Type ProfileData.

TargetGroup (optional)

Target group. Type TargetGroupData.

TargetProfile3 (optional)

Target segmentation profile 3. Type ProfileData.

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 calculating the index. Up to three target segmentation profiles can be specified—the TargetProfile1 is used to create the bar chart and the TargetProfile2 and TargetProfile3 are used to draw trend lines on top of 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 MultiProfileBarChart endpoint compares up to three target profiles to a single base profile. The first target profile in the list of segmentation profiles will be used to create the bar chart. The other two target profiles will be displayed as trend lines on top of the bar chart.

 

A sample multi-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 three distinct pieces 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 target segmentation profiles are based on customer records.

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

• Customers in a 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 Multi-Profile Bar Chart from a base profile and two different target profiles.

 

NOTE: The example uses the "Drive Time Polygons 1" and the "Existing" polygon layers 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&
ActiveDatasetID=USA_ESRI_2011&
AreaIDField=RING&
OutputItem={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegProfiles",
  "itemName":"sampleBaseSegProfile_MultiProfileBarChart"
}&
f=PJSON

 

STEP 2: Create a target profile 1

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&
ActiveDatasetID=USA_ESRI_2011&
OutputItem={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegProfiles",
  "itemName":"sampleTargetSegProfile1_MultiProfileBarChart"
}&
f=PJSON

 

STEP 3: Create a target profile 2

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":"Existing"
}}&
SegmentationBase=Total Households&
ActiveDatasetID=USA_ESRI_2011&
AreaIDField=RING&
OutputItem={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegProfiles",
  "itemName":"sampleTargetSegProfile2_MultiProfileBarChart"
}&
f=PJSON

 

STEP 4: Execute the MultiProfileBarChart request

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

 

Response

{
  "results":
  [
    {
      "paramName":"Multi-profile bar chart.PDF",
      "dataType":"GPDataFile",
      "value":
      {
        "url":"http://localhost/arcgisoutput/_ags_T89F5305D548378B99F33EB235AA25.pdf"
      }
    }
  ],
  "messages":
  [
  ]
}

See Also

Profile Comparison Chart Endpoint

Tapestry Profile Report Endpoint

Business Analyst Server REST Reference