Skip to contents

Line chart of deaths or proportions by year, grouped by a colour variable.

Usage

plot_trend(
  data,
  y = "Deaths",
  colour = "State",
  facet = NULL,
  title = NULL,
  y_label = NULL
)

Arguments

data

A data frame from get_mccd(), typically with a year column.

y

Column name for the y-axis. Default "Deaths".

colour

Column name for colour grouping. Default "State".

facet

Optional column to facet by. Default NULL.

title

Plot title. Default NULL (auto-generated).

y_label

Y-axis label. Default uses the y column name.

Value

A ggplot object.