The Daily Beast based about 40 percent of its analysis on the Gallup-Healthways data that ranked California 17th in well-being in the nation. The rankings also took data from the Bureau of Labor, the Census and the National Climatic Data Center to figure in unemployment rates (8.5 percent for San Francisco, 8.9 percent for San Jose), percentage of families earning more than $100,000 (45.8 percent in San Francisco, 49.5 in San Jose) and the number of clear days per year.

The rankmasters at the Daily Beast found that the foggy city had an average of 160 sunny days a year, but couldn’t figure out how many sunny days San Jose has.