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.3.tar.gz
(53.4 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.3.tar.gz.
File metadata
- Download URL: bcn_rainfall_core-1.0.3.tar.gz
- Upload date:
- Size: 53.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
929b7100795892bb7600e956269eb494b358aaf14bb28378ee77bd1f06520655
|
|
| MD5 |
bf228f14916f90eb08c82ce1db4dca8e
|
|
| BLAKE2b-256 |
6de152649fde5921be2bc5f95ecbc1322c3280db24e6b2d2443e7f5754b8fb4d
|
File details
Details for the file bcn_rainfall_core-1.0.3-py3-none-any.whl.
File metadata
- Download URL: bcn_rainfall_core-1.0.3-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdd2f08d8d8af8aa027579670f1345f965af3a2a5c0d60ece0353df9fdce00dd
|
|
| MD5 |
a8c831ee808cf11b117fe18357317145
|
|
| BLAKE2b-256 |
a9d77584f26a402935bdd3101bb8fd6a8ba9e2037061420c6d2fb5065b182e64
|