The Data
For this assignment, you’ll be using the midwest dataset, which is built into the ggplot2 package. Each row contains demographic information about a county in each state:
midwest dataset
Remember, you may want to use dplyr to compute (and then later visualize) summary information!
Assignment Structure
For this assignment, you build your own shiny application. The application should provide users with the ability to interact with a visual representation of the midwest dataset. What the application looks like is up to you, as long as it meets the following requirements:
You create a multi-page (tab) application with at least two pages
On each page, you should use the appropriate layout, such as a sidebarLayout, to create a section for control widgets, and another section for a visualization.
You must create at least two widgets on each page that change the visual output in your application, such as data displayed on the x or y axis of a scatterplot.
One of your widgets on each page must change the data that is being displayed. For example, the attribute being shown on the x or y axis. While changing the color of all markers (from, say, red to blue) would not mheet this requirement, changing the data driving the color of each point would (i.e., color by percent poverty or population density)
You must create a visual representation of a dataset that reacts to the widgets on each page
You must host your application up to the shinyapps.io server, making it publicly usable
The layout is well structured (clear headers, panels, etc.)
As you know, in order to run a shiny application, you must create multiple files:
An app.R file, that drives your application
An app_ui.R file that defines your UI element (to be loaded into the app.R file)
An app_server.R file that defines your server element (to be loaded into the app.R file)
A README.md file, because it’s important to document your code. This file should contain a link to your project.
The purpose of this project really is just to make sure you’re comfortable with the structure of a web application. Feel free to be creative in your assignment, though a scatter-plot with 2 widgets controlling the x variable and y variable would be sufficient.
Widgets
You should create at least two widgets of your choice for each visualization. As stated above in the requirements, at least one of these widgets should change the data being displayed.
Visual representation
On each page (tab) of your application, you must have a visualization of the midwest dataset. The visualization can be made with base ggplot2, plotly, or something less supported but more interesting. While we don’t expect you to create anything ground-breaking, we do expect you to create a clear visualization with proper labels, titles, and interactions (if using and interactive library). And of course, the graphic needs to react to changing values in the widgets.