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.
Metadata
Release files for rws-knmi-lib 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rws-knmi-lib-1.0.1.tar.gz | 10.2 kB | Without provenance | Details for rws-knmi-lib-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rws_knmi_lib-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for rws_knmi_lib-1.0.1-py3-none-any.whl |
Total release size: 19.5 kB
Release files / rws-knmi-lib-1.0.1.tar.gz
| Download URL | rws-knmi-lib-1.0.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7989ba2fc30179e7716e582c8f7f93b1e7c91044eb794f0d6badf5d145a3f33c
|
|
BLAKE2b-256 checksum How to use checksums |
c59d727f74fe50dc77fd5dc096052164133a7f390c1d84efbab97ff639b848ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / rws_knmi_lib-1.0.1-py3-none-any.whl
| Download URL | rws_knmi_lib-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e40f0aec8d2d4adcae87c16f6eeb0d3078e3b4e853cc797f9137da3f07e732d
|
|
BLAKE2b-256 checksum How to use checksums |
b364164adf086f8fe1b2f0150372b78912eb6f3a56ae6dffd6908e6806f0a176
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for rws-knmi-lib 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.