Introduction to the Timespace Map of New York

[2017-12-07: This has been updated in a big way.]

This summer I lived in New York for the first time, working for Venmo. Venmo’s offices are in the West Village, and I lived in Park Slope, so every day I would take the F train. As I was getting to know the city I would often look at this map:


Looking at that map every day got me thinking that so much of the geography of the city was defined by its public transit infrastructure, not by the lay of the land. What determined if two points were practically far or close depended not on how many miles separated them, or natural features like rivers that may lay between them, but whether or not it was easy to get from one place to the other on public transit.

I started thinking about how we could make a new map of New York, where distances between points on the map would reflect how long it took to get between them, not how far apart they were. It would project time onto the two-dimensional space of the map.

Without knowing how I would do that, I started collecting data. I took the 195 neighborhood tabulation areas of New York, geocoded them into Lat/Long pairs, and started hitting Google’s Directions API for each of the pairs of neighborhoods to see how long the transit route between them took. After doing this over many days in batches (because Google limits how many directions you can ask for any given day), I had a distance matrix that looked like this:


Screenshot 2015-09-05 15.20.20


With the cells being the time (in seconds) it took to get between the two locations.

Next, I needed to figure out how to lay out these points in a two-dimensional space that reflected these distances in time. Turns out, this is a common problem in data visualization, and the most common tool is called multidimensional scaling. Running cmdscale (in R) on my distance matrix allowed me to lay out the “neighborhoods” of New York onto a 2d map with distances between them reflecting time.

With just this information, about the best I could do was to create a Voronoi diagram of the points scattered about.



Cool, but we can do better.

I started thinking about these 195 points as a “skeleton” that I could build on. I wanted to project more information onto this map, but I couldn’t just go on adding points to my distance matrix (since the number of entries in the distance matrix goes up with the square of the number of neighborhoods), I had to figure out how to project an arbitrary Lat/Long pair onto this map.

I tried a few things out, but the method I settled on was LOESS regression as it was simple, made few assumptions, and could handle the obvious nonlinearities in the transformation between Lat/Long space and Timespace.

The model was simple (this is the model to predict one axis of the timespace dimension):

model.dim1 <- loess(data =,
formula = dim1 ~ lat + lng,
degree = 2,
span = span)

And the span term allows you to control how much impact the skeleton points have in “pulling” the new Lat/Long points away from their starting point. Here is a gif of different projections of the five boroughs with spans ranging from 0.99 to 0.2: (there a few errors in the borough shapefiles that I’m aware of…)


So what’s next?

Well, now that I have a method of projecting arbitrary Lat/Long pairs onto the “Timespace” dimension, I am working on doing it with other data sources. I’m starting with subways, but plan to add other features like roads, parks, and the like. Stay tuned!

Variations on a theme

Anyone that knows me has probably noticed that over the past year-plus, I have gotten into photography in a major way. But as much as I post photos, I spend about as much time ogling the photos of more talented and able photographers. One thing I noticed is that the best photographers tend to have a very specific style – for Randy Martin, it’s a perfectly centered subject in a larger scene; for Michael Goldberg, it’s close-ups on the street using flash to illuminate his subject’s imperfections; for Nguan, it’s warmly-lit subjects lost in a moment of ennui.

I guess this shouldn’t be too much of a surprise, as variations on a theme are the rule in other forms of art, like music (bands have a sound that cuts across their songs/albums), movies (wes anderson), paintings (dali), etc. I want each photo to stand on its own and be considered in its own right, and I want the ability to take any photo that I think is compelling for whatever reason. But that’s not how it works; your audience (whoever that is and however many people that is) wants something familiar as well as novel and interesting. Perhaps it’s the commonality between your works establishes a common ground with your audience and without a familiar “vocabulary” they would lack the basis to appreciate the work – but I’m just speculating. 

I don’t (yet) have a style. Or at least not one that I’m aware of. Perhaps it takes time to find what you like. Perhaps it takes time to develop the skills that allow you to impose your style on the scene in front of you. I really don’t know! But it’s on my mind this morning.

