Here is a research of what are the factors that makes a city happy. and this research is originally done by Lewis Mitchell.
A number of people wondered how variations in happiness relate to different underlying social and economic factors. To try to answer this question, they took data from the 2011 census (all helpfully available online on the Census Bureau’s American FactFinder website) and correlated it with their measure of happiness. Surprisingly, happiness generally decreases with the number of tweets per capita in a city (this doesn’t mean that tweeting more will make people less happy, it’s only a correlation):
Next, they grouped covarying demographic characteristics obtained from the census, and looked at how these clusters varied with happiness. For example, it might not surprise people that cities with a larger percentage of married couples also contain a larger percentage of children – this is what they mean by covarying demographics. And people might or might not be surprised that more marriage is positively correlated with happiness. There’s plenty of scatter but the connection is there:
the research group used an automated algorithm to bin the census data for us into eight groups and then compared the happiness of those groups, leading to the following figure:
Each point represents a characteristic from the census (for example, the % married/happiness plot above is now represented by one point in this figure), with the horizontal groupings representing covarying demographic characteristics. A point’s position on the vertical axis shows how that characteristic varies with happiness across all cities. A positive value means that happiness is higher in cities where that characteristic is higher, while a negative value means that happiness is lower in cities where that characteristic is higher. For example, the figure shows that as the percentage of married couples in a city increases, so does the average happiness of that city (no causality is implied).
A more interesting question might be how word usage varies with different demographics – to do this we correlated each word with each demographic characteristic across all 373 cities in our dataset, leading to a lot of data to sift through! (And you can too, by following the link in the above paragraph.) As an example, take a look at how the word “cafe” varies with the percentage of population with a college degree:
Each point in the figure represents one city, and broadly the trend is that the more “college-y” the city is, the more people talk about cafes online. (You can decide for yourself whether that’s surprising or not). The top 10 emotive words whose usage went up as percentage of population with a college degree went up turned out to be:
And the emotive words which went up as college degrees went down?