Inspiration

As urban areas like Toronto continue to expand, cities are getting increasingly hotter and climate resilience has become more urgent than ever. We noticed how certain neighborhoods feel significantly hotter than others—especially areas with less tree coverage, higher surface temperatures, and greater building density. To address this issue, we asked: What if you could “see” the invisible heat risks baked into your city and take action before it’s too late?


What it does

HotSpots.ai ingests raw environmental data for Toronto and transforms it into a 3D interactive heatmap. Over 2,000 vulnerability points are plotted across the city on a 100 m × 100 m grid. Users can hover over each cell to inspect its vulnerability score—broken down into:

  • Building Density
  • Tree Coverage (NDVI)
  • Surface Temperature (LST)

We also simulate tree-planting scenarios by boosting the NDVI value in a region, re-running our ML model, and showing how vulnerability scores would improve in real time.


How we built it

  1. Data Sampling

    • Hand-picked ~15 landmarks (CN Tower, Queen’s Park, Distillery District, etc.)
    • Computed three raw features at each point:
      • Land Surface Temperature (LST)
      • Normalized Difference Vegetation Index (NDVI)
      • Building Footprint Density
  2. Feature Engineering

    • Normalized each feature to a 0–1 range
    • Constructed an N × 3 feature matrix and vulnerability target vector
  3. Random Forest ML Model

    • Trained a small RandomForestRegressor to capture non-linear interactions
    • Achieved R² ≈ 0.78 and MAE ≈ 0.07 on our sample points
  4. AI Fine-Tuning

    • Packaged initial weights and predictions into JSON
    • Prompted Google Gemini-2.5-Flash to “suggest adjustments to w₁, w₂, w₃”
    • Improved to R² ≈ 0.91 and MAE ≈ 0.09 after tuning
  5. City-Wide Scoring & Visualization

    • Applied tuned weights across thousands of 100 m grid cells
    • Exported vulnerability_points.geojson and served it via Next.js
    • Rendered a 3D heatmap in Mapbox with Deck.GL

Challenges we ran into

  • HDF → GeoTIFF conversions with GDAL and missing HDF4 support
  • Large raster exports in Earth Engine; switched to point-based CSV exports for speed
  • Integrating Gemini via the new GenAI SDK and parsing Markdown-wrapped JSON

Accomplishments we’re proud of

  • Building a full end-to-end pipeline from satellite data to 3D interactive map
  • Demonstrating a “ML + LLM” hybrid approach to calibrate weights without heavy data science
  • Enabling tree-planting priority simulations to drive actionable urban planning

What we learned

  • How to combine raster and vector spatial data in Python (rasterio, geopandas)
  • Techniques for normalizing and sampling environmental metrics at scale
  • The power (and quirks) of using an LLM as an “expert-in-the-loop” for model tuning

What’s next for HotSpots AI

  • Add population density weighting to prioritize high-impact neighborhoods
  • Develop a web dashboard for planners to compare multiple planting scenarios
  • Explore additional features (land cover, shading) via supervised classification

Built With

Share this project:

Updates