Plot the moving average of a column.
plot_moving_average(
df,
time_col,
value_col,
ma_days,
ma_sides,
title,
save_plot = FALSE,
output_path = "",
units = NULL
)The dataframe containing the raw data.
The column name of the column containing the timeseries.
The column name of the column containing the value.
The number of days to use for MA calculations.
The number of sides to use for MA calculations (1 or 2).
The title for your plot.
Whether or not to save the plot.
The path to output the plot to.
A named character vector of units for each variable.