It would be useful to be able to store categorical data in StatisticsCollector's columns and display it in a human-readable form, e.g. object state, mode, current Type/SKU, etc. Typically the categories are mapped to positive integers.
Current options are: 1) store and display numbers, it is fast and space-efficient but such tables are not very readable by humans; 2) store and display strings, it is much slower, strings apparently use lots of memory, but the table is human-readable; 3) store numbers, use a CalculatedTable to convert them to human-readable descriptions, this approach is cumbersome.
Proposal. StatisticsCollector already allows to define a rule how a stored value is displayed. Model.dateTime can be saved as double and displayed "Date / Time". StatisticsCollector.getID(treenode) can be saved as double and displayed as "Object". Would it be possible to extend this approach to enumerated values? Possible implementation can add these Display Formats:
- "By Table Lookup" (generic for model-specific categorical values)
- "State Name" (for object state profiles)