“Leisure attributes (the number of restaurants, bars, libraries, museums, professional sports teams, and park acres by population); educational attributes (public school performance, the number of colleges, and graduate degree holders), economic factors (2011 income and June and July 2012 unemployment), crime, and air quality.

Major professional league and minor league teams, as well as U.S.-based teams belonging to international leagues in that city were included. The greatest weighting was placed on leisure amenities, followed by educational metrics and economic metrics, and then crime and air quality.”

San Francisco earned high marks for its thriving economy, cultural centers and nightlife in the Mission and Castro districts. Seattle was cited for beautiful vistas and clean air, among other things. Smaller cities like Portland, Ore. (fifth), Denver (sixth) and Austin, Texas (eighth) dominated the top 10.

Houston came in at No. 22 and was cited for its large parks and food scene. San Antonio was 30th. Bay Area cities Oakland (31st) and San Jose (33rd) also made the list.

Here are some of the top cities in the U.S., according to the rankings: