SPB Git

spb/wp10_uqo Public

UQO Working Paper No. 10 — The assessment gap in Quebec: vertical and horizontal inequity in municipal property assessment.

TeX 55.9% Python 44%
2.3 KB · 55 lines python
Raw Blame History
1# Author: Simon-Pierre Boucher — contact@spboucher.ai2"""Paths and global constants for the WP10 pipeline.34All paths are relative to the repository root, so the pipeline runs on any5machine after cloning. Override the root with the ``WP10_ROOT`` environment6variable if the scripts are launched from elsewhere.7"""8import os9from pathlib import Path1011ROOT = Path(os.environ.get("WP10_ROOT", Path(__file__).resolve().parents[2]))1213RAW_PARQUET = ROOT / "data" / "raw" / "transactions_700k_avec_registre_foncier.parquet"14PROCESSED = ROOT / "data" / "processed"15ANALYSIS_PARQUET = PROCESSED / "analysis.parquet"16FIGURES = ROOT / "figures"17RESULTS = ROOT / "results"18REPRODUCED = RESULTS / "reproduced"19TABLES = RESULTS / "tables"2021# ---------------------------------------------------------------- sample22# Residential CUBF use codes kept in the estimation sample23# 1000 Logement | 1100 Chalet ou maison de villégiature | 1211 Maison mobile24# 1990 Autres immeubles résidentiels25RESIDENTIAL_CUBF = {"1000", "1100", "1211", "1990"}2627MATCH_MAX_DIST_M = 50.0     # roll–transaction geocoding distance ceiling28MATCH_MIN_SCORE = 150.0     # matcher confidence floor (max attainable: 220)2930PRICE_MIN = 50_000          # source feed already truncates below 50k31RATIO_TRIM = (0.01, 0.99)   # symmetric trim on the assessment ratio, by roll vintage3233CELL_MIN_OBS = 20           # minimum sales per municipality×roll×year cell (FE cells)34MUNI_MIN_SALES = 100        # minimum sales for municipality-level IAAO statistics3536# ---------------------------------------------------------------- inference37SEED_BOOT = 20260809        # bootstrap seed (IAAO confidence intervals)38N_BOOT = 500                # bootstrap replications39QUANTILES = [0.10, 0.25, 0.50, 0.75, 0.90]  # quantile-regression grid4041# IAAO (2013) acceptable ranges, quoted in the paper's tables42IAAO_COD_MAX_SF = 15.0      # single-family, heterogeneous areas43IAAO_PRD_RANGE = (0.98, 1.03)44IAAO_PRB_RANGE = (-0.05, 0.05)4546# Ten largest markets reported individually in the IAAO table47BIG_CITIES = ["Montréal", "Québec", "Laval", "Gatineau", "Longueuil",48              "Lévis", "Sherbrooke", "Saguenay", "Trois-Rivières", "Terrebonne"]495051def ensure_dirs() -> None:52    """Create every output directory the pipeline writes to."""53    for p in (PROCESSED, FIGURES, REPRODUCED, TABLES):54        p.mkdir(parents=True, exist_ok=True)55