Statistics in ListenBrainz

Visualization of data submitted to ListenBrainz is a big feature that will probably make it much more popular among users.
With this in mind, we should try to show lots of pretty stats that users find interesting. I am soliciting more ideas on graphs that we could add and some feedback on the idea of using plotly.js for these graphs. Plotly.js is an MIT licensed charting library based on d3.js which draws interactive graphs of all types. Link: If anyone has any better suggestions for charting libraries, please help out!

Here is what I have come up with so far:

Right now, I have divided graphs into three categories:

  • User graphs: graphs which tell the user about her own listening history.
  • Entity graphs: graphs which show details about entities like artists,
  • Miscellaneous graphs: graphs which don’t fit into the above categories, like a sitewide listen-count graph

What graphs should ListenBrainz show

User graphs has three graphs on the user page: top artists, top albums and top tracks. We should also show these graphs with
each graph being a horizontal bar chart showing top 10 (open to suggestions on number here) artists, albums and tracks.

These would look like this: (Please ignore the colors and fonts, this is just a demo). Each of the labels on the y-axis would link to the relevant page on LB, the artist graph linking to the artists, the album graph linking to the albums etc. I have used plotly.js, an open source charting library based off of d3.js to build the demo graphs. In my opinion, plotly should be okay to use to draw graphs on the main site also.

Also, I propose that the graphs on will show only top 10 artists etc and we add the following views to show more detailed graphs:

  • Shows a horizontal bar chart similar to the one on the user page of all artists listened to by the user in some past interval of time (1 month / 1 week)
  • Same as artists but shows top albums
  • Same as artists but shows top tracks

Optional ideas:

  • A top tags pie chart which would show (you guessed it) top tags.
  • daywise listening history: horizontal bar chart which shows frequency of listens by day

Entity graphs

Right now, LB does not have any entity view at all. We add views inspired by CritiqueBrainz artist page, release group page for artists, release-groups etc. all uniquely identified by MBIDs. Then we add the following stats to these pages:

  • Top listeners (all entities): This would not work as a graph imo, I think just a flat list of the top 5 listeners of the entity would be the best thing to show here.
  • Top tracks (artists and release groups): This would be a horizontal bar chart with number of listens sitewide on the x-axis for each track of the particular entity. For artist pages it will link to a view which would contain a bigger bar chart with top 100 or so tracks of the artist. For release-groups, there does not need to be a different view because most release groups
    will have 10-20 tracks at most.
  • Top releases (artists): This would be a graph on the artist page, showing her top releases in a bar chart.

Miscellaneous graphs

The front page is currently being used to describe the goals of listenbrainz and I think we should not clutter it up.

We should add a different view, maybe which should show the following graph:

  • Cumulative number of listens submitted sitewide over time. This graph would look like this:

  • Top entities: We can show images of top artists and releases listened to. I do not want to show graphs here as I think for sitewide stuff images would look much better in a collage format. For albums, we can use cover art archive for images.

Any suggestions or new ideas would be greatly appreciated!


The kind of user graph I like is like LastWave (it’s not necessarily the original one but the one I found right now).


I would like to see something like “time listened: (at least*) 3 years, 2 days, 5 minutes [*: link to document describing inaccuracy]”. This could be calculated based on Recording lengths in the listen history and could also be calculated per-Artist, per-User-per-Artist, per-Recording, per-Track, per-User-per-Release, etc. Last.FM doesn’t really have this data AFAIK, so this would also be an interesting stat to set LB apart from them, instead of only copying what they have/can. :slight_smile:

Another thing might be a “folksonomy tag cloud” or statistic (maybe an over time one?)? does have tags, but unless I’ve missed something, you have rely on 3rd party services to look over your data to make such genre analysis. This could also be nice to have directly in LB.


Haha, the lastwave graph seems a little too flashy to me but I love the time listened stat that @Freso mentioned. I don’t know how easily doable it will be though because we will probably need to query the MusicBrainz db to get recording lengths for each track while in stuff like top artists by listens we can just use the data sent to us by the user that we’ve sent to BigQuery.

The genre analysis stuff was definitely on my mind also, because has very little in that way. I don’t know how many people scrobble tags but I think a genre tag would be definitely cool.

There are other graphs that we can make also: like the graph that moody made of moods of people based on listen history, a scatter graph of when artists listened to by the user started making music etc. But I’m not sure if working on this before we have the more basic graphs in LB is a good idea.

1 Like

Beyond the flashy colours of last wave (you can also have it dark and monochromatic), what it shows could be the most important stuff when you like to scrobble (what I do not do that much nowadays): It is about showing what artist you listen to, then what, then what, then what… the evolution with time and in what volume and at the same time of what and before what and after what. :blush:

I just went and tried to look up an “old” article I read about a guy who did some analysis of his own listening history (this is at least one of the places I have the “time listened” idea from). I found some another site/article that may have some ideas:

@Rob has previously talked about wanting more social features around MusicBrainz Events, and the “For Concert-Goers” section seems perfect for this.

(I didn’t succeed at locating the blog post I was looking for though. :frowning: If anyone has a clue what I’m talking about, please let me know—or just post it here.)

Edit: @SothoTalKer found the blog post!

1 Like

Indeed, these kind of graph (StreamGraph IIRC) are really neat.

I can recall of this floss implementation

Looks like D3 is currently supporting streamgraph as well.


A couple of suggestions:

  • Have the top arists/albums/tracks graphs be time weighted, not playcount weighted. If I listen to a three-minute track twice, that shouldn’t be twice as large a single listen to an hour long track. (Instead, it should be a tenth the size).
  • Graphs for works, not just albums. For Classical, that’s a much more natural boundary than album or track, as its the boundary chosen by the composer. It’d be really nice if that could chase up the work tree (the “part of” relationship), and understand that playing all four movements of the symphony (typically four or more tracks) is only one play of the work. (Though if you do time-weighted, this doesn’t matter).
  • Graphs for composers & performers, not just the track or album artist.

Another big thing: comparison over time. Things like how this week/month has compared to last or to “typical”; how a artists time-listened varied over the last X years, etc. These would be nice both personally (“how much more have I listened to Elgar this month?”) and site-wide (“when did so-and-so get popular?”). I personally find things like this the most interesting. I mean, I mostly know what I listened to this week… two years ago, I don’t remember!