Small collection of Python functions to download some parameters from the ten minute observations of the Deutscher Wetterdienst (DWD) Open Data server. All data falls under the DWD's copyright.
Every time get-dwd-weather.py is run it will save all the observations not already saved from today into a SQLite3 database.
There are only two options, configured in weather_config.ini
, which are the DWD weather station ID and the (relative) path to the SQLite DB to use. If no DB exists under that name a new one will be created, with the relevant tables.
The DWD's Station List contains a table of IDs in the column 'Stations_ID'. They are numeric, and in the 10 minute data directories padded to 5 places with zeros.
E.G. '7341' for Offenbach is '07341' in the URLs.
weather_data_schemas.py contains the details of which columns are saved from the observation data, into which table and under what column names. If you need add/remove/rename any of this, change it there.
- Python (3.9 and 3.10 tested)
- Python Reqests module
- SQLite3
Check the latest data in the DB with:
SELECT datetime(timestamp_utc, 'unixepoch'), * FROM <tablename>;