But minority and lower-income Philadelphians are much more likely to hold negative views of the city.

Philadelphians actually liked having the pope in town, and the DNC too. And when asked if they thought the city was headed in the right direction, about half of us said yes, more than at any time in the last several years.

These are some of the findings in Pew’s latest survey that asked about 1,600 residents how they felt about the city and its future, Mayor Jim Kenney, the soda tax and more. It showed that generally things are looking up for Philly, slightly more than in the past few years even. The caveat, as always, is inequality. The good vibes haven’t filtered to everywhere in Philadelphia. The city’s minority and lower-income populations are much more likely to hold a pessimistic view of Philly.

Philly loved the pope and DNC

Under the leadership of Mayor Michael Nutter, Philadelphia gained a reputation for hosting events with national and international acclaim. The two biggest coups by far were Pope Francis’ visit last September and the DNC this summer.

At times, it seemed these events, particularly the pope’s visit, could spin out of control. Nobody was happy when they first heard about the pope fence and traffic box, and cars in several parts of the city were at a standstill on the DNC’s first day in July. But apparently most people remember the good times.

Pew revealed 72 percent of residents surveyed said hosting those two events made them feel proud. We also want similar events back. Seventy-three percent said the city should seek to host big events in the future (ahem, Mayor Kenney).

The chasm in Philly’s outlook

Philadelphia has more residents than ever saying they like the direction where the city is heading since Pew has been conducting these polls for the last few years. That’s good. What’s not good is the discrepancy between residents who like Philly’s direction and those who don’t.

At 50 percent positive and 34 percent negative, the margin is the largest Pew has seen. People are also split up demographic-wise: The groups most likely to have a positive view were whites, those making $100K or more per year, college graduates and people who have lived in Philadelphia for 10 years or less. The groups most likely to have a negative view were Hispanics, blacks, North Philly residents and those living below the poverty line.

Basically, if you’re wealthy, well-educated or white, you’re digging Philly right now. And if you’re a minority or don’t live in one of the city’s hot neighborhoods, there’s a much higher chance you’re not.

Young people still don’t know if they’ll stay

Until all the millennials decided to stay or decide to leave, this question of what they’ll do in the future will remain crucial to Philadelphia. And unfortunately for the city, which saw its population of 25-to-34 year-olds increase by 100,000, or 6.1 percent, from 2006-12, respondents’ answers to this question got worse than last year.

In this latest poll, 48 percent said they would definitely or likely stay in Philadelphia five-to-10 years from now. That’s down from 59 percent from 2015 and about the same as in 2013 and 2014 when 50 percent said they would definitely or likely stay.

The top reason for possibly leaving is the same: Work. Young people worry they won’t be able to advance their careers in Philly. They’re also concerned about the quality of schools.

Thumbs up for the soda tax and Kenney

Despite being connected to a federal investigation of union boss Johnny Doc, Kenney is earning high marks in his first year in office. Fifty-three percent of residents surveyed approve of his job, and 23 percent disapprove (the others are undecided). The disapproval rate is the lowest Pew has seen in the seven years of its poll, when Nutter was mayor. Kenney is liked about the same by all racial groups and his most positive reviews came from North Philly, West Philly and Center City.

Why so high on Kenney? Maybe it’s the soda tax. His landmark piece of legislation that passed in June is garnering mostly positive reviews. Fifty-four percent of respondents favor the soda tax, compared to 42 percent who don’t favor it. Young people particularly support the tax. About two-thirds of 18-to-34 year-olds endorse it.