-
Notifications
You must be signed in to change notification settings - Fork 35
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
Group sorting hierarchy not working correctly #109
Comments
@katush, please add the information with which deployed version you have tested this. Please also try with https://lineup.js.org/app_develop/. |
according to the current implementation of how categorical groups are compared, it behaves correctly: i.e find the most frequent category, compare them, if they are the same, sort by frequency of most frequent one |
@sgratzl, OK, but is there a reason why it needs to use the frequency only for the comparison and not use whatever the user has specific in the 'sort group by' dialog? |
it does use what is in the hierarchy. However, according to this implementation, the first sorting criteria is already enough to sort the groups thus the second one has no effect |
To be clear 'sort groups by' on categorical column means 'sort groups by frequency of categories'? I didn't know that (and I don't think it's very clear), but I get what happend now. |
isn't that why there is the group column for? since why is the number of items in the field specific to a numerical column? |
no it is the name and frequency of the most frequent category in the group. e.g. if you sort the group by a categorical attribute that is not the grouping criteria. |
Oh yes, I forgot about that one because it is not added by default anymore. What was the reason to not add it by default? Too wide? |
sorry, without an example I cannot follow anymore... |
The group column however doesn't contain the option to sort by number of items right now. |
(@katush, I deleted your last comment because it was a reply to my already deleted comment). |
@sgratzl, how can I sort the groups by frequency? If it works, I am not aware of that feature. The 'Group Name' column sorts the groups alphabetically. |
@sgratzl, can you clarify my last question? I need to know this for the paper writing. |
the same as it would be the grouping criteria
when it is the grouping criteria the most frequent category is easy since there is only one in the group |
OK |
@thinkh please specify the desired behavior since there was no consensus in the previous discussion. |
Coming from issue #161, where we came to the same conclusion, I'd would perfer the implementation that @sgratzl showed in this comment.
I know it has been a long time, but I cannot imagine a use case where this would make sense. In my opinion, group sorting requires enabled grouping in the first place. I would even suggest to hide the Sort Groups by action and only show it when the column is grouped. @sgratzl What is your opinion? Does this clarify your questions so that you can start implementing it? |
I'm not a fan of showing/hiding a button based on the state of the current column. And an use case in general is: group by categorical, sort groups by mean of a numerical. |
closing in favor of #161 |
Sorting groups by numerical values (median, mean) is not behaving correctly if the there is something above it in the hierarchy (e.g., group name/categorical attributes)
Example:
The group with the highest median should be first, but is actually last.
![image](https://user-images.githubusercontent.com/8986080/49022677-b8f0a580-f195-11e8-80ee-68127faa3d44.png)
The text was updated successfully, but these errors were encountered: