Northeastern University Data Visualization with ggplot2 Problems

Qnzna12

Programming

Northeastern University

Question Description

  • Week Twelve Discussion

    Issues with multiple tables in a database.Write about various techniques you learnt in this chapter

  • Week 12 Assignment

    There are two steps to the assignments this week:Step1: Write a program using R-Markdown answering questions listed below under Exercises immediately after each section. For clarity, make sure to give an appropriate title to each section.
    • Sections: Introduction, Prerequisites Exercises: None
    • Sections: Keys; Exercises: None
    • Sections: Mutating Joins, Understanding Joins, Inner join, Outer join, Duplicate keys, Defining the key columns; Exercises 1, 2, 5
    • Sections: Other implementations, Filtering joins: Exercises:2, 3, 4
    • Sections: Join Problems, Set Operations,

    Step 2: Join the files for the final case analysis and submit the final combined file in the csv format

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

Hello Daman, Please find attached the discussion and the answers to the assignment.Please let me know if there is any clarification needed

Chapter 10
Installing packages:
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.
3.0 -##
##
##
##

v
v
v
v

ggplot2
tibble
tidyr
readr

3.3.2
3.0.4
1.1.2
1.4.0

v
v
v
v

purrr
dplyr
stringr
forcats

0.3.4
1.0.2
1.4.0
0.5.0

## -- Conflicts ------------------------------------------ tidyverse_conflict
s() -## x dplyr::filter() masks stats::filter()
## x dplyr::lag()
masks stats::lag()
library(nycflights13)
#install.packages('fueleconomy')
library(fueleconomy)

Mutating Joins, Understanding Joins, Inner join, Outer join, Duplicate
keys, Defining the key columns
1.

Compute the average delay by destination, then join on the air ports data frame so you
can show the spatial distribution of delays. Here’s an easy way to draw a map of the
United States:

airports %>%
semi_join(flights, c("faa" = "dest")) %>%
ggplot(aes(lon, lat)) +
borders("state") +
geom_point() +
coord_quickmap()

flights %>%
mutate(total_delay = arr_delay + dep_delay)%>%
group_by(dest) %>%
summarise(average_delay = mean(total_delay, na.rm = TRUE))%>%
left_join(select(airports, faa, lon, lat), c("dest"="faa"))%>%
ggplot(mapping = aes(lon, lat, colour = average_delay))+
borders("state") +
geom_point()
## `summarise()` ungrouping output (override with `.groups` argument)
## Warning: Removed 4 rows containing missing values (geom_point).

2.

Add the lo...

zvffpuneybggr (498)
UCLA

Anonymous
Awesome! Perfect study aid.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
Similar Questions
Related Tags