Skip to content

Commit eaac6bd

Browse files
Initial Commit of Main Files
1 parent d0b1dcf commit eaac6bd

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata
5+
*.csv
6+
_local/

ProcessMining.pbix

32.9 MB
Binary file not shown.

ProcessMining_work.R

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
2+
3+
# install.packages('bupaR')
4+
# install.packages('DiagrammeR')
5+
# install.packages('DiagrammeRsvg')
6+
# install.packages('processmapR')
7+
# install.packages('rsvg')
8+
# install.packages("dplyr")
9+
10+
setwd('D:/OneDrive/_ClientSyncDev/_Git/Power-BI-R-Process-Mining')
11+
12+
library(bupaR)
13+
library(DiagrammeR)
14+
library(DiagrammeRsvg)
15+
library(processmapR)
16+
library(rsvg)
17+
library(dplyr)
18+
19+
purchase_log = read.csv("PurchaseLog.csv", header = T, sep = ';')
20+
21+
purchase_cases =
22+
purchase_log %>%
23+
group_by(case_id) %>%
24+
summarise( activity_count = n())
25+
26+
max(purchase_cases$activity_count)
27+
sum(purchase_cases$activity_count)
28+
29+
hist(
30+
purchase_cases$activity_count,
31+
main="Frequency of Activity Count",
32+
xlab="Cases",
33+
ylab="Frequency",
34+
border="blue",
35+
col="green",
36+
breaks = 600
37+
)
38+
39+
hist(
40+
purchase_cases$activity_count,
41+
main="Frequency of Activity Count",
42+
xlab="Cases",
43+
ylab="Frequency",
44+
border="blue",
45+
col="green",
46+
xlim=c(0,10),
47+
breaks = 600
48+
)
49+
50+
purchase_cases_excerpt = subset(purchase_cases,
51+
activity_count >= 30 & activity_count <= 30)
52+
53+
purchase_log_excerpt =
54+
purchase_log %>%
55+
filter(case_id %in% purchase_cases_excerpt$case_id)
56+
57+
purchase_log_excerpt$timestamp = as.POSIXct(purchase_log_excerpt$timestamp, tz = "GMT", format = c("%Y-%m-%d %H:%M:%OS"))
58+
59+
x =
60+
eventlog(purchase_log_excerpt,
61+
activity_id = "activity_id",
62+
case_id = "case_id",
63+
resource_id = "resource_id",
64+
activity_instance_id = "activity_instance_id",
65+
lifecycle_id = "lifecycle_id",
66+
timestamp = "timestamp"
67+
)
68+
69+
process_map(x, type = frequency("relative", color_scale = "Purples"), render = TRUE)
70+
71+
trace_explorer(x, type = "frequent", coverage = 0.985)
72+
73+
74+
75+
76+
77+
78+
79+
80+

RawData.zip

13 MB
Binary file not shown.

0 commit comments

Comments
 (0)