All The World’s Power Plants

When traveling across China by bicycle, I was amazed by how we seemed to pass a new power plant almost every day. I found myself wanting a map of where the power plants were in the country. Are they everywhere, or only where we were riding?

I found an online database of power plants from While on a train ride in western China, I wrote a Python script to download the entire database and then make a map of where the power plants were located — and I scaled them both by the amount of carbon and electricity they produced. Go to the interactive map of our trip and click on the link “See Power Plants in China.” One reason we passed a lot of power plants is that we followed the Yellow River, and power plants are often located along rivers. Another reason we passed so many power plants is that there are a lot of power plants in China.

Screen Shot 2015-05-17 at 1.36.59 PM

The Carma datset is global, so I also made a map of the entire world. The following two maps show the Carma dataset. The first map (blue markers) shows power plants scaled by the amount of electricity they produce. The second map shows power plants scaled by their carbon emissions. A few things jump out at me from these maps. The biggest difference between the two maps is in hydro-power plants in the world. South America has a number of hydropower plants that produce very large amounts of electricity (and thus are big blue dots), but almost no carbon (and thus are absent from the carbon emissions map). It is also amazing how much of the world produces very little energy.

Power Plants Scaled by Energy Production

Power Plants Scaled by Energy Production – From

Power Plants Scaled by Carbon Emissions

Power Plants Scaled by Carbon Emissions – From

Posted in Maps | Leave a comment

Interactive Map of Ride for Climate Asia

On Lindsey’s and my recent journey across Asia, I was sure to record every day on our Garmin GPS. This not only helped me get a few “King of the Mountains” on Strava, but more importantly, it allowed us to build a detailed map of our route.

Using a Python library that parses Garmin .fit files, I was able to extract the information from each day’s ride and then plot it on an interactive map using OpenLayers. I then built an elevation profile using d3. Click on the image below to explore! You can access blog posts about any part of the trip by clicking on the yellow markers. I also added overlays of population density, water stress (taken from WRI’s Aqueduct), and the location of power plants in China — just click on the links above the map on the right.

Screen Shot 2015-05-15 at 3.53.30 PM

There are a few things I’d like to improve with this map. For one, it includes a lot of data points — about one per kilometer, which is more than 13,000. As a result, the map runs slowly on most people’s computers. It would be nice if I could show a lower-resolution version of our route when zoomed out, and then dynamically show higher resolution as you zoom in. Secondly, the elevation profile is a bit unintuitive — I show the profile for the sections that we biked, not the parts that we bussed, trained, or hitchhiked. As a result, when we took a train to Tibet and then started biking, it looks like we went straight uphill 16,000 feet. Needless to say, we didn’t do that.

Posted in Maps | Leave a comment

All the World’s Reservoirs

Here’s a little project I’ve been working on: All of the world’s reservoirs, as seen by the GRanD database. I think it still needs a few tweaks — let me know if anything looks off.

Reservoir capacity is proportional to the size of each dot. Note that capacity is measured as the extra capacity created by a manmade dam. For instance, Lake Victoria in Africa is here because there is a dam on it — but the “capacity” includes only the few feet at the top of the reservoir that can be controlled by the dam.

Posted in Maps | Leave a comment

Fun with Python and Basemap

I recently re-edited my film Ten Tips for Biking Eastern Europe to submit to the Banff Film Festival (yes, a reach, but why not?). I had to alter the film because the old version uses Google Earth to show our bike route, and this is, of course, copyrighted. So I had to make a non-copyrighted map.

To make a new map, I took the KML file of my bike route (which I produced by combining all of the GPS files from the route), and using the Python library matplotlib and the toolkit extension basemap, plotted the route on NASA’s “blue marble” image of the earth, which is an image of the entire earth created by combining cloud-free satellite images. According to my sources, I can use this NASA image as my map background as long as I attribute it. (Note: the image used in the map background below is brought to you by NASA).


Pretty, eh? I wish the blue marble background image were a bit higher resolution, but I think it looks good enough.

This took a long time, not because the coding was difficult (I borrowed code from here and here), but because it took forever to get the Python libraries installed correctly. And, when I did get the libraries installed, the blue marble background image, for some reason, showed up backwards. To right everything, I had to change the “backend” rendering of the matplotlib library by installing WxAgg (As with most Python library challenges, I just followed advice from the Internet until I got it to work).

Posted in Maps | Leave a comment

Where My Friends Have Traveled

A few months ago, we had a housewarming party and about 30 guests, mostly people roughly my age living in San Francisco, attended. I put a map of the world on the wall, and we asked people to mark each country that they had visited. I then entered the data into excel and used Google Charts Tools Geomap to make the following map of where people I know, who showed up to a party in San Francisco, have traveled.

I think it is absolutely fascinating that not one of the 30 partygoers had been to many places in central Africa, most of the Middle East, or a string of Eastern European countries stretching from the Baltic Sea to the Black Sea. Also, it’s interesting that only one person at the party has visited Russia, and that my friends were just as likely to have visited France and the UK as they were to have visited Mexico.

There’s a lot to say here. I will be revisiting this map.

Posted in Uncategorized | Leave a comment

Eastern Europe Bike Trip in Google Earth

