I wish to question a design in the automatic sorting of groupby operations on the dimensional containers (holomaps, NdOverlay and NdLayout) in Holoviews. Currently the groupby operation automatically sorts the grouped dimensions alphanumerically.
This had surprised me earlier because I believe that majority of the users will have data that have been sorted alphanumerically or prepared with a defined order that are not alphanumerically sorted before passing to Holoviews for manipulation and visualization.
The automatic sorting leads to two problems: sorting a sorted data which produce no change in the order of the data and destroying a deliberate order when sorting.
I resolved my issue with sorting with a PR to allow the sorting to be disabled by a user during a groupby operation with an api:
.groupby(dim, sort=False). However, with the sort being automatic which requires me to actively disable a groupby sort and I find it tedious.
Most of the data I worked with have a particular logical order that when used to create a dimensional containers and then visualized helps me to tell a story. Often these dimensions are string arrays which are names of an experimental condition.
I wanted to understand why it is necessary to have the groupby sorting be automatic rather than selected by a user? The only case I can understand is working with a dictionary which itself have no order and so sorting this type of data is reasonable. This had been built into dimensional containers and can detect a dictionary. The underlying data structure of dimensional containers are OrderedDict which already preserve the key order and I wanted to leave this order alone during groopby unless I need to specify