You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Thomas and team!
I have a large {sf} data set that I would like to animate with gganimate(), and the current workflow for the package doesn't seem to work for me.
The final animation should consist of only 24 frames, but the underlying data set if a set of simple features (road segments): 20,476 unique segments in 403,213 instances (each segment has up to 24 values, 1 for every hour of the day). In the animation, segments stay in place, only color changes (hence grouping by segment id).
The animation works as expected (using either transition_states() or transition_time()) if I select top 1000 rows, essentially visualizing a tiny fraction of the data. Trying to animate the entire data set does nothing: animate() is called, but nothing is printed to the console (the session is not unresponsive though - I am able to stop the animate() call without a problem)
So, the problem is not in the code, but in the processing a large amount of data (or the fact that this is an sf object).
Question
My question is: is there a possible workaround within the gganimate() framework that allows me to create the animation in some alternative way?ggplot can handle this data, after all: e.g. I can generate a static plot with facet_wrap() without a problem.
Workaround
As a current workaround, I have ggplot generate 24 static images, and then merge them into a gif with gifski CLI. But I'd like to do all steps within my R scripts, without a need to go to the command line and back.
Here is what I get with that workaround and would like to get with gganimate:
The text was updated successfully, but these errors were encountered:
I cannot really comment on why it doesn't work if you can get all your states with facet_wrap (ie you don't need any tweening) you should be able to use transition_manual.
Another approach is to just do it all by hand and use the gifski package instead of gifski cli if you want to stay in R
Thank you!
I am not very familiar with gganimate syntax, and I think "no tweening" is what I was looking for, without knowing how to say it.
Will read the documentation extra carefully next time.
However,
you don't need any tweening
Well, I do, it'd be nice to have it, but it doesn't seem as if my MBP, my R session and gganimate can give it to me. I simply assume it is too heavy of a lift.
I'm going to close this issue as there is nothing to do, really.
Hi Thomas and team!
I have a large
{sf}
data set that I would like to animate withgganimate()
, and the current workflow for the package doesn't seem to work for me.The final animation should consist of only 24 frames, but the underlying data set if a set of simple features (road segments): 20,476 unique segments in 403,213 instances (each segment has up to 24 values, 1 for every hour of the day). In the animation, segments stay in place, only color changes (hence grouping by segment id).
The animation works as expected (using either
transition_states()
ortransition_time()
) if I select top 1000 rows, essentially visualizing a tiny fraction of the data. Trying to animate the entire data set does nothing:animate()
is called, but nothing is printed to the console (the session is not unresponsive though - I am able to stop theanimate()
call without a problem)So, the problem is not in the code, but in the processing a large amount of data (or the fact that this is an
sf
object).Question
My question is: is there a possible workaround within the
gganimate()
framework that allows me to create the animation in some alternative way?ggplot
can handle this data, after all: e.g. I can generate a static plot withfacet_wrap()
without a problem.Workaround
As a current workaround, I have
ggplot
generate 24 static images, and then merge them into a gif with gifski CLI. But I'd like to do all steps within my R scripts, without a need to go to the command line and back.Here is what I get with that workaround and would like to get with gganimate:
The text was updated successfully, but these errors were encountered: