CartoDB / crankshaft

CARTO Spatial Analysis extension for PostgreSQL
BSD 3-Clause "New" or "Revised" License
54 stars 20 forks source link

creates new moran's i functions which expose spatial lag #202

Closed andy-esch closed 6 years ago

andy-esch commented 6 years ago

This PR adds new functions which expose the spatial lag for Moran's I local (regular and rate). We need this functionality to create data science dashboards that communicate the moran's i scatter plot (described here). This also starts the process of deprecating the existing Moran's I functions (see #196 for more) in favor of ones with better names:

Note this changes the internal function _CDB_AreasOfInterestLocal (and ...Rate) to ~return the spatial_lag column~ to rely on the _CDB_MoransILocal function instead. The existing public functions CDB_AreasOfInterestLocal and CDB_AreasOfInterestLocalRate are not affected (signatures remain the same), but their internals were refactored to accommodate the addition of the CDB_MoransILocal and CDB_MoransILocalRate functions.

ToDo

Other ToDos

edit removed some of the PR items that are now irrelevant

closes https://github.com/CartoDB/crankshaft/issues/201

stuartlynn commented 6 years ago

This looks good to me. Think we are good to merge this in