4 ms·
My favorite text-based weather report is definitely the "discussion" product from the National Weather Service. It gives some perspective, instead of just the
by samcheng 8y ago
My favorite text-based weather report is definitely the "discussion" product from the National Weather Service. It gives some perspective, instead of just the numbers. Importantly, it commonly has a discussion of forecast confidence/uncertainty.
If you read it long enough, you'll start to pick up some of the 'why' in the weather.
Here's an example:
https://forecast.weather.gov/product.php?site=NWS&issuedby=MTR&product=AFD&format=CI&version=1&glossary=1 https://forecast.weather.gov/product.php?site=NWS&issuedby=M...
I suppose you could curl it...
- craftyguy 8y agoHow stable is the output here? I noticed sections are delimited by '&&', and start with '.<SECTION TITLE>...'. If it's stable, then it might be fun to write a cli client to query/display this..
- samcheng 8y agoProbably quite stable; this stuff dates back to the telegraph...
- aftbit 8y agoFive minutes in python3 + requests: #!/usr/bin/python import requests import re SHOW_GROUPS = ['SYNOPSIS', 'DISCUSSION', 'MTR WATCHES/WARNINGS/ADVISORIES'] CITY = 'MTR' txt = requests.get('https://forecast.weather.gov/product.php?site=NWS&issuedby='+CITY+'&product=AFD&format=txt&version=1&glossary=0', timeout=30).text m = re.search(r'(?mis)<pre class="glossaryProduct">(.*)</pre>', txt) groups = m.group(1).split('&&\n') for g in groups: m = re.search(r'\.(.*?)\.\.\.', g) if m and m.group(1) in SHOW_GROUPS: print(g.strip()+'\n')
- craftyguy 8y agoYep, not hard if the input is somewhat stable...