School’s out: Building Interactive R Apps with shiny, googleVis in our R Academy

[This article was first published on eoda, R und Datenanalyse » eoda english R news, 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.

In our R Academy course “Interactive Datavisualization with R” participants learned today how to build interactive graphics in R using the shiny and the googleVis package.

Interactive Web Application with R

Interactive Web Application with R

Rstudios shiny package is a great way to build an Application for interactive visualizations out of R.
For our example App we recreated Hans Rosslings (Gapminder) Visualization which puts a countries Life-Expectancy in relation with its Gross-Domestic-Product.

We used the data from datamarket.com via the rdatamarket Package. We combined data from Gapminder(Population), the World Bank (GDP) and from the United Nations (Life-Expectancy) with each other. Datamarket.com even offers an R-console snippet for importing the data directly into R (Under Export).

The following lines of code shows what you need to do. Have fun with  R in the web.

# TODO: Add comment
# 
# Author: msc
###############################################################################

library("rdatamarket")
library("shiny")


#getting Data from datamarket.com
#life_expectancy and gdp
dminit("ba22bf5bdf044aaf980cdbde3504248c")
life_expectancy 

# TODO: Add comment
# 
# Author: msc
###############################################################################


if(!"googleVis"%in%installed.packages())install.packages("googleVis", repos = "http://ftp5.gwdg.de/pub/misc/cran/")
library("googleVis")

shinyServer(function(input, output) {
			
			load("data.RData")
			
			data$Population 

In our R Academy we help you to become an expert in R – check it out!

To leave a comment for the author, please follow the link and comment on their blog: eoda, R und Datenanalyse » eoda english R news.

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)