The population of the United States living in urban areas is growing faster than the national rate. At last count, more than four in five Americans lived in a metropolitan area, an increase of over 12 percent in the last decade. Meanwhile, the proportion of Americans living in rural areas declined. If this trend continues, nearly all Americans will live in megacities in the near future.

Regardless of whether this happens, more pressure will be placed on mayors to manage their growing populations. 24/7 Wall St. has completed its second annual ranking of the 100 largest cities in the U.S., based on local economies, fiscal management and quality of life measures. To evaluate how well a city is managed over the long-term, we looked at factors like the city's credit rating, poverty, education, crime, unemployment, and regional GDP. The best-run city this year is Plano, Texas. The worst-run is San Bernardino, Calif.

Measuring the effective governance of a city and comparing it to others can be challenging. Each city has its own unique challenges and advantages. The strength of the regional economy, the level of state funding, and the presence of major corporations or industries can all impact a city’s prospects. They play a big part in a city’s employment levels, safety and fiscal stability.

All those factors, of course, are directly affected by how a city is managed. Mayors, school boards, and city councils all have a role to play in that regard. All of these groups must work with the resources available to keep budgets balanced.

24/7 Wall St.: The best- and worst-run states in America

Many of the best-run cities either have at least one industry that is supporting the labor force, or are close enough to major urban centers, such as Dallas, Phoenix and San Francisco, to benefit from jobs available there.

The economies of the worst-run cities fall into two categories. Some were badly damaged by the housing price collapse. These include Riverside and Stockton in California and Las Vegas, Nevada. Others have had much more long-term economic troubles. These include Detroit, St. Louis and Cleveland, whose once-booming manufacturing-based economies have been decimated by jobs going overseas.

Fiscal management is another factor that had a strong impact on where cities ended up on our list. The majority of the best-run cities had their general obligation debt rated Aaa by Moody’s. None of the worst-run cities received that perfect score; some, such as Detroit and Stockton, were rated below investment grade. Stockton is notable for actually defaulting on its debt in June of last year.

These are the best and worst-run cities in America:

Best -run cities

1. Plano, Texas

· Population: 271,380

· Credit rating: Aaa, no outlook

· Violent crime per 1,000 people: 1.62 (2nd lowest)

· Unemployment rate: 6.9 percent (13th lowest)

Plano, based in the Dallas-Fort Worth metropolitan area, is the best-run city in America. Among households in the city, 14 percent earned over $200,000 in 2011, the fourth-highest proportion of all cities. Meanwhile, a mere 1.9 percent of households earned under $10,000, which was the second-lowest of all cities. The city’s 1.62 violent crimes per 1,000 people is the second-lowest of all large cities. Plano is home to many corporate headquarters, including J.C. Penney and Dr. Pepper Snapple Group. These companies are among the 10 largest employers in the city. The city appears to be largely unaffected by the housing crisis. The median home price rose by more than 5 percent between 2007 and 2011, while the national median price fell by more than 10 percent.

2. Madison, Wis.

· Population: 236,889

· Credit rating: Aaa, stable

· Violent crime per 1,000 people: 3.48 (15th lowest)

· Unemployment rate: 4.9 percent (2nd lowest)

Madison is home to the state capitol, as well as the University of Wisconsin’s flagship campus. In addition, the region is a base to employers in fields such as technology and health care. The unemployment rate of 4.9 percent in 2011 was the second-lowest among all large cities in the U.S. Of the city's adult population, 54 percent have a bachelor's degree, the third-highest rate among the top 100 largest cities. In December, the Madison City Council adopted a rule banning the government from using emergency reserves to fund the operating budget unless two-thirds of members vote otherwise. With the city exercising this kind of caution, it is no surprise Moody’s analytics rates madison general obligation debt as a perfect Aaa, with a stable long-term outlook.

24/7 Wall St.: The 10 most-hated companies in America

3. Irvine, Calif.

· Population: 215,511

· Credit rating: Not rated

· Violent crime per 1,000 people: 0.56 (the lowest)

· Unemployment rate: 6.5 percent (tied- 11th lowest)

With almost 97 percent of residents aged 25 and over with at least a high school diploma, and with nearly 63 percent with at least a bachelor's degree, Irvine has the most educated population of all of the 100 most populous cities. The city’s high educational attainment has translated to a highly compensated population -- a whopping 18.8 percent of households earned more than $200,000 in the last year. Irvine has the lowest violent crime rate of all the 100 largest cities, with just 0.56 violent crimes per 1,000 people in 2011. Irvine’s government has received a lot of flack recently for its efforts to transform the Orange County Great Park, with critics arguing that more than $200 million worth of spending has gone to waste. The newly elected City Council has pledged more oversight on spending and has terminated contracts with two firms working on the project.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

4. Lincoln, Neb.

· Population: 262,350

· Credit rating: Aaa, stable outlook

· Violent crime per 1,000 people: 3.71 (18th lowest)

· Unemployment rate: 3.9 percent (the lowest)

Lincoln’s 3.9 percent unemployment rate in 2011 was the lowest of all metropolitan areas in the country. The city is home to the University of Nebraska’s flagship campus, which employs more than 8,000. Like Omaha, Lincoln has been spared from the recession more than most places. Home values rose 2.7 percent between 2007 and 2011 compared to a 10.7 percent drop nationwide. In 2011, just 0.36 percent of Lincoln’s homes were in foreclosure, the eighth-lowest rate among large cities. Like many of the other top-rated cities, Lincoln’s general obligation debt is rated as a perfect Aaa, with a stable outlook.

