bar_chart_race: Create a bar chart race animation.

Description Usage Arguments Value

View source: R/bar_chart_race.R

Description

Create a bar chart race animation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
bar_chart_race(
  df,
  cat_col,
  val_col,
  time_col,
  max_bars = 10,
  duration = 20,
  fps = 10,
  width = 1200,
  height = 900,
  title = "",
  renderer = gganimate::gifski_renderer()
)

Arguments

df

A dataframe containing the data.

cat_col

The column containing the categories (for bars).

val_col

The column containing the values (for bar heights).

time_col

The column containing the time.

max_bars

The maximum number of bars to show (defaults to 10).

duration

The duration of the animation in seconds (defaults to 20).

fps

The smoothness of the animation in frames per second (defaults to 10).

width

The width of the animation in pixels (defaults to 1200).

height

The height of the animation in pixels (defaults to 900).

title

The title of the animation (defaults to blank).

renderer

The renderer to use (defaults to gifski_renderer()).

Value

A bar chart race animation.


jl5000/barRacer documentation built on Dec. 22, 2020, 8:25 p.m.