Bishop’s book was provocative, and was pummeled by some political scientists for relying too much on data from presidential elections. Because they offer voters a stark either-or choice, presidential elections overstate the partisan divide. When you look at voter registration or opinion polling, the fastest-growing political allegiance is not red or blue but “independent.” And while there are anecdotal accounts of, for example, gay couples choosing homes in communities that respect their rights, there’s not much evidence that deliberate ideological self-segregation is a widespread phenomenon.

Dante Chinni and James Gimpel, in a 2010 book called “Our Patchwork Nation,” subdivided America into a dozen categories, with special emphasis on the urban-rural divide, to explain why different places go in such different directions. Gimpel, who teaches at the University of Maryland, told me that rural and small-town residents feel belittled by “what they perceive as the cultural imperialism of big cities.” They hunker around their Fox News, which feeds their resentment.

He is surely right about rural alienation, but, as Gimpel acknowledges, America is increasingly neither urban nor rural; it is suburban, or urban-ish. The Patchwork formula doesn’t fully explain why Iowa, one of our least urbanized states, has accepted same-sex marriage, or why voters in the most urbanized state, California, voted to reject it.

I heard a more satisfying if somewhat depressing explanation for the seemingly random eruptions of political idiosyncrasy from Samuel Abrams, who teaches politics at Sarah Lawrence and Stanford. Abrams, who has spent the last decade or so researching our political habits, begins with the evidence that most Americans are simply not engaged in local politics, except perhaps on pocketbook issues. In the absence of public attention, motivated, well-financed and sometimes extreme elites have captured the lawmaking process in many state capitals. Legislatures are vulnerable to (and often populated by) the most ardent believers in a cause, the ones who care enough to take the time, raise the money, turn out on Election Day and lobby relentlessly.

“People who participate in state and local government tend not to be representative of the masses at all,” Abrams told me. “They tend to be highly engaged political elites — 15 percent of the population who think they’re fighting this culture war. They’ll see an opening. They’ll see a judge, they’ll see a legislature that looks amenable to something, and they’ll try to push it through and build a groundswell around that.”

This dynamic applies to both liberals and conservatives, by the way, although a variety of studies show Republicans have pulled much further to the right than Democrats have to the left.