Jose Rios
May 31, 2018
This presentation is part of the Peer-graded Assignment of Coursera's Developing Data Products course (https://www.coursera.org/learn/data-products/p). The students are asked to document an application written in R's Shiny package.
The user is required to provide the number of countries (n) and the application will generate a boxplot with the n countries with the highest GNP as of 2012. The plot is grouped by continent as shown in the screenshot below.
To use the application, it suffices to visit this website, https://riverlebon.shinyapps.io/project-shiny/, and provide the number of countries.
The following code is used for each continent:
library("ggplot2") ; library("lucr")
g=read.csv("GNP.csv",header=FALSE,skip=5,
stringsAsFactors=F)
g=g[1:20,c(5,6)]
names(g)=c("gnp","cont")
g$gnp=from_currency(g$gnp)
ggplot(g,aes(x=cont,y=gnp,fill=cont))+
geom_boxplot(alpha=0.3)
The source code can be found here:
URL of the application