I am working on a project with a department that is undertaking an extensive survey of residential properties throughout the city. The department would like to have a random selection of addresses to survey. They are looking for approximately 20% of randomly selected residential addresses within each defined area (still a debate on the bias of using neighborhoods or a fishnet/grid/tessellation for the defined area)
Is there a way to do this in ArcGIS Pro 2.7.3 with an Advanced license? or is there a AGOL widget??
1) I do not have the geostatiscial analyst or data reviewer extensions.
2) I have tried to do a random number generator using the script example in Random Number Generator (Environment setting)—ArcGIS Pro | Documentation I have yet to successfully make this work. Any tips or tricks to share?
3) I know how to create random numbers in Excel and join them to a table. Trying to avoid using excel so that I can possible automate a model and publish a geoprocessing service.
Any guidance would be appreciated. Thank you for your kind assistance!
Do a field calculation, setting your distribution to Uniform
Emulate the syntax from the help topic, but replace random.random with random.uniform.
import numpy as np def getRandomValue(): return np.random.uniform()
Each value (defaults to between 0 and 1) has an equal chance of being drawn.
When you have calculated the whole field, simply do a query on that field querying for values < 0.2
That will pull 20% of the samples.
Alternately you can mess with > 0.8 or any other 20% range you like