Skip to content

Commit

Permalink
Rename folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Klimowicz committed Dec 9, 2023
1 parent fc5a25c commit cc3a438
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ docs
inst/doc
/doc/
/Meta/
/lfs_documentation/
6 changes: 3 additions & 3 deletions inst/coding_frames/generate_degree_subject_coding.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ z <- data.frame(DEGREE = x2, DEGREE_DESCRIPTION = nx$names)
return(z)
}

s <- haven::read_sav("../lfs_raw_data/1993 Q2.sav")
s <- haven::read_sav("../data_lfs_raw/1993 Q2.sav")
z <- labels_to_data_frame(s$subjct1)

z %>%
readr::write_csv("inst/coding_frames/sngdeg_1992_2_digit.csv")

s <- haven::read_sav("../lfs_raw_data/1998 Q4.sav")
s <- haven::read_sav("../data_lfs_raw/1998 Q4.sav")
z <- labels_to_data_frame(s$sngdeg)

z %>%
readr::write_csv("inst/coding_frames/sngdeg_1997.csv")

s <- haven::read_sav("../lfs_raw_data/2005 Q1.sav")
s <- haven::read_sav("../data_lfs_raw/2005 Q1.sav")
z <- labels_to_data_frame(s$SNGDEG)

z %>%
Expand Down
10 changes: 5 additions & 5 deletions inst/development/test-everything.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ library(tidyverse)
library(data.table)
library(tictoc)

lfs_convert("../lfs_raw_data/", "../lfs_rds_data/", incremental = TRUE)
lfs_convert("../data_lfs_raw/", "../data_lfs_rds/", incremental = TRUE)

# APS
lfs_convert("../aps_raw_data/", "../aps_rds_data/", incremental = TRUE)
lfs_convert("../data_aps_raw/", "../data_aps_rds/", incremental = TRUE)

user_extra_mappings <- function(lfs_file_column_names) {

Expand All @@ -27,7 +27,7 @@ lfs_file_column_names
}

tic()
lfs <- lfs_compile("../lfs_rds_data/",
lfs <- lfs_compile("../data_lfs_rds/",
filter_years = 1980:2030,
save_to_folder = TRUE,
extra_mappings = user_extra_mappings)
Expand All @@ -36,7 +36,7 @@ toc()

# Short version
# tic()
# lfs <- lfs_compile("../lfs_rds_data_test/", save_to_folder = TRUE)
# lfs <- lfs_compile("../data_lfs_rds_test/", save_to_folder = TRUE)
# toc()

source("data-raw/create_test_data.R")
Expand Down Expand Up @@ -66,7 +66,7 @@ lfs[is.na(SUBJECT_DESCRIPTION) & !is.na(DEGREE_SUBJECT), .N, .(QUARTER)]


tic()
lfs <- lfs_compile("../lfs_rds_data_2020/")
lfs <- lfs_compile("../data_lfs_rds_2020/")
toc()

lfs <- lfs_load()
Expand Down
4 changes: 2 additions & 2 deletions inst/development/test-longitudinal.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ load_all()

setwd(here::here())

lfs_convert("../lfs_raw_data/", "../lfs_rds_data/")
lfs_convert("../data_lfs_raw/", "../data_lfs_rds/")

lfs_compile("../lfs_rds_data/")
lfs_compile("../data_lfs_rds/")

tic()
lfs <- lfs_load()
Expand Down
4 changes: 2 additions & 2 deletions inst/development/test-neet.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ extra_mappings <- function(lfs_file_column_names) {
}

# Convert all to RDS
# lfs_convert("../lfs_raw_data/", "../lfs_rds_data")
# lfs_convert("../data_lfs_raw/", "../data_lfs_rds")

# # Compile into one dataset
# lfs_compile("../lfs_rds_data/", extra_mappings = extra_mappings)
# lfs_compile("../data_lfs_rds/", extra_mappings = extra_mappings)

lfs <- lfs_load()
setwd(here::here())
Expand Down

0 comments on commit cc3a438

Please sign in to comment.