Python package for interfacing with the USGS StreamStats API.
- Free software: MIT license
- Documentation: https://streamstats-python.readthedocs.io/en/latest/
- 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
Check out our vignette gallery for applied examples of using StreamStats.
To install StreamStats via pip
use:
$ 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:
$ conda install -c conda-forge streamstats
The sources for StreamStats can be downloaded from the GitHub repository .
You can either clone the public repository:
$ git clone git://github.com/earthlab/streamstats
Once you have a copy of the source, you can install it with:
$ python setup.py install
The steps to set up StreamStats for local development are as follows:
- Fork the streastats repo on GitHub
- Clone your fork locally:
$ git clone git://github.com:your_name_here/streamstats.git
- Install your local copy into a new environment
If you have virutalenvwrapper installed:
$ mkvirtualenv streamstats
If you are using conda:
$ conda create -n streamstats python=3
$ conda activate streamstats
Then install StreamStats:
$ cd streamstats/
$ pip install -r requirements.txt
$ pip install -r requirements_dev.txt
$ install -e .
- Create a branch for local development:
$ 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:
$ pytest
$ tox
- Commit your changes and push your branch to GitHub:
$ git add
$ git commit -m "Your detailed description of your changes"
$ git push origin name-of-your-bugfix/feature
- 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.
This package was created with Cookiecutter.