data-raw/lego_population/lego_population-dataprep.R

library(readxl)
library(janitor)
library(dplyr)

# load data ---------------------------------------------------------------------
lego_population <- read_excel(here::here("data-raw/lego_population/lego_population.xlsx"))

# cleaning ----------------------------------------------------------------------

# cleaning: Making Variables Snake Case

lego_population <- lego_population %>% 
  clean_names() %>% 
  select(-availability)

# save --------------------------------------------------------------------------

usethis::use_data(lego_population, overwrite = TRUE)
npaterno/data_hunter documentation built on July 22, 2022, 10:20 a.m.