Plot fuel mix

plot_fuel_mix(
  fuel_mix,
  collapse_renewables = TRUE,
  title = NULL,
  colors = NULL,
  font_size = 20
)

Arguments

fuel_mix

A tibble with the mixture of fuels for one or more countries or regions:

region

The name of the country or region

fuel

The name of the fuel

quads

The number of quads per year the country or region consumes

frac

The fraction of the country's energy that comes from that fuel

collapse_renewables

Combine hydroelectricity and other renewables into a single category.

title

Include a title on the plot. If title is NULL (default) or TRUE, a default title is created from the names of the regions in fuel_mix. If title is a character string, that string is used. If title is FALSE, the plot is produced with no title.

colors

A named vector with the colors to use for Coal, Oil, Natural Gas, Nuclear, Hydro, and Renewables.

font_size

The base font size.

Value

A plot object.

Examples

usa_fuel <- get_fuel_mix("United States", collapse_renewables = FALSE)
plot_fuel_mix(usa_fuel)

plot_fuel_mix(usa_fuel, collapse_renewables = FALSE)

plot_fuel_mix(usa_fuel, collapse_renewables = FALSE,
              colors = c(Coal = "black", "Natural Gas" = "gray60",
                         Oil = "gray30", Nuclear = "forestgreen",
                         Hydro = "royalblue", Renewables="palegreen"))

plot_fuel_mix("United States")

plot_fuel_mix("USA")