Skip to main content

Command line script and Python library for analysis of flow time-series.

Project description

Tests Test Coverage Latest release BSD-3 clause license hydrotoolbox downloads PyPI - Python Version

hydrotoolbox - Quick Guide

The hydrotoolbox is a Python script for hydrologic calculations and analysis or by function calls within Python. Uses pandas (http://pandas.pydata.org/) or numpy (http://numpy.scipy.org) for any heavy lifting.

Requirements

  • python 3.7 or higher

Installation

pip

pip install hydrotoolbox

conda

conda install -c conda-forge hydrotoolbox

Usage - Command Line

Just run ‘hydrotoolbox –help’ to get a list of subcommands:

usage: hydrotoolbox [-h] [-v] {baseflow_sep,recession,about} ...

positional arguments:
  {baseflow_sep,recession,about}
    baseflow_sep        baseflow_sep subcommand
    recession           Recession coefficient.
    about               Display version number and system information.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

The default for all of the subcommands is to accept data from stdin (typically a pipe). If a subcommand accepts an input file for an argument, you can use “–input_ts=input_file_name.csv”, or to explicitly specify from stdin (the default) “–input_ts=’-‘”.

For the subcommands that output data it is printed to the screen and you can then redirect to a file.

Usage - API

You can use all of the command line subcommands as functions. The function signature is identical to the command line subcommands. The return is always a PANDAS DataFrame. Input can be a CSV or TAB separated file, or a PANDAS DataFrame and is supplied to the function via the ‘input_ts’ keyword.

Simply import hydrotoolbox:

from hydrotoolbox import hydrotoolbox

# Then you could call the functions
ntsd = hydrotoolbox.baseflow_sep(method='broughton', input_ts='tests/test_fill_01.csv')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hydrotoolbox-2.0.11.tar.gz (5.8 MB view details)

Uploaded Source

Built Distribution

hydrotoolbox-2.0.11-py3-none-any.whl (256.2 kB view details)

Uploaded Python 3

File details

Details for the file hydrotoolbox-2.0.11.tar.gz.

File metadata

  • Download URL: hydrotoolbox-2.0.11.tar.gz
  • Upload date:
  • Size: 5.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for hydrotoolbox-2.0.11.tar.gz
Algorithm Hash digest
SHA256 05d2abb6e6ee412d73c3248ae08e58a9db7d26790a123404be911ce9f4f9a3a7
MD5 d07b0bd086a81cd8fecf9a3b6c426b90
BLAKE2b-256 18d2ca1cf38634e39e40cef5c04488b35750ac83b1bf1aa8a0a3343da7cadfcf

See more details on using hashes here.

File details

Details for the file hydrotoolbox-2.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for hydrotoolbox-2.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 50ccc8847caeb51ff3ce0549552bb6495f0f08eebffcd3595a4fe58e967ab449
MD5 a54abbb565912419964ace569154f33d
BLAKE2b-256 f1b0209c3fca1c629d9781b73319bcd09a66fcf0374221956431f0da9238f970

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page