Sunny Balasubramanian

Logo


Current quantitative researcher in the crypto & equities space. Formerly at Citadel, AQR, Columbia SEAS '16. Always cracking away at new (sometimes whimsical) problems using different kinds of technology. Please reach out to me at sunny.m.bala@gmail.com if you'd like to chat about any of my prior work or would like to hack on something together. LinkedIn | GitHub

A Random Walk Through Manhattan

by

jump to code

At the time of writing this, we’re currently under stay at home orders in observation of the Covid-19 pandemic. Taking those nice long walks around Manhattan at this time is ill-advised, but how about a digital one? In particular, here I’ll explore how to generate random walks within a map network.

What would happen if every time you walked up to an intersection you just turned in a random direction? Here’s one run of the simulation. Like real people, the random walk gets pretty lost in the dense streets of lower Manhattan. If you’re interested in generating one of these for yourself or just seeing the code, feel free to follow along with the jupyter notebook via my GitHub. Making this was so much easier with the amazing osmnx module, which allows you to grab map networks from OpenStreetMap.