CartoDB / camshaft

Analysis library to create data views from queries
BSD 3-Clause "New" or "Revised" License
17 stars 7 forks source link

Add "enrich from layer" analysis #149

Open AbelVM opened 8 years ago

AbelVM commented 8 years ago

Let's say you have layer A which has a numeric column called vals, and a layer B that you want to enrich from layer B spatially interpolating the values of vals in the B geom. This analysis would make use of CDB_SpatialInterpolation

Example:

NOTE: In case that the layer's geometries aren't points, we should use the centroids instead.

cc @javisantana

javisantana commented 8 years ago

hey @AbelVM it'd be nice if you could send a PR, it should be pretty easy based on this one https://github.com/CartoDB/camshaft/blob/master/lib/node/nodes/sampling.js

AbelVM commented 8 years ago

Cool! will check it and try! :)

AbelVM commented 8 years ago

PR: https://github.com/CartoDB/camshaft/pull/153

AbelVM commented 8 years ago

This analysis would be somehow like Filter points in polygons, without the filtering. Augmenting your polygons (or points) with the interpolated data of your points. It might go to "CREATE AND CLEAN" section.

cc @saleiva