Visualize seasonal patterns using box or violin plots grouped by seasonality features (hour, weekday, month, etc.). Works with pandas or polars inputs.
Parameters
Name
Type
Description
Default
data
pd.DataFrame or pd.core.groupby.generic.DataFrameGroupBy
Time series data (long format) or grouped data. Polars DataFrames are supported.
required
date_column
str or ColumnSelector
Datetime column used to compute the seasonal features.
required
value_column
str or ColumnSelector
Numeric column plotted on the y-axis.
required
feature_set
str or sequence
One or more of ["second", "minute", "hour", "wday.lbl", "week", "month.lbl", "quarter", "year"]. "auto" selects a sensible subset.
'auto'
facet_vars
str, sequence, or ColumnSelector
Additional categorical columns to facet by. They are treated as grouping columns for the diagnostics.
None
facet_ncols
int
Number of facet columns when plotly_dropdown is False. Defaults to 2.
1
geom
(box, violin)
Plotting geometry for each seasonal feature. Defaults to "box".
"box"
geom_color
str
Primary color for the box/violin geometry. Defaults to "#2c3e50".
'#2c3e50'
geom_outlier_color
str
Outlier color for box plots. Defaults to "#2c3e50".
'#2c3e50'
title
str
Plot title.
'Seasonal Diagnostics'
x_lab
str
Axis labels.
''
y_lab
str
Axis labels.
''
width
int
Figure dimensions in pixels. Height defaults to a sensible value based on the number of facets.
None
height
int
Figure dimensions in pixels. Height defaults to a sensible value based on the number of facets.
None
plotly_dropdown
bool
When True and facet combinations exist, render a dropdown to switch between them.
False
plotly_dropdown_x
float
Dropdown position (only used when plotly_dropdown is True).
1.05
plotly_dropdown_y
float
Dropdown position (only used when plotly_dropdown is True).
1.05
Returns
Name
Type
Description
plotly.graph_objects.Figure
Figure containing one subplot per seasonal feature for each facet.