Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Tuesday, April 24, 2012

Venture Capital Family Tree

About six months ago my friend Chris Fralic (@ChrisFRC) invited me to a screening of Something Ventured, a film about the origins of the US venture capital industry. Definitely worth checking out. One of the things it got me to thinking about was how intertwined the early VC firms were. So, in the spirit of one of those genealogies of rock music posters, I gathered some data and made a visualization. It's not pretty like the rock and roll one. And it's woefully incomplete, which I need your help on. We'll get to that.

The whole thing


Zoomed in on some interesting '90s reshuffles

I used jquery and d3, although I had to customize d3 a bit. Because it's d3 and there are a lot of svg objects, it could be slow on slower computers. Also, screen size makes a big difference here, not recommended for mobile viewing.

I was trying to put in firms from the early days and firms that were critical links between the early days and today, so there are a very few firms founded in the last ten years in there. It's a historical study, not a contemporary view. The founders of the firms are noted, but not seminal later partners (i.e. Kleiner and Perkins but not Doerr or even Caulfield.) Although new partners can have a huge impact on a firm's direction*, I just didn't have time. Maybe in the next iteration.

Firms founded in New York are blue, in Boston are red, and in Silicon Valley are green. Others--including those that do not yet have an entry for place--are orange. Type a firm name or founder into the box (there's autocomplete) and click to zoom in on that firm. Also, pan and zoom using the mouse.

Venture firms never really die, they just fade away. And some firms stop being VCs (in the '80s many firms abandoned venture for PE) or were financial orgs and became VCs. This is denoted by a 'tear' at the beginning or end of the firm's bar--the firm had a life before or after, but was not an active venture investor.

I've also started adding noteworthy investments, but there are only a few. As far as I can tell, there is no extensive list of who backed who when. Which brings me to my ask.

I've put in info as I came across it for the last six months, but I have other commitments, so it's been slow. And the easy info sources are running dry. So I slapped on a form, hoping you all would help. All contributions are welcome, but in the spirit of the thing, I'd like to prioritize adding firms that were either critical links between the past and present, that trained a bunch of people who went on to found their own firms, have been influential for a long time, or were influential in the past and have disappeared (i.e. TVI, MPA&E.)

When contributing investments made by firms, I would rather not add every investment. I've tried to add investments that were important or household names. This is a public historical document, I think it's more interesting (and puts the better foot forward) to show that Starbucks and McDonnell Aircraft were venture backed (or Pizza Time, for that matter, even though it failed) than, say, Kozmo.com**.

To contribute either click on the '+' button on the upper right to add a new firm, or click on the name of a firm to edit/augment their info. When you hit 'submit', it should reflect locally, but it doesn't add it to the database (I'm not a back-end guy) it emails me. I will edit and add data, I don't expect to get a ton of submissions. The data is open source (cc by-sa), and any contributions will be considered open as well. I will add your name to the contributor list on the help page if you put it in the 'Comments' box on the form (there's no other way for me to know who you are.) Also, put your email address there if you want so I can contact you re your submissions.

But please, do submit! It struck me as odd when doing the research here how little the venture community values its roots. Law firms have web pages and sometimes whole self-published books celebrating their founders and history. Your typical VC firm comes across as if it's in the witness protection program. It's crazy that I can't figure out who all four founders of Menlo Ventures are and where they came from, or who backed Federal Express and when. I've got decent google-fu, and I looked, trust me. Someone out there knows, and you should enter this stuff. The mainstream industry is now some 50 years old. We are in danger of losing our past.

If someone knows of a source of data for this (that is either free or you can get me access to), I will port stuff.

Primary sources were firm web sites, Wikipedia, and The New Venturers by John Wilson, a great book now out of print. Some data was taken from Venture Capital at the Crossroads, Creative Capital, Valley BoyThe Startup Game, and Elfer's Greylock. I'm planning on skimming Done Deals and Venture Capitalists at Work for more. Other sources are in with the rest of the data as 'cites'.

-----
*  In a couple of case, Paul Bancroft joining Bessemer from DG&A, for example, I think it was significant enough to consider that the start of Bessemer's venture activity, even though that is not strictly true.
** Well, hard to say. I can only think of interesting companies because I only remember the interesting ones. Kozmo might actually be an interesting investment from a dot-com bubble point of view. Maybe just send me whatever you want and I'll figure out some way to highlight some and not others. I don't know.

Tuesday, January 17, 2012

VC/Company Investment Visualizer

A friend asked me last week if I knew a tool to help him visualize which VCs were investing in a sector. I did not. But I realized I could pretty quickly repurpose the VC Bar Chart code and some unpublished code that pulls in data from a Google spreadsheet to show a force-directed graph. So, weekend project.

Data from Crunchbase, visualizaton using the d3.js library.

Here's my portfolio.

The site is here. Just start typing company names in the upper-left hand corner box and hit plus to add. Real name to Crunchbase permalink translation uses the list of companies as of Friday* or so, so if the company was added to CB later, autocomplete finds nothing;  just type in the permalink and the company will still be added. In the screenshot above a few of my companies had no CB investor entries, so they're just floating out there. Many of my other companies are not linked to me because CB does not mention me as an investor.

One way to explore is to enter a bunch of companies in your area of interest and see how the graph falls out.  Here's one of the AdTech industry.


