keplergl / keplergl/kepler.gl

Ability to use custom aggregate functions

Open
#1,371 0 comments 1 reaction 1 assignee Claimed by @heshan0131 View on GitHub
backlog feature
Dominant language
TypeScript
Stars
12k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
66

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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.