D3PartitionR 0.3.0 is available on CRAN

[This article was first published on R – Enhance Data, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Yesterday, the new version of D3partitionR was uploaded on CRAN, this version contains some major improvements.

1. General layout:

Before this update, the height and width of the widget were somehow messy and so was the global layout. The layout is now the following:

  • Area A: Title area (exists only if the user entered a title)
  • Area B: Trail area (Only if the user set the trail option to true)
  • Area C: Partition chart area
  • Area D: Legend area (only if the user selected a legend)

In previous version, the chart size wasn’t responsive to the chart options (Title or not, trail or not, Legend or not).

2. Bootstrap tooltip

In previous versions, the tooltip was sometime badly positioned (for exemple when scrolling the page, or placing the chart in a box). I replaced the homemade tooltip with the one from bootstrap which use tether.js library for positioning, this should made the positioning much more robust (you can see it on the Japan trade app for instance).


Before the update: Tooltip isn’t on the node


After the update: Tooltip is properly positioned

3. Trail and sequence visualisation:

Sometimes when you zoom on some part of the chart, you may forget where you’re really in the current sequence.

Using the breadcrumb trail from https://bl.ocks.org/kerryrodden/7090426 , you now can see where you are positioned in the chart and get the size of the different steps.


Exemple of the new trail

##Code used to create the visualisation above
color=list(B="#e8ae46",C="#bf3a8e")),title=list(text="My Title"),trail=TRUE)

4. Future developments

One of the major improvement that could be made, would be to make the package compatible with hclust and other hierarchical data formats from R. Hopefully, v0.4.0 will make it possible to use D3partitionR with hclust objects and nested lists (instead of using the list format which can be tricky sometimes).
The two main issues to be tackled to add these functionalities are:

  • How to convert the hclust data to a nested list with the properties and values required for D3partitionR ?
  • What is useful to be shown from a hclust object in a D3partitionR ? For instance, keeping all the nodes would make the chart far too complicated and deep, so should the user provide a given cut-off ? Should it be computed automatically ?






To leave a comment for the author, please follow the link and comment on their blog: R – Enhance Data.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)