As we've mentioned before, social media sites have swiftly become a huge wealth of data about cities and neighborhoods (see what we've learned from geotagged Flickr photos, tweets about food, tweets on transit, Facebook posts about exercise, and Yelp reviews of restaurants). Information people intend to communicate over the Internet to their friends (or followers) is now telling researchers a lot about collective behavior and the temperament of whole towns.
In that vein, here is a pretty delightful research project from the New England Complex Systems Institute in Cambridge, Massachusetts. Karla Bertrand, Maya Bialik, Kawandeep Virdee, Andreas Gros and Yaneer Bar-Yam have mined more than 600,000 geocoded tweets shared in New York in April of 2011 to construct a kind of public mood map of the city.
They first went for the easy clues: emoticons. Each tweet containing one was classified as positive or negative using the key at right. The researchers used the content of those easy-to-classify tweets to train software to assess the rest of the collection.
They could then plot the results on a street map of the city, with cyan representing the most positive sentiment and magenta the most negative. In the below map from the paper, the white areas lacked enough tweets for the analysis.
Some predictable but amusing patterns emerged. Transportation hubs (noted below by Bs) like tunnels and bridges seem to provoke cranky tweets, and public parks (A) some of the happiest ones. Riker's Island (D), home to New York's primary jail complex, looks pretty negative. The Palisades and Weehawken (C) cemeteries look sad, too.
That really cranky E1 magenta spot is Maspeth Creek in Brooklyn, which, if you're not familiar with it, is a Suprefund site that the researchers describe this way:
Once one of New York’s industrial hubs with more than 50 refineries along its coast , this area was the site of the largest oil spill in the country  and now contains a 15-foot-thick layer of petroleum-based pollutants that scientists have dubbed “black mayonnaise” .
The place perceptibly smells bad. And Twitter knows it.
So what's the point of an exercise like this, you say?
All maps via the New England Complex Systems Institute paper "Sentiment in New York City: A High Resolution Spatial and Temporal View."
The Hudson River program director Phillip Musegaas claims “if and how [Maspeth Creek] affects the local population is somewhat ... obscure” ; our findings of negative sentiment reflect the impact on the local population.