The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Use token scales

Felix Mannhardt

2022-07-20

Several aesthetics of tokens (color, size, opacity, image) can be dynamically determined based on event log attributes using D3 scales.

ordinal scales

library(processanimateR)
library(eventdataR)
library(RColorBrewer)
animate_process(patients, 
                legend = "color", 
                mapping = token_aes(color = token_scale("employee", 
                                                        scale = "ordinal", 
                                                        range = RColorBrewer::brewer.pal(8, "Paired"))))

linear scales

library(processanimateR)
library(dplyr)
library(bupaR)
animate_process(sample_n(traffic_fines, 1000) %>% filter_trace_frequency(percentage = 0.95),
                mode = "relative",
                legend = "color", 
                mapping = token_aes(color = token_scale("amount", 
                                                        scale = "linear", 
                                                        range = c("yellow","red"))))

time scales

library(processanimateR)
library(eventdataR)
animate_process(patients, 
                mapping = token_aes(color = token_scale("time", 
                                                        scale = "time", 
                                                        range = c("blue","red"))))

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.