23-shiny
Editing a shiny app: Part 1
app-w26.R contains a starter shiny app. Your tasks for today are:
Run the app! What does it show us?
Read the code: find the inputs and the outputs
Adapt the app to allow the user to specify what variable maps to the point color in the scatterplot
Adapt the app to allow the user to filter the data by
annual_salary. Allow values between the minimum and maximumannual_salaryselected.
TipHint
use sliderInput and specify a vector of lenth 2 for value
- Adapt the app to allow the user to select whether the plot should have a white background
TipHint
use checkBoxInput for the user input and theme_minimal() with an if statement to control the theme of the plot
- Create an interactive histogram that allows the user to select what quantitative variable should be displayed and what categorical variable should be used to fill the bars. Add any other interactive elements (e.g., binwidth adjustments) that you want to.
Credit: Mine Çetinkaya-Rundel’s Ask a Manager application exercise