1

I have an attribute table containing "Joint_Count" and Raster ID (A1, A2, etc), where Join_Count refers to the sum of points per raster ID.

If the sum of all Join_Count represents 100%, how do I retrieve the threshold values to represent 20% and 30% of all values?

FID   Shape    Join_Count        Y_Index     X_Index 
0     Polygon      0                   A           1
1     Polygon      1                   A           2
2     Polygon      2                   A           3
3     Polygon      3                   A           4
4     Polygon      4                   A           5
5     Polygon      5                   A           5
6     Polygon      6                   A           5
7     Polygon      7                   A           5
8     Polygon      8                   A           5
9     Polygon      9                   A           5
10    Polygon      10                  A           5

The sum of all Join_Count is 55, corresponding to 100%.

20% and 30% of all valus are:

55*0.2 = 11 and 55*0.3 = 16.5. 

Next all Join_Count cells with a sum < 11 (<20%) should be coloured "green", sum values between 11 and 16 (20 - 30%) "yellow", > 16 (>30%) red.

In the above example, this corresponds to Join_Count values < 4 (<20%), between 4 and 5 (20 - 30%), and >5 (>30%).

Any suggestions how this can be done? I'm using ArcGIS 10.3.

I tried to add a new field and run cumsum(!Joint_Count!) in a first step, but I get an unknown error. Also searched through StackExchange, but couldn't find the solution.

0

1 Answer 1

1

If i got you correctly, you need quantity based symbology. Here you can control over the class and classification method etc.See below for point data.

demo

========================================

Edit (as perceived by discussion)-- Try below field calculator python code

def classmaker(fieldname):
    if fieldname<=11:
        return 1
    elif 11<fieldname<=16:
        return 2
    else fieldname>16:
        return 3

and run the above prelogic code as

classmaker(Joint_Count)

on a field of which data type is short. Afterall classify by this code.

7
  • This was my first thought, but the probem is that 100% in that case is the max. Join_Count value (in above example = 10) and not the sum of all Join_Count values (=55). Thus, the percentages are calculated based on a wrong total value.
    – tasmaniac
    Sep 8, 2015 at 8:16
  • Have you tried quantile- go to classify then select method as quantile with 3 classes..I mean tertiles or terciles.
    – Learner
    Sep 8, 2015 at 8:34
  • Yes, I tried it. The only solution so far is to calculate manually the thresholds and enter them based on 3 classes. But I'm sure there is an easier way of doing it. Maybe by adding another field in the table and calculating it there using the field calculator?
    – tasmaniac
    Sep 8, 2015 at 8:50
  • Oh sorry quantile will not do since interval is not equal..
    – Learner
    Sep 8, 2015 at 9:19
  • have you update with this edited new code?
    – Learner
    Sep 8, 2015 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.