D3PartitionR 0.3.0 is available on CRAN

3

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:
picture

  • 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).

beforetooltip

Before the update: Tooltip isn’t on the node

aftertooltip

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.

TrailD3.gif

Exemple of the new trail

##Code used to create the visualisation above
library(D3partitionR)
D3partitionR(T,width=600,height=600,legend=list(type="sequential",
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 ?

You can find the code of the package here.

Best,
Antoine

[twitter-follow screen_name=’AntGuilllot’ show_screen_name=’yes’]

 

 

 

3 COMMENTS

  1. Nice update! Really great package.

    One problem, after I updated the package, there will be error if I try to use is in rmarkdon document. It is fine before 0.3.0.

    The error message is: “pandoc.exe: could not fetch c:usersabcdDocumentsRwin-library3.3D3partitionRhtmlwidgetslibbootstrap../fonts/glyphicons=halflings=regular.eot
    c:usersabcdDocumentsRwin-library3.3D3partitionRhtmlwidgetslibbootstrap../fonts/glyphicons=halflings=regular.eot : openBinaryFile: does not exist (No such file or directory)”

LEAVE A REPLY

Please enter your comment!
Please enter your name here