#Overview
The article I choose is about the temperature across the United States in a 12-months period from July 2014 through June 2015. It provided graphics about the range of temperature of different U.S. cities, including Los Angeles, Chicago, New York, Houston, etc. I select the dataset about NYC.
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.2 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── 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
url <- "https://raw.githubusercontent.com/fivethirtyeight/data/master/us-weather-history/KNYC.csv"
df <- read.csv(url)
df_new <- df %>%
select(date,
mean_temp = actual_mean_temp,
min_temp = actual_min_temp,
max_temp = actual_max_temp,
record_precipitation)
head(df_new)
## date mean_temp min_temp max_temp record_precipitation
## 1 2014-7-1 81 72 89 2.17
## 2 2014-7-2 82 72 91 1.79
## 3 2014-7-3 78 69 87 2.80
## 4 2014-7-4 70 65 74 1.76
## 5 2014-7-5 72 63 81 3.07
## 6 2014-7-6 75 66 84 1.97
#Conclusion
The article stated that climate change affected cities in United States differently. In the future assignment I may also include more datasets about the other cities. I modified some column names and removed some columns because they are too long or redundant.