Curing the fever
A data viz makeover featuring cowbell usage in rock and pop music.

I saw this plot pop up on Bluesky, checked out the source data, and wondered if I could do something different. My immediate thought was - "plot the data in the shape of a cowbell". Actually, that's not true, my immediate thought was - "how up to date is this data?" And I checked it, and immediately submitted two more songs that definitely have cowbell, and were not on the list. Then, I began to think of different ways of plotting the data, and that's when I thought it would be cool to have the plot in the shape of the instrument itself. The problem with that idea was that I had no idea how to achieve that, the mathematics of that would be beyond me.
First, for those that don't know, I'm not referring to literal cow bells, which I imagine are genuinely small bells hung somewhere on a cow, or, more likely, a herd of cows. (Yes, I'm imagining the kids TV series "Heidi". God I'm old). The other childhood memory of cowbells was watching downhill skiing on TV on Sunday evenings, where the spectators would happily clang away as suicidal skiists** would go flying down the hill at ridiculous speeds.
But I'm a (failed former) drummer, and cowbells only mean one thing to me. A brick sized lump of metal, narrow at one end, opening up to a roundish, rectangular-ish funnel at the other, which you hit with your stick, instead of hitting the hi-hats or ride cymbals. Why? Because it sounds ace, it cuts through EVERYTHING, and it immediately adds funky sass to your sick beats. Even if you're playing metal. Cowbells = awesome, it's an inescapable fact.
I'm frankly disgusted with myself, but I turned to AI (Claude) for help with the maths. First of all, I described what I wanted, or at least I tried to, but it had already gone off, read in the data and made a descending bar chart (with axis labels and labelled bars, a data-viz no-no, but never mind).
So I told it to "hang on, let me finish, I want it in the shape of a cowbell", and it produced what looked more like a christmas tree than a cowbell. Eventually, I found a stock image, got it to read that in, work out the co-ordinates, plot the outline, and then begin plotting the points.
I wanted to say I felt like Tony Stark telling JARVIS what colour to paint my Iron Man suit while rocketing around my basement. (The first time I watched that movie, I wished I had JARVIS so I could Tony Stark the sh*t out of ggplot2). But in truth, I just wanted to set fire to my laptop.
Eventually, I had a plot I was happy with, and then created a version on a dark background, because if there's one thing I've learned, people love brightly coloured dots on a dark background:

So that's that, that kept me entertained for an evening.
The R code it generated was way beyond me, fully base R, really intensive maths stuff. Not for the faint-hearted, and certainly not something I would have come up with myself. I then pointed in the direction of the most excellent Georgios Karamanis, soecifically his recent Tidy Tuesday "frog plot" to see what could be learned or adopted. Claude did say that Georgios had a better, more easily maintainable approach, but I'm not sure how much it changed it's own approach as a result.
I'm going to try and get some sort of wrapper function set up so that in theory, any old image can be read in and plotted (I was able to plot the cowbell data on the frog shape, for instance, so it appears to work) but it's not exactly important stuff.
But while I'm happy to admit the maths and associate code were beyond me, I still had an important part to play. It was my idea to add the elipsis shape to give the open end of the cowbell a "mouth" to make the whole thing more lifelike. Its first attempt at colouring used what appeared to be a viridis scale, but with a really narrow range of barely discernible colours. The first attempt by AI was a bar chart, and the next was a tree. It's original title and subtitle were bland, to say the least. It was my idea to colour code the title, and split the legend so that it only showed the numbers for 4 songs or less (it was taking up too much space otherwise). In all, this first attempt at working with AI for data visualisation showed me that it has it's place, especially for the boring / heavy computation stuff, but humans still have a place. For now.
** I know that's not a word. I don't care