jwjacobson / jazztunes

a jazz repertoire management app
https://jazztunes.org
GNU General Public License v3.0
3 stars 1 forks source link

Tune analytics concept #241

Open jwjacobson opened 7 months ago

jwjacobson commented 7 months ago

Right now each RepertoireTune stores last_played, which is useful for making sure you don't go too long without playing a tune. Each time a tune is "played," the value of last_played is overwritten.

But what if I want to see what tunes I play most often over a given span of time? For example, last night I played Dewey Square and Green Dolphin St. I've been practicing the former regularly to master the melody, whereas I hadn't played the latter in some time. If you look at the two of them now in my account, you wouldn't know the difference; both have a last_played of March 6. I've already added a play_count field which increments by 1, but the other nice thing would be to track when each play occurred.

The most intuitive way to me to implement this would be with an ArrayField called plays. A play is simply the date or datetime when the tune is played, and is appended to the array. last_played becomes a derived field, plays[-1].

This would then allow various visualizations over time (Bob has written an article on using Chart.js), seeing which tunes you play most often, or representations of different sets of tunes.