Capital in the Twenty First Century

I’ll confess I didn’t finish it (audible tells me I made it about three-quarters through). It is, however, a great book, but it does not make for great listening. This one (and it is the first book I’ve thought this about) really should be read on paper.

The central thesis of the book is that the return on capital generally exceeds the rate of economic growth, and when economic growth is slow (as it has been for much of human history) that this leads to a natural tendency for societies to develop extreme inequality.

I’ve long had a “rich-get-richer” argument playing out in my head, but through a slightly different mechanism, which plays out like this: as people get wealthier, their ability to take risk with their capital increases; as this “risk appetite” increases, they are able to devote a more substantial share of their capital to higher-risk assets with a higher expected return; this, then, would lead to a higher overall return to their investments. Think of a person initially holding only cash, then saving up enough money for a down payment on a home, and then to investing their savings in liquid stocks and bonds. Each class of investment (cash, real estate, equities) is riskier and higher-returning than the last, and this sequence leads to an increasing return on increasing capital. Wealthier people are invested in all these asset classes and more, such as hedge funds or privately-held companies.

So it was no surprise to me that there should be runaway effects to wealth inequality. But the rationale Piketty lays out are quite different. I must confess that I did not completely understand the reasons that returns to capital (as a whole, not the varying allocations of capital that I describe above) ought to generally be at a rate faster than economic growth. But the data show convincingly that it is now, and has usually been so. The result is runaway wealth inequality that has only been tempered throughout human history by capital-destroying calamities, such as world wars, that bring people back to an equal footing.

Where Piketty really succeeds, if you ask me, is in linking this argument to the literature describing the extremely stratified societies of, for example, Victorian England. He saying “watch out, these crazy societies could one day be reborn”. I hope he’s wrong, but he’s given ample reason to fear that he might be right.

Review of Lean In

Recently I finished listening to Lean In, which you should probably Google if you don’t already know it. I listened to it as part of a college-friend-audible-book-listening-club, and kept some thoughts about the book as I listened on. Here they are.

If there is one key theme to the book that deserves singling-out, it is the focus on the individual woman as the unit of analysis. Sandberg’s book, when it’s all boiled down, is a entreaty to women, as individuals, to consider a fuller range of career and family options, and gives many “how-tos” regarding how to accomplish some of the tougher options. She is basically saying “You, promising young woman, here is what you have against you and how you can best navigate it”. So although she does pronounce some big goals, such as 50/50 splits in the executive ranks everywhere, her book is emphatically not about what policy needs to do to change things. This is a pragmatic manifesto which aims to give women more tools to confront, as individuals, the institutional sexism that impedes their career progress.

I’m going to get an MBA quite soon, so I’m a sympathetic audience for career-enhancing tips, and I found much of her advice quite applicable as well as useful. Perhaps sadly, though, much of her advice is either not gender specific or only applicable to elites.

Sandberg’s advice can be broken down into two categories: that aimed at helping women more adeptly confront sexist barriers in their professional lives, and that aimed at helping women to make choices that balance their professional and personal lives. For the former, most of this material is, when one really gets down to it, applicable in equal parts for men For example, when outlining the differing negotiating strategies of men and women, the advice that she gives to her female readers is to use tactics that are, in their essence, a subset of the “principled negotiation” methods outlined in Getting to Yes. Men, too, would be well advised to adopt state-of-the-art bargaining methods, not to mention develop relationships with mentors, and to have some thoughts about their future careers.

Although Sandberg is absolutely right to attack the stigma placed on working mothers from all sides (showing, for example, that children with home care from nannies develop just as well and have just as healthy a relationship with their mothers as those raised by full-time moms. I, for one, am one of these children, so I should hope so.), it is just not the case that many women are in a position to consider many of the options that Sandberg urges her audience to feel better about, such as working more flexible hours or having a nanny. Sandberg acknowledges this, and this does not affect the efficacy of her argument; it does, however, limit its scope.

