Skip to content

Small TPU Census Zones (211 zones)

Census and Statistics Department (CSD / censtatd) + Planning Department (PlanD)

  • Census 2021 data: https://www.census2021.gov.hk/doc/STPUG_21C.zip
  • STPU boundaries: Esri ArcGIS FeatureServer (mirrored from GeoData Store, closed Aug 2023)
  • Boundary FeatureServer: https://services3.arcgis.com/6j1KwZfY2fZrfNMR/arcgis/rest/services/Hong_Kong_Population_Distribution_by_Sex_by_Small_TPU_in_2021/FeatureServer/0

CSV + GeoJSON One-off (Census 2021). No live API.

211
STPU Zones
7.47M
Total Population
51 KB
Centroid JSON
Census 2021
Vintage

Hong Kong has 18 districts, but within a district, population density can vary wildly. Tuen Mun has both high-rise estates (50K+/km²) and country parks (near zero). District-level averages smooth this out and produce garbage estimates.

Small Tertiary Planning Units split those 18 districts into 211 zones, each roughly uniform in character. This gives us ~20x better spatial resolution at the cost of only 51KB of data.

GranularityZonesAvg PopulationSpatial Precision
District18~415,000~5-15 km
Large TPU72~104,000~2-5 km
Small TPU211~35,400~0.5-2 km
DCCA452~16,500~0.3-1 km

Each zone in stpu_centroids.json:

FieldTypeExampleDescription
idstring"111"Zone identifier (matches Census CSV column 1 + “S” suffix)
cxfloat114.15108Centroid longitude (WGS84)
cyfloat22.28485Centroid latitude (WGS84)
popinteger60366Total usual resident population
hhinteger22668Number of domestic households
hhSizefloat2.6Average household size
incomeinteger | null40480Median monthly household income (HKD). Null for zones with suppressed data
activeIncomeinteger | null52850Median monthly income of economically active households
floorSqminteger | null40Median domestic floor area (m²)
workPopinteger | null30188Working population
ageU15integer | null7184Population aged under 15
age2544integer | null17520Population aged 25-44
age4564integer | null18640Population aged 45-64
age65integer | null11690Population aged 65+
areaSqkmfloat3.12Zone area in km²

Derived from Census 2021 CSV (STPUG_21C.CSV, 200+ columns) — key column mappings: col 3=total_pop, col 125=domestic_households, col 132=avg_hh_size, col 148=median_active_income, col 200=median_floor_area.

The backend (functions/api/analyze.ts) uses a centroid-based radius approach:

  1. For a query point (lat, lng), calculate haversine distance to all 211 zone centroids
  2. Aggregate population in cumulative rings: 0-400m, 0-800m, 0-2km, 0-5km
  3. Compute population-weighted median income across zones within 2km
  4. Derive local density from the nearest zone: pop / areaSqkm
// Simplified from findNearbyPopulation()
const rings = [
{ maxM: 400, pop: sumPopWithinMeters(400) },
{ maxM: 800, pop: sumPopWithinMeters(800) },
{ maxM: 2000, pop: sumPopWithinMeters(2000) },
{ maxM: 5000, pop: sumPopWithinMeters(5000) },
];
const localDensity = nearestZone.pop / nearestZone.areaSqkm;
const weightedIncome = popWeightedAvg(zonesWithin2km, 'income');
ZoneAreaPopDensityIncomeCharacter
111Sheung Wan60,36619,348/km²HK$40,480Dense urban, mixed commercial-residential
301Mong Kok core92,18051,230/km²HK$25,200Extreme density, budget-mid market
602Sai Kung Town8,4401,690/km²HK$42,100Suburban, weekend destination
203The Peak / Mid-Levels3,620560/km²HK$163,000Ultra-low density, ultra-high income
  1. Census CSV: Downloaded STPUG_21C.zip from censtatd (212 zones × 200+ columns)
  2. Esri boundaries: Paginated download from ArcGIS FeatureServer (3 batches of 100, 211 MultiPolygon features)
  3. Matching: Zone IDs mapped via suffix rule (GeoJSON "111S" → CSV "111")
  4. Centroid extraction: Computed polygon centroid for each zone using average of boundary coordinates
  5. Merged output: stpu_centroids.json (51KB) with centroid + all census stats per zone
  6. Integration: Inlined as STPU_ZONES constant in analyze.ts

Full geometry available at /tmp/hk-census/stpu_combined.geojson (17.4MB) for offline analysis.

ModelHow
Gravity ModelReal zone populations for exclusive radius rings instead of density × π×r² estimation
Catchment AnalysisSTPU population for 5-min and 10-min walk zones
Regression ModelLocal density and income as independent variables
GeodemographicsZone-level income + age distribution for segment classification
MicrosimulationSeeds synthetic agents from actual zone demographics
  • Data vintage: Census 2021 — now 5 years old. Population shifts (new NT housing estates, post-COVID expat changes) are NOT reflected. Treat as best-available baseline, not current truth
  • COVID census: 2021 figures reflect pandemic conditions (lower population in expat-heavy areas)
  • Null income: Some zones have suppressed income data (small sample size). Backend falls back to district median
  • Daytime vs nighttime: Census counts residents at their usual address, not where they work. Central’s daytime population is 5-10x its resident population. This is the single biggest limitation for CBD locations — a restaurant in Central serving lunch crowds sees 10x the foot traffic that census data suggests
  • 0-400m ring in CBD: Central and Wan Chai often show pop=0 in the innermost ring because STPU zone centroids are spaced 400m+ apart in commercial areas with few residents. This is expected — CBD locations rely on commuter inflow (gravity model), not local residents
  • No building-level data yet: STPU zones average ~35K people. Future work: disaggregate to building level using footprints and floor counts from Lands Department GeoInfo Map API