Got additional information from PM and added it

This commit is contained in:
Nora Wickelmaier 2023-10-18 12:56:43 +02:00
parent 6b1b5767bf
commit 9efa1d10a9

37
code/read_trans_matrix.R Normal file
View File

@ -0,0 +1,37 @@
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/code")
dat <- as.data.frame(do.call(rbind, XML::xmlToList("../data/haum/trans.xml")))
dat$a <- as.numeric(dat$a)
dat$b <- as.numeric(dat$b)
dat$c <- as.numeric(dat$c)
dat$d <- as.numeric(dat$d)
dat$tx <- as.numeric(dat$tx)
dat$ty <- as.numeric(dat$ty)
dat$idx <- sprintf("%03d", as.numeric(dat$idx))
# --> artwork names are different from names in data set ???
plot(ty ~ tx, dat, xlim = c(0, 3840), ylim = c(0, 2160))
# read log data
datlogs <- read.table("../data/haum/event_logfiles_metadata_2023-09-23_01-31-30.csv",
sep = ";", header = TRUE)
datlogs$date <- as.Date(datlogs$date)
datlogs$date.start <- as.POSIXct(datlogs$date.start)
datlogs$date.stop <- as.POSIXct(datlogs$date.stop)
datlogs$artwork <- sprintf("%03d", datlogs$artwork)
datmove <- aggregate(cbind(duration, scaleSize, rotationDegree, x.start,
y.start, x.stop, y.stop) ~ artwork, datlogs,
mean)
plot(y.start ~ x.start, datmove, xlab = "x", ylab = "y",
xlim = c(0, 3840), ylim = c(0, 2160))
points(y.stop ~ x.stop, datmove, xlim = c(0, 3840), ylim = c(0, 2160), col = "blue")
points(ty ~ tx, dat, xlim = c(0, 3840), ylim = c(0, 2160), col = "red")
legend("topleft", c("start", "stop", "trans"), col = c("black", "blue", "red"), pch = 21)
# --> does not seem to be a good way to compare if trans values ae valid