A new study from human resources consulting firm Mercer has found that out of 230 metro areas studied, San Francisco has the highest quality of life for any American city.

To create the study, Mercer evaluated 230 metros based on 39 different factors, crunching data for metrics like recreation, consumer goods, natural environment, medical accessibility, public services including transportation, politics, media prevalence and censorship, currency and banking services and a host of others.

Using those metrics, San Francisco came in first in American cities, and 28th worldwide. The top spots internationally were largely in Europe, including Germany and Scandinavia, while the lowest ranked cities were Baghdad, Bagui of the Central African Republic, and Sana’a in Yemen.

Vienna, Austria ranked highest overall globally. San Francisco was ranked well ahead of other U.S. cities like Boston (34th place), Honolulu (35th), Chicago (43rd), New York City (44th) and Los Angeles (49th).