Centralize library loading in 00_paths.R to suppress dplyr startup messages

This commit is contained in:
2026-03-09 14:34:43 -04:00
parent d0a49ba45b
commit 8a30fe338e
19 changed files with 68 additions and 17 deletions

View File

@@ -2,7 +2,15 @@
# Central path constants and config. Source this at the top of every script.
# All paths are relative to the project root.
dotenv::load_dot_env(".env")
suppressPackageStartupMessages({
library(dotenv)
library(tibble)
library(readr)
library(tidyr)
library(dplyr)
})
load_dot_env(".env")
euro_to_dollar_conversion_ratio <- as.numeric(Sys.getenv("euro_to_dollar_conversion_ratio"))
input_cols <- as.integer(Sys.getenv("input_cols"))

View File

@@ -5,8 +5,6 @@
source("scripts/00_paths.R")
library(tibble)
library(readr)
df_income <- tribble(
~id, ~category, ~denomination, ~jan, ~feb, ~mar, ~apr, ~may, ~jun,

View File

@@ -3,7 +3,6 @@
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)

View File

@@ -4,8 +4,6 @@
source("scripts/00_paths.R")
library(readr)
library(dplyr)
df <- read_csv(income_raw, show_col_types = FALSE)

View File

@@ -3,8 +3,6 @@
source("scripts/00_paths.R")
library(readr)
library(tidyr)
df <- read_csv(income_usd_wide, show_col_types = FALSE)

View File

@@ -4,9 +4,6 @@
source("scripts/00_paths.R")
library(readr)
library(tidyr)
library(dplyr)
df <- read_csv(population_raw, show_col_types = FALSE)

View File

@@ -3,8 +3,6 @@
source("scripts/00_paths.R")
library(readr)
library(dplyr)
df_income <- read_csv(income_usd, show_col_types = FALSE)
df_pop <- read_csv(population_full, show_col_types = FALSE) |>

View File

@@ -3,8 +3,6 @@
source("scripts/00_paths.R")
library(readr)
library(dplyr)
df_merged <- read_csv(merged, show_col_types = FALSE)

View File

@@ -3,8 +3,6 @@
source("scripts/00_paths.R")
library(readr)
library(dplyr)
df <- read_csv(result, show_col_types = FALSE)