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? #575
Comments
In Vega (and the underlying aggregator in datalib), this could be realized via sums of log-transformed values followed by post-aggregate exponentiation. Basically, combining Vega Related stack overflow article about SQL: http://stackoverflow.com/questions/3912204/why-is-there-no-product-aggregate-function-in-sql This is also relevant to us as we consider future work partitioning the data flow across client and server. |
Fascinating, thanks for the perspective! It would seem from the API point of view that one of the interesting design points for vega-lite would be how to drop in (call out to?) a Vega feature if that was desired. This would be a good example; I kind-of doubt that vega-lite will support formula and aggregate directly (feel free to tell me I'm wrong), but something in vega-lite syntax that directly "called" Vega would be useful. (In the alternative, I would personally plan to convert vega-lite to Vega and then patch the Vega JSON, but that's not exactly portable.) |
You are totally right. We would like to have a way for users to specify parts of their spec in vega if vega-lite is not expressive enough. However, we have not yet found a clean way to do this in the spec and in the code. I am afraid that this is a major feature that requires some rewriting. |
This is more like a datalib issue, so if you strong feel we should support this now, please file it in the datalib repo. :) |
I've provided a workaround ( |
This might be a vega issue, not vega-lite, but:
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.
The text was updated successfully, but these errors were encountered: