##Set default repo to fix the issue when publishing html
local({r <- getOption("repos")
r["CRAN"] <- "http://cran.r-project.org"
options(repos=r)
})
install.packages("shiny") # Install the Shiny package
install.packages("shinydashboard") # Install the shinydashboard package
install.packages("flexdashboard") # Install the flexdashboard package
# Load the packages.
library("shiny")
library("shinydashboard")
library("flexdashboard")
Online Retail II Data Set (This Online Retail II data set contains all the transactions occurring for a UK-based and registered, non-store online retail between 01/12/2009 and 09/12/2011.The company mainly sells unique all-occasion gift-ware. Many customers of the company are wholesalers). Reference: https://archive.ics.uci.edu/ml/datasets/Online+Retail+II
California Housing Prices Data Set (The data pertains to the houses found in a given California district and some summary stats about them based on the 1990 census data). Reference: https://www.kaggle.com/camnugent/california-housing-prices
Import the datasets.
Shiny is an R package that makes it easy to build interactive web apps straight from R. You can host standalone apps on a webpage or embed them in R Markdown documents or build dashboards.
Figure: Shiny combines the computational power of R with the interactivity of the modern web
Shiny provides an elegant and powerful web framework for building web applications using R. Shiny helps you turn your analysis into interactive web applications without requiring HTML, CSS, or JavaScript knowledge.
Shiny’s user interface components can be easily customized or extended, and its server uses reactive programming to let you create any type of back-end logic you want. The back-end is the code that runs on the server, that receives requests from the clients, and contains the logic to send the appropriate data back to the client.