Skip to content

Small Python package for downloading the DWD's 10 minute open weather data.

License

Notifications You must be signed in to change notification settings

henryleach/get-dwd-weather-data

Repository files navigation

Get DWD Ten Minute Weather Data

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.

Configuration

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.

Changing Observation Data Saved

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.

Requirements

  • Python (3.9 and 3.10 tested)
  • Python Reqests module
  • SQLite3

Testing

Check the latest data in the DB with:

SELECT datetime(timestamp_utc, 'unixepoch'), * FROM <tablename>;

About

Small Python package for downloading the DWD's 10 minute open weather data.

Topics

Resources

License

Stars

Watchers

Forks

Languages