Air quality reporting on iOS
intergalactic.systems
intergalactic.systems
First, many countries have their own laws and policies regarding air quality exposure. Often times these regulations use metrics about time-average exposure (e.g. the annual average 8-hr maximum ozone concentration) and can't trivially be converted between agencies. It causes very negative user experiences when your air quality summary disagrees with what a regulatory agency is putting out to the public due to a measurement technicality - much easier just to localize the data in the same way you'd localize the rest of the UI.
Second, we're stuck with AQI and similar indices because air quality is a multi-faceted problem with different components measured wildly differently. For instance, PM2.5 and PM10 are typically reported in ug/m^3 - but who actually knows what these measurements mean? What's the difference between 15 and 30 ug/m^3? It's very far outside of the experiences that many individuals have, so end users really struggle to interpret these values, even when you translate them into simple "low"/"medium"/"high" categories. Then of course gas-phase pollutants are typically reported in volume concentrations like parts-per-billion or parts-per-million. Aside from the fact that these values are very commonly misinterpreted as much smaller than they actually are, the difference in units adds another bit of complexity into users interpreting what they're seeing.
A well-designed air quality index could factor our all these challenges. I definitely h/t Breezometer for their attempts there, even if it is generally poorly received. But it's a very challenging problem no matter how you slice it.
One country may lump in PM10 into their AQI, so if there is a dust storm or similar event, the AQI could spike. Other countries may only include PM2.5 or not include PM at all, which wouldn't capture the dust storm.
Ultimately, why not simply compute it and give the user a warning that the local measurement isn't compatible with proper AQI measurement?
Also, does my body magically changes the way it reacts to air pollution as soon as I take my first step abroad?
You totally could, but in practice it doesn't always or obviously lead to a positive user experience our outcome.
Remember when Donald Trump drew on a NOAA map and multiple outlets reported that was essentially a felony?
Imagine doing that all over the world. You're gonna find a couple jurisdictions not taking kindly. Remember, this is Apple, any negative pushback is a PR problem disguised as UI to it's walled garden.
The attempt to make things easy to interpret using a nice relative scale ends up in the end make them very opaque to interpret the number itself in any meaningful way.
If the threshold is 50, people might claim 74 is acceptable because it rounds to 50. If the threshold is 50.4 this is obviously false.
Yup. And if you look closely the underlying map also sometimes changes based on which country one is standing in (Crimea/Taiwan). Services like iOS are not scientific but consumer and government-focused services. They exist to appease a host of interested parties, not to render dispassionate information.
If they just showed numbers without colors, how would the UX work for the general public who isn’t all that knowledgeable?
Building a useful [1] experience while dealing with groups who read things differently isn’t easy and it’s not going to lead to global consistency because people are diverse and inconsistent
[1] https://www.nngroup.com/articles/usability-101-introduction-...
I believe one of the controversial aspects of Google’s “project dragonfly”, (the now scrapped reintroducing-google-search-for-China initiative) were modules that check with Chinese government servers for displaying knowledge cards deemed sensitive, and air quality reports were one of those. https://amp.theguardian.com/technology/2018/nov/27/google-em...
If the air makes people sick is a pretty objectively quantifiable question.
The differences go beyond unit conversion and a main issue is how much we are used to tolerate people dying early or having seriously reduced quality of their lives because of pollution.
Especially in urban and industrial areas.
What adds to the complexity is that air quality can vary significantly within a city. Compare having a flat between two busy roads and a nice house in the suburbs.
And compare that flat between two busy roads to a room next to a factory in the global south, or the US, or in Europe.
It's a question of how many suicides, cancers, strokes etc we want to tolerate.
There are studies quantifying the effects of these "local differences". And they are easy to find.
To me, pretending this was a question of culture or genetics is malicious obfuscation of the actual issues - not accusing you personally, but this is the essence of the combination of many of the comments here.
Air quality is measurable using several objective categories of pollutants.
Standardizing the units is one issue, facing the reality of millions of casualties per year is another one.
AQI is unique in this case, in that it is a color-coded interpretation of combining multiple underlying objective values (PM2.5, etc.). And different governments have chosen different official national schemes for this, according to what they want the population to consider "normal"/green.
Which means that air-polluting industry in one country might lobby for a wider "green" band. Nothing like that is happening around temperature or humidity as far as I'm aware on iOS.
(Though I do believe Beijing had a history of under-reporting official maximum daytime summer temperatures, since people couldn't work outdoors above a certain threshold.)
Factors like building shade, vehicle density, wind cover, terrain, cloud coverage, and variations in humidity, mean that thermometers placed at different points in any selected area will report massive variations in temperature, and the naive (and impossible) approach of even distributions of identical sensors taking measurements at the same clock times placed across some given weather area will yield numbers that are not helpful for most people.
For example, about 1/3 of the area of Burbank, CA is recreation and park spaces that are in the verdugo mountains, at their highest point within Burbank limits 1800 ft. above sea level, and with almost zero residents. The other 2/3 of Burbank are about 600 ft. above sea level. How would you offer a number that summarized the weather in Burbank?
Imagine factoring time into this. There is no temperature of the hour, there are individual measurements taken at specific moments in time in specific places, using differing methodologies, different equipment, variations in MoE, and at varying frequencies. Put all this together, and the work of the observational meteorologist to produce daily or hourly temperature averages becomes extremely complicated, and the first question they would ask is, "What will the averages be used for?"
Here are some examples from the large literature on these problems:
https://www.tandfonline.com/doi/full/10.1080/07055900.2015.1...
https://www.sciencedirect.com/science/article/abs/pii/S00221...
https://link.springer.com/chapter/10.1007/978-1-935704-35-5_...
But nevertheless, a correct, objective, dispassionate temperature reading for that coordinate does exist in reality. And the phone's weather service is trying to approximate that as closely as possible. And you can objectively measure the error to improve future models.
My point is still that this is qualitatively different from composite air quality indexes, which are politically designed, and therefore designed differently for different countries.
You sound like someone who has never lived anywhere that people bitch and moan about the temperature on the weather reports being wrong because people think it's warmer than weather stations report, and get into arguments that the weather stations aren't placed correctly.
Like producing food? A wider green band than what, the Netherlands map?
I think it's nice to be able to aspire to live in a green area. That one leaves little options, and paints a bleak picture.
And as long as ice continues to freeze at 32°F and water continues to boil at 212°F, I don't think anybody will be questioning the accuracy of the thermometers they buy.
What global scale would you pick otherwise? And would it be sensitive enough to show gradients in the least/most polluted countries and cities or would it just fill them in with one color?
At the very least, it means that a user cannot use these scales for inference without knowing/understanding the technology behind them. This is probably not the intention behind showing an air quality indicator in the iOS app.
The German LQI has associated colors, I know for sure the American does too, and I’ll bet the Dutch in the screenshots also comes directly from the definition of the scale.
And iOS defaulting to _local_ standards is a good thing! It means people get the same information they would from watching TV or reading newspaper, which is much more useful for most people than comparing their air quality to that of a neighboring country.
The built-in weather services in the OS should cater to the majority of the use cases, not a tiny and narrow minority.
And I hope we can agree that „people who distrust their own and neighboring countries pollution scales and need to compare them frequently” is not a wide-spread and mainstream position.
Sure, they aren't traveling enough to be catered to by apple, but it's a valid criticism.
It's interesting and well designed IMO. I don't think this actually causes issues for any users.
Hopefully the german definition of good air quality isn't too overly optimistic, or someone with actual health issues might get a surprise if they are used to being ok on days with a certain "colour" when traveling.
I guess you’re proposing that the AQ meter always use the scale of your home country. Doesn’t seem unreasonable but also seems like a quibble so tiny that it could be defeated if someone more knowledgeable offered a single reason against it.
And yes, I think a simple solution would be to use the colour of your home country that you are used to. Presumably if you moved, you could just learn the standards of your new country. A consistent standard that you can rely on in your phone when on a trip to another country definitely seems more useful if you are actually relying on this iOS app. It could be a simple app pref, a little toggle switch..
Anyone who travels between countries?
I do it a few times per week while I commute from Belgium to France and when I'm doing my groceries in whichever country is best for what I need. I'm interested in the air quality in France when I'm leaving Belgium, and in the quality in Belgium when I'm leaving France.
I don't look at them from iOS though so I don't really have any problem. But crossing borders is a rather common thing around here.
People that travel. Are you serious?
So very likely tied to the most common national air quality scale.
So it's explicit in what it shows.
Information based on user locality seems like an excellent design.
That's assuming the local government is giving the truth regarding air quality and that their "official scale" is made to reflect reality and not obscure some measurements.
In my hometown, there is a fight between locals and waste operators over excessive burn offs. The validity of air quality readings from the area are being tested in court.
In the past, the Vietnamese government removed IQAir from the App Store and Google Play as citizens became increasingly concerned about the air quality in the capital cities.
You wont learn much if you label everything you don't understand a 'conspiracy theory'. Air quality is not just another weather measurement.
The point is that the raw data is always the most valuable. Translating it is an easy task that can be done if the user wishes so.
Remember when trump defaced a NOAA weather map? Everyone knew he broke a law.
Now imagine advertising a local quality data set and giving it your own advisory information.
Great: open source
Not a chance: Apple
Is it really so bad? You don't hear anything about it from other sources... Tapping on, one finds the main pollutant to be ozone, "usually caused by traffic and it can be transported over large distances."
Idk what to think of this. Many people seem confused. Are we really in such poor air all the time?
Sometimes I bike through the fields in the morning, sniff the fresh humid air that has a coldness in it, I smell grass and flowers... Apple tells me: Insufficient (don't bike to fast!) :(.
Maybe they are right, maybe they are forcing us to come to terms with the things we do to our air.
Seems to cover most of the US, Canada, Mexico. Western Europe is largely present but is missing a handful of countries (Belgium, Luxembourg, Ireland, Switzerland, Austria, Liechtenstein, Portugal, and Iceland). Also covers most of Japan and South Korea and small localized portions of India and China.
It's a nice to have certainly but I wish it was more consistent.
It looks like the air quality models that iOS Weather is using are integrated into a single system, and then that system is asked to render maps in any of the different regions' AQI systems.
Which means, as OP has observed, if you open the map from one region, and then navigate the map viewer to another region, you can see how the AQI scoring system from the first region would evaluate the second. Which is rather interesting.
Also fwiw I've reckoned that these AQI models are clearly highly algorithmic, extrapolating and synthesizing data where sensors are not available.
I wonder what Apple is going to do about it. Will it be just one of their data sources or are they going to acquire their own?
https://www.calcalistech.com/ctechnews/article/sycbrdpbi
This article says they are using “machine learning” and “AI”. Makes me think it is all fake.
https://www.breezometer.com/pdfs/Ultimate-Guide-to-BreezoMet...
Their own documentation indicates the air quality measures they provide are just guesses based on their models. Page 4 basically says actually measuring particulates in the air is very costly, and so their solution is to come up with models to predict what it might be.
Data points may come from 2 places 100 mi apart, but what if someone lives between them?
Temperature or other weather data is often an extrapolation based on official weather data collection points, and AQI data is no different.
How that data gets extrapolated varies wildly by implementation.
edit: Also a fun fact, I live 2000ft above and 50mi from the nearest forecasting center in a valley. “Weather apps” are about as accurate as throwing darts at a board up here, because the models used to extrapolate known data completely fall apart with all the variables.
Our best source of data is the “short term weather discussion” by NOAA, which just gives some generalizations based on local weather knowledge.
Spatial interpolation is much more non-obvious than you might initially assume, when the data points are coming from arbitrary locations and not a regular grid. For anyone curious, here [1] is a good place to start, or look up "Kriging interpolation".
The basic implementation of any kind of continuous temperature estimation is to have a generic equation that relates how temperature naturally varies by altitude, use that normalize the temperature reported by weather stations according to altitude to create a "flat" temperature map, interpolate to create a smooth continuous temperature map using something like Kriging, and then de-normalize the temperature at a desired point according to the altitude of that location.
There are always going to be hyper-local variations that won't account for (are you on the sunny side or shaded side of a mountain? is there an air current? how is vegetation/buildings/asphalt affecting it?), but it's the basic starting point.
[1] https://geobgu.xyz/r-2020/spatial-interpolation-of-point-dat...
More importantly, high-resolution priors are universally available from weather models, so there is no need to just to ever naively interpolate between weather observation stations very far apart.
One of the reasons that consumer weather apps perform poorly is because in many cases, the companies producing them arbitrarily choose some sort of spatial or temporal resolution requirements, and then throw the problem to an engineer or data scientist who probably doesn't know much more than these simple interpolation techniques (and I absolutely lump kriging into the 'simple' category these days). A modicum of domain knowledge applied here produces a much better product with substantially less effort.
What kind of objective analysis techniques? And where does someone get high-resolution priors from? Are you saying that companies have gone out and done a one-time mapping of temperature etc. at a e.g. 1-mile grid across the US? (Which would be over 3 million points at that scale, compared to the ~10,000 US weather stations?)
The core idea of any objective analysis/interpolation scheme is that you model spatial relationships with some sort of function. Kriging exemplifies this - you fit a spatial covariance model and use that to predict values in the far field, using combinations of nearby values. I don't really have a good link or textbook reference at arms reach, but you can quickly re-frame this entire interpolation problem as a data assimilation one where you're attempting to approximate a solution to some 2D or 3D field using sparsely sampled observations; in the weather world, the Real-time Mesoscale Analysis used in the USA is a good example of a system which hybridizes a weather model and observations to create a high-resolution analysis [3].
A problem arises when the field you're analyzing can have shocks or variability much smaller than the scale that you're able to measure from your network. A front is a great example - across a front, temperature and wind direction will change over a very small distance, but most interpolation schemes will smear this out. The problem is that you really do care about that front and its location - that's where the interesting weather happens!
> And where does someone get high-resolution priors from?
A high-resolution weather forecast model, which uses physics to simulate the atmosphere and produce reference states. 3-km forecasts are readily and easily available in the US.
> Are you saying that companies have gone out and done a one-time mapping of temperature etc. at a e.g. 1-mile grid across the US?
No, this probably wouldn't be useful. Especially because we get a ~1-km mapping of lower troposphere temperatures from geostationary weather satellites every 10-15 minutes across the entire globe. May not be exactly "surface temperature", but it tells you a whole lot about high-frequency variability in temperature fields.
[1]: https://gmd.copernicus.org/preprints/gmd-2022-116/gmd-2022-1... [2]: https://journals.ametsoc.org/view/journals/wefo/24/2/2008waf... [3]: https://journals.ametsoc.org/view/journals/wefo/26/5/waf-d-1...
Much appreciated for all that info.
- AQI strongly varies with local human activities, e.g. a coal power plant in between the 2 places 100 miles appart.
- temporal and hardly predictable human activities, e.g. a chem industry without good attenuation system that boost its production to fill a special command. Or an attenuation system that breaks.
Unlike Google as their default search engine, accessing weather or air quality API costs money. (While they probably get paid for keeping Google as their default search engine)
I’ve noticed that the weather app on my iOS, iPadOS, and watchOS all show differing forecasts with all 3 devices within 18” of each other. AQI is just one of the parts of the forecast that I just don’t pay attention too. Around here in the summer, it is always an alert saying don’t go outside
I got burned this past weekend when painting my deck. Forecast was absolutely clear in the window I needed to paint/dry. Just after I started, forecast changed to nearly 100% rain this wasn’t a case of “oh maybe the chance of rain was wrong”. No, it went from 0 to having a hundred of mile wide storm pass through. The type of storm that doesn’t just pop up.
It’s insane how they killed dark sky.
In this particular case the actual values just happen to land on the edge of two colours in the scales with very different connotations - orange vs green.