**Calculation of the hydrologic unit 7-day median
streamflow**

For each streamgage:

- The current daily streamflow value is compared to all historical daily streamflow values for the day of the year. For example, the daily streamflow value for November 9, 2003 is compared to all other November 9 values in the historical database. The current daily streamflow value and all the historical daily streamflow values for the day of the year are sorted from lowest to highest. The percentile of the current daily streamflow value is its "position" relative to the other values in the sorted dataset and rescaled to range between 0 and 100.
- The median of the seven most recent percentile values is computed. The result is referred to as the 7-day median percentile value.

For each hydrologic unit:

- A median of the 7-day median streamgage values (from step 2) is computed for each regional
__hydrologic unit__(2-digit hydrologic unit code, also know as a "huc2"), subregional hydrologic unit (huc4), hydrologic accounting unit (huc6), and hydrologic cataloging unit (huc8). (The cataloging units are subdivisions of the accounting units; the accounting units are subdivisions of the subregional units; and the subregional units are subdivisions of the regional units.) For each individual hydrologic unit, the median is based on all the streamgages located within the hydrologic unit. A median is computed for a hydrologic unit only if there are at least four streamgages with a 7-day median percentile value located within the hydrologic unit. - When creating the hydrologic unit map, the
__cataloging unit__(huc8) medians are drawn on top of the accounting unit (huc6) medians; the accounting unit (huc6) medians are drawn on top of the subregional unit (huc4) medians, and the subregional unit (huc4) medians are drawn on top of the regional (huc2) medians. This drawing procedure gives precedence to the hydrologic units with finer spatial detail.