I have a points table my_table
my in PostgreSQL database with geometry
column and other attributes. I have some sample data of my_table
like follows (attributes of my_table
).
id val1
1 72.54513286
2 73.67371014
3 74.204424
4 73.76017279
5 77.7912762
6 77.78789496
7 65.51822878
8 65.5182287
9 74.65885753
10 74.65885753
11 61.18084042
12 60.75827621
13 64.27716322
14 63.69432836
15 75.790405
16 60.95270235
17 79.12399503
18 62.9667706
19 78.1265630
Using Python PySAL package, I would like to analyse that whether values in column val1
are sptially autocorrelated (Moran I) (by interatively plotting them). My expected output of interactive spatial autocorrelation could be like (image source, here):
I am new to Python. Can someone suggest me how to do this using PySAL?