So far, we have defined both the essential parts of a Shiny app – ui and server. Ggtitle("Revenue by Region") + labs(fill = "Region") Xlab("Account") + theme(legend.position="bottom" Ggtitle("Revenue by Product") + labs(fill = "Region")Īes(x=Account, y=Revenue, fill=factor(Region))) + ,plot.title = element_text(size=15, face="bold")) + Xlab("Product") + theme(legend.position="bottom" Geom_bar(position = "dodge", stat = "identity") + ylab("Revenue (in Euros)") + ,icon = icon("menu-hamburger",lib='glyphicon')Īes(x=Product, y=Revenue, fill=factor(Region))) + ,paste('Top Account:',sales.account$Account)įormatC(total.revenue, format="d", big.mark=',')įormatC(prof.prod$value, format="d", big.mark=',') Prof.prod % group_by(Product) %>% summarise(value = sum(Revenue)) %>% filter(value=max(value))įormatC(sales.account$value, format="d", big.mark=',') recommendation % group_by(Account) %>% summarise(value = sum(Revenue)) %>% filter(value=max(value)) # load the required packagesĬonsidering the fact that Dashboard needs an input data to visualise, we will use this sample recommendation.csv as input data to our dashboard but this can be modified to suit any organisational need like a Database connection or Data from remote location. Loading PackagesĪll the packages listed below can be directly installed from CRAN. In this post, We will see how to leverage Shiny to build a simple Sales Revenue Dashboard. Making Dashboard is an imminent wherever Data is available since Dashboards are good in helping Business make insights out of the existing data. Shiny is an R package that makes it easy to build interactive web apps straight from R. One of the beautiful gifts that R has got (that Python misses) is the package – Shiny.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |