Comparing the quality of governance between states can be challenging. The decisions state governors, legislators, city mayors and other elected officials make can have wide-reaching effects on state residents, and these decisions can sometimes take years to have an impact.

Aware of these inherent challenges, 24/7 Wall St. has for seven straight years reviewed the outcomes and conditions of every state in the country, ranking each based on finances as well as social and economic indicators. This year, for the fifth year in a row, North Dakota ranks as the best run state in the country. For the second consecutive year, New Mexico ranks worst.

16. California

> Debt per capita: $4,006 (17th highest)
> 2015 Unemployment rate: 6.2% (7th highest)
> Credit rating: Aa3/AA-
> Poverty: 15.3% (19th highest)

California is one of the largest and best performing economies in the country. The state’s GDP of $56,365 per capita is roughly $7,000 greater than the national average. Largely due to innovation in the state’s technology industry, California’s economy grew more than that of any other U.S. state last year. Growing 4.1% in 2015, California’s economy surpassed France and Brazil to become the sixth largest in the world.

Despite the strong economy, California has one of the worst school systems in the nation. Just 82.2% of California adults have graduated from high school, the lowest educational attainment rate in the country. California also spends relatively little on education. The state dedicates 28.0% of its total expenditures to education spending, which amounts to roughly $1,400 less on education per student than the average across all states.

There is no comprehensive measure of how well or poorly a government runs a state. Our basis for this ranking consists of measures of financial health and fiscal responsibility, as well as socioeconomic outcomes such as unemployment, poverty, and crime — conditions state governments are tasked with managing and improving.

Selecting appropriate criteria to compare 50 states is difficult because governing does not occur in a vacuum. Each state has different populations, obstacles, and means with which to work. Some states are more rural, while others are highly urbanized and densely populated. Some states depend disproportionately on one industry, while economies in other states are more diverse. Some states rely on high-skilled sectors, such as technology and business services, while others are rich in natural resources.

These circumstances can have a meaningful impact on where they rank in our list. North Dakota’s economy, for example, experienced a boom a few years back due to the explosive development of the Bakken shale oil formation. The consequent population and employment growth helped result in extremely low poverty and unemployment rates, and helped propel the state higher in the rankings.

The very resources that help some states can become a burden to those that are overdependent on them. The massive decline in global oil prices from the second half of 2014 through 2015 has taken a serious toll on state oil revenues. Should prices persist at these low levels, the socioeconomic benefits from the oil boom in these states may soon evaporate.

While some states’ economic fortunes are closely tied to the rise and fall of individual industries, which are often outside of the government’s control, each state must make the best of its own situation. Governments, as stewards of their own economies, need to prepare for the worst, including the collapse of a vital industry. Good governance is about balancing tax collection and state expenditure in a way that provides essential services to residents without sacrificing a state’s long-term fiscal health. Setting aside a rainy day fund and not incurring too much debt, for example, are ways to plan for the worst.

For a majority of states, the bulk of government revenue comes from taxes. To ensure a healthy tax base, states can create grants, subsidies, and incentives to encourage the growth of businesses in the region. Some of the best run states on our list have a high share of workers in professional, scientific, and financial jobs, which tend to be higher-paying.

The best run states also have growing populations, with many new residents likely attracted by educational and occupational opportunities. The best run states often attract the wealthiest, most educated residents, and, with the resulting tax revenue, can continue to promote smart economic development.

Rank State Debt per capita Unemployment rate Credit rating Poverty rate
10 Oregon $3,620 5.7% Aa1/AA+ 15.4%
9 Washington $4,407 5.7% Aa1/AA+ 12.2%
8 Colorado $3,103 3.9% Aa1/AA 11.5%
7 Texas $1,524 4.5% Aaa/AAA 15.9%
6 Iowa $2,031 3.7% Aaa/AAA 12.2%
5 Utah $2,446 3.5% Aaa/AAA 11.3%
4 Wyoming $1,586 4.2% No GO debt/AAA 11.1%
3 Nebraska $1,007 3.0% No GO debt/AAA 12.6%
2 Minnesota $2,882 3.7% Aa1/AA+ 10.2%
1 North Dakota $2,493 2.7% Aa1/AA+ 11.0%

Click here to see the best and worst run states in America: a survey of all 50.