The oldest members of the most digitally connected generation ever are beginning to enter the United States workforce and look for cities in which to live. But a new report suggests they might not find what they’re looking for here.

When it comes to attracting members of Generation Z, those born between 1997 and 2012, Philadelphia is among the worst of major U.S. cities — and its relative safety is largely to blame — according to Nestpick, a Berlin-based research firm that last week released its 2019 Generation Z City Index. The study ranked 110 cities around the world based on 22 factors, from education to gender equality to coworking spaces.

Philadelphia’s overall score was good enough for it to rank 53rd in the world. Its score was just a point behind Washington. But out of the 15 U.S. cities the company studied, Philadelphia ranked next to last, above only Detroit. The top three U.S. cities for Generation Z, according to this study, were Los Angeles (ranked 3rd in the world), New York (5th in the world), and San Francisco (8th in the world).

Here are three reasons why Philadelphia scored lower than its U.S. counterparts, plus a look at the one category in which we excelled.

1. Less safe

This category in which Philadelphia performed most poorly compared to the rest of the U.S. cities was broadly defined as the “degree of safety experienced by members of society at a city level.” Nestpick says it included both “personal and infrastructural security,” as well as “perceived safety," and the research it used as the basis for its findings measured everything from murder statistics to traffic accidents.

Of the 110 world cities studied, Philadelphia ranked 95th overall in terms of safety, coming in between Monterrey, Mexico, and Istanbul. The below chart shows each U.S. city and its category “score," a figure between one and 100 that was calculated by Nestpick that shows performance in a given category relative to the rest of the 110 cities it studied.

The figures were partly based on general crime reported to the FBI, though researchers said they placed a heavier weight on violent crime, especially murders, under the assumption those crimes are more frequently reported on and therefore contribute to safety perception.

Philadelphia’s per capita homicide rate was higher last year than most of the other cities Nestpick looked at, save for Detroit and Washington. The 353 homicides recorded last year was also the highest number Philadelphia saw in a decade, according to police statistics. Philadelphia’s overall violent crime rate in 2018 was also among the highest of the 15 cities studied — it was lower than just Detroit and Chicago.

When it comes to infrastructural safety, other research has routinely ranked Philadelphia on the lower side of big American cities. For instance, a recent study by Wallethub, a personal finance site, on the best and worst cities to drive in, ranked Philly 98th out of 100. While the city often performs well in terms of its walkability, this study found the city has one of the highest accident likelihood rates compared to the national average.

2. Fewer immigrants

There’s been a lot of chatter over the last several years about Philadelphia’s growth being driven largely by immigrants. A Pew Charitable Trusts analysis of census data earlier this year showed the percentage of Philadelphia residents born outside the United States doubled between 1990 and 2017, to 13.8 percent.

But despite that growth, the city still lags far behind other major U.S. cities in this regard, coming in 14th out of 15, once again above only Detroit. But unlike the safety category, Philadelphia was closer in score to some of its counterparts, coming in just two points behind Washington and Portland.

Analysts with Nestpick indicated that they used percentage of foreign-born residents as a way to measure “internationalism.” (Guess being the nation’s first World Heritage City didn’t count.) Studies show members of Generation Z value diversity more than older generations.

3. Lack of an AI industry

This firm took the presence of businesses associated with artificial intelligence into consideration, noting the entire generation will face machines replacing humans in the workforce. Of the 15 cities studied, Philadelphia had the second-lowest number of businesses researching and developing AI and machine-learning, coming in above only Detroit and just behind Houston and Miami.

The top three U.S. cities were San Francisco (first in the world), New York, and Boston. Below is a chart showing each of the U.S. cities that were studied and each city’s “AI industry” score as calculated by Nestpick.

Where we did well

Out of all 22 categories, Philadelphia scored highest relative to the other 14 U.S. cities in the education category, which measured how well a city’s institutions of higher education prepare students “for a technology-driven world.”

This was measured by counting the number of higher education institutions that offer computer science, technology, and innovation-focused degrees and programs. Philadelphia ranked fifth out of the 15 U.S. cities, behind only Boston (which was first in the world), Los Angeles, New York, and Austin.