FlowKit icon indicating copy to clipboard operation
FlowKit copied to clipboard

Weighted locations

Open jc-harrison opened this issue 5 years ago • 1 comments

Suggestion Add a 'weight' column to subscriber location queries (DailyLocation etc.), and use the weights appropriately in spatial aggregate queries (SpatialAggregate, JoinedSpatialAggregate, Flows), to allow for multiple locations per subscriber. The weights could all be 1, and just one location per subscriber, to keep the current behaviour for daily/modal locations, but having a weight column would allow for more flexibility, e.g. assigning subscribers to multiple locations when cell coverage polygons cross admin boundaries.

A new query kind (e.g. MappedMeaningfulLocations) could wrap a meaningful locations query to return the same columns as other location queries (with sum(1./n_clusters) as weight), so that SpatialAggregate could use meaningful locations (rather than needing the separate MeaningfulLocationsAggregate class), as could JoinedSpatialAggregate (there is currently no way to use meaningful locations for a joined spatial aggregate).

jc-harrison avatar Feb 04 '20 17:02 jc-harrison

This should make use of the weight field in the geo_bridge table under the new schema

greenape avatar Feb 04 '20 18:02 greenape