Color Coded Layer (Business Analyst)

获得 Business Analyst 许可后可用。

摘要

Creates multilevel, scale-dependent choropleth layers from a variable describing a business, demographic, consumer, or landscape characteristic.

插图

Color Coded Layer tool illustration

使用情况

  • The output is a group layer containing scale-dependent administrative geography levels with a user-defined variable. By default, all levels and all features within each level are included in the group layer.

  • Local data or online data can be used to create a color-coded layer. The data can be explored through the data browser.

  • The Area of Interest parameter defines the geographic extent of the analysis. The following also pertain to the area of interest:

    • It is only supported with local data.
    • The output creates a feature dataset.
    • If specified, administrative geography levels intersecting the area of interest that include more than 10,000 features will not be included in the group layer.
    • If specified, it enables the Color Coded Group Layer symbology pane and ribbon contextual menu and supports additional settings and usability features outside of this tool.
  • When the Classification Method parameter is set to Auto, the following methods will be used for each variable type:

    MethodVariable Type

    Natural Breaks (Jenks)

    Count, Density

    Equal Interval

    Median, Rate, Per capita

    Standard Deviation

    Average, Percent, Index, Ratio

  • Custom data (.sdcx file) variables only include the custom feature layer; multiple levels will not be created.

  • Use the Secondary Variable parameter to map two variables with a single grid color ramp to classify both attributes.

  • When two variables are selected, the default symbology option will be Bivariate Colors.

参数

标注说明数据类型
Primary Variable

A variable that will display as a color-coded map.

String
Output Layer Name

The name of the color-coded layer that will be added to the map.

String
Classification Method

Specifies the method that will be used to calculate the class breaks.

  • Natural Breaks (Jenks)—Natural breaks classes are based on natural groupings inherent in the data. Class breaks that best group similar values and maximize the differences between classes will be identified. This is the default.
  • Quantile—Each class will contain an equal number of features. A quantile classification is well suited to linearly distributed data.
  • Equal Interval—The range of attribute values will be divided into equal-sized subranges. This allows you to specify the number of intervals and will automatically determine the class breaks based on the value range.
  • Standard Deviation— Class breaks will be placed above and below the mean value at a specified interval size, such as 2, 1, or 0.5, in the unit of standard deviation, until reaching the minimum and maximum values of the input variable.
  • Geometric Interval—Class breaks will be created based on class intervals that have a geometric series. The geometric coefficient in this classifier can change once (to its inverse) to optimize the class ranges.
  • Auto—Classification methods will be automatically defined using the variable metadata. This presents the recommended thematic map style based on the data type.
String
Number of Classes

The number of data classification breaks that will appear on the map. The default value is 5.

String
Area of Interest
(可选)

The feature layer that will be used to determine the geographic extent of the analysis.

Feature Layer
Output Geodatabase
(可选)

The geodatabase in which the output feature dataset will be created.

Workspace
Feature Dataset Name
(可选)

The name of the feature dataset in the output geodatabase in which the color-coded layer feature classes will be created.

String
Boundary Mode
(可选)

Specifies the types of boundaries that will be used to create levels in the color-coded group layer.

  • Standard Geographies—Boundaries will be levels of standard geographies. This is the default.
  • H3 Hexagons—Boundaries will be levels of H3 hexagons.
String
Secondary Variable
(可选)

A second variable that will display as a color-coded map.

String
Grid Size
(可选)

Specifies the grid size that will be used to create the bivariate color symbology.

  • 2X2—A 4-class bivariate color scheme will be used.
  • 3X3—A 9-class bivariate color scheme will be used. This is the default.
  • 4X4—A 12-class bivariate color scheme will be used.
String
Symbology Type
(可选)

Specifies the type of symbology that will be used.

  • Bivariate Colors—Two variables will be displayed using a grid color scheme.
  • Graduated Colors—Varying color shades will be displayed across geographical areas. This is the default.
  • Graduated Symbols—Varying symbol sizes will be displayed across geographical areas.
String

派生输出

标注说明数据类型
Output Layer

A container for the output layer.

Group Layer
Updated Feature Dataset

The new output feature dataset.

