antoineguillot2 / d3partitionr Goto Github PK
View Code? Open in Web Editor NEWR package to visualise interactively hierarchical data.
Home Page: http://enhancedatascience.com/2017/09/20/d3partitionr-0-5-beta/
R package to visualise interactively hierarchical data.
Home Page: http://enhancedatascience.com/2017/09/20/d3partitionr-0-5-beta/
Set_trail(D3,visible=F) not working
As presented in this example:
https://bl.ocks.org/mbostock/4063582
Hi,
I am using your package to create a visualization. However, I am not sure how to control colors,remove or rename root. It would be great if you could help me out with this.
Dataset
Invoked_from functionality action N
1: Invoked_from alpha functionality document menu action add 1
2: Invoked_from alpha functionality document menu action click 29
3: Invoked_from alpha functionality document menu action close 1
4: Invoked_from alpha functionality document menu action expand 5
5: Invoked_from alpha functionality document menu action follow 1
6: Invoked_from alpha functionality document menu action maintain 2
d3 = D3partitionR() %>%
add_data(pt,count = 'N',steps=c('Invoked_from','functionality','action')) %>%
add_title('SRA') %>%
plot()
d3
Any help would be great
It would be nicer if we could get the data set easier, e.g.
titanic_data=fread("train.csv")
Won't work without getting train.csv
and most users are lazy ;)
Could you use https://cran.r-project.org/web/packages/titanic/ in your example instead?
Thank you for your package.
I am learning how to use it but I could not make it work on mobiles. If I save a chart (from RStudio Viewer) as html, I can not have the same behavior as in the computer when clicking on the chart.
Any suggestions?
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:
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
Verify of hclust object could be supported by D3partitionR while keeping the interface consistency.
Hi,
My tree works on R, and tooltips as well.
However, when using Shiny, I can't see the tooltips anymore.
Do you have any ideas of why?
D3partitionchart working fine in shiny locally but on shiny server I am getting the folowwing eror,please help me on this issue
Warning: Error in [.data.table: SETLENGTH() cannot be applied to an ALTVEC object.
113: [.data.table
109: split.data.table
107: df_to_nest
106: compile_D3_partitionR
105: plot.D3partitionR
103: function_list[[k]]
101: freduce
100: _fseq
99: eval
98: eval
96: %>%
95: func [/home/mykampaign/R/ShinyApps/Segmentation/server.R#25]
82: origRenderFunc
81: output$D
1: runApp
Thanks in Advance,
Manohar
Add a function, for instance, set_nodes_style, to modify the nodes CSS. The function could have two parameters, one to provide the style on hover and the other one to specify the basic CSS style.
hello, I find the add_data() [packageVersion0.5 ] just only support class(df) is "data.table" "data.frame", when class(df) is "data.frame" or "tbl_df" "tbl" "data.frame" cant't work.
I saw a demo of previous versions ( 0.1, 0.3) do not have black borders.
How can I disable the black borders in current version?
Add a resizing policy, this will probably require to refactor the d3.js code.
Add new chart types:
HI, I am trying to use D3partionR package to graph a sequence. My sequence has areas where a shorter sequence will have NA values to fill out the data.frame for the longer sequences. For example
seq A -> seq B -> seq C -> NA -> NA
seq A -> serb -> seq C -> seq D -> seq E.
When I try to plot the partition I get this error:
'Error in if (length(nms) != n || any(nms == "")) stop("'options' must be a fully named list, or have no names (NULL)") :
missing value where TRUE/FALSE needed'
Is there a way to by pass the NAs in my data.frame?
Hello,
First many thanks to the contributors to this already great package which can only improve.
In a Shiny application, I noticed that sometimes when zooming in a level, the tooltips disappear when hovering. When zooming out back, the tooltips don't appear again.
This bug also happens to the other D3partitionR objects displayed in the same Shiny application.
[EDIT]: This bug affects the 5 types of charts currently available. The tooltips might eventually reappear by zooming in and out on other D3paritionR objects in the same Shiny application. When eventually reappearing the location of the tooltips might also be erroneous.
Best regards,
Olivier
Tooltip not showing when there are multiple charts on the same page
I am attempting to set_continuous_color_scale
on a treemap with the code below and it produces the error visible should be a boolean
df = data.frame(Count = c(10,20,30,40),
L1 = c("A", "A", "B", "B"),
L2 = c("C1", "C2", "D1", "D2"),
stringsAsFactors = FALSE)
D3partitionR() %>%
add_data(df, count = "Count", steps = c("L1","L2"), color = "Count") %>%
set_chart_type('treemap') %>%
set_continuous_color_scale(c("#aabbcc", "#112233")) %>%
plot()
I have made various attempts to set visible with set_labels_parameters
, set_legend_parameters
, set_tooltip_parameters
and set_trail
that have failed to resolve the issue.
How do I use this function (or any other method) to modify the colors? Thanks
Add a parameter to set_legend_parameters to modify legend style. The other possibility is to add a new function (set_legend_style ??)
I would like to programatically click a node based upon an action such as a user clicking an action button. Is it possible to capture this click event via something like: $('#your_link_id').click().
Also, is it possible to embed HTML in the actual label of the node (i.e. to include a link to a website)?
Thank you!
Is there a way to limit the number of colors to only a specified subset of the steps/levels in the data? The lowest level in my dataset has many unique values, and assigning colors to them all makes the chart look very messy.
When I assign a categorical variable to the color parameter to add_data, everything turns into one color.
Add unit test to the R code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.