Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions candidates/istat-housing-crowding/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ISTAT densita abitativa per titolo di godimento

## Domanda

- In Italia, quanto e piu alta la densita abitativa media nelle famiglie in affitto rispetto a quelle in proprieta, e come cambia nel tempo?

## Dataset

- fonte: ISTAT SDMX, dataflow `33_179`
- indicatore usato: `ABITAZ_AFFOLL_MED`
- misura: `10` (`per hundred values`)
- provider: `IT1`
- endpoint dati usato nel pilot: `https://esploradati.istat.it/SDMXWS/rest`
- definizione usata nel candidate:
- label SDMX di `DATA_TYPE`: `household crowding index (number of components of household per square meter)`
- label SDMX di `MEASURE`: `per hundred values`

> [!IMPORTANT]
> Questo candidate usa un indicatore di densita abitativa media.
> Non e il tasso EU-SILC di sovraffollamento binario.

## Perche vale la pena testarlo

- e il primo pilot reale del plugin `sdmx` dopo il merge in `toolkit`
- la domanda civica e leggibile anche con un perimetro molto stretto
- il dataset consente un confronto semplice e difendibile tra `rent` e `property`

## Output minimo atteso

- raw: CSV normalizzato dal plugin `sdmx`
- clean: tabella con anno, titolo di godimento e valore numerico
- mart: serie annuale Italia per `rent` vs `property`
- notebook v0: sanity check del mart e primo grafico della serie

## Criterio di promozione

- run reale verde con `toolkit`
- shape del mart stabile e leggibile
- nota metodologica chiara: qui usiamo un indice di densita abitativa, non il tasso binario di sovraffollamento

## Stato

- intake

## Prossimo passo

- verificare se il flow regge un allargamento oltre `IT` senza introdurre latenza o 404 sul fetch
65 changes: 65 additions & 0 deletions candidates/istat-housing-crowding/dataset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
root: "../../out"
schema_version: 1

dataset:
name: "istat_housing_crowding"
years: [2024]

raw:
output_policy: overwrite
sources:
- name: "istat_sdmx_housing_crowding"
type: "sdmx"
client:
data_base_url: "https://esploradati.istat.it/SDMXWS/rest"
metadata_base_url: "https://esploradati.istat.it/SDMXWS/rest"
args:
agency: "IT1"
flow: "33_179"
version: "1.0"
filters:
FREQ: "A"
REF_AREA: "IT"
DATA_TYPE: "ABITAZ_AFFOLL_MED"
MEASURE: "10"
TENURE_STATUS: ["1", "2"]
NUMBER_HOUSEHOLD_COMP: "99"
HOUSEHOLD_TYPOLOGY: "99"
NUMB_OF_CHILDREN: "9"
NUMB_OF_ELDERLY: "9"
FIFTH_EQUIV_HOUSE_INC: "9"
SEX_MAIN_PERCEPTOR: "9"
AGE_MAIN_EARNIER: "9"
EDU_LEV_MAIN_EARN: "99"
LABPROF_STATUS_C_MAIN_EARNER: "99"
# `year` here is only the runtime partition. The SDMX fetch returns the whole series.
filename: "istat_housing_crowding_series.csv"
primary: true

clean:
sql: "sql/clean.sql"
read:
source: "auto"
mode: "latest"
delim: ","
encoding: "utf-8"
header: true
validate:
min_rows: 20

mart:
tables:
- name: "mart_crowding_tenure_italy"
sql: "sql/mart.sql"
required_tables:
- "mart_crowding_tenure_italy"
validate:
table_rules:
mart_crowding_tenure_italy:
min_rows: 35

validation:
fail_on_error: true

output:
artifacts: "minimal"
Loading
Loading