| --- |
| license: other |
| license_name: gus-attribution |
| license_details: >- |
| Source data from Statistics Poland (GUS) Local Data Bank (Bank Danych |
| Lokalnych), bdl.stat.gov.pl. GUS permits reuse of published data with |
| attribution to the source. This repackaging adds no additional restrictions. |
| language: |
| - pl |
| pretty_name: GUS BDL — Polish Local Data Bank (full local extract) |
| size_categories: |
| - 1B<n<10B |
| tags: |
| - poland |
| - official-statistics |
| - regional-data |
| - economics |
| - demographics |
| - panel-data |
| configs: |
| - config_name: gminy |
| data_files: facts_gminy/part-*.parquet |
| - config_name: powiaty |
| data_files: facts_powiaty/part-*.parquet |
| - config_name: podregiony |
| data_files: facts_podregiony.parquet |
| - config_name: wojewodztwa |
| data_files: facts_wojewodztwa.parquet |
| - config_name: makroregiony |
| data_files: facts_makroregiony.parquet |
| - config_name: codebook |
| data_files: codebook.parquet |
| - config_name: units |
| data_files: units.parquet |
| --- |
| |
| # GUS BDL — Polish Local Data Bank, full local extract |
|
|
| Complete extract of the [GUS Bank Danych Lokalnych](https://bdl.stat.gov.pl) |
| (Local Data Bank of Statistics Poland) via its public API: **~1.26 billion |
| observations** covering every published variable at every administrative level |
| from gmina (municipality) upward, years 1995–2024 where available. |
|
|
| ## Files |
|
|
| | File | Unit level | Units | Variables | Rows | |
| |---|---|---|---|---| |
| | `facts_gminy/part-*.parquet` (16 files) | 6 — gminy (municipalities) | 4,180 | 35,631 | 1,051,816,661 | |
| | `facts_powiaty/part-*.parquet` (4 files) | 5 — powiaty (counties) | 382 | 63,748 | 154,585,967 | |
| | `facts_podregiony.parquet` | 4 — podregiony (subregions) | 73 | 67,962 | 32,782,913 | |
| | `facts_wojewodztwa.parquet` | 2 — województwa (voivodeships) | 16 | 171,845 | 17,094,800 | |
| | `facts_makroregiony.parquet` | 1 — makroregiony (macroregions) | 7 | 171,845 | 7,478,975 | |
| | `codebook.parquet` | — | | 171,912 | variable descriptions | |
| | `units.parquet` | — | 4,658 | | unit directory | |
|
|
| No level 0 (national), level 3 (regiony), or level 7 (localities) data is included. |
|
|
| Gminy and powiaty are split into part files by `variable_id` range so remote |
| readers fetch only the small file a query needs; `manifest.json` maps each |
| part to its variable range. The other levels are single files. |
|
|
| ## Schema |
|
|
| Fact tables: `variable_id` (int), `unitId` (12-char zero-padded GUS unit code, |
| string), `unitName`, `unitLevel`, `year`, `value` (double), `attr_id` (GUS |
| attribute flag). |
|
|
| `codebook.parquet` maps `variable_id` to subject codes, human-readable Polish |
| descriptions (`variable_full_name`), dimension breakdowns (`n1`–`n5`, e.g. |
| sex, age group), and measure units. `units.parquet` lists each territorial |
| unit with its level, voivodeship TERYT prefix, and first/last observed year. |
|
|
| Gminy counts exceed the ~2,477 actual municipalities because urban-rural |
| gminy appear as up to three units (combined, town, rural part). |
|
|
| ## Querying without downloading |
|
|
| DuckDB reads these files in place over HTTP with predicate pushdown: |
|
|
| ```sql |
| SELECT f.year, f.value, c.variable_full_name |
| FROM read_parquet('hf://datasets/fmbeilin/gus-bdl/facts_gminy/part-*.parquet') f |
| JOIN read_parquet('hf://datasets/fmbeilin/gus-bdl/codebook.parquet') c |
| USING (variable_id) |
| WHERE f.unitId = '011212001011' -- gmina Bochnia |
| AND c.subjectId = 'P1312'; |
| ``` |
|
|
| Python users can also load slices via `pandas.read_parquet("hf://datasets/fmbeilin/gus-bdl/facts_wojewodztwa.parquet")` |
| or the `datasets` library using the configs above. |
|
|
| ## Provenance |
|
|
| Extracted from the official BDL API (`bdl.stat.gov.pl/api/v1`) December |
| 2025 – February 2026. Values are as published by GUS; no cleaning, |
| imputation, or revision beyond type normalisation (unit IDs zero-padded to |
| the canonical 12-character form). Extraction and packaging pipeline: |
| [github.com/fmbeilin/bdl-gus](https://github.com/fmbeilin/bdl-gus). |
|
|
| **Attribution**: data source — Główny Urząd Statystyczny (Statistics Poland), |
| Bank Danych Lokalnych, bdl.stat.gov.pl. |
|
|