Skip to main content

Library voor communicatie met KNMI weer data.

Project description

Library to download KNMI weather data aggregated on a daily level or on an hourly level.

How to use

In order to download data on a daily level, use the following code below.

from rws_knmi_lib.knmi_downloader import import_daily_data

# Returns dataframe containing information on all KNMI stations.
df_daily = import_daily_data(start="20220501", end="20220505")

# Returns dataframe containing only information from the nearest KNMI station.
df_daily_nearest = import_daily_data(start="20220501", end="20220505",
                                     coord=(52.460770, 4.625110))

An example for obtaining hourly aggregated daily looks like this:

from rws_knmi_lib.knmi_downloader import import_hourly_data

# Returns dataframe containing information on all KNMI stations.
df_hourly = import_hourly_data(start="20220501", end="20220505")

# Returns dataframe containing only information from the nearest KNMI station.
df_hourly_nearest = import_hourly_data(start="20220501", end="20220505",
                                       coord=(52.460770, 4.625110))

Installation

To install rws-knmi-lib, do:

git clone https://gitlab.com/rwsdatalab/public/codebase/tools/rws-knmi-lib
cd rws-knmi-lib
pip install .

Run tests (including coverage) with:

pip install .[dev]
pytest

Documentation

Find the full documentation at https://rwsdatalab.gitlab.io/public/codebase/tools/rws-knmi-lib

License

Copyright 2022-2024 Rijkswaterstaat

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Download files

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

Source Distribution

rws-knmi-lib-1.0.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

rws_knmi_lib-1.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file rws-knmi-lib-1.0.1.tar.gz.

File metadata

  • Download URL: rws-knmi-lib-1.0.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for rws-knmi-lib-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7989ba2fc30179e7716e582c8f7f93b1e7c91044eb794f0d6badf5d145a3f33c
MD5 f47cdeec3a6667bdfb57b20d13699f9b
BLAKE2b-256 c59d727f74fe50dc77fd5dc096052164133a7f390c1d84efbab97ff639b848ea

See more details on using hashes here.

File details

Details for the file rws_knmi_lib-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: rws_knmi_lib-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for rws_knmi_lib-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e40f0aec8d2d4adcae87c16f6eeb0d3078e3b4e853cc797f9137da3f07e732d
MD5 0dc02ad376ef60fb8fcaeaba4f0d2cfb
BLAKE2b-256 b364164adf086f8fe1b2f0150372b78912eb6f3a56ae6dffd6908e6806f0a176

See more details on using hashes here.

Supported by

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