SKILL.md
USGS Data Download Guide
Overview
This guide covers downloading water level data from USGS using the dataretrieval Python package. USGS maintains thousands of stream gages across the United States that record water levels at 15-minute intervals.
Installation
pip install dataretrieval
nwis Module (Recommended)
The NWIS module is reliable and straightforward for accessing gage height data.
from dataretrieval import nwis
# Get instantaneous values (15-min intervals)
df, meta = nwis.get_iv(
sites='<station_id>',
start='<start_date>',
end='<end_date>',
parameterCd='00065'
)
# Get daily values
df, meta = nwis.get_dv(
sites='<station_id>',
start='<start_date>',
end='<end_date>',
parameterCd='00060'
)
# Get site information
info, meta = nwis.get_info(sites='<station_id>')
Parameter Codes
| Code | Parameter | Unit | Description |
|---|---|---|---|
00065 | Gage height | feet | Water level above datum |
00060 | Discharge | cfs | Streamflow volume |
nwis Module Functions
| Function | Description | Data Frequency |
|---|---|---|
nwis.get_iv() | Instantaneous values | ~15 minutes |
nwis.get_dv() | Daily values | Daily |
nwis.get_info() | Site information | N/A |
nwis.get_stats() | Statistical summaries |
