Integration of d3.js bubble chart with shiny


#1

I built the d3.js bubble chart and need to integarte with the shiny. Not able to figure how to get the input file.

while doing in javascript, kept the input file and the script in the same folder. The file in csv format.

but when I have to integrate in shiny how can I form the input file? any help?

d3script.zip (953 Bytes)


#2

Have you heard of the htmlwidgets package? It basically allows you to integrate your custom Javascript widgets into Shiny (or simply call them from R as you would with a standard plot function) by letting you build an R binding function to the Javascript code.

Here’s a good tutorial to learn how to do this: http://shiny.rstudio.com/tutorial/js-lesson1/. It might look a bit daunting initially, specially if you are new to Shiny, but if you follow through the tutorial carefully it would only take you a day or two to build your first widget.

Keep in mind that you need to build a package (or packages) to host your widgets before you can deploy in Shiny, so make sure your apps have access to those in the R environment they will be running in or else they won’t render and your app might even crash at runtime.