5. Fremont, Calif.

· Population: 216,912

· Credit rating: Not rated

· Violent crime per 1,000 people: 1.77 (6th lowest)

· Unemployment rate: 7.5 percent (tied- 23rd lowest)

Fremont was incorporated in 1956, joining five towns together as a single city. The city is near the core of Silicon Valley, while also connected to San Francisco by the Bay Area Rapid Transit system. It has one of the most educated and high-earning populations in America, with over 51 percent of residents age 25 and older holding a college degree in 2011. That year, median household income was $92,665, the highest of any large city in the U.S. The city has an exceptionally strong manufacturing base, with almost 22 percent of working adults employed in the sector. Among the companies with manufacturing operations in Fremont are tech manufacturers Western Digital and Seagate Technologies, as well as electric car builder Tesla Motors.

Worst-run cities

1. San Bernardino, Calif.

· Population: 213,008

· Credit rating: not rated

· Violent crime per 1,000 people: 8.76 (27th highest)

· Unemployment rate: 17.6 percent (3rd highest)

Few cities were hurt by the housing crisis to the same extent as San Bernardino, where the median home value declined by 57.6 percent between 2007 and 2011, more than any other large city in the U.S. By the end of 2011, almost 4.4 percent of homes in San Bernardino were in foreclosure, among the highest rates for all large cities. That year, the unemployment rate reached 17.6 percent, or nearly double the U.S. rate and almost 10 percentage points higher than city’s annual rate in 2007. In August, declining home values and rising employee retirement costs forced the city to file for bankruptcy. But the city’s filing is being challenged by its largest creditor, the California Public Employees' Retirement System, which is demanding payments.

2. Miami, Fla.

· Population: 408,760

· Credit rating: A2, negative outlook

· Violent crime per 1,000 people: 11.98 (12th highest)

· Unemployment rate: 12.4 percent (17th highest)

Between 2007 and 2011, the median home value in Miami fell by 43.5 percent. Additionally, the city had one of the nation’s lowest median household incomes, at under $29,000, while 31 percent of residents lived below the poverty line -- nearly twice the U.S. rate of 15.9 percent. Despite the difficult economic conditions Miamians faced, the city joined with Miami-Dade County to pay for almost 80 percent of the more-than $600 million cost of building a new baseball stadium for the Miami Marlins. The deal has caused significant uproar. While taxpayers pay extremely high costs to service the stadium debt, the team has traded many of its top players. In 2011, the SEC launched an investigation into the agreement.

24/7 Wall St.: Nine beers Americans no longer drink

3. Stockton, Calif.

· Population: 296,367

· Credit rating: Caa3, negative outlook

· Violent crime per 1,000 people: 14.08 (8th highest)

· Unemployment rate: 20.2 percent (the highest)

Last year, Stockton was unable to fund its pension liabilities and make debt-service payments. As a result, it became the largest city in U.S. history to file for bankruptcy. The city had been especially hurt by the recession. Its unemployment rate for 2011 was above 20 percent, while more than 5 percent of homes were in foreclosure -- both among the highest rates for any large city. Just before the bankruptcy filing, Moody’s downgraded the city’s credit rating to account for the likelihood of a default. Moody’s noted, “The Caa3 rating level assumes losses to bondholders will be greater than 20 percent. The negative outlook reflects the high likelihood that losses could exceed our estimates.” Not only have the city’s creditors been affected, but so have city employees and retirees. According to NPR, the city may cut health benefits to reduce its $417 million in unfunded liabilities.

4. Detroit, Mich.

· Population: 706,640

· Credit rating: Caa1, negative outlook

· Violent crime per 1,000 people: 21.37 (the highest)

· Unemployment rate: 19.9 percent (2nd highest)

Detroit was hit hard during the recession, with the near-collapse of the automobile industry and a further slowdown of the already embattled housing market. The median home value between 2007 and 2011 tumbled by 43.5 percent, or more than four times the rate of decline across the country. The lack of income coming into the city’s coffers in the last few years has led to significant financial difficulty for Detroit. Moody’s currently rates city’s bonds as Caa1, which is considered junk status and the worst-rating Moody’s gave to any major city. Mayor Dave Bing signed a budget that aims to cut $250 million in the 2012-2013 fiscal year, with total spending of $1.12 billion.

5. Hialeah, Fla.

· Population: 229,967

· Credit rating: not rated

· Violent crime per 1,000 people: 3.78 (18th lowest)

· Unemployment rate: 14.1 percent (tied- 9th highest)

Home prices between 2007 and 2011 fell by 44 percent in Hialeah, the 10th-highest decline of all 100 largest cities. The median household income of $27,208 in 2011 was the third-lowest of all major cities, after declining by 44 percent during the recession. Of workers residing in Hialeah, 15.5 percent worked in the generally low-paying retail trade, the highest percentage of all of the 100 largest cities. As a result of industry composition, nearly 40 percent of city residents are without health insurance, higher than any other large city in the U.S.

How did your city do? Click here to read all of the best- and worst-run cities