8 ms·
My taxes pay for a weather station at the nearby airport with automated ATIS/METAR, and the USGS has a rain gauge a few blocks away. Two HTTP calls and I have
by joezydeco 4y ago
My taxes pay for a weather station at the nearby airport with automated ATIS/METAR, and the USGS has a rain gauge a few blocks away. Two HTTP calls and I have everything I need.
- ajoseps 4y agowhat do you hit to get the info?
- barbazoo 4y agoIf you're in the US, go to https://aviationweather.gov/metar https://aviationweather.gov/metar and pick your nearest station. For instance LA https://aviationweather.gov/metar/data?ids=KLAX&format=decoded&date=&hours=0 https://aviationweather.gov/metar/data?ids=KLAX&format=decod.... That gives you the current conditions. If you want to parse it, get the raw METAR string and parse individual components such as temperature. Not a fun thing to do though.
- joezydeco 4y agoThere are plenty of premade libraries, especially in Python, that are ready to use and adapt. https://github.com/python-metar/python-metar https://github.com/python-metar/python-metar
- joezydeco 4y agoIn the US, the US Geological Survey has plenty of APIs. Here's a starter page with information: https://help.waterdata.usgs.gov/faq/automated-retrievals https://help.waterdata.usgs.gov/faq/automated-retrievals