Add H3 res-4 regional catchment metrics (~15-18km radius, cell + 6 neighbours) to both the addressable market (25pts) and supply gap (30pts) components of location_opportunity_profile. Changes: - config.yaml: add h3 to DuckDB extensions (requires one-time INSTALL h3 FROM community on each machine) - dim_locations: add h3_cell_res4 column via h3_latlng_to_cell() - location_opportunity_profile: add hex_stats + catchment CTEs; update score formula to use catchment_population and catchment_padel_courts; expose catchment_population, catchment_padel_courts, catchment_venues_per_100k as output cols Motivation: local population underestimates functional market for mid-size cities (e.g. Oldenburg ~170K misses surrounding Gemeinden). H3 k_ring(1) captures the realistic driving-distance catchment (~462km²) consistently across both score components. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
410 B
YAML
22 lines
410 B
YAML
gateways:
|
|
duckdb:
|
|
connection:
|
|
type: duckdb
|
|
catalogs:
|
|
local: "{{ env_var('DUCKDB_PATH', 'data/lakehouse.duckdb') }}"
|
|
extensions:
|
|
- spatial
|
|
- h3
|
|
|
|
default_gateway: duckdb
|
|
|
|
variables:
|
|
LANDING_DIR: "{{ env_var('LANDING_DIR', 'data/landing') }}"
|
|
|
|
model_defaults:
|
|
dialect: duckdb
|
|
start: 2025-01-01
|
|
cron: '@daily'
|
|
|
|
default_target_environment: "dev_{{ user() }}"
|