Доступно с лицензией Business Analyst.
Сводка
Compares the demographic profiles of two customer files and reports on the differences.
Использование
The report results are more easily interpreted using medians and averages.
Синтаксис
arcpy.ba.CustomerDemographicComparisonReport(CustomerLayer, {UseSecondCustomerLayer}, UseSelectedCustomers, {SecondCustomerLayer}, {UseSelectedCustomersSelectedLayer}, InputBoundaryLayer, InputGeographyLevel, InputFieldsToProfile, ReportTitle, OutputFolder, {ReportFormats})
Параметр | Объяснение | Тип данных |
CustomerLayer | Select the primary customer layer to analyze. | Feature Layer |
UseSecondCustomerLayer (Дополнительный) | Select this option to compare the first Customer Layer with this layer in the report.
| Boolean |
UseSelectedCustomers | Select this option to compare the first Customer Layer against selected features of that same layer in the report.
| Boolean |
SecondCustomerLayer (Дополнительный) | The second customer layer used in the comparison report. | Feature Layer |
UseSelectedCustomersSelectedLayer (Дополнительный) | Select this option to compare the first Customer Layer with selected features of the second Customer Layer in the report.
| Boolean |
InputBoundaryLayer | The boundary file that defines the extent of the customers to be analyzed. | Feature Layer |
InputGeographyLevel | The input feature layer that contains the data that can be selected to be compared in the report. This will commonly be the Block Groups. | Feature Layer |
InputFieldsToProfile [InputFieldsToProfile,...] | Select from a list of available variables to compare. These variables are typically demographic variables. | Field |
ReportTitle | Enter the name of the report. | String |
OutputFolder | The file folder output path. | Folder |
ReportFormats (Дополнительный) | Select the desired report output format.
| String |
Пример кода
CustomerDemographicComparisonReport example (stand-alone script)
# Name: CustomerDemographicComparisonReport.py
# Description: Compares the current year total population and future year total population on selected customers from the San Francisco customer layer against the balance of that customer layer.
# 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 Customer Demographic Comparison Report tool
CustLayer = "C:/My Output Data/Projects/Default Project/CustLayers/sf_custs/CustomerLayer.shp"
Extent = "C:/My Output Data/Projects/Default Project/TradeAreas/Customer_Derived_TradeAreas.shp"
Geog = "C:/ArcGIS/Business Analyst/US_2022/Data/Demographic Data/BlockGroups_bg.bds"
Vars = "TOTPOP_CY;TOTPOP_FY"
ReportName = "Customer_Demo_Report"
ReportDir = "C:/My Output Data/Projects/Default Project/Reports/Customer Demographic Comparison Report"
# Create the Customer Demographic Comparison Report
arcpy.CustomerDemographicComparisonReport_ba(Cust,
Extent,
Geog,
Vars,
ReportName,
ReportDir)
# Release extension license
arcpy.CheckInExtension("Business")
Параметры среды
Этот инструмент не использует параметры среды геообработки
Информация о лицензиях
- Basic: Требуется Business Analyst
- Standard: Требуется Business Analyst
- Advanced: Требуется Business Analyst