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

How does the group sorting work for categorical columns? #374

Closed
thinkh opened this issue Jun 30, 2020 · 2 comments
Closed

How does the group sorting work for categorical columns? #374

thinkh opened this issue Jun 30, 2020 · 2 comments
Assignees

Comments

@thinkh
Copy link
Member

thinkh commented Jun 30, 2020

I was discussing the group sorting the other day with a customer and we could not come up with a comprehensible explanation how the group sorting is working for categorical columns. Maybe you can help us here.

Steps to reproduce

  1. Open https://lineup.js.org/develop/group3.html
  2. Collapse by third aggregation level
  3. Add sort groups by for Cat4

Observed behavior

Without group sorting (i.e., aggregation only) the pattern of the groups is clear and follows the group hierarchy.

grafik

However, once I sort the groups by Cat4 the pattern looks totally different. The groups do not follow the group hierarchy, but it is also not obvious that they are sorted by Cat4. There is a slight pattern that the groups are first sorted by d1 and then d2, but the sorting criteria itself is not obvious.

grafik

Question

@sgratzl Could you please explain how the groups are sorted in this example?

P.S. We discuss the group sorting also in PR #273 (review), but I did not sort the groups by a categorical column that is not used in the group hierarchy.

@sgratzl
Copy link
Member

sgratzl commented Jun 30, 2020

it is sorted by the most frequent category in the histogram of cat 4. In the upper half it is the blue ones in the lower ones it is the orange ones

@thinkh
Copy link
Member Author

thinkh commented Jul 24, 2020

Thanks for the clarification. I close this issue for now and reopen it if necessary.

@thinkh thinkh closed this as completed Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants