No project description provided
Project description
Colombia Hydrodata
Python client for accessing hydrological and meteorological data from Colombia.
The library integrates official IDEAM data sources and exposes them through a clean, Pythonic API for station discovery, dataset retrieval, and built-in time-series plotting.
Data is fetched from:
Architecture
The library follows a client -> station -> dataset hierarchy.
Client
└── Station
└── Dataset
Clientloads the station catalog and exposes methods to query and filter stations.Stationrepresents an IDEAM monitoring station with its full metadata and available variables.Datasetrepresents a time series retrieved from the Aquarius WebPortal.
Installation
pip install colombia-hydrodata
Or with Poetry:
poetry add colombia-hydrodata
Quick Start
from colombia_hydrodata import Client
client = Client()
# Fetch a single station
station = client.fetch_station("29037020")
print(station.name)
# Fetch its discharge time series
dataset = station["CAUDAL@HIS_Q_MEDIA_D"]
print(dataset.data.head())
Plotting
Datasets expose built-in plotting helpers through the plot property.
import matplotlib.pyplot as plt
dataset.plot.time_series(title=station.name)
plt.show()
For decomposed series, you can generate the built-in analysis layouts:
dataset = (
station["NIVEL@NV_MEDIA_D"]
.sight_level(-0.367)
.rescale(1 / 100)
.interpolate()
.deconstruction()
)
fig, axs = dataset.plot.time_series_analysis(figsize=(10, 6), tight_layout=True)
plt.show()
You can also inspect the annual envelope and highlight specific years:
fig, axs = dataset.plot.daily_series_analysis(
years=[2024, 2025],
figsize=(10, 4),
tight_layout=True,
)
axs[0].legend()
plt.show()
Client
Client is the main entry point. On initialization it downloads the full
IDEAM station catalog from Datos Abiertos Colombia and stores it internally as
a GeoDataFrame.
from colombia_hydrodata import Client
client = Client()
Fetching Stations
Single station
station = client.fetch_station("29037020")
Returns a Station object with full metadata.
Multiple stations by ID
stations = client.fetch_stations(["29037020", "29037021"])
Returns a list of Station objects.
Spatial Queries
Bounding box
stations = client.fetch_bbox(
xmin=-75.0,
ymin=9.5,
xmax=-74.0,
ymax=10.5,
)
Shapely geometry
from shapely.geometry import Polygon
region = Polygon(...)
stations = client.fetch_region(region)
Catalog only
To get a lightweight GeoDataFrame of station metadata without instantiating
Station objects:
gdf = client.stations_in_region(region)
gdf = client.stations_in_list(["29037020", "29037021"])
Filtering Stations
Use the Filters dataclass to narrow results by metadata fields. All filters
are optional and combined with logical AND.
from colombia_hydrodata import Client
from colombia_hydrodata.filters import Filters
client = Client()
filters = Filters(
category="Limnimetrica",
department="Bolivar",
status="Activa",
)
stations = client.fetch_region(region, filters=filters)
Available filter fields:
| Field | Description |
|---|---|
category |
Station category |
department |
Department |
municipality |
Municipality |
status |
Operational status |
owner |
Owning institution |
hydrographic_area |
Hydrographic area |
hydrographic_zone |
Hydrographic zone |
hydrographic_subzone |
Hydrographic subzone |
Station
A Station is a frozen dataclass with full metadata about an IDEAM monitoring
station.
station = client.fetch_station("29037020")
print(station)
It also provides the dataset access points:
dataset = station.fetch("CAUDAL@HIS_Q_MEDIA_D")
dataset = station["CAUDAL@HIS_Q_MEDIA_D"]
Both return a Dataset object.
Dataset
A Dataset represents a time series associated with a station and a variable.
dataset = station["NIVEL@NV_MEDIA_D"]
print(dataset.station)
print(dataset.variable)
print(dataset.data.head())
The data DataFrame has two core columns:
| Column | Description |
|---|---|
timestamp |
Datetime |
value |
Numeric measurement |
Datasets also expose transformation helpers such as:
sight_level()rescale()interpolate()detrend()seasonal()anomalies()deconstruction()
And plotting helpers through:
dataset.plot
Documentation
Full documentation is available at:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 colombia_hydrodata-0.2.0.tar.gz.
File metadata
- Download URL: colombia_hydrodata-0.2.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee8ab61033af94171c2cc405f7e3808717a85bc27dbf981023bd643b13fb33f1
|
|
| MD5 |
a44fc091839c61e8c5d64636003e6392
|
|
| BLAKE2b-256 |
1da67e3a265e2b7152c9b35562119d7d90c0b4828e636845c366614def93e0dd
|
Provenance
The following attestation bundles were made for colombia_hydrodata-0.2.0.tar.gz:
Publisher:
release.yml on sebnarvaez19/colombia-hydrodata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
colombia_hydrodata-0.2.0.tar.gz -
Subject digest:
ee8ab61033af94171c2cc405f7e3808717a85bc27dbf981023bd643b13fb33f1 - Sigstore transparency entry: 1208945194
- Sigstore integration time:
-
Permalink:
sebnarvaez19/colombia-hydrodata@c8c222cca9b8919552e647c05ea4fdede9174785 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sebnarvaez19
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c8c222cca9b8919552e647c05ea4fdede9174785 -
Trigger Event:
push
-
Statement type:
File details
Details for the file colombia_hydrodata-0.2.0-py3-none-any.whl.
File metadata
- Download URL: colombia_hydrodata-0.2.0-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68ea169dad62fa6cd612dafd9d77b2b370908e5f8eb1702f835183e9e14f49b2
|
|
| MD5 |
ffb3c712840aa27a05f1b0b1f1453a49
|
|
| BLAKE2b-256 |
6cca42f7f1d996c1e81acb14eb6fef8e9212084a0276df98eeea297ff0c463b8
|
Provenance
The following attestation bundles were made for colombia_hydrodata-0.2.0-py3-none-any.whl:
Publisher:
release.yml on sebnarvaez19/colombia-hydrodata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
colombia_hydrodata-0.2.0-py3-none-any.whl -
Subject digest:
68ea169dad62fa6cd612dafd9d77b2b370908e5f8eb1702f835183e9e14f49b2 - Sigstore transparency entry: 1208945229
- Sigstore integration time:
-
Permalink:
sebnarvaez19/colombia-hydrodata@c8c222cca9b8919552e647c05ea4fdede9174785 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sebnarvaez19
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c8c222cca9b8919552e647c05ea4fdede9174785 -
Trigger Event:
push
-
Statement type: