# 02_validate.R # Validates raw input files. Stops the pipeline if data doesn't look right. source("scripts/00_paths.R") library(readr) df_income <- read_csv(income_raw, show_col_types = FALSE) df_population <- read_csv(population_raw, show_col_types = FALSE) stopifnot("df_income has wrong number of columns" = ncol(df_income) == input_cols) stopifnot("df_population has wrong number of columns" = ncol(df_population) == input_cols) cat("02_validate.R: input data looks good\n")