bind_election_results_chart_data: Bind election results chart data

View source: R/bind_election_results_chart_data.R

bind_election_results_chart_dataR Documentation

Bind election results chart data

Description

Bind election results chart data

Usage

bind_election_results_chart_data(
  .,
  values_now_data = NULL,
  values_historical_data = NULL,
  values_now_name = NULL,
  values_now_values = NULL,
  values_historical_name = NULL,
  values_historical_values = 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).

values_now_data

Values now data.

values_historical_data

Values historical data.

values_now_name

Region name. The name of the data series (eg. voting district). Flourish type hint: column

values_now_values

Results by party. One column per party, with party names as header rows. Flourish type hint: columns

values_historical_name

Region name. The name of the data series (eg. voting district). Flourish type hint: column

values_historical_values

Results by party. One column per party, with party names as header rows. Flourish type hint: columns

Value

A Flourish chart

Examples

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

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