Using Python or Arcade to auto update Min and/or Max Values of Symbology Classes

344
1
09-26-2019 07:13 PM
CarlosBell
New Contributor

Hello, 

I am hoping that someone could help me streamline the process for updating symbology class values for an ArcGIS Pro project I am working on.  I get new/refreshed data for this project on a monthly basis.  The project is made up of 30 different layers, that are all connected to the same feature class.  Each layer symbolizes the results of a different variable in that feature class. 

Every month when I update the data of the feature class, I have to manually go through and update the min and/or max value of the symbology.  Other than the min and max values, the other values of each category/class remains the same. 

For example, if the below is the categories/data range, I would only have to make sure that the min and max are updated to reflect the new data. 

Symbology Class Example:

  5 (min) -  200     [Min changes, upper value remains the same from month to month]

  201 - 300           [Lower and upper values remains the same from month to month]

  301 - 500           [Lower and upper values remains the same from month to month]

  501 - 679 (max) [Lower value remains the same, Max value changes]

Currently, I have to open up the symbology for each layer, and manually update the min and max values.  This wouldn't be a big deal if it was couple of layers, but it becomes a bit time consuming given that it's 30 layers. 

QUESTION:

Is there a way to use python or maybe Arcade to automate the update of only the min and max values of each layer symbology class? 

Any help is greatly appreciated!!!

python.‌

0 Kudos
1 Reply
XanderBakker
Esri Esteemed Contributor

Hi Carlos Bell ,

If you want to show 4 classes, whereas the internal class values don't change (just the min and max), this could be done with Arcade using an expression similar like this one:

var val = $feature.YourFieldContainingTheValues; // change this and point to your field

var class = "";
if (val <= 200) {
    class = "<= 200";
} else if (val <= 300) {
    class = "200 - 300";
} else if (val <= 500) {
    class = "300 - 500";
} else {
    class = "> 500";
}

return class;

It will not matter what the min and max values of the data is.

0 Kudos