Comments (11)
👍
from gganimate.
Oh excellent! I had been wondering how to present animations in RStudio but hadn't yet found browsable
in htmltools!
The one thing stopping this implementation is that as per #3 there are some issues with saving plots to a non-local directory in animation. I'm working on fixing them.
A controllable in-RStudio animation widget would be really great and I'd be extremely interested in it! I'll probably be changing the output of gg_animate to be something like a "gganimate" object, which contains the relevant list of image links and whose print method would display the above browsable. So if you had a prototype htmlwidget that took a list of image files it would be easy to add it.
from gganimate.
That makes sense. I will prototype a more generic widget that will display a sequence of images as an animation. This would make it usable beyond gganimate
. I will update you once I have a working prototype.
from gganimate.
Here is an initial prototype http://jsfiddle.net/ramnathv/cabkohuk/. It is a fairly straightforward one to make into a widget. I have mainly tried to replicate features from scianimator
which is terrific, but heavy due to its jquery
dependency. My rewrite uses mithril
which is a lightweight MVC framework that clocks at 8kb gzipped and hence really lightweight.
If there are additional features you would like to see in an animation viewer, feel free to add them so I can incorporate them.
from gganimate.
Very nice, will it work with svg
either directly or possibly using rsvg
?
from gganimate.
also, just noticed the keybinding. Love it.
from gganimate.
@ramnathv I remembered this project https://github.com/socib/Leaflet.TimeDimension and thought it might help regarding functionality, look, and code.
from gganimate.
@ramnathv I've integrated the gg_animate object with a print method
plan, so it's now browsable in RStudio. Please try it!
That prototype is great! Two thoughts:
- I'd like the option to give frames titles instead of numbers: that is, instead of 0-12 on the top row, it should be possible to have 1715 UTC through 2030 UTC. The gapminder example, for instance, could have the years 1952 through 2007 in the little blue boxes. This would not work in all cases (e.g. when there are many frames or their titles are long) so it should definitely be optional, but it would especially ease browsing when the title is a factor rather than continuous.
- There should ideally be a button to turn on looping, or at least clicking play when the animation is done should start over
I'd definitely be interested in seeing this turned into a widget and I'd get it into gg_animate right away.
from gganimate.
@dgrtwo The print method works great!
Thanks for your feedback on the animator widget. Your suggestions can be easily incorporated. I will put them on my list of stuff to implement. I will update the prototype and ping you.
from gganimate.
just curious about the status, is a shiny friendly version available now?
from gganimate.
First off, really cool work with this package. I wish this had been around when I was teaching statistics 😄 . A few ideas to enhance the utility of this package.
Display in RStudio
It would be nice if
gganimate
output could be displayed in RStudio viewer. Here is some quick and dirty code to do it.p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) + geom_point() + scale_x_log10() tf <- tempfile(fileext = '.gif') gg_animate(p, tf, autobrowse = FALSE) d <- htmltools::tags$img(src = base64encode::dataURI(file = "output.gif", mime="image/gif")) htmltools::browsable(d)Animation with Controls
This is possible with
scianimator
, but I find it really clunky, and the jquery requirement makes it meaty. Ifgganimate
can return an array of image paths, it should not be hard to write ahtmlwidget
that would display it with controls. I can prototype something for you if this is of interest.
Love this :)
Would vote to have this rather than opening separately in default program for images, or to have the option.
from gganimate.
Related Issues (20)
- Error in 'vec_rbind()': can't combine <double> and <character> HOT 4
- Animating a network graph with transition_manual - any way to make a subset of nodes remain visible throughout the animation? HOT 1
- end_pause not working properly HOT 2
- transition_reveal() messes up geom_path() in version 1.0.8 HOT 3
- `transition_reveal` and `geom_area` not working together HOT 1
- `transition_layers` and `enter_fade` not working together HOT 4
- Area chart does not render HOT 3
- Elements mixed between first and last frame
- Error: arguments have different crs HOT 24
- Fix for #409 in transition_reveal() causes some rows to be dropped when there are multiple groups in a panel HOT 1
- transition_states computes a wrong nframes HOT 3
- Missing font warnings generated by `gganimate` when using `showtext` HOT 1
- ffmpeg_renderer failing in animate HOT 2
- unused arguments with svg device when knitting
- When in knitting context, current chunk option should be used and not global one
- geom_point not displayed in order
- `enter_fade()/exit_fade()` does not seem to work. HOT 2
- Images (gifs) not shown on gganimate.com
- Legend not showing on animation
- Animate terra - maps HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gganimate.