Name | wetterdienst JSON |
Version |
0.97.0
JSON |
| download |
home_page | None |
Summary | Open weather data for humans |
upload_time | 2024-10-06 21:20:24 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <4.0,>=3.9 |
license | MIT License Copyright (c) 2018-2023 earthobservations Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
deutscher-wetterdienst
dmo
eaufrance-hubeau
environment-and-climate-change-canada
environmental-agency-uk
federal-waterways-and-shipping-administration-germany
forecast
geosphere-austria
ghcn
historical
institute-of-meteorology-and-water-management-poland
mosmix
national-oceanic-and-atmospheric-administration
national-weather-service
near-real-time
observation
open-data
open-source
radar
radolan
recent
time-series
weather-api
weather-data
weather-station
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Wetterdienst - Open weather data for humans
###########################################
.. |pic1| image:: https://raw.githubusercontent.com/earthobservations/wetterdienst/main/docs/img/german_weather_stations.png
:alt: German weather stations managed by Deutscher Wetterdienst
:width: 32%
.. |pic2| image:: https://raw.githubusercontent.com/earthobservations/wetterdienst/main/docs/img/temperature_ts.png
:alt: temperature timeseries of Hohenpeissenberg/Germany
:width: 32%
.. |pic3| image:: https://raw.githubusercontent.com/earthobservations/wetterdienst/main/docs/img/hohenpeissenberg_warming_stripes.png
:alt: warming stripes of Hohenpeissenberg/Germany
:width: 32%
|pic1| |pic2| |pic3|
..
**"What do we want? Climate Justice! When do we want it? Now!" - FFF**
..
**WARNING**
This library is a work in progress!
Breaking changes should be expected until a 1.0 release, so version pinning is recommended.
**CI**
.. image:: https://github.com/earthobservations/wetterdienst/actions/workflows/tests.yml/badge.svg?branch=main
:target: https://github.com/earthobservations/wetterdienst/actions?workflow=Tests
:alt: CI: Overall outcome
.. image:: https://readthedocs.org/projects/wetterdienst/badge/?version=latest
:target: https://wetterdienst.readthedocs.io/en/latest/?badge=latest
:alt: Documentation status
.. image:: https://codecov.io/gh/earthobservations/wetterdienst/branch/main/graph/badge.svg
:target: https://codecov.io/gh/earthobservations/wetterdienst
:alt: CI: Code coverage
**Meta**
.. image:: https://img.shields.io/pypi/v/wetterdienst.svg
:target: https://pypi.org/project/wetterdienst/
:alt: PyPI version
.. image:: https://img.shields.io/conda/vn/conda-forge/wetterdienst.svg
:target: https://anaconda.org/conda-forge/wetterdienst
:alt: Conda version
.. image:: https://img.shields.io/github/license/earthobservations/wetterdienst
:target: https://github.com/earthobservations/wetterdienst/blob/main/LICENSE
:alt: Project license
.. image:: https://img.shields.io/pypi/status/wetterdienst.svg
:target: https://pypi.python.org/pypi/wetterdienst/
:alt: Project status (alpha, beta, stable)
.. image:: https://img.shields.io/pypi/pyversions/wetterdienst.svg
:target: https://pypi.python.org/pypi/wetterdienst/
:alt: Python version compatibility
**Downloads**
.. image:: https://static.pepy.tech/personalized-badge/wetterdienst?period=month&units=international_system&left_color=grey&right_color=blue&left_text=PyPI%20downloads/month
:target: https://pepy.tech/project/wetterdienst
:alt: PyPI downloads
.. image:: https://img.shields.io/conda/dn/conda-forge/wetterdienst.svg?label=Conda%20downloads
:target: https://anaconda.org/conda-forge/wetterdienst
:alt: Conda downloads
**Citation**
.. image:: https://zenodo.org/badge/160953150.svg
:target: https://zenodo.org/badge/latestdoi/160953150
:alt: Citation reference
.. overview_start_marker
Introduction
############
Overview
********
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.
Our long-term goal is to provide access to multiple weather services as well as other
related agencies such as river measurements. With ``wetterdienst`` we try to use modern
Python technologies all over the place. The library is based on polars_ (we <3 pandas_, it is still part of some
IO processes) across the board, uses uv_ for package administration and GitHub Actions for all things CI.
Our users are an important part of the development as we are not currently using the
data we are providing and only implement what we think would be the best. Therefore
contributions and feedback whether it be data related or library related are very
welcome! Just hand in a PR or Issue if you think we should include a new feature or data
source.
.. _rdwd: https://github.com/brry/rdwd
.. _polars: https://www.pola.rs/
.. _pandas: https://pandas.pydata.org/
.. _uv: https://github.com/astral-sh/uv
Data
****
.. _data: https://wetterdienst.readthedocs.io/en/latest/data/index.html
.. _coverage: https://wetterdienst.readthedocs.io/en/improve-documentation/data/coverage.html
.. _map: https://bookdown.org/brry/rdwd/interactive-map.html
.. _table: https://bookdown.org/brry/rdwd/available-datasets.html
For an overview of the data we have currently made available and under which
license it is published take a look at the data_ section. Detailed information
on datasets and parameters is given at the coverage_ subsection. Licenses and
usage requirements may differ for each provider so check this out before including
the data in your project to be sure that you fulfill copyright requirements!
Features
********
- APIs for stations and values
- Get stations nearby a selected location
- Define your request by arguments such as `parameter`, `period`, `resolution`,
`start date`, `end date`
- Define general settings in Settings context
- Command line interface
- Web-API via FastAPI, hosted on `wetterdienst.eobs.org <https://wetterdienst.eobs.org>`_
- Rich UI features like `explorer <https://wetterdienst.streamlit.app>`_, `stripes <https://stripes.streamlit.app>`_
- Run SQL queries on the results
- Export results to databases and other data sinks
- Public Docker image
- Interpolation and Summary of station values
Setup
*****
Native
======
Via PyPi (standard):
.. code-block:: bash
pip install wetterdienst
Via Github (most recent):
.. code-block:: bash
pip install git+https://github.com/earthobservations/wetterdienst
There are some extras available for ``wetterdienst``. Use them like:
.. code-block:: bash
pip install wetterdienst[sql]
- docs: Install the Sphinx documentation generator.
- ipython: Install iPython stack.
- export: Install openpyxl for Excel export and pyarrow for writing files in Feather- and Parquet-format.
- sql: Install DuckDB for querying data using SQL.
- duckdb: Install support for DuckDB.
- influxdb: Install support for InfluxDB.
- cratedb: Install support for CrateDB.
- mysql: Install support for MySQL.
- postgresql: Install support for PostgreSQL.
- interpolation: Install support for station interpolation.
In order to check the installation, invoke:
.. code-block:: bash
wetterdienst --help
.. _run-in-docker:
Docker
======
Docker images for each stable release will get pushed to GitHub Container Registry.
``wetterdienst`` serves a full environment, including *all* of the optional dependencies of Wetterdienst.
Pull the Docker image:
.. code-block:: bash
docker pull ghcr.io/earthobservations/wetterdienst
Library
-------
Use the latest stable version of ``wetterdienst``:
.. code-block:: bash
$ docker run -ti ghcr.io/earthobservations/wetterdienst
Python 3.8.5 (default, Sep 10 2020, 16:58:22)
[GCC 8.3.0] on linux
.. code-block:: python
import wetterdienst
wetterdienst.__version__
Command line script
-------------------
The ``wetterdienst`` command is also available:
.. code-block:: bash
# Make an alias to use it conveniently from your shell.
alias wetterdienst='docker run -ti ghcr.io/earthobservations/wetterdienst wetterdienst'
wetterdienst --help
wetterdienst --version
wetterdienst info
Raspberry Pi / LINUX ARM
========================
Running wetterdienst on Raspberry Pi, you need to install **numpy**
and **lxml** prior to installing wetterdienst by running the following
lines:
.. code-block:: bash
# not all installations may be required to get lxml running
sudo apt-get install gfortran
sudo apt-get install libopenblas-base
sudo apt-get install libopenblas-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install python3-lxml
Additionally expanding the Swap to 2048 mb may be required and can be done via swap-file:
.. code-block:: bash
sudo nano /etc/dphys-swapfile
Thanks `chr-sto`_ for reporting back to us!
.. _chr-sto: https://github.com/chr-sto
Example
*******
**Task: Get historical climate summary for two German stations between 1990 and 2020**
Library
=======
.. code-block:: python
>>> import polars as pl
>>> _ = pl.Config.set_tbl_hide_dataframe_shape(True)
>>> from wetterdienst import Settings
>>> from wetterdienst.provider.dwd.observation import DwdObservationRequest
>>> settings = Settings( # default
... ts_shape="long", # tidy data
... ts_humanize=True, # humanized parameters
... ts_si_units=True # convert values to SI units
... )
>>> request = DwdObservationRequest(
... parameter="climate_summary",
... resolution="daily",
... start_date="1990-01-01", # if not given timezone defaulted to UTC
... end_date="2020-01-01", # if not given timezone defaulted to UTC
... settings=settings
... ).filter_by_station_id(station_id=(1048, 4411))
>>> stations = request.df
>>> stations.head()
┌────────────┬──────────────┬──────────────┬──────────┬───────────┬────────┬─────────────┬─────────┐
│ station_id ┆ start_date ┆ end_date ┆ latitude ┆ longitude ┆ height ┆ name ┆ state │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ datetime[μs, ┆ datetime[μs, ┆ f64 ┆ f64 ┆ f64 ┆ str ┆ str │
│ ┆ UTC] ┆ UTC] ┆ ┆ ┆ ┆ ┆ │
╞════════════╪══════════════╪══════════════╪══════════╪═══════════╪════════╪═════════════╪═════════╡
│ 01048 ┆ 1934-01-01 ┆ ... ┆ 51.1278 ┆ 13.7543 ┆ 228.0 ┆ Dresden-Klo ┆ Sachsen │
│ ┆ 00:00:00 UTC ┆ 00:00:00 UTC ┆ ┆ ┆ ┆ tzsche ┆ │
│ 04411 ┆ 1979-12-01 ┆ ... ┆ 49.9195 ┆ 8.9672 ┆ 155.0 ┆ Schaafheim- ┆ Hessen │
│ ┆ 00:00:00 UTC ┆ 00:00:00 UTC ┆ ┆ ┆ ┆ Schlierbach ┆ │
└────────────┴──────────────┴──────────────┴──────────┴───────────┴────────┴─────────────┴─────────┘
>>> values = request.values.all().df
>>> values.head()
┌────────────┬─────────────────┬───────────────────┬─────────────────────────┬───────┬─────────┐
│ station_id ┆ dataset ┆ parameter ┆ date ┆ value ┆ quality │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ datetime[μs, UTC] ┆ f64 ┆ f64 │
╞════════════╪═════════════════╪═══════════════════╪═════════════════════════╪═══════╪═════════╡
│ 01048 ┆ climate_summary ┆ cloud_cover_total ┆ 1990-01-01 00:00:00 UTC ┆ 100.0 ┆ 10.0 │
│ 01048 ┆ climate_summary ┆ cloud_cover_total ┆ 1990-01-02 00:00:00 UTC ┆ 100.0 ┆ 10.0 │
│ 01048 ┆ climate_summary ┆ cloud_cover_total ┆ 1990-01-03 00:00:00 UTC ┆ 91.25 ┆ 10.0 │
│ 01048 ┆ climate_summary ┆ cloud_cover_total ┆ 1990-01-04 00:00:00 UTC ┆ 28.75 ┆ 10.0 │
│ 01048 ┆ climate_summary ┆ cloud_cover_total ┆ 1990-01-05 00:00:00 UTC ┆ 91.25 ┆ 10.0 │
└────────────┴─────────────────┴───────────────────┴─────────────────────────┴───────┴─────────┘
.. code-block:: python
values.to_pandas() # to get a pandas DataFrame and e.g. create some matplotlib plots
Client
======
.. code-block:: bash
# Get list of all stations for daily climate summary data in JSON format
wetterdienst stations --provider=dwd --network=observation --parameter=kl --resolution=daily --all
# Get daily climate summary data for specific stations
wetterdienst values --provider=dwd --network=observation --station=1048,4411 --parameter=kl --resolution=daily
Further examples (code samples) can be found in the examples_ folder.
.. _examples: https://github.com/earthobservations/wetterdienst/tree/main/examples
.. overview_end_marker
Acknowledgements
****************
We want to acknowledge all environmental agencies which provide their data open and free
of charge first and foremost for the sake of endless research possibilities.
We want to acknowledge Jetbrains_ and the `Jetbrains OSS Team`_ for providing us with
licenses for Pycharm Pro, which we are using for the development.
We want to acknowledge all contributors for being part of the improvements to this
library that make it better and better every day.
.. _Jetbrains: https://www.jetbrains.com/
.. _Jetbrains OSS Team: https://github.com/JetBrains
Important Links
***************
- Restapi: https://wetterdienst.eobs.org/
- Explorer: https://wetterdienst.streamlit.app/
- Stripes: https://stripes.streamlit.app/
- Documentation: https://wetterdienst.readthedocs.io/
- Usage: https://wetterdienst.readthedocs.io/en/latest/usage/
- Contribution: https://wetterdienst.readthedocs.io/en/latest/contribution/
- Changelog: https://wetterdienst.readthedocs.io/en/latest/changelog.html
- Examples (runnable scripts): https://github.com/earthobservations/wetterdienst/tree/main/examples
- Benchmarks: https://github.com/earthobservations/wetterdienst/tree/main/benchmarks
.. _Polars DataFrame: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/
Raw data
{
"_id": null,
"home_page": null,
"name": "wetterdienst",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "deutscher-wetterdienst, dmo, eaufrance-hubeau, environment-and-climate-change-canada, environmental-agency-uk, federal-waterways-and-shipping-administration-germany, forecast, geosphere-austria, ghcn, historical, institute-of-meteorology-and-water-management-poland, mosmix, national-oceanic-and-atmospheric-administration, national-weather-service, near-real-time, observation, open-data, open-source, radar, radolan, recent, time-series, weather-api, weather-data, weather-station",
"author": null,
"author_email": "Benjamin Gutzmann <gutzemann@gmail.com>, Andreas Motl <andreas.motl@panodata.org>",
"download_url": "https://files.pythonhosted.org/packages/29/93/01c24c36bd669806b8eaa10366f6a9035f53834e37835fb2a5f38e218c14/wetterdienst-0.97.0.tar.gz",
"platform": null,
"description": "Wetterdienst - Open weather data for humans\n###########################################\n\n.. |pic1| image:: https://raw.githubusercontent.com/earthobservations/wetterdienst/main/docs/img/german_weather_stations.png\n :alt: German weather stations managed by Deutscher Wetterdienst\n :width: 32%\n\n.. |pic2| image:: https://raw.githubusercontent.com/earthobservations/wetterdienst/main/docs/img/temperature_ts.png\n :alt: temperature timeseries of Hohenpeissenberg/Germany\n :width: 32%\n\n.. |pic3| image:: https://raw.githubusercontent.com/earthobservations/wetterdienst/main/docs/img/hohenpeissenberg_warming_stripes.png\n :alt: warming stripes of Hohenpeissenberg/Germany\n :width: 32%\n\n|pic1| |pic2| |pic3|\n\n..\n\n **\"What do we want? Climate Justice! When do we want it? Now!\" - FFF**\n\n..\n\n **WARNING**\n\n This library is a work in progress!\n\n Breaking changes should be expected until a 1.0 release, so version pinning is recommended.\n\n**CI**\n\n.. image:: https://github.com/earthobservations/wetterdienst/actions/workflows/tests.yml/badge.svg?branch=main\n :target: https://github.com/earthobservations/wetterdienst/actions?workflow=Tests\n :alt: CI: Overall outcome\n.. image:: https://readthedocs.org/projects/wetterdienst/badge/?version=latest\n :target: https://wetterdienst.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation status\n.. image:: https://codecov.io/gh/earthobservations/wetterdienst/branch/main/graph/badge.svg\n :target: https://codecov.io/gh/earthobservations/wetterdienst\n :alt: CI: Code coverage\n\n**Meta**\n\n.. image:: https://img.shields.io/pypi/v/wetterdienst.svg\n :target: https://pypi.org/project/wetterdienst/\n :alt: PyPI version\n.. image:: https://img.shields.io/conda/vn/conda-forge/wetterdienst.svg\n :target: https://anaconda.org/conda-forge/wetterdienst\n :alt: Conda version\n.. image:: https://img.shields.io/github/license/earthobservations/wetterdienst\n :target: https://github.com/earthobservations/wetterdienst/blob/main/LICENSE\n :alt: Project license\n.. image:: https://img.shields.io/pypi/status/wetterdienst.svg\n :target: https://pypi.python.org/pypi/wetterdienst/\n :alt: Project status (alpha, beta, stable)\n.. image:: https://img.shields.io/pypi/pyversions/wetterdienst.svg\n :target: https://pypi.python.org/pypi/wetterdienst/\n :alt: Python version compatibility\n\n**Downloads**\n\n.. image:: https://static.pepy.tech/personalized-badge/wetterdienst?period=month&units=international_system&left_color=grey&right_color=blue&left_text=PyPI%20downloads/month\n :target: https://pepy.tech/project/wetterdienst\n :alt: PyPI downloads\n.. image:: https://img.shields.io/conda/dn/conda-forge/wetterdienst.svg?label=Conda%20downloads\n :target: https://anaconda.org/conda-forge/wetterdienst\n :alt: Conda downloads\n\n**Citation**\n\n.. image:: https://zenodo.org/badge/160953150.svg\n :target: https://zenodo.org/badge/latestdoi/160953150\n :alt: Citation reference\n\n.. overview_start_marker\n\nIntroduction\n############\n\nOverview\n********\n\nWelcome to Wetterdienst, your friendly weather service library for Python.\n\nWe are a group of like-minded people trying to make access to weather data in\nPython feel like a warm summer breeze, similar to other projects like\nrdwd_ for the R language, which originally drew our interest in this project.\nOur long-term goal is to provide access to multiple weather services as well as other\nrelated agencies such as river measurements. With ``wetterdienst`` we try to use modern\nPython technologies all over the place. The library is based on polars_ (we <3 pandas_, it is still part of some\nIO processes) across the board, uses uv_ for package administration and GitHub Actions for all things CI.\nOur users are an important part of the development as we are not currently using the\ndata we are providing and only implement what we think would be the best. Therefore\ncontributions and feedback whether it be data related or library related are very\nwelcome! Just hand in a PR or Issue if you think we should include a new feature or data\nsource.\n\n.. _rdwd: https://github.com/brry/rdwd\n.. _polars: https://www.pola.rs/\n.. _pandas: https://pandas.pydata.org/\n.. _uv: https://github.com/astral-sh/uv\n\nData\n****\n\n.. _data: https://wetterdienst.readthedocs.io/en/latest/data/index.html\n.. _coverage: https://wetterdienst.readthedocs.io/en/improve-documentation/data/coverage.html\n.. _map: https://bookdown.org/brry/rdwd/interactive-map.html\n.. _table: https://bookdown.org/brry/rdwd/available-datasets.html\n\nFor an overview of the data we have currently made available and under which\nlicense it is published take a look at the data_ section. Detailed information\non datasets and parameters is given at the coverage_ subsection. Licenses and\nusage requirements may differ for each provider so check this out before including\nthe data in your project to be sure that you fulfill copyright requirements!\n\nFeatures\n********\n\n- APIs for stations and values\n- Get stations nearby a selected location\n- Define your request by arguments such as `parameter`, `period`, `resolution`,\n `start date`, `end date`\n- Define general settings in Settings context\n- Command line interface\n- Web-API via FastAPI, hosted on `wetterdienst.eobs.org <https://wetterdienst.eobs.org>`_\n- Rich UI features like `explorer <https://wetterdienst.streamlit.app>`_, `stripes <https://stripes.streamlit.app>`_\n- Run SQL queries on the results\n- Export results to databases and other data sinks\n- Public Docker image\n- Interpolation and Summary of station values\n\nSetup\n*****\n\nNative\n======\n\nVia PyPi (standard):\n\n.. code-block:: bash\n\n pip install wetterdienst\n\nVia Github (most recent):\n\n.. code-block:: bash\n\n pip install git+https://github.com/earthobservations/wetterdienst\n\nThere are some extras available for ``wetterdienst``. Use them like:\n\n.. code-block:: bash\n\n pip install wetterdienst[sql]\n\n- docs: Install the Sphinx documentation generator.\n- ipython: Install iPython stack.\n- export: Install openpyxl for Excel export and pyarrow for writing files in Feather- and Parquet-format.\n- sql: Install DuckDB for querying data using SQL.\n- duckdb: Install support for DuckDB.\n- influxdb: Install support for InfluxDB.\n- cratedb: Install support for CrateDB.\n- mysql: Install support for MySQL.\n- postgresql: Install support for PostgreSQL.\n- interpolation: Install support for station interpolation.\n\nIn order to check the installation, invoke:\n\n.. code-block:: bash\n\n wetterdienst --help\n\n.. _run-in-docker:\n\nDocker\n======\n\nDocker images for each stable release will get pushed to GitHub Container Registry.\n\n``wetterdienst`` serves a full environment, including *all* of the optional dependencies of Wetterdienst.\n\nPull the Docker image:\n\n.. code-block:: bash\n\n docker pull ghcr.io/earthobservations/wetterdienst\n\nLibrary\n-------\n\nUse the latest stable version of ``wetterdienst``:\n\n.. code-block:: bash\n\n $ docker run -ti ghcr.io/earthobservations/wetterdienst\n Python 3.8.5 (default, Sep 10 2020, 16:58:22)\n [GCC 8.3.0] on linux\n\n.. code-block:: python\n\n import wetterdienst\n wetterdienst.__version__\n\nCommand line script\n-------------------\n\nThe ``wetterdienst`` command is also available:\n\n.. code-block:: bash\n\n # Make an alias to use it conveniently from your shell.\n alias wetterdienst='docker run -ti ghcr.io/earthobservations/wetterdienst wetterdienst'\n\n wetterdienst --help\n wetterdienst --version\n wetterdienst info\n\n\nRaspberry Pi / LINUX ARM\n========================\n\nRunning wetterdienst on Raspberry Pi, you need to install **numpy**\nand **lxml** prior to installing wetterdienst by running the following\nlines:\n\n.. code-block:: bash\n\n # not all installations may be required to get lxml running\n sudo apt-get install gfortran\n sudo apt-get install libopenblas-base\n sudo apt-get install libopenblas-dev\n sudo apt-get install libatlas-base-dev\n sudo apt-get install python3-lxml\n\nAdditionally expanding the Swap to 2048 mb may be required and can be done via swap-file:\n\n.. code-block:: bash\n\n sudo nano /etc/dphys-swapfile\n\nThanks `chr-sto`_ for reporting back to us!\n\n\n.. _chr-sto: https://github.com/chr-sto\n\nExample\n*******\n\n**Task: Get historical climate summary for two German stations between 1990 and 2020**\n\nLibrary\n=======\n\n.. code-block:: python\n\n >>> import polars as pl\n >>> _ = pl.Config.set_tbl_hide_dataframe_shape(True)\n >>> from wetterdienst import Settings\n >>> from wetterdienst.provider.dwd.observation import DwdObservationRequest\n >>> settings = Settings( # default\n ... ts_shape=\"long\", # tidy data\n ... ts_humanize=True, # humanized parameters\n ... ts_si_units=True # convert values to SI units\n ... )\n >>> request = DwdObservationRequest(\n ... parameter=\"climate_summary\",\n ... resolution=\"daily\",\n ... start_date=\"1990-01-01\", # if not given timezone defaulted to UTC\n ... end_date=\"2020-01-01\", # if not given timezone defaulted to UTC\n ... settings=settings\n ... ).filter_by_station_id(station_id=(1048, 4411))\n >>> stations = request.df\n >>> stations.head()\n \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 station_id \u2506 start_date \u2506 end_date \u2506 latitude \u2506 longitude \u2506 height \u2506 name \u2506 state \u2502\n \u2502 --- \u2506 --- \u2506 --- \u2506 --- \u2506 --- \u2506 --- \u2506 --- \u2506 --- \u2502\n \u2502 str \u2506 datetime[\u03bcs, \u2506 datetime[\u03bcs, \u2506 f64 \u2506 f64 \u2506 f64 \u2506 str \u2506 str \u2502\n \u2502 \u2506 UTC] \u2506 UTC] \u2506 \u2506 \u2506 \u2506 \u2506 \u2502\n \u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561\n \u2502 01048 \u2506 1934-01-01 \u2506 ... \u2506 51.1278 \u2506 13.7543 \u2506 228.0 \u2506 Dresden-Klo \u2506 Sachsen \u2502\n \u2502 \u2506 00:00:00 UTC \u2506 00:00:00 UTC \u2506 \u2506 \u2506 \u2506 tzsche \u2506 \u2502\n \u2502 04411 \u2506 1979-12-01 \u2506 ... \u2506 49.9195 \u2506 8.9672 \u2506 155.0 \u2506 Schaafheim- \u2506 Hessen \u2502\n \u2502 \u2506 00:00:00 UTC \u2506 00:00:00 UTC \u2506 \u2506 \u2506 \u2506 Schlierbach \u2506 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n >>> values = request.values.all().df\n >>> values.head()\n \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 station_id \u2506 dataset \u2506 parameter \u2506 date \u2506 value \u2506 quality \u2502\n \u2502 --- \u2506 --- \u2506 --- \u2506 --- \u2506 --- \u2506 --- \u2502\n \u2502 str \u2506 str \u2506 str \u2506 datetime[\u03bcs, UTC] \u2506 f64 \u2506 f64 \u2502\n \u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561\n \u2502 01048 \u2506 climate_summary \u2506 cloud_cover_total \u2506 1990-01-01 00:00:00 UTC \u2506 100.0 \u2506 10.0 \u2502\n \u2502 01048 \u2506 climate_summary \u2506 cloud_cover_total \u2506 1990-01-02 00:00:00 UTC \u2506 100.0 \u2506 10.0 \u2502\n \u2502 01048 \u2506 climate_summary \u2506 cloud_cover_total \u2506 1990-01-03 00:00:00 UTC \u2506 91.25 \u2506 10.0 \u2502\n \u2502 01048 \u2506 climate_summary \u2506 cloud_cover_total \u2506 1990-01-04 00:00:00 UTC \u2506 28.75 \u2506 10.0 \u2502\n \u2502 01048 \u2506 climate_summary \u2506 cloud_cover_total \u2506 1990-01-05 00:00:00 UTC \u2506 91.25 \u2506 10.0 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n.. code-block:: python\n\n values.to_pandas() # to get a pandas DataFrame and e.g. create some matplotlib plots\n\nClient\n======\n\n.. code-block:: bash\n\n # Get list of all stations for daily climate summary data in JSON format\n wetterdienst stations --provider=dwd --network=observation --parameter=kl --resolution=daily --all\n\n # Get daily climate summary data for specific stations\n wetterdienst values --provider=dwd --network=observation --station=1048,4411 --parameter=kl --resolution=daily\n\nFurther examples (code samples) can be found in the examples_ folder.\n\n.. _examples: https://github.com/earthobservations/wetterdienst/tree/main/examples\n\n.. overview_end_marker\n\nAcknowledgements\n****************\n\nWe want to acknowledge all environmental agencies which provide their data open and free\nof charge first and foremost for the sake of endless research possibilities.\n\nWe want to acknowledge Jetbrains_ and the `Jetbrains OSS Team`_ for providing us with\nlicenses for Pycharm Pro, which we are using for the development.\n\nWe want to acknowledge all contributors for being part of the improvements to this\nlibrary that make it better and better every day.\n\n.. _Jetbrains: https://www.jetbrains.com/\n.. _Jetbrains OSS Team: https://github.com/JetBrains\n\nImportant Links\n***************\n\n- Restapi: https://wetterdienst.eobs.org/\n- Explorer: https://wetterdienst.streamlit.app/\n- Stripes: https://stripes.streamlit.app/\n- Documentation: https://wetterdienst.readthedocs.io/\n\n - Usage: https://wetterdienst.readthedocs.io/en/latest/usage/\n - Contribution: https://wetterdienst.readthedocs.io/en/latest/contribution/\n - Changelog: https://wetterdienst.readthedocs.io/en/latest/changelog.html\n\n- Examples (runnable scripts): https://github.com/earthobservations/wetterdienst/tree/main/examples\n- Benchmarks: https://github.com/earthobservations/wetterdienst/tree/main/benchmarks\n\n\n.. _Polars DataFrame: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2018-2023 earthobservations Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Open weather data for humans",
"version": "0.97.0",
"project_urls": {
"Explorer": "https://wetterdienst.streamlit.app/",
"Homepage": "https://wetterdienst.readthedocs.io/",
"Issues": "https://github.com/earthobservations/wetterdienst/issues",
"Releases": "https://github.com/earthobservations/wetterdienst/releases",
"Repository": "https://github.com/earthobservations/wetterdienst",
"Restapi": "https://wetterdienst.eobs.org/",
"Stripes": "https://stripes.streamlit.app/"
},
"split_keywords": [
"deutscher-wetterdienst",
" dmo",
" eaufrance-hubeau",
" environment-and-climate-change-canada",
" environmental-agency-uk",
" federal-waterways-and-shipping-administration-germany",
" forecast",
" geosphere-austria",
" ghcn",
" historical",
" institute-of-meteorology-and-water-management-poland",
" mosmix",
" national-oceanic-and-atmospheric-administration",
" national-weather-service",
" near-real-time",
" observation",
" open-data",
" open-source",
" radar",
" radolan",
" recent",
" time-series",
" weather-api",
" weather-data",
" weather-station"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "25d59386d0ff12c406664a4318a24c445202b35baef0c98eb462bdd5c3afa933",
"md5": "f9c3da567b131d6912dce3b9a49c6f15",
"sha256": "76feb7dbea44104a558b232efa7605212188bcdcd0fdbcd4535c47384bc77cbd"
},
"downloads": -1,
"filename": "wetterdienst-0.97.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f9c3da567b131d6912dce3b9a49c6f15",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 227244,
"upload_time": "2024-10-06T21:20:21",
"upload_time_iso_8601": "2024-10-06T21:20:21.797373Z",
"url": "https://files.pythonhosted.org/packages/25/d5/9386d0ff12c406664a4318a24c445202b35baef0c98eb462bdd5c3afa933/wetterdienst-0.97.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "299301c24c36bd669806b8eaa10366f6a9035f53834e37835fb2a5f38e218c14",
"md5": "905a98404c23ddca5b79c9df0c388d85",
"sha256": "77c3786e45ace470301807f133c4340e9a898afe62cd3054ee2097f73e5d4293"
},
"downloads": -1,
"filename": "wetterdienst-0.97.0.tar.gz",
"has_sig": false,
"md5_digest": "905a98404c23ddca5b79c9df0c388d85",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 189135,
"upload_time": "2024-10-06T21:20:24",
"upload_time_iso_8601": "2024-10-06T21:20:24.019979Z",
"url": "https://files.pythonhosted.org/packages/29/93/01c24c36bd669806b8eaa10366f6a9035f53834e37835fb2a5f38e218c14/wetterdienst-0.97.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-06 21:20:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "earthobservations",
"github_project": "wetterdienst",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "wetterdienst"
}