eea-river-proximity / README.md
jakubvsetecka's picture
Upload README.md with huggingface_hub
a42716e verified
|
Raw
History Blame
8.97 kB
metadata
license: cc-by-4.0
task_categories:
  - tabular-classification
  - feature-extraction
tags:
  - environment
  - rivers
  - pollution
  - geospatial
  - europe
size_categories:
  - 100K<n<1M

EEA Industrial Emissions - River Proximity Dataset

This dataset links 160,576 industrial facilities from the European Environment Agency (EEA) to nearby rivers, with upstream/downstream flow analysis based on HydroRIVERS network data.

Why This Dataset?

Industrial facilities that discharge pollutants into water bodies affect downstream ecosystems and communities. This dataset enables:

  • Impact assessment: Which communities/ecosystems are downstream of polluting facilities?
  • Source tracing: Where does a facility's water supply come from?
  • Regulatory analysis: Mapping industrial emissions to affected river networks
  • Environmental research: Studying relationships between industry and water quality

How It Works

         ┌─────────────┐
         │  UPSTREAM   │  ← Source water (green)
         │  (5 parts)  │     flowing TOWARD facility
         └──────┬──────┘
                │
         ───────●─────── ← Split point (closest to facility)
                │
         ┌──────┴──────┐
         │  FACILITY   │  ← Industrial facility (orange)
         │   (211m)    │     within 1km of river
         └─────────────┘
                │
         ┌──────┴──────┐
         │ DOWNSTREAM  │  → Affected water (red)
         │  (4 parts)  │     flowing AWAY from facility
         └─────────────┘

For each facility:

  1. Find the closest river segment within 1km
  2. Split the river at the closest point
  3. Trace upstream 10km (source water)
  4. Trace downstream 10km (potentially affected)
  5. Clip water surface polygons to match

Dataset Files

river_data_facilities.geoparquet (2.6 GB)

Main dataset with 160,576 facilities matched to rivers.

Column Type Description
facilityName string Name of industrial facility
city string City location
countryName string Country
EPRTR_SectorCode int Industry sector code (1-9)
EPRTR_SectorName string Industry sector name
Pollutant string Pollutant released to water
Releases float Amount released
closest_river_id int HydroRIVERS segment ID
distance_to_river_m float Distance to river (meters)
river_strahler int Strahler stream order (1-9)
river_discharge float Average discharge (m³/s)
upstream_segment_ids list[int] Upstream HydroRIVERS IDs
downstream_segment_ids list[int] Downstream HydroRIVERS IDs
n_upstream int Number of upstream parts
n_downstream int Number of downstream parts
upstream_line_wkb bytes Upstream river geometry (WKB)
downstream_line_wkb bytes Downstream river geometry (WKB)
upstream_poly_wkb bytes Upstream water surface (WKB)
downstream_poly_wkb bytes Downstream water surface (WKB)
geometry Point Facility location (WGS84)
closest_river_overlap_fraction float Fraction (0–1) of the closest HydroRIVERS segment's length that falls inside an EU-Hydro River_Net_p polygon (± 30 m buffer)
closest_river_is_sentinel_visible bool True if closest_river_overlap_fraction ≥ 0.30 — the closest river segment is wide enough to be detectable in Sentinel-2
n_upstream_sentinel_visible int Number of upstream segments that meet the Sentinel-visibility threshold
n_downstream_sentinel_visible int Number of downstream segments that meet the Sentinel-visibility threshold
has_sentinel_visible_river bool Summary flag — True if any of the closest, upstream, or downstream segments is Sentinel-visible; use this column to filter facilities to those where Sentinel-2 water-quality retrieval is feasible

river_data_segments.geoparquet (1.7 MB)

River segments with direction labels (28,434 entries).

Column Type Description
HYRIV_ID int HydroRIVERS segment ID
direction string "upstream" or "downstream"
ORD_STRA int Strahler stream order
DIS_AV_CMS float Average discharge (m³/s)
LENGTH_KM float Segment length (km)
geometry LineString River segment geometry

Usage

Load the dataset

import geopandas as gpd
from shapely import wkb

# Load facilities
facilities = gpd.read_parquet("river_data_facilities.geoparquet")
print(f"Loaded {len(facilities):,} facilities")

# Example: Find facilities in Germany
german = facilities[facilities['countryName'] == 'Germany']
print(f"Germany has {len(german):,} facilities near rivers")

Extract river geometries

# Get a specific facility
facility = facilities[facilities['facilityName'].str.contains('PRECHEZA')].iloc[0]

# Parse WKB geometries
upstream_line = wkb.loads(facility['upstream_line_wkb'])
downstream_line = wkb.loads(facility['downstream_line_wkb'])
upstream_poly = wkb.loads(facility['upstream_poly_wkb'])
downstream_poly = wkb.loads(facility['downstream_poly_wkb'])

print(f"Upstream: {facility['n_upstream']} segments")
print(f"Downstream: {facility['n_downstream']} segments")

Visualize a facility

python visualize_single_facility.py "PRECHEZA"
# Opens facility_map.html in browser

Visualize multiple facilities

python visualize_facilities_rivers.py
# Opens facilities_rivers_map.html with 200 sampled facilities

Scripts

river_proximity.py

Main pipeline that:

  1. Loads EEA facilities, HydroRIVERS segments, and EU-Hydro polygons
  2. Builds river network graph from NEXT_DOWN field
  3. For each facility, finds closest river and splits at nearest point
  4. Traces upstream (BFS) and downstream (linear) within distance limits
  5. Clips water surface polygons to match river geometries
  6. Outputs geoparquet files

visualize_single_facility.py

Creates an interactive Folium map for a single facility showing:

  • Green: upstream river and water surface
  • Red: downstream river and water surface
  • Orange marker: facility location

visualize_facilities_rivers.py

Creates an overview map with sampled facilities and their river associations.

Source Data

Dataset Source Usage
Industrial Facilities EEA E-PRTR Facility locations & emissions
River Network HydroRIVERS v1.0 River segments & flow direction
Water Polygons EU-Hydro Water surface geometry

Parameters

Parameter Value Description
max_distance_m 1,000 Max distance from facility to river
upstream_distance_km 10 How far to trace upstream
downstream_distance_km 10 How far to trace downstream
polygon_buffer_m 600 Buffer for polygon clipping

Statistics

  • Total facilities processed: 254,027
  • Facilities near rivers: 160,576 (63%)
  • Unique upstream segments: 18,498
  • Unique downstream segments: 9,936
  • Average upstream parts: 7.1
  • Average downstream parts: 3.7

Sentinel visibility (EU-Hydro River_Net_p overlap ≥ 30 %)

Strahler order Facilities % Sentinel-visible
1 43,699 22.5 %
2 28,113 20.5 %
3 31,616 23.9 %
4 24,961 42.5 %
5 15,709 67.8 %
6 8,128 86.5 %
7 8,131 97.5 %
8 219 100.0 %
  • Facilities with has_sentinel_visible_river = True: 59,568 / 160,576 (37.1 %)
  • Facilities where the closest reach is visible: 23,507 / 160,576 (14.6 %)

Lower-order rates (~20–25 %) are driven by upstream/downstream propagation: a headwater facility may drain into a wider river within the 10 km trace window.

License

CC-BY-4.0. See source datasets for their respective licenses.

Citation

If you use this dataset, please cite the source datasets:

  • Lehner, B., Grill G. (2013): Global river hydrography and network routing: baseline data and new approaches to study the world's large river systems. Hydrological Processes, 27(15): 2171–2186.
  • European Environment Agency (EEA) Industrial Emissions Database
  • Copernicus EU-Hydro River Network Database