Let’s imagine that you’re looking for a job and want to live in a city similar to your hometown.

Or, hypothetically, let’s say you run a large technology company that is searching for the location of another headquarters, and you want a place that feels like home.

You don’t have to guess. One reliable measure of how similar two cities are is their job mix, which reflects both local advantages and history (coal, a port, great universities) and local demand (a young population that needs teachers, or an older population that needs nurses).

The most similar pairing of American metropolitan areas, based on all job postings on Indeed.com in 2017, is Dallas and Atlanta. Both have unusually high concentrations of property accountants, security consultants and front office managers, and low concentrations of clinical nurses, home health aides and assistant professors.

Pick a random metro area

On a 100-point scale, where zero would mean completely non-overlapping distributions of job postings and 100 would be identical ones, the similarity between Dallas and Atlanta is 85. Often, the highest-similarity pairings are nearby or even in the same state: Miami and Orlando; Los Angeles and San Diego; Columbus and Cincinnati; and New York and Boston.

But among large metro areas, some far-away pairs are more similar than nearby rivals. These places are often more tied to the national or global economy than they are to their immediate backyards. The similarity score is above 80 for Los Angeles and Miami; for Tampa, Fla., and Phoenix; and for San Francisco and Boston. Each of those pairs is more than 1,500 miles apart. In fact, large places often have long-distance close cousins. Among the 10 metro regions most similar to San Francisco, six are more than 1,000 miles from the Bay.

Pick a random metro area

Midsize and smaller metros, though, tend to look more like their neighbors. Contrast San Francisco with, say, Rochester. The three places most similar to Rochester are Syracuse, Buffalo and Albany, all in upstate New York. Granted, there are more nearby cities in the dense Northeast than in the more sparsely settled West, but the general pattern still holds. For the largest metro areas, the most similar counterparts are 403 miles away, on average, compared with 176 miles for smaller ones.

Suppose you wanted to find a spot in a different part of the country or on a totally different scale, but with a relatively similar job mix. What’s the Rochester of the West, say? (Phoenix comes closest.) Or what is the smaller-town version of San Francisco? (Try our interactive and see.)

You or a company may even want a fresh start in a new city — something completely different. On the shortlist for Amazon’s second headquarters, for instance, Boston, Chicago, Philadelphia, Atlanta and Austin, Tex., are among the 10 metros most similar to Seattle, Amazon’s home base. Among those on the shortlist that are least similar to Seattle are Columbus, Pittsburgh and Indianapolis. The Washington, D.C., metro area — a plausible Amazon front-runner — is also on the dissimilar end of the continuum.

Some metros show up often as being similar to others. Kansas City, Mo., for instance, comes closest to being not just the Albuquerque of the Midwest, but also the Cape Coral of the Midwest, the Fresno of the Midwest, the New Haven of the Midwest, and more. Its mix of job postings looks most like the United States over all, with relatively few job titles either over-represented or under-represented.

After Kansas City, the places most like the nation over all are Atlanta, Dallas, Chicago and St. Louis.

Having a diverse mix of jobs that looks like the country over all might be a good thing: Economically diverse places tend to grow faster than those dominated by a particular industry, and diversity is a form of insurance against a single industry’s bad fortune. Broadly speaking, large metro areas have a job mix that looks more like the nation over all than smaller ones do.

In contrast, San Jose, San Francisco and Washington, D.C., are the large metro areas that look least like the United States over all. They all stand out for particular industries: tech in the Bay Area, and government in Washington. One thing that many large metros with an unusual job mix have in common is a higher cost of living. In the most expensive places, some jobs get priced out: It may not be worth it to put a back office or call center in Manhattan or San Francisco if it can as easily go somewhere cheaper.

Many of the decisions that affect the national economy are made in these unusual places — public policy in Washington and transformative technologies in the Bay Area. It gives fuel to critics who say these decision-makers should get out of their local bubbles, not only to take Rust Belt tours but also to go to places that look most like the country.