I got thinking about watershed boundaries, sometimes known as hydrologic units, and their relationship with state boundaries. Hydrologic units are referenced by their hydrologic unit code (HUC), an up-to-12-digit number. The first level, which uses a two-digit code, divides the U.S. into 21 regions. Further levels successively subdivide these regions. The HUC dataset has been superseded by the Watershed Boundary Dataset (WBD), which has six levels (2-, 4-, 6-, 8-, and 12-digit codes).
I was curious how the outline of a particular state (which can have arbitrary boundaries) corresponds to the HUCs (which are determined by topography) that lie fully or partially within that state, and how that relationship changes with differing HUC/WBD levels.