According to the introduction to WalletHub's list of "2015's Best & Worst Run Cities in America," the best-run cities "spend their public resources in order to satisfy the needs and priorities of most — if not all — members of the community."

With Philadelphia's failing schools (a lawsuit involving parents from Philadelphia schools called the school funding system irrational and inequitable), disparate economic conditions, and a 2010 Pew study on reducing the city's staggering prison population, the city's high ranking might take some by surprise. Let's examine the factors that led WalletHub to this conclusion.

Source: WalletHub

First, WalletHub, a social media company that enables users to compare financial products interactively, took into account the total debt for local governments and their discretion with spending taxpayer dollars on education, police and parks and recreation. Analyzing the 65 most populated U.S. cities, WalletHub defines "the best-run city as one that yields the highest returns on all of its public-spending investments." Achieved through" expert commentary and detailed methodology," WalletHub concluded that the only city run better than Philly is Lubbock, Texas.

Since WalletHub is a financial company, their results are calculated based only on cities' return on investment. That's why Philadelphia can rank #9 on Wallet Hub's "Most & Least Efficient Spending on Education" list, but only rank #36 out of 90 cities if results are unadjusted for return on investment.

Source: WalletHub

For the education-efficiency calculation, WalletHub compared reading and math standardized test scores with city spending on education. They took into account city economics and adjusted for city poverty rates and median household income. Since Philadelphia is the poorest big city in America, even relatively low spending on education wouldn't affect the city's ranking as much as it would if Philly was a more financial stable city.

Source: WalletHub

For police spending rankings, WalletHub divided the safety rate by police spending per capita. Philadelphia ranked #23 out of 110 cities when adjusted for return on investment.

WalletHub's ranking aims to demonstrate that Philadelphia is the second best city in America when it comes to returns made on tax spending.