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.
This is a screenshot of the applicatio running on the server.
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")
N=20
g=read.csv("GNP.csv",header=FALSE,skip=5,dec=".",stringsAsFactors=F)
g=g[1:N,c(1,5,6)]
names(g)=c("ccode","gnp","continent")
g$gnp=from_currency(g$gnp)
ggplot(g,aes(x=continent,y=gnp,fill=continent))+
geom_boxplot(alpha=0.3)
The source code can be found here:
URL of the application