Trying gganimate

The gganimate CRAN package “extends the grammar of graphics as implemented by ggplot2 to include the description of animation. It does this by providing a range of new grammar classes that can be added to the plot object in order to customise how it should change with time”. (Link)

I have been trying out the package’s functionality with some WBBL cricket data. I followed the very basic guidelines to produce four gifs.

I am keen to explore this package in more detail. Before I started I used the vis_dat package (link) to check the structure of my data:

My very basic code for the animations was:

ggplot(df, aes(Wicket, WTPartnership03, size=WTPartnership03)) +
geom_point(alpha = 0.7, show.legend = FALSE, colour=”blue”) +
labs(title = ‘Wicket Winning Team Partnerships WBBL03: {frame_time}’,
x = ‘Wicket’, y = ‘Proportions of Total Runs Scored Per Wicket WBBL03’) +
transition_time(Wicket) +

I used anim_save(“~/Documents”) to save the animation. This command saves the most recent animation as a gif to your specified directory. I had some problems with my x axis so tried scale_x_continuous(breaks=1:10) to resolve the issue and provide me with an integer count for the header in the gif.

End of year summary of three Australian women’s sport competitions

I have been monitoring performances in three Australian women’s sport competitions this season:


The WNBL has concluded its regular season after 21 rounds. My data are collected from the official WNBL web site.

My median profiles for winners and losers in eighty-two games are:


My particular interest in association football is in goal scoring. I have used the official W-League web site for my secondary data. My record of the thirty-three games played in the first part of the 2017-2018 (up to 31 December) is:

The characteristics of these games were:


Twenty-three games have been played in WBBL03 (up to 31 December). My data for these games come from the official WBBL web site. I have been following partnerships in these games.

Photo Credits

UC Capitals (Caden Helmers, Twitter)

Perth Glory v Brisbane Roar (The Women’s Game, Twitter)

Tickets available (Perth Scorchers, Twitter)