Urban Yield AI
Transforming fragmented municipal records into a living investment heatmap for Montgomery, Alabama.


The Challenge
Municipal datasets are notoriously inconsistent. Building permits arrive with free-text status fields and dollar values that range from $0 placeholder entries to multi-million dollar commercial projects. Code enforcement and 311 service requests live in separate ArcGIS feature layers with overlapping but non-identical schemas, requiring runtime fallback logic just to guarantee coverage. Normalizing these signals into a single spatial framework demanded a unification layer that could absorb missing fields, suppress Census sentinel values, and still produce meaningful comparisons across 638 hexagonal tiles.
The second challenge was temporal mismatch. Zillow listing data and Google Maps business ratings reflect near-real-time market conditions, while Census ACS estimates lag by two to three years and permit records span arbitrary date ranges. Blending these into a composite vitality score required careful weight calibration so that fast-moving market signals would not overwhelm slower demographic baselines, and vice versa. Each of the six scoring signals needed min-max normalization across the full spatial snapshot to remain comparable despite wildly different units: dollars per square foot, star ratings, request counts, and population density.
Finally, the platform had to surface actionable intelligence, not just data. Identifying that a hexagon is "accelerating" means nothing to a city planner unless it also flags that the same zone carries 40% more unresolved service requests than the county average. The scoring model had to derive composite flags, infrastructure priorities and infill opportunities, that cross-reference yield momentum with zoning classifications, vacancy counts, and chronic complaint patterns to produce recommendations grounded in real municipal constraints.
Architecture & Workflows
Data Ingestion and Spatial ETL
Nine async ingestors run concurrently via asyncio.gather, pulling building permits, business licenses, 311 service requests, vacant parcels, and zoning polygons from Montgomery's ArcGIS REST services, demographic profiles from the Census Bureau ACS 5-year API, and tract boundary geometries from TIGERweb. Each record is geocoded to an H3 resolution-8 hexagon (~460m edge length), creating 638 spatial tiles across the county. Zoning assignment uses batched async ArcGIS spatial queries (20 concurrent point-in-polygon lookups), while Census data is joined via Shapely geometry containment tests against ~70 tract polygons. The pipeline handles missing data gracefully: Census sentinel values (-666666666) map to null, and the scorer treats absent signals as neutral (0.5) rather than zero to avoid penalizing data gaps.
Composite Scoring and AI Insight Generation
After spatial aggregation, the scoring engine computes two indices per hexagon. The Urban Vitality Index (UVI) blends six normalized signals: Investment (0.30), Sentiment (0.20), Market (0.20), Risk (0.15, inverted), SocioEconomic (0.10), and Density (0.05). The Yield Score divides momentum (a weighted subset of investment, sentiment, and socioeconomic signals) by a normalized permit baseline, applying a low-confidence penalty when permit volume falls below five. BrightData enrichment injects Zillow pricing metrics (price per sqft, days on market, price reduction frequency) and Google Maps business health indicators (average rating, review volume, permanent closures) into the market and sentiment signals. Claude Haiku generates per-hexagon narratives that explain each tile's situation, root cause, and recommended action, with a schema-versioned cache ensuring stale narratives are never served.
Tech Stack
Results & Impact
-
9 concurrent data sources unified into a single spatial model: Building permits, business licenses, 311 service requests, vacant parcels, zoning polygons, flood zones, historic districts, Census demographics, and tract boundaries are ingested in parallel and aggregated into 638 H3 hexagonal tiles covering Montgomery County.
-
6-signal composite scoring engine: The Urban Vitality Index blends investment, sentiment, market, risk, socioeconomic, and density signals with calibrated weights, producing a 0-100 vitality score and a momentum-based Yield classification (Accelerating, Stable, Stagnating) for every hexagon.
-
Real-time market enrichment via BrightData: Zillow listing metrics (price/sqft, days on market, price reductions) and Google Maps business health indicators (ratings, review volume, permanent closures) are injected into the scoring pipeline through a cache-first architecture with schema versioning.
-
AI-generated actionable narratives: Claude Haiku produces per-hexagon intelligence briefings structured as Situation, Root Cause, and Recommended Action, enabling city planners to act on data without interpreting raw metrics.
-
Sub-second interactive cartography: MapLibre GL renders the full 638-hexagon GeoJSON layer with four visualization modes (UVI heatmap, Yield classification, combined overlay, and X-Ray diagnostics), supporting click-to-inspect detail panels with three-column layouts.
-
Derived municipal intelligence flags: The platform automatically identifies infrastructure priority zones (accelerating areas with 40%+ above-average chronic 311 complaints) and commercial infill opportunities (stagnating B-zoned parcels with vacancies), turning raw data into capital allocation guidance.