The most powerful part of the book is Sandberg’s entreaty to women not to put their foot on the brakes of their professional lives until they are indeed confronted with hard tradeoffs. The point of the practical portions of the book being, of course, tools to give women a better set of options in these dilemmas.

The book is littered with references to studies and much of its summarized research is quite compelling. Sandberg erred, though, in making her argument for the motivation of the book; namely, that women’s progress infiltrating all strata of professional ranks had stalled. Her data, which were only long-term statistics, only showed that progress was not yet complete, not that it had slowed down. This mishandling of the data led me to approach the rest of her citations with a more skeptical eye.

It’s an interesting book, but far more so for its cultural cache than the material inside.

What I’m looking for at Wharton

After we shut down Building Hero, my career goals were pretty simple: start and launch new products and businesses. My analysis led me to conclude that this happens in essentially two ways: (a) as an independent entrepreneur and (b) as a product manager (or similar role), usually within tech companies – after all, big companies launch new products all the time. After taking as many coffees as possible, putting out a few feelers, I concluded that (b) was going to be a very tough role to land with my background. And for (a), despite working on Building Hero for two years, I never built up a deep network in tech; I explored an idea for about a month but concluded that I didn’t have either a strong idea to build on nor a network in tech to leverage.

I concluded that business school would be a good chance to learn many of the basics of business-building and the product development process, build a great network alongside a world-class cohort of people, and that my degree would provide me with significant reputational capital. In addition – and I didn’t articulate this beforehand – I think the two years at business school will be a great opportunity to create new things with the resources available to students (not least the amazing cohort of fellow classmates).

On August 4th, I’ll start the first of two years getting an MBA at Wharton. One of the pieces of advice they give you when you’re a matriculating MBA student at a school like Wharton is to take some time to really think about what you want to get out of it, because there will be so many potential demands on your time. So as I’m winding down my current job, I’ve started to think about what I want to get out of the whole experience.

Below, I list out the overview of what I want to achieve, broken down into the following categories: academics, community, leadership, personal branding, and finally, some specific plans.


As mentioned, academics are one of the four core reasons I decided business school would be a good choice for me. I actually probably weight academics more strongly than most other matriculating students; I’ve experienced firsthand what it’s like to try and build a business without working mental models, and it was a tough experience in which I usually felt lost. Only late in the experience when I started taking classes on product development and reading more widely on the subject did I realize how lost I truly was.

At any rate, a true accounting of my skills would rate me a bit behind the curve in many basic business categories. I’m most excited about classes on product development, entrepreneurial management, marketing, and leadership – as they relate most directly to my career interests – but I’m also excited to get a basic education in finance, operations management, and accounting. So – the basics.


The greatest value in business school is probably in the cohort. It certainly felt that way when I got to meet my future classmates this past Spring at Welcome Weekend. So it would be a crime not to find ways to maximize that experience.

Clubs are a big part of business school – both in terms of the career development process and the social scene. Career-wise, the Entrepreneurship and Technology clubs align most closely with my goals. I am going to check out the Marketing and Design clubs as well, but as long as my career goals don’t change it’s seems relatively certain that the Entrepreneurship and Tech clubs will get the majority of my attention. Socially, the Photography and Climbing clubs map perfectly to my current outside hobby interests, but who knows what will gel.

In addition, I’d like to find ways to engage with both the Wharton and the Philadelphia communities outside of traditional channels. (There is a specific Wharton-led opportunity in this area that I am super-interested in, though.) My roommate and I discussed creating a sort of lifestyle/community email newsletter that we’d curate. We’ll see about that – but I’d like to get involved in something that isn’t just put out on a platter by the school. Which takes me to…

Starting Something (and “Leadership”)

Leadership really is a separate category, containing elements of specific training, academic learning (i.e. the mechanics of emotional contagion), and, I dunno, just having to be a leader. My career ambitions put me at the top of organizational structures by definition (i.e. I’m not looking to be a hugely successful investor), so this is a very important skill to develop.

