Housing remains in high demand in most of the nation, but the housing recovery looks increasingly uneven, depending on location.

Whether buyers are shopping for their own homes or for investment properties that will throw off some cash, certain markets are becoming far more lucrative than anyone might have expected just a few years ago. Still, some of the hottest markets are falling from grace.

A few of the recession’s hardest-hit housing markets have suddenly some of the healthiest. Tampa, Florida, which lost thousands of homes to foreclosure in the past decade, now takes the title of the nation’s healthiest housing market, at least according to TenX, a real-estate auction and analytics company. It rated locations based on a number of key factors, including population and job growth, unemployment rate and wage growth, as well as industry-specific indicators like inventory and construction.

Florida is recovering very nicely from an economic standpoint,” said Rick Sharga, chief marketing officer at TenX. “We’ve seen unemployment numbers drop pretty dramatically there. We’ve seen job growth and wage growth stick for a few years now, and we’ve seen a very steady increase in both the sales of homes and home prices.”

Jacksonville, Florida, also made it into the Top 5, based on the same criteria. Las Vegas made a surprise appearance at No. 4 on the list. That city served as ground zero for the housing crash, clocking the highest foreclosure rate in the nation. Prices there are still about 20 percent below their peak of the housing boom, but that is only adding to the area’s allure.

“What we’re seeing is a return to population growth. Prior to the housing bust, Las Vegas had some of the steadiest population growth in the country. We’re starting to see that again,” said Sharga. “And we’re starting to see job growth.”

Not so surprising is No. 2 on the list, Dallas , which didn’t go through the boom to bust that much of the nation did during the recession. The area is seeing consistent employment growth, fueled by its very diverse set of industries of professional and business services, health care and leisure/hospitality. Its population nearly tripled the national rate in 2015.

On the other end of the spectrum, Northern and central New Jersey hit rock bottom of the list. Home prices there are high, while job and population growth are lackluster. Los Angeles and San Francisco are suffering from other ills, namely affordability. Prices are so high and inventory so weak that the potential for both sales and price growth are very low.

Healthiest housing markets

Tampa
Dallas
Columbus, Ohio
Las Vegas
Jacksonville

Unhealthiest housing markets

Northern New Jersey
Central New Jersey
Long Island, New York
San Francisco
Los Angeles