logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

In this exercise, we are going to vizualize the changes in US births between 1978 and 2015.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

In this exercise, we are going to vizualize the changes in US births between 1978 and 2015. The data are availables in the package mozaic.

1. Install the package mosaic and load it into your R script

2. Check for each data frame Births78 and Births2015 what are the numbers of observations and variables composing it, and also the format of each variables.

3. Combine the data frames Births78 and Births2015 in such a way that the number of columns in the combined data frames is the same than in the individual data frame. Assign the combined data frame to a variable named USBirths78vs2015.

4. What are the name of the variables in the USBirths78vs2015?

5. How many rows and columns does have USBirths78vs2015?

6. Plot a scatterplot of number of births per year day split by year (see the graph Figure 2). textitTip1: transform the variable year into a factor before performing the plot. Tip2: to choose your own colors, look at how to use scale_color_manual()

7. Create a new variable positionInWeek in the data frame USBirths78vs2015, that takes the value Weekend if the birth has occurred on a Sunday or a Saturday, and the value Working day otherwise. Tips: you can use a ifelse in your recode the factor

8. Plot a bar chart that shows for each year the number of births, split by positionInWeek. See the graph Figure 3 for the expected output.

9. Plot a jitter-plot plotting for each month the numbers of births, split by position in the week, and divided by year. See the graph Figure 4 for the expected output. Tip: use the function facet_grid(), and the function theme() to change the direction of the labels on the x-axe

 

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

689 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

513 Answers

Hire Me
expert
Husnain SaeedComputer science

918 Answers

Hire Me
expert
Atharva PatilComputer science

763 Answers

Hire Me

Get Free Quote!

300 Experts Online