Analyses the returns of the index selected in the Timeseries
tab by day of the week, week of the year, month or year of the US
presidential cycle with seasonality_analysis(), and shows them in words, as a chart
and as a table. The CSV file, named like
s-p-500-seasonality-month-2026-11-07.csv, holds seasonality_csv():
a row per group.
Arguments
- id
Character. Module namespace id, must match the id used in
mod_seasonality_ui().- history
Reactive returning the price history of the selected index, from
mod_timeseries_server().- dark_mode
Reactive returning
"light"or"dark", the mode of the app.
Examples
if (FALSE) { # \dontrun{
# inside app_server():
function(input, output, session) {
dark_mode <- reactive(input$dark_mode)
history <- mod_timeseries_server("timeseries", indices, dark_mode)
mod_seasonality_server("seasonality", history, dark_mode)
}
} # }