I recently combined all of the GPS files from our ~1000-mile 26-day bike trip this past summer and uploaded them into Google Earth. The result is a path that you can “fly over” and follow. Google Earth also allowed me to plot an elevation profile of the trip.

Unsurprisingly, our favorite parts are almost exactly correlated with the hilliest sections–the Tatras mountains of Slovakia at the beginning of our journey, and the many mountains of Bosnia at the end.

You can download the KML file from our trip here and plot it yourself on Google Earth. I took a screen capture video of the route, which you can see below.

Posted in Uncategorized | Leave a comment

U.S. State Populations with Circles

This weekend I taught myself how to use this javascript library MooCirclePack, which allows one to tightly arrange circles of various radii (yes, it was an exciting weekend). Below are the U.S. states, with the area of each circle proportional to the state’s population.

California is, of course, number one.

Moocirclepack only lets you put an image on each circle, and not text, so I had to use the Python pil library (which was a major pain to install) to turn the state abbreviations into images.

The most interesting thing I saw on this graphic is Puerto Rico (PR). Puerto Rico, with a population of 3.7 million, is more populous than 21 other states. It’s almost strange that it isn’t a state (based on population alone).

I do have some things I don’t like about this visualization. The spatial placement of the circles doesn’t mean anything (Oregon is next to Florida). Secondly, our eyes are not very good at comparing area. For instance, it’s hard to tell, by looking at this graphic, that California has a population 10 times that of Puerto Rico (38 million versus 3.7 million).

Posted in Uncategorized | 2 Comments

More Coal?

This following graphic comes courtesy of WRI, which shows where new coal power plants have been proposed. According to a new report by WRI, there are 1,199 planned around the globe, more than half of which will be built in India and China.

Posted in Maps | Leave a comment

Religion in America

A few weeks back I made the following map to show the religious population in each state, drawing on statistics from Pew Forum on Religion & Public Life. The data is from 2008.

A few things jump out at you: Evangelicals are concentrated in southern states; Catholics are found in the Northeast, North Central, and Southwest regions of the country; Mormons dominate Utah, and almost nowhere else. You’re most likely to find unaffiliated — people who claim no religion — in the far northeast or west of the Rockies. It is also surprising, in comparison to Christians, how few Jewish or Muslim people live in the U.S.

Posted in Uncategorized | Leave a comment

Data Journalism — A Guest Entry for the NGen Blog

The following is a blog entry I contributed to the Independent Sector’s NGen Blog on data and the non-profit sector

Anyone poking around online newspapers has noticed a proliferation of info-graphics and maps. If these graphics are done well, they can tell a story much more quickly than a series of paragraphs.

Introducing data journalism – the newest form of online communication, and also a great way to get eyeballs on your website.

For much of 2011, I worked as a data journalist for Climate Central, where I attempted to tell stories about climate change and energy through both articles and data-driven graphics. For instance, during the Fukushima disaster in 2011, when people wanted to know more about nuclear power, we built this map to show the worldwide distribution of nuclear power. Or when we were experiencing record heat in July, we created this U.S. map. Another graphic and accompanying interactive fuel calculator shows gas prices around the country, and how much you could save by increasing the fuel efficiency of your vehicle. As we quickly learned, many web-surfers would rather point and click than read; such interactives were often our most popular content.

Climate Central has continued to embrace data journalism, and with great results. They recently created these detailed maps of sea level rise, which have been picked up by almost every major media organization and have flooded their website with traffic  (and, not to mention, informed a lot of people about how sea level rise will affect their community).

I learned two important lessons working as a data journalist. The first is that all the tools you need to represent data are readily available online. I had no knowledge of javascript before I started at Climate Central – I just kept searching online how to make the graphics, and found tips from other coders. (Here’s a tutorial showing non-coders how to make a Google map). Want to make a chart? You can use this chart wizard from Google to create an image (which is what I used for the gas price widget above). Or if you know a bit of javascript, or feel ready to learn some, you can use this Google site to make more interactive charts. Other free tools, such as Google Fusion Tables or IBM’s ManyEyes offer ways for you to piece together a graphic without any prior training. There are also useful sites such as that regularly share how to make advanced graphics.

The second lesson I learned is that while it is relatively easy to put data into a chart or onto a map, it’s much harder to tell a compelling story. You have to analyze the data and show the interesting bits. For instance, consider this graphic by the New York Times, showing Netflix rental preferences by zip code for major cities. The graphic shows an enormous amount of data, and it is tricky to know what you should look at. To help the reader, The Times added two links above the map, telling you which rental picks show the most interesting trends. The authors didn’t just put the data on the map – they looked for the interesting patterns and guided the reader to them. And while I’m proud of my above map of nuclear power, it doesn’t do a good job of telling the story that I wanted to tell – namely, that most countries stopped building nuclear power plants in the 1990s. A simpler graph, such as this one built by, does a much better job of displaying that fact. It isn’t enough to put the data on a map or into a graphic; you also have to tell a story.

In short, data journalism offers a great opportunity to communicate a vast amount of information in exciting, interactive ways. But while the tools to do so are readily available, you still have to do the hard part – figure out the story, and tell it well.

Posted in "How To" | Leave a comment