Skip to main content
U.S. flag

An official website of the United States government

Web Services

The StreamStats Application uses an increasing number of web services that perform a variety of functions. When in use, the application manages interactions between the user and the services, however, the services can be directly accessed using the service APIs or consumed by a custom client application using HTTP protocols.

StreamStats Services 

The StreamStats Service API performs multiple high level procedures which include; database queries, geospatial calculations and service requests in order to compile and create simple objects that can be consumed by custom client applications. As documented by this page, which can also serve as an URL builder, the StreamStats Service API is built following RESTful principles to ensure scalability and predictable URLs. StreamStats Service documentation can be accessed at https://streamstats.usgs.gov/docs/streamstatsservices/

 

Gage Statistic Services

The Gage Statistics Services queries our StreamStats database which contains information for gaging stations around the United States, including descriptive information and measured characteristics and statistics for those stations. The characteristics and statistics are used to develop and publish regression equations for estimating streamflow statistics at ungaged locations, which are stored in the National Streamflow Statistics (NSS) database, and can be viewed using the NSS Services, or the NSS client. The NSS program is used in a variety of water-resources and emergency planning, management and regulatory purposes, and for designing of structures; such as bridges and culverts, and is used to estimate streamflow statistics in the StreamStats client. Gage Statistic Services documentation can be accessed at https://streamstats.usgs.gov/docs/gagestatsservices/#/.

 

Channel Width Weighting Services

The Channel Weighting Services are FastAPI Python-based web services, which are used to weight together estimates of peak frequency from multiple stream channel-width estimation methods. These services are used by the StreamStats web application to compute peak-flow frequencies at ungaged sites in Montana. Weighting is determined by the standard error of prediction of each estimate and the correlation between the estimation methods. The methodology for weighting estimates is described in Chase and others (2021). These services are currently used by the StreamStats web application to compute peak-flow frequencies at ungaged locations in Montana. 

Visit the Channel Width Weighting Servicing code repository at https://doi.org/10.5066/P9D7MEB1.

 

Navigation Services 

In cooperation with the National Hydrologic Geospatial Fabric Project and Network-Linked Data Index projectduct, the navigation services were developed to provide network connectivity for the StreamStats application via RESTful web services. The Navigation Services currently provides three navigation options (flow path, network path, and network trace) for navigating the national NHDplus v2 medium resolution datasets. Navigation Services documentation can be accessed at https://streamstats.usgs.gov/docs/navigationservices/

  • Flow path (also known as raindrop path) navigation 

  • Provides the ability to leverage a custom flow direction algorithm optimized for the selected network datasets to trace downstream using the flow direction grid and NHD network to determine the flow path of a raindrop for any given location. 

  • Network path navigation 

  • Requires two locations and leverages the streamNHD network to identify if these locations are related by a downstream tributary or other type of network. 

  • Network trace navigation 

  • Provides the ability to search either upstream or downstream for a specified source data type such as gage, bridge, or water quality sampling location. 

     

Runoff Modeling Services 

The runoff modeling services were developed using RESTful principles in order to assist engineers and watershed managers by calculating peak runoff for small watersheds. The services provide two simple hydrologic models that compute peak runoff for small watersheds, the Rational Method and the NRCS Runoff Curve Number method (TR55). Runoff Modeling Services documentation can be accessed at https://streamstats.usgs.gov/docs/runoffmodelingservices/

 

Water Use Services 

The water use services were developed using RESTful principles in order to assist watershed managers by summarizing water use data by user defined watersheds instead of the currently available county boundaries. These services provide multiple water use resources, such as categories, source types, use types as well as watershed summary resource, which aggregate selected source time series by watershed location to provide a simple annual and monthly watershed summary; grouped by defined source, use, category, and month. Water Use Services documentation can be accessed at https://streamstats.usgs.gov/docs/wateruseservices/

 

Krig Services 

In cooperation with the USGS Iowa Water Science Center, the krig services were developed using RESTful principles in order to provide a geostatistical toolset to correlate USGS surface water gages to ungaged locations. The Krig services exposes a geostatistical variogram model that specifies how points in the variogram cloud (or rather points that have no relation between semivariance and separation distances) can be binned within specified separation distances of one another to obtain a sample variogram. 

The kriging method multiplies the transposed covariance matrix by the matrix of covariances between the ungaged point and an established list of gages to obtain a set of weights. The weights are multiplied by each of the respective r values to obtain the unbiased minimum variance estimate of the correlation between the given study streamgage and the ungaged catchment. 

Krig Services documentation can be accessed at https://streamstats.usgs.gov/docs/krigservices/

 

NSS Services 

Alongside the National Streamflow Statistics (NSS) Application, the NSS services were developed to provide regression equations and an optimized equation computation algorithm to support the StreamStats application via RESTful principles. The NSS program is used in a variety of water-resources and emergency planning, management and regulatory purposes, and for designing of structures; such as bridges and culverts. NSS provides U.S. Geological Survey developed and published regression equations, such as mean annual and monthly mean flows, flow-duration percentiles, and peak and low flows for or every State, the Commonwealth of Puerto Rico, and several metropolitan areas in the United States. NSS Services documentation can be accessed at https://streamstats.usgs.gov/docs/nssservices/