pkgdown/extra.css

Skip to contents

[Experimental]

The "seasonality" / "delay_seasonality" panels of autoplot(), drawn on their own: a periodogram whose dominant peak is marked. For type = "epidemic" (green) the peak suggests a Fourier season length to pass to temporal_effects(); for type = "report" (red) it marks a cycle in the reporting delay itself, such as a weekly reporting rhythm.

For a time-resolved view — which cycles are strong when — see plot_scalogram().

Usage

plot_cycles(x, type = c("epidemic", "report"), ...)

Arguments

x

A tbl_now() object.

type

"epidemic" (default) or "report".

...

Further arguments passed to autoplot.tbl_now(), e.g. by_strata, strata, plotly or palette.

Value

A ggplot2 object (or a plotly widget when plotly = TRUE).

Examples

data(denguedat)
dengue_now <- tbl_now(denguedat, onset_week, report_week, verbose = FALSE)
plot_cycles(dengue_now)