Ethan Campbell HW3

Fort Worth Climate data.

Ethan Campbell
2022-02-23

Importing data

Importing and viewing the data to determine major cleaning changes that need to be made.

Fort_Worth <- read.csv("Fort_Worth_climate.csv", skip = 18)

#head(Fort_Worth)

#view(Fort_Worth)
#str(Fort_Worth)

Month_combined <- Fort_Worth %>%
pivot_longer(
  cols = c(NOV, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, DEC),
  names_to = "MONTH",
  values_to = "Month_AVG",
)

Month_combined
# A tibble: 4,800 x 5
   PARAMETER  YEAR   ANN MONTH Month_AVG
   <chr>     <int> <dbl> <chr>     <dbl>
 1 PS         1981  98.6 NOV        98.8
 2 PS         1981  98.6 JAN        99.2
 3 PS         1981  98.6 FEB        99  
 4 PS         1981  98.6 MAR        98.5
 5 PS         1981  98.6 APR        98.6
 6 PS         1981  98.6 MAY        98.2
 7 PS         1981  98.6 JUN        98.3
 8 PS         1981  98.6 JUL        98.5
 9 PS         1981  98.6 AUG        98.4
10 PS         1981  98.6 SEP        98.6
# ... with 4,790 more rows
Month_combined %>%
select("PARAMETER", "YEAR", "MONTH", "Month_AVG", "ANN")
# A tibble: 4,800 x 5
   PARAMETER  YEAR MONTH Month_AVG   ANN
   <chr>     <int> <chr>     <dbl> <dbl>
 1 PS         1981 NOV        98.8  98.6
 2 PS         1981 JAN        99.2  98.6
 3 PS         1981 FEB        99    98.6
 4 PS         1981 MAR        98.5  98.6
 5 PS         1981 APR        98.6  98.6
 6 PS         1981 MAY        98.2  98.6
 7 PS         1981 JUN        98.3  98.6
 8 PS         1981 JUL        98.5  98.6
 9 PS         1981 AUG        98.4  98.6
10 PS         1981 SEP        98.6  98.6
# ... with 4,790 more rows
str(Month_combined)
tibble [4,800 x 5] (S3: tbl_df/tbl/data.frame)
 $ PARAMETER: chr [1:4800] "PS" "PS" "PS" "PS" ...
 $ YEAR     : int [1:4800] 1981 1981 1981 1981 1981 1981 1981 1981 1981 1981 ...
 $ ANN      : num [1:4800] 98.6 98.6 98.6 98.6 98.6 ...
 $ MONTH    : chr [1:4800] "NOV" "JAN" "FEB" "MAR" ...
 $ Month_AVG: num [1:4800] 98.8 99.2 99 98.5 98.6 ...

Types of data

The questions I want to answer with this data is

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Campbell (2022, Feb. 23). Data Analytics and Computational Social Science: Ethan Campbell HW3. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomethancampbell870024/

BibTeX citation

@misc{campbell2022ethan,
  author = {Campbell, Ethan},
  title = {Data Analytics and Computational Social Science: Ethan Campbell HW3},
  url = {https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomethancampbell870024/},
  year = {2022}
}