bind_sports_race_data: Bind sports race data

View source: R/bind_sports_race_data.R

bind_sports_race_dataR Documentation

Bind sports race data

Description

Bind sports race data

Usage

bind_sports_race_data(
  .,
  data = NULL,
  name = NULL,
  times = NULL,
  start_image = NULL,
  race_image = NULL,
  finish_image = NULL,
  color_category = NULL
)

Arguments

.

The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).

data

Data.

name

Name. Name of competitor. Flourish type hint: column

times

Times. One or more columns of numbers, representing splits or laps, or a whole race. Flourish type hint: columns

start_image

Start image. The image to use at the start of the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column

race_image

Racing image. The image to use while a participant is racing. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column

finish_image

Finish image. The image to use when the participant has finished the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column

color_category

Color category. Add a category to color participants by. If empty, the name column will be used for colors. Flourish type hint: column

Value

A Flourish chart

Examples

try(
  flourish(chart_type = "sports_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> 
  bind_sports_race_data(gapminder)
)

flourishcharts documentation built on Oct. 30, 2024, 9:07 a.m.