fix: Repair data pipeline with StatCan CMHC rental data
- Add StatCan CMHC parser to fetch rental data from Statistics Canada API - Create year spine (2014-2025) as time dimension driver instead of census - Add CMA-level rental and income intermediate models - Update mart_neighbourhood_overview to use rental years as base - Fix neighbourhood_service queries to match dbt schema - Add CMHC data loading to pipeline script Data now flows correctly: 158 neighbourhoods × 12 years = 1,896 records Rent data available 2019-2025, crime data 2014-2024 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,7 @@ def get_neighbourhoods_geojson(year: int = 2021) -> dict[str, Any]:
|
||||
ST_AsGeoJSON(geometry)::json as geom,
|
||||
population,
|
||||
livability_score
|
||||
FROM mart_neighbourhood_overview
|
||||
FROM public_marts.mart_neighbourhood_overview
|
||||
WHERE year = :year
|
||||
AND geometry IS NOT NULL
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user