A function for creating a SVG animation of an event log on a process map created by process_map from the processmapR package.

animate_process(eventlog, processmap = process_map(eventlog, render = F,
  ...), renderer = renderer_graphviz(), mode = c("absolute",
  "relative", "off"), duration = 60, jitter = 0, timeline = TRUE,
  legend = NULL, initial_state = c("playing", "paused"),
  initial_time = 0, repeat_count = 1, repeat_delay = 0.5,
  epsilon_time = duration/1000, mapping = token_aes(),
  token_callback_onclick = c("function(svg_root, svg_element, case_id) {",
  "}"), token_callback_select = token_select_decoration(),
  activity_callback_onclick = c("function(svg_root, svg_element, activity_id) {",
  "}"), activity_callback_select = activity_select_decoration(),
  elementId = NULL, preRenderHook = NULL, width = NULL,
  height = NULL, ...)

Arguments

eventlog

The event log object that should be animated

processmap

The process map created with processmapR that the event log should be animated on, if not provided a standard process map will be generated by using processmapR::process_map.

renderer

Whether to use Graphviz (renderer_graphviz) to layout and render the process map, or to render the process map using Leaflet ((renderer_leaflet)) on a geographical map.

mode

Whether to animate the cases according to their actual time of occurence ("absolute") or to start all cases at once ("relative").

duration

The overall duration of the animation, all times are scaled according to this overall duration.

jitter

The magnitude of a random coordinate translation, known as jitter in scatterplots, which is added to each token. Adding jitter can help to disambiguate tokens traveling on top of each other.

timeline

Whether to render a timeline slider in supported browsers (Recent versions of Chrome and Firefox only).

legend

Whether to show a legend for the `size` or the `color` scale.

initial_state

Whether the initial playback state is `playing` or `paused`.

initial_time

Sets the initial time of the animation. The default is to start at the beginning (0).

repeat_count

The number of times the process animation is repeated.

repeat_delay

The seconds to wait before one repetition of the animation.

epsilon_time

A (small) time to be added to every animation to ensure that tokens are visible.

mapping

A list of aesthetic mappings from event log attributes to certain visual parameters of the tokens. Use token_aes to create a suitable mapping list.

token_callback_onclick

A JavaScript function that is called when a token is clicked. The function is parsed by JS and received three parameters: 'svg_root', 'svg_element', and 'case_id'.

token_callback_select

A JavaScript callback function called when token selection changes.

activity_callback_onclick

A JavaScript function that is called when an activity is clicked. The function is parsed by JS and received three parameters: 'svg_root', 'svg_element', and 'activity_id'.

activity_callback_select

A JavaScript callback function called when activity selection changes.

elementId

passed through to createWidget. A custom elementId is useful to capture the selection events via input$elementId_tokens and input$elementId_activities when used in Shiny.

preRenderHook

passed through to createWidget.

width, height

Fixed size for widget (in css units). The default is NULL, which results in intelligent automatic sizing based on the widget's container.

...

Options passed on to process_map.

See also

process_map, token_aes

Examples

data(example_log) # Animate the process with default options (absolute time and 60s duration) animate_process(example_log)
# Animate the process with default options (relative time, with jitter, infinite repeat) animate_process(example_log, mode = "relative", jitter = 10, repeat_count = Inf)