View source: R/bind_election_results_chart_data.R
bind_election_results_chart_data | R Documentation |
Bind election results chart data
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
)
. |
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 |
A Flourish chart
try(
flourish(chart_type = "election_results", api_key = Sys.getenv("FLOURISH_API_KEY")) |>
bind_election_results_chart_data(gapminder)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.