Tools to load and manipulate rainfall data from the city of Barcelona, Catalunya.
Project description
bcn-rainfall-core
Tools to load and manipulate rainfall data from the city of Barcelona, Catalunya; it is the core of the Barcelona Rainfall project and is exposed through the Barcelona Rainfall API.
Usage
from bcn_rainfall_core import Rainfall
from bcn_rainfall_core.utils import DataSettings
# With configuration file in default path `config.yml`
rainfall = Rainfall.from_config()
# With configuration file in other path
rainfall_with_path = Rainfall.from_config(path="new/path/to/config.yml")
# With your own configuration
rainfall_with_cfg = Rainfall.from_config(
cfg=DataSettings(file_url="http://...", start_year=1955, rainfall_precision=2)
)
# With your own configuration from local file
rainfall_with_cfg_from_file = Rainfall.from_config(
cfg=DataSettings(local_file_path="/dir/my_rainfall_data.csv", start_year=1955, rainfall_precision=2),
from_file=True,
)
# Have fun with class!
from bcn_rainfall_core.utils import TimeMode, Season
rainfall_avg = rainfall.get_rainfall_average(
TimeMode.SEASONAL,
begin_year=1975,
end_year=1998,
season=Season.WINTER
)
print(rainfall_avg)
...
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
bcn_rainfall_core-1.0.1.tar.gz
(54.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bcn_rainfall_core-1.0.1.tar.gz.
File metadata
- Download URL: bcn_rainfall_core-1.0.1.tar.gz
- Upload date:
- Size: 54.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942266e0c81ea5f2ba5d68b379ecf0cde13db41413cc052338e581e976dd0f3c
|
|
| MD5 |
549dfc48dbd8510e96c00236c9428dbe
|
|
| BLAKE2b-256 |
a76e5544fc1671f85fe7c50f290e1f99e67deddb8d6e6314b7f9b0bb000158a6
|
File details
Details for the file bcn_rainfall_core-1.0.1-py3-none-any.whl.
File metadata
- Download URL: bcn_rainfall_core-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d79fd881181e1dcf63de627a0d7fb749afe94c3395941da4b985a0cd19895cb5
|
|
| MD5 |
d14e61dcdf5c7debce0f4b2818b07260
|
|
| BLAKE2b-256 |
8821d3d4e64091b7449f238f25e148eb88ce3cad4fccb6865b941f2f1e0c5bac
|