knitr::opts_chunk$set(echo = TRUE)

Installation

The package is located on my GitHub. From the RStudio IDE, You should install it with the devtools library using the following lines of code.

# install 'devtools'
install.packages("devtools")

# import 'devtools'
library(devtools)

# install 'goyav' from github
install_github("AntoninVidon/goyav")
# import 'goyav'
library(goyav)

You may have to upgrade some of your packages in order to successfully install goyav.

The goyav package

Description

goyav is a shiny App meant to generate GIF from tabular temporal data. All customization of the animated plots is done in an interactive window.

The dashboard of the application looks like this :

knitr::include_graphics("README/dashboard.PNG")

The user is able to navigate into two tabs : "Animate" and "Advanced animate", the latter offering a wider range of customization.

From the Animate tab, you may choose the following :

From the Advanced animated tab, you may choose the following :

Demonstration

In order to better show the use of the package, we will import and use the gapminder dataset from the gapminder package.

# install `gapminder`
install.packages("gapminder")
# load `gapminder`
library(gapminder)

# display first rows of dataset
knitr::kable(head(gapminder))

In order to be able to create any GIF, your dataframe should have candidate columns for the following variables: X, Y, size and temporal. Therefore, calling the goyav function on a dataframe with less than 4 numeric variables will return an error.

# try to call the `goyav` function on the first 3 columns of the `gapminder` dataset
goyav(gapminder[,1:3])

Let's now call goyav on the whole dataset :

# call `goyav` on `gapminder`
goyav(gapminder)

View from the Animate tab

knitr::include_graphics("README/Animate.gif")

View from the Advanced animate tab

knitr::include_graphics("README/AdvancedAnimate.gif")


AntoninVidon/goyav documentation built on March 31, 2024, 2:26 a.m.