create_pmap_graph: Create the activity graph by given nodes and edges.

Description Usage Arguments See Also Examples

View source: R/create_pmap_graph.R

Description

Create the process map graph by specify the nodes and edges

Usage

1
2
3
4
5
6
7
8
9
create_pmap_graph(
  nodes,
  edges,
  target_categories = NULL,
  edge_label = c("amount", "mean_duration", "median_duration", "max_duration",
    "min_duration"),
  edge_width = c("amount", "mean_duration", "median_duration", "max_duration",
    "min_duration")
)

Arguments

nodes

Event list, it should be a data.frame containing following columns:

  • name: Activity name, will be used as label. (character)

  • category: The activity category (character)

edges

Activity transform list, it should be a data.frame containing following columns:

  • from: the beginning activity of the edge. (character)

  • to: the ending activity of the edge (character)

  • amount: How many of case affected by the given activity. (numeric)

target_categories

A vector contains the target activity categories

edge_label

Specify which attribute is used for the edge label.

edge_width

Specify which attribute is used for the edge width.

See Also

create_pmap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
eventlog <- generate_eventlog()
nodes <- generate_nodes(eventlog)
head(nodes)
# # A tibble: 6 x 3
#   name                 category amount
#   <chr>                <chr>     <int>
# 1 Activity 1 (normal)  normal       68
# 2 Activity 10 (phone)  phone        63
# 3 Activity 11 (phone)  phone       116
# 4 Activity 12 (phone)  phone        79
# 5 Activity 13 (target) target       78
# 6 Activity 14 (target) target        9
edges <- generate_edges(eventlog)
head(edges)
#  # A tibble: 6 x 3
#    from                to                        amount
#    <chr>               <chr>                     <int>
#  1 Activity 1 (normal) Activity 1 (normal)       8
#  2 Activity 1 (normal) Activity 10 (target)     10
#  3 Activity 1 (normal) Activity 2 (normal)      12
#  4 Activity 1 (normal) Activity 3 (normal)       9
#  5 Activity 1 (normal) Activity 4 (normal)       7
#  6 Activity 1 (normal) Activity 5 (normal)      10
p <- create_pmap_graph(nodes, edges, target_categories = c("target"))
render_pmap(p)

twang2218/pmap documentation built on Nov. 3, 2021, 11:25 p.m.