chubin / wttr.in

:partly_sunny: The right way to check the weather
https://wttr.in
Apache License 2.0
24.68k stars 1.11k forks source link

[Feature Request]Air Quality Index(AQI) #49

Open Neverest opened 8 years ago

Neverest commented 8 years ago

Is it possible to add the Air Quality Index on wttr.in in the future?

eadmaster commented 6 years ago

I suggest to take a look at the OpenAQ API for that.

The UV index would be nice too.

chubin commented 6 years ago

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)?

eadmaster commented 6 years ago

http://aqicn.org/ seems to have Chinese cities as well, but it requires a token to access...

ScanuNicco commented 3 years ago

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/

ScanuNicco commented 3 years ago

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

chubin commented 3 years ago

@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

chubin commented 2 years ago

@eadmaster Now we have UV Index: it is %u in the one-line query

zDEFz commented 1 year ago

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