customizing sankey plot in r using rcharts -


i trying build sankey chart application similar 1 shown at

https://www.r-bloggers.com/generating-sankey-diagrams-from-rcharts/here sankey plot numbers 24407... , 8450... source , target , customer... sector

here sankey plot numbers 24407... , 8450... source , target , customer... sector

i build sankey chart sector in middle , source , target on either side of chart

here code followed group topics data frame has columns source, target, value, sector

grouptopics$source<-as.character(grouptopics$source) grouptopics$target<-as.character(grouptopics$target) grouptopicstemp<-aggregate(value~sector+source,grouptopics,sum) colnames(grouptopicstemp)<-c('source','target','value') gruptopicsa<-subset(grouptopics,select = c('source','target','value')) grouptopicsb<-rbind(grouptopicstemp,gruptopicsa)  sankeyplottopics <- rcharts$new() sankeyplottopics$setlib('http://timelyportfolio.github.io/rcharts_d3_sankey/libraries/widgets/d3_sankey')   sankeyplottopics$set(   data = grouptopicsb,   nodewidth = 15,   nodepadding = 10,   layout = 32,   width = 960,   height = 500 ) 


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -