Skip to main content
U.S. flag

An official website of the United States government


An official USGS software project is code reviewed and approved at the bureau-level for distribution.

Filter Total Items: 556

Conservation Planning Tool for the Bi-State Distinct Population Segment of Greater Sage-grouse

The Bi-State conservation planning tool provides a science-based approach for prioritizing pinyon (Pinus spp.) and juniper (Juniperus osteosperma, J. occidentalis), hereafter, 'conifer', removal to improve habitat for greater sage-grouse (Centrocercus urophasianus) in the Bi-State Distinct Population Segment (DPS, U.S. Fish and Wildlife Service 2010). Conifer negatively affects sage-grouse surviva

Version 2.3.0 of Coupled Ground-Water and Surface-Water Flow Model Based on the Integration of the Precipitation-Runoff Modeling System (PRMS) and the Modular Ground-Water Flow Model

GSFLOW is a coupled Groundwater and Surface-Water Flow model based on the integration of the U.S. Geological Survey Precipitation-Runoff Modeling System (PRMS; Markstrom and others, 2015) and the U.S. Geological Survey Modular Groundwater Flow Model (MODFLOW-2005, Harbaugh, 2005; MODFLOW-NWT, Niswonger and others, 2011). In addition to the basic PRMS and MODFLOW simulation methods, several additio

Code for: Leveraging local efforts to solve regional-scale ecological questions: using multiple sources of data and a multi-species occupancy model to explore bee-plant interactions

This repository contains all of the scripts to reproduce the analyses, figures, and tables associated with the manuscript Lee et al. in prep. The scripts are organized in the order in which they should be run. Briefly, the files do the following: format the data, fit the model, create the figures, and create the tables.


DataRetrieval.jl is a Julia alternative to the R dataRetrieval package for obtaining USGS water data directly from web services.


This repository contains code for the analysis from a study that examined mortality and qPCR detection in 4 groups of fish: an uninfected control group, an infected control group, and two treatment groups. The main goals were to determine if their were differences in mortality and qPCR detection of the parasite among the differing groups. Mortality was addressed using a Generalized Linear Mixed M

Software for SIR 'Effect of Data Pooling on Predictions From the Three-Part Method for Quantitative Mineral Resource Assessment-An Investigation of a Previous U.S. Geological Survey Assessment'

The Three-Part Method for Quantitative Mineral Resource Assessment has been used by the USGS to predict mineral resources since at least 1975. These predictions use pooled data, and the effects of the pooling on the predictions is investigated and reported in the forthcoming USGS publication. The calculations and figures for this report are performed with software that will be permanently stored i

Per- and Polyfluoroalkyl Substances (PFAS) in U.S. Tapwater: Comparison of Public-Supply and Underserved Private-Well Exposures and Associated Health Implications

This software involves files to fit the statistical models described in Smalling et al. Specifically, there are R scripts and associated stan model files (when appropriate) for comparing PFAS concentrations among public-supply and private-wells and as a function of geospatial predictor variables. There is also an R script for modeling the number of PFAS chemicals detected among water sources and


Heavy is a Fortran program for calculating the change in gravity caused by the change in groundwater storage as predicted by a MODFLOW groundwater-flow model. Gravity change is calculated relative to the initial time step at user-specified locations (e.g., measurement locations). At each location, the gravitational attraction is the sum of the attraction caused by storage change (confined or uncon

Golden Eagle Survival in the Great Plains, Nestlings, with Territory and Time Random Effects - Supplemental Code

R code for modeling survival of nestling and fledgling golden eagles. It is supplemental material for a manuscript submitted to Journal of Raptor Research.


The R package precompute is used to perform periodic computations to set up data for loading and rendering in Shiny applications. These computations typically take too long to conduct on the fly, which is why they are performed with some frequency using this package.

SYNthetic DEPTH Phase Modeling (SYNDEPTH)

This python code models event depths by comparing high-frequency (~0.5-0.04 Hz) teleseismic body-wave waveforms to synthetics. High-frequency body waves contain depth information, primarily in the form of depth phases. While lower frequencies are used to generate moment tensor solutions, high-frequency body waves allow for more accurate estimates of source depth. A moment tensor solution must exis