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.

7. Texas

> Debt per capita: $1,524 (6th lowest)
> 2015 Unemployment rate: 4.5% (18th lowest)
> Credit rating: Aaa/AAA
> Poverty: 15.9% (14th highest)

Over the last half decade, Texas has steadily risen in the ranking of best run states. Ranking 36th in 2010, Texas has climbed quickly over the years and is now ranked seventh.

Rapid population growth is often a bellwether of a well managed state. In the last five years, 1.2 million more people have moved to the Lone Star State than have left, the second largest net migration of any state in the country. The state’s economy accommodated the influx handily. Last year, only 4.5% of the Texas labor force was out of a job, lower than the 5.3% national unemployment rate. The state’s budget also appears well managed and relatively well equipped to weather an economic downturn. It has the highest possible credit rating from Moody’s and S&P. Also, the state has managed to save nearly a fifth of its total expenditures, a larger share of rainy day funds than all but two other 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.