benchflow-ai/skillsbench/usgs-data-download
Claude Code and agent skill by benchflow-ai/skillsbench
- community
Checking that the SKILL.md file is still in the repository.
Download water level data from USGS using the dataretrieval package. Use when accessing real-time or historical streamflow data, downloading gage height or discharge measurements, or working with USGS station IDs.
Install
npx vskill@latest install benchflow-ai/skillsbench/usgs-data-downloadSKILL.md
The same SKILL.md was published earlier as benchflow-ai/skillsbench/usgs-data-download.
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
nwis Module (Recommended)
The NWIS module is reliable and straightforward for accessing gage height data.
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 | N/A | |
nwis.get_peaks() | Annual peak discharge | Annual |
Returned DataFrame Structure
The DataFrame has a datetime index and these columns:
| Column | Description | |
|---|---|---|
site_no | Station ID | |
00065 | Water level value | |
00065_cd | Quality code (can ignore) |
Downloading Multiple Stations
Extracting the Value Column
Common Issues
| Issue | Cause | Solution | |
|---|---|---|---|
| Empty DataFrame | Station has no data for date range | Try different dates or use get_iv() | |
get_dv() returns empty | No daily gage height data | Use get_iv() and aggregate | |
| Connection error | Network issue | Wrap in try/except, retry | |
| Rate limited | Too many requests | Add delays between requests |
Best Practices
- Always wrap API calls in try/except for failed downloads
- Check
len(df) > 0before processing - Station IDs are 8-digit strings with leading zeros (e.g., '04119000')
- Use
get_iv()for gage height, as daily data is often unavailable - Filter columns to exclude quality code columns (
_cd) - Break up large requests into smaller time periods to avoid timeouts
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtasks/flood-risk-analysis/environment/skills/usgs-data-download/SKILL.md
Popularity
- Repository stars
- 1,474
- Repository forks
- 325
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/benchflow-ai/skillsbench/usgs-data-download)