-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spatial interpolation #153
base: master
Are you sure you want to change the base?
Conversation
target: Node.PARAM.NODE(Node.GEOMETRY.ANY), | ||
column: Node.PARAM.STRING(), | ||
method: Node.PARAM.NULLABLE(Node.PARAM.NUMBER()), | ||
p1: Node.PARAM.NULLABLE(Node.PARAM.NUMBER()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if p1
refers to number of neighbours
. Could we use numberOfNeighbours
as param name?
👍 |
Fixed:
Now I like my own code much more :) cc @rochoa |
// column of values in source dataset | ||
column: Node.PARAM.STRING(), | ||
// 0: nearest neighbor, 1: barymetric, 2: IDW | ||
method: Node.PARAM.NULLABLE(Node.PARAM.ENUM('nearest neighbor', 'barymetric','IDW'),'barymetric'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid spaces in ENUM values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
var Node = require('../node'); | ||
|
||
var TYPE = 'enrich'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TYPE and filename should match.
I'll add the tests these days and assign you the CR, @dgaubert. Sorry! ¯_(ツ)_/¯ |
sourceQuery: this.source.getQuery(), | ||
targetQuery: this.target.getQuery(), | ||
val_column: this.val_column, | ||
method: ['nearest_neighbor', 'barymetric','IDW'].indexOf[this.method], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indexOf
is a function, don't use []
on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FUUUUUCK
For new analysis use the following checklist:
the_geom geometry(Geometry, 4326)
column.cartodb_id numeric
column.{cache: true}
option when it needs full knowledge of the table it. Hints: aggregations, window functions.{cache: true}
if it access external services.cc @javisantana