Most U.S. housing markets are healthy, but a few are being hurt by the loss of jobs due to the lower gas prices, according to the Nationwide’s Health of the Housing Markets Report issued Tuesday.

In 23 percent of 400 metropolitan areas included in the study, housing affordability (the price of housing compared to income levels) is lower than the long-term average of the area. Relative affordability is approaching or has reached unhealthy levels in the Pacific Coast, Colorado, Texas and pockets in the East, Nationwide says.

Housing markets in most areas are healthy, however, and there is little chance of a downturn in the near term, according to Nationwide. A healthy market has a balance of increasing home prices along with increasing incomes, available mortgages and low unemployment, according to Ben Ayers, an economist with Nationwide.

Some metropolitan areas where the economy is heavily invested in the energy sector are being hurt by rising unemployment. Energy companies, particularly oil, are cutting back production because of low prices and are laying off workers, Ayers says.

Texas is an example of both sides of the coin. Housing markets in Dallas, Austin, Houston and San Antonio are running very hot, Nationwide says, while all of the bottom 10 areas where housing markets are weakening are also in Texas, as well as Louisiana, Wyoming and West Virginia, where there are strong ties to the energy industry.

The most sustainable current housing markets, meaning increases in housing prices are matching long-term increases in incomes, are in Buffalo, N.Y., Louisville, Ky., and Oklahoma City and Detroit.

“On a national level, housing affordability is fairly valued, with little sign of a housing price bubble,” says David Berson, Nationwide’s senior vice president and chief economist. “However, certain areas are seeing price appreciation that is too rapid compared with income growth, potentially driving homebuyers out of the market.”

The best markets are, in order, Kankakee, Ill.; Harrisburg-Carlisle, Pa.; Dayton, Ohio; Yakima, Wash.; Lansing-East Lansing, Mich.; Buffalo-Niagara Falls, N.Y.; Lancaster, Pa.; Niles-Benton Harbor, Mich.; Battle Creek, Mich., and Muskegon, Mich.

The worst housing markets are, in order, Casper, Wy.; Sherman-Denison, Texas; New Orleans-Metairie, La.; Houma-Thibodaux, La.; Lafayette, La.; Hammond, La.; San Angelo, Texas; Dallas-Plano-Irving, Texas; Charleston, W. Va., and Beckley, W. Va.

The areas showing the most improvement in the past year are Niles-Benton Harbor, Mich.; Mankato-North Mankato, Minn.; Glens Falls, N.Y.; Muskegon, Mich.; Brunswick, Ga.; Dover, Del.; Eugene, Ore.; Warren-Troy-Farmington Hills, Mich.; Flint, Mich., and Brownville-Harlingen, Texas.

The areas that weakened the most in the past year are Lafayette, La.; New Orleans-Metairie, La.; Charleston-North Charleston, S.C.; Sioux Falls, S.D.; Ithaca, N.Y.; Alexandria, La.; Sherman-Denison, Texas; Rapid City, S.D.; Texarkana, Texas-Ark., and Worcester, Mass.