POST
|
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!
... View more
04-20-2020
02:06 PM
|
0
|
1
|
409
|
POST
|
Thank you so much! What you did makes sense. I am trying to fit that to the template I have since I am only supposed to fill in the blanks, but I cannot figure out how to fill the three middle lines without having to change the rest of the code, which I do not think we are supposed to do. All of the lines are to have something filled in, but those three do not seem necessary for it to work, so I am not sure what would go there. Possibly argument variables? But I think if I did that then I would need to also import sys and change the parameters listed within the buffer analysis.
... View more
02-29-2020
04:51 PM
|
0
|
1
|
2519
|
POST
|
The directions are not very detailed. It says I am to use river.shp as the input and I can define any distances as long as they are in feet. It says to provide user input for the three parameters when implementing the data in PythonWin and each buffer should be named based on its buffer distance (ex. river100). I attached the python code to the original question and here is an example of the river.shp data.
... View more
02-29-2020
10:38 AM
|
0
|
0
|
2519
|
POST
|
I think I can make my analysis work if I can fill in the blanks. I know the first two and the distanceList values, but beyond that everything I have tried does not work.
... View more
02-29-2020
09:59 AM
|
0
|
5
|
2817
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|