Not all posh neighborhoods are exclusive. Sure, some are so upscale that the mail carrier is the only working-class person you’ll see. Others are wholly affordable. More rare is a third kind of place, where swanky homes share the curb with starter condos.

We think these places are important because they bring people of different incomes closer together — as neighbors.

Sure, these neighbors live in different homes. One is bigger than the other, and it probably has a nicer refrigerator. But out in the neighborhood, local families share the same safe parks and sidewalks. And they’re in the same school district.

We know that home prices and incomes are different things. But they are tied together in a meaningful way. As a family’s income increases, they can afford a more expensive home.

Although places with a balanced mixture of home prices cover just 13 percent of our cities, experts say they’re good for society. A report from the Pew Charitable Trusts found greater economic mobility in neighborhoods with a wide range of incomes than in neighborhoods where incomes were mostly the same.

So where are these neighborhoods? Janitors, mail carriers and attorneys in Boston should check out Egleston Square, a neighborhood with a healthy mix of home prices. In Denver, there’s Jefferson Park.

Boston tops our list of economically integrated cities, with 51 percent of the city having a balanced home price mix. Baltimore and San Francisco are both near the bottom, at 10 and 11 percent. But the details matter. Eighty-eight percent of San Francisco is covered by homes that a middle-income San Francisco family can’t afford. Baltimore families, on the other hand, can afford to buy in 86 percent of Baltimore.

When we zoomed in, we were surprised by what we found, even in Redfin’s home city of Seattle. Queen Anne, for example, feels like one of the city’s swankiest neighborhoods. But it’s also a place where median-income families can afford to buy. In this area, shops and condos were built on the former site of a single shop and parking lot. This made an invitation for working-class folks to live in a neighborhood where the existing housing stock was out of reach.

We know that transforming a shop and parking lot into working-class homes is a big, messy recipe with lots of ingredients. But zoning is one of the key ingredients, and it’s something cities can bring to the table. So whenever this happens, it shows us that a city can control its own destiny. The experts think so too:

It can take decades for a city to change its housing mix. In the meantime, measuring how places stack up, and highlighting neighborhoods with a balanced housing mix, is one way to get the conversation started.

To find these communities, we tallied the affordability of millions of homes by comparing their sale price to the purchasing power of a local, median-income family. Addresses were labeled as either affordable or high-end and then packed into a high-resolution grid to see how much area in each city and neighborhood fit into three categories: mostly affordable, mostly high-end or a mixture of affordable and high-end. This was like shaking two colors of sprinkles onto a checkerboard and counting the sprinkles on each square.

If an area had more than three affordable houses or condominiums sold for every expensive one, we labeled it affordable. Areas with more than three pricey homes sold to every economical one were considered high-end. In between were the balanced areas, with a wide range of home prices.

This was a simple analysis, and there’s more to come. But it highlights something we’ve been thinking about at Redfin. Most cities have neighborhoods with a mix of high-end and affordable homes. For homebuyers, it’s not impossible to find these places. It’s just really hard. And we can help you find them.

We used sale price data from Redfin and 2014 city-specific median family income from the American Community Survey. For purchasing power, we kept it simple: 20 percent down on a 30-year loan at 4 percent, with 28 percent of monthly family income going toward the mortgage and principal. To get the price mix of different areas, we summarized homes in a 500 meter grid. After that, we classified each grid cell as one of the 3 categories. Percentages are the area in a category.

Here’s what the raw data looked like, with affordable homes in blue, high-end homes in red, and a mix of affordable and high-end homes in purple:

Economically Integrated Neighborhoods In American Cities

For more on this story from the Associated Press, click here.

Want to receive reports like these regularly? Click here to join our media email list.

Other popular posts:

1. How Parents Can Grant Teens Privacy While Overseeing Their Well-Being at Home

2. How to Create the Ultimate Hobby Room for Kids

3. The Senior’s Guide to Moving in with a Roommate