(Bloomberg) -- New federal data showing the median American household income has surged for the first time in nearly a decade contained plenty of great news. Just how great depends on where you live.
According to data released this week by the U.S. Census Bureau, the median household income, stagnant in recent years, rose 5.2 percent in 2015, to $56,516—the highest it's been since 2007 and the largest percentage gain since the census started keeping track in 1967. The poverty rate fell 1.2 percent, the largest percentage-point drop in 50 years.
The above chart, using American Community Survey data published today, shows the biggest gains in income among the largest 100 U.S. metropolitan areas. There are tech hubs and oil towns, cities big and small, and they're fairly evenly distributed across the country. (Notably, though, none is in the Midwest.) Income growth tended to be higher in cities with lower median incomes, a sign that economic prosperity may be spreading geographically.
But while income is an important part of a household's financial health, it’s not the only factor. There’s also the house.
In San Francisco, one of the most expensive housing markets in the country, the median income rose 5.5 percent last year, to just under $97,000—but the median home price surged, too, from $921,000 in 2014 to more than $1 million. Despite their fatter paychecks, it got harder, not easier, for most workers to buy a home.
To gauge where rising incomes have made buying homes more affordable, Trulia chief economist Ralph McLaughlin compiled metro-level income and housing market data, looking to see whether mortgage payments were likely to take up more or less of a household’s total income.
For instance, incomes in Hartford also rose 5.5 percent last year, tying for the 28th largest income gain among big metropolitan areas. At the same time, median home prices ticked down 2 percent, to $214,000—putting Hartford at the top of McLaughlin's list for cities where buying a home became more affordable. By contrast, in some traditionally expensive housing markets—including San Francisco, San Jose, Miami, and Denver—rising incomes were outflanked by rising housing costs.
"On the whole, the poorest markets saw the largest income gains and in a lot of cases didn't see housing costs rise," McLaughlin said in an interview.
But in the most expensive housing markets, incomes didn't rise quickly enough to keep pace.