Hi everyone,
I’m working on a project where I need to automate map production in ArcGIS Pro using ArcPy. One of the layers in my layout is the USA Cropland dataset, which contains nearly 150 cropland classes. Including all of these classes in the legend makes the map extremely cluttered.
What I would like to do is display only the top 10 classes for each state, based on pixel count, and group the remaining classes into an “Other Classes” category.
Is there a way to achieve this dynamically using ArcPy—either by modifying the legend, the symbology, or by generating a temporary raster/layer for each state?
Any guidance or examples would be greatly appreciated.
Thank you!