Mapping

Recent posts

Mapping GeoJSON On Github

I’ve been hoping to tinker with Github’s new mapping service since the company announced it earlier this month. Turns out it’s quite easy. You just commit a GeoJSON file to your repo, and voilà.

The points on this simple map represents the location of each car2go I’ve rented (excluding those in Austin, Texas). Surprise, they’re mostly clustered in our neighborhood:

car2go locations

This is a simple as it gets. The service also allows other data types, like polygons, for example. Tomorrow I’ll try a more interesting data set, maybe DC property parcels or 311 calls locations. And I’ll experiment with the Github docs to see how I can customize the icons and design. We’ll see…

BTW: Github is using MapBox to create its custom map base layer. Read more about that here. And thanks to my co-worker, Chris Groskopf, whose csvkit suite makes it super easy to convert basic data files into GeoJSON.

Mapping 2012 Presidential Results in Majority Minority Counties

Yesterday I mapped the more than 350 “majority minority” counties in the United States, breaking them down by race and ethnicity groups and geography. As promised, today I’ve looked at how these counties (in the contiguous United States) voted in the 2012 election.

Obama won about 70 percent of these counties. Here’s the map:

The Daily Viz

The Daily Viz

That map, of course, can be misleading — as often happens in elections. That because the area of the counties can distort their actual voting power. In this case, Obama won more “majority minority” counties with urban populations and many more voters, such as Los Angeles (Calif.), Cook (Ill.) and Kings (N.Y.) counties, among others. Romney carried rural Republican counties, largely in Texas and the west.

Obama received nearly 18 million votes in the “majority minority” counties he carried. Romney got 2 million votes in his “majority minority” counties. In the end, Obama received a net 10 million votes from “minority majority” counties — nearly double his national margin over Romney in the country as a whole.

The map below uses proportional circles on top of the choropleth map above to help visualize the total votes in each county. You can see how Obama won in many of the most-populous counties, increasing his national margin (though not necessarily helping with the Electoral College — except in critical purple states he carried, such as Florida and Virginia).

The Daily Viz

The Daily Viz

You can download the data here.

For more updates, follow me on Twitter.

Mapping ‘Majority Minority’ Counties

This week the U.S. Census Bureau released updated national population estimates, including a list of the counties that grew most rapidly from 2010 to last summer. I wrote about these counties in a political context this week for work.

Included in the release was a note that six more counties had flipped to “majority minority,” as the bureau calls them. These are counties in which non-Hispanic whites represent less than half the population.

With those six, the country now has at least 352 counties — about one in 10 of the total — in this category. Here they are on a map:

The Daily Viz

The Daily Viz

These counties exist largely because because of the relative size of the Hispanic and black populations (though Hawaii and Alaska have high Asian population rates), depending on geography. Western counties have higher percentages of Hispanic residents, and counties in the Deep South have higher rates of black residents. Of course there are some exceptions sprinkled throughout the country.

This map shows the rate of “minority” residents by county:

The Daily Viz

The Daily Viz

This map shows the percentage of Hispanic residents by county:

The Daily Viz

The Daily Viz

This map shows the percentage of black residents by county:

The Daily Viz

The Daily Viz

You can download the data here. Tomorrow we’ll examine how these counties voted in the 2012 presidential election.

For more updates, follow me on Twitter.

Mapping ‘Your Warming World’

New Scientist has published a fascinating interactive map related to increasing global temperatures over time:

The graphs and maps all show changes relative to average temperatures for the three decades from 1951 to 1980, the earliest period for which there was sufficiently good coverage for comparison. This gives a consistent view of climate change across the globe. To put these numbers in context, the NASA team estimates that the global average temperature for the 1951-1980 baseline period was about 14 °C.

Users can change the map, made by Chris Amico and Peter Aldhous, by time period and see an interactive chart with time series data. Here’s the global view for the last two decades:

Screen Shot 2013-01-15 at 2.32.37 PM

And users can also zoom to their location (and the time series chart changes):

Screen Shot 2013-01-15 at 2.32.50 PM

Mapping ‘Rich Blocks, Poor Blocks’

Rich Blocks, Poor Blocks” allows users to get information about income in their neighborhoods, using the 2006-2010 American Community Survey estimates* compiled by the U.S. Census Bureau. Here’s a map of Washington, D.C., which — as I’ve noted before — is segregated by race, educational attainment and income:

Source: Rich Blocks, Small Blocks

Source: Rich Blocks, Small Blocks

