Business Analyst ライセンスで利用できます。
概要
2 つの顧客ファイルの人口統計プロファイルを比較し、相違点についてレポートを作成します。
使用法
レポートの結果は、中央値および平均値を使用して、簡単に記述されます。
構文
arcpy.ba.CustomerDemographicComparisonReport(CustomerLayer, {UseSecondCustomerLayer}, UseSelectedCustomers, {SecondCustomerLayer}, {UseSelectedCustomersSelectedLayer}, InputBoundaryLayer, InputGeographyLevel, InputFieldsToProfile, ReportTitle, OutputFolder, {ReportFormats})
パラメーター | 説明 | データ タイプ |
CustomerLayer | 分析の対象とする主な顧客レイヤーを選択します。 | Feature Layer |
UseSecondCustomerLayer (オプション) | このオプションを選択すると、レポートで 1 つ目の顧客レイヤーをこのレイヤーと比較します。
| Boolean |
UseSelectedCustomers | このオプションを選択すると、レポートで 1 つ目の顧客レイヤーを同じレイヤーの選択したフィーチャと比較します。
| Boolean |
SecondCustomerLayer (オプション) | 比較レポートに使用される 2 番目の顧客レイヤー。 | Feature Layer |
UseSelectedCustomersSelectedLayer (オプション) | このオプションを選択すると、レポートで 1 つ目の顧客レイヤーを 2 つ目の顧客レイヤーの選択したフィーチャと比較します。
| Boolean |
InputBoundaryLayer | 分析する顧客の範囲を定義する境界ファイル。 | Feature Layer |
InputGeographyLevel | レポートでの比較対象に選択できるデータを含む入力フィーチャ レイヤー。これは、一般的に町丁・字等になります。 | Feature Layer |
InputFieldsToProfile [InputFieldsToProfile,...] | 比較する変数を、利用可能な変数のリストから選択します。通常、これらの変数は人口統計変数です。 | Field |
ReportTitle | レポートの名前を入力します。 | String |
OutputFolder | ファイルのフォルダー出力パス。 | Folder |
ReportFormats (オプション) | 目的のレポート出力形式を選択します。
| String |
コードのサンプル
CustomerDemographicComparisonReport (顧客の人口統計比較レポート) の例 (スタンドアロン スクリプト)
# 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