year_week_no: Data name"

TidyTuesday

knitr::opts_chunk$set(echo = TRUE)

library(tidyverse)
library(here)

Load the weekly Data

Load the weekly data into the tt object.

year <- YY
week <- WW
dir_name <- paste0(year, "/", year, "_week_", week, "/")
file_name <- "str"

tt <- read_csv(here(paste0(dir_name, "data/", file_name, ".csv")))

Glimpse Data

Take an initial look at the format of the data available.

# Look at Data (top + bottom)
head(tt)
tail(tt)
tibble::glimpse(tt)

Check column data type (e.g. numeric, character,...). Are data and column classes correctly specified?
If not, convert column class into the correct one.

summary(tt)

If column class is character, check:

tt %>% count(col_name)

Validating data with external information --> Check "weird stuff"

Wrangle


Questions

My questions are ... - q1 - q2

Visualize


Save Image

Save image (.png), then share on twitter (maybe) using hashtag #TidyTuesday.

ggsave("fig_name.png",
       fig_name)


Try the lehuynh package in your browser

Any scripts or data that you put into this service are public.

lehuynh documentation built on June 22, 2024, 9:35 a.m.