Skip to content

UrbanIQ is an open, reproducible pipeline and interactive map that ranks Montréal’s municipal buildings by their combined mitigation–adaptation impact. It computes a transparent MCDA priority score from operational carbon intensity and flood exposure, and incorporates social and greening indicators when available.

License

timothyroch/CodeML_Hackaton_2025

Repository files navigation

UrbanIQ — Climate Resilience & Energy Efficiency

GitHub Pages

lien: https://timothyroch.github.io/CodeML_Hackaton_2025/

View Project Report

🟢 Green = Low Priority → 🔴 Red = High Priority Interactive ranking of Montréal municipal buildings by operational carbon intensity and flood exposure, with optional social/greening dimensions.


Map Preview

View Screenshot
Global view Map global view
Building details popup Building popup
Heat distribution Heat distribution view

What this project solves

Municipalities need to target retrofits where they deliver the greatest combined benefit: reducing building GHG emissions and reducing exposure to extreme rainfall and flooding. UrbanIQ provides a reproducible, auditable pipeline that turns disparate data into a multi-criteria priority score, and an interactive map for spatial triage.

  • Mitigation: prioritize assets with high operational carbon intensity (tCO₂e/m²).
  • Adaptation: factor hydrological exposure via flood proximity/risk.
  • Equity & nature-based adaptation: integrate social vulnerability and urban greening indicators when available.

Key Features

  • Unified ingest from a single “all-in-one” CSV (e.g., finaloutputUpdate1.csv).
  • Transparent MCDA scoring: priority_score = wE·energy_norm + wF·flood_norm + wS·social_norm + wG·green_norm, with non-negative weights summing to 1.
  • Robust normalization (1st–99th percentile) for comparability across the portfolio.
  • Optional metaheuristics (GA / PSO / SA / multi-algorithm) to calibrate weights for maximal discriminative power.
  • Analyst diagnostics: isolation-forest outliers, DBSCAN clusters, bootstrap p10/p90 score bands.
  • Kepler.gl web viewer: color encodes priority; size can encode energy burden; sidebar for top-N and details.

Data

  • Primary input: ./data/finaloutputUpdate1.csv (building attributes, coordinates, year, area, emissions, flood proximity, climate context; latest run ~2,070 rows).

  • Produced artifacts:

    • ./outputs/buildings_ranked.csv — normalized drivers, composite scores, diagnostics.
    • ./outputs/buildings_resilience.geojson — WGS84 points for the web map.

A sample combined CSV is included: outputs data/finaloutputUpdate1.csv.


Quick Start

  1. Install dependencies Create and activate a virtual environment, then install requirements: python -m venv .venv source .venv/bin/activate (Windows: .venv\Scripts\activate) pip install -r requirements.txt

  2. Run the ranking pipeline (combined CSV mode) python src/run_pipeline.py --data_dir ./data --outputs_dir ./outputs --combined_csv finaloutputUpdate1.csv

Optional: enable metaheuristic weight search python src/run_pipeline.py --data_dir ./data --outputs_dir ./outputs --combined_csv finaloutputUpdate1.csv --optimize_weights --optimization_algorithm multi --max_time_seconds 300 --comparison_metric fitness

  1. View the interactive map Open index.html in your browser. • Local file mode: double-click index.html. If fetch() is blocked under file://, click Load GeoJSON and select ./outputs/buildings_resilience.geojson. • Local server mode (recommended): python -m http.server 8000 then visit http://localhost:8000/index.html.

How the prioritization works

  1. Drivers Energy: operational carbon intensity (tCO₂e / m²) = Emissions_GES / Superficie. Flood: proximity-based exposure (higher when closer to flood zones). Social & Greening: incorporated when present, standardized like other drivers.

  2. Normalization Robust scaling (1st–99th percentile) to [0, 1], preserving rank order while dampening outliers.

  3. Composite score Convex combination of normalized drivers with non-negative weights summing to one. Default weights reflect a mitigation–risk balance and can be tuned to policy.

  4. Calibration (optional) Metaheuristics search weight vectors that maximize discriminative power (higher variance and range, balanced correlation with drivers, regularization to avoid one-metric dominance). Multi-algorithm mode orchestrates SA → PSO → GA with time caps and selects the best outcome by fitness, stability, or efficiency.

  5. Diagnostics Outlier flags, clustering, and bootstrap uncertainty bands (p10/p90) quantify stability and highlight assets sensitive to assumptions.


Configuration

  • Edit default paths and weights in src/config.py.
  • Provide YAML overrides via --optimization_config config/optimization_config.yml.
  • Logging clarifies resolved paths, year filters, and modeling decisions (for example: flood exposure derived from distance_inondables).

Repo Structure (key files)

  • src/run_pipeline.py — CLI entry point
  • src/pipeline.py — end-to-end flow (ingest → features → score → export)
  • src/scoring.py — normalization + MCDA composite
  • src/preprocess.py — numeric/string cleaning utilities
  • src/ml_extras.py — outliers, clusters, bootstrap bands
  • src/weight_optimizer.py — GA, PSO, SA, multi-algorithm orchestrator
  • src/optimization_analyzer.py — optional visual analysis/reporting
  • src/io_utils.py, src/logging_utils.py, src/joiners.py, src/config.py
  • index.html — kepler.gl web viewer (loads GeoJSON dynamically)
  • outputs/ — artifacts: CSV + GeoJSON
  • data/ — input combined CSV

Notes

  • Reproducibility: deterministic feature construction, explicit logging, and a self-contained GeoJSON + HTML viewer enable turnkey replication and CKAN packaging.
  • Scenario analysis: adjust weights to explore policy stances; use p10/p90 score bands to communicate sensitivity.
  • Extensibility: plug calibrated flood layers (e.g., return-period polygons), social indices, and greening metrics into the same decision scaffold.

Team

Timothy Roch • Kevin Mock • Gamaliel Kalefe • Justin Joel Takodjou

About

UrbanIQ is an open, reproducible pipeline and interactive map that ranks Montréal’s municipal buildings by their combined mitigation–adaptation impact. It computes a transparent MCDA priority score from operational carbon intensity and flood exposure, and incorporates social and greening indicators when available.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •