Customer Derived Trade Areas (Business Analyst)
Résumé
Creates trade areas around stores based on the number of customers or volume attribute of each customer.
Illustration
|  | 
Usage
- 
				The spatial reference of the output feature class will be the same as the store layer. 
- 
				The store layer and customer layer must both be point features. 
- 
				In most cases, the store layer area input feature layer will be a Business Analyst store layer. 
- 
				Valid numeric values must be used when defining customer-derived trade area values. Negative values cannot be used. 
- 
				Selecting ALL in the Sites To Use parameter will create a trade area for each point feature in the store layer. 
- 
				Donut rings create output polygons that are bands. 
- 
				Using the centroid of the store's customers as a center for a trade area can be helpful when the store is located outside the customer area and you want to see customer trade areas that show customer concentration around their center point. 
- 
				In ArcMap, trade areas will only be created for features that are within the active study area or analysis extent. 
Syntaxe
| Paramètre | Explication | Type de donnée | 
| AnalysisType | The type of customer-derived trade area to be generated. 
 | String | 
| InputFeatureLayer | The input feature class containing center points for the trade areas. In most cases, this will be a Business Analyst store layer. | Feature Layer | 
| IDField | Unique ID field in the trade area center (store) layer. | String | 
| All_Or_Single_Or_Selected | The points in the input feature layer used to create trade areas. 
 | String | 
| CustomerLayer | The input feature class containing the points and attributes needed to generate the trade areas. In most cases, this will be a Business Analyst customer layer. | Feature Layer | 
| LinkField | The ID that identifies the store associated with each customer. | Field | 
| CustomerWeightField | The field used to calculate the trade areas. This is based on either the number of customers (count) or the calculated weighted value assigned to each customer. | Field | 
| RingsCollection [RingsCollection,...] | The percentage of customers (or weights) used to create customer-derived trade areas around the stores. For example, you can create customer-derived trade areas that represent 40, 60, or 80 percent of your customers for each store. | Double | 
| OutputFeatureClass | The feature class that will contain the customer-derived trade area features. | Feature Class | 
| ByID_Or_ByName (Facultatif) | Field used to select a single point. 
 | String | 
| Single_Site (Facultatif) | ID or name of store to be used as the single point. | String | 
| UseSelectedFeatures (Facultatif) | The store features used to generate customer-derived trade areas. 
 | Boolean | 
| ExcludeOutlyingCustomers (Facultatif) | Identifes the customers used in the trade area calculation beyond a specified distance. 
 | Boolean | 
| CutoffDistance (Facultatif) | The numeric distance used to determine how far to include customers from each store in the percentage calculations for each trade area. | Double | 
| MeasureUnits (Facultatif) | The units used with the distance values. By default, the units defined in the Business Analyst preferences will be selected. 
 | String | 
| Donut (Facultatif) | Creates nonoverlapping concentric rings, or donut bands. 
 | Boolean | 
| UseCentroids (Facultatif) | Locates the center of your customer area and calculates trade areas outward from this center point. 
 | Boolean | 
Exemple de code
# Name: CustomerDerivedTA.py
# Description: Creates simple polygon based trade areas around San Francisco based stores based on sales associated with customer data.
# Author: ESRI
# Import system modules
import arcview
import arcpy
arcpy.ImportToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
try:
# Acquire extension license 
arcpy.CheckOutExtension("Business")
arcpy.AddToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
try:
# Acquire extension license 
arcpy.CheckOutExtension("Business") 
 
# Define input and output parameters for the Customer Derived Trade Areas tool
StorePath = "C:/temp/sf_stores.shp"
CustPath = "C:/temp/sf_cust.shp"
IdFld = "STORE_ID"
CustID = "STORE_ID" 
CustWeight = "SALES"
AnalysisType = "SIMPLE"
OutPath = "C:/temp/RingOutput.shp"
 
# Create detailed customer derived trade areas
arcpy.CustomerDerivedTA_ba(AnalysisType, StorePath, IdFld, "ALL", CustPath, CustID, CustWeight, "40;60;80", OutPath)
 
# Release extension license 
  arcpy.CheckInExtension("Business") 
 
except:
print arcpy.GetMessages(2)