Mexico City’s gargantuan system of microbuses called peseros accounts for 60% of all transit in the city, with about 14 million daily riders on 29,000 buses that run more than 1,500 routes. It’s among the largest bus systems in the world, and, until last month, nobody really knew its full extent. Sure, the peseros can get you pretty much anywhere you want to go–but only if you happen to know which ones to take. No accurate data existed about the pesero routes. To find out which buses went where, you just had to ask around and hope for the best.

The system began as a formal transit system in the 1980s, commissioned by the government but privately run. But since then, as Marina Gonzáles, project director at PIDES: Innovación Social explains, hundreds of unofficial routes have organically sprung up in response to demand: “You put up a sign, you open up a route, and nobody tells you not to.” The peseros don’t have signs on the streets where they stop, so creating a bus line has been as easy as getting a van or truck, making half an effort to paint a part of it some shade of green (the accent color of the original buses) that says generally where the new “bus” will go, and throwing it in the window. This resulted in an unknowable system nearly impossible to leverage for efficient transit despite its magnitude. Collecting data on the peseros presented an extremely expensive and time-consuming problem. But last month, a group of 35 collaborators from 12 different organizations solved it with an ingenious collective gaming and civic engagement experiment.

Flickr user mariordo59

The project, called Mapatón CDMX, created an app that allowed riders of the peseros to share GPS data into a database, effectively mapping the routes as they rode. Then they incentivized the entire city to participate by making it into an open game. The participants or teams that mapped the most pesero routes to earn the most points won tablets and cash prizes up to $30,000 pesos (about $1,700 dollars). Because smart phone users are concentrated in certain areas of the city, they used an algorithm to assign ignored routes the most points. The algorithm constantly recalculated the point values of the routes to make sure maximal routes were mapped.

Collaborating programmer Christian Guerrerro says his favorite challenge in the process of developing the Mapatón was identifying the routes because “microbuses in Mexico City don’t have a defined taxonomy.” The buses have unmarked stops along their routes and identify the routes with signs on the front of the buses that have “generic references like PEMEX (the name of every gas station in Mexico) or the IMSS Hospital,” he say. “Those who are from the area might know what those references are, but it isn’t information we can put into a database.” They solved this problem by having users take a picture of the signs when they begin to map a route. “We’re taking what people understand and figuring out how to make computers understand it. It’s still an active challenge,” he says.

ChameleonsEye via Shutterstock

The game ran during the first two weeks of February and drew 3,594 participants who mapped 2,632 rides–nearly the entire pesero system. All of the data collected was made public at the end of February in hopes that, in the right hands, it would generate route maps, inform policy, and deliver insights about the city. “The real exercise is how we use this information now to make decisions. It’s about responsibility to generate conditions for a better city,” says collaborator Angelica Garnica Sosa.

To this end, the organizers hosted a hackathon with the new data. The first place prize was an SMS-based service in which you send an origin and destination, and you get a text back with public transit directions including the pesero routes. The service will go a long way in democratizing the data among the majority of city residents who don’t own smartphones and in allowing the entire city to make more efficient use of its existing transit system. The service is in the process of adoption by the city’s Urban Management Agency as an official city service.

The Mapatón is not only a new model for mapping complex informal transit systems the world over, but also a testament to the potential of crowdsourcing data and the benefits of unsiloing sectors to solve urban problems collaboratively. “It’s an attitude of city building,” says collaborator Emanuel Hernández, “not of waiting until the government solves our problems.” A few government agencies did have representatives involved in the project, but the project didn’t begin, depend on, or end with government support. As Gonzáles put it: “We had government, civil society, and private enterprise at the same table because truly, the causes are the common ones, and the incentives are the same for everybody.”