The study was done by the Bay Area Center for Voting Research who based their results on voting patterns. A flak for the study said that race was usually the determining factor as the cities that scored highest usually had the highest percentage of African-Americans. San Francisco placing so high was considered unusual because it doesn't have that high a percentage of African-Americans in the city. In fact, the flak said this about the anomaly that is San Francisco:

"These liberal, white communities, however, are more reminiscent of penguins clustered together around a shrinking iceberg than of a vibrant and growing political movement."
Ouch. On the other hand, who doesn’t love penguins? They're so cute!

Image from NADIR.org