Draws a choropleth of solved results over the model's geography, optionally aggregated to a coarser level of the geoscale.
Usage
plot_map(
object,
type = c("generation", "capacity", "new_capacity", "fuel"),
level = NULL,
comm = "ELC",
year = NULL,
process = NULL,
geoscale = NULL,
palette = "D",
...
)Arguments
- object
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
NULLfor the sum over all milestone years.- process
optional regular expression selecting processes to include.
- geoscale
a
geoscales::Geoscale, orNULLto use the scenario's.- palette
viridis palette option.
- ...
passed to
ggplot2::geom_sf().
Details
Requires a geoscale with geometry attached (see setGeoscale() and
geoscales::geo_attach_geometry()), plus sf and ggplot2.
See also
Other geoscale:
check_geoscale_regions(),
setGeoscale,config-method,
utopia_geoscale()
Examples
if (FALSE) { # \dontrun{
scen <- solve(interpolate(mod, "BASE"))
plot_map(scen, "capacity")
plot_map(scen, "capacity", level = "zone")
} # }
