Profile picture
Garrick Aden-Buie @grrrck
, 8 tweets, 5 min read Read on Twitter
Getting ready to teach dplyr joins to new #rstats users tomorrow, so naturally I productively procrastinated by getting to know the new gganimate. It is the coolest!
The readme is a great intro -- github.com/thomasp85/ggan…. I basically just replaced `+facet_wrap(~ key)` with `+transition_states(key)`.
I really like how easily the gganimate calls fit in with the ggplot pipeline. It's very clear @thomasp85 put a lot of thought and care into the API design.
inner_join() was the trickiest because the order of the rows matters when gganimate moves objects around. full_join() was a lot easier because all the elements stay visible.
Those are the mutating joins, here's a filtering join: semi_join(). If you want to learn more about dplyr joins, the #R4DS chapter on relational data is a great resource. r4ds.had.co.nz/relation-data.…
And finally, our last join of the evening: the anti_join().

The source is available here: gist.github.com/gadenbuie/077b…

Feel free to use the source or the images for any #rstats teaching!
Encore animated join -- what if `y` has duplicate rows with the key in `x`? left_join gives all combinations of matches, so there are more rows in the result than in `x`. Thanks to @zeehio_ for pointing this out!
Thanks everyone for your comments and for sharing! The animations were super helpful in class today -- hopefully they can help you too!

I just moved the source and downloadable gifs to github.com/gadenbuie/tidy…

Stay tuned for {tidyr} animations next week! 😎
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Garrick Aden-Buie
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($3.00/month or $30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!