Reading Tom Vanderbilt’s series on the crisis in American walking, I noticed something about the cities with the highest “walk scores.” They’re all liberal. New York, San Francisco, and Boston, the top three major cities on Walkscore.com, are three of the most liberal cities in the country. In fact, the top 19 are all in states that voted for Obama in 2008. The lowest-scoring major cities, by comparison, tilt conservative: Three of the bottom four—Jacksonville, Oklahoma City, and Fort Worth—went for McCain. What explains the correlation? Don’t conservatives like to walk?

You might think it’s a simple matter of size: Big cities lean liberal and also tend to be more walkable. That’s generally true, but it doesn’t fully explain the phenomenon. Houston, Phoenix, and Dallas are among the nation’s ten largest cities, but they’re also among the country’s more conservative big cities, and none cracks the top 20 in walkability. All three trail smaller liberal cities such as Portland, Denver, and Long Beach. And if you expand the data beyond the 50 largest cities, the conservative/liberal polarity only grows. Small liberal cities such as Cambridge, Mass., Berkeley, Ca., and Paterson, N.J. make the top 10, while conservative cities of similar size such as Palm Bay, Fl. and Clarksville, Ten. rank at the bottom.

Substituting density for size gets us closer: Houston, Phoenix, and Dallas are notorious for sprawl, while New York, San Francisco, and Boston are tightly packed, partly because they are older cities whose downtown cores developed in the pre-car era. As they grew, their borders were constrained by those of the smaller cities and towns that surrounded them. That’s not the case with many Southern and Western cities. Jacksonville and Oklahoma City, for instance, are vast in terms of land area, encompassing suburban and even semi-rural neighborhoods as well as urban ones.

That still leaves the question of why urban density should go hand-in-hand with liberal politics, however. I see four possible categories of explanations. 1) Liberals build denser, more walkable cities (e.g., Portlanders supporting public transit and policies that limit sprawl). 2) Liberals are drawn to cities that are already dense and walkable (think college grads migrating to Minneapolis rather than San Antonio, or young families settling down in Lowell, Mass., with a walk score of 64.1, rather than Fort Wayne, Ind., with a walk score of 39. 3) Walkable cities make people more liberal (by forcing them to get along with diverse neighbors and to rely on highly visible city services such as parks and subways). 4) The same factors that make cities dense and walkable also make them liberal.

My guess is that it’s mostly 4), with some of the other three thrown in, depending on the situation. What do dense, walkable cities have in common? Besides being older, they also tend to be on the coasts. New York (#1), San Francisco (#2), and Boston (#3) sprang up as port cities—hubs of international commerce and immigration. That leads to both dense development along the coastline and to an atmosphere of diversity and tolerance. Those three cities top the list because they’re both old and coastal. The others in the top 10 are mostly one or the other. Seattle (#6) and Miami (#8) are diverse coastal ports. Chicago (#4), Philadelphia (#5), and Minneapolis (#9) aren’t coastal, but they are ports, and more importantly, they’re relatively old and industrial.

Look at the walkability map and you’ll see that unwalkable cities are concentrated in the South. While the northern United States developed an industrial economy, the South was dominated by agriculture until the last few decades. Whereas industry breeds density, immigration, and social mobility, agriculture requires vast plots of land and leads to an entrenched social order dominated by the large landowners.

The historical perspective might help explain why cities such as Houston, which today is one of the nation’s largest ports and a magnet for immigration, remain relatively unwalkable. As Houston becomes increasingly diverse, it is already becoming more liberal. Harris County went narrowly to Obama in ’08 after going consistently Republican for decades before that. In theory, it should be getting more walkable as well. The problem is that once a city has an infrastructure built around cars, it’s harder to build support for density and public transportation funding. That is, it may be easier for a city to turn liberal than for a city to turn walkable.