A construction worker walks through the 8th street entrance of the City Market at O Street development at in Washington on November 13, 2013. At left are luxury apartments, right, the Cambria Suites Hotel and additional amenities. (Photo by Linda Davidson / The Washington Post)

Back in 2005, before the new apartments went up in NoMa, and along 14th Street, and near the Nationals' ballpark, there was more housing in D.C. renting for less than $500 a month than for more than $1,500*. In the decade since, fortunes at the top and bottom of the city's housing market have swiftly flipped. By 2012, the most expensive rental units outnumbered the cheapest ones — by more than a three-to-one ratio.

The changing shape of the city's housing over this short time reflects two powerful trends that are playing out in other big cities, too: Housing that was once more affordable has grown less so, while most of the new housing that's been built has catered to wealthier (and newer) residents.

The below chart, from a stark new data visualization of the city's housing market by the Urban Institute, tells the rental side of this story. It shows that, yes, the city has more rental housing today than a decade ago. But those gains have been to the benefit of people able to pay more than $1,000 a month for housing -- and at the expense of residents who can only afford substantially less than that:

Aggregate all rental housing, without taking into account number of bedrooms. Interactive version here. (Urban Institute)

"We want to provide people with some context and some more hopefully objective information about the changes happening in the city, because everyone knows the city is changing — it’s very visible," says Peter Tatian, a senior fellow at the Urban Institute who worked on the project. "But people experience and perceive that change in different ways depending on their point of view."

What feels to a young professional in the city like a glut of housing options, as Lydia DePillis wrote in August, may feel to a low-income family like a dearth of them. And change that's welcome to some residents — bringing better housing, newer restaurants, more entertainment — may feel to others like the end of affordability.

In the homeowner market, the trajectory of a city that's grown more expensive is equally visible. This chart shows the median sales price* of homes in each ward of the District.

Aggregate single-family home prices, without taking account number of bedrooms. (Urban Institute)

That picture captures the gulf between highly desirable Ward 2 and Ward 3 -- Northwest Washington -- and much of the rest of the city. It also shows how gentrification began to set in at different times in the remaining parts of the city, accelerating at different speeds.

Over the decade, the city has experienced a housing boom in both rental apartments and new in-fill single-family homes.

But despite the common perception that most of that new construction has taken place in a few parts of the city, data from NeighborhoodInfo DC, drawing on city property-tax records, show that nearly every corner of the city has increased its housing supply. In some cases, like east of the Anacostia River, this map captures once-vacant single-family homes that were redeveloped and reoccupied (returning to property tax rolls), rather than new wholesale construction:

Over the last decade, the physical face of the city has changed dramatically, as its demographics have, too. Recent new arrivals to the District have been more likely to be young, upper-income and childless than existing residents. That also partly explains who developers have in mind as they're building new housing.

As a result of all these changes, the number of studio apartments in the city affordable to extremely low-income residents (making less than 30 percent of the area median income) has plummeted in a decade, while the number affordable to residents earning around the median or more has quadrupled:

Urban Institute

It appears in the Urban Institute's data as if concentrations of subsidized housing are located in parts of town where home prices are also rising the fastest, like in Shaw, Logan Circle, and Columbia Heights, putting them particularly at risk. But these same forces put pressure on the city's middle-income residents, too, pushing homeownership out of reach, or saddling renters at higher rungs on the income scale with housing costs that they struggle to bear as well.

None of this is an only-in-D.C. story. But the change here has been particularly swift.

*Inflation-adjusted, 2012 dollars