There are some specific leadership programs offered by Wharton which I’ll get to below, but my number one goal at Wharton is to start somethingRight now I’m agnostic on what that will be; it could be a new club on campus, a civic organization, a company, or even “just” an event. But this is an important goal to me; at the very least I want the practice of creating something out of nothing, and I don’t want to let a prime time and a litany of resources for doing so go to waste.

Personal Brand

Careers are changing – everyone knows that the days of working for years at a single company or organization are gone. As Reid Hoffman puts it:

Whereas we used to have a career ladder, now we have a career jungle gym. Success in a career is no longer a simple ascension on a path of steps. You need to climb sideways and sometimes down; sometimes you need to swing and jump from one set of bars to the next. And, to extend the metaphor, sometimes you need to spring from the jungle gym and establish your own turf somewhere else on the playground.

The value, then, of a personal brand is paramount, as your environment will constantly be changing throughout your career.

I’ve got two primary goals for my personal brand: (a) build a fantastic network while I’m at the school, and (b) to keep writing and use my blog as a tool to promote myself.

My view is that connections are best formed organically; trying to network has never been my thing, but when you actually have things going on – you’re trying to get an event off the ground, you’re building a company, you’re writing a blog post, etc. – the people that you reach out to to collaborate with often become friends and future collaborators. So I’m not necessarily going to devote time to this specifically, but my hope is that Wharton will provide a fertile environment for my network to grow as a form of “exhaust” from all the other shit I’ll be trying to do.

I realized that I really enjoyed writing, and that the process of writing really helped me distill and structure my thoughts, during the time I was putting together sixteen application essays for business school; these essays dealt with serious topics about my life and future ambitions, and they helped me form a vision for the future. So I love writing on this blog, and at the same time, having a well-articulated point-of-view on relevant topics is a great way to establish credibility with other people. So I’m going to write on this blog more regularly (my goal is to post twice/week) and to promote it more heavily. I have readership and engagement goals, but I won’t share those for now. I may have to establish a more consistent theme, but this is something I’ll worry about later.


In terms of specifics, I will almost certainly look to get an internship in tech over next summer, which most likely means I will be getting involved heavily in the tech club early on. My view at the moment is that this kind of internship will provide me with the most relevant training and the right kind of optionality to either start a company or to gun for a product manager/product marketing manager role after school. I imagine I will be competing with a number of students with similar career goals, so it will make differentiating through personal initiatives all-the-more important.

There are many specific programs that Wharton offers; the ones that I’m interested in mainly fall into “leadership development” and “entrepreneurial resources”. On the leadership side, the programs that interest me the most at the moment are: the Venture Fellows program, possibly because I did a 30-day NOLS mountaineering course, which was one of the most amazing and personal-growth-catalyzing experiences I’ve had; the Non-Profit Board leadership program – I work at in the non-profit space now, and recognize the inherent difficulties of running these organizations well, but at the same time am a huge believer that civic involvement is an important part of a well-led life; and their Executive Coaching program: growing up I played baseball for all of my youth, and had great coaches shape my development; I am excited to see how “coaching” – outside perspectives and regular feedback – works outside of the athletic setting. I see no reason why it should be much different.

On the entrepreneurial resources side, Wharton has a business plan competition, and a “venture initiation program”. It seems clear that at the very least for practice that I should enter the first; the latter, which is geared around providing resources to actually start a company, we’ll have to wait and see about.

And just as importantly, some noes. I’m not particularly interested in applying to the Leadership Fellows. I can’t really articulate why, but it doesn’t really interest me off the bat. I’m similarly not interested in being on the Welcome Committee – in this case, although it seems interesting, it just doesn’t seem as interesting as many of the other opportunities available, so I’m going to deprioritize it.

That’s the plan for now! I’m sure it will all change.

Facebook was right to run its test

