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

Added cross() operation to group object #110

Closed
wants to merge 2 commits into from

Conversation

rvermillion
Copy link

Added a new cross() method to the group object to make it easier to get 2-dimensional data out of crossfilter. The current implementation scans the whole data set and doesn't use the incremental update capabilities, but it does use the group indices.

Basically, if group A has keys "a", "b", and "c" and group X has keys "x", "y", and "z", then calling A.cross(X) will give you an array with 9 values, one for each combination. Should be faster than looping over one group, calling filter on the dimension for each group key (assuming identity group transform), and then reducing using the other group.

There is an option to honor or ignore the filters on the two crossed dimensions – filters on other dimensions will always be honored.

Also added a couple of tests but I won't pretend the coverage is 100%.

The cross operation takes another group and creates a crosstab based
on all the combinations of group keys.
@RandomEtc
Copy link
Collaborator

Thanks for your contributions and sorry for silence on this side. As discussed in #151 an active fork is being developed in a new Crossfilter Organization. Please consider rebasing and opening your PR there (if you haven't already) where it should be warmly welcomed by the new maintainers. Cheers!

@RandomEtc RandomEtc closed this Mar 14, 2016
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants