Skip to contents

Draws a choropleth of solved results over the model's geography, optionally aggregated to a coarser level of the geoscale.

Usage

geo_map(
  scen,
  type = c("generation", "capacity", "new_capacity", "fuel"),
  level = NULL,
  comm = "ELC",
  year = NULL,
  process = NULL,
  geoscale = NULL,
  palette = "D",
  ...
)

Arguments

scen

a solved scenario.

type

what to map, passed to getMix(): "generation", "capacity", "new_capacity" or "fuel".

level

level of the geoscale to draw. Defaults to the finest, i.e. the model's own regions. A coarser level aggregates first.

comm

balanced commodity for "generation".

year

integer year, or NULL for the sum over all milestone years.

process

optional regular expression selecting processes to include.

geoscale

a geoscales::Geoscale, or NULL to use the scenario's.

palette

viridis palette option.

...

passed to ggplot2::geom_sf().

Value

A ggplot object.

Details

Requires a geoscale with geometry attached (see setGeoscale() and geoscales::geo_attach_geometry()), plus sf and ggplot2.

Examples

if (FALSE) { # \dontrun{
scen <- solve(interpolate(mod, "BASE"))
geo_map(scen, "capacity")
geo_map(scen, "capacity", level = "zone")
} # }