A report recently published by WalletHub ranked the healthiest cities across the country and a Bay Area city took the top spot.

San Francisco ranked no. 1 healthiest place to live in the US, according to WalletHub.

The decision was made based on four key factors: health care, food, fitness and green space.

“Location matters when it comes to health. Some places promote well-being by expanding access to nutritious food and recreational facilities,” the report explains. “Others are working to keep health care costs affordable for everyone or to keep parks clean and well-maintained.” Additionally, the COVID-19 pandemic has played a big role in the health of cities over the past two years.

The report shows that San Francisco is one of the cities with the healthiest restaurants, the highest monthly cost of joining a fitness club, and the lowest percentage of adults not eating enough fruit or vegetables.

Experts say some important factors to choose from when looking for a healthier city include access to medical care, space to get outside and exercise, green spaces and safe streets with sidewalks.

Other Bay Area cities that were on the list, but at lower ranks, include Fremont, San Jose, Oakland and Santa Rosa.

California cities on the list include Huntington Beach, Los Angeles, Oceanside, Glendale, Long Beach, Anaheim, Chula Vista, Santa Ana, Fontana, Moreno Valley, Santa Clarita, San Bernardino, and Riverside in Southern California.

From central and northern California, Ontario, Bakersfield, Stockton, Fresno, Modesto and Sacramento were also on the list.

Click here to read the full report.