From 752501b4df8d7f599206ef180f0396667b831f34 Mon Sep 17 00:00:00 2001 From: nwickel Date: Wed, 13 Mar 2024 18:14:57 +0100 Subject: [PATCH] Some small updates --- code/02_descriptives.R | 7 ++++--- code/10_user-navigation.R | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/code/02_descriptives.R b/code/02_descriptives.R index a925389..40d74a1 100644 --- a/code/02_descriptives.R +++ b/code/02_descriptives.R @@ -12,9 +12,9 @@ # input: results/haum/event_logfiles_2024-02-21_16-07-33.csv # output: # -# last mod: 2023-11-15, NW +# last mod: 2024-03-13 -# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/code") +# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code") library(lattice) library(bupaverse) @@ -40,7 +40,7 @@ datlogs$event <- factor(datlogs$event, levels = c("move", "flipCard", "openTopic", "openPopup")) -datraw <- read.table("results/haum/raw_logfiles_2024-01-18_09-58-52.csv", +datraw <- read.table("results/haum/raw_logfiles_2024-02-21_16-07-33.csv", sep = ";", header = TRUE) # Add weekdays to data frame @@ -51,6 +51,7 @@ datlogs$weekdays <- factor(weekdays(datlogs$date.start), labels = c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) + ### Number of log files length(unique(datraw$fileId)) # 39767 diff --git a/code/10_user-navigation.R b/code/10_user-navigation.R index a050730..18f03b6 100644 --- a/code/10_user-navigation.R +++ b/code/10_user-navigation.R @@ -36,6 +36,10 @@ coor_2d <- coor_3d[, 1:2] plot(coor_2d) rgl::plot3d(coor_3d) +# pm <- cluster::pam(dist_mat, k = k) +# cluster <- pm$clustering +# --> Does not look as good as the hierarchical clustring + method <- c(average = "average", single = "single", complete = "complete", ward = "ward") hcs <- pbapply::pblapply(method, function(x) cluster::agnes(dist_mat, method = x)) @@ -71,7 +75,18 @@ tmp <- dat tmp$start <- tmp$date.start tmp$complete <- tmp$date.stop -alog <- bupaR::activitylog(tmp[tmp$case == 24016, ], +# Examples: +## Scholar: 29679 +## Star: 24456 +## Dispersion: 26000 + +## only info cards: 24299 +## not only info cards: 24013 + +#head(dattree[dattree$Pattern == "Dispersion" & datcase$nitems == 10, ]) +#head(dattree[dattree$InfocardOnly == "yes" & datcase$nitems == 3, ]) + +alog <- bupaR::activitylog(tmp[tmp$case == 24013, ], case_id = "case", activity_id = "item", resource_id = "path",