On procastination and bitmap gganimate
With the Joint International Society for Clinical Biostatisitcs and Australian Statistical Conference 2018 approaching where I am presenting a poster, giving a poster pitch, giving a talk, delivering a seminar at R-Ladies Melbourne meeting as well as continuing collaborations, I think it’s no time for procastination. I have to get things done.
Then this happened.
👏👏@vilsurr! We’ve got #gganimate envy!
— R-Ladies Sydney (@RLadiesSydney) August 18, 2018
Any @RLadiesSydney want to take up the challenge? https://t.co/6HTqnK6PoA
And this was me. The idiot.
— Emi Tanaka 🌾 (@statsgen) August 19, 2018
I was yet to join the gganimate
user group so I was quite excited to have an excuse to give it a try. I first had to install the gganimate
package. I had the old version of the package by David Robinson. Thomas Lin Perdensen has been developing the package with David’s blessings and showcased the package at the useR! 2018 conference held in Brisbane, Australia. His talk on “The Grammar of Animation” was well received (at the very least by me).
So I binge watched a lot of #useR2018 videos (clearly I am not over my jetlag) and I have to say that @thomasp85's grammar of animation talk was superb 👍 The slides were beautiful, he gave so much insight and depth about API. Just amazing. (1/2)https://t.co/0hLMhbIRaj
— Emi Tanaka 🌾 (@statsgen) July 16, 2018
David not long after the useR! 2018 accepted fully Thomas’s pull request and transferred the ownership. Here here to the new king of gganimate
! Now I just want segues.
Anyhow, installing was quite a bit of pain. First issue I had was installing the dependency gifski
. After some time trying, I figured out that it was having issue finding an element to do with the R core algorithm. It then clicked to me that my version of R (v3.3) was old. I delayed updating as I was afraid certain packages may break. I decided to take the risk and installed the latest R (v3.5.1). Then gifski
installed fine. Next I had to reinstall other dependencies tweenr
and transformr
. Both are Thomas’s packages. I managed to install tweenr
from CRAN but for transformr
I had to install it from github. This is where I hit the next installation issue.
Could not find build tools necessary
I had a lot of trouble figuring this out. I reinstalled some developer tools for Mac. Still getting the same error. It should be working but it seems to be failing somewhere.
The trick to bypass this part was to bypass the building tool check by
options(buildtools.check = function(action) TRUE )
then everything worked fine.
Bitmap gganimate
So to get started, I needed to get a bitmap matrix for the words ‘R Ladies’ and ‘Sydney’. The easiest way I figured was to draw this and read it in R
. So I download and installed Paintbrush.
I copied the style ‘R Ladies’ from the orignal and ‘Sydney’ was made from another styled bitmap with some improvising.
With some googling to find out which one might be the best for reading it in as bitmap and with the help of this tutorial, I got the code working and put it as my first github gist:
And it was done :)
Yay! I feel like I have joined the cool kids now that I have used #gganimate ! I had to update my R to v3.5 to install 'gifski' and took a while sorting out other installation issues (what do you mean "Could not find build tools necessary" 😑). Anyway go it working in the end!! pic.twitter.com/eqfBBwCW2R
— Emi Tanaka 🌾 (@statsgen) August 19, 2018
I learned a lot so thank you for the challenge!
Thanks for sharing @vilsurr and the fun challenge @RLadiesSydney !
— Emi Tanaka 🌾 (@statsgen) August 19, 2018
Code to make this shown here: https://t.co/x6DklQJ94R
So I go sweating to get my work done.
Yup, that’s right.
You can tell I’m procastinating again writing this blog.
I might learn one day.