The save functionality is experimental (to me, that is.) It uses HTML5 localStorage. The caveat is that you can't email visualizations around that way, and there may be times when your browser clears localStorage (sometimes when clearing cookies, for example.) If it does, you lose all saved visualizations.

The code is all client-side, so it's right there in your browser if you want to look at it. I found myself late last night using a non-analytical debugging process** when I was trying to get the 'load visualization' piece to work. I'll put it up on GitHub some time after I clean it up.

-----
* And I redacted the list to only include companies that CB showed having investors. The full list was too big to load efficiently.
** Mainly making random code deletions.

Wednesday, November 23, 2011

iMapBox

I've always been the type who, when confronted with a one-hour task, will instead take two hours to automate it. Here's an example.

VCdelta is my bot that tracks additions to VC portfolio pages. It has its own twitter feed. Its twitter feed is about to surpass my twitter feed in number of followers. It seems my bot is more interesting than I am. I thought it would be interesting to graph the number of people who have followed me versus the number of people who have followed VCdelta over time. Twitter does not provide stats like that, but whenever I get a follow email from Twitter, I hit archive, not delete. So all I needed to do was count the follow emails by month.

Turns out Python doesn't have a very good library for using a mailbox as a data source. The Python email libraries assume you are planning on writing an email client. So I wrote an abstraction layer for the Python IMAP library. Code is here*.

Here's the code to count twitter followers:

import IMapBox 

me=IMapBox.IMapBox("imap.gmail.com",my_acct,my_pwd)
mymail=me["[Gmail]/All Mail"]

myfollows=mymail.frm("twitter").subject("following")

mydates=[myfollows[x]['date'] for x in myfollows]

The 'me=' and 'mymail=' open a connection to my email account and select a mailbox, in this case the All Mail mailbox. (The command 'me.list()' lists all the mailboxes for the account.)

The next line filters mymail so myfollows is only emails from Twitter that have 'following' in the subject line**. iMapBox is lazy--it doesn't fetch the emails itself until it has to--so this is pretty fast. myfollows acts like a dictionary, so you can len() it, ask for the keys()--these would be the message IDs--or the items(), iterate over it, or get items.

Each of the items in the dictionary is an email message. These also act like dictionaries, with keys like 'from','to','subject','date', and 'text'. The next line creates a list called mydates of the date each follow email was sent. It does this by iterating over each item in myfollows and pulling its date out. This is the slower part: when you set up an iterator, iMapBox gets all the headers***.

The part about counting follows per date I will leave as an exercise to the reader. Here's the graph of my follows and VCdelta's follows. I've been tweeting for some three years, VCdelta for six months.


On a sidenote, this is a logarithmic scale. The green line is my trend. This is odd, no? I mean, I'm not getting exponentially more popular, so this argues that a lot of follow behavior is algorithmic of some sort. I had expected more linear growth.  I also expect VCdelta to level out soon, as it reaches the limits of its natural audience.

Another example, email volume over time:



You can see where I started using my current email account full-time, in September 2006. And you can see when I started investing full-time, in mid-2009. And you can see why my email response time has slowed dramatically.

The code:

from datetime import date, timedelta
import IMapBox

me=IMapBox.IMapBox("imap.gmail.com",my_acct,my_pwd)
mymail=me["[Gmail]/All Mail"]

for yr in range(2006,2012):
 for mo in range(1,13):
  beg_month = date(yr,mo,1)
  end_month = date(yr+mo//12,mo%12+1,1)-timedelta(days=1)
  print mo,"/",yr,"\t",len(mymail.dates(beg_month,end_month))

This is an alternative way to count emails per month, filtering by date instead of collecting dates. The 'dates(x,y)' method filters the emails for only those that were received between date x and date y (inclusive.) This is faster because even the headers are never fetched.

Some other ways to use it:

c=mymail.frm('josh')+mymail.frm('matt')
d=mymail.frm('josh')-mymail.to('matt')
e=mymail.today()
f=-mymail.today()

The first is all messages from either Josh or Matt. The second is all messages from Josh that aren't also to Matt, the third is all today's messages, the fourth is all messages except today's.

 ----- 
 * I'm an electrical engineer, not a computer scientist. So I can build a waveguide to your specifications, but I'm not entirely sure that this code is all that good. Please, feel free to fork, suggest improvements, make improvements, tutor me on garbage collection or unit testing, whatever. 
 ** I like object chaining. I know it's not Pythonic, but I'm not sure why. It strikes me that since I don't really understand too deeply how Python garbage collects, that this may be creating extraneous intermediate objects. If you plan to use this is any sort of real code, you might want to figure that out. I did notice that if I object-chain the IMAP connection ('me' in this example), it gets dereferenced and gc'd, which invoked the very polite __del__ method, closing the connection. I'm not sure how to avoid that, so I just commented out the __del__ method, leaving a messy open connection to the server. 
*** My thinking is to only go do the time-consuming fetching of messages when needed: when an email message object is referenced or when an iterator is set up (on the assumption that when you set up an iterator, you plan to consume the whole set of messages.) This latter is because fetching 100 messages in a single fetch is far faster than 100 single message fetches. The default is to only fetch the headers, except when the text itself is explicitly asked for. This default can be changed by setting priority='both' or priority='text' when you call iMapBox to open a connection to the server.