(Win McNamee/Getty Images)

Residents in all 50 states have a dim view of the economy, but for people living in the nation’s capital everything’s coming up roses.

For the past two years, D.C. has been the only place in the nation where economic confidence was positive in Gallup’s annual state-level survey. And it’s routinely leagues ahead of even the most optimistic state.

In 2013, D.C. scored a 19 on Gallup’s economic confidence index. Massachusetts was the leader among states, at -1, while confidence was worst in West Virginia, which scored a -44. The 2013 scores are based on nearly 180,000 interviews nationwide over the course of the year. The index ranges from -100 to 100 and is based on how respondents rate the economy currently and whether they see things improving or getting worse.

The capital was far and away the most optimistic region in the survey, but its lead has significantly narrowed from the year before.

“[D.C.’s] confidence has taken a hit, however, since 2012, when its index was +29,” Gallup reported. “Likely factors in the 10-point drop include October’s federal government shutdown as well as the sequestration spending cuts that occurred earlier in the year.”

Almost half the states scored between -10 and -20. Massachusetts, Minnesota and California were most confident. Wyoming, Alaska and West Virginia were the least. Confidence improved in all but four states.

Economic confidence could have implications for this year’s elections, too. Eight of the 10 least confident states were also among the bottom 10 in presidential job approval. Five the the top 10 most confident states were among the top 10 in job approval.

“Candidates running on Republican tickets can attempt to paint this economic dissatisfaction as the fault of the Democratic president,” Gallup notes. “Democratic candidates, on the other hand, will have to be sensitive to the low levels of economic confidence across the country — particularly for Democrats running in the bottom 10 states.”

Economic confidence by state. (Gallup)