Select to view content in your preferred language

Symbolize top 10 attributes by count dynamically

1012
4
10-11-2022 05:59 AM
NathanBaier1
Occasional Contributor

I am trying to figure out how to dynamically symbologize a layer with 100s of value within a single attribute field. The idea is as you zoom into the area only the top 10 (by count/rank) would be symbolized by a unique color and the remaining would fall under "other value". I imagine there is a way to do this with Arcade but I do not know Arcade well enough to figure it out. Thank you for help!

Tags (2)
4 Replies
GregoryLehner
Esri Contributor

Hi @NathanBaier1 - you for sure can achieve this with Arcade. Start by looking at the documentation I've linked here, the "Classify unique values" section, and see if that gets you on your way.

https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/set-custom-expressions-for-sy...

You could create an if-else statement with your Top 10 being the "if," and everything else falling under "else".

0 Kudos
NathanBaier1
Occasional Contributor

I have done this and it works, but is what I am after is a dynamic version of this. If I zoom in to an area, what is the top 10 for that area? Without calculating count and creating a new arcade list.

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

This is something I'm also interested in.

Right now, the only global related to the view is $view.scale. I've been wondering if there's a workflow to get the extent or something, or draw a polygon over the extent to use an overlay function.

0 Kudos
RhettZufelt
MVP Notable Contributor

Since you have it "working" but want it for just features in the view area, maybe you can feed this map into an experience builder page.  Ex Builder has "Actions" that allow you to filter the map( and any connected widgets) by view extent.

Don't know if it will work, or if the arcade in the map and the EB will "play well together", but thought I'd mention it as it has the filter by extent ability.

R_

 

0 Kudos