Skip to contents

Create a time series with more than one line in a DLUHC style

Usage

multi_line_timeseries(
  .data,
  datecol,
  ycol,
  groupcol,
  dateformat = "%Y-%m-%d"
)

Arguments

.data

A dataframe with the data in a long format with one column for the date and one column for the variable value

datecol

The column name of the dataframe which contains the date variable

ycol

The column name of the dataframe which contains the value

groupcol

The column name which contains the grouping variable (such as country, region or type)

Value

A ggplot2 object

Examples

df <- dluhctheme::Social_Housing_Sales

multi_line_timeseries(.data=df,datecol = year, ycol = count, groupcol = type, dateformat = "%d/%m/%Y")