Skip to main content

A Python package to access and process data from the USGS StreamStats API.

Project description

streamstats_access: Python access to the USGS Streamstats API

StreamStats API Python library

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:

  1. Pip Installation:
    pip install streamstats-access
    
  2. 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

streamstats_access-0.1.9.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamstats_access-0.1.9-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file streamstats_access-0.1.9.tar.gz.

File metadata

  • Download URL: streamstats_access-0.1.9.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.9

File hashes

Hashes for streamstats_access-0.1.9.tar.gz
Algorithm Hash digest
SHA256 2b81b7108501f9adce353eddffc57a5b97d5d7feac1dd79cd05783389130e9c2
MD5 4d830e749cad25dfac09187bc58f617e
BLAKE2b-256 1187bdffb0c0b3221bd20f5345a3b28ba9bc42f9a02fc2fcf2b95d65cb29a030

See more details on using hashes here.

File details

Details for the file streamstats_access-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for streamstats_access-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 987b8b8d981392e165a799d6b4f4d42b436be7521357104d7f0e9428ca5fb87d
MD5 b0ee048dbf84978923c11ad8deb9961d
BLAKE2b-256 fc60439a8eae7392c2765dfa3396f4f3c9f49d85df91e01c99fe72f4368a4808

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page