The proportion of Republicans, Democrats, and independents that turnout to vote shape the outcome of every election. Even small shifts in these percentages can dramatically alter political outcomes. And this November’s midterm is no exception.

But estimating the partisan composition of the electorate – and especially making comparisons over time -- is trickier than you might think.

Gallup underscored this point earlier this week, showing how shifts in partisan identification over the past two years have produced more politically “competitive” states, as fewer Americans identify as Democrats.

The number of states categorized as “solid Democrat” or “lean Democrat” has dropped from 36 in 2008 to 23 in 2010.  Solid or leaning Republican grew from 5 to 12 during the same time period.

Jay Cost at Real Clear Politics does a nice job explaining why Republicans are competitive on the national electoral map while still lagging the Democrats on party ID in so many states.

Gallup grouped states based on self-identified party identification. The study was based on more than 175,000 interviews with adults conducted between January and June 2010 as part of the survey organization’s daily tracking.

In addition to analyzing state-based shifts for the past couple of years, Gallup also reports trends in national party ID between 2008 and this year.

Here too, the shifts are no better for President Obama and his party. The proportion of adults identifying with the Democrats dropped by 8 percentage points (52 to 44 percent) over the last two years, while the percent saying they are Republicans (including those leaning toward the GOP) remained the same at 40 percent.  The share of pure independents doubled from 8 percent in 2008 to 16 percent in 2010.

The increasing number of independents is not surprising, as we move toward an off year election.  Since at least World War II, the number of non-aligned falls in a presidential election year and then crescendos as the midterms approach.  That shift is happening again right now.

These changes, however, demonstrate that the precise partisan configuration of the electorate is always in flux.

Another part of the confusion arises from the term “party-identification” itself.  When pollsters talk about the concept, they refer to self-identification – how a person chooses to describe themselves in a survey (“generally speaking do you think of yourself as a Republican, Democrat or Independent?”).

This differs from formal party registration requirements that exist in some states.  For example, a person may have registered to vote as a Democrat 20 years ago, but now feels closer to the GOP and tells a pollster he or she is a Republican.  Or maybe a voter liked President Bush in 2000 and as a result responded to a poll by saying she was a Republican. But, inspired by Barrack Obama’s campaign in 2008, they are now more comfortable calling themselves a Democrat.

Political scientists agree that these kinds of shifts are more common among people with weaker partisan attachments.  It’s probably more likely that people who call themselves independent might shift into a weak partisan category based on short-term factors, like excitement about a candidate or a scandal affecting the party with which they previously aligned.  Strong partisans are less likely to shift, but research also shows a small percentage sometimes does.

Had the 2008 electorate exhibited the partisan breakdown Gallup found in their most recent study, John McCain would have still lost, but by a much smaller margin.  If you assume the electorate would vote in the same way in 2010 compared to 2008 (i.e. both McCain and Obama receive about 90 percent of their respective partisan voters and Obama narrowly wins among independents, a shift in 8 points from the Democratic side, where 90 percent voted for Obama, to the independent column, where only 52 percent voted for Obama) it would have produced millions of additional votes for McCain, turning an 8 million vote win for Obama into a razor thin victory.

For the same reason, this shifting partisanship pattern could doom many Democrats in marginal seats in November.  The difference between an electorate made up of 52 percent self-identified Democrats and one with only 44 percent will cost them millions of votes.  Moreover, the enlarged share of independents also tilts more Republican now on measures like the generic ballot compared to 2 years ago. Finally, the Gallup numbers demonstrate a shift among all adults. Other polls have shown Republicans garner an even larger share of the generic ballot among likely voters.

These swings in the composition of the electorate – assuming they continue through for the next 100 days – could spell real trouble for congressional Democrats this November.