Updated script; removed old stuff
This commit is contained in:
parent
9ad5123747
commit
24c7967246
@ -5,10 +5,11 @@
|
|||||||
# (3) Select features for navigation behavior
|
# (3) Select features for navigation behavior
|
||||||
# (4) Export data frames
|
# (4) Export data frames
|
||||||
#
|
#
|
||||||
# input: results/haum/event_logfiles_2024-02-21_16-07-33.csv
|
# input: results/event_logfiles_2024-02-21_16-07-33.csv
|
||||||
# output: results/haum/eventlogs_pre-corona_case-clusters.csv
|
# output: results/dataframes_case_2019.RData
|
||||||
|
# results/centrality_cases.RData
|
||||||
#
|
#
|
||||||
# last mod: 2024-03-08
|
# last mod: 2024-03-22
|
||||||
|
|
||||||
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code")
|
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code")
|
||||||
|
|
||||||
@ -16,7 +17,7 @@ source("R_helpers.R")
|
|||||||
|
|
||||||
#--------------- (1) Read data ---------------
|
#--------------- (1) Read data ---------------
|
||||||
|
|
||||||
load("results/haum/eventlogs_pre-corona_cleaned.RData")
|
load("results/eventlogs_pre-corona_cleaned.RData")
|
||||||
|
|
||||||
# Select one year to handle number of cases
|
# Select one year to handle number of cases
|
||||||
dat <- dat[as.Date(dat$date.start) > "2018-12-31" &
|
dat <- dat[as.Date(dat$date.start) > "2018-12-31" &
|
||||||
@ -135,8 +136,8 @@ dattree <- data.frame(case = datcase$case,
|
|||||||
)
|
)
|
||||||
|
|
||||||
# centrality <- pbapply::pbsapply(dattree$case, get_centrality, data = dat)
|
# centrality <- pbapply::pbsapply(dattree$case, get_centrality, data = dat)
|
||||||
# save(centrality, file = "results/haum/tmp_centrality.RData")
|
# save(centrality, file = "results/centrality_cases.RData")
|
||||||
load("results/haum/tmp_centrality.RData")
|
load("results/centrality_cases.RData")
|
||||||
|
|
||||||
dattree$BetweenCentrality <- centrality
|
dattree$BetweenCentrality <- centrality
|
||||||
|
|
||||||
@ -171,17 +172,5 @@ dattree$AvDurItemNorm <- normalize(dattree$AvDurItem)
|
|||||||
|
|
||||||
#--------------- (4) Export data frames ---------------
|
#--------------- (4) Export data frames ---------------
|
||||||
|
|
||||||
save(dat, datcase, dattree, file = "results/haum/dataframes_case_2019.RData")
|
save(dat, datcase, dattree, file = "results/dataframes_case_2019.RData")
|
||||||
|
|
||||||
write.table(datcase,
|
|
||||||
file = "results/haum/datcase.csv",
|
|
||||||
sep = ";",
|
|
||||||
quote = FALSE,
|
|
||||||
row.names = FALSE)
|
|
||||||
|
|
||||||
write.table(datcase,
|
|
||||||
file = "results/haum/dattree.csv",
|
|
||||||
sep = ";",
|
|
||||||
quote = FALSE,
|
|
||||||
row.names = FALSE)
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user