Density — Merchant Density

Postmates
Postmates
5 min readFeb 3, 2020

--

Click here for more info on this project.

The Closest Burrito

We’ve already compared the density of our Postmates as they are completing deliveries throughout a day in two different markets. In this case, we want to look at how far does food need to travel to get to our customers. In other words, how densely distributed are our merchants.

Postmates doesn’t have hours. Any time you open the app, we’ll show you what you can order from and a Postmate will always be available to get anything you need. As you can imagine, what is available throughout the day will change, what shops are open will change, and so maybe the thing you want will need to travel farther than normal depending on the time.

Let’s look at how far orders need to travel to get to customers in two different markets, Los Angeles and New York.

This is super interesting to me. It’s very clear that each market has a natural distance that things tend to travel to get to the person that requested them. There’s only a brief window of time every day when that distance moves away from that center. It makes sense that things in NYC don’t travel as far as they do in LA.

You can also see that during the late night hours (right around midnight), we see the distances get very erratic. In LA we generally see late night deliveries increase in distance, which makes sense, since fewer places will be open, so the odds of the thing a given customer wants being close to them go down. In NYC that seems true as well for the most part, but it fluctuates in both directions. I don’t think that’s anything special about NYC, it just shows that when we aren’t in the normal waking hours things become less predictable.

Active Postmates

While we’re looking at how far things are travelling to customers, let’s also look at the Postmates that are moving these things. Here’s how many active Postmates we see in these markets in this same period of time:

Values have been normalized so that each market’s max value is the same, we’re really just trying to capture the shape of each market, not the size. Also both series are in local time.

A few things stick out to me. First, it’s pretty wild how extremely different this chart is compared to the previous one. Both of these are sampled hourly, and we really only see anywhere between 1–3 hours in a day really deviating from the average. Looking at the number of Postmates on the other hand, there’s a massive range in the shape of when Postmates are completing deliveries. That strengthens the idea that each market has kind of a “natural” expected distance between merchants and customers.

Another thing that I see here is that we see more active Postmates during the week at lunch in LA than in NYC. It’s interesting how similar the shapes are, and how they move together. There are distinct lunch and dinner peaks in both markets during the week, on Saturday we see less of a dip between lunch and dinner, and even less of a dip on Sundays in both markets. This means that Postmates are staying online more consistently on Sundays compared to any other day.

What You’re Hearing

We’ve got two tracks here, both with the same synth sound. You’re hearing a note for each hour in a week.

  • The pitch is determined by the average distance traveled between merchant and customer in each hour, arranged so it’s only hitting notes in C Major (to my ear it sounds more like D Dorian since the note in the bass, NYC, stays on D for so much of the piece).
  • The volume is determined by the number of active Postmates in each hour, normalized so that each market’s max is the peak volume of the instrument (again, I’m using this for the shape, not the scale).

NYC gravitates towards D in the bass, and LA dances around F and G an octave above. It makes some very pleasant sounding harmonies. I didn’t tweak the scale between them to make that happen either, it arose out of just normalizing everything to fit within the four-octave range that I chose.

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.

This piece required two MIDI files, one per market, and the data populated the pitch and velocity values of each note. No Control Change values to worry about here. I put in a bit of a buffer between the note_off of one note and the note_on of the next note, and since this data was sampled hourly everything is a constant number of ticks between notes, so it’s not hard to insert a small rest between notes.

Once the MIDI files are made, I brought them into REAPER, and set up each one with an instance of Analog Strings by Output with an identical patch I created. That’s it. No mapping of anything required since we’re only dealing with pitches and velocities.

Conclusion

It always sounds great in PR blasts when a company can say “we’ve got X million places on our platform!” But in reality that number can’t possibly be static. As we can see here, what’s available to customers at any given moment changes, and sometimes our Postmates are going to have to travel a bit further to get the thing you want.

I knew that deliveries in NYC weren’t going to travel as far as they do in LA, but I wasn’t expecting it to be so consistent. And I wasn’t expecting it to sound so nice, that was a pleasant surprise.

Postmates really is a network of living 24/7 marketplaces more than it’s a menu of stuff to get. Each market will have its own normal conditions, but things shift constantly.

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/