Draws a choropleth of solved results over the model's geography, optionally aggregated to a coarser level of the geoscale.
Arguments
- object
a solved
scenario.- type
what to map, passed to
getMix():"generation","capacity","new_capacity"or"fuel". Ignored whennameis given.- 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". On thename =path acommfilter applies only when passed explicitly.- 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.
- name
optional name of any solved variable carrying a
regiondimension (e.g."vTechNewCap","vTechRetiredStock"): the map is drawn fromgetData()instead ofgetMix(). Variables without a region dimension (thevTrade*capacity/retirement family) cannot be mapped.- facet
"none"(default; one map, values summed over years unlessyear =selects one) or"year"(one panel per milestone year).- ...
passed to
ggplot2::geom_sf().
Details
Requires a geoscale with geometry attached (see setGeoscale() and
geoscales::attach_geometry_geoscale()), plus sf and ggplot2.
See also
Other geoscale:
check_geoscale_regions(),
plot_geoscale(),
setGeoscale,config-method,
utopia_geoscale()
Examples
if (FALSE) { # \dontrun{
scen <- solve(interpolate(mod, "BASE"))
plot_map(scen, "capacity")
plot_map(scen, "capacity", level = "zone")
plot_map(scen, name = "vTechNewCap", facet = "year")
plot_map(scen, name = "vTechRetiredStock")
} # }
