ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Mean Store Center

Available with Business Analyst license.

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates a centroid (new store location) in the mean geographic center of your customer points.

Learn more about how Mean Store Center works

Illustration

Mean Store Center example

Usage

  • In most cases, the input Customer Layer will be a Business Analyst customer layer.

  • The Customer Layer must be point features.

  • In ArcMap, the mean store center will be determined based only on the customer points that are within the active study area or analysis extent. If you want to create the store center based on all customer points, make sure all customers are within the analysis extent.

  • You can use this tool to compare the geographic centroid of your customers to your actual store location. Significant distances between the customer center output and actual store location can illustrate problems with existing store locations.

  • You can create a centroid calculated by a weighted value. If you use a Customer Weight Field, , the geographic center is weighted based on the value of each customer point.

  • Use the Make Clusters option if you wish to create simulated store locations based on the distribution of your customers.This allows you to evaluate existing store locations versus optimal locations by being able to visualize your existing store locations versus the possible locations based on your customer distribution.

  • The output created when using Make Clusters option is an excellent input for the Territory Design tool, where a market may contain customers but doesn't contain seed points. This allows virtual seed points to be generated based on customer distribution.

  • The Make Clusters option uses the K-means algorithm for calculating centroids of clusters.

Syntax

arcpy.ba.MeanStoreCenter(CustomerLayer, LinkField, CustomerWeightField, OutputFeatureClass, {UseSelectedFeatures}, {InNeedReportOutput}, {InputFeatureLayer}, {IDField}, {DistanceCalculateMethod}, {MeasureUnits}, {InReportTitle}, {ReportFile}, {InMakeClusters}, {InClustersCount}, {ReportFormats}, {Use constant mean points})
ParameterExplanationData Type
CustomerLayer

The input feature layer. This point layer is usually a customer layer.

Feature Layer
LinkField

The store ID field in the customer layer that assigns each customer to a store location.

Field
CustomerWeightField

The numeric field used in the calculation to determine the mean store center.

Field
OutputFeatureClass

The new feature class that will contain the mean center for customer locations.

Feature Class
UseSelectedFeatures
(Optional)

The features used to generate the mean centers.

  • True —Generates the mean store center using only the selected features.
  • False —Generates the mean store center using all features. This is the default.
Boolean
InNeedReportOutput
(Optional)

The option to output a mean store center report.

  • CREATE_REPORT —A mean store center report will be generated.
  • DONT_CREATE_REPORT —A mean store center report will not be generated. This is the default.
Boolean
InputFeatureLayer
(Optional)

The input feature layer containing the center points (typically store points) that will be used in calculating the distance from the mean store center.

Feature Layer
IDField
(Optional)

Field used to uniquely identify each store.

Field
DistanceCalculateMethod
(Optional)

The method used to calculate the distance between existing stores and the mean store center.

  • DRIVE_TIME —Driving time measured in units of time.
  • DRIVE_DISTANCE —Driving distance measured in units of distance.
  • STRAIGHT_LINE_DISTANCE —Straight-line distance. This is the default.
String
MeasureUnits
(Optional)

The units used with the distance values. By default, the units defined in the Business Analyst preferences will be selected.

  • Decimal Degrees
  • Feet
  • Kilometers
  • Meters
  • Miles
  • Nautical Miles
  • Yards
String
InReportTitle
(Optional)

Title for the Mean Store Center report.

String
ReportFile
(Optional)

The directory that the Mean Store Center report will be saved to.

Folder
InMakeClusters
(Optional)

Will use a K-means algorithm to generate mean store centers based on customer file.

  • TRUE —Generates multiple mean store centers based on customer point clusters.
  • FALSE —Will generate a single mean store center on customers. This is the default.
Boolean
InClustersCount
(Optional)

Determines the number of clusters generated based on customer file. The default is 10.

Long
ReportFormats
[ReportFormats,...]
(Optional)

Select the desired report output format

  • Simple XML
  • PDF
  • HTML
  • CSV
  • ZIP
  • XLSX
  • Stripped XLSX
String
Use constant mean points
(Optional)

Use constant mean points.

Feature Layer

Code sample

MeanStoreCenter example (stand-alone script)

# Name: MeanStoreCenter.py
# Description: Spatially locates a new store location in the San Francisco market based on customer sales.
# Author: Esri

# Import system modules
import arcview
import arcpy

arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.8\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")

try:
# Acquire extension license
  arcpy.CheckOutExtension("Business") 
 
# Define input and output parameters for the Mean Store Center tool
  CustomerLayer = "C:/temp/sf_cust.shp"
  LinkField = "STORE_ID"
  CustomerWeightField = "SALES"
  OutputFeatureClass = "C:/temp/Mean_Store.shp"
 
# Create Mean Store Center output file
  arcpy.MeanStoreCenter_ba(CustomerLayer, 
	LinkField, 
	CustomerWeightField, 
	OutputFeatureClass)
 
# Release extension license 
arcpy.CheckInExtension("Business")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires Business Analyst
  • Standard: Requires Business Analyst
  • Advanced: Requires Business Analyst

Related topics

  • An overview of the Business Analyst Analysis toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2022 Esri. | Privacy | Legal