Hitting the recommended number of servings of fruits and vegetables per day is a lot easier if you live in a city with a produce stand on practically every corner. That said, when it comes to deciding how healthy a city is overall, access to fresh fruit is far from the only factor.

Credit report agency WalletHub compiled data from more than 170 of the most populated U.S. cities, and used a whopping 43 metrics across four categories—healthcare, food, fitness, and green space—to analyze which ones are winning (and losing) the health game.

To say the study is extensive seems like an understatement; the healthcare category, for instance, includes stats like “hospital beds per capita” and “share of adults who checked their cholesterol in the past five years.” The food category covers everything from farmers' markets per capita to a measurement of Google searches for terms related to healthy eating. Cities received a ranking number in each category and were awarded a cumulative score out of 100.

All 43 things considered, San Francisco is basically a beacon of healthy living that the rest of America should look to for guidance. It ranked first in both food and green space, fourth in fitness, and a still-respectable 29th in healthcare. Seattle, its neighbor to the north, came in second place, and the top four were rounded out by San Diego and Portland, Oregon, strongly suggesting that we should all consider moving to the nation’s northwest corner.

Source: WalletHub

On the opposite end of the spectrum is Brownsville, a city at the southern tip of Texas that hugs the Mexican border and ranks 174th in food and healthcare and 173rd in fitness and green space. It’s not the only Texas representative hanging out near the end of the list: The barbecue-loving Lone Star State has four other cities—Laredo, Corpus Christi, Lubbock, and Amarillo—in the bottom 20. In fact, almost all the bottom 20 cities are located in southern states.

Scroll on to see if your hometown is healthy enough to have cracked the top 20 (or unhealthy enough to be near the bottom), and check out the full list of 174 cities here.

Healthiest U.S. Cities

  1. San Francisco, California
  1. Seattle, Washington
  1. San Diego, California
  1. Portland, Oregon
  1. Washington, D.C.
  1. New York, New York
  1. Denver, Colorado
  1. Irvine, California
  1. Scottsdale, Arizona
  1. Chicago, Illinois
  1. Austin, Texas
  1. Los Angeles, California
  1. Honolulu, Hawaii
  1. Huntington Beach, California
  1. Minneapolis, Minnesota
  1. Salt Lake City, Utah
  1. Burlington, Vermont
  1. Fremont, California
  1. Boston, Massachusetts
  1. San Jose, California

Unhealthiest U.S. Cities

  1. Brownsville, Texas
  1. Laredo, Texas
  1. Gulfport, Mississippi
  1. Shreveport, Louisiana
  1. Memphis, Tennessee
  1. Montgomery, Alabama
  1. Huntington, West Virginia
  1. Augusta, Georgia
  1. Fort Smith, Arkansas
  1. Detroit, Michigan
  1. Mobile, Alabama
  1. Corpus Christi, Texas
  1. Toledo, Ohio
  1. North Las Vegas, Nevada
  1. Baton Rouge, Louisiana
  1. Jackson, Mississippi
  1. Columbus, Georgia
  1. Lubbock, Texas
  1. Fayetteville, North Carolina
  1. Amarillo, Texas

[h/t WalletHub]