All Projects → panodata → dwdweather2

panodata / dwdweather2

Licence: MIT license
Python client to access weather data from Deutscher Wetterdienst (DWD), the federal meteorological service in Germany.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to dwdweather2

wetterdienst
Open weather data for humans
Stars: ✭ 190 (+179.41%)
Mutual labels:  weather, open-data, weather-api, dwd
api
Community discussion and documentation for the NWS API
Stars: ✭ 168 (+147.06%)
Mutual labels:  weather, weather-data, weather-api
riem
✈️ ☀️ R package for accessing ASOS data via the Iowa Environment Mesonet ☁️ ✈️
Stars: ✭ 38 (-44.12%)
Mutual labels:  weather, weather-api
homepage
Custom Start/home page (multi LIVE search) with live animated weather and news ticker - written in HTML/JS. Minimal, self-hosted, and dope.
Stars: ✭ 35 (-48.53%)
Mutual labels:  weather, weather-data
OWM-JAPIs
Java APIs for OpenWeatherMap.org
Stars: ✭ 14 (-79.41%)
Mutual labels:  weather-data, weather-api
open-data-smn
An API to serve publicly available data from the SwissMetNet in 10min intervals
Stars: ✭ 23 (-66.18%)
Mutual labels:  weather, opendata
nasapower
API Client for NASA POWER Global Meteorology, Surface Solar Energy and Climatology in R
Stars: ✭ 79 (+16.18%)
Mutual labels:  weather, weather-data
patzilla
PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.
Stars: ✭ 71 (+4.41%)
Mutual labels:  opendata, open-data
meteofrance-api
Python client for Météo-France API. | Client python pour l'API Météo-France
Stars: ✭ 50 (-26.47%)
Mutual labels:  weather, weather-api
info-bot
🤖 A Versatile Telegram Bot
Stars: ✭ 37 (-45.59%)
Mutual labels:  weather, weather-api
Weather
Weather Android App using apixu API https://www.apixu.com
Stars: ✭ 48 (-29.41%)
Mutual labels:  weather, weather-api
owmr
An R Interface to OpenWeatherMap
Stars: ✭ 24 (-64.71%)
Mutual labels:  weather, weather-data
react-weather-app
⛅️ PWA Weather App made with ReactJS
Stars: ✭ 147 (+116.18%)
Mutual labels:  weather, weather-api
weather-api
A RESTful API to check the weather
Stars: ✭ 209 (+207.35%)
Mutual labels:  weather, weather-api
VWapi
⛈ ☀️ Visual Weather api. Returns beautiful pictures with the current weather.
Stars: ✭ 33 (-51.47%)
Mutual labels:  weather, weather-api
Wttr.in
⛅ The right way to check the weather
Stars: ✭ 16,345 (+23936.76%)
Mutual labels:  weather, weather-api
Dados Abertos
Repositório do serviço de Dados Abertos da Câmara. Consulte as "Issues" para atendimento a dúvidas e sugestões.
Stars: ✭ 153 (+125%)
Mutual labels:  opendata, open-data
MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (-29.41%)
Mutual labels:  weather, dwd
rainviewer-api-example
How to use RainViewer API: simple HTML + JS code which render an animated weather radar overlay on the map
Stars: ✭ 56 (-17.65%)
Mutual labels:  weather, weather-api
aprs-weather-submit
Manually submit weather station information to the APRS-IS network.
Stars: ✭ 17 (-75%)
Mutual labels:  weather, weather-data
https://assets.okfn.org/images/ok_buttons/od_80x15_red_green.png https://assets.okfn.org/images/ok_buttons/oc_80x15_blue.png https://assets.okfn.org/images/ok_buttons/os_80x15_orange_grey.png

dwdweather2

Python client to access weather data from Deutscher Wetterdienst (DWD), the federal meteorological service in Germany.

Note

Please note this library will gradually be phased out. You should consider using its successor library "Wetterdienst".

Installation

pip install dwdweather2

Synopsis

Command line usage

Get all stations with daily resolution:

dwdweather stations --resolution=daily

Get all stations with hourly resolution (default):

dwdweather stations --resolution=hourly

Get all stations with 10_minutes resolution:

dwdweather stations --resolution=10_minutes

Get closest station (first argument is longitude, second is latitude):

dwdweather station 7.0 51.0

Export stations as CSV:

dwdweather stations --type csv --file stations.csv

Export stations as GeoJSON:

dwdweather stations --type geojson --file stations.geojson

Get weather at station for certain hour (UTC):

dwdweather weather 2667 2019-06-01T15:00

To restrict the import to specified categories, run the program like:

dwdweather weather 2667 2019-06-01T15:00 --categories air_temperature precipitation pressure

Finally, to drop the cache database before performing any work, use the --reset-cache option:

dwdweather stations --reset-cache

Choose dataset with daily resolution:

dwdweather weather 44 2020-06-01 --resolution=daily

Choose dataset with hourly resolution:

dwdweather weather 44 2020-06-01T08 --resolution=hourly

Choose dataset with 10_minutes resolution:

dwdweather weather 2667 2019-06-01T15:20 --resolution=10_minutes

Usage as library

from datetime import datetime
from dwdweather import DwdWeather

# Create client object.
dwd = DwdWeather(resolution="hourly")

# Find closest station to position.
closest = dwd.nearest_station(lon=7.0, lat=51.0)

# The hour you're interested in.
# The example is 2014-03-22 12:00 (UTC).
query_hour = datetime(2014, 3, 22, 12)

result = dwd.query(station_id=closest["station_id"], timestamp=query_hour)
print(result)

DwdWeather.query() returns a dictionary with the full set of possible keys as outlined in doc/usage-library.rst.

Notes

  • Data is cached in a local sqlite3 database to improve query performance for consecutive invocations.
  • The "stations cache" is filled upon first request to DwdWeather.stations() or DwdWeather.nearest_station()
  • The "stations cache" will not be refreshed automatically. Use DwdWeather.import_stations() to do this.
  • The "measures cache" is filled upon first access to measures using DwdWeather.query() and updated whenever a query cannot be fulfilled from the cache.
  • The cache by default resides in the ~/.dwd-weather directory. This can be controlled using the cachepath argument of DwdWeather().
  • The amount of data can be ~60 MB per station for full historic extent and will obviously increase by time.
  • If weather data is queried and the query can't be fulfilled from the cache, data is loaded from the server - even if the data has been updated a second before. If the server doesn't have data for the requested time (e.g. since it's not yet available), this unnecessarily causes network traffic and wait time. Certainly space for improvement here.

Licenses

Code license

Licensed under the MIT license. See LICENSE for details.

Data license

The DWD has information about their terms of use policy in German and English.

Project information

Credits

Thanks to Marian Steinbach, all other contributors and the DWD.

Changelog

See file CHANGES.rst.

Other projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].