Skip to contents

Create a single line time series graph in a dluhc theme

Usage

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

Arguments

.data

A dataframe in long format with 2 columns necessary: Date and value

datecol

The column name which contains the date value in a widely used date format

ycol

The column name which contains the values

dateformat

is the format which the date is presented in using the standard R date format, see here for more detail https://www.statology.org/r-date-format/

Value

a ggplot object

Examples

df <- dluhctheme::Social_Housing_Sales
df <- dplyr::filter(df,type == "Right to Buy")

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