Skip to content

feat: add fertility indicators by NUTS3 (DEMO_R_FIND3) (#67)#71

Merged
Gabrymi93 merged 1 commit into
mainfrom
feat/fertility-nuts3
Jul 1, 2026
Merged

feat: add fertility indicators by NUTS3 (DEMO_R_FIND3) (#67)#71
Gabrymi93 merged 1 commit into
mainfrom
feat/fertility-nuts3

Conversation

@matteocavo

@matteocavo matteocavo commented Jul 1, 2026

Copy link
Copy Markdown
Member

Type

  • New dataset (adds a Eurostat dataflow to the registry)

Problem

Issue #67 — DEMO_R_FIND3 (Fertility indicators by NUTS 3 region) era in lista planned ma non implementato.

Solution

  • Aggiunto datasets/eurostat-fertility-nuts3/ con dataset.yml, sql/clean.sql, sql/mart.sql
  • 4 dimensioni: freq, indic_de, unit, geo (come descritto nell'issue)
  • Indicatori presenti: TOTFERRT (Total Fertility Rate, unit=NR), AGEMOTH e MEDAGEMOTH (età media/mediana al parto, unit=YR)
  • Il mart preserva entrambe le unità (NR e YR) — il filtro unit = 'NR' generato automaticamente è stato rimosso perché taglierebbe le misure in anni
  • Il mart preserva anche freq e freq_label_en, coerente con gli altri dataset pubblicati
  • indic_de.csv già esistente — join funziona su tutte e 3 le chiavi
  • Aggiornato docs/dataset-registry.md: riga Published con 76.392 clean rows + DEMO_R_FIND3 in Planned

Test plan

  • GitHub CI green: test (3.12)
  • GitHub CI green: validate-config
  • python -m pytest tests/ -q → 20 passed
  • ruff check connectors/ tests/ scripts/ → ok
  • Real normalization check: DEMO_R_FIND3 → 76.392 clean rows
  • DuckDB QA: mart 3.827 righe, solo Italia NUTS3, unità NR e YR, year INTEGER, value DOUBLE, 0 null labels su freq, indic_de, unit, geo

Downstream impact

  • None — new dataset only

Closes

Closes #67

Checklist

  • ruff check connectors/ tests/ passes
  • docs/dataset-registry.md updated if adding a dataset
  • docs/contributing.md template still accurate

- 4 dims: freq, indic_de, unit, geo
- indic_de: TOTFERRT (NR), AGEMOTH/MEDAGEMOTH (YR) — mart preserva entrambe le unità
- codelist indic_de.csv esistente riusata
- 3,979 righe mart Italy NUTS3
@matteocavo matteocavo force-pushed the feat/fertility-nuts3 branch from f2422f5 to 4435c59 Compare July 1, 2026 12:04
@matteocavo matteocavo requested review from a team and Gabrymi93 July 1, 2026 12:05
@matteocavo

Copy link
Copy Markdown
Member Author

Review tecnica ok da parte mia.

Ho fatto un pass aggiuntivo prima di chiudere:

Confermo la scelta importante sul mart: niente filtro unit = 'NR', perche taglierebbe AGEMOTH e MEDAGEMOTH che sono in YR.

Verifiche fatte:

  • CI GitHub verde (test (3.12), validate-config)
  • python -m pytest tests/ -q -> 20 passed
  • ruff check connectors/ tests/ scripts/ -> ok
  • normalizzazione reale DEMO_R_FIND3 -> 76.392 clean rows
  • QA DuckDB: mart 3.827 righe, solo Italia NUTS3, unità NR e YR, year INTEGER, value DOUBLE, 0 null label su freq, indic_de, unit, geo

Nota pratica: GitHub non mi permette approval formale perche la PR risulta aperta da matteocavo. Per me e pronta; serve approval/merge di un reviewer non autore.

@Gabrymi93 Gabrymi93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

Nessun finding critico. La PR è solida:

  • Segue le convenzioni del repo (dataset.yml, clean.sql con LEFT JOIN, mart filtrato)
  • freq e freq_label_en già presenti nel mart — buona memoria dalle PR precedenti
  • Rimozione filtro unit = 'NR' corretta (tagliava YR)
  • indic_de codelist già esistente, zero nuovi codelist necessari
  • 76.392 clean rows, mart Italia NUTS3 verificato

Verdict: merge

Complimenti per l'attenzione ai dettagli! 🎉

@Gabrymi93 Gabrymi93 merged commit 5ebe756 into main Jul 1, 2026
2 checks passed
@Gabrymi93 Gabrymi93 deleted the feat/fertility-nuts3 branch July 1, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dataset: Fertility indicators by NUTS 3 region (DEMO_R_FIND3)

2 participants