Demand — LA vs NYC

Postmates
Postmates
5 min readFeb 3, 2020

--

Click here for more info on this project.

Comparisons

People love to compare the differences between New York City and Los Angeles. Weather, traffic, public transit, high rents, whether or not it’s as cool as it used to be, tacos, pizza, french dips, bagels, the list goes on.

Naturally, I wanted to see how New York City and Los Angeles compared when looking at the distribution of delivery volume throughout a week. Here’s what the chart looks like for the same data you just heard:

What you’re seeing is the distribution of deliveries over 30-minute intervals of a 7-day period. Both markets are normalized so their highest and lowest values are the same.

Everything is set to Pacific time, making the timezone difference immediately apparent, NYC sees its peaks about 3 hours before LA does. Not in all cases though; the peaks on Sunday evening are the 6:00pm-6:30pm Pacific bucket for LA, and the 6:30pm-7:00pm Eastern bucket for NYC.

The peak on Sunday for NYC is also more pronounced than LA, which is a bit more evenly distributed.

How long or short the note is played is determined by the average dollar amount spent on items delivered in the same buckets as above:

What You’re Hearing

I wanted to play around with dynamics, since there appears to be a pretty interesting pattern that I thought would sound great:

  • Monday is medium
  • Tuesday gets very quiet
  • Wednesday slightly louder
  • Thursday slightly louder
  • Friday louder still
  • Saturday holds steady
  • Sunday climaxes at the loudest

I wrote a 7-chord progression that builds tension more and more as it goes on. The goal was to get a sense of how far along in the week we are based on how much tension is in a given chord.

Stop me if this gets boring, but this is a blog post and you literally can’t do that, this is already written. Here are the chords that each instrument will be arpeggiating (basically):

  • Monday — C minor
  • Tuesday — G Dominant 7 (root note is D)
  • Wednesday — C minor (root note is Eb)
  • Thursday — C Major (root note is E)
  • Friday — F minor
  • Saturday — German Augmented 6th (gotta put that music theory education to work)
  • Sunday — G Dominant 7

That’s the part that a human wrote. Imagine you’re a performer and you just got these notes on a page without any other direction. You still need to decide the dynamics of each note, and how they flow into each other. That’s the part that the data will be performing.

Each note represents a 30-minute bucket. Each arpeggio is 6 notes. So going through one arpeggio represents 3 hours. Each arpeggio is repeated 8 times to cover 1 day, and we’re hearing 8 days so that the piece ends on the root chord to give it a nice resolution.

The data in that first chart (distribution of deliveries) determines how hard each note is struck. The data in the second chart (avg basket size) determines how long each note is held. Meaning, lower basket sizes will be very abrupt staccato notes, and higher basket sizes will flow into each other.

New York City is playing the Cello and is panned to the right, Los Angeles is playing the Violin and is panned to the left.

Listen for the peaks happening in NYC exactly 1 arpeggio before they happen in LA. That makes sense since 1 arpeggio represents 3 hours, which is also the time difference between NYC and LA.

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 there were two separate datasets for each market, four in total. One for the distribution of deliveries every 30 minutes, and one for the average basket size of goods purchased in 30 minute buckets, for both LA and NYC.

With that I built two MIDI files for each market:

Notes

  • How hard the string is struck (velocity) is determined by how many deliveries happened in each bucket
  • Normalized so that the peak is the maximum velocity value and the lowest point is the minimum velocity value
  • The actual notes are determined by the arpeggio I wrote

Staccato performance

  • The Control Change (CC) value that controls staccato is determined by the average basket size for each 30 minute bucket
  • More abrupt bowing means lower basket size, when the notes flow into each other more fluidly means higher basket size

Once those MIDI files are done, I loaded them up into a Digital Audio Workstation (DAW). I pasted the CC values into the notes midi files for each respective market, since that was just a lot faster than figuring out how to get them to line up in the same file. Then I loaded up the tracks with a sampler. I used sample libraries created by Spitfire Audio, a violin and cello library, which have the ability to control the staccato bowing via CC information.

The data does all of the performance interpretation of my score.

Conclusion

This one might be my favorite example of how clear it is that we’re dealing with real humans’ behavior. The performance of this is what is being driven by data, and it really does sound like actual people are performing it, because they are. The notes flow together in a way that makes it feel completely organic.

The aggregate hunger of hundreds of thousands of different humans make for pretty decent string players.

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/