All projects
Live

NZ Real Estate Explorer

NZ property market analysis from real government bond data

Built in 2 weeks
Next.jsTypeScriptMapbox GL JSSupabasePostGISRecharts

MBIE government bond data

PostGIS spatial queries

Mapbox GL JS map

NZ-wide suburb coverage

01The Problem

New Zealand has a housing affordability crisis but most property data tools are either paywalled or only show listing prices — which reflect what sellers want, not what tenants actually pay. The MBIE Tenancy Services database has real bond lodgment data for hundreds of thousands of rentals. I wanted to make it accessible.

02The Approach

Built a data pipeline that syncs MBIE's rental bond API into Supabase with PostGIS for geographic queries. A Mapbox GL JS map renders suburb-level rental density and median rents. The suburb comparison tool lets you evaluate yield potential side-by-side across any two NZ locations.

03Architecture Decisions

MBIE API → Supabase data pipeline

A sync script fetches rental bond statistics from the MBIE Tenancy Services API (government data, updated monthly) and upserts into a Supabase Postgres database. The pipeline handles pagination, rate limits, and incremental updates.

PostGIS for geographic queries

Suburb boundaries are stored as GeoJSON polygons in PostGIS. Spatial queries let the map layer aggregate rental data by suburb, and point-in-polygon lookups support 'what suburb is this address in?' queries.

Mapbox GL JS with custom data layers

The map renders rental density as a choropleth layer — darker suburbs have more rental activity. Hovering reveals median rent, bond count, and dwelling type breakdown. Clicking drills into suburb detail.

Yield calculator

The calculator combines median rent (from bond data) with a user-entered property price to compute gross rental yield. Side-by-side suburb comparison shows which area offers better returns.

Stats NZ demographic overlay

Suburb profiles include population, median age, and household composition from Stats NZ. Demographic context helps explain rental market dynamics — student areas vs. family suburbs behave differently.

04Key Insight

Government APIs are rarely designed for developer ergonomics. The MBIE API has inconsistent field names, some endpoints return 500s on valid queries, and the 'num-months' parameter causes server errors in production. Robust data pipelines require handling upstream flakiness gracefully — retry logic, fallbacks, and monitoring are table stakes.

05Why It Matters

The most technically complex project in the portfolio — combines a government data pipeline, spatial database, interactive map, and financial modeling. Demonstrates comfort with the full stack from database schema to UI.