googlevis

How to change node and link colors in R googleVis sankey chart

半世苍凉 提交于 2019-11-28 09:26:28
How can node and link colors be changed in R googleVis sankey chart? And link having the same color as its originating node? library(googleVis) datSK <- data.frame(From=c(rep("A",3), rep("B", 3)), To=c(rep(c("X", "Y", "Z"),2)), Weight=c(5,7,6,2,9,4)) Sankey <- gvisSankey(datSK, from="From", to="To", weight="Weight", options=list( sankey="{link: {color: { fill: '#d799ae' } }, node: { color: { fill: '#a61d4c' }, label: { color: '#871b47' } }}")) plot(Sankey) As soon as you have to color links from 2 originated nodes you'll need 2 colors for links. Also you have 5 nodes in total, so you'll need 5

Knitr does not render googleVis

断了今生、忘了曾经 提交于 2019-11-28 07:28:52
问题 I have a trouble with Rsutdio and knitr in Windows 7 for rendering a simple gvisTable. Here is my code ```{r results='asis'} require(googleVis) op <- options(gvis.plot.tag="chart") data(iris) t = gvisTable(data = iris) print(t) ``` and here is my error : pandoc.exe: Failed to retrieve https://www.google.com/jsapi?callback=displayChartTableID14c4345d7f3 FailedConnectionException2 "www.google.com" 443 True connect: failed (Connection timed out (WSAETIMEDOUT)) Erreur : pandoc document conversion

ggplot2 equivalent of 'factorization or categorization' in googleVis in R

馋奶兔 提交于 2019-11-28 01:26:24
问题 Due to static graph prepared by ggplot, we are shifting our graphs to googleVis with interactive charts. But when it comes to categorization we are facing many problems. Let me give example which will help you understand: #dataframe df = data.frame( x = sample(1:100), y = sample(1:100), cat = sample(c('a','b','c'), 100, replace=TRUE) ) ggplot2 provides parameter like alpha, colour, linetype, size which we can use with categories like shown below: ggplot(df) + geom_line(aes(x = x, y = y,

Shiny: Dynamic Number of Output Elements/Plots

萝らか妹 提交于 2019-11-27 22:55:02
I want to make a reactive display, that displays a different number of plots depending on which value of the input selector is chosen . In the case of the mtcars dataset, let's say I want to let the user choose beetween cutting by Nr. of Gears or Nr. of Carburatos for the plots to be produced. Looking at unique(mtcars$gear) we see it has 4 3 5 so 3 possible values, while unique(mtcars$carb) has 4 1 2 3 6 8 so 6 possible values. I therefore want to produce 6 separate plots when Nr. of Carburators is selected and only 3 plots when Nr. of Gears is selected. I've played with conditionalPanel but

How to change node and link colors in R googleVis sankey chart

[亡魂溺海] 提交于 2019-11-27 02:54:45
问题 How can node and link colors be changed in R googleVis sankey chart? And link having the same color as its originating node? library(googleVis) datSK <- data.frame(From=c(rep("A",3), rep("B", 3)), To=c(rep(c("X", "Y", "Z"),2)), Weight=c(5,7,6,2,9,4)) Sankey <- gvisSankey(datSK, from="From", to="To", weight="Weight", options=list( sankey="{link: {color: { fill: '#d799ae' } }, node: { color: { fill: '#a61d4c' }, label: { color: '#871b47' } }}")) plot(Sankey) 回答1: As soon as you have to color

Update graph/plot with fixed interval of time

半世苍凉 提交于 2019-11-27 01:08:11
问题 I have a plot in Shiny UI. If I change any input parameter and through reactivity plot will change. But let's consider following situation:- The plot in Shiny UI plotting let say intra-day price move of a stock. And for that you query some live data source. Now If I create a refresh button and then if time passes by I keep on clicking on refresh button. The plot will be updated as new data arrives as time goes into that live data source. Now my question is I don't want to keep clicking on

Shiny: Dynamic Number of Output Elements/Plots

拈花ヽ惹草 提交于 2019-11-26 23:15:27
问题 I want to make a reactive display, that displays a different number of plots depending on which value of the input selector is chosen . In the case of the mtcars dataset, let's say I want to let the user choose beetween cutting by Nr. of Gears or Nr. of Carburatos for the plots to be produced. Looking at unique(mtcars$gear) we see it has 4 3 5 so 3 possible values, while unique(mtcars$carb) has 4 1 2 3 6 8 so 6 possible values. I therefore want to produce 6 separate plots when Nr. of