Research News

Man using cellphone in the subway.

Twitter data could improve subway operations during big events


Published January 30, 2017


After a long wait, the train arrives. But it’s stuffed with baseball fans headed to the game. There is no room to board. The doors slide shut and the wait continues.

It’s a situation that frustrates even the most hardened subway riders.


In a preliminary study, UB engineers found that as subway use swells during events that draw big crowds, so too does the number of tweets at these events. The results suggest that data from Twitter, and possibly other social media platforms, can be used to improve event planning, route scheduling, crowd regulations and other subway operations.

Map image showing tweets made during Mets baseball game in 2014.

This map shows tweets (red dots) made during the Mets baseball game in 2014. Image: University at Buffalo

“Social media offers a cost-effective way to obtain real-time data on monitoring subway passenger flow,” says Qing He, Stephen Still Assistant Professor in Transportation Engineering and Logistics, and the study’s corresponding author. “Our results show that data from apps like Twitter can help public transportation officials prepare for and react to passenger surges during concerts, baseball games and other big events.”

In addition to He, who has appointments in the Department of Civil, Structural and Environmental Engineering and the Department of Industrial and Systems Engineering, co-authors are Jing Gao, assistant professor in the Department Computer Science and Engineering, and Ming Ni, PhD candidate in the Department of Industrial and Systems Engineering.

To conduct the study, researchers gathered subway ridership information from April to October 2014 via turnstiles at Mets-Willets Point station in Queens, New York. They chose the station because it’s next to Citi Field, the home of Major League Baseball’s New York Mets, and the USTA Billie Jean King National Tennis Center, where the U.S. Open tennis championships are held.

Map showing tweets made during U.S. Open tennis tournament in 2014.

These red dots represent tweets made during U.S. Open tennis tournament in 2014. Image: University at Buffalo

The researchers also collected nearly 30 million tweets geotagged to the New York City area during the same time. They then filtered the tweets by their geographic coordinates (a feature that Twitter users enable on their accounts), the context of the tweet (for example, #subwayseries), the time and other elements.

Using six different computer models, the researchers then analyzed the data and found what they describe as a moderate positive correlation between passenger flow and the rates of tweets during big events.

“The results are encouraging for two reasons. First, they indicate that increases in social media posts and subway ridership can be linked. Secondly, we have developed a method to track this correlation,” says Gao. “Now, the challenge is to refine this method so it can be used by public transit system operators to improve their systems.”

An early version of the study, “Forecasting the Subway Passenger Flow under Event Occurences with Social Media,” was published online in October in the journal IEEE Transactions on Intelligent Transportation Systems. The study will appear in an upcoming print edition of the journal.