Scientists in England have developed a computer programme to map the mood of the nation using Twitter.
Named Emotive, it works by accessing the emotional content of postings on the social networking site.
A team from Loughborough University say it can scan up to 2,000 tweets a second and rate them for expressions of one of eight human emotions.
The BBC reports the team claims Emotive could help calm civil unrest and identify early threats to public safety.
Using the Emotive software to geographically evaluate any mass mood could help police to track potential criminal behaviour or threats to public safety.
Professor Tom Jackson said that public postings through social media gave a very accurate real-time record of how and what people were feeling.
"Twitter is a very concise platform through which users express how they feel about a particular event, be that a criminal act, a new government policy or even a change in the weather,'' he said.
"Through the computer programme we have created we can collate these expressions of feelings in real time, map them geographically and track how they develop."
Dr Ann O'Brien said the programme could chart the strength of feeling expressed in both ordinary language and in slang.
"For any incident we can view how reactions grow and diminish over time," she said.