Available with Business Analyst license.
Summary
Generates a report based on the relation of stores to competitors.
Learn more about how Locator Report (Business Analyst) works
Usage
The Locator Report is a proximity report that allows you to list the n number of facilities in relation to each of your store locations.
Business points can be competitors, customers, service centers, or any other point layer.
You can extract business data in Business Analyst using the Add Business Listings wizard if you do not have your own competitive locations.
In ArcMap, reports will only be created for features that are within the active study area or analysis extent.
The portrait report allows you to add four fields to the report, and the landscape report allows up to six fields.
Executing this report using drive distance or drive time can take awhile to execute depending on the number of points in the business layer. If you do not use a straight-line distance, a route is created using the street network from each point to each store.
Use the Add Distance Field to Business option to add an attribute field back to the business points layer that will store the distance from the store center point to each feature in the business point layer. You can use this option to store the distance each of your customers is from the nearest store location.
Drive Distance or Drive Time values can show -1 for that business point that doesn't have a route from store. The Locator Report will show NR (No Route) for such a point.
Syntax
LocatorReport_ba (InputFeatureLayer, IDField, NameFldName, BusinessLayer, IsLandscape, {FieldsToAppear}, {BarrierFeatureClasses}, {ReportFormats}, {All_Or_Single_Or_Selected}, {ByID_Or_ByName}, {Single_Site}, WayToSelectBusiness, {RadiusToSelectBusinesses}, {NumberOfBusinessesToSelect}, {DistanceCalculateMethod}, {AddDistanceToBusiness}, {WayToDefineDistanceField}, {DesireLinesDistanceField}, {NeedReportOutput}, {ReportTitle}, {ReportDir}, {NeedFeatureclassOutput}, {OutputFeatureClass}, {ADD_STORE_FLDS})
Parameter | Explanation | Data Type |
InputFeatureLayer | The input feature class containing center points for the report. In most cases, this will be a Business Analyst store layer. Distances will be calculated from these points. | Feature Layer |
IDField | Unique ID field in the center points (store) layer. Distances will be calculated from these points. | Field |
NameFldName | Name field in the center points (store) layer. This field will be used in the report to group records for each center point (store). | Field |
BusinessLayer | The input feature class containing points that will be listed in the report. Distances will be calculated from the center points (stores) to all points in this layer. | Feature Layer |
IsLandscape | Locator Report page orientation.
| String |
FieldsToAppear (Optional) | Headers and fields to appear in the report. The portrait report allows you to add four fields, and the landscape report allows up to six fields. | String |
BarrierFeatureClasses [BarrierFeatureClasses,...] (Optional) | Allows a user to place point, line, or polygon barriers when using drive time or drive distance algorithms to calculate distances. | Feature Layer |
ReportFormats (Optional) | Select the desired report output format.
| String |
All_Or_Single_Or_Selected (Optional) | Creates trade areas for the points in the input feature layer.
| String |
ByID_Or_ByName (Optional) | Field used to select single point.
| String |
Single_Site (Optional) | ID or name of store to be used as the single point. | String |
WayToSelectBusiness | Determines how the business locations will be selected in relation to the store layer.
| String |
RadiusToSelectBusinesses (Optional) | Determines the radius at which the business points will be selected when choosing the LIMIT_WITHIN_DISTANCE option from the Select Business Points parameter. For example, you could list all business points within a three-mile radius of each store center point. | Linear unit |
NumberOfBusinessesToSelect (Optional) | Determines the number of points selected from business points when choosing the LIMIT_TO_NEAREST_LOCATIONS option from the Select Business Points parameter. For example, you could list the 10 closest locations to each store center point. | Long |
DistanceCalculateMethod (Optional) | Defines the approach to determine the distance from the store layer to the business points layer.
| String |
AddDistanceToBusiness (Optional) | Optionally adds an attribute field back to the business points layer that will store the distance from the store center point to each feature in the business points layer.
| Boolean |
WayToDefineDistanceField (Optional) | Determines the method for storing the distance calculation in the business points layer.
| Boolean |
DesireLinesDistanceField (Optional) | Name of the distance field. | String |
NeedReportOutput (Optional) | Option to generate a report or append the distance calculation to the business points layer.
| Boolean |
ReportTitle (Optional) | Title for the locator report. | String |
ReportDir (Optional) | The output directory that will contain the report. | Folder |
NeedFeatureclassOutput (Optional) | Generates a new feature class of all the business points used in the report.
| Boolean |
OutputFeatureClass (Optional) | The output feature class that will contain the business point features used in the report. | Feature Class |
ADD_STORE_FLDS (Optional) | Additional store fields that are to be included into the report. | Field |
Code sample
LocatorReport example (stand-alone script)
# Name: LocatorReport.py
# Description: Outputs a proximity report displaying the closest 25 customers to each store.
# Author: Esri
# Import system modules
import arcview
import arcpy
arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.7\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
try:
# Acquire extension license
arcpy.CheckOutExtension("Business")
# Define input and output parameters for the Locator Report tool
Store= "C:/temp/sf_stores.shp"
ID = "STORE_ID"
Name = "NAME"
Cust = "C:/temp/sf_cust.shp"
Flds = "Name:NAME;ZIP:ZIP;City:City_std;State:State_std"
Rpt = "C:/My Output Data/Projects/Default Project/Reports/Locator/Locator.rpt"
Title = "Customer Proximity Report"
NumCust = 25
# Create a Locator Report
arcpy.LocatorReport_ba(Store, ID, Name, Cust, Flds, "PORTRAIT", "All", "#", "#", "LIMIT_TO_NEAREST_LOCATIONS", "5 miles", NumCust, "STRAIGHT_LINE_DISTANCE", "DONT_ADD_DISTANCE", "USE_EXISTING","#", "CREATE_REPORT", Title, Rpt, "DONT_CREATE_OUT_FEATURECLASS")
# Release extension license
arcpy.CheckInExtension("Business")
except:
print arcpy.GetMessages(2)
Environments
This tool does not use any geoprocessing environments.
Licensing information
- ArcGIS Desktop Basic: Requires Business Analyst
- ArcGIS Desktop Standard: Requires Business Analyst
- ArcGIS Desktop Advanced: Requires Business Analyst