diff --git a/code/08_case-characteristics.R b/code/08_case-characteristics.R index f7d1ac7..e2dbcf7 100644 --- a/code/08_case-characteristics.R +++ b/code/08_case-characteristics.R @@ -9,7 +9,7 @@ # output: results/dataframes_case_2019.RData # results/centrality_cases.RData # -# last mod: 2024-04-17 +# last mod: 2024-04-25 # setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/") @@ -91,21 +91,6 @@ datcase$max_time <- NULL artworks <- unique(dat$item)[!unique(dat$item) %in% c("501", "502", "503")] datcase$infocardOnly <- pbapply::pbsapply(dat_split, check_infocards, artworks = artworks) -# Clean up NAs -datcase$distance <- ifelse(is.na(datcase$distance), 0, datcase$distance) -datcase$scaleSize <- ifelse(is.na(datcase$scaleSize), 1, datcase$scaleSize) -datcase$rotationDegree <- ifelse(is.na(datcase$rotationDegree), 0, datcase$rotationDegree) -datcase$artist <- ifelse(is.na(datcase$artist), 0, datcase$artist) -datcase$details <- ifelse(is.na(datcase$details), 0, datcase$details) -datcase$extra_info <- ifelse(is.na(datcase$extra_info), 0, datcase$extra_info) -datcase$komposition <- ifelse(is.na(datcase$komposition), 0, datcase$komposition) -datcase$leben_des_kunstwerks <- ifelse(is.na(datcase$leben_des_kunstwerks), 0, datcase$leben_des_kunstwerks) -datcase$licht_und_farbe <- ifelse(is.na(datcase$licht_und_farbe), 0, datcase$licht_und_farbe) -datcase$technik <- ifelse(is.na(datcase$technik), 0, datcase$technik) -datcase$thema <- ifelse(is.na(datcase$thema), 0, datcase$thema) -datcase$ntopics <- ifelse(is.na(datcase$ntopics), 0, datcase$ntopics) -datcase$ntopiccards <- ifelse(is.na(datcase$ntopiccards), 0, datcase$ntopiccards) - #--------------- (3) Select features for navigation behavior --------------- # Features for navigation types for MTT: @@ -159,7 +144,7 @@ rm(tmp) dattree$InfocardOnly <- factor(datcase$infocardOnly, levels = 0:1, labels = c("no", "yes")) -# Add pattern to datcase; loosely based on Bousbia et al. (2009) +# Add pattern to dattree; loosely based on Bousbia et al. (2009) dattree$Pattern <- "Dispersion" dattree$Pattern <- ifelse(dattree$PathLinearity > 0.8, "Scholar", dattree$Pattern) diff --git a/code/10_validation.R b/code/10_validation.R index d60ca68..a0066ea 100644 --- a/code/10_validation.R +++ b/code/10_validation.R @@ -10,7 +10,7 @@ # output: ../thesis/results/clustering_cases_2018.RData # ../thesis/results/clustering_cases.RData # -# last mod: 2024-04-17 +# last mod: 2024-04-25 # setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/") @@ -61,11 +61,6 @@ datcase18$max_time <- NULL artworks <- unique(dat$item)[!unique(dat$item) %in% c("501", "502", "503")] datcase18$infocardOnly <- pbapply::pbsapply(dat_split, check_infocards, artworks = artworks) -# Clean up NAs -datcase18$distance <- ifelse(is.na(datcase18$distance), 0, datcase18$distance) -datcase18$scaleSize <- ifelse(is.na(datcase18$scaleSize), 1, datcase18$scaleSize) -datcase18$rotationDegree <- ifelse(is.na(datcase18$rotationDegree), 0, datcase18$rotationDegree) - #--------------- (3) Select features for navigation behavior --------------- dattree18 <- data.frame(case = datcase18$case,