{"id":13949098,"url":"https://github.com/mroberge/hydrofunctions","last_synced_at":"2026-02-24T04:02:39.283Z","repository":{"id":10366828,"uuid":"65512654","full_name":"mroberge/hydrofunctions","owner":"mroberge","description":"A suite of convenience functions for working with hydrology data in an interactive Python session.","archived":false,"fork":false,"pushed_at":"2024-01-22T19:28:04.000Z","size":6582,"stargazers_count":69,"open_issues_count":10,"forks_count":28,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-14T05:43:43.434Z","etag":null,"topics":["hydrology","scientific-visualization","water"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mroberge.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"docs/contributing.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-08-12T01:16:29.000Z","updated_at":"2025-07-11T16:27:38.000Z","dependencies_parsed_at":"2023-09-21T19:12:52.793Z","dependency_job_id":"966801ce-cc5c-40a0-8fb4-95522dd06a57","html_url":"https://github.com/mroberge/hydrofunctions","commit_stats":{"total_commits":669,"total_committers":9,"mean_commits":74.33333333333333,"dds":"0.034379671150971625","last_synced_commit":"488c12f03d32df680fb4565f2a4ef35ecf82c52b"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mroberge/hydrofunctions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroberge%2Fhydrofunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroberge%2Fhydrofunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroberge%2Fhydrofunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroberge%2Fhydrofunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mroberge","download_url":"https://codeload.github.com/mroberge/hydrofunctions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroberge%2Fhydrofunctions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265408930,"owners_count":23760200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hydrology","scientific-visualization","water"],"created_at":"2024-08-08T05:01:38.223Z","updated_at":"2025-10-21T20:02:21.203Z","avatar_url":"https://github.com/mroberge.png","language":"Python","funding_links":[],"categories":["Natural Resources","Access and Monitoring of Resources"],"sub_categories":["Water Supply and Quality","Water"],"readme":"===============================\nHydroFunctions\n===============================\n\n.. image:: https://img.shields.io/pypi/v/hydrofunctions.svg\n        :target: https://pypi.python.org/pypi/hydrofunctions\n        :alt: Visit Hydrofunctions on PyPI\n\n.. image:: https://github.com/mroberge/hydrofunctions/actions/workflows/test.yaml/badge.svg\n        :target: https://github.com/mroberge/hydrofunctions/actions/workflows/test.yaml\n        :alt: Unit Testing Status\n\n.. image:: https://codecov.io/gh/mroberge/hydrofunctions/branch/master/graph/badge.svg\n        :target: https://codecov.io/gh/mroberge/hydrofunctions\n        :alt: Code Coverage Status\n\n.. image:: https://readthedocs.org/projects/hydrofunctions/badge/?version=latest\n        :target: https://hydrofunctions.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://img.shields.io/github/license/mashape/apistatus.svg\n        :target: https://github.com/mroberge/hydrofunctions/blob/master/LICENSE\n        :alt: MIT license\n\nA suite of convenience functions for exploring water data in Python.\n\nFeatures\n--------\n\n* Retrieves stream data from the USGS NWIS service\n* Select data using multiple site numbers, by state, county codes, or a boundary box\n* Preserves NWIS metadata, including NoData values\n* Helpful error messages to help you write valid requests\n* Extracts data into a Pandas dataframe, json, or dict\n* Plot beautiful graphs in Jupyter Notebooks\n   * hydrographs (or time series of any data)\n   * flow duration charts\n   * cycle plots to illustrate annual or diurnal cycles\n   * Interactive map for finding stream gauge ID numbers\n* Plotting and manipulation through Pandas dataframes\n* Retrieve USGS rating curves, peak discharges, field notes, and site files for gauging stations\n* Retrieve USGS daily, monthly, and annual statistics for gauging stations\n* Saves data in compact, easy-to-use parquet files instead of requesting the same dataset repeatedly\n* **Massive** `Users Guide`_ **that makes Hydrology AND Data Science easy!**\n\nStill in active development! Let me know what features you want!\n\nRead the `Users Guide`_ for more details.\n\n\nBasic Usage\n-----------\n\nFirst, import hydrofunctions into your project. If you plan to work with Jupyter\nnotebooks, then go ahead and enable automatic chart display:\n\n.. code-block:: ipython\n\n    In  [1]: import hydrofunctions as hf\n             %matplotlib inline\n\nCreate an NWIS data object to hold our request and the data we will retrieve.\nWe will request the instantaneous values ('iv') for site '01585200' for the\npast 55 days:\n\n.. code-block:: ipython\n\n    In  [2]: herring = hf.NWIS('01585200', 'iv', period='P55D')\n    Requested data from https://waterservices.usgs.gov/nwis/iv/?format=json%2C1.1\u0026sites=01585200\u0026period=P55D\n\nYou can check that the request went smoothly:\n\n.. code-block:: ipython\n\n    In  [3]: herring.ok\n    Out [3]: True\n\nFind out what data we received:\n\n.. code-block:: ipython\n\n    In  [4]: herring\n    Out [4]: USGS:01585200: WEST BRANCH HERRING RUN AT IDLEWYLDE, MD\n                 00060: \u003c5 * Minutes\u003e  Discharge, cubic feet per second\n                 00065: \u003c5 * Minutes\u003e  Gage height, feet\n             Start: 2019-05-25 01:05:00+00:00\n             End:   2019-07-19 19:05:00+00:00\n\nThis tells us the name of our site and gives a list of the parameters that we\nhave. For each parameter it lists how frequently the data were collected, and\nit shows the common name of the parameter and its units.\n\nCreate a dataframe using only our discharge data, and list the first five items:\n\n.. code-block:: ipython\n\n    In  [5]: herring.df('discharge').head()\n    Out [5]:\n\n*--a table with our data appears--*\n\n    +------------------------------+---------------------------+\n    |          datetimeUTC         | USGS:01585200:00060:00000 |\n    +------------------------------+---------------------------+\n    |   2019-05-25 01:05:00+00:00  |                1.57       |\n    +------------------------------+---------------------------+\n    |   2019-05-25 01:10:00+00:00  |                1.57       |\n    +------------------------------+---------------------------+\n    |   2019-05-25 01:15:00+00:00  |                1.51       |\n    +------------------------------+---------------------------+\n    |   2019-05-25 01:20:00+00:00  |                1.57       |\n    +------------------------------+---------------------------+\n    |   2019-05-25 01:25:00+00:00  |                1.57       |\n    +------------------------------+---------------------------+\n\nIf we're using Jupyter Lab, we can plot a graph of the data using built-in methods from Pandas and mathplotlib:\n\n.. code-block:: ipython\n\n    In  [6]: herring.df('q').plot()\n    Out [6]:\n\n*--a stream hydrograph appears--*\n\n.. image:: https://raw.githubusercontent.com/mroberge/hydrofunctions/master/_static/HerringHydrograph.png\n   :alt: a stream hydrograph for Herring Run\n\nLearn more:  \n\n* `Users Guide`_\n\n\nEasy Installation\n-----------------\n\nThe easiest way to install Hydrofunctions is by typing this from your\ncommand line:\n\n.. code-block:: console\n\n    $ pip install hydrofunctions\n\n\nHydrofunctions depends upon Pandas and numerous other scientific packages\nfor Python. `Anaconda \u003chttps://www.anaconda.com/products/individual\u003e`_\nis an easy, safe, open-source method for downloading everything and avoiding\nconflicts with other versions of Python that might be running on your\ncomputer.\n\nVisit the `Installation Page \u003chttps://hydrofunctions.readthedocs.io/en/master/installation.html\u003e`_\nin the Users Guide to learn how to install\nAnaconda, or if you have problems using the Easy Installation method above.\n\n\n.. _`Users Guide`:  https://hydrofunctions.readthedocs.io/en/latest","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmroberge%2Fhydrofunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmroberge%2Fhydrofunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmroberge%2Fhydrofunctions/lists"}