Question: Overview RStudio's shiny framework provides a straightforward structure for creating not just websites , but web applications . By providing R users with the ability

Overview

RStudio's shiny framework provides a straightforward structure for creating not just websites, but web applications. By providing R users with the ability to generate web-based interfaces that communicate with R servers, shiny enables developers to create dynamic platforms for data exploration.

The purpose of this assignment is to provide you with the opportunity to practice building a shiny application. Once you are comfortable with the general skeleton of these applications, transforming your analyses into interactive experiences will be nearly painless.

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:

Remember, you may want to use dplyr to compute (and then later visualize) summary information!

Assignment Structure

As with previous assignments, follow this link (Links to an external site.)Links to an external site. to create your own private repository for this assignment. This should automatically create a private repository which you will submit to Canvas as your assignment. Complete the following steps:

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 meet 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.), and includes at least 3 custom CSS styles.

As you know, in order to run a shiny application, you must create multiple files:

  • A ui.R file, that drives the structure of the user interface
  • A server.R file, that provides instructions to the R server
  • 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 (Links to an external site.)Links to an external site., or something less supported but more interesting (Links to an external site.)Links to an external site.. 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.

Expectations

At this point in the quarter, we expect you to be following the best practices we've incorporated into the class. This means:

  • Proper use of libraries such as dplyr for data wrangling
  • Structuring your code so that if the data changes, you can easily update your entireapplication
  • Clearly commenting and properly organizing your code
  • Linting your code for any errors
  • Writing functions to encapsulate chunks of code that you use more than once
  • Avoiding the creation of variables that are unnecessary for your analysis/report
  • Creating appropriate labels for your visualizations
PID county state poptotal popdensity popwhite popblack area 561 ADAMS 562 ALEXANDER 563 BOND 564 BOONE 565 BROWN 566 BUREAU 567 CALHOUN 568 CARROLL 569 CASS 570 CHAMPAIGN 571 CHRISTIAN 0.052 0.014 0.022 0.017 0.018 0.050 0.017 0.027 0.024 0.058 0.042 66090 10626 14991 30806 5836 35688 5322 16805 13437 173025 34418 1270.9615 759.0000 681.4091 1812.1176 324.2222 713.7600 313.0588 622.4074 559.8750 2983.1897 819.47612 63917 7054 14477 29344 5264 35157 5298 16519 13384 146506 34176 1702 3496 429 127 547 50 2 IL 4 6 8 9 10 16 16559 82

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!