Party identification or affiliation by state. (Gallup)
Democrats' shrinking blue-state advantage. (Gallup data) (Gallup data)

The Democratic Party’s advantage in the states was halved last year, continuing a dramatic multi-year decline.

In 2008, Democrats had a 30-state advantage in party affiliation over Republicans, according to state-level Gallup surveys. Last year, that advantage among states fell to just three.

With 36 governorships and 36 Senate seats on the line in this year’s midterm elections and Democrats trying to protect Senate seats in the solid-red states of South Dakota, Montana and Alaska, Republicans have reason for optimism.

“[T]he political climate appears relatively auspicious for Republicans,” Gallup reports.

But Republican success isn’t inevitable. State partisanship doesn’t always match voting patterns and, nationally, the share of people identifying as Republican is at a 25-year low trailing Democratic affiliation by six points. The share of people identifying as independents is at a quarter-century high. And a shift in President Obama’s approval rating by election time could also affect national party identification levels. Plus, the elections will be coming roughly a year after Gallup’s survey data was collected.

Still, Democrats have seen their state advantage significantly erode over the past six years:

Three states — South Carolina, South Dakota and Oklahoma — joined the solidly red category between 2012 and 2013, bringing that total to 12, up from just four in 2008. Over the six-year period, there was a shift at the extremes: there was a big dropoff in solidly Democratic states and a big gain in solidly Republican states. The number of competitive states is now nearly twice what it was in 2008, as well. There was little change, however, to states that lean either blue or red.

The Democratic advantage was strongest in Washington, D.C., where the gap between party affiliation was 58 percentage points. Among states, New York was the leader with a 25-point advantage to Democrats. Democrats enjoyed an at least 20-point advantage in Hawaii, Rhode Island, Massachusetts and Maryland, too.

The Republican advantage was strongest in Wyoming, where the gap between parties was 40 percentage points. In Utah, the gap was 35 points, while Republicans had an at least 20-point advantage in North Dakota, Idaho, Kansas and Alaska as well.

Party strongholds are also largely geographically isolated, with few states that favor one party sharing a border with a state favoring the other. Oregon and Washington both lean blue and touch solid-red Idaho. The solid-red Dakotas share a border with blue Minnesota. And a small sliver of the solid-red Oklahoma panhandle touches solid-blue New Mexico. In the rest of the country, no state with even a mild preference for one party touches another.

Competitive states were defined as those where affiliation for the parties fell within five percentage points of each other. Leaning states were those where one party had a 5 to 10 point advantage. And solid states were those where one party led the other by at least 10 percentage points. Affiliations are based on 178,000 Gallup interviews conducted throughout 2013, with at least 1,000 respondents all but 10 states.