Skip to contents

Fills states by a numeric variable. Input must be an sf object (use geometry = TRUE in get_mccd() or attach_geometry()).

Usage

plot_choropleth(
  data,
  fill = "Deaths",
  title = NULL,
  palette = "plasma",
  log_scale = FALSE
)

Arguments

data

An sf data frame with a fill variable.

fill

Column name for the fill aesthetic. Default "Deaths".

title

Plot title. Default NULL.

palette

Viridis palette name. Default "plasma".

log_scale

Logical. Use log10 scale for fill. Default FALSE.

Value

A ggplot object.