Lately, there has been an uproar over Facebook’s study on emotional contagion in a large number of users’ feeds. The study seemed to indicate that Facebook had the ability to make people happier or sadder – that is, manipulate their emotions – by manipulating the content of their feeds.

Lots of people don’t like the idea of being unwitting lab rats for experiments, or at the prospect of a corporation having the ability to control our thoughts and emotions, or just the danger of conducting such a study:

In my mind, however, these arguments rest on a faulty assumption, which is that Facebook isn’t already manipulating our emotions, at least by accident. Indeed, the studies done on this topic seem to suggest the opposite; Facebook already impacts its users’ emotions significantly. (onetwo)

In addition, Facebook has to use some algorithm to show content to its users. I think it’s a mistake to assume that there is a “neutral” scenario, especially when all evidence is to the contrary.

Then this issue really becomes a question of understanding what’s already happening, not about doing something different qualitatively different, and it’s clear to me that in this frame Facebook should be conducting experiments like this (within limits, obviously).

The take by some, though, is that it’s not the experiment itself that’s troubling, but that it was conducted without its users knowing:

But again, if there really is no neutral scenario, and your emotions are going to be manipulated in any sort of consumption of Facebook, then even before any intentional tests have been done, you’ve already opted in to having your emotions manipulated. Indeed, you opted in when you started using Facebook, and every time you added something to your Facebook universe, via a like or added friend, you increased the scope of what could impact you.

So I’m glad Facebook is doing this research, and I’m really glad they’re publishing it for external consumption.

The risk dividend of renewable energy

Avoiding catastrophic climate change will require a transition of our energy system. Policymakers around the world spend their time look at different options for how this might be effected. They look at the rate of technological progress and the lessons of different policy experiments that have been tried around the world. The most important thing they care about is cost, or how much in goods and services we’ll have to give up in order to make this transition.

One emerging point is that renewable energy has a largely-hidden, but potentially huge, benefit. It is much lower risk than fossil fuel based power, and at a systemic level this could be a huge benefit to the economy. I’ll explain both below. (This is a very rough draft intended mostly to get my own thoughts in order).

First, we have to go on a tangent and discuss the role of risk and price in an economy. It is a truism that risk and return go together (i.e., with high returns comes high risk), so it is often stated that risk is a good thing, but this is a misleading conclusion. Risk is not good per se. In fact, thinking of high returns as coming with high risk is actually a complete reversal of the process that leads to that fact: what happens is that for an investment that promises returns at low risk, the price will get bid up until the returns are low as well. Investors are paying to avoid risk. Therefore, with all of the low risk investments promising low returns, the investments that offer high returns must therefore also have high risk. While risk itself is not a good thing (it comes with good things, namely high returns), it’s clear that the ability to take risks is a good thing, as you can more easily go after high return investments.

So what does this have to do with fossil fuels and renewable energy? Fossil fuel investments are very high risk. It’s not uncommon for an upstream oil and gas company to sink multiple billions of dollars into a well and have it not produce. There’s also a huge amount of geopolitical risk; Venezuela, Nigeria, Russia, Iraq, and Iran are major energy power. Finally, there’s simple market risk, which has to do with the highly complex interplay between investment and demand, leading to periods of over- and under-supply. This is part of the reason that fossil-fuel concerns generally make high profits – they are in a high risk business, so the profits have to be high to keep them in business.

Coal or natural-gas fired power plants are exposed to these risks through volatile input prices for the fuel, which they must absorb. Renewable energy, by contrast, does not have to absorb this risk or anything like it. The input risks for wind- and solar-powered electricity are very small. They exist only in the initial estimation of the resource, and our techniques here have gotten quite good. When an investor plunks down her money for a solar-generation project, she has almost complete knowledge of how much it will produce over the the life of the project. And since financing costs make up 90% of the costs of this investment (since operating costs are minimal, as there are no fuel purchases), the entire cost structure of the investment is known beforehand. There is qualitatively less risk for renewable energy relative to fossil-fuel-powered generation, as renewable energy does not have input price risk. Financing costs for renewable energy are declining as investors become comfortable with the asset class, and business models emerge to allow more leverage in these investments.

