We love our pets. Nearly 85 million American households, or 67 percent, have at least one, according to a recent American Pet Products Association survey. It’s little surprise, then, that many pet owners take the needs of their animal friends seriously when considering where to live.

A new study by WalletHub could help. It measures pet friendliness in the 100 largest U.S. cities by scoring each in three weighted categories:

The “pet budget” category measured veterinary, pet-care provider and health-insurance costs. “Pet health and wellness” considered the number of pet-care professionals, dog-friendly restaurants and animal shelters per capita, as well as factors like the strength of local animal-protection laws. Finally, the “outdoor pet friendliness” category looked at parkland, dog parks and dog-friendly trails per capita, among other things. Scores in each category were averaged to determine a city’s final rank.

Despite placing just 80th in the pet budget category, Scottsdale, Ariz., did well enough in the others to come out on top. This week’s graphic shows WalletHub’s 10 best and 10 worst cities for pet ownership.