Jon Bruner
Jon Bruner

How To Build an Interactive Map with Open-Source Tools

November 17, 2011 | 2:35 pm
My interactive migration map for Forbes

My interactive migration map for Forbes, showing inbound (blue) and outbound (red) migration to and from Maricopa County, Arizona

My latest interactive migration map on improves on the previous version in a few ways: it’s got five years of data instead of one; a brand-new layout; and some much-requested features like a search tool and the ability to switch off the lines. But the upgrade that I’m most excited about is in the code: I built the map using nothing but open-source software, from Python and MySQL to handle the data right down to JavaScript to display the map. I’ve been steadily moving much of my data handling to Python and MySQL, but this is the first map I’ve made using JavaScript, and interactive JS maps are still rare elsewhere, too.

The previous map was built in Flash, and I used some other proprietary software to handle the data and tweak the presentation. Moving to JavaScript for interactive applications saves money you’d otherwise spend on Flash licenses and it makes your work more widely available: this map functions on the iPad, for instance (albeit very slowly, since it’s computationally intensive and involves fairly large downloads). Here, in case it’s useful for anyone else who makes these sorts of things, is a rundown of how I built the map. READ MORE >

Drawing Lines Between Billionaires and Politicians

October 5, 2011 | 4:32 pm

My graphic for Forbes illustrating donations from billionaires to political action committees

I spent part of last summer building a system that parses Federal Election Commission records and, along with my colleagues Louie Torres and Dmitri Slavinsky, a system that helps our researchers link members of the Forbes 400 to political contribution records.

We’ve made that data an important part of our Forbes 400 profiles (scroll down on publisher gnome Sam Zell’s page, for instance, to find a breakdown of his political contributions as well as direct links to original filings). I’ve also visualized it a couple of times: in an interactive graphic last year and in a more focused static graphic this year. The smaller graphic, which shows every contribution by the ten biggest contributors, is more effective at illustrating the point I make in the accompanying article: that many of these contributors are not motivated by ideology but by lobbying power, as evinced by their donations to politicians in both parties (some even contribute to multiple candidates in the same race).

It was fairly easy to assemble the data for these graphics (and for the companion pages in the October 10, 2011 issue of the magazine). The hardest part of writing both graphics–whether in ActionScript for the interactive one or in Python/SVG for the static one–was developing the equation for finding the endpoints of a line drawn between the edges of two circles whose centerpoints and radii are known. READ MORE >

The Migration Map

June 17, 2010 | 1:39 pm

Migration to and from Los AngelesA few days ago, I published an interactive map of American migration on Since then, it’s become more popular than I could have possibly imagined. It’s been shared 5,000 times on Facebook and written about by The Economistthree different Atlantic blogs, three different New York Times blogs, and basically the entire “-ist” franchise (Gothamist, Chicagoist, DCist, and so on)–plus 1,700 other blogs and publications of various sorts. It’s broken Forbes‘s record for interactive content. To say I’m grateful for the reception would be a profound understatement.

Part of the reason that readers have enjoyed the map, I think, is that it confirms graphically what people have long known or suspected about regional trends based on either hard statistics or gut feelings: that the Pacific Northwest is being flooded with Californians, that Florida is suffering from brain drain, that Los Angeles no longer has the universal draw that it had during much of the 20th century, and that Detroit is in serious trouble and Dallas is doing rather well for itself.

At a higher level, the map confirms that the United States is a highly mobile country: one in which the lack of jobs in Detroit and the surfeit of them in Dallas draws massive numbers of people (806 of them, in fact, moved to the Dallas region from Wayne County; 167 went the other way). Commentators have offered theories of how taxes, costs of living, and quality of life create patterns on this map as well. Americans know what they like, and they’ll move to get it.

In skimming through the astonishing number of comments that people have posted (mostly to sites other than, I’ve come across a few persistent questions that I’ll answer here before explaining how the map works. READ MORE >

Home | Recent Work | RSS© 2004-2017 Jonathan E. Bruner