memoryfm.weighted_attachment_plot#
- memoryfm.weighted_attachment_plot(sclog, by='track', freq='D', year=None, alpha=1, window='7D', color='orange', rollingcolor='red')#
Plot Attachment and Weighted Attachment Indices.
- Parameters:
- sclogScrobbleLog
a memoryfm ScrobbleLog
- bytrack, artist, album, default track
The field to use for calculating the weighted Attachment Index.
- freqstr, pd.Period, default D
The time frequency to use for the weighted attachment index. For instance, “3D” means a attachment index is calculated once for every 3 days. For a full description, see pandas period aliases
- yearint, Optional
The year to use for filtering. If
Noneor not passed, no filtering is done.- alphanp.float64, default 1
A positive floating point value, representing the order of Attachment Index.
- windowstr, pd.Period, default 7D
The window for rolling averages. For full description, see pandas period aliases
- colorstr, default orange
The color of the weighted attachment line plot.
- rollingcolorstr, default red
The color of the rolling averages plot.
- Returns:
- go.Figure
A plotly Figure containing the weighted attachment index and rolling averages plots.