Description Usage Arguments Examples
The function returns a ggplot object containing a stacked bar chart showing a technology mix for different categories (portfolio, scenario, benchmark, etc.).
1 2 3 4 5 6 | plot_techmix(
data,
metric_type_order = NULL,
metric_type_labels = NULL,
tech_colours = NULL
)
|
data |
Filtered input data, with columns: technology, metric_type, metric and value. |
metric_type_order |
Vector with the order of bars based on 'metric_type' values. |
metric_type_labels |
Vector with labels for bars. Order must follow that in 'metric type order'. |
tech_colours |
Dataframe containing colours per technology, with columns: technology, colour, label(optional). |
1 2 3 4 5 6 7 8 9 10 11 12 | data <- prepare_for_techmix_chart(
process_input_data(example_data),
sector_filter = "power",
years_filter = c(2020, 2025),
region_filter = "global",
scenario_source_filter = "demo_2020",
scenario_filter = "sds",
value_to_plot = "technology_share"
)
print(
plot_techmix(data)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.