crankshaft/pg/test/0.0.1/sql/02_moran_test.sql
2016-02-18 11:28:26 +01:00

13 lines
428 B
PL/PgSQL

\i test/fixtures/ppoints.sql
-- Moral functions perform some nondeterministic computations
-- (to estimate the significance); we will set the seeds for the RNGs
-- that affect those results to have repeateble results
SELECT cdb_crankshaft.cdb_random_seeds(1234);
SELECT ppoints.code, m.quads
FROM ppoints
JOIN cdb_crankshaft.cdb_moran_local('ppoints', 'value') m
ON ppoints.cartodb_id = m.ids
ORDER BY ppoints.code;