AnsweredAssumed Answered

Help using ArcGIS Desktop Field Calculator and Python to define risk classes.

Question asked by katelynet on Apr 20, 2020
Latest reply on Apr 21, 2020 by mark.bryant

I am trying to use if, elif, else statements in Field Calculator to define risk areas (low, moderate, high).  I attached an image of part of the attribute table.  I will be using all 7 classes in my risk determination, but I am only listing a few in my example below to give an idea of what I need to do.

I need to say things like:

     if SixtyFiveO is less than or equal to '0.0933' and if MetroClass equals 'Noncore' or 'Micropolitan' and if Diabetes is less than '0.05', etc. then the risk column value is 'low'. 

     elif SixtyFiveO is greater than or equal to '0.09331' and less than or equal to '0.01866' and if MetroClass equals 'Small Metro' or 'Medium Metro' etc. then the risk column value is 'moderate'.

     else...then the risk column value is 'high'.

I am not entirely sure how to write this.  Any help is much appreciated!

Outcomes