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 @@ -15,6 +15,7 @@ API Reference
fetchers/czech
fetchers/france
fetchers/germany_berlin
fetchers/ireland_opw
fetchers/japan
fetchers/lithuania
fetchers/norway
Expand Down
5 changes: 5 additions & 0 deletions docs/fetchers/ireland_opw.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Ireland OPW Fetcher
===================

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

import matplotlib.pyplot as plt

from rivretrieve import IrelandOPWFetcher, constants

logging.basicConfig(level=logging.INFO)

gauge_id = "19001"
variables = [
constants.DISCHARGE_DAILY_MIN,
constants.DISCHARGE_DAILY_MEAN,
constants.DISCHARGE_DAILY_MAX,
constants.STAGE_DAILY_MIN,
constants.STAGE_DAILY_MEAN,
constants.STAGE_DAILY_MAX,
constants.WATER_TEMPERATURE_DAILY_MIN,
constants.WATER_TEMPERATURE_DAILY_MEAN,
constants.WATER_TEMPERATURE_DAILY_MAX,
]
start_date = "2025-01-01"
end_date = "2025-01-07"

fetcher = IrelandOPWFetcher()

for variable in variables:
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"Ireland-OPW River Data ({gauge_id})")
plt.legend()
plt.grid(True)
plt.tight_layout()
plot_path = f"ireland_opw_{variable}_plot.png"
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 @@ -8,6 +8,7 @@
from .czech import CzechFetcher
from .france import FranceFetcher
from .germany_berlin import GermanyBerlinFetcher
from .ireland_opw import IrelandOPWFetcher
from .japan import JapanFetcher
from .lithuania import LithuaniaFetcher
from .norway import NorwayFetcher
Expand Down
492 changes: 492 additions & 0 deletions rivretrieve/cached_site_data/ireland_opw_sites.csv

Large diffs are not rendered by default.

Loading
Loading