Music listener statistics: last.fm’s last.year as an R package

I’ll exclude the artist “Die drei ???” as it’s a kids detective story from Germany I listen to a lot and which’s albums are split into 1 minute tracks, that really screws up my statistic.View(data$albumstats( sort_by="by_album_count", # album track plays / nr tracks on album exclude_artist="Die drei ???", # exclude my audio book favorite exclude_album=c(""), # exclude tracks without album name min_tracks=5) # have minimum 5 tracks on the album (NO EPs))The result looks like that:Album statistics of 2018 of zappingsebThe statistic shows n the number of plays, count the number of tracks on the album and count_by_track=n/count .The top 5 albums you can find here:Hackney Collery Band — SharpenerMr Jukes — God firstElectro Deluxe — CircleTom Misch — GeographyBilderbuch — Magic LifeAdditionally to such calculations, I was also interested in when I was listening to music..Therefore I added some plots to the package..The first one is the listening clock:data$clock.plot()Clock plot for my music historyMy most important statistic though, is which time of the year I spent listening to music..I’m most interested in some specific days and an average play/month, that can tell me in which mood I was in..Therefore I created the function daily_month_plot ..It plots the average plays per month and the daily plays in one plot..The average plays per month are visualized behind the daily spikes..Here you can see that February was a really quite month for me.data$daily_month_plot()For some simple statistics, I also included an aggregation plotting function called barplots ..It can plot aggregations per weekday, week, month or day..The data for this function is provided by the function bar_data .data$barplots("weekdays")weekly (starting with week 52 of 2017):data$barplots(“week”)Where I can clearly see that I was not really listening to a lot of music during the beginning of the year and my listening activity increased dramatically by week 18.This post is a bit out of my spectrum, which mostly deals with packages about R packages being useful for Pharma..But I really like music and think music and data science make a good combination..Sound’s great together!. More details

Leave a Reply