Skip to content

Python Toolset For Accessing Weather Data From German Weather Service

License

Notifications You must be signed in to change notification settings

panodata/wetterdienst

 
 

Repository files navigation

Wetterdienst - Open weather data for humans

Documentation Status https://pepy.tech/badge/wetterdienst/month https://img.shields.io/github/license/earthobservations/wetterdienst

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

  • Weather observation data. Both historical and recent.
  • Radar data. All of composite, radolan, radvor, sites and radolan_cdc.
  • MOSMIX statistical optimized scalar forecasts extracted from weather models. Both MOSMIX-L and MOSMIX-S is supported.

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.
  • Store/recover collected data.
  • Command line interface.
  • Run SQL queries on the results.
  • Export results to databases and other data sinks.
  • Public Docker image.

Setup

Run this to make wetterdienst available in your current environment:

pip install wetterdienst

Synopsis

Get historical data for specific stations, using Python:

from wetterdienst.dwd.observations import DWDObservationData, DWDObservationParameterSet,
    DWDObservationPeriod, DWDObservationResolution

observations = DWDObservationData(
    station_ids=[1048,4411],
    parameters=[DWDObservationParameterSet.CLIMATE_SUMMARY,
                DWDObservationParameterSet.SOLAR],
    resolution=DWDObservationResolution.DAILY,
    start_date="1990-01-01",
    end_date="2020-01-01",
    tidy_data=True,
    humanize_column_names=True,
)

# Collect and analyse data here.
for df in observations.collect_data():
    print(df)

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.

About

Python Toolset For Accessing Weather Data From German Weather Service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.6%
  • Dockerfile 0.4%