Create Trade Area From Sub-geography Layer (Business Analyst)
Summary
Generates trade areas from the features of an input polygon layer that intersects a defined boundary layer.
Learn more about how Create Trade Area From Subgeography Layer works
Usage
-
The spatial reference of the output feature class will be the same as the boundary layer.
-
The output feature class is based on a polygon-to-polygon selection and computes a geometric intersection of the boundary layer.
-
If the subgeography layer does not intersect the boundary layer, no output feature class is created.
-
A percent of overlap field is included in the output feature class. This will illustrate how much a feature in the subgeography layer is intersected by the boundary layer.
-
In most cases, the boundary layer will be a Business Analyst trade area. You can use this tool to determine the ZIP Codes (or other subgeography layers) that intersect your trade areas.
-
In ArcMap, trade areas will only be created for features that are within the active study area or analysis extent.
-
The Calculate Ratios option allows you to append the percentage by which your subgeographies will intersect your boundary layer. This tool uses the same methodology that Business Analyst uses to aggregate data to trade areas for reporting.
You have three options for ratios:
- All Ratios—The values calculated will contain percentages for Population, Housing Units, Households, and Business Points.
- Area Only—The percentage will only be calculated for area of the subgeographies that intersect the boundary layer.
- None—No percentages will be calculated.
The Calculate Ratios option is commonly used when you need to determine how much a geography intersects a trade area. You can then take these percentages and apply them to an external database of like geographies to calculate how much of the data in your external database is within your trade area. For example, if you have database of customer volumetrics at the ZIP Code geography and you need to determine how much of these volumetrics are within a five-minute drive time, but you are required to keep the database outside of Business Analyst, this tool gives you that option. You need to make sure the subgeography IDs selected within Business Analyst match your external database. For example, if you choose ZIP Codes as your subgeography layer, then you would need to make sure your external database had five-digit ZIP Code IDs to accurately link the databases.
Syntax
Parameter | Explanation | Data Type |
InputBoundaryLayer |
The input geography boundary layer used to define the geographies to extract. | Feature Layer |
InputBoundaryLayerIdFieldName |
The unique identifier for the boundary layer. | Field |
All_Or_Single_Or_Selected |
Creates trade areas for features in the boundary layer.
| String |
InputSubgeographyLayer |
The layer containing the features to be extracted as trade areas. In most cases, this will be a Business Analyst data layer, such as ZIP Codes. | Feature Layer |
InputSubgeographyLayerIdFieldName |
The unique ID field for the subgeography layer. | Field |
InputSubgeographyLayerNameFieldName |
The name field for the subgeography layer. | Field |
OutputFeatureClass |
The feature class that will contain the trade area features. | Feature Class |
InputSubgeographyCalcRatiosOption |
Generates a percentage based on how much each subgeography intersects the Boundary layer and appends these values to the subgeography layer.
| String |
InputSubgeographySpatialRshipOption |
Determines how the subgeography will be selected from the boundary layer.
| String |
ByID_Or_ByName (Optional) |
Field used to select a single feature.
| String |
Single_Site (Optional) |
ID or name of the feature used to select a single feature. | String |
Code Sample
# Name: CreateTAFromSubgeography.py
# Description: Selects all the block groups that intersect the input boundary layer exports them as a new layer.
# Author: Esri
# Import system modules
import arcview
import arcpy
arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.2\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
try:
# Acquire extension license
arcpy.CheckOutExtension("Business")
arcpy.AddToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.2\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
# Define input and output parameters for the Create Trade Area From Subgeography Layer tool
Boundary = "C:/temp/TradeArea.shp"
InputGeo = "C:/ArcGIS/Business Analyst/US_2013/Data/BDS/esri_bg.bds"
OutPath = "C:/temp/Output_Geography.shp"
BoundaryId = "AREA_ID"
SubGeoId = "ID"
SubGeoName = "NAME"
# Create Subgeography based trade areas
arcpy.CreateTAFromSubgeography_ba(sBoundary, sBoundaryId, "ALL", sInputGeo, sSubGeoId, sSubGeoName, sOutPath)
# Release extension license
arcpy.CheckInExtension("Business")
except:
print arcpy.GetMessages(2)