* These data have high margins of error in small geographic units like Census tracts, which this service uses, so don’t take the figures literally. Still, the estimates can be useful for spotting broader trends about communities.

Thanks to the wife for sharing this discovery.

Mapping Obama’s Election Performance By County In 2012 Vs. 2008

The Washington Post over the weekend published an interesting story about President Obama’s southern support in the election:

The nation’s first black president finished more strongly in the region than any other Democratic nominee in three decades, underscoring a fresh challenge for Republicans who rely on Southern whites as their base of national support.

This map compares Obama’s performance in 2008 to this year’s election in the lower 48 states. Darker blue shades represent higher percentage point increases, and darker red shades represent decreases in percentage points. It’s clear he performed better this time in parts of the Deep South:

The Daily Viz

But why? One likely explanation for Obama’s stronger showing in the parts of the South could be that those counties have a high proportion of black voters, and Obama turned them out. According to the Post, “black voters came out in droves on Election Day and voted overwhelmingly for Obama — near or above 95 percent in most parts of the South.” Here’s a map of the black population, according to the U.S. Census Bureau. See a correlation?

U.S. Census Bureau

Notice too that Obama did worse in Coal Country than he did four years ago, perhaps because the region has higher unemployment rates than the national average, or because the Romney campaign wooed voters in this region, especially in Virginia. Here’s a map of coal production, according to the U.S. Geological Survey. This is less clear, in part because the map shows all coal-producing counties, not just those in which it’s a key part of the economy now (the red and pink areas in West Virginia, Kentucky and Virginia):

USGS

And, finally, it’s no surprise that Romney did better than McCain in 2008 in Utah. Romney, of course, is a Mormon and he led the 2002 Winter Olympics in Salt Lake City. But if you want to compare it with the election results, here’s a map of the Mormon population, again from the U.S. Census Bureau:

U.S. Census Bureau

I’m generally not a huge fan of county-by-county election maps because counties as a unit of geography are largely meaningless in national elections. But in this case maybe it’s useful. Meanwhile, check out the Post’s nice map gallery of the 2012 electorate.

Humidity, Sunshine Across The U.S.

With summer winding down, I wondered: How much does the amount of sunshine and humidity vary among U.S. cities?

First, this map shows the average percentage of possible sunshine by city. (Yuma, AZ, has sun about 90% of the year; Juneau, AK, gets it about 30%). Larger bubbles represent higher percentages of sunshine (click the images for larger, interactive versions):

This map shows (a slightly different) list of cities and their annual average relative humidity in the afternoon:

I’m not sure whether these maps are effective — or whether they should be maps at all. But I wanted to try another quick experiment with CartoDB.

Data source: NOAA | Download: Sunshine, Humidity

Mapping Crime Data With CartoDB

Today I started playing with CartoDB, an online data mapping service that reminds me in some ways of both Google Fusion Tables and TileMill.

To start, I grabbed a simple test data set — five months of geocoded major crimes in D.C. from January to May this year — to check out some features. One I like is allowing users to query their data in the browser-based interface and filter for specific types of records.

Here, for example, I narrowed the map to show just thefts:

Assaults with deadly weapons:

Vehicle thefts:

Thefts from vehicles:

Robberies:

Homicides:

I made these maps in less than five minutes, so I’m sure there are much more useful stories to tell with the tool. There are also many, many features I didn’t explore, like the ability to style the map using Carto, the CSS-like language, rather than the UI.

Anyway, give it a shot, and let me know what you build.

Mapping The Titanic’s Passengers

Mapping software giant Esri has recently published “story maps,” self contained interactives in which maps anchor the narrative. The latest example uses symbols on a world map to show the destination cities of Titanic passengers. Larger symbols represent more passengers traveling to a specific destination. It also has a pie chart showing how many survived the disaster:

Using the top navigation bar you can toggle the maps to see how passengers in the various ticket classes fared. More than half of the first-class passengers survived, for example, while only about a quarter of the third-class passengers (think Leonardo DiCaprio‘s character) survived:

Uncovering ‘Ghost Factories’

USA Today has a terrific package today about neighborhoods across the country that could have dangerous levels of lead contamination from old factories:

Despite warnings, federal and state officials repeatedly failed to find out just how bad the problems were. A 14-month USA TODAY investigation has found that the EPA and state regulators left thousands of families and children in harm’s way, doing little to assess the danger around many of the more than 400 potential lead smelter locations on a list compiled by a researcher from old industry directories and given to the EPA in 2001.

Included is an interactive map with information about these locations:

Via Tony Debarros