An open API service indexing awesome lists of open source software.

https://github.com/earthlab/streamstats

Python package to interface with the USGS StreamStats API
https://github.com/earthlab/streamstats

data-access hydrology spatial water

Last synced: 4 months ago
JSON representation

Python package to interface with the USGS StreamStats API

Awesome Lists containing this project

README

          

StreamStats
===========

.. image:: https://img.shields.io/pypi/v/streamstats.svg?color=purple&style=plastic
:target: https://img.shields.io/pypi/v/streamstats.svg?color=purple&style=plastic

.. image:: https://img.shields.io/pypi/dm/streamstats.svg?color=purple&label=pypi%20downloads&style=plastic
:target: https://img.shields.io/pypi/dm/streamstats.svg?color=purple&label=pypi%20downloads&style=plastic

.. image:: https://readthedocs.org/projects/streamstats-python/badge/?version=latest
:target: https://streamstats-python.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://codecov.io/gh/earthlab/streamstats/branch/master/graph/badge.svg
:target: https://app.codecov.io/gh/earthlab/streamstats

.. image:: https://static.mybinder.org/badge.svg
:target: https://mybinder.org/v2/gh/earthlab/streamstats/master

Python package for interfacing with the USGS StreamStats API.

- Free software: MIT license
- Documentation: https://streamstats-python.readthedocs.io/en/latest/

Features
~~~~~~~~~

- Plot the GeoJSON of a watershed containing a spatial point in the United States
- Find available basin characteristics of an identified watershed
- Find the hydrologic unit code (HUC) of an identified watershed

View Example StreamStats Applications in Our Documentation Gallery
-------------------------------------------------------------------
Check out our `vignette gallery `_
for applied examples of using StreamStats.

Installation
~~~~~~~~~~~~~
Stable release
--------------
To install StreamStats via ``pip`` use:

.. code-block:: console

$ pip install streamstats

This is the preferred method to install StreamStats, as it will always install
the most recent stable release. If you don't have `pip `_ installed, this
`Python installation guide `_
can guide you through the process.

Alternatively, StreamStats can be installed from the ``conda-forge`` repository
using `Conda `__:

.. code-block:: console

$ conda install -c conda-forge streamstats

From sources
------------
The sources for StreamStats can be downloaded from the `GitHub repository `_ .

You can either clone the public repository:

.. code-block:: console

$ git clone git://github.com/earthlab/streamstats

Once you have a copy of the source, you can install it with:

.. code-block:: console

$ python setup.py install

How to Contribute
~~~~~~~~~~~~~~~~~~
The steps to set up StreamStats for local development are as follows:

1. Fork the streastats repo on GitHub
2. Clone your fork locally:

.. code-block:: console

$ git clone git://github.com:your_name_here/streamstats.git

3. Install your local copy into a new environment

If you have virutalenvwrapper installed:

.. code-block:: console

$ mkvirtualenv streamstats

If you are using conda:

.. code-block:: console

$ conda create -n streamstats python=3
$ conda activate streamstats

Then install StreamStats:

.. code-block:: console

$ cd streamstats/
$ pip install -r requirements.txt
$ pip install -r requirements_dev.txt
$ install -e .

4. Create a branch for local development:

.. code-block:: console

$ git checkout -b name-of-your-bugfix/feature

Now you can make your changes locally

5. When your changes are complete, check that your changes pass flake8 and the tests,
including other Python versions with tox:

.. code-block:: console

$ pytest
$ tox

6. Commit your changes and push your branch to GitHub:

.. code-block:: console

$ git add
$ git commit -m "Your detailed description of your changes"
$ git push origin name-of-your-bugfix/feature

7. Submit a pull request through the GitHub website

We welcome and greatly appreciate contributions to StreamStats! The best way to
send feedback is to file an issue at https://github.com/earthlab/streamstats/issues.
To read more on ways to contribute and pull requests, click `here `_.

Credits
~~~~~~~~
Development Lead
-----------------
- `Maxwell B. Joseph `_

Contributors
-------------
- `Scott Eilerman `_
- `Leah Wasser `_
- `Jeremy Diaz `_
- `Nate Mietkiewicz `_
- `Nathan Korinek `_
- `Ally Fitts `_

This package was created with `Cookiecutter `_.