Hello!
Here is my general aim:
I want to fill a attibute column with different values and each has to appear by a specific percentage.
Here is my aim with a few more details:
I do have a shapefile with detailed catchments of cropland. And i do have a list of 12 crop types. I have already created a new column called RandomCropType ("CROPTYPE"). I now want to fill the column the numbers 1-12, following the rule that each number has a specific "chance to appear" by a specific percentage (e.g. 1= 14%, 2= 6%, 3=10%, 4=26%, 5=4%. ....).
At the end i want to have 14% of the features classified with "1"; 6% of the features classified with "2", and so on ...
Here is my (hopefully simple) question:
How does it might work in ArcGIS? Or - ive already thought about it - is it not worth trying in ArcGIS and better using MC Excel?
Here are my skills:
I am a student (Landscape Planning), my ArcGIS skills might be "alright". I am familiar with the model builder and at least tried to work with python.
Best greets from Germany - and thanks in advance,
Jacob
You could use the field calculator and the random.choice function. See the example below to explain the concept (this is not the formula that can be used in the Field Calculator):
What happens here is that in this case I have a list of 5 crops ("crop 1" to "crop 5") and each has a weight assigned to it (the values 14, 6, 10, 26 a 4). On line 2 a list is created with in this case 14+6+10+26+4 items. On line 3 a random item is selected from the list. The more a crop occurs in the list, the higher the change to get selected.