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.0.tar.gz
(54.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.0.tar.gz.
File metadata
- Download URL: bcn_rainfall_core-1.0.0.tar.gz
- Upload date:
- Size: 54.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f31439f07de4470bfc531aa14d799e6c53e01ef2a0d4f7578b28417b1b81e64d
|
|
| MD5 |
91ca3ab08381ea6ab8f309910dc7902c
|
|
| BLAKE2b-256 |
bdf5a8c304b1a77da160e77b4608d4ac95d2ba8723db3508ee3ce80ff2acfda7
|
File details
Details for the file bcn_rainfall_core-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bcn_rainfall_core-1.0.0-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 |
188e29f2c84613b8e17b02dc629a38bf5d5b9399fdf93978b42a6c2549c8317a
|
|
| MD5 |
a3ff8b08077203bae6c2e73425ec70d8
|
|
| BLAKE2b-256 |
b41ad5bdf5a6bf2ed1929c95854b0decd279c7c7ed982c17b8fce759cdb68c71
|