Skip to contents

Create a 2 line time series graph in a DLUHC style

Usage

two_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
#> Error: 'Social_Housing_Sales' is not an exported object from 'namespace:dluhctheme'

two_line_timeseries(.data=df,datecol = year, ycol = value, groupcol = type, dateformat = "%Y")
#> Error in UseMethod("pull"): no applicable method for 'pull' applied to an object of class "function"