Finished second talk for meeting with AK

This commit is contained in:
Nora Wickelmaier 2023-09-29 15:04:11 +02:00
parent 98e60a8e46
commit 35ff1430ea
1 changed files with 34 additions and 2 deletions

View File

@ -3,8 +3,8 @@
library(lattice)
# Achims colors (used by lattice)
cc <- palette.colors(palette = "Okabe-Ito")
plot(1:10, col = cc, pch = 16, cex = 2)
#cc <- palette.colors(palette = "Okabe-Ito")
#plot(1:10, col = cc, pch = 16, cex = 2)
# Read data
datlogs <- read.table("../data/haum/event_logfiles_metadata_2023-09-23_01-31-30.csv",
@ -55,6 +55,7 @@ datagg <- aggregate(duration ~ event + artwork, datlogs, mean)
datagg$ds <- datagg$duration / 1000
bwplot(ds ~ as.factor(event), datagg)
bwplot(ds ~ as.factor(event) | artwork, datagg)
xyplot(ds ~ as.factor(event), datagg, groups = artwork)
# without aggregation
@ -71,6 +72,37 @@ dev.off()
datlogs$daydiff <- c(NA, diff(datlogs$date))
plot(daydiff ~ date, datlogs, type = "b")
### Move events
datmove <- aggregate(cbind(duration, scaleSize, rotationDegree, x.start,
y.start, x.stop, y.stop) ~ artwork, datlogs,
mean)
hist(log(datlogs$scaleSize))
# --> better interpretable on logscale
plot(y.start ~ x.start, datmove, pch = 16, col = "gray")
points(y.start ~ x.start, datmove, col = "#0072B2", cex = log(datmove$scaleSize))
points(y.start ~ x.start, datmove, col = "#009E73", cex = datmove$rotationDegree)
plot(y.start ~ x.start, datmove, type = "n", xlab = "x", ylab = "y",
xlim = c(0, 3840), ylim = c(0, 2160))
with(datmove, text(x.start, y.start, artwork, col = "gray", cex = 1.5))
with(datmove,
arrows(x.start, y.start, x.stop, y.stop, length = 0.07, lwd = 2)
)
abline(v = c(0, 3840), h = c(0, 2160), col = "#0072B2", lwd = 2)
datscale <- aggregate(scaleSize ~ artwork, datlogs, max)
plot(y.start ~ x.start, datmove, pch = 16, col = "gray")
points(y.start ~ x.start, datmove, col = "#0072B2", cex = log(datscale$scaleSize))
plot(y.start ~ x.start, datmove, type = "n", xlab = "x", ylab = "y",
xlim = c(0, 3840), ylim = c(0, 2160))
#with(datmove, text(x.stop, y.stop, artwork))
with(datmove, text(x.start, y.start, artwork))
### Are there certain areas of the table that are touched most often?