knitr::opts_chunk$set(echo = TRUE)
library(bupaR) library(edeaR) library(processmonitR) library(plotluck) library(DiagrammeR) library(data.table) #library(DiagrammeRsvg) library(anytime) library(processmapR) csvLog<-read.table("../largeFile.csv",header = TRUE, sep = ";",na = c("n.v.t.","onbekend","-", "NA")) csvLog$timeStamp <- as.POSIXct(strptime(csvLog$timeStamp, "%d-%m-%Y"))
colnames(csvLog)
eventLog.Base<-eventlog(csvLog, case_id = "CaseId", activity_id = "Activiteit", activity_instance_id = "activity_instance", lifecycle_id = "status", timestamp = "timeStamp", resource_id = "Werknemer" )
graphStandaard <- process_map(eventLog.Base, type = performance(),render = FALSE ) graphStandaard %>% export_graph(file_name = "Z:/Dump/mapPerformanceMetStandaardFunctie.svg", file_type = "SVG")
graphStandaard <- process_map(eventLog.Base, type = frequency(),render = FALSE ) graphStandaard %>% export_graph(file_name = "Z:/Dump/mapFrequencyMetStandaardFunctie.svg", file_type = "SVG")
fileName <- "frequency" agregationInst = list( enriched_frequency(value = "absolute", columnName = "xxx") ) map<-enriched_process_map(eventLog.Base, aggregationInstructions = agregationInst ) map <- map %>% processmapR::color_activities( column = "xxx", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "green1") %>% label_activities(columns =c("activity_name","xxx")) %>% color_transitions(column = "xxx", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "darkgreen") %>% label_transitions(columns = c("xxx")) map %>% export_graph(file_name = "Z:/Dump/Map met frequency.svg", file_type = "SVG")
agregationInst = list( enriched_performance(FUN = mean, columnName = "xxx")) rm(map) map<-enriched_process_map(eventLog.Base, aggregationInstructions = agregationInst )
map <- map %>% processmapR::color_activities( column = "xxx", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "green1") %>% label_activities(columns =c("activity_name","xxx")) %>% color_transitions(column = "xxx", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "darkgreen") %>% label_transitions(columns = c("xxx"))
map %>% export_graph(file_name = "Z:/Dump/Map met performance.svg", file_type = "SVG")
agregationInst = list(enriched_column_aggregate( FUN = mean, columnNameIn = "aantal_kamers", columnNameOut = "xxx1", edgeOperation = "to"),enriched_column_aggregate( FUN = mean, columnNameIn = "totaal_oppervlakte", columnNameOut = "xxx2", edgeOperation = "from"),enriched_performance(FUN = mean, columnName = "perf") ) map<-enriched_process_map(eventLog.Base, aggregationInstructions = agregationInst )
map <- map %>% processmapR::color_activities( column = "xxx2", colorCaption = "black", colorUpperbound = "gray50", colorLowerbound = "gray100") %>% label_activities(columns =c("activity_name","xxx2")) %>% color_transitions(column = "xxx2", colorCaption = "black", colorUpperbound = "gray0", colorLowerbound = "gray50") %>% label_transitions(columns = c("xxx2"))
map %>% export_graph(file_name = "Z:/Dump/Map met xxx2.svg", file_type = "SVG")
map <- map %>% color_activities( column = "xxx2", colorCaption = "black", colorUpperbound = "lightblue", colorLowerbound = "green1") %>% label_activities(columns =c("activity_name","xxx1","xxx2")) %>% color_transitions(column = "xxx2", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "darkgreen") %>% label_transitions(columns = c("xxx1","xxx2"))
agregationInst = list(enriched_column_aggregate( FUN = sum, columnNameIn = "aantal_kamers", columnNameOut = "xxx1", edgeOperation = "to"),enriched_column_aggregate( FUN = mean, columnNameIn = "totaal_oppervlakte", columnNameOut = "xxx2", edgeOperation = "mean"),enriched_performance(FUN = mean, columnName = "perf") ) map<-enriched_process_map(eventLog.Base, aggregationInstructions = agregationInst )
map <- map %>% color_activities( column = "xxx2", colorCaption = "black", colorUpperbound = "gray50", colorLowerbound = "gray100") %>% label_activities(columns =c("activity_name","xxx1","xxx2")) %>% color_transitions(column = "xxx2", colorCaption = "black", colorUpperbound = "gray0", colorLowerbound = "gray50") %>% label_transitions(columns = c("xxx2"))
map %>% export_graph(file_name = "Z:/Dump/Map met xxx2.svg", file_type = "SVG")
map <- map %>% color_activities( column = "xxx2", colorCaption = "black", colorUpperbound = "lightblue", colorLowerbound = "green1") %>% label_activities(columns =c("activity_name","xxx1","xxx2")) %>% color_transitions(column = "xxx2", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "darkgreen") %>% label_transitions(columns = c("xxx1","xxx2"))
map %>% export_graph(file_name = "Z:/Dump/xxx1xxx2activiteit.svg", file_type = "SVG")
map <- map %>% color_activities( column = "xxx2", colorCaption = "black", colorUpperbound = "lightblue", colorLowerbound = "green1") %>% label_activities(columns =c()) %>% color_transitions(column = "xxx2", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "darkgreen") %>% label_transitions(columns = c())
map %>% export_graph(file_name = "Z:/Dump/xxx2blind.svg", file_type = "SVG")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.