A Python package to access and process data from the USGS StreamStats API.
Project description
streamstats_access: Python access to the USGS Streamstats API
Overview
This library provides users access to functionality of the USGS StreamStats application from within Python. The StreamStats app includes a suite of GIS-based hydrologic tools that are useful for water resources planning/management, engineering, and design purposes.
NOTE: This is a community package and has no affiliation the U.S. Geological Survey, Web Informatics and Mapping team, or StreamStats team. While efforts have been made to mimic Batch Processor functionality and formats, results received from this package may differ from results returned by the StreamStats Batch Processor. The Batch Processor contains additional features and technicalities that may not be represented in this package.
Key Features
- Watershed Delineation: Use streamStats GIS services to delineate watershed polygons from an outlet point.
- Basin Characteristics: Retrieve basin characteristics such as drainage area, percent wetlands, slope, mean annual precipitation, etc from a delineated watershed.
- Flow Statistics: Use basin characteristics to derive USGS flow frequency estimates.
- A Better Batch Point Tool: Submit large batches of points at once. This library mimics the functionality of the StreamStats batch tool.
- Avoid the 250 point limit of the USGS Streamstats Batch Tool.
- The library implements asynchronous requests offering 2x speed compared to the batch tool.
- Avoid the queue. The library directly queries USGS API endpoints, meaning you don't need to wait in the batch point queue.
Installation
To install this package, use pip:
- Pip Installation:
pip install streamstats-access
- Anaconda Installation (coming soon!):
# conda install conda_forge:streamstats_access
Example Usage
See samples folder for data and scripts.
import streamstats_access as ssa
import os
IN_PATH = os.path.join(os.path.dirname(__file__), 'vt_test.gpkg')
OUT_PATH = os.path.join(os.path.dirname(__file__), 'out_pts.gpkg')
ssa.process_batch(IN_PATH, OUT_PATH, rcode='VT', unique_field='UID')
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
For any questions or issues, please direct inquiries to Scott Lawson(Scott.Lawson@uvm.edu).
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
Built Distribution
Hashes for streamstats_access-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 987b8b8d981392e165a799d6b4f4d42b436be7521357104d7f0e9428ca5fb87d |
|
MD5 | b0ee048dbf84978923c11ad8deb9961d |
|
BLAKE2b-256 | fc60439a8eae7392c2765dfa3396f4f3c9f49d85df91e01c99fe72f4368a4808 |