D3partitionR
D3partitionR copied to clipboard
Proposals for improvements
Hello,
I think there is a great potential in this package.
Below are a few improvements I thought of:
-
Trail: In some cases (typically when more than one D3partitionR object are displayed in a Shiny application), the trail is cut off. One solution could be to put the trail in a scrollbars environment.
-
Colors option: Would it be possible to allocate different colors to every top level (i.e. obviously not the whole but the levels just below) and then to keep this color when descending into its sub-levels and just make its luminosity vary (i.e. gradient approach)?
-
Speed: When more than one D3partitionR object are displayed in a Shiny application and when the type of graph is changed (e.g. through a drop-down menu), it can take some time (around 10 seconds on my laptop - I can give its specifications if needed). Maybe the speed could be improved?
-
Inspirations: I found the Baobab (under GNU Linux) and WinDirStat (under Windows) softwares a great source of inspiration:
- It could be useful (perhaps as an option?) to be able to go through the different levels in a separate window (with scrollbars as well) next to the graph with the key figures displayed on each level (see Baobab); the different selected levels would then simultaneously be highlighted on the graph. Perhaps also as an alternative to the trail.
- A tiny improvement proposal: regarding the colors, they could be a bit more shiny like in WinDirStat.
-
Package management: Tiny last improvement: the package 'magrittr' could be automatically (i.e. not explicitely loaded by the user) loaded with D3partitionR.
-
Reference manual: I noticed some typos (e.g. "set_continuous_color_scale Add a custom discrete color scale").
Best regards,
Olivier
- Scroll: This is tedious to implement, and the plots should not be too deep (otherwise, as you mentioned, the speed is an issue).
- Colors option: I think this is doable, I need to have a closer look on the code.
- Speed: I agree on this, the data are by definition hierarchical, and requires for loops and some dirty tricks which are not efficient. The speed could be improved by rewriting some core functions with rcpp. Also, D3js may be slow when dealing with many elements (since its DOM based).
- Inspirations: I don't think this would fit into the package (it is too specific and requires some work) but you can have a look on shinyTree. With the proper binding, this may do the job.
- Color: I think the new set_nodes_style function can do the job (it's in the dev branch)
- Package management and reference manual: you're right, I'll correct this
Thanks for your feedback, Best regards, Antoine
I didn't know shinyTree, thank you.