Analyze Building Stock (BDNB)
analyze_building_stockGet aggregate building stock characteristics for a location from the BDNB national database.
Counts ALL buildings (not just those with DVF transactions). Returns totals by construction decade, usage type, total housing units, and percentage of pre-1975 buildings (renovation indicator). par_usage (BDNB usage_principal): residentiel (= residentiel_collectif + residentiel_individuel), tertiaire, dependance, secondaire, non_renseigne; mixte and autre are kept for compatibility.
REQUIRED: at least one location — code_commune_insee, commune, or code_departement
code_commune_insee: 5-digit INSEE code (most precise, no ambiguity between same-name communes)
commune: city name (uppercase, e.g. "LYON")
code_departement: department code (e.g. "69")
Example output: { nb_batiments: 12500, annee_construction_median: 1968, pct_vieux: 42, par_tranche: { avant_1919: 800, "1946_1970": 4200, ... }, par_usage: { residentiel: 4440, residentiel_collectif: 2740, residentiel_individuel: 1700, tertiaire: 623, dependance: 38, secondaire: 11, non_renseigne: 986, mixte: 0, autre: 0 } }
Cost: 5 credits
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commune | No | Commune name (e.g., 'LYON') | |
| code_postal | No | Postal code (e.g., '75015') | |
| code_departement | No | Department code (e.g., '69') | |
| code_commune_insee | No | INSEE commune code (5 digits, e.g., '69123') |