Demographics
Fetch population totals, age bands, household counts, and purchasing power for a radius around any German coordinate.
The demographics_fetch tool returns demographic data for a catchment area around a coordinate. Germany only.
Usage
demographics_fetch(lat, lon, radius_m?)
If you only have an address, geocode it first using mapular-geo's geocode tool, then pass the resulting coordinates.
Radius
radius_m — any integer 150–5000 metres (default 1000). The four preset values (150, 500, 1000, 1500) use fast H3 k-ring lookups; all other values use H3 polyfill geometry. Resolution is selected automatically: ≤600m → res 9, ≤2000m → res 8, ≤5000m → res 7.
Common presets:
radius_m | H3 res | Approx. area |
|---|---|---|
150 | 9 | ~0.11 km² |
500 | 9 | ~0.74 km² |
1000 | 8 | ~5.16 km² (default) |
1500 | 8 | ~14 km² |
What it returns
| Field | Description |
|---|---|
population_total | Total residents |
pop_band_0_14 | Residents aged 0–14 |
pop_band_15_29 | Residents aged 15–29 |
pop_band_30_44 | Residents aged 30–44 |
pop_band_45_59 | Residents aged 45–59 |
pop_band_60_plus | Residents aged 60+ |
pop_share_30_59 | Share of the 30–59 bracket (0–1) |
households_total | Total households |
households_avg_size | Average household size |
purchasing_power_eur_per_capita | Annual purchasing power per resident (EUR) |
purchasing_power_mio_eur | Total purchasing power in catchment (millions EUR) |
purchasing_power_index | Index vs. German average (100 = national average) |
population_density_per_km2 | Residents per km² |
coverage_warning | null = full coverage, "partial" = edge of dataset, "out_of_coverage" = no data |
output_path | Parquet file with per-cell raw rows for drill-down |
First call latency
The first call downloads and caches the DE demographics dataset (~10–30 seconds). Subsequent calls serve from local cache and return in under one second.
Example
1. geocode("Hauptbahnhof, Munich") → lat=48.1402, lon=11.5583
2. demographics_fetch(48.1402, 11.5583, radius_m=1000)
→ population_total: 28400, purchasing_power_index: 112.4, households_total: 14800
# Custom radius (polyfill):
demographics_fetch(52.52, 13.405, radius_m=640)
→ res 9 polyfill, result includes radius_m: 640 (no rounding)