Centralize library loading in 00_paths.R to suppress dplyr startup messages
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
.Rproj.user
|
||||
.Rhistory
|
||||
.RData
|
||||
.Ruserdata
|
||||
7
data/formatted/df_formatted.csv
Normal file
7
data/formatted/df_formatted.csv
Normal file
@@ -0,0 +1,7 @@
|
||||
month,value_usd,population,income_per_person
|
||||
jan,45360000,22600000,2.01
|
||||
feb,42660000,22600000,1.89
|
||||
mar,47736000,22650000,2.11
|
||||
apr,45144000,22650000,1.99
|
||||
may,46548000,22700000,2.05
|
||||
jun,43848000,22700000,1.93
|
||||
|
7
data/interim/df_income_usd.csv
Normal file
7
data/interim/df_income_usd.csv
Normal file
@@ -0,0 +1,7 @@
|
||||
id,category,denomination,month,value_usd
|
||||
1,income,usd,jan,45360000
|
||||
1,income,usd,feb,42660000
|
||||
1,income,usd,mar,47736000
|
||||
1,income,usd,apr,45144000
|
||||
1,income,usd,may,46548000
|
||||
1,income,usd,jun,43848000
|
||||
|
2
data/interim/df_income_usd_wide.csv
Normal file
2
data/interim/df_income_usd_wide.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
id,category,denomination,jan,feb,mar,apr,may,jun
|
||||
1,income,usd,45360000,42660000,47736000,45144000,46548000,43848000
|
||||
|
7
data/interim/df_merged.csv
Normal file
7
data/interim/df_merged.csv
Normal file
@@ -0,0 +1,7 @@
|
||||
id,category,denomination,month,value_usd,population
|
||||
1,income,usd,jan,45360000,22600000
|
||||
1,income,usd,feb,42660000,22600000
|
||||
1,income,usd,mar,47736000,22650000
|
||||
1,income,usd,apr,45144000,22650000
|
||||
1,income,usd,may,46548000,22700000
|
||||
1,income,usd,jun,43848000,22700000
|
||||
|
7
data/interim/df_population_full.csv
Normal file
7
data/interim/df_population_full.csv
Normal file
@@ -0,0 +1,7 @@
|
||||
state,category,unit,month,value
|
||||
FL,population,persons,jan,22600000
|
||||
FL,population,persons,feb,22600000
|
||||
FL,population,persons,mar,22650000
|
||||
FL,population,persons,apr,22650000
|
||||
FL,population,persons,may,22700000
|
||||
FL,population,persons,jun,22700000
|
||||
|
7
data/processed/df_result.csv
Normal file
7
data/processed/df_result.csv
Normal file
@@ -0,0 +1,7 @@
|
||||
month,value_usd,population,income_per_person
|
||||
jan,45360000,22600000,2.0071
|
||||
feb,42660000,22600000,1.8876
|
||||
mar,47736000,22650000,2.1075
|
||||
apr,45144000,22650000,1.9931
|
||||
may,46548000,22700000,2.0506
|
||||
jun,43848000,22700000,1.9316
|
||||
|
2
data/raw/df_income.csv
Normal file
2
data/raw/df_income.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
id,category,denomination,jan,feb,mar,apr,may,jun
|
||||
1,income,euro,42000000,39500000,44200000,41800000,43100000,40600000
|
||||
|
2
data/raw/df_population.csv
Normal file
2
data/raw/df_population.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
state,category,unit,jan,feb,mar,apr,may,jun
|
||||
FL,population,thousands,22600,22600,22650,22650,22700,22700
|
||||
|
14
powershell_example.Rproj
Normal file
14
powershell_example.Rproj
Normal file
@@ -0,0 +1,14 @@
|
||||
Version: 1.0
|
||||
ProjectId: eefd8667-a6d0-4498-9b76-03f1e7bd10c9
|
||||
|
||||
RestoreWorkspace: Default
|
||||
SaveWorkspace: Default
|
||||
AlwaysSaveHistory: Default
|
||||
|
||||
EnableCodeIndexing: Yes
|
||||
UseSpacesForTab: Yes
|
||||
NumSpacesForTab: 2
|
||||
Encoding: UTF-8
|
||||
|
||||
RnwWeave: Sweave
|
||||
LaTeX: pdfLaTeX
|
||||
@@ -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"))
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
source("scripts/00_paths.R")
|
||||
|
||||
library(readr)
|
||||
library(dplyr)
|
||||
|
||||
df <- read_csv(income_raw, show_col_types = FALSE)
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
source("scripts/00_paths.R")
|
||||
|
||||
library(readr)
|
||||
library(tidyr)
|
||||
|
||||
df <- read_csv(income_usd_wide, show_col_types = FALSE)
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
|
||||
source("scripts/00_paths.R")
|
||||
|
||||
library(readr)
|
||||
library(tidyr)
|
||||
library(dplyr)
|
||||
|
||||
df <- read_csv(population_raw, show_col_types = FALSE)
|
||||
|
||||
|
||||
@@ -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) |>
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
source("scripts/00_paths.R")
|
||||
|
||||
library(readr)
|
||||
library(dplyr)
|
||||
|
||||
df_merged <- read_csv(merged, show_col_types = FALSE)
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
source("scripts/00_paths.R")
|
||||
|
||||
library(readr)
|
||||
library(dplyr)
|
||||
|
||||
df <- read_csv(result, show_col_types = FALSE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user