epSos.de via flickr

Dogs can be expensive, but a new analysis by Nerd Wallet calculated the best cities to own a dog.

The ratings are based on how easily a dog can play and socialize, how affordable it is and how much space there is for walking and living.

The walkability score comes from Walk Score. Enjoy these ten dog-friendly cities. Who doesn't enjoy adorable dog pictures?

10 Oakland, CA
jpctalbot via flickr

Cost of a visit to the vet: $48.04

Walkability score: 68

Off-leash dog parks per 100,000 residents: 0.7

Score from dog owners: 52.2

This affordable city for dogs has a lot of wooded areas. It's an easy place to go hiking with your puppy.

9 Minneapolis, MN
KB35 via flickr

Cost of a visit to the vet: $59.35

Walkability score: 69

Off-leash dog parks per 100,000 residents: 1.6

Score from dog owners: 52.4

Heard of Doga? It's yoga with your dog, and it is one of the several events that Minneapolis has.

8 Milwaukee, WI
EuroMagic via flickr

Cost of a visit to the vet: $36

Walkability score: 61

Off-leash dog parks per 100,000 residents: 0.5

Score from dog owners: 52.6

Off-leash parks are not as common here, but dog parks are especially good, including Granville Dog Park that has wooded trails, a creek and hills just for your dog.

7 St. Louis, MO
mikebaird via flickr

Cost of a visit to the vet: $45

Walkability score: 61

Off-leash dog parks per 100,000 residents: 1.4

Score from dog owners: 53.3

Several restaurants and attractions allow dogs in St. Louis.

6 Seattle, WA
CamPixie via flickr

Cost of a visit to the vet: $63.50

Walkability score: 74

Off-leash dog parks per 100,000 residents: 1.8

Score from dog owners: 54.7

Warren G. Magnuson Park includes an off-leash area as part of its 350-acre location.

5 Washington, DC
mikebaird via flickr

Cost of a visit to the vet: $49.93

Walkability score: 73

Off-leash dog parks per 100,000 residents: 1.2

Score from dog owners: 57.4

One of the greatest perks of dog life in DC is the swimming parks: Shirlington Park and Glencarlyn Park, which offer clean streams for dogs to splash in.

4 Miami, FL
Tomi Tapio via flickr

Cost of a visit to the vet: $43.50

Walkability score: 73

Off-leash dog parks per 100,000 residents: 0.7

Score from dog owners: 57.7

With affordable veterinary care and a good walkable layout, Miami is a favorite for dog-lovers.

3 Las Vegas, NV
mikebaird via flickr

Cost of a visit to the vet: $45.28

Walkability score: 49

Off-leash dog parks per 100,000 residents: 4.4

Score from dog owners: 63

In Las Vegas, Desert Breeze Park has gated sections for different sized dogs. This allows them to run off-leash in a safe environment.

2 San Francisco, CA

Cost of a visit to the vet: $56.06

Walkability score: 85

Off-leash dog parks per 100,000 residents: 3.3

Score from dog owners: 74.3

Some parks in San Francisco have breed-specific events so owners can proudly parade their dog with similar breeds. Also, Alta Plaza Park has Pug Sunday.

1 Portland, OR
epSos.de via flickr

Cost of a visit to the vet: $51.03

Walkability score: 66

Off-leash dog parks per 100,000 residents: 5.7

Score from dog owners: 78.7

Portland has 32 off-leash parks, which is more than any other city, except New York. There are also dog events such as puppy romps and holiday parties.