Implement a map layer that does not count the amount of activities, but the total and average budgets. Needs this patch in search_api working #1200952: Sum, min, max list handling options for view field

From a datamodel perspective, this is quite difficult:

Activity A
- BudgetlineA : 100
- BudgetlineB: 300
- LocationX
- LocationY

Statement that are true:
-- ActivitiyA total budget is 400
-- The average budget spent per location is 200

SearchAPI will not know the average budget per location, it will only know the activity on a location and the total budget (SUM) of the project, or the average (AVG) of *all* projects in that location. This would have the map show budgets more than once.

Workarounds:

- Store the average budget per location per activity in a field on the activity as a calculated field.

Still, this will not show what is actually budgeted, per location / administrative unit.

Comments

batje’s picture

Issue summary: View changes

added more detailed specification

batje’s picture

Solr 4.7 will have a new way of dealing with this in the Analytics Components.

I also started on a module that hardcodes this stuff, based on the old StatsComponent and aiming at geoclustering (so calculating the SUM of a cluster of points): https://drupal.org/sandbox/batje/2058663

Analytics issue:
https://issues.apache.org/jira/browse/SOLR-5302