---
id: "us_huc"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["environment", "geo"]
country: ["US"]
langs: ["common"]
quality: 80
url: "https://registry.apicrafter.io/datatype/us_huc"
---

# USGS hydrologic unit code (HUC) (`us_huc`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Code of a hydrologic unit (a drainage area) in the Watershed Boundary Dataset of the US Geological Survey. Each level adds two digits to the code of the unit it lies in, 2 digits for a region (01 to 22), then 4 for a subregion, 6 for a basin, 8 for a subbasin, 10 for a watershed and 12 for a subwatershed; the optional 14- and 16-digit levels exist only in some areas. Always keep it as a string, because spreadsheets drop the leading zero of regions 01 to 09.

- Personal data (PII): no
- Categories: Environment (protected areas, biodiversity, water, weather, emissions, waste) (environment), Geographic identifiers (geo)
- Countries: United States (US)
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:0[1-9]|1[0-9]|2[0-2])(?:[0-9]{2}){0,7}$
```

## Examples

- `02070010` — Middle Potomac-Anacostia-Occoquan subbasin (HUC8); USGS Watershed Boundary Dataset
- `1802` — Sacramento subregion (HUC4); USGS Watershed Boundary Dataset
- `020700100802` — Occoquan Reservoir-Occoquan River subwatershed (HUC12); USGS Watershed Boundary Dataset
- `2070010` (invalid example) — HUC8 02070010 with the leading zero lost; an odd number of digits
- `23010001` (invalid example) — Region 23 does not exist; regions are 01 to 22

## Translations

- ru: Код гидрологической единицы USGS (HUC): Код водосборной единицы в наборе данных Watershed Boundary Dataset Геологической службы США. Каждый уровень иерархии добавляет две цифры, от 2 цифр для региона до 12 цифр для малого водосбора.

## Sources

- doc: <https://pubs.usgs.gov/tm/11/a3/>
- doc: <https://www.usgs.gov/national-hydrography/watershed-boundary-dataset>
- doc: <https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/us_huc.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/US/environment/us_huc.yaml>
