Committing to a New Year’s resolution is a challenge, no matter how lofty (or vague—guilty!) the goal. A recent analysis by WalletHub reveals our environment—specifically, where we live—can lessen that challenge.

According to the analysis, which ranks the best and worst cities for keeping New Year’s resolutions based on factors such as adult obesity and income growth, the top five best cities are:

Salt Lake City, Utah

Salt Lake City has the second-lowest percentage of adult smokers.

San Francisco, Calif.

San Francisco has the lowest percentage of obese adults and the third-highest average credit score.

Scottsdale, Ariz.

Scottsdale has the most gyms per 100,000 residents, the third-most parkland acres per capita and the fourth-highest median annual income.

Seattle, Wash.

Seattle has the third-highest public school system score, the third-lowest percentage of adult smokers and the fourth-lowest percentage of adults not exercising.

Plano, Texas

Plano has the second-highest median annual income and the fourth-highest public school system score.

The top 5 worst cities:

Detroit, Mich.

Detroit has the highest unemployment rate, the lowest average credit score and the fifth-lowest median annual income.

Newark, N.J.

Newark has the highest average wedding cost as a share of median household income, the second-lowest average credit score and the fourth-fewest parkland acres per capita.