Skip to content
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

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Add spatial interpolation #153

wants to merge 28 commits into from

Conversation

AbelVM
Copy link
Contributor

@AbelVM AbelVM commented Jul 19, 2016

For new analysis use the following checklist:

  • Outputs a the_geom geometry(Geometry, 4326) column.
  • Outputs a cartodb_id numeric column.
  • Uses {cache: true} option when it needs full knowledge of the table it. Hints: aggregations, window functions.
  • Uses {cache: true} if it access external services.
  • Naming uses a-z lowercase and hyphens.
  • All mandatory params cannot be made optional.
  • Avoids using CTEs for join operations when result is not cached.

cc @javisantana

@dgaubert dgaubert self-assigned this Aug 11, 2016
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()),
Copy link
Contributor

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?

@dgaubert
Copy link
Contributor

👍

@AbelVM
Copy link
Contributor Author

AbelVM commented Aug 12, 2016

Fixed:

  • Using ENUM now
  • Defaults defined in PARAMS

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'),
Copy link
Contributor

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.

Copy link
Contributor Author

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';
Copy link
Contributor

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.

@AbelVM
Copy link
Contributor Author

AbelVM commented Sep 19, 2016

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],
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FUUUUUCK

@AbelVM AbelVM assigned dgaubert and unassigned rochoa Sep 21, 2016
@andy-esch andy-esch changed the title Add enrich Add spatial interpolation Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants