Checking for non-preferred file/folder path names (may take a long time depending on the number of files/folders) ...
This resource contains some files/folders that have non-preferred characters in their name. Show non-conforming files/folders.
This resource contains content types with files that need to be updated to match with metadata changes. Show content type files that need updating.
Global Analysis of Hack’s Law: Decomposing the Geometric Origins of h > 0.5 Across Scales and Sampling Paradigms
| Authors: |
|
|
|---|---|---|
| Owners: |
|
This resource does not have an owner who is an active HydroShare user. Contact CUAHSI (help@cuahsi.org) for information on this resource. |
| Type: | Resource | |
| Storage: | The size of this resource is 470.9 MB | |
| Created: | Apr 29, 2026 at 6:25 a.m. (UTC) | |
| Last updated: | Apr 30, 2026 at 3:20 p.m. (UTC) (Metadata update) | |
| Published date: | Apr 30, 2026 at 3:20 p.m. (UTC) | |
| DOI: | 10.4211/hs.d29b097e15524e13afc61cd229819b96 | |
| Citation: | See how to cite this resource |
| Sharing Status: | Published |
|---|---|
| Views: | 138 |
| Downloads: | 37 |
| +1 Votes: | Be the first one to this. |
| Comments: | No comments (yet) |
Abstract
Data and code repository for "Global Analysis of Hack's Law: Decomposing the Geometric Origins of h > 0.5 Across Scales and Sampling Paradigms" (Jiang et al., 2026, submitted to Water Resources Research).
This dataset contains 340,991 globally extracted drainage basins derived from MERIT Hydro (Yamazaki et al., 2019, ~90 m resolution), covering 180°W–180°E, 60°S–85°N. For each basin we provide per-basin Hack's law parameters (exponent h, prefactor
C, R²) computed under five sampling paradigms—along-stem and tributary-junction at both pooled and per-basin scopes, plus independent-outlet fitting—along with 23 environmental covariates spanning terrain, lithology and soil, landform, climate, ectonics, and basin-type categories, and four dimensionless shape descriptors (sinuosity, Schumm elongation ratio, convexity, Gravelius compactness coefficient).
The repository also includes the complete Python pipeline (17 scripts) that reproduces every figure in the manuscript (Fig 1–12 main + Fig A1–A5 appendix), the cached random forest feature-importance results (rf_importance_results_v1.pkl), and a
robustness-check JSON (rf_robustness_results.json) covering cross-fold Spearman ρ, threshold sensitivity, and gradient-boosting cross-validation.
Subject Keywords
Coverage
Spatial
Temporal
| Start Date: | |
|---|---|
| End Date: |
Content
README.md
Submit_20260429 — Hack's Law Paper Submission Materials
Date: 2026-04-29
Author: Lulu Jiang (ORCID: xxxx-xxxx-xxxx-xxxx, hellolulujiang@gmail.com)
Manuscript: submitted to Water Resources Research
License: Data CC-BY-4.0, Code MIT
Cite as: Jiang, L. (2026). Data and code for "Global Analysis of Hack's Law…" [Dataset]. https://doi.org/xxxxx
Shape descriptor standard: Schumm 1956 elongation ratio
Folder structure
Submit_20260429/
├── README.md (this file)
├── Figures/ (17 PNG, 600 dpi, byte-perfect submission set)
│ ├── Fig01–Fig12 main text
│ └── FigA1–FigA5 appendix
├── Scripts/ (Python scripts to regenerate every figure)
│ ├── Fig01–Fig12, FigA1–FigA5 (one .py per figure)
│ ├── Data_Appendix.py (regenerate Data/cases/ from raster)
│ └── merge_map_panels.py (composite helper for FigA2/A4)
└── Data/ (1.4 GB)
├── basin_attributes_*.csv (4 resolution tiers, 5-col prefix per row)
├── alongstem_global.csv (~2.3M LFP samples)
├── tributaryjunction_global.csv (~1.6M junctions)
├── basin_perbasin_hackfit_fine.csv (340,991 rows × 27 cols)
├── rf_importance_results_v1.pkl (trained RF feature importances, Fig11/12 cache)
├── Example/ (Pearl River Basin demo files for Fig03/04)
├── cases/ (16 per-basin polygons + 3 reaches for FigA1/A3/A5)
└── Global/ (5 km vector basin polygons + LFP geojson)
Reproducibility
Quick reproduction (any figure)
bash
cd Submit_20260429/Scripts
conda activate <your_env> # requires: pandas, numpy, scipy, matplotlib, geopandas, shapely, rasterio, scikit-learn
python Fig05_Pooled_Hack_Law.py # any of the 17 fig scripts
All scripts use the relative path ../Data/ for inputs and ../Figures/ for outputs. Just run them with Submit_20260429/Scripts/ as the working directory.
Special cases
- Fig11_RF_Feature_Importance.py uses a cached pickle (
Data/rf_importance_results_v1.pkl) so the random forest does not need to be retrained. To retrain from scratch, delete the pickle and re-run. - Data_Appendix.py regenerates
Data/cases/from the global rasters; cases/ is already shipped, so this script need not be re-run.
17 figures — what each shows
| Fig | Title | Script | Key inputs |
|---|---|---|---|
| 1 | Literature review of reported h | Fig01_Literature_Review.py |
none (hardcoded) |
| 2 | Global basin dataset (340,991 basins) | Fig02_Global_Dataset.py |
basin_attributes_fine_only.csv, Global/bsn_global_020th_vec.geojson |
| 3 | Two sampling strategies (Pearl River) | Fig03_Sampling_Strategies.py |
Example/PRB_*.geojson, alongstem_global.csv, tributaryjunction_global.csv |
| 4 | Basin shape descriptors (Pearl River) | Fig04_Basin_Shape_Descriptors.py |
Example/PRB_* |
| 5 | Pooled Hack's law (3 sampling) | Fig05_Pooled_Hack_Law.py |
alongstem_global.csv, tributaryjunction_global.csv, basin_attributes_fine_only.csv |
| 6 | Per-basin h KDE by area class | Fig06_IntraBasin_Hack_Exponents.py |
basin_perbasin_hackfit_fine.csv |
| 7 | h vs area sliding window (5 methods) | Fig07_Exponent_vs_Area.py |
All 4 above |
| 8 | Geometric decomposition h = h_D + β | Fig08_Geometric_Decomposition.py |
basin_attributes_fine_only.csv |
| 9 | Shape diagnostics (4 panel) | Fig09_Shape_Diagnostics.py |
basin_attributes_fine_only.csv |
| 10 | Shape effect on h, C, residuals | Fig10_Shape_Effect_on_Parameters.py |
basin_attributes_fine_only.csv |
| 11 | RF feature importance (23 vars × 2 targets) | Fig11_RF_Feature_Importance.py |
All 4 attribute CSVs + basin_perbasin_hackfit_fine.csv |
| 12 | Partial dependence top-6 | Fig12_Partial_Dependence_Plots.py |
rf_importance_results_v1.pkl cache |
| A1 | 8 example basins illustrating shape indices | FigA1_Shape_Descriptor_Examples.py |
cases/, Global/lfp_global_merged_ge100km2.geojson |
| A2 | Global maps of along-stem h, R² | FigA2_Global_Maps_AlongStream.py |
basin_perbasin_hackfit_fine.csv, Global/bsn_global_020th_vec.geojson |
| A3 | 3 low-R² along-stem examples | FigA3_Low_R2_AlongStream.py |
cases/, alongstem_global.csv |
| A4 | Global maps of tributary-junction h, R² | FigA4_Global_Maps_Tributary.py |
Same as A2 |
| A5 | 3 low-R² tributary examples | FigA5_Low_R2_Tributary.py |
cases/, tributaryjunction_global.csv |
Key numerical anchors (sanity checks)
| Metric | Value | Source |
|---|---|---|
| Total basins (A ≥ 1 km²) | 340,991 | Fig 2 |
| Basins with A ≥ 100 km² | 26,970 | Fig 2 / 8 / 9 / 10 |
| Along-stem QC pass (A ≥ 100, R² ≥ 0.95, n ≥ 5) | 25,520 | Fig 6 / 11 / A2 |
| Tributary-junction QC pass (A ≥ 1000, R² ≥ 0.80, ord ≥ 3, n ≥ 5) | 4,360 | Fig 6 |
| RF training set (3-condition join) | 23,517 | Fig 11 / 12 |
| Pooled All-h (along-stem / trib / outlet) | 0.551 / 0.543 / 0.532 | Fig 5 |
| h = h_D + β (closure 0%) | 0.527 = 0.491 + 0.036 | Fig 8 |
| Pearson r(ε_D, ε_Ω) | -0.675 | Fig 10 |
| Pearl River along-stem h, R² (n=47) | 0.567, 0.997 | Fig 3 |
| Pearl River tributary h, R² (n=286) | 0.570, 0.964 | Fig 3 |
| Pearl River R_e (Schumm 1956) | 0.60 | Fig 4 |
Data provenance and parameters
CSV products in Data/ are derived from MERIT-Hydro (Yamazaki et al. 2019, doi:10.1029/2019WR024873) and MERIT-Basins (Lin et al. 2019, doi:10.1029/2019WR025287); these inputs are not redistributed here.
Key analysis parameters (consistent across all outputs): - Minimum basin / subcatchment area: 1.0 km² - LFP geometric tolerance: 10 m - Log-area binning: [0.0, 7.0], Δ = 0.1 (70 bins) - Minimum tributary order: 1 (pooled) / 3 (per-basin) - Furey trunk order offset: max − 1 - Minimum OLS samples per fit: 3
Quality filters (Plot side, configurable)
| Filter | Threshold | Where |
|---|---|---|
| Per-basin along-stem area | A ≥ 100 km² | Fig 6, Fig 11, Fig A2 |
| Per-basin tributary-junction area | A ≥ 1000 km² | Fig 6, Fig A4 |
| Along-stem R² | ≥ 0.95 | Fig 6, Fig 11 (main analysis) |
| Tributary-junction R² | ≥ 0.80 | Fig 6 |
| Sample count | n ≥ 5 | Fig 6, Fig 11 |
| Tributary order span | ord_max − ord_min ≥ 1 | Fig 6, Fig A4 |
| Permissive QC (Fig 7 only) | R² ≥ 0.70 | Fig 7 |
Pipeline: BasinFull v7.62 → Plot_Hack/Date_20260427_v3 → Submit_20260429.
Credits
Funding Agencies
This resource was created using funding from the following sources:
| Agency Name | Award Title | Award Number |
|---|---|---|
| National Natural Science Foundation of China | None | 42275019 |
| National Natural Science Foundation of China | None | 42088101 |
| National Key R&D Program of China | None | 2024YFC3013302 |
| Open Fund Project for Heavy Rain of China Meteorological Administration | None | BYKJ2024Z10 |
| Hainan Provincial R&D Program | None | CXFZ2022J074 |
| Hainan Provincial R&D Program | None | SCSF202203 |
| Hainan Key Research and Development Project | None | ZDYF2023SHFZ125 |
How to Cite
This resource is shared under the Creative Commons Attribution CC BY.
http://creativecommons.org/licenses/by/4.0/
Comments
There are currently no comments
New Comment