formated markov sql file a bit

This commit is contained in:
Andy Eschbacher 2016-03-24 08:19:11 -04:00
parent bae2f04955
commit 9535506b93

View File

@ -23,9 +23,12 @@ CREATE OR REPLACE FUNCTION
RETURNS TABLE (moran FLOAT, quads TEXT, significance FLOAT, ids INT) RETURNS TABLE (moran FLOAT, quads TEXT, significance FLOAT, ids INT)
AS $$ AS $$
plpy.execute('SELECT cdb_crankshaft._cdb_crankshaft_activate_py()') plpy.execute('SELECT cdb_crankshaft._cdb_crankshaft_activate_py()')
from crankshaft.space_time_predictions import spatial_markov
# TODO: use named parameters or a dictionary from crankshaft.space_time_dynamics import spatial_markov_trend
return def spatial_markov_trend(subquery, time_cols, num_time_per_bin, permutations, geom_col, id_col, w_type, num_ngbrs)
## TODO: use named parameters or a dictionary
return spatial_markov_trend(subquery, time_cols, num_time_per_bin, permutations, geom_col, id_col, w_type, num_ngbrs)
$$ LANGUAGE plpythonu; $$ LANGUAGE plpythonu;
-- input table format: identical to above but in a predictable format -- input table format: identical to above but in a predictable format