SummaryByBits

Title  Summary by Bits

Description

Splits the specified attributes by the specified bits present and generates data for reporting.

Usage

          
The output table containing summary information will have chart(s) associated with it.

License

Basic

Syntax

SummaryByBits (input_records, bit_field, report_bits, summary_fields, output_table, {selection_mode})

Parameter Explanation Data Type
input_records Dialog Reference

The table to summarize.

GPTableView
bit_field Dialog Reference

The field containing bit values. The first dataset specified in the Input Records parameter defines the list of fields.

Field
report_bits Dialog Reference

A list of bits and their description to use to split the summary field value by.

GPValueTable
summary_fields Dialog Reference

The numeric fields to summarize in addition to counting the bits. For each summary field, an additional chart will be created. The first dataset specified in the Input Records parameter defines the list of fields.

Field
output_table Dialog Reference

The table to write the summarized results to.

DETable
selection_mode (Optional) Dialog Reference

Specifies how layers without selection are processed

  • Evaluate all records in layers(PROCESS_ALL) — Every record is evaluated. This is the default.
  • Evaluate only selected record in layers(PROCESS_SELECTED_ONLY) — Layers without selections are skipped. Only selected records are evaluated.

GPString

Code Samples

SummaryByBits example 1 (Python window)

Splits the specified attributes by the specified bits present and generates data for reporting.

import arcpy

arcpy.udms.SummaryByBits(
    "D:/data/AssetPackage.gdb/UtilityNetwork/UNDevice",
    "phasesnormal",
    [[1, "C"], [2, "B"], [4, "A"]],
    "ratedpower",
    "D:/data/output.gdb/UNDevice_SummaryByBits",
    "PROCESS_SELECTED_ONLY",
)

SummaryByBits example 2 (stand-alone script)

Splits the specified attributes by the specified bits present and generates data for reporting.

import arcpy

arcpy.udms.SummaryByBits(
    input_records="D:/data/AssetPackage.gdb/UtilityNetwork/UNDevice",
    bit_field="phasesnormal",
    report_bits=[[1, "C"], [2, "B"], [4, "A"]],
    summary_fields="ratedpower",
    output_table="D:/data/output.gdb/UNDevice_SummaryByBits",
    selection_mode="PROCESS_SELECTED_ONLY",
)