I have a shapefile layer with polygons for the 50 U.S. states ("States"). I also have a point featureclass with potentially many overlapping points at the centroid of each state polygon ("Dots").
I want to use the CreateRandomPoints_management() function to find new placements for all the points in each state, essentially creating a 1:1 dot density map with clickable point features.
Here's the workflow I have envisioned:
- Loop through and select each state, one by one
- Get the count of points contained within each state polygon boundary
- Use CreateRandomPoints_management to generate count number of randomized points within each state boundary
- Move the original points to the new random locations and then delete the random points layer -or- Add fields and assign values to the newly created random points layer from the original points [Whichever's simpler and more reliable]
I've tried several times to write this code, but my arcpy chops aren't that great yet. Any ideas or examples would be greatly appreciated!