-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Feature Request: Ability to reduce volume of animated elements #9
Comments
Thanks. Nice that it is useful. Currently, the animation is not very good at a large scale since each case is represented by its own SVG shape and all the timings are pre-computed. Also, bupaR is not yet very efficient in its internal operations. I think due to dplyr sometimes the full log needs to be copied without it being necessary. I wanted to look into that for some time, but never found the urgent need since most actual use cases can be reduced before it comes to rendering. There are several ideas I have:
What are your thought on this? |
I've been thinking about this all week if there is a way to return the full results, but then when it comes to the animation using a sample to represent each case. Getting pretty similar results to what I would be expecting using the below library(tidyverse)
library(bupaR)
library(processanimateR)
event <- traffic_fines %>% group_by(case_id) %>%
summarise(vector = paste(activity, collapse="-"))
events <- event %>% group_by(vector) %>% sample_frac(.1)
results <- traffic_fines %>% filter_attributes(case_id %in% events$case_id)
ptm <- proc.time()
animate_process(results)
print(proc.time() - ptm)
ptm <- proc.time()
animate_process(traffic_fines)
print(proc.time() - ptm) This way I am still using the same proportion of cases, but it would still be good if we could just apply the sampling to the elements when rendering the svg animation. I'm not really sure how else I could go about reducing events rendered without losing any important information. |
Amazing job on the latest commit by the way! Animations are definitely a-lot smoother and stick to the lines heaps better |
Thanks. You can simplify your sampling code by using the There is also definitely some optimisation possible to make the rendering more efficient. |
Thanks, I've also noticed small optimisations by removing the token opacity - removes the overhead of having to recalculate pixel updates for all the shapes impacted by a moving token. |
Your best bet is to play it over a longer period of time, for example: 3 minutes instead of 1 |
Hi Felix,
This package is a lifesaver, I have been looking for something to provide this kind of functionality in R for a long while now!
I'm using it to visualise a process that has over 20,000 cases and a large amount of activities, and just wondering if there is a way to reduce the on-screen animations rendered but at the same scale that the full event log would contain?
For an example if I run
traffic_fines %>% animate_process()
rendering the 10,000 different flows is very resource intensive on my machine and takes about 50 seconds to load, and I think that the same story could be told rendering a fraction of the cases as on screen elements.I am using development ‘processanimateR’ version 1.0.0.9000
Just an idea for a new feature, unsure of complexity or feasibility
Thanks for your work!
The text was updated successfully, but these errors were encountered: