SAN FRANCISCO (CBS SF) — While the conditions of its street has drawn criticism, a new survey has found that San Francisco is actually the healthiest city in the United States when it comes to access to quality health care, parks to relax in, nutritional food to eat and the desire to stay fit.

WalletHub, which generally creates credit scores, turned its panel of experts attention to lifestyle choices by residents in more than 170 cities across the United States.

READ MORE: Pelosi Expects House to Pass Infrastructure Bill This Week

Each city was ranked according to health care access, green spaces, food choices and physical fitness options.

San Francisco got the highest scores of any city when it came to green spaces and food. It ranked No. 4 in fitness and No. 29th in health. Each of those ranks were given a score and when the numbers were crunched San Francisco came out with a top score of 73.99.

Seattle came in second at 70.62 while San Diego was third (70.01), Portland, Ore. fourth (65.66) and Washington, D.C. rounded out the top five with a score of 63.87.

READ MORE: Improving Weather Conditions Allow Crews to Increase Containment of Fawn Fire to 35 %

Four other Bay Area cities were among the top 36 with Fremont coming in at No.18, San Jose No. 20, Oakland was 35 and Santa Rosa was 36th.

When it came to being number one in a specific category, San Diego ranked first in fitness and Overland Park, Kansas, ranked first in health care but was just 56th overall and San Franciscans can take pride in having the top number in green spaces and food choices.

San Francisco was found to have both the highest number of hiking trails and the highest number of running trails per capita in the country.

MORE NEWS: Teen Driver Injured in Solo Crash Near San Gregorio

Brownsville, Texas, has the dubious honor of being the worst place in American to live among the city’s considered coming in 174th. The border town ranked last or next to last in each of the four categories.