Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ API Reference
fetchers/germany_berlin
fetchers/japan
fetchers/lithuania
fetchers/netherlands
fetchers/norway
fetchers/poland
fetchers/portugal
Expand Down
5 changes: 5 additions & 0 deletions docs/fetchers/netherlands.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Netherlands Fetcher
===================

.. automodule:: rivretrieve.netherlands
:members:
35 changes: 35 additions & 0 deletions examples/test_netherlands_fetcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import logging

import matplotlib.pyplot as plt

from rivretrieve import NetherlandsFetcher, constants

logging.basicConfig(level=logging.INFO)

fetcher = NetherlandsFetcher()

examples = [
("almen", constants.DISCHARGE_DAILY_MEAN, "2025-01-01", "2025-01-07"),
("a12", constants.STAGE_INSTANT, "2025-01-01", "2025-01-01"),
("ameland.nes", constants.WATER_TEMPERATURE_DAILY_MEAN, "2025-07-01", "2025-07-03"),
]

for gauge_id, variable, start_date, end_date in examples:
data = fetcher.get_data(gauge_id=gauge_id, variable=variable, start_date=start_date, end_date=end_date)

if data.empty:
print(f"No data found for {gauge_id} ({variable})")
continue

print(data.head())
plt.figure(figsize=(12, 6))
plt.plot(data.index, data[variable], label=f"{gauge_id} - {variable}")
plt.xlabel(constants.TIME_INDEX)
plt.ylabel(variable)
plt.title(f"Netherlands River Data ({gauge_id})")
plt.legend()
plt.grid(True)
plt.tight_layout()
plot_path = f"netherlands_{gauge_id}_{variable}.png".replace(".", "_")
plt.savefig(plot_path)
print(f"Plot saved to {plot_path}")
1 change: 1 addition & 0 deletions rivretrieve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from .germany_berlin import GermanyBerlinFetcher
from .japan import JapanFetcher
from .lithuania import LithuaniaFetcher
from .netherlands import NetherlandsFetcher
from .norway import NorwayFetcher
from .poland import PolandFetcher
from .portugal import PortugalFetcher
Expand Down
1,828 changes: 1,828 additions & 0 deletions rivretrieve/cached_site_data/netherlands_sites.csv

Large diffs are not rendered by default.

Loading
Loading