Trying to get away from airborne ammonia? Don’t linger in Lagos or Delhi. If you’re bent on avoiding ozone, you might want to add Beijing, Karachi, and Los Angeles to your list. These are some of the cities with the world’s worst air quality, according to a new analysis of four major gasses associated with air pollution: ammonia, formic acid, methanol, and ozone. The findings could help scientists better understand how geography and other local conditions play a role in determining air quality.

“It is critical to better understand what is contributing to air pollution … to protect growing populations from negative public health impacts,” says Miriam Marlier, an environmental scientist at Columbia University not involved in the study.

Poor air quality can lead to a host of health problems, including respiratory and cardiovascular disease. But measuring air quality is hard: Many cities—especially those in developing countries—lack the ground- and aircraft-based sensors and the trained personnel to repeatedly monitor conditions over large areas.

So Karen Cady-Pereira, a remote sensing scientist at Atmospheric and Environmental Research, an environmental consulting firm in Lexington, Massachusetts, decided to use a satellite to study air pollution above 18 of the world’s “megacities,” metropolitan areas with 10 million or more people. Since 2013, she and her team have measured levels of ammonia, formic acid, methanol, and ozone with an instrument called the Tropospheric Emission Spectrometer aboard NASA’s Aura satellite, which studies Earth’s atmosphere. Aura passes over each megacity every 16 days at approximately the same local time. That’s an important point, since air quality varies over the course of a day. Observations are also collected under the same atmospheric conditions, which means that data across cities can be accurately compared.

The team has found that Karachi, Pakistan, holds the world’s title for ozone. Of the nearly 300 measurements collected over 1 year, roughly a third exceeded what the researchers considered a “harmful” threshold for ozone, which can lead to smog. Ozone is high in other cities as well. But when it comes to ammonia, a gas that helps form airborne particles that can trigger lung disease, some cities stand out: Kolkata, India, exceeds the “harmful” threshold 47.1% of the time, Dhaka, Bangladesh, exceeds it 51.6% of the time, and Delhi exceeds it 73.5% of the time. Ammonia, which comes from livestock excrement and fertilizer, is more common in cities surrounded by lots of agricultural activity.

But the researchers are only just beginning to analyze their results, and they’re continuing to collect data on the other gases. So far, they’ve come to one conclusion: that biomass burning, including forest fires, trash burning, and agricultural crop clearing using fire, is responsible for a seasonal uptick in harmful gases in Lagos, Nigeria, and Mexico City, they plan to report in Atmospheric Chemistry and Physics.

The team also found that levels of ozone, ammonia, methanol, and formic acid—higher levels of which are associated with poorer air quality—all increased above Mexico City every year between March and June. That’s prime time for burning cropland to clear it for planting. Data from their study supports a link. One extreme pollution event in early May 2013 coincided with fires burning to the southwest of the city. Lagos, which has far higher levels of all four gases than Mexico City, is a booming metropolis grappling with an unreliable electrical grid and limited options for waste disposal. “Anybody who can afford it has a diesel generator, which is extremely polluting,” Cady-Pereira says. “And people burn a lot of trash just to get rid of it.”

Geography also plays a role. In Mexico City, mountains to the city’s north, east, and west act like a natural barricade against gases and particles from distant fires. In Lagos, intense sunlight near the equator drives reactions that produce ozone. Furthermore, sea breezes that repeatedly blow in and out above the coastal city trap pollutants.

Cady-Pereira and her team are looking for more patterns in their growing data set. Among those they’re currently exploring: unusually high levels of ammonia above Buenos Aires. She says that the large meat-slaughtering industry there may be the culprit. “[These maps] bring up a lot of things we could explore in more depth,” Cady-Pereira says.