Select to view content in your preferred language

Calculating values for point percolation's

1924
1
05-06-2013 11:10 PM
MatthewMcDonald1
Emerging Contributor
Hey Esri forums, once again i find myself stuck and in need of someone to point me in the right direction...

I need to find some python or VBA script that will allow me to calculate a linear relationship for data values for every percolation of n number of sampling points within a proximity buffer of any given point. This means calculating the mean and standard deviation for each, and the slope and correlation coefficient between, one value for each point and another (It is worth mentioning that order of values is irrelevant for all of these calculations).

I hope this makes sense, I'm basically trying to find the linearity of the data values associated with different combinations of adjacent points, I've included a couple of images to try and clarify...

Cheers

Mattrnfnr

P.S. I don't really speak python that well so if you have a solution please dumb it down a notch or two if you can...

[ATTACH=CONFIG]24089[/ATTACH]

[ATTACH=CONFIG]24090[/ATTACH]
0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: csny490

Not sure I totally understand what you are trying to do - are you trying to derive an r^2 value for the points within the buffer (score them as to how well they fall within a linear-like pattern?

http://docs.scipy.org/doc/numpy/reference/generated/numpy.polyfit.html
http://stackoverflow.com/questions/893657/how-do-i-calculate-r-squared-using-python-and-numpy

You would have a search cursor loop through the points:
    select by location (by distance)
    calc your stats
    update the point table with the stats
0 Kudos