Skip to main content

Python library to ease access to open weather data

Project description

https://github.com/earthobservations/wetterdienst/workflows/Tests/badge.svg https://codecov.io/gh/earthobservations/wetterdienst/branch/master/graph/badge.svg Documentation Status https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/pypi/pyversions/wetterdienst.svg https://img.shields.io/pypi/v/wetterdienst.svg https://img.shields.io/pypi/status/wetterdienst.svg https://pepy.tech/badge/wetterdienst/month https://img.shields.io/github/license/earthobservations/wetterdienst https://zenodo.org/badge/160953150.svg

Introduction

Welcome to Wetterdienst, your friendly weather service library for Python.

We are a group of like-minded people trying to make access to weather data in Python feel like a warm summer breeze, similar to other projects like rdwd for the R language, which originally drew our interest in this project.

While our long-term goal is to provide access to multiple weather services, we are still stuck with the German Weather Service (DWD). Contributions are always welcome!

This program and its repository tries to use modern Python technologies all over the place. The library is based on Pandas across the board, uses Poetry for package administration and GitHub actions for all things CI.

Features

Coverage

The library currently covers

  • historical weather data from ground stations

  • RADOLAN fitted radar data for areal precipitation

  • MOSMIX statistical optimized scalar forecasts extracted from weather models

To get better insight on which data we have currently made available, with this library take a look at data coverage.

Details

  • Get metadata for a set of Parameter, PeriodType and TimeResolution.

  • Get station(s) nearby a selected location for a given set.

  • Store/recover collected data.

  • Docker image to run the library dockerized.

  • Client to run the library from command line.

Setup

Run the following to make wetterdienst available in your current environment:

pip install wetterdienst

Synopsis

Get historical data for specific stations, using Python:

from wetterdienst import DWDStationRequest, Parameter, PeriodType, TimeResolution

request = DWDStationRequest(
    station_ids=[1048,4411],
    parameter=[Parameter.CLIMATE_SUMMARY, Parameter.SOLAR],
    time_resolution=TimeResolution.DAILY,
    start_date="1990-01-01",
    end_date="2020-01-01",
    tidy_data=True,
    humanize_column_names=True,
    write_file=True,
    prefer_local=True
)

for df in request.collect_data():
    # analyse the station here

Get data for specific stations from the command line:

# Get list of all stations for daily climate summary data in JSON format
wetterdienst stations --parameter=kl --resolution=daily --period=recent

# Get daily climate summary data for specific stations
wetterdienst readings --station=1048,4411 --parameter=kl --resolution=daily --period=recent

Documentation

We strongly recommend reading the full documentation, which will be updated continuously as we make progress with this library:

For the whole functionality, check out the Wetterdienst API section of our documentation, which will be constantly updated. To stay up to date with the development, take a look at the changelog. Also, don’t miss out our examples.

Data license

Although the data is specified as being open, the DWD asks you to reference them as copyright owner. Please take a look at the Open Data Strategy at the DWD and the Official Copyright statements before using the data.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wetterdienst-0.7.0.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wetterdienst-0.7.0-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file wetterdienst-0.7.0.tar.gz.

File metadata

  • Download URL: wetterdienst-0.7.0.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure

File hashes

Hashes for wetterdienst-0.7.0.tar.gz
Algorithm Hash digest
SHA256 e8cf19178fd0502c64b70a89131016d7548935ccaf6a4aedf846ef618222946e
MD5 5dbcddf7d71958703993f1dfda7b1bd6
BLAKE2b-256 db2984877557ec0db596948f3dc7f0da3c177b3be2f01ab5f529d01105448692

See more details on using hashes here.

File details

Details for the file wetterdienst-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: wetterdienst-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure

File hashes

Hashes for wetterdienst-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bda5343e64bc5c97e0023770e02ab1a56b74d3c0af744f1379fcef2cd390cad8
MD5 c03d2c632660290b85023a5767bda929
BLAKE2b-256 8bac1d6eaa5364184bb063a1b3251baff70e1c3016d8368fa330fe282ad474fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page