Metallica tour history with R and PowerBI
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Just a short post about some fun I’ve been having building a PowerBI app(?) that displays Metallica’s entire tour history. It is completely up to date (until they start playing again in the next few weeks).
I used R for retrieving the data, but also figured out how to iterate over web pages via Power Query.
I also used R to insert the data into a SQL Server database and for lots of other data wrangling.
In time, I may consider setting this all up in duckdb instead.
Home screen
I’m not getting into the Cliff/ Jason / Rob debate, so don’t draw too many conclusions from the choice of band pictures.
Throughout all this, I used a newly modified version of my custom Metallica powerbi palette.
You can find it here pbithemes.
Wherever They May Roam
Well, what else was I going to call this bit? Locations of every gig, by country, city, continent, go ahead, zoom around on the map.
Biggest revelation – they’ve played somewhere else in Scotland besides Edinburgh and Glasgow. (In Ayr, to be precise, a loooong time ago).
Saddest – they haven’t played Inverness. C’mon Lars, get a move on.
Eras
Taylor who?
The only eras I care about are Cliff / Jason / Rob.
I thought about
Thrashtallica : KEA, RTL and Puppets
Progtallica : AJFA
Metallica : Metallica
Rocktallica : Load & Reload
WTF-is-that-snare-tallica : St. Anger
Back-on-track-tallica : DM, Hardwired and 72 Seasons
but..couldn’t be bothered in the end. (I do have a soft spot for Rocktallica though).
Support acts
This covers both them as support, and as headliners. I’m not too familiar with Corrosion of Conformity, but they must have been doing something right. Amazing to see the criminally underrated Cult high up there too.
Tracks
Most played tracks? That would be Master of Puppets, then Seek and Destroy. However, I need to modify this to account for the year of release. That’s going to test my DAX skills.
Most frequent show opener? That would be Blackened, followed by Creeping Death
Setlists
Every setlist, for every gig.
I have glossed over the data acquisition bit, which was definitely the most time consuming, but getting this was by far the worst.
Thankfully, purrr exists.
Not so thankfully, I made a mistake and absent mindedly used purrr::walk
when I should have used purrr::map
.
This meant I did a lot of iteration with nothing to show for it.
You’d have to be a right eejit to do that more than once, which is why I’m not telling you how many times I did it.
Ahem.
If you ever wanted to know the 7th song on their 342nd gig, I’m your man.
(Pedants, please note, that setlist is not from their 342nd gig).
The futre
It shouldn’t be too hard to keep all this up to date now,(I hope that a once yearly pull will gather all the info I need), but I do need to go back and write some more DAX to tidy up these visuals, and to make the “most played” more meaningful.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.