bind_pictogram_data: Bind pictogram data

View source: R/bind_pictogram_data.R

bind_pictogram_dataR Documentation

Bind pictogram data

Description

Bind pictogram data

Usage

bind_pictogram_data(
  .,
  data = NULL,
  icons_data = NULL,
  main_category = NULL,
  sub_category = NULL,
  values = NULL,
  icon_id = NULL,
  color = NULL,
  metadata = NULL,
  icons_id = NULL,
  icons_path_string = NULL,
  icons_width = NULL,
  icons_height = 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.

icons_data

Icons data.

main_category

Main category. The (categorical) column that defines the categories along the main axis. Flourish type hint: column

sub_category

Subcategory. The (categorical) column that defines the categories within each bar. Flourish type hint: column

values

Values. (Optional) Choose the numeric columns to determine the size of each bar. If more than 1 is chosen, a dropdown will appear in the visualization, which lets the user choose. Flourish type hint: columns

icon_id

Icon ID. IDs for joining icons in the Icons datasheet. Must contain IDs that match Icon ID values in Icons Set to the same column as the Main category or Subcategory. Flourish type hint: column

color

Color. The (categorical) column which determines the icon color. Set to the same column as the Main category or Subcategory. Flourish type hint: column

metadata

Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Flourish type hint: columns

icons_id

Icon ID. Unique ID for joining icon path strings. Must contain IDs that match the Icon ID values in DataFlourish type hint: column

icons_path_string

Icon. Icon path string (e.g. "M10,10 l80,0 l0,80 l-80,0 z") or the name of a built-in icon (e.g. "female"). Flourish type hint: column

icons_width

Icon width. Icon width (in pixels). Flourish type hint: column

icons_height

Icon height. Icon height (in pixels). Flourish type hint: column

Value

A Flourish chart

Examples

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

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