It’s long been clear that urbanization and automated technologies are shaping society, but it hasn’t been obvious how the two forces affect each other.

Until now, perhaps. A new study from MIT’s Media Lab posits that the smaller the city, the greater the impact it faces from automation. The finding, they say, could encourage legislators to pay special attention to workers in smaller cities and offer them support services.

Other researchers have attempted to measure the effect of technology on employment in cities, but the Media Lab authors, who have identified which jobs and skills tend to be more prevalent in smaller cities and larger ones, claim to be the first to explain why different U.S. cities are more susceptible (or resilient) to technological unemployment. (Though the authors did not define “small” and “large” in their paper, they say that cities with fewer than 100,000 inhabitants will experience more disruption.)

They say that bigger cities have a disproportionately large number of jobs for people who do cognitive and analytical tasks, such as software developers and financial analysts—occupations that are less likely to be disrupted by automation. Smaller cities have a disproportionate amount of routine clerical work, such as cashier and food service jobs, which are more susceptible.

This interactive map shows how automation is expected to affect jobs in individual U.S. cities.

The five U.S. metropolitan areas that are expected to experience the least job impact from automation are San Jose, Sunnyvale, and Santa Clara, California; Washington, D.C., and Arlington and Alexandria, Virginia; Trenton, New Jersey; Boston and Cambridge, Massachusetts; and Durham and Chapel Hill, North Carolina. All of those regions have large populations and high proportions of skilled technical and managerial occupations, particularly technology jobs. The metro areas deemed most at risk (among them Myrtle Beach, South Carolina; Elkhart County, Indiana; and Punta Gorda, Florida) rely on industries, such as agriculture and tourism, that have already been disrupted by technology and will probably continue to be.

“Big cities provide greater opportunities for synergies among creative, highly technical people, and that’s why they attract them,” explains Iyad Rahwan, an associate professor at MIT and the corresponding author of the paper. “The other dynamic is that cashiers and waiters are less idle in big cities than small cities, so large cities need fewer of them in proportion to their size.” As a result, he says, large cities have fewer routinized occupations that are more likely to be automated and relatively more technical and managerial occupations, which are less likely to be impacted by automation.