Skip to contents

Walks polys once and renders one ggplot facet per year for columns named <prefix>_<year>.

Usage

morie_tps_render_yearly_grid(
  polys,
  prefix = "ASSAULT_RATE",
  years = 2014:2024,
  cmap = "Reds",
  outfile = NULL,
  ncols = 4L
)

Arguments

polys

Polygon data.frame (see morie_tps_render_choropleth).

prefix

Column-name prefix (default "ASSAULT_RATE").

years

Integer vector of years (default 2014:2024).

cmap

Sequential palette name (default "Reds").

outfile

Optional output path.

ncols

Number of facet columns.

Value

A ggplot (when ggplot2 is loaded) or invisible(NULL) for the base-R fallback.