What would be the benefit of taking this risk out of the system? Concretely, it would mean that all of the “risk capital” in the energy system – capital that investors put up, knowing they might lose it all – would be freed up and able to put to other uses. Instead of investors looking to the global energy system to take on risk and hopefully make a large return, they’d reallocate their ability to take risk to other sectors of the economy.

So in the first order, reduction of risk for renewable energy investments should lead to lower capital costs, which will help them compete with fossil fuel generation. In the second order, risk reallocation should have some sort of positive dynamic effect in the economy, where the ability to take risk is freed up and put to use elsewhere.

Fossil Fuel Divestment

There was a great pair of articles recently in the New York Times discussing Stanford’s recent divestment from coal companies; an op-ed stating the case that divestment would do little, and a few responses to that argument. I think these articles really capture the debate. I agree with both sides: i.e. that the partial equilibrium of divestment should lead to absolutely zero impact on the targeted companies’ share price, profitability, or behavior. But divestment is a powerful political statement, not unlike a boycott.

Let’s back up: one can make roughly three arguments in favor of divestment:

  1. That it will reduce the share price of the targeted companies, increasing their cost of capital, in turn both reducing investment in the sector and increasing their cost of doing business.
  2. That the sector targeted for divestment is very high risk, so exposure needs to be curtailed. With respect to fossil fuels, this is the “carbon bubble” argument, which goes roughly like this: the current share prices of fossil fuel companies reflects a level of profitability they would only have if they burned more carbon than we can burn without frying Earth. So, the argument goes, eventually policy will step in and their valuations will crash.
  3. Finally, there’s the moral argument: you do not want your money invested in companies that do something you disagree with or find objectionable. Divesting, as Stanford has done, can be a powerful political statement. These political statements in turn can change the political environment.

Let’s take on these arguments in turn: first, the argument that divestment on its own will reduce the level of activity by increasing the cost of doing business. The fundamental reason this doesn’t work is that for every seller, there’s a buyer. And there are many, many, many buyers that don’t give a fuck about anything moral, and will buy these fossil assets on the cheap and drive the price back up to where it was. But let’s even say you DID succeed in impacting the cost of capital and drive up the cost of doing business; this would just raise the marginal price, helping these companies finance new investments internally. And even if you made a few more heroic assumptions about the shape of the supply curve, etc. – most energy assets (especially in the oil market) are owned by governments, so capital market prices aren’t nearly as much of a factor.

On to the carbon bubble: I certainly hope there is a carbon bubble. I’ve devoted my young professional life to climate change, and it saddens me to think how little progress we’ve made. I hope that global policy comes around and puts fossil fuel companies out of business. But, – so the question goes – what about our financial system – don’t institutional investors depend on these companies to stay afloat? Well, yes and no. Exxon is the largest component of the S&P500, so it’s certainly going to be a part of many investment portfolios. Wouldn’t it a Bad Thing if it went bust? Well, not really. Here’s why: (a) if Exxon goes bankrupt, it’s because some other company is getting rich supplying the same energy services (i.e. Tesla), and (b) institutional investors are so widely diversified that they’ll own the “other side” of the energy transition. Exxon’s market value won’t disappear, it will be replaced. 

Finally, the moral argument. This argument resonates with me, and I support those that make this decision. There is a tricky side to it, though, because if you’re selling for non-financial reasons (and therefore at below-market prices), you’re just creating economic opportunity for less-savory people. Think the Koch brothers buying a refinery on the cheap because you were divesting – you make a below-market return, the refinery doesn’t go offline, and the worst people ever make more than the buck they deserve. Not a great outcome.

The point to all this is that there is no substitute for policies that address the underlying value of fossil fuel use. If it’s more expensive to burn gasoline and coal, we’ll do less of it. Attacks on the share prices of companies is the tail wagging the dog.