About the Course Project
This is a deliverable for the course Developing Data Products as part
of the Coursera Data Science Specialization.
Instructions:
- Write a shiny application with associated supporting documentation.
The documentation should be thought of as whatever a user will need to
get started using your application.
- Deploy the application on Rstudio’s shiny server
- Share the application link by pasting it into the provided text
box
- Share your server.R and ui.R code on github
Shiny App Explained
This document explains the Shiny app created with
server.R and ui.R files.
Server.R
The server.R file contains the server-side logic of the
Shiny app.
dataset is a reactive function that generates a random subset of the
mtcars dataset based on the user’s input for the number of observations
(“input$n”). The (“outputxyplot”) renders a scatter plot using
(“ggplot2”) based on user-selected variables ((“inputxvar”),
(“inputyvar”), (“inputcolorvar”) and an optional smoothing curve if the
checkbox is selected (“inputsmooth”).
UI.R
The ui.R file contains the user interface definition for
the Shiny app.
- Sets up the UI layout using shinyUI and fluidPage.
- Provides a title, description, and link to documentation.
- Defines a tabPanel for the Exploratory Analysis.
- The sidebarPanel includes input controls for the number of
observations, X and Y variables, color variable, and a checkbox for the
smoothing curve.
- The mainPanel displays the scatter plot generated by the server
function (output$xyplot).
Using the App
- Open the Shiny app in RStudio.
- Navigate to the “Exploratory Analysis” tab.
- Adjust the sliders and select input variables based on your
preferences.
- Observe the interactive scatter plot with the option to add a
smoothing curve.
- Explore the dataset interactively and customize visualizations.