Description
Is your feature request related to a problem? Please describe.
Oftenly I need to compare regions by some metric, that should be weighted by another metric. For example I have orders that have hourly cost and duration. So when aggregating hexbin if there two orders, one with 10 hourly cost and duration 1 hour and another with 100 cost and 10 duration, It will show 55 average cost, but average weighted cost would be ~92.
Also sometimes I need use very complex metrics that cant be calculated with presented common aggregate functions
Describe the solution you'd like
An interface to create own aggregate functions in JS and ability to persist them somewhere without need in forking and maintaining own kepler repo. So it should be used on the fly
Describe alternatives you've considered
It would be good if there was at least average weighted aggregate function
Additional context
Custom functions should be able to get any value from data row or any other presented data including other aggregated layers. So as kepler is fully front end tool, there should not be critical security issues (user code affects only on user's environment)