Open Neverest opened 8 years ago
I suggest to take a look at the OpenAQ API for that.
The UV index would be nice too.
Thank you very much for the idea. Actually, I had this idea too, but the main problem was (and still is) to find a good data source. I have a feeling, that one data source will be not enough. For example, the suggested OpenAQ data source seems to be good for Europe, but has almost no data about China. Though for that country this functionality would be extremely important.
Do you have some other suggestions about AQ data sources (besides OpenAQ)?
http://aqicn.org/ seems to have Chinese cities as well, but it requires a token to access...
For the US you might be able to get data from airnow.gov . It looks like you might need to request an API account though. https://docs.airnowapi.org/
Actually purpleair.com also has data for much of the US and Europe, and they just have a JSON api with no authentication required: https://www2.purpleair.com/community/faq#hc-access-the-json
@ScanuNicco Thank you for the both links. Both look very promising, especially PurpleAir. I will add them to the list of the potential data sources
@eadmaster Now we have UV Index: it is %u
in the one-line query
I use wttr.in in my i3blocks/i3status config. However I made it very simple for the air quality...
#!/bin/bash
if [ "$(curl https://www.iqair.com/germany/baden-wuerttemberg/walldorf | grep -Eo " Open your windows")" = " Open your windows" ] ;
then
echo "Good air outside"
else
echo "Bad air outside"
fi
Is it possible to add the Air Quality Index on wttr.in in the future?