Select to view content in your preferred language

ArcGIS Pro calculate mode for a field

995
2
Jump to solution
11-10-2023 08:13 AM
Labels (1)
YusefSamari
Regular Contributor

I am using ArcGIS Pro I have a table full of wildlife sightings, containing, besides many other fields, the scientific name of the species and the month the sighting was made in, as an integer from 1 to 12. I would like to create a new field showing the month the species is most frequently sighted in, i.e. the mode of the month field. 

My first thought was to use Summary Statistics, with Month as the Summary Field, Mode as the Statistic Type and Scientific Name as the Case Field. But there is no Mode option on the Summary statistics tool.

I then tried running a Frequency tool with both Scientific Name and Month as frequency fields. I thought I could then select the entries with the maximum FREQUENCY from that, but can't figure out how to make the SQL query work. That frequency table looks like this:

YusefSamari_0-1699632805502.png

 

Any help would be much appreciated, either to just directly calculate the mode of a field in some way, or any kind of workaround!

Thanks!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

Emulate this script in

Solved: Calculating the Mode from list of fields using fie... - Esri Community

just use a single field in the expression.

Or if you need a broader statistics summary, including the mode, see

Field Statistics To Table (Data Management)—ArcGIS Pro | Documentation

 


... sort of retired...

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Emulate this script in

Solved: Calculating the Mode from list of fields using fie... - Esri Community

just use a single field in the expression.

Or if you need a broader statistics summary, including the mode, see

Field Statistics To Table (Data Management)—ArcGIS Pro | Documentation

 


... sort of retired...
0 Kudos
YusefSamari
Regular Contributor

Many thanks Dan. I went for the Field Statistics to Table option, good to know about that!

0 Kudos