Philadelphia is a great American city, and it is thriving. Unemployment is about as low as it has ever been. Jobs and wages are up. Housing and commercial real estate development is in full swing in many neighborhoods.

So why does Philadelphia have one of the highest poverty rates of any major city in the country? Close to one-fourth of the city’s residents have incomes below the poverty line — an astounding figure. And to be in poverty is to be very poor, indeed. A family of four is in poverty if its annual income is less than $26,000.

For context, the big U.S. city with the next highest poverty rate is Houston, with one-fifth of its population under the line. Nationwide, the poverty rate is about half that of Philadelphia’s. Silicon Valley in California is the gold standard, with less than one-tenth of its population in poverty.

Disentangling the causes of Philadelphia’s sky-high poverty rate is no easy feat. Poverty is due to a number of conflating factors, and causality is hard to determine. Is poverty high because of high incarceration, for example, or is incarceration high because of high poverty?

These complexities notwithstanding, several of my Moody’s Analytics colleagues — Shannon Brobst, Marc Korobkin and Laura Ratz — and I have taken a shot at getting to the bottom of this.

We learned that demographics are not that important in explaining Philadelphia’s high poverty rate. To be sure, the city is home to an outsized number of research universities, and the graduate students who study at them aren’t paid very much, increasing the measured poverty rate.

But this explains very little of what is going on. Poverty rates tend to be higher where the population is younger, but Philadelphia’s youth population is about the same size as it is in the rest of the nation.

Earning a high school diploma is critical to escaping poverty, as it is all but impossible to get a reasonably paying job without one. And on this issue, Philadelphia falls well short of the rest of the country in graduating its youth.

Finding work is also more difficult for the disabled, who are much more likely to remain stuck in poverty. There are almost three times as many people in the Social Security disability program living in Philadelphia than elsewhere. And given the economic incentives, once people go on disability they tend not to leave the program.

The devolution of the nuclear family is another big factor behind poverty. The more families headed by a single mother, the higher the poverty rate. Caring for children alone limits the time available for work and restricts how far one can travel from home for work. Poverty is also high in places where there are a larger number of people living by themselves. About half the city’s households are living alone or in families run by a single mom, compared with a third nationwide.

Geography also plays a significant role. Philadelphia’s suburbs have among the lowest poverty rates in the country, on par with Silicon Valley. So, the entire region, combining the city and suburban ring, has a poverty rate that is close to the national average. Philadelphia is different from most other places in that most of its poor live within the city limits.

It is much more expensive to live in the suburbs than in many of the city’s neighborhoods. Housing costs are high and rising quickly almost everywhere due to the mounting shortage of new apartments and homes for low- and moderate-income families, but they are meaningfully lower in the city.

Even if the poor had the economic means to move, moving means they move away from their friends, family and local community ties. Research says the typical family would give up pay equal to about one-third of their income to stay close to their support system.

There is no easy solution to Philadelphia’s poverty crisis. Fixing the city’s long-troubled public school system to get high school graduation rates up would go a long way. Mayor Jim Kenney’s focus on early-childhood education is also a good idea. It will increase future graduation rates and help with child care, allowing single moms to work.

However, to fundamentally solve the crisis will require government officials in Philadelphia’s suburbs and the state of Pennsylvania and our next president to muster the political will to act.

Local officials must tear down restrictive zoning and permitting for affordable housing in their communities. State officials must provide more funds for the city’s schools. And our next president must find a way to invest more in education, housing, child care, and our transportation infrastructure so that working-class Americans can get to jobs, wherever they may be.

Allowing this city’s poverty crisis to go unsolved is not an option. For the sake of poor families, our well-being as a wider community, and a future in which we all can be proud and secure, it needs to be dealt with now.