π Full Name: (Type your name here)
π Student ID: (Type your ID here)
early_january_weather
DatasetInstructions:
- Load the necessary packages: ggplot2,
dplyr, and moderndive.
- Load the early_january_weather dataset.
- Use glimpse() to examine the structure of the
dataset.
- Access the datasetβs documentation.
π Need help? Refer to Slides 5-6 of Lecture 11 for guidance.
library(ggplot2)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(moderndive)
time_hour and the
y-axis to temp."darkorange"."twodash".1.2."Time (hourly)"."Temperature (Β°F)"."Hourly Temperature"."EWR 2013".π Need help? Refer to Slides 15-16 of Lecture 11 for guidance.
ggplot(data = early_january_weather, aes(x = time_hour, y = temp)) +
geom_line(color = "darkorange", linetype = "twodash", linewidth = 1.2) +
labs(x = "Time (hourly)", y = "Temperature (F)",
title = "Hourly Temperature",
subtitle = "EWR 2013") +
theme_bw() +
theme(plot.title = element_text(hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5))
Instructions:
- Save the last plot you created as a PNG
file.
- Name the file "Final_Line_Graph.png".
π Need help? Refer to Slide 19 of Lecture 11 for guidance.
# Save the line graph as an image file
ggsave("Final_Line_Graph.png")
## Saving 7 x 5 in image
β
Save your work.
β
Knit your R Notebook as an HTML
file.
β Do NOT submit the .Rmd file.
Upload the following two files:
1οΈβ£ YourFirstName_YourLastName - In-Class Assignment
07.html
2οΈβ£ Final_Line_Graph.png
π Double-check your files before submitting!