I've written a package that allows you to connect with the last.fm API. With last.fm you can track which music you listen to. Through the API you can retrieve some cool statistics.
Checkout https://github.com/barryvanveen/lastfm for the full readme and more examples.