In 1992, there were 103 members of the House of Representatives elected from what might be called swing districts: those in which the margin in the presidential race was within five percentage points of the national result. But based on an analysis of this year’s presidential returns, I estimate that there are only 35 such Congressional districts remaining, barely a third of the total 20 years ago.

Instead, the number of landslide districts — those in which the presidential vote margin deviated by at least 20 percentage points from the national result — has roughly doubled. In 1992, there were 123 such districts (65 of them strongly Democratic and 58 strongly Republican). Today, there are 242 of them (of these, 117 favor Democrats and 125 Republicans).

So why is compromise so hard in the House? Some commentators, especially liberals, attribute it to what they say is the irrationality of Republican members of Congress.

But the answer could be this instead: individual members of Congress are responding fairly rationally to their incentives. Most members of the House now come from hyperpartisan districts where they face essentially no threat of losing their seat to the other party. Instead, primary challenges, especially for Republicans, may be the more serious risk.

In the chart below, I’ve grouped the country’s Congressional districts into seven categories based on the results of presidential voting there from 1992 through 2012:

• Landslide Democratic districts are those in which the presidential vote was at least 20 points more Democratic than in the country as a whole. (For example in 2008, when the Democrat Barack Obama won the popular vote by roughly seven percentage points nationwide, these districts were those in which Mr. Obama won by 27 percentage points or more.)

• Strong Democratic districts are 10 to 20 percentage points more Democratic than the country as a whole.

• Lean Democratic districts are 5 to 10 percentage points more Democratic than the country as a whole.

• Swing districts are within five percentage points of the national popular vote margin.

• Lean Republican districts are 5 to 10 percentage points more Republican than the country as a whole.

• Strong Republican districts are 10 to 20 percentage points more Republican than the country as a whole.

• Finally, Landslide Republican districts are at least 20 percentage points more Republican than the country as a whole.

Photo

As these figures make clear, the number of swing districts has been on a steady decline since at least 1992, and the number of landslide districts on a steady rise. The year 2008 was a partial exception: the number of landslide districts rose slightly from 2004, but so did the number of swing districts. However, the polarization of Congressional districts became sharper again in 2012.

Some of this was because of the redistricting that took place after the 2010 elections. Republicans were in charge of the redistricting process in many states, and they made efforts to shore up their incumbents, while packing Democrats into a few overwhelmingly Democratic districts. In the few large states where Democrats were in charge of the redistricting process, like Illinois, they largely adopted a parallel approach.

But redistricting alone did not account for the whole of the shift; instead, polarization has increased even after accounting for the change in boundaries.

Direct estimates of the 2012 presidential vote are available in 342 Congressional districts, based on the data compiled by David Nir of Daily Kos Elections. Mr. Nir’s spreadsheet also estimates what the 2008 presidential vote was in each district based on its 2012 boundary lines.

The next graphic presents a comparison of how each of these districts voted in 2008 and 2012, holding each district’s boundary lines constant. The correlation is extremely high. Mitt Romney came three or four points closer to defeating Mr. Obama than John McCain did in 2008, but for the most part the shift was fairly uniform in different parts of the country.

Photo

However, a more careful look at the chart reveals increasing polarization. The slope of the black regression line in the chart is greater than one (specifically, it is about 1.08). In plain English, this means that polarization increased by about 8 percent from 2008 to 2012 — above and beyond any changes brought about by redistricting. For example, a district that was 25 percentage points more Democratic than the country as a whole in 2008 was about 27 percentage points more Democratic than the national average this year. Likewise, a district that had been Republican-leaning by 25 percentage points in 2008 was typically 27 points more Republican than the rest of the country this year.

(Some 93 Congressional districts do not yet have their 2012 presidential vote reflected in Mr. Nir’s spreadsheet, but it is possible to estimate what the vote was there to a high degree of accuracy. In each district, I estimated the 2012 vote as a function of what the vote had been in 2008 and the statewide shift from 2008 to 2012. Taking the indirect estimate of the vote in these districts and Mr. Nir’s direct estimate for the other 342 is what yields my conclusion that there are only about 35 swing districts remaining.)

But these figures do not tell the whole story. There is also a second type of polarization, one that I remarked upon after the 2010 midterm elections. In addition to the sharp increase in the polarization of the presidential vote, there has also been a sharp decrease in ticket-splitting. Far fewer districts than before vote Democratic for president but Republican for the House, or vice versa. In 1992, there were 85 districts that I characterize as leaning toward one or another party based on its presidential vote. Of these districts, 27, or nearly one third, elected a member of the opposite party to the House, going against its presidential lean.

Photo

Photo

