-
Notifications
You must be signed in to change notification settings - Fork 42
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
Rename 'exception' to 'unique'? #15
Comments
I'm not an active user... yet... but indeed this name trips me up when I read about reductio. The association with the programming construct is strong for me. The documentation states:
Are there other purposes, i.e. can "exception aggregation" also do other things besides act on unique values? I'll just do a mental substitution for now. :-) It also seems like this operation might be dangerous if the reduction value is not always the same for the exception/unique key. |
Yeah, I think it's originally an SAP datawarehousing term. Probably came from German. The idea of exception aggregation is more than just counting unique values, but it's similar. It pretty much means that you define a key (or compound key) secondary to the current displayed dimensions, and you define an aggregation on that key. So say we are viewing revenue by country in our report. But in addition to revenue we also want to display the number of unique products that account for the revenue in each country: var dimension = crossfilter.dimension(function(d) { return d.country; });
var group = dimension.group(reductio().exception(function(d) { return d.product; }).exceptionCount(true)); Note that it's OK if a product appears in more than one country. It counts against each country, but it only counts at most once for each country. Ok, but what if we don't just want to count? We want to display the value of the most recent transaction in each country? Then our exception aggregation key would be Date rather than product, and our aggregation strategy would no longer be "just take one" (i.e, unique), but would rather be, take the one with the highest value of Date. I'm not sure this kind of flexibility is really necessary, but I could certainly see it being useful. Anyway, yes, renaming to |
similar discussion in #29 |
Cool - thanks for the feedback. I think I'm leaning in this direction as well ( |
Might be a little more clear regarding what it does.
The text was updated successfully, but these errors were encountered: