hyswap
(HYdrologic Surface Water Analysis Package), is a Python package which provides a set of functions for manipulating and visualizing USGS water data.
Specifically, a number of functions for calculating statistics (e.g., exceedance probabilities, daily historic percentiles) and generating related plots (e.g., flow duration curves, streamflow duration hydrographs) are available.
These methods are provided in a modular fashion as individual functions, and are designed to give the user flexibility in implementation.
For more information, visit the hyswap
documentation.
One-liner to install hyswap
via pip
:
pip install hyswap
Note: hyswap
has 4 dependencies right now, numpy
, pandas
, scipy
, and matplotlib
, these will be installed automatically when installing the package via pip
.
To install hyswap
from source, first you will need to clone the repository.
Next, from the root of the repository, run the following commands:
pip install -r requirements.txt
pip install .
Developer installation should be performed from source. First you will need to clone the repository. Next, from the root of the repository, run the following commands:
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
To test the code and building and test the documentation locally, you must have cloned the source repository, follow the instructions above for a "developer installation" first.
To test the package locally, run the following command from the root of the repository:
pytest
To build the documentation locally, run the following commands from the root of the repository:
cd docs
make docs
To run the linting and formatting checks locally, run the following commands from the root of the repository:
flake8 .
pydocstringformatter .
The example workflow notebooks are extended example use cases of hyswap
functions. Open the jupyter notebooks from the 'example_notebooks' folder in the hyswap
repository. The notebooks sometimes utilize additional packages that are not required to run hyswap
. You can use the developer installation instructions to ensure you have all of the required packages to run the notebooks.
See the contributing guidelines for more information.
See the license for more information.
See the disclaimer for more information.