Demand — Stereo Location

Postmates
Postmates

--

Click here for more info on this project.

Averages

Averages are strange things. You’ll often hear statistics-minded people say that averages are dangerous since they can paint an incorrect picture when describing a group. Maybe you’ve heard the example of calculating the average net worth of a group of 100 people when one of them is Bill Gates (or Jeff Bezos). If 99 of those people had a net worth of $50k each, and one of them had a net worth of $160 billion, the average net worth of that room is about $1.6 billion. Would you say that accurately describes the group? No way. That’s an extreme case of when looking at the median would probably make more sense (which would be $50k).

That was the thought I had when I came up with the idea for this particular sonification: what’s an example in our data where taking the average is kind of meaningless? Latitudes and longitudes are numbers, let’s average them and see where the “average” delivery happens.

Taking it one step further, what would it sound like if we took the average longitude of deliveries every minute, and tracked that to the stereo pan of a sound? Would we be able to hear the movement of where our deliveries are concentrated over time?

Let’s see what that data looks like.

Stereo Tug of War

This is kind of an unusual graph to think about, imagine that we’ve got two people playing tug-of-war, and what we’re looking at is the center of the rope being pulled back and forth over the course of a week.

You see that in the early mornings (6am Pacific, 9am Eastern), the line gets yanked East, since they hit breakfast while the West Coast is still waking up.

Then as the West Coast starts getting hungry in the morning we see the line getting pulled quickly towards the West. Not for long though, that pull gets slowed when the East Coast hits lunch. We then enter the afternoon on the East Coast as the West Coast starts getting lunch, and then we finally see the line move back over to their side.

But the East Coast isn’t done yet, when they hit dinner, we get pulled back East. As the day winds down on the East Coast and the West Coast gets to dinnertime, the line moves rapidly West and stays there until the day is over, and then we start the whole tug-of-war over again the next morning.

This is only half the picture though. Sure we can see where the center of this imaginary rope is moving, but we don’t get a sense of how hard each side is pulling. Tug-of-war is all about balance, sure the rope could be moving quickly one direction, but that could be due to one side pulling extra hard, or the other side not pulling at all.

The Notes

Since all we’ve accounted for before this point is where the sound is coming from in the stereo field, we need to actually hear some notes that will be panning according to the data. In this case I’ve attached the pitch to the average price of deliveries, and the intensity of how hard the note is struck to the number of deliveries, both grouped into 30 minute windows. In this case, I locked everything to be in the key of C.

The number of deliveries (how hard each note is struck) represents the strength of the total amount of force being exerted by each of our imaginary tug-of-war participants.

What You’re Hearing

In the mornings, when the sound is panned the hardest to the right, we actually aren’t hearing very loud notes at all since our delivery volume is relatively low at that time. You can hear the push and pull between lunch and dinner on both coasts more clearly since those coincide with our delivery volume peaks.

Interestingly, the amount that customers are spending on average tracks pretty closely with our overall demand throughout the day. That’s not too surprising, in the morning people are more likely to be ordering coffee, people spend more on lunch, and even more on dinner. You can imagine that the mix of people ordering those meals combined with when they’re likely to be snacking would lead to the shape you see here.

How it Works

I made a simplified tutorial on how to create these from start to finish. Check out the Colab notebook if you want to make one yourself.

In this case, I made two separate MIDI files, one that controls the stereo pan with MIDI Control Change data in 1 minute buckets, and one that sets the pitches and velocities in 30 minute buckets. The panning data was scaled so that the longitude of LA was 0 and the longitude of NYC was 127.

Why different intervals between the different files? I wanted the movement of the stereo location to be as smooth as possible, so the fact that it’s sampled more often means that it has a higher resolution in terms of its movement. The files are set so that they occupy the exact same length of time, ie: every 30 updates of the stereo location that pass, 1 note will be played.

From there, I took the MIDI file and loaded it into my favorite digital audio workstation (DAW), REAPER. I loaded up an awesome sample library from Spitfire Audio, one that has an amazingly sampled solo string section. What you’re hearing is actually the combination of a cello, viola, and violin.

Depending on what instruments that are used, the notes need to be scaled accordingly. In this case they go from the absolute lowest note in the cello to the absolute highest note in the violin in the pizzicato patch in my sample libraries.

The last step is to set up the panning data to control my stereo pan fader. Done!

Conclusion

Knowing the average location of where deliveries are happening isn’t actually super useful. I can’t think of any impact that this knowledge is going to have on Postmates as a business. But as it turns out it sounds really cool. It’s more subtle than I was expecting, but it feels very organic.

It also makes me think about how any one person’s behavior is impossible to predict, but when you look at an entire country of people, their aggregate behavior has very clear patterns. And really the biggest reason that we see this pattern is just because the US covers a lot of longitude. This really is all the same behavior just spread out over such a great distance that it makes very unique waves of hunger.

Postmates is always looking for creative data-focused people to join our team. If you want to make things like this, check out https://careers.postmates.com/ and say that Alex sent you.

--

--

Postmates
Postmates

On-demand delivery from every restaurant & store in your city. Customer support: @Postmates_Help. Download here: https://postmates.com/