Coming from the U.S.’s least populous state, Wyoming native Mark Egge wasn’t familiar with public transit before he started his graduate studies at Carnegie Mellon University.

But as a data student, Egge knows a pattern when he sees one. After a few weeks of riding Port Authority of Allegheny County buses, he noticed an odd trend.

“I’d go to the bus stop and wait at the bus stop, and I’d wait for a long time and then ... two [of the same] buses would show up,” Egge says. “This isn’t very useful to me. I want one bus every 10 minutes, not two buses every 20 minutes,”

Frustrated and searching for an answer, he turned to the locals next to him at the stop.

“I asked the other riders, ‘What’s going on in this system?’” Egge says. “And they said, ‘Oh, I don’t know, sometimes [the buses] come in twos.’”

The issue Egge noticed is a source of exasperation for many public-transit users: bus bunching. The phenomenon occurs when small delays, such as hitting a red light or a slower boarding period, build on each other to knock a bus so far off schedule that the next scheduled bus on that route follows immediately after it. While this is a common occurrence in public transit, modern data technology may hold the keys to its elimination.

Port Authority spokesperson Adam Brandolph says the region’s main public-transit system is well aware of the issue.

“[Bus bunching is] a thing almost all transit agencies experience,” Brandolph says. “We may not look at bus bunching specifically, but we look at many issues that affect our on-time performance.”

Besides breaking schedules, bunching leads to a crowded lead bus and a nearly empty bus trailing behind.

Peter Shaskin, a program manager at Washington, D.C.-based EastBanc Technologies, worked with Washington, D.C.’s own bus system to solve its bunching problem. In Shaskin’s experience, while bunching inefficiency is undesirable, the larger harm comes from riders losing confidence in the system caused by consistently off-schedule performance.

“It’s not just making sure buses run on time and arrive, it’s also about making sure the customer is satisfied and informed,” Shaskin says. He emphasizes that real-time information for the customers can help ease uncertainty caused by a delayed bus.

Port Authority recently implemented real-time bus-arrival schedules at eight Downtown bus stops, as well as a real-time bus tracker on its mobile app and at its website.

At CMU, Egge used that real-time data to make a heat map of bunching in Port Authority’s system. He found that bunching was related to space, not time — buses usually arrived sequentially in Oakland and Downtown.

Shaskin says that often traffic issues can exacerbate bunching, while Brandolph adds that bunching occurs “more frequently on high-frequency routes,” like the 61 and 71 buses that run along Fifth and Forbes avenues.

But bunching isn’t restricted to Pittsburgh. Juan Argote, native to Barcelona, Spain, wrote his dissertation at UC Berkeley on bus bunching after experiencing it in Spain and California.

Now living and working in Pittsburgh, he says that bunching occurs “naturally” within bus systems. Argote notes that running a “static” schedule of set arrival times, as well as having multiple routes converge on one stretch — like on Fifth Avenue, which carries 18 separate bus routes — could exacerbate bunching.

“[That’s] a problem that’s really difficult to tackle,” Argote says.

However, Argote says that technology, such as real-time bus tracking and prioritized traffic signals, can alleviate bunching.

And Pittsburgh is already approaching technological solutions. Since 2014, Port Authority’s buses have been equipped with devices that log locations, as well as how long doors are open and the length of time between stops.

While both Shaskin and Argote suggest using the real-time data to direct the buses — hold them at stops, or even sometimes skip a stop to keep spacing even — Brandolph says Port Authority hasn’t talked about using such a system. It collects the data to analyze its own performance.

“[The bus drivers] all have a schedule, and they get their bus, and they go and try to hit their time points as best they can,” Brandolph says.

But Port Authority has also collaborated with Traffic21, a CMU-based transportation-research project, to work on a system of prioritized traffic signals, called Surtrac, within Pittsburgh.

According to Traffc21’s executive director, Stan Caldwell, the project’s goal is to figure out how to use “technology to improve a system rather than concrete.”

According to Caldwell, Surtrac will allow buses to communicate with traffic signals, indicating the route’s schedule and how full it is. Those factors will then let the signal make a decision to either prioritize the bus with a green light or slow it down with a red one.

Currently, progress has been slow. Surtrac has modernized some traffic lights in the East End, but the buses still can’t communicate with the lights.

According to Brandolph, Surtrac won’t entirely eliminate bunching, but it’s a step forward in the authority’s efficiency. And for Caldwell, bunching is an obstacle the city must overcome to reach its transit goals, such as a proposed bus-rapid-transit system, which employs dedicated bus-only routes with fewer stops.

“If Pittsburgh wants to move forward with bus rapid transit, you can’t have [bus bunching],” Caldwell says.