Graph Construction Methods - davidlabee/Graph4Air GitHub Wiki

🔹 1. K-Nearest Neighbors (KNN) – Baseline Spatial Graph

  • Nodes: 50-meter road segments
  • Edges: Connect each node to its k geographically nearest neighbors (e.g., using POINT_X and POINT_Y)
  • Pros: Simple and effective; spatially grounded
  • Cons: Ignores context like traffic or land use
  • Good for: Baseline

Visualisation: image

🔹 2. Feature Similarity Graph

  • Edges: Based on similarity in attributes like RES_1000, TRAFNEAR, INDUS_5000, etc.
  • Use cosine or Euclidean similarity; connect most similar nodes
  • Pros: Captures semantic/contextual relationships
  • Good for: highlights environmental similarity

🔹 3. Road Network Topology Graph

  • Edges: Connect road segments that are physically connected (sharing endpoints or overlapping)
  • Use libraries like shapely or osmnx to detect topological continuity
  • Pros: Resembles real-world connectivity (e.g., traffic or pollutant flow)
  • Good for: Physically grounded modeling

🔹 4. Supersegment Aggregation Graph

  • Nodes: Aggregate segments into larger blocks (e.g., every 300 meters)
  • Edges: Connect blocks based on proximity or common features
  • Pros: Reduces the number of nodes for scalability
  • Use case: Coarser graph for faster training or large-scale mapping

🔹 5. Traffic Influence Graph

  • Edges: Connect segments based on traffic impact
  • Edge weights can be based on:
    • TRAFNEAR, HTRAFMAJOR values
    • Traffic intensity / distance
  • Pros: Emulates how traffic intensity contributes to NO₂ spread
  • Good for: Causal-style modeling of air pollution sources

🔹 6. Land Use Hybrid Graph

  • Strategy: Combine KNN with land use filtering
  • Only connect segments if:
    • They are geographically close and
    • Their land use profiles (e.g., RES_500, PORT_500) are similar
  • Pros: Keeps connections meaningful both spatially and contextually
  • Good for: Realistic neighborhood modeling

🔹 7. Grid Cell Graph (UrbanAir-style)

  • Divide the city into spatial grid cells (e.g., 100x100m)
  • Each cell becomes a node
  • Connect adjacent cells or those with high functional similarity
  • Pros: Works well with GCN/GAT variants; regular structure
  • Inspired by: UrbanAir