The appeal of New York City is, in large part, the appeal of all its amenities: the diners, department stores, bodegas, sushi restaurants and random Polish bakeries. New York is the kind of place where you can run around the corner for a missing ingredient, where you can get a blowout without the haircut, where ordering Chinese means choosing between Hunan or Sichuan or Cantonese.

When people pay a lot to live there, this is part of what they're paying for — the opportunity to access all this stuff. More than ever, thriving (and expensive) cities are centers of consumption. All these businesses need cities to produce consumers. But these businesses also make cities like New York what they are, drawing consumers to them.

Consider this map, from a new City Observatory report, of the three-mile radius around the central business district in Manhattan. Every dot represents a storefront of some kind, a consumer-facing business where you might buy dinner or books or art supplies, or any number of other goods and services:

Within that three-mile radius, the City Observatory Storefront Index counts 9,905 such places, which is, not surprisingly, far more than at the heart of any other U.S. city (and that geography includes a lot of water). That map is a distillation of why so many people want to live in New York.

The direct comparison to other cities is a little unfair — New York is in a league of its own. But the broad pattern applies: Dense destinations such as these are a sign of the economic health of a city or neighborhood. The allure of San Francisco, much smaller than New York by population, is clear when you map it this way as well:

By contrast, here is St. Louis:

And Detroit:

To produce these maps, City Observatory's Joe Cortright and Dillon Mahmoudi used 2014 data from a compilation of national business directories (so, this is not census or government data). They winnowed out businesses that primarily serve other businesses, such as manufacturers, and locations including banks and hospitals.

They were trying to quantify, instead, the types of places that serve the everyday needs of individual shoppers and households — the storefronts that reflect your quality of life when you want a six-pack or need a hardware store. The 44 categories here also include barber shops, toy stores, movie theaters, art galleries, thrift stores, music venues and fruit markets. Having these kinds of places nearby is a major benefit of city living, as Cortright writes:

In effect, the city is an important labor-saving technology. The advent and spread of washing machines, vacuum cleaners, dishwashers and power lawnmowers reduced the amount of time required to undertake routine household tasks—and thereby led to real improvements in living standards (both by enabling greater participation in paid labor and through an increase in time available for leisure activities). Similarly, cities reduce the amount of time households need to spend searching for and traveling to different locations to select, acquire and consume many goods and services.

The analysis also counts only such storefronts that have a neighboring storefront located within 100 meters, or several city blocks. So the most isolated corner stores, or Costcos surrounded by acres of parking lots, aren't included. The idea was to try to get at businesses that might be within walking distance of each other (and to weed out noise in the data).

"It's not meant to be comprehensive so much as indicative," Cortright says. The resulting geographic data, available for use by other researchers, show not only which cities are thriving, but who has access to these kinds of amenities within cities. Here, for example, is Washington:

Zoom out beyond the downtown core, and it's clear that there are fewer businesses east of the Anacostia River in lower income, predominantly minority parts of the area:

This kind of data can be used to document retail redlining, the practice of businesses that shun certain neighborhoods. Or it could be used to track neighborhood change over time. Here, from the report, is the neighborhood around Alberta Street in Portland, Ore., in 1997 and then 2014:

All of these little dots also reveal the underlying shape of cities. In Orlando, storefronts primarily cluster along main thoroughfares (which aren't particularly walkable) …

Here is more tightly packed Philadelphia (shown on the same scale):

And here is New Orleans, where the the density of destinations in the French Quarter also reflects the city's tourism economy: