minor formatting changes

This commit is contained in:
Andy Eschbacher 2016-09-20 09:55:33 -04:00
parent 29de72de33
commit 166e9e223f
2 changed files with 5 additions and 3 deletions

View File

@ -10,5 +10,5 @@ SELECT z_score, p_value
FROM cdb_crankshaft.CDB_GetisOrdsG(
'select * from getis_data',
'hr8893', 'knn', 5, 999,
'the_geom', 'cartodb_id') As cdb_getisordsg(z_score, p_value, p_z_sim)
'the_geom', 'cartodb_id') As t(z_score, p_value, p_z_sim)
WHERE p_value <= 0.05;

View File

@ -28,14 +28,16 @@ import json
# f.write(str(out))
#
# np.random.seed(1234)
# # need to do random.seed(1234) too?
# lgstar = ps.esda.getisord.G_Local(y, w, star=True, permutations=999)
#
# with open('getis_data.json', 'w') as f:
# with open('getis.json', 'w') as f:
# f.write(str(zip(lgstar.z_sim, lgstar.p_sim, lgstar.p_z_sim)))
#
class GetisTest(unittest.TestCase):
"""Testing class for Getis-Ord's G funtion
"""Testing class for Getis-Ord's G* funtion
This test replicates the work done in PySAL documentation:
https://pysal.readthedocs.io/en/v1.11.0/users/tutorials/autocorrelation.html#local-g-and-g
"""