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
Interactive notebook:
Open fetch-data.ipynb in Colab
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
Interactive notebook:
Open plot-data.ipynb in Colab
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:
Metadata
Release files for colombia-hydrodata 0.3.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 | |
|---|---|---|---|
| colombia_hydrodata-0.3.1.tar.gz | 20.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| colombia_hydrodata-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.7 kB
Release files / colombia_hydrodata-0.3.1.tar.gz
| Download URL | colombia_hydrodata-0.3.1.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
774e17e29697745c51d9c95da5b10efec0053b1eac7494f535edbf0210626cae
|
|
BLAKE2b-256 checksum How to use checksums |
0d141675e9b7c2d641509da2fbf13e75c6dab268a41de87acedd9beb546d4782
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.
Transparency logRelease files / colombia_hydrodata-0.3.1-py3-none-any.whl
| Download URL | colombia_hydrodata-0.3.1-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35a75f2275e076656093b097e591ef1feb6321be34d4b147c97576f3c8866cc4
|
|
BLAKE2b-256 checksum How to use checksums |
96a10736d0f303e3c49bb7f1d336be43dd15767613ab5ef37d01d793fb87a59b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.
Transparency log