ruvpy
Reference implementation of the Relative Utility Value metric for forecast value assessment
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords
Repository
Reference implementation of the Relative Utility Value metric for forecast value assessment
Basic Info
- Host: GitHub
- Owner: richardlaugesen
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://dx.doi.org/10.2139/ssrn.5001881
- Size: 33.7 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 3
- Releases: 4
Topics
Metadata Files
README.md
RUVPY
Open Science infrastructure written in Python.
RUVPY is a library which can be used in your software to quantify the value of forecast information for decision-making.
It is a reference implementation of the Relative Utility Value (RUV) method, which is very flexible and can accommodate a wide range of decisions.
It includes a set of commonly used decision rules, utility functions, damage functions, and economic models. The implementation is sufficiently computationally efficient for most situations and optionally parallelises timesteps over available CPU cores (single core by default). The primary focus of this implementation is clarity and flexibility.
The scope is intentionally narrow and does not include any figure generation, data loading and saving, other metrics, or analysis functionality. These functions are intended to be implemented in a larger workflow or analysis pipeline which calls the main entry point of this library.
Publications
The method and software package are introduced in detail in the following publications. We suggest reading these to understand the context and motivation for the software.
Laugesen, Richard and Thyer, Mark and McInerney, David and Kavetski, Dmitri, Software Library to Quantify the Value of Forecasts for Decision-Making: Case Study on Sensitivity to Damages. http://dx.doi.org/10.2139/ssrn.5001881 (under review)
Laugesen, R., Thyer, M., McInerney, D., and Kavetski, D.: Flexible forecast value metric suitable for a wide range of decisions: application using probabilistic subseasonal streamflow forecasts, Hydrol. Earth Syst. Sci., 27, 873–893, https://doi.org/10.5194/hess-27-873-2023, 2023.
Installation
The package is available on PyPI and can be installed using pip:
pip install ruvpy
Documentation
Generated documentation is available at https://richardlaugesen.github.io/ruvpy/ruvpy/.
Examples
The package includes a set of examples corresponding to each figure in the publications noted above.
These are all implemented as Jupyter notebooks in the examples directory.
Templates
RUV is designed to be tailored to the decision being evaluated.
This may require the development of custom components to define the decision context in RUVPY.
A set of templates to help you get started is included in templates directory.
Please consider contributing your new components to the repository to help others.
Development
The main package requires Python (>=3.10), NumPy, SciPy, and Pathos. The examples additionally require XArray, Pandas, Jupyter, and Matplotlib; the tests require Pytest and Statsmodels, and generating docs requires pdoc3.
All dependencies are defined in an included pyproject.toml file ready for use with Poetry or Setuptools.
For example, once Poetry is installed you can set up the environment with:
poetry install --with dev
You may spawn a new shell with the virtual environment using poetry shell,
or simply prefix commands with poetry run. To run the unit tests:
poetry run pytest
To run the examples you'll need the optional examples dependencies. Install
them and start Jupyter with:
poetry install -E examples
poetry run jupyter notebook
Regenerate documentation using:
poetry run pdoc --html --output-dir docs ruvpy --force
To release a new version. Ensure everything is up to date and docs are built then bump the version in
the pyproject.toml and CITATION.cff file. Commit and push to Github before creating a new version tag and
release in the browser. Run poetry build and poetry publish to push new release to PyPi.
Attribution
This project is licensed under the Apache License 2.0, which allows free use, modification, and distribution of the code.
We would like to acknowledge and thank everyone who has helped this project in various ways. Please see the CONTRIBUTORS file for a full list of individuals.
For proper citation of this project, please refer to the CITATION.cff file, which provides guidance on how to cite the software. Please also consider citing the publications listed above.
Code of conduct
We encourage you to contribute! Everyone interacting with this project is expected to follow the Code of Conduct.
Contact
Richard Laugesen (richard@laugesen.com.au)
Owner
- Name: Richard
- Login: richardlaugesen
- Kind: user
- Location: Canberra, Australia
- Repositories: 1
- Profile: https://github.com/richardlaugesen
Water models & decision science
Citation (CITATION.cff)
cff-version: 1.2.0
title: Reference implementation of Relative Utility Value (RUV) to quantify forecast value
version: 1.0.1
abstract: >
RUVPY is a reference implementation of Relative Utility Value (RUV), a quantitative method for
estimating the value forecast information brings to decision-making. RUV is a general method and is designed to be
flexible and applicable to a wide range of decision-making scenarios through an explicitly defined decision-context.
RUVPY can be used to evaluate the value of retrospective forecasts in various domains, such as hydrology, meteorology,
and climate science. The provides an API to calculate the RUV over an input dataset, and a collection of
decision-context components ready to be parameterised for the context under evaluation. RUVPY is particularly useful
for researchers and practitioners who want to assess the economic or practical benefits of forecast information in
decision-making processes. The library is implemented in Python and is available as an open-source package on GitHub.
It includes documentation and examples to help users get started.
authors:
- family-names: Laugesen
given-names: Richard
orcid: https://orcid.org/0000-0002-3811-5845
email: richard@laugesen.com.au
date-released: 2025-07-24
license: Apache-2.0
repository-code: https://github.com/richardlaugesen/ruvpy
url: https://github.com/richardlaugesen/ruvpy/releases/tag/v1.0.1
type: software
GitHub Events
Total
- Create event: 12
- Issues event: 2
- Release event: 5
- Delete event: 8
- Issue comment event: 1
- Public event: 1
- Push event: 49
- Pull request event: 8
- Fork event: 1
Last Year
- Create event: 12
- Issues event: 2
- Release event: 5
- Delete event: 8
- Issue comment event: 1
- Public event: 1
- Push event: 49
- Pull request event: 8
- Fork event: 1
Packages
- Total packages: 1
-
Total downloads:
- pypi 39 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: ruvpy
Reference implementation of Relative Utility Value (RUV) to quantify forecast value
- Homepage: https://github.com/richardlaugesen/ruvpy
- Documentation: https://github.com/richardlaugesen/ruvpy#readme
- License: Apache-2.0
-
Latest release: 1.0.1
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- 142 dependencies
- black ^23.0.0 develop
- flake8 ^6.0.0 develop
- mypy ^1.0.0 develop
- pytest >=7.4.0 develop
- pytest-cov ^3.0 develop
- jupyter >=1.0.0
- matplotlib >=3.7.2
- numpy >=1.24.4
- pandas >=2.0.3
- pathos >=0.3.0
- pdoc ^15.0.0
- pdoc3 ^0.11.1
- python >=3.9
- scipy >=1.9.3
- statsmodels >=0.13.5