The most popular New Year’s resolution by far is to lose weight. It is also one of the most difficult. But where you live plays a large part in your chances of losing weight, according to Trulia [stock TRLA][/stock].

The real estate marketplace broke down five key factors in weight loss and discusses which metros make each measure easiest.

It’s undeniable that eating healthier food is crucial to losing weight. No one is losing weight while chowing down on a Whopper, let’s be honest. The cities with more “slow food” establishments (supermarkets, specialty food marts and full-service restaurants) and fewer “fast food” stops (convenience stores and fast-food restaurants) were San Francisco, New York and Cape Coral-Fort Myers, Fl.

A long commute means amble time sitting in a car. Walking or biking to work will inevitably keep that gut in check. New York, Boston, San Francisco, Honolulu and Portland have the highest percentage of workers who commute to work daily.

Gym memberships spike in January, but keeping it up year round is another task. Trulia calculated the number of gyms, health clubs and fitness centers per 1,000 households. Fairfield County, CT; Middlesex County, MA and Long Island, NY lead the list with the highest density of gyms.

However, the gym isn’t for everyone, and some prefer outdoor activities such as hiking, skiing, running or surfing. Mountain metros like Salt Lake City and Colorado Springs, beach areas like Ventura County, CA and San Diego and the outdoorsy Pacific areas like Seattle and Portland all held the most sporting-goods stores per 1,000 households. 

Finally, Trulia tracked the metros with the greatest number of weight-loss and diet centers per households. Philadelphia; Orange County, CA and Camden, NJ all offer the most weight-loss education, counseling and support.

Measuring all of these factors equally, there was one city that topped the list of 100 best metros for weight loss. San Francisco offers a number of healthy food options, plenty of local gyms and a high number of residents who walk or bike to work.

Las Vegas, NV topped the list for the worse large metros for weight loss.

Click on the map below to see how your city fares.