Philadelphians are optimistic about their city and, better yet, they have good reason to be. The question is whether the positive mood can be harnessed to help the city address its deep-seated challenges.

Over the last year, there has been an abundance of positive news for a place not always accustomed to receiving it. Pope Francis is coming in September, and Philadelphia will host the Democratic National Convention in summer 2016. Comcast Corp. is building a second office tower that will be the city's tallest - and is expanding its local workforce. Builders and developers are investing heavily in University City and Market East. And the residential construction boom continued: Last year, the city issued building permits for nearly 4,000 units with an estimated value of $879 million.

Related stories

New public spaces, including the Schuylkill Banks Boardwalk and Dilworth Park, have opened. Philadelphia has received top marks for dining and tourism from various publications and rating services, and Forbes chose the city as the permanent home of its annual "30 Under 30" gathering of young entrepreneurs. The city population rose for the eighth year in a row, a development that would have seemed unthinkable a decade ago, and Philadelphia is home to a large and growing cohort of millennials.

All of this energy has not been lost on residents. The mood of the city, as measured by the 2015 Pew Philadelphia Poll, is the most optimistic it has been in the six years of Pew's polling. More than in past surveys, residents say the city is headed in the right direction, will get better, and is worth recommending as a place to live. Perhaps the most promising finding of all is that young adults, who have helped fuel the population growth, are more inclined to stay in the city long term.

Yet even with the positive outlook, the realities of the city - as detailed in Pew's new report, "Philadelphia 2015: The State of the City" (www.pewtrusts.org/stateofthecity) - are complex and nuanced, with seemingly a negative for every positive and vice versa.

On the economy, Philadelphia's unemployment rate, which had stayed stubbornly high after the Great Recession, fell in 2014 to an annualized rate of 7.8 percent, and the monthly figures were in the 6 percent range at year's end. Preliminary numbers indicate the city gained 8,800 jobs, which would be the biggest single-year increase since 1999. But the rate of job growth, 1.3 percent, did not keep up with the national rate, which was 1.9 percent.

The poverty rate was down, as it was in a number of major cities, falling to 26.3 percent of the population in the 2013 count, the most recent available. Even so, that meant more than 400,000 Philadelphians were living below the poverty line, creating a demand for government services, a drag on the city's economic prospects, and a reality check on all of the good feeling.

In public safety, the number of homicides in 2014, 248, was up by just one from the year before, when the city recorded its lowest total in nearly half a century, and major crime continued to decline. But Mayor Nutter and Police Commissioner Charles Ramsey spoke often about the toll that violence continues to take on Philadelphia, especially its young black males.

For the first time in years, city government entered 2015 in possession of signed agreements with all of its major public-sector unions. Yet only modest steps were taken in those contracts to address the high costs of underfunded municipal pension systems, a situation that is eating up rising amounts of tax revenue and thereby constraining city services.

The School District of Philadelphia continued to struggle with its finances, although the election of a new governor created hope that help might be on the way - in the form of a state funding formula and more state aid. Test scores were down, and controversies swirled around charter school expansion, the teachers' contract, and school governance. The high school graduation rate edged higher.

Philadelphia is a changing city in any number of ways, even beyond the influx of immigrants and millennials. Once a city of homeowners, it is increasingly becoming a city of renters. Once a place that rolled up the sidewalks when the sun went down, it has real vibrancy after dark. Once a community that expected that whatever could go wrong would, it is allowing itself a moment of optimism.

To make the moment last, progress on jobs, poverty, pensions, schools, and public safety is essential. Those are challenges of the highest order.

Larry Eichel directs Philadelphia research at the Pew Charitable Trusts