Function to create a custom map profile based on some event log attribute.

causal_custom(
  FUN = mean,
  attribute,
  units = "",
  color_scale = "RdPu",
  color_edges = "red4",
  ...
)

Arguments

FUN

A summary function to be called on the process time of a specific activity, e.g. mean, median, min, max

attribute

The name of the case attribute to visualize (should be numeric)

units

Character to be placed after values (e.g. EUR for monetary euro values)

color_scale

Name of color scale to be used for nodes. Defaults to RdPu See Rcolorbrewer::brewer.pal.info() for all options.

color_edges

The color used for edges. Defaults to red4.

...

Additional arguments forwarded to FUN

Details

If used for edges, it will show the attribute values which related to the out-going node of the edge.

Examples

causal_net(L_heur_1,
           type_nodes = causal_custom(attribute = "timestamp"),
           type_edges = causal_custom(attribute = "timestamp"))
#> Nodes
#> # A tibble: 11 × 10
#>    act   from_id bindings_in…¹ bindi…² label color…³ shape fontc…⁴ color tooltip
#>    <chr>   <int> <list>        <list>  <chr>   <dbl> <chr> <chr>   <chr> <chr>  
#>  1 a           3 <int [1]>     <int>   "a\n…  1.29e9 rect… black   grey  "Input…
#>  2 a           3 <int [1]>     <int>   "a\n…  1.29e9 rect… black   grey  "Input…
#>  3 a           3 <int [1]>     <int>   "a\n…  1.29e9 rect… black   grey  "Input…
#>  4 a           3 <int [1]>     <int>   "a\n…  1.29e9 rect… black   grey  "Input…
#>  5 b           4 <int [1]>     <int>   "b\n…  1.29e9 rect… white   grey  "Input…
#>  6 c           5 <int [1]>     <int>   "c\n…  1.29e9 rect… white   grey  "Input…
#>  7 d           6 <int [1]>     <int>   "d\n…  1.29e9 rect… white   grey  "Input…
#>  8 e           7 <int [1]>     <int>   "e\n…  1.29e9 rect… white   grey  "Input…
#>  9 e           7 <int [1]>     <int>   "e\n…  1.29e9 rect… white   grey  "Input…
#> 10 e           7 <int [1]>     <int>   "e\n…  1.29e9 rect… white   grey  "Input…
#> 11 e           7 <int [1]>     <int>   "e\n…  1.29e9 rect… white   grey  "Input…
#> # … with abbreviated variable names ¹​bindings_input, ²​bindings_output,
#> #   ³​color_level, ⁴​fontcolor
#> Edges
#> # A tibble: 8 × 10
#>   antecedent consequent   dep from_id to_id     n    value label…¹ label penwi…²
#>   <chr>      <chr>      <dbl>   <int> <int> <dbl>    <dbl>   <dbl> <chr>   <dbl>
#> 1 e          End        0.976       7     1    40   1.29e9  1.29e9 "128…    5   
#> 2 Start      a          0.976       2     3    40   0       0      " "      1   
#> 3 a          b          0.917       3     4    21   1.29e9  1.29e9 "128…    5.00
#> 4 a          c          0.917       3     5    21   1.29e9  1.29e9 "128…    5.00
#> 5 a          d          0.929       3     6    13   1.29e9  1.29e9 "128…    5.00
#> 6 b          e          0.917       4     7    21   1.29e9  1.29e9 "128…    5.00
#> 7 c          e          0.917       5     7    21   1.29e9  1.29e9 "128…    5.00
#> 8 d          e          0.929       6     7    17   1.29e9  1.29e9 "128…    5.00
#> # … with abbreviated variable names ¹​label_numeric, ²​penwidth