Select to view content in your preferred language

Feature Class table reporting - value occurrence reporting

94
2
Saturday
cmartin_puc
New Contributor

anyone know of a simple way to report the following on an attribute table?

  • Field Names
    • List of values in the field
      • Number of occurrences of each value

Example:

  • Field Name: Phase Configuration
    • Yellow: 1764
    • Red: 851
    • Blue: 289

 

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

through model builder with a field iterator calling

Summary Statistics (Analysis)—ArcGIS Pro | Documentation with the "count" option

obviously, only for fields of Text type

Iterate Fields (ModelBuilder)—ArcGIS Pro | Documentation

Or if you want other statistics for interval/ratio data type fields, you could accommodate that as well


... sort of retired...
RobertCollins
Esri Contributor

Echoing the comment above from Dan that the Summary Statistics tool would probably be a good starting point.

The graphic on the documentation's help page shows a visual example of how it'd work for your table. 

The tool will output a table, containing each unique value in the field and the count of how many times this value occurs.

Alternatively, if you wanted to give Python a go a workflow along the lines of the following might be suitable:

  • Set the path to your feature class
  • Identify field to summarise
  • Read the values
  • Count the occurrences
  • Output the results

There is a built in python module called "collections" and within this the "counter" class can be used to count the occurrences of items in a list or iterable.   

0 Kudos