(NEXSTAR) – Between crime, COVID-19 and the local economy, it’s hard to run a city these days. One recent study attempted to quantify who’s doing it well – and who is not.

WalletHub examined the largest cities in California, and evaluated each city’s credit rating, debt, education scores, health scores, crime rates, economy and infrastructure. (See how they weighted each of the 38 criteria in their methodology here.) Each city’s scores in those categories was balanced with its budget per capita. If you have a high budget, and lower quality of life scores, you end up at the bottom of the list.

Bay Area cities ranked especially low. San Francisco earned the worst score in California, and the second-worst in the country. The only city that ranked worse nationwide was Washington, D.C.

While the quality of city services were rated fairly highly in San Francisco, the city’s large budget and large amount of debt per capita dragged its scores down.

Oakland ranked high for health scores, which included factors like life expectancy, hospital capacity and COVID-19 deaths. However, the city scored especially poorly for its crime rates and infrastructure issues, landing it the No. 2 spot of worst-run cities in California, according to the analysis.

Long Beach was also dragged down by a dismal infrastructure score, which includes a city’s quality of roads, walkability and average commute time.

Stockton’s poor safety score landed it among the worst-run cities in California.

Of California’s largest cities, WalletHub found these 10 to be the worst run:

  1. San Francisco
  2. Oakland
  3. Los Angeles
  4. Long Beach
  5. Riverside
  6. Fresno
  7. Sacramento
  8. Modesto
  9. Anaheim
  10. Stockton

The best run city in California, WalletHub found, was Huntington Beach, thanks to its high scores in education, health and safety.

San Diego and Santa Ana also scored highly, while Bakersfield and San Jose landed themselves in the middle of the pack.