A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

hspfbintoolbox

A Python script and library of functions to read Hydrological Simulation Program Fortran (HSPF) binary files and print to screen.
https://github.com/timcera/hspfbintoolbox

Category: Hydrosphere
Sub Category: Freshwater and Hydrology

Keywords

cli hydrology python simulation

Keywords from Contributors

measur transformer humidity generic wind data-management watershed observation evaporation feature-toggles

Last synced: about 14 hours ago
JSON representation

Repository metadata

Command line script and Python package to read time-series from the Hydrological Simulation Program - FORTRAN (HSPF) binary output.

README.rst

          .. image:: https://github.com/timcera/hspfbintoolbox/actions/workflows/pypi-package.yml/badge.svg
    :alt: Tests
    :target: https://github.com/timcera/hspfbintoolbox/actions/workflows/pypi-package.yml
    :height: 20

.. image:: https://img.shields.io/coveralls/github/timcera/hspfbintoolbox
    :alt: Test Coverage
    :target: https://coveralls.io/r/timcera/hspfbintoolbox?branch=master
    :height: 20

.. image:: https://img.shields.io/pypi/v/hspfbintoolbox.svg
    :alt: Latest release
    :target: https://pypi.python.org/pypi/hspfbintoolbox/
    :height: 20

.. image:: http://img.shields.io/pypi/l/hspfbintoolbox.svg
    :alt: BSD-3 clause license
    :target: https://pypi.python.org/pypi/hspfbintoolbox/
    :height: 20

.. image:: http://img.shields.io/pypi/dd/hspfbintoolbox.svg
    :alt: hspfbintoolbox downloads
    :target: https://pypi.python.org/pypi/hspfbintoolbox/
    :height: 20

.. image:: https://img.shields.io/pypi/pyversions/hspfbintoolbox
    :alt: PyPI - Python Version
    :target: https://pypi.org/project/hspfbintoolbox/
    :height: 20

Documentation for hspfbintoolbox
================================
The ``hspfbintoolbox`` is a Python script and library of functions to read
Hydrological Simulation Program Fortran (HSPF) binary files and print to
screen.  The time series can then be redirected to file, or piped to other
command line programs like ``tstoolbox``.

Requirements
------------

* python 3.7 or later

* tstoolbox - utilities to process time-series

Installation
------------
pip
~~~
.. code-block:: bash

    pip install hspfbintoolbox

conda
~~~~~
.. code-block:: bash

    conda install -c conda-forge hspfbintoolbox


Usage - Command Line
--------------------
Just run 'hspfbintoolbox --help' to get a list of subcommands:

 catalog
          Prints out a catalog of data sets in the binary file.

 extract
          Prints out data to the screen from a HSPF binary output file.

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 hspfbintoolbox::

    import hspfbintoolbox

    # Then you could call the functions
    ntsd = hspfbintoolbox.extract('tests/test.hbn', 'yearly', ',905,,AGWS')

    # Once you have a PANDAS DataFrame you can use that as input.
    ntsd = tstoolbox.aggregate(statistic='mean', agg_interval='daily', input_ts=ntsd)

        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 5 days ago

Total Commits: 207
Total Committers: 8
Avg Commits per committer: 25.875
Development Distribution Score (DDS): 0.043

Commits in past year: 26
Committers in past year: 2
Avg Commits per committer in past year: 13.0
Development Distribution Score (DDS) in past year: 0.077

Name Email Commits
Tim Cera t****m@c****t 198
dependabot[bot] 4****] 2
DeepSource Bot b****t@d****o 2
thomas jobes t****s@s****m 1
sourcery-ai[bot] 5****] 1
Timothy Cera t****a@n****v 1
Tim Cera t****a@s****m 1
Sourcery AI 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 0
Total pull requests: 6
Average time to close issues: N/A
Average time to close pull requests: about 1 month
Total issue authors: 0
Total pull request authors: 4
Average comments per issue: 0
Average comments per pull request: 1.5
Merged pull request: 4
Bot issues: 0
Bot pull requests: 5

Past year issues: 0
Past year pull requests: 2
Past year average time to close issues: N/A
Past year average time to close pull requests: 7 minutes
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 1.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 2

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/timcera/hspfbintoolbox

Top Issue Authors

Top Pull Request Authors

  • dependabot[bot] (2)
  • sourcery-ai[bot] (2)
  • timcera (1)
  • deepsource-autofix[bot] (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (2)

Dependencies

setup.py pypi
  • For *
  • List *
  • cltoolbox *
  • http *
  • tstoolbox *
.github/workflows/clean-workflow-runs.yml actions
  • dmvict/clean-workflow-runs v1.0.0 composite
.github/workflows/python-package.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
  • cltoolbox > 1.1.0
  • pandas *
  • pydantic *
  • toolbox_utils >= 5.0.0, < 6.0.0
  • typing_extensions *

Score: 4.1588830833596715