Feature Dataset

arcpy.ba.ColorCodedLayer(classification_variable, out_layer_name, classification_method, number_of_classes, {area_of_interest}, {out_dataset_path}, {out_dataset_name}, {boundary_mode}, {secondary_variable}, {grid_size}, {renderer_type})
名称说明数据类型
classification_variable

A variable that will display as a color-coded map.

String
out_layer_name

The name of the color-coded layer that will be added to the map.

String
classification_method

Specifies the method that will be used to calculate the class breaks.

  • NATURAL_BREAKS—Natural breaks classes are based on natural groupings inherent in the data. Class breaks that best group similar values and maximize the differences between classes will be identified. This is the default.
  • QUANTILE—Each class will contain an equal number of features. A quantile classification is well suited to linearly distributed data.
  • EQUAL_INTERVAL—The range of attribute values will be divided into equal-sized subranges. This allows you to specify the number of intervals and will automatically determine the class breaks based on the value range.
  • STD_DEV— Class breaks will be placed above and below the mean value at a specified interval size, such as 2, 1, or 0.5, in the unit of standard deviation, until reaching the minimum and maximum values of the input variable.
  • GEOMETRIC_INTERVAL—Class breaks will be created based on class intervals that have a geometric series. The geometric coefficient in this classifier can change once (to its inverse) to optimize the class ranges.
  • AUTO—Classification methods will be automatically defined using the variable metadata. This presents the recommended thematic map style based on the data type.
String
number_of_classes

The number of data classification breaks that will appear on the map. The default value is 5.

String
area_of_interest
(可选)

The feature layer that will be used to determine the geographic extent of the analysis.

Feature Layer
out_dataset_path
(可选)

The geodatabase in which the output feature dataset will be created.

Workspace
out_dataset_name
(可选)

The name of the feature dataset in the output geodatabase in which the color-coded layer feature classes will be created.

String
boundary_mode
(可选)

Specifies the types of boundaries that will be used to create levels in the color-coded group layer.

  • STANDARD_GEOGRAPHIES—Boundaries will be levels of standard geographies. This is the default.
  • H3_HEXAGONS—Boundaries will be levels of H3 hexagons.
String
secondary_variable
(可选)

A second variable that will display as a color-coded map.

String
grid_size
(可选)

Specifies the grid size that will be used to create the bivariate color symbology.

  • TWO_BY_TWO—A 4-class bivariate color scheme will be used.
  • THREE_BY_THREE—A 9-class bivariate color scheme will be used. This is the default.
  • FOUR_BY_FOUR—A 12-class bivariate color scheme will be used.
String
renderer_type
(可选)

Specifies the type of symbology that will be used.

  • BIVARIATE—Two variables will be displayed using a grid color scheme.
  • GRADUATED_COLORS—Varying color shades will be displayed across geographical areas. This is the default.
  • GRADUATED_SYMBOLS—Varying symbol sizes will be displayed across geographical areas.
String

派生输出

名称说明数据类型
out_layer

A container for the output layer.

Group Layer
out_dataset

The new output feature dataset.

Feature Dataset

代码示例

ColorCodedLayer example 1 (Python window)

The following Python window script demonstrates how to use the ColorCodedLayer function.

import arcpy
arcpy.env.baDataSource = "ONLINE;US;"
arcpy.ba.ColorCodedLayer("networth.mednw_cy", "CCL_NetWorth", "NATURAL_BREAKS", 5, "San_Francisco_County_BGs", "path to GDB", "SF_BGs")
ColorCodedLayer example 2 (Python window)

The following Python window script demonstrates how to use the ColorCodedLayer function with Statistical Data Collection variables.

import arcpy
arcpy.env.baDataSource = "USA_ESRI_2018"
arcpy.ba.ColorCodedLayer(r"c:\users\<User ID>\documents\arcgis\projects\my_project\bayarea_proprietarydata.sdcx/sales_s01_sales", "sales_s01_sales Layer", "NATURAL_BREAKS", 5)

许可信息

  • Basic: 需要 Business Analyst
  • Standard: 需要 Business Analyst
  • Advanced: 需要 Business Analyst

相关主题