Polygon Revision Summary#
This page summarizes catchment polygon revisions across a sample of the national hydrometric monitoring stations in HYDAT. When alternate polygon sources are published (e.g., HYDAT 2024 release), we compare them against baseline polygons (earlier, unversioned files) to quantify changes. Note this only includes a sample of the full set.
Revision Map#
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
from bokeh.io import show
from scripts.generation.revision_plots import plot_revision_map
show(plot_revision_map())
Polygon Comparison Metrics#
Jaccard Similarity Index#
The Jaccard Similarity Index (JSI) quantifies geometric overlap between polygon versions. For geometries \(A\) and \(B\):
Where \(|A \cap B|\) is the intersection area and \(|A \cup B|\) is the union area.
Area Change#
Percent area difference between versions:
Positive values indicate catchment expansion; negative values indicate reduction.
Sample distributions#
Jaccard similarity index distribution#
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
from bokeh.io import show
from scripts.generation.revision_plots import plot_jaccard_cdf
show(plot_jaccard_cdf())
Area change distribution#
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
from bokeh.io import show
from scripts.generation.revision_plots import plot_area_change_cdf
show(plot_area_change_cdf())
Detailed comparison table#
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
from bokeh.io import show
from scripts.generation.revision_plots import generate_revision_table
show(generate_revision_table())
All polygon changes are tracked in station-level _versions.json files with complete provenance — data source (origin of polygon: WSC_basins, HYDAT, custom), source version (original dataset version/date), source metadata (all attributes from GeoJSON properties), timestamp (when polygon was integrated), and comparison metrics (Jaccard index, area differences, overlap statistics).
Integration Workflow#
To integrate new polygon versions:
# Preview changes (dry-run)
python scripts/demo_setup/integrate_hydat_polygons.py --dry-run
# Integrate for all demo stations
python scripts/demo_setup/integrate_hydat_polygons.py
# Or specific stations
echo -e "07AF010\n08GA065" > /tmp/stations.txt
python scripts/demo_setup/integrate_hydat_polygons.py --stations-file /tmp/stations.txt
Comparison metrics are calculated automatically using LAEA projection for accurate area calculations.
For methodology and implementation details, see Getting Started and Data Specification.