add full tests

This commit is contained in:
abelvm
2016-08-16 10:41:54 -04:00
157 changed files with 13680 additions and 334 deletions
+14 -2
View File
@@ -1,6 +1,18 @@
-- Install dependencies
CREATE EXTENSION plpythonu;
CREATE EXTENSION postgis;
CREATE EXTENSION cartodb;
CREATE EXTENSION postgis VERSION '2.2.2';
-- Create role publicuser if it does not exist
DO
$$
BEGIN
IF NOT EXISTS (
SELECT *
FROM pg_catalog.pg_user
WHERE usename = 'publicuser') THEN
CREATE ROLE publicuser LOGIN;
END IF;
END
$$ LANGUAGE plpgsql;
-- Install the extension
CREATE EXTENSION crankshaft VERSION 'dev';
+10
View File
@@ -0,0 +1,10 @@
\pset format unaligned
\set ECHO all
SELECT count(DISTINCT cluster_no) as clusters from cdb_crankshaft.cdb_kmeans('select * from ppoints', 2);
clusters
2
(1 row)
SELECT count(*) clusters from (select cdb_crankshaft.CDB_WeightedMean(the_geom, value::NUMERIC), code from ppoints group by code) p;
clusters
52
(1 row)
+10
View File
@@ -0,0 +1,10 @@
SET client_min_messages TO WARNING;
\set ECHO none
_cdb_random_seeds
(1 row)
cartodb_id|trend_test|trend_up_test|trend_down_test|volatility_test
1|t|t|t|t
2|t|t|t|t
3|t|t|t|t
(3 rows)
@@ -0,0 +1,27 @@
\pset format unaligned
\set ECHO none
_cdb_random_seeds
(1 row)
within_tolerance
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
(20 rows)
+14
View File
@@ -0,0 +1,14 @@
SET client_min_messages TO WARNING;
\set ECHO none
the_geom | h | hpop | dist
--------------------------------------------+-------------------------+--------------------------+----------------
01010000001361C3D32B650140DD24068195B34440 | 1.51078258369747945249 | 12.08626066957983561994 | 4964.714459152
01010000002497FF907EFB0040713D0AD7A3B04440 | 98.29730954183620807430 | 688.08116679285345652007 | 99.955141922
0101000000A167B3EA733501401D5A643BDFAF4440 | 63.70532894711274639196 | 382.23197368267647835174 | 2488.330566505
010100000062A1D634EF380140BE9F1A2FDDB44440 | 35.35415870080995954879 | 176.77079350404979774397 | 4359.370460594
010100000052B81E85EB510140355EBA490CB24440 | 33.12290506987740864904 | 132.49162027950963459615 | 3703.664449828
0101000000C286A757CA320140736891ED7CAF4440 | 65.45251754279248087849 | 196.35755262837744263547 | 2512.092358644
01010000007DD0B359F5390140C976BE9F1AAF4440 | 62.83927792471345639225 | 125.67855584942691278449 | 2926.25725244
0101000000D237691A140D01407E6FD39FFDB44440 | 53.54905726651871279586 | 53.54905726651871279586 | 3744.515577777
(8 rows)
@@ -1,7 +1,12 @@
SET client_min_messages TO WARNING;
\set ECHO none
<<<<<<< HEAD
nn | nni | idw
-----+--------------------------+-----------------
200 | 780.79470198683925288365 | 341.46260750526
=======
cdb_spatialinterpolation
t
>>>>>>> ebbf68af5700f33737ac18516e2bdc22ea330b24
(1 row)