Alex Bell , a cyclist, programmer, and lifelong New Yorker, is fed up with vehicles drifting into lanes that are not meant for them. His frustration began with UPS trucks: So frequently would the large brown vehicles idle in the bike lane near Bell’s Harlem home that he eventually sued the company to get them to stop.

That lawsuit is currently under appeal, but Bell is undeterred. He’s expanded his scope to include bus lanes, which, like bike lanes, often play host to vehicles that are not buses. Buses, Bell says, are a less polarizing issue than bikes. Bus ridership has plummeted in New York and route speeds are slowing to a glacial pace. “We should all be able to get behind the bus issue,” Bell tells Fast Company. Instead of a lawsuit, though, Bell is arming himself with open data, and a computer algorithm he built himself that can detect exactly when and by whom lanes are blocked.

In a post on Medium (and recently in The New York Times) Bell described developing a machine-learning algorithm to analyze continuous camera footage on a single block in Harlem over a 10-day period. What he found was that bus stops are blocked by other vehicles 57% of the time. Bike lanes have obstacles around 40% of the time. “If you look out the window of a bus, you’ll notice the bus driver has to constantly swerve in and out to avoid different vehicles that are blocking bus stops and blocking lanes,” Bell says. “I wanted to put a number to it.”

Police enforcement of proper lane usage in New York City–and elsewhere–is notoriously spotty. NYPD officers, in fact, so frequently block cyclist routes themselves that an intrepid Twitter user created an account, Cops In Bike Lanes, specifically to document the phenomenon. For both bus and bike traffic, improper lane usage and blockage creates not only annoyance, but a safety hazard; buses and bikes having to swiftly change lanes to keep moving put themselves at risk when they merge into traffic.

New York City will introduce 21 new express bus service lines in the next decade, and has laid down around 250 miles of bike lanes in recent years to incentivize those modes of transit. But from Bell’s perspective, and that of transportation advocates, the infrastructure itself is not enough; there also need to be policies in place to help people utilize the new modes of transit.

While anyone who bikes or rides a bus in New York City knows intuitively that the lanes are often blocked, there’s been little data to back up that feeling apart from the fact that last year, the NYPD issues 24,000 tickets for vehicles blocking bus lanes, and around 79,000 to cars in the bike lane. By building the algorithm, Bell essentializes what engaged citizenship and productive use of open data looks like. The New York City Department of Transportation maintains several hundred video cameras throughout the city; those cameras feed images in real time to the DOT’s open-data portal. Bell downloaded a week’s worth of footage from that portal to analyze.

To build his computer algorithm to do the analysis, he fed around 2,000 images of buses, cars, pedestrians, and vehicles like UPS trucks into TensorFlow, Google’s open-source framework that the tech giant is using to train autonomous vehicles to recognize other road users. “Because of the push into AVs, machine learning in general and neural networks have made lots of progress, because they have to answer the same questions of: What is this vehicle, and what is it going to do?” Bell says. After several rounds of processing, Bell was able to come up with an algorithm that fairly faultlessly could determine if a vehicle at the bus stop was, in fact, a bus, or if it was something else that wasn’t supposed to be there.