Skip to content

feat: add business demography by size class NUTS3 (BD_SIZE_R3) (#37)#73

Merged
matteocavo merged 2 commits into
mainfrom
feat/business-demography-nuts3
Jul 1, 2026
Merged

feat: add business demography by size class NUTS3 (BD_SIZE_R3) (#37)#73
matteocavo merged 2 commits into
mainfrom
feat/business-demography-nuts3

Conversation

@matteocavo

Copy link
Copy Markdown
Member

Type

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

Problem

Issue #37 — BD_SIZE_R3 (Business demography by size class and NUTS 3 region) era in lista planned ma non implementato.

Solution

  • Aggiunto datasets/eurostat-business-demography-nuts3/ con dataset.yml, sql/clean.sql, sql/mart.sql
  • 5 dimensioni: freq, indic_sb, sizeclas, nace_r2, geo
  • Aggiunta update_sizeclas() in scripts/update_codelists.py e generato codelists/sizeclas.csv (32 codici via API ESTAT/SIZECLAS)
  • clean.sql: LEFT JOIN su sizeclas.csv → colonna sizeclas_label_en; tutte le altre dims già coperte da codelist esistenti
  • mart.sql: Italy NUTS3, tutte le label, ORDER BY su tutte le dimensioni rilevanti
  • Valori sizeclas presenti in Italia NUTS3: 0, 1-9, GE10, TOTAL — tutti nel codelist
  • Copertura temporale: 2008–2020 (fine serie storica per questo dataflow)
  • Aggiornato docs/dataset-registry.md: riga Published + BD_SIZE_R3 in Planned

Test plan

  • pytest tests/ -v passes (20/20)
  • ruff check connectors/ tests/ scripts/ passes
  • toolkit run full --config datasets/eurostat-business-demography-nuts3/dataset.yml --years 2020 passes (toolkit non installabile localmente su Python 3.14 — da verificare in CI)

Downstream impact

  • None — internal refactor only

Closes

Closes #37

Checklist

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

- 5 dims: freq, indic_sb, sizeclas, nace_r2, geo
- aggiunta update_sizeclas() a update_codelists.py + codelists/sizeclas.csv (32 voci, API ESTAT/SIZECLAS)
- clean.sql: LEFT JOIN su sizeclas.csv, espone sizeclas_label_en
- mart.sql: Italy NUTS3, tutte le dimensioni label, ORDER BY year/geo/indic_sb/sizeclas/nace_r2
- 128,498 righe mart Italy NUTS3
@matteocavo

Copy link
Copy Markdown
Member Author

Review/fix pass fatto dopo merge di DEMO_R_FIND3 su main.

Ho sistemato tre punti:

  • risolto il conflitto con origin/main mantenendo sia eurostat-fertility-nuts3 sia eurostat-business-demography-nuts3 nel registry;
  • aggiunti freq e freq_label_en nel mart.sql, in linea con le ultime PR Eurostat;
  • ricontrollato il conteggio reale del mart Italy NUTS3: 120,955 righe, quindi ho aggiornato docs/dataset-registry.md.

Verifica locale fatta su BD_SIZE_R3:

  • raw rows: 1,693,965
  • mart rows: 120,955
  • anni mart: 2008-2020
  • freq: A / Annual
  • label nulle su freq, indic_sb, sizeclas, nace_r2, geo: 0

Ora aspetterei solo i check GitHub della PR prima di merge/review finale.

@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.

Matteo ha già fixato freq e risolto i conflitti autonomamente. PR solida:

  • sizeclas codelist via SDMX API ✅
  • 5 dimensioni, tutti i JOIN ✅
  • freq nel mart ✅
  • 120.955 righe mart, 0 null label ✅

Verdetto: merge 🎉

@matteocavo matteocavo merged commit 83a1a12 into main Jul 1, 2026
2 checks passed
@matteocavo matteocavo deleted the feat/business-demography-nuts3 branch July 1, 2026 12:55
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: Business demography by size class and NUTS 3 region (BD_SIZE_R3)

2 participants