Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aggregate: geometric mean? #62

Open
jowens opened this issue Jan 16, 2016 · 2 comments
Open

aggregate: geometric mean? #62

jowens opened this issue Jan 16, 2016 · 2 comments

Comments

@jowens
Copy link

jowens commented Jan 16, 2016

Could you support a geometric-mean? I see "avg", which I assume is an arithmetic mean, and you have "median". I know I'll need geomean in the not too distant future.

vega/vega-lite#575

@g3o2
Copy link

g3o2 commented Oct 14, 2016

In the meantime, you can use the pow function, for example:

 "transform": [ 
  { "type": "calculate",  "field": "aagr", "expr": "pow((datum.value1 * datum.value2 * datum.value3), (1 / 3))" }
]

@jowens
Copy link
Author

jowens commented May 6, 2023

7+ years later, I asked in Altair Slack (today) and rediscovered this post. Anyway, geom didn't seem to make it into vega (sadly).

https://vega.github.io/vega/docs/transforms/aggregate/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants