In the questions below, use R code to answer questions. For any non-coding questions, give your answer as a comment.
Run this code chunk first, to load the tidyverse, and make the weather station data available as the variable stationData:
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
stationData<-read_csv("station-data.csv")
Rows: 139160 Columns: 12
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): station_id
dbl (11): year, day, month, running_day, hour, temp, pressure, wind_speed, w...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
What is the difference between the data in the day and running_day columns? Illustrate the difference with a function we learned in class. If we’re grouping by month, which would be more useful?
How is the time of day represented in the data. At what times of the day are measurements taken? Show the code used to arrive at the answer.
Report the mean and standard deviation of the atmospheric pressure for every hour, of every day, of every month.
Report the mean and standard deviation of the temperature and wind speed at noon of every day of every month.
Find the coldest and warmest days of the year (in month, day format).
Add a column to the data frame that contains the temperature in Kelvins.