From aded51457d41dd1b955d24cab7a2b31bc3edf0ac Mon Sep 17 00:00:00 2001 From: ldavies99 Date: Wed, 18 Oct 2023 11:43:28 +0100 Subject: [PATCH] Change column names to match new or changed survey questions --- R/data_cleaning.R | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/R/data_cleaning.R b/R/data_cleaning.R index 2716ae7..2a5daef 100644 --- a/R/data_cleaning.R +++ b/R/data_cleaning.R @@ -11,7 +11,7 @@ rename_cols <- function(data) { if (ncol(data) != 112) { - stop("Unexpected input: incorrect number of columns. Please use the 2022 CARS dataset.") + stop("Unexpected input: incorrect number of columns. Please use the 2023 CARS dataset.") } colnames(data)[c(1, 7:ncol(data))] <- c( @@ -23,6 +23,7 @@ rename_cols <- function(data) { "CS_grade", "department", "other_department_name", + "prof_DE", "prof_DS", "prof_DDAT", "prof_GAD", @@ -34,6 +35,14 @@ rename_cols <- function(data) { "prof_CS_none", "prof_CS_other", "ONS_directorate", + "pay_band", + "NHS_band", + "NJC_grade", + "primary_work_country", + "England_NHS_organisation", + "Scotland_NHS_organisation", + "Wales_NHS_organisation", + "Northern_Ireland_NHS_organisation", "highest_qualification", "qual_1_subject", "qual_1_level", @@ -46,46 +55,35 @@ rename_cols <- function(data) { "qual_3_learn_code", "code_freq", "management", - "ops_analysis", - "ops_cleaning", - "ops_linking", - "ops_transfer_migration", - "ops_vis", - "ops_machine_learning", - "ops_modelling", - "ops_QA", - "ops_other", - "ops_other_name", - "knowledge_R", + "access_matlab", + "access_python", "access_R", - "knowledge_SQL", - "access_SQL", - "knowledge_SAS", "access_SAS", - "knowledge_VBA", + "access_SPSS", + "access_SQL", + "access_stata", "access_VBA", + "access_open_source_other", + "access_licensed_other", + "access_other_specified", + "knowledge_matlab", "knowledge_python", - "access_python", + "knowledge_R", + "knowledge_SAS", "knowledge_SPSS", - "access_SPSS", + "knowledge_SQL", "knowledge_stata", - "access_stata", - "knowledge_JS", - "access_JS", - "knowledge_java", - "access_java", - "knowledge_C", - "access_C", - "knowledge_matlab", - "access_matlab", - "knowledge_access_other", + "knowledge_VBA", + "knowledge_licensed_other", + "knowledge_open_source_other", + "knowledge_other_specified", "knowledge_git", "access_git", "other_coding_experience", - "coding_ability_change", - "prev_coding_experience", "first_learned", + "coding_ability_change", "heard_of_RAP", + "have_RAP_champ", "know_RAP_champ", "strategy_knowledge", "RAP_confident", @@ -102,11 +100,13 @@ rename_cols <- function(data) { "prac_review", "prac_functions", "prac_unit_test", + "prac_other_automated", "prac_package", "prac_dir_structure", "prac_style", "prac_automated_QA", - "prac_AQUA_book", + "prac_development_QA", + "prac_proportionate_QA", "doc_comments", "doc_functions", "doc_readme",