Count Rendering (Spatial Statistics)

Summary

Applies graduated circle rendering to a numeric field in a feature class.

Illustration

Count Renderer illustration

Usage

Syntax

CountRenderer_stats (input_feature_class, field_to_render, Output_Layer_File, number_of_classes, symbol_color, {maximum_field_value})
ParameterExplanationData Type
input_feature_class

The feature layer containing count data to be rendered.

Feature Layer
field_to_render

The name of the field containing count data.

Field
Output_Layer_File

The new output layer file containing rendering information. You must include the .lyr extension as part of the file name.

Layer File
number_of_classes

The number of classes into which the input feature class will be classified.

Long
symbol_color

The color of the graduated circles.

  • MANGO
  • BRIGHT_RED
  • DARK_GREEN
  • GREEN
  • DARK_BLUE
  • BRIGHT_PINK
  • LIGHT_YELLOW
  • SKY_BLUE
String
maximum_field_value
(Optional)

The maximum attribute value that will be rendered. Features with field values greater than this maximum value will not be drawn.

Double

Code Sample

CountRendering Example (Python Window)

The following Python Window script demonstrates how to use the CountRendering tool.

import arcpy
arcpy.env.workspace = "c:/data"
arcpy.CountRenderer_stats("autotheft_weighted.shp", "Count", "auto_weight_rendered.lyr", "5", "mango","#")
CountRendering Example (stand-alone Python script)

The following stand-alone Python script demonstrates how to use the CountRendering tool.

# Convert incident data to weighted point data and render
 
# Import system modules
import arcpy, sys, string, os
 
# Local variables...
workspace = "C:/data"
input = "AutoTheft.shp"
input_weighted = "autotheft_weighted.shp"
results_field = "Count"
input_weighted_rendered = "auto_weight_rendered.lyr"
 
try:
    # Set the current workspace (to avoid having to specify the full path to the feature classes each time)
    arcpy.env.workspace = workspace
 
    # Process: Collect Events...
    arcpy.CollectEvents_stats(input, input_weighted, results_field)
 
    # Process: Count Rendering...
    arcpy.CountRenderer_stats(input_weighted, results_field, input_weighted_rendered, "5", "MANGO", "#")
 
except:
    # If an error occurred when running the tool, print out the error message.
    print arcpy.GetMessages()

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

3/7/2012