Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use R studio datahub suppressMessages(suppressWarnings(suppressPackageStartupMessages({ require(tidyverse) require(mosaic) require(supernova) require(ggformula) }))) Part 2: Visualizing data In this part we will be making a few plots

Please use R studio datahub

suppressMessages(suppressWarnings(suppressPackageStartupMessages({ require(tidyverse) require(mosaic) require(supernova) require(ggformula) })))

Part 2: Visualizing data In this part we will be making a few plots that help us visualize the data. We ask that you try your best to make these plots aesthetically pleasing by using themes, titles, axis labels and color.

2.1 Using the top 5 states have the highest number of cases on Monday "2021-04-11", make a box plot with state on the x-axis and cases on the y-axis. (Hint: gf_boxplot() to plot two variables. Remember to use the filter() function to extract only the rows corresponding to data from the top 5 states. It may also be useful to look into how the %in% operator works in R.)

2.2 Plot the number of cases over time in the top 5 states from 2.1 (Hint: use gf_point() with date as the x-axis. Use col = ~state to color code the plot by state.)

2.3 Now create a histogram visualizing the distribution of cases in the top 5 states. Then in the code cell below it, create a histogram visualizing the distribution of cases in all 50 states. Write a few sentences comparing and contrasting these two histograms, being sure to at least make note of the following characteristics: (1) the smallest and largest values appearing on the x-axis; (2) the smallest and largest values appearing on the y-axis; (3) the "shapes" of the two distributions (i.e., for which x-values are the bars highest and lowest? how "smoothly" do values on the y-axis vary as you move along the x-axis?)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

Students also viewed these Databases questions

Question

Advance warning and an explanation for the layoff.

Answered: 1 week ago

Question

Assessment of skills and interests.

Answered: 1 week ago