The goal of barRacer is to provide a simple function to generate bar
chart race animations using ggplot2
and gganimate
.
This package is not yet on CRAN.
You can install the development version of barRacer from GitHub with:
# install.packages("devtools")
devtools::install_github("jl5000/barRacer")
This simple example uses the gapminder
dataset:
#install.packages("gapminder")
library(barRacer)
bar_chart_race(gapminder::gapminder, country, pop, year, title = "Population over time")
tidyverse
(including ggplot2
);gganimate
;If you have any issues or feedback, please do raise a Github Issue or create a Pull Request.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.