In 2012, there were only 53 such districts based on the presidential vote. But the decline in the number of ticket-splitting districts was sharper still. Of the 53 districts, just six, or about 11 percent, went against their presidential lean in their vote for the House.

Photo

Photo

Similarly, in 1992, there were 247 districts where the presidential vote was at least 10 percentage points more Republican or Democratic than in the country as a whole. Of these 42, or about 17 percent, split their tickets between their presidential and Congressional votes. Such splits are much rarer today. Of the 347 districts that were at least 10 points Democratic- or Republican-leaning in their presidential vote this year, only 6 (less than 2 percent) crossed party lines in their vote for the House.

There have been other periods in American history when polarization was high — particularly, from about 1880 through 1920. But it is not clear that there have been other periods when individual members of the House had so little to deter them from highly partisan behavior.

In the partisan era between 1880 and 1920, there were extremely rapid shifts in the composition of the House. For example, Democrats went from controlling 72 percent of House seats in 1890 to 26 percent in 1894. That is equivalent to Democrats losing about 200 seats in the House relative to today’s baseline of 435 Congressional districts.

Photo

But because there are so many fewer swing districts today, the amount of turnover in the House is much less. The 63 seats that Republicans gained in 2010 was large by modern standards — but relatively small by historical ones considering that there had been more than a 17-point swing in the national popular vote for the House.

This year also featured a relatively large swing in the popular vote for the House: Democrats won it by one point nationally rather than losing it by seven in 2010, an eight-point shift. But they gained only eight House seats out of 435. The House has arguably never been so partisan — and yet there have probably never been so few members of the House who were at risk of losing their seats.

One of the firmest conclusions of academic research into the behavior of Congress is that what motivates members first and foremost is winning elections. If individual members of Congress have little chance of losing their seats if they fail to compromise, there should be little reason to expect them to do so. Republican leaders like House Speaker John A. Boehner may conclude that there are risks to their party if they fail to reach a compromise, as during the current fiscal negotiations. But as David Frum points out, the individual members of his caucus may bear few of those costs directly.

Meanwhile, the differences between the parties have become so strong, and so sharply split across geographic lines, that voters may see their choice of where to live as partly reflecting a political decision. This type of voter self-sorting may contribute more to the increased polarization of Congressional districts than redistricting itself. Liberal voters may be attracted to major urban centers because of their liberal politics (more than because of the economic opportunities that they offer), while conservative ones may be repelled from them for the same reasons.

In this environment, members of Congress have little need to build coalitions across voters with different sets of political preferences or values. Few members of Congress today are truly liberal on social issues but conservative on fiscal issues or vice versa.

Instead, partisanship has become more uniform. This also marks a break from previous eras, such as when voting on economic issues in Congress was not strongly correlated with voting on civil rights.

What could reverse the trend toward greater partisanship? If one party were routinely being swept in elections, then perhaps individual members of the party would become more persuaded that their self-interest had become damaging to the party’s collective interest. But it is not yet clear that we have reached that point.

Republicans performed very poorly in elections for the Senate this year, and they have lost the last two presidential elections. But their loss in 2008 was almost inevitable because of the economic condition of the country and the unpopularity of George W. Bush. This year’s election was a more debatable case and might have been winnable for Mr. Romney, but Mr. Obama’s margin of victory was only slightly wider than might have been predicted based on the improved jobs numbers throughout 2012.

Meanwhile, Republicans continue to control the majority of governorships and state legislatures after their 2010 sweep.

And they remain in control of the House of Representatives, in part because the median Congressional district is now about five points Republican-leaning relative to the country as a whole. Why this asymmetry? It’s partly because Republicans created boundaries efficiently in redistricting and partly because the most Democratic districts in the country, like those in urban portions of New York or Chicago, are even more Democratic than the reddest districts of the country are Republican, meaning there are fewer Democratic voters remaining to distribute to swing districts.

Certainly, Republicans can’t be entirely happy with their predicament. The Electoral College now seems to disadvantage them at least slightly, and if they struggle in the 2014 and 2016 elections, a better case can be made that the party is underachieving.

But because of the way districts are configured, their position in the House should be quite robust: it would require a Democratic wave year, and not a merely decent election for Democrats, as in 2012, for Republicans to lose control of the House.

These strengths and weaknesses for the Republican Party could be self-reinforcing, or at least they may have the same root cause. The district boundaries that give Republicans such strength in the House may also impede the party’s ability to compromise, reducing their ability to appeal to the broader-based coalitions of voters so as to maximize their chances of winning Senate and presidential races. If so, however, that could mean divided government more often than not in the years ahead, with Republicans usually controlling the House while Democrats usually hold the Senate, the presidency, or both. As partisanship continues to increase, a divided government may increasingly mean a dysfunctional one.