fb-pixel

This Twitter account tells you the general mood of MBTA riders by the hour

A new Twitter account can tell if riders on the Orange Line are feeling blue.
A new Twitter account can tell if riders on the Orange Line are feeling blue. David L Ryan/Globe Staff/File/Globe Staff

Riders have long been able to turn to the MBTA’s Twitter account and online alerts to get updates and find out what’s happening around the transit system.

But now, there’s more available than just announcements about a train’s arrival time. People can also find out how fellow commuters are feeling about the transit agency’s daily performance.

A new Twitter account called @MBTA_Mood, which has no affiliation with the MBTA, has been analyzing the overall mentality of some MBTA riders based solely on their tweets and then regurgitating the information back to the general public on social media.

Advertisement



For example, on Tuesday around 9 a.m., as many people headed to work for the day, the account scraped Twitter data to determine riders weren’t feeling too pleased about their travels.

“There was a fall in rider mood over the past hour,” the account tweeted. “Analyzed 68 tweets, with 52.41% feeling Sadness. #MBTA #MBTAMOOD.”

The account was set up in December.

It came to life after a rider who felt frustrated with a long train delay on the Red Line decided to tap into the Twitter hive mind to see how others were faring.

“I was on the train one day and there was an hourlong delay, or 45-minute delay. It was a long delay,” said the 29-year-old Boston resident who came up with the idea for the account. “I was looking through Twitter to see what was going on and . . . thought it would be cool to get the general mood of what people were feeling on the train.”

The account’s creator, who works in the city’s technology sector, asked that his name not be used because “the intention for the bot was to just be a bot” and not have “any human form connected to it.”

Advertisement



The script for the project was built using the language Ruby, while the website application was created using Ruby on Rails, he said.

To capture how riders are reacting to the daily commute, the program pulls tweets that specifically include the term “MBTA.”

Search and filtering criteria are applied: Only tweets from the last hour — sent within the area that the MBTA operates — are processed. Twitter handles that have the word “MBTA” in them are not included.

Once the tweets are collected, they’re run through a tool called IBM Watson Tone Analyzer, which uses linguistic analysis to detect emotion in text and “predict whether they are happy, sad, confident, and more,” according to IBM’s website.

Based on all the information compiled, a tweet is then automatically sent out from the @MBTA_Mood account, showing whether there was a rise or fall in people’s moods within the last hour and how many tweets were actually analyzed to determine that tone.

“The mood of riders on the MBTA decreased in the last hour,” a tweet indicated Tuesday afternoon around 4 p.m. “Analyzed 30 tweets, with 67.99% feeling Hatred.”

A bit of “flair” was added to the project so that emojis are also included in the tweets.

The number of tweets analyzed varies by the hour. Sometimes, as few as eight or 15 tweets are used, while at other times as many as 89 are analyzed.

In other words, the bot’s conclusions are by no means a definitive snapshot of the mood of every rider out there at a given time.

Advertisement



“It’s just during slower times on the train people are not tweeting as much,” the account’s creator said. “I definitely see the numbers go up during rush hour times.”

When sent a link to the Twitter account Tuesday, MBTA spokesman Joe Pesaturo said the transit agency values customer feedback and strives to deliver “clean, reliable, and accessible transit services on a consistent basis.”

“That’s why the MBTA is making $8 billion in capital improvements over five years,” he said in an e-mail. “More than 400 new subway cars, hundreds of new buses, an extension of the Green Line, a more efficient fare collection system, and major upgrades to signal and power systems are just some of the projects that are aimed at improving overall customer satisfaction with the MBTA.”

The account’s creator said the goal going forward is to continue to provide a humorous alert system for passengers using the MBTA.

He said he hopes during rush hour times, or if there are train delays, riders “get a little bit of joy out of seeing something like this when they are feeling frustrated.”


Steve Annear can be reached at steve.annear@globe.com. Follow him on Twitter @steveannear.