Visual rhythms (part II): types of rhythm

Back on December 31st, I explored rhythm and what it does for our audiences or users, drawing on inspiration from the master of rhythm and her quintessential rhythmic work, Gwendolyn Brooks.

Also, I promised y'all a part II where we explore the different kinds of rhythm. Then my newborn son got colic, and the only rhythm I was experiencing was his cries for hours and hours. Also, I got pretty invested in a series of Marvel comics vizzes (Star Lord, Storm, Ant-Man, Luke Cage, and Daredevil).

So it's late, but I'm finally delivering on my promise: here's at look at regular rhythm, alternating rhythm, progressing rhythm, and random rhythm -- and how we can use those in data viz.

Before we jump into that, note that visual rhythm is one of the core principles of design. Being aware of rhythm is a critical concept in graphic design. Recognizing the different types and making careful decisions on which to use helps you guide your users and audience through the story by anchoring them and controlling their pace. It's not just something that happens -- it's something that good designers carefully choose to employ.

Also, if your work entails predictions and forecasting, rhythm is the basis for your work. Rhythm is predictable, and the various types of rhythm help you understand what variables to include.

And in data viz, we emphasize a story about the rhythm in the data with rhythm in our design.

Highlighting predictable patterns with regular rhythm 

Every weekend, weekly retail sales will peak. Every Black Friday stores will see a massive spike in sales. Every holiday season, retail sales will elevate to a new plateau of normalcy for a couple months. 

In temperate climates, every winter the temperature will drop and every summer the temperature will increase. 

These are all examples of regular rhythm in data. Predictable patterns that allow us to make staffing decisions ("seasonal" employees) and more efficiently handle volumes. 

In fact, regular rhythm is the entire basis for parametric statistical predictions and forecasting.

Visualizing these examples may not seem interesting -- don't bring a chart depicting one of the above trends and expect it to be insightful.  

But there are less obvious forms of rhythm: for example, did you know fast food restaurant sales peak in April? April and May mark the delivery of tax return checks. For many low income people, eating at a restaurant is typically an unaffordable luxury, and so tax returns become a way to treat your family. It was substantial enough that it ended up being a variable in our forecasting model.

Or this viz I submitted for #ProjectHealthViz on US births. 



I work in healthcare, so I knew this pattern existed -- but I didn't realize the magnitude. Highlighting this rhythm really brings out a story: the US has a known and serious problem with inductions, which are associated with poorer outcomes for the mother and child (although they are sometimes medically necessary, like in my son's birth, when waiting for natural birth would be dangerous). 

I highlighted the trend by simply plotting these points around a circle, with the distance from the center point representing the volume of births on a given day. I chose a circle because that's a good visual representation of our concept of time, and it creates a natural rhythm. Add in a bit of copy (design jargon for the text and annotations) and you've got a story about rhythm in the data, emphasized with the rhythm in the design.

Highlighting complexities and nuance with alternating rhythm

I'm actually not a big fan of alternating rhythm as its own idea, simply because one could (and I do) make an argument that it's just a zoomed out version of regular rhythm. The core idea is that when a reader / user / audience expects a regular rhythm, but then it diverges -- but this divergence is also a predictable pattern. 

To carry on our retail example: sales increase every weekend, but grocery stores often have an exaggerated peak the first of every month when government assistance is distributed. Highest weekend peak, then three regular weekend peaks, repeat. 

Again, one could just say this is all regular rhythm with a sort of rhyme scheme of ABCBCBC, ABCBCBC. 

If you refer back up to the viz above, you can see particular alterations in the rhythm around the holidays: apparently no one wants to induce delivery on Christmas, New Year's, or Halloween (although I think a Halloween birth would be awesome, there's a ton of horror movies that warn of a problematic childhood full of supernatural events). 

The core idea is alternating rhythm is really just highlighting nuances of regular rhythm. 

Highlighting fundamental changes with progressing rhythm

We're going to talk about progressing rhythm through the statistical concept of the data generating process, which is a fancy way of describing the mechanism that actually creates the data point. For example, Malaria infections. Data on total Malaria infections is generated when people are bitten by a mosquito carrying Malaria. This data generating process has a natural, regular rhythm in line with the mosquito life cycle -- there are peaks in "mosquito" season when they all mature and feed. 

So we would expect a natural bump in the volume of infections every year, which we can see in this viz I made for #MakeoverMonday. However, we also see progression: 


The rhythm is changing -- the bump gets smaller each year. There was a core change to the data generating process, or rather, an interruption: mosquito nets. 

This is really important in looking at whether or not operational changes are having an effect within cyclical measures. Back to our retail example: imagine an executive tries hiring more staff, or new marketing. How do we know if it works? We can't just look for spikes, because those already exist. We need to compare the peaks and valleys to look for key changes in the data generating process. To emphasize that story, we design with progressing rhythm. 

Highlighting divergence (and similarity) with random rhythm

Sometimes we want to highlight the way things are different. Not just the differences, but the way the data generating process creates something different. In our retail example, maybe we want to illustrate the way weather can cause daily sales to diverge (something we found important enough to include in a retail sales forecasting model). The story there wasn't the differences, it was the way things were different.

Critically, on the flip side, we're also showing core patterns of similarities: what doesn't change? What volume of sales can be expected regardless of weather?

Here's another example. Spotify has an algorithm to describe music, an algorithm that is successful as judged by their ability to predict music people will like. So, we can visualize the "shape" of these songs to show the way songs can be different. And in this viz on Star Lord's Awesome Mixes, I highlight those differences to extract the exact opposite: what doesn't change? What are the consistent attributes that quality a song to end up on Star Lord's awesome mixtapes?


First, I'd like to note that Kevin Flerlage's (@FlerlageKevno-polygon method is great for this, because it allows us to create a framework for the "shape" of something. We can easily see divergences here: the songs on Star Lord's Awesome Mixes diverge in acoutsticness, instrumentalness, speechiness, and liveness.

But what's core here? What doesn't change? It's valence, energy, and danceability. We could conceivably use this to predict a list of songs that could feasibly on Star Lord's third Awesome Mix.

This rhythm concept is "random" rhythm. Note that this use of random isn't the same as the statistical definition of randomness. I would prefer the term "variance" rhythm, but the design world isn't exactly checking their vocabulary against a statistical glossary of terms.

The main idea here is that there is a general pattern that's repeated, but there are fluctuations in that pattern. In statistical modeling, we include variables to "capture" that variance to explain more of the data generating process. It's not actually randomness we're showing, but predictable variance. Having said that, we use random rhythm as a technique to identify the patterns in that variance, or the way things differ.

Know your rhythms to be a better visual artist and analyst

So the types of rhythm I've highlighted can be used to highlight the rhythms in our data, and can create a story about the data generating process. This means that rhythm design choices can describe the way the world works -- and if we can do that, we can begin to predict things.

But, to get to that point, we've got to understand and tell the story. Understanding the rhythms in your data generating process is like understanding the characters, setting, genre and plot of your story. You've got a bunch of characters that will behave in line with their personalities when in certain situations, which will culminate in a predictable pattern.

Once we've understood the story, we tell it through patterns, or rhythms, in our designs. And certain rhythms in the data align to certain types of design rhythm -- so knowing these, and executing them properly, is a key to unlocking the story behind your data. And if we make the right design choices, we create something that tells the story and is aesthetically pleasing and engaging -- much like a poem describes complex, abstract ideas while welcoming the reader with pleasing phrases and rhymes.

Popular Posts