Cities are happening places, every neighborhood a different personality, each street a new experience. And around every corner, a different atmospheric mixture of pollutants to clog your lungs, cloud your eyes, and congest your heart.

It's no secret that cities have bad air, but until now it's only been possible to describe how bad in ordinal terms: Los Angeles is bad, but not as bad as Bakersfield, but both are nowhere near as nasty as Beijing. Now Google has partnered with an environmental testing startup to measure air quality within a city. And not just block by block, but hour to hour, day to night.

On July 29, Google announced that three of its Street View cars had spent over a month driving through Denver, gathering data on nine different pollutants. Each car was equipped with a suite of environmental sensors built by Aclima, a San Francisco-based company. Now the project—which also involved partnering with the EPA, the Environmental Defense Fund, and Lawrence Berkeley National Lab—is coming to San Francisco, and its creators hope it will lead to a global network of air quality sensors with open data that will let you plan your outdoor excursions (and inhalations) to avoid the most polluted locations and times of day.

The sensors sitting in the back of the cars started out in Google's offices. "When we started working with Street View we had already deployed the largest environmental sensor network in the world," says Davida Herzl, CEO of Aclima, the company that built the sensors. For years, the company has been collecting air quality data from more than 500 multi-sensors (each a package of 12 sensors) across 21 different Google offices around the world.

That network helped Aclima train their software, but taking the network outdoors had some additional complications. Too much humidity can gump up the air and make it hard for the sensors to get an accurate reading, and wind shifts can make it hard for the machines to get accurate counts. "In order for people to make decisions they need to know they can rely on that data," says Herzl. So while Google helped Aclima get their sensors into the field, the startup partnered with the EPA, the EDF, and Lawrence Berkeley to fine tune their hard- and software.

"With the advent of cheaper, better sensors we have an opportunity to understand the patterns of pollution," says Steve Hamburg, chief scientist at the Environmental Defense Fund, which will be using data as part of in its ongoing mapping project with Google. This isn't Hamburg's first rodeo with environmental sensors on cars. In 2014, the EDF teamed up with Google to deploy methane detectors on Street View cars to sniff out infrastructure leaks in Boston, Indianapolis, and New York City’s Staten Island.

To Hamburg, the eventual goal is to have a distributed network of sensors, priced so anyone interested in monitoring the atmosphere around them can afford to join in. "In post-Fukushima Japan, people there found a relatively cheap Geiger counter, made it available, then crowdsourced the data to make maps of radiation patterns that were orders of magnitude more spatially explicit than government data," he says, adding that he envisions a similar network for environmental pollutants.

But deploying a nationwide—or even neighborhood-wide—sensor network will be a lot harder for pollutants. Radiation is relatively easy to detect: Interference is relatively easy to tease out, and levels don't really fluctuate throughout the day. Pollution sensors, though, need to account for shifts in wind, temperature, and humidity, and because of that, they're typically pretty pricey.

Exact costs depend on the pollutant, but range from hundreds to thousands of dollars. Aclima's is a multi-sensor, which means a single unit could cost well into the tens or hundreds of thousands. Or it could be much lower. The company was mum on pricing details. Aclima works with both off-the-shelf sensors, and those built in-house. "We partnered with Lawrence Berkeley National Laboratory to develop the world's smallest particulate sensor," says Herzl. She didn't provide details, but indicated that her company's products aren't quite as cheap as she'd like them to be, and bringing the price down was a major goal.

For Google, both the methane detectors and this current project are part of a project called Google Earth Outreach. In an email, the company says it would make its data available to local and state governments to help them improve air quality, for example by mitigating pollution exposure (by planting trees, perhaps) or passing regulations. Once collected by the cars, the data gets uploaded to cloud servers where it gets validated by Aclima's staff scientists. The data currently is not available for download, but Google says it will be eventually.

Denver was all about making sure that mobile sensing collected good data. "In the Bay we're partnering with a number of different groups and scientists to explore the applications of this data," says Herzl. Sniffing for pollutants is way more productive than Street View's previous extracurricular activity: intercepting data from public Wi-Fi routers. And if all goes according to plan, that data will eventually help soften the edges of your city's smoggy air.