First steps of using googleVis on shiny

[This article was first published on mages' blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The guys at RStudio have done a fantastic job with shiny. It is really easy to build web apps with R using shiny. With the help of Joe Cheng from RStudio we figured out a way to make googleVis work on shiny as well. This allows you to make use of the Google Charts Tools in your shiny app directly from R. What I present here are three initial examples which seem to work in most browsers. The third example even uses a neat trick to create an animated geo chart.



However, before we upload the next version of googleVis to CRAN we decided to present a preview of version 0.4.0 here, asking for feedback. It would not be fair on the guys behind CRAN to release something into the wild, only to be told by users within a few days that we missed something. Hence, you can get the new version of googleVis only from the download page of our project site for the time being.

You may have read the post on RStudio's blog that the shiny API changed slightly: the reactivePlot and reactiveText functions have been renamed to renderPlot and renderText with simplified input parameters. Thanks to Joe, there is now also a renderGvis function as part of the googleVis package, which works in very much the same way as the other two.

To run the following examples you need shiny version 0.4.0 and googleVis version 0.4.0 or higher. Note that the charts below are not screen shots, but real apps hosted on RStudio's infrastructure.
Read more »

To leave a comment for the author, please follow the link and comment on their blog: mages' blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)