# cityid=..
# 3319578 for Obsteig, AT
+# needed packaes: python3-mysqldb python3-sqlalchemy
+
from pprint import pprint
import argparse
import configparser
data['winddegrees'] = w['wind']['deg'] if 'deg' in w['wind'] else math.nan
data['winddirection'] = degToCompass(data['winddegrees'])
- data['precipitation'] = w['rain']['3h'] if 'rain' in w else math.nan
+ data['precipitation'] = w['rain']['3h'] if 'rain' in w and w['rain'].get('3h') else math.nan
data['visibility'] = w.get('visibility', math.nan)
return data