PC-Axis (.px) Statistics Converter
Convert Nordic and European .px statistical cubes into tidy SQL tables.
Reads PC-Axis (.px) files from Statistics Sweden, Norway, Finland, and other European offices using official.pcaxis_px@1.0.0. Expands multi-dimensional matrices into tidy rows with DuckDB SQL transforms, then publishes as Parquet, CSV, JSON, REST API, or MCP.
What PC-Axis (.px) Statistics Converter does
PC-Axis (.px) Statistics Converter ingests text-based multi-dimensional cube files used by Nordic and European statistical portals. It uses official.pcaxis_px@1.0.0 to unpack STUB, HEADING, VALUES, and DATA blocks into flat observations without custom parsing.
After flattening, DuckDB SQL casts regional codes, time periods, and indicators into queryable columns with quality assertions. Datasets publish with Parquet and CSV downloads, REST APIs, and MCP endpoints.
Input & output example
Expands PC-Axis STUB and HEADING matrices into clean rows.
PC-Axis .px cube
STUB="Region","Year"; HEADING="Pop"; DATA=104200 105100 ...
Flat dimensional table
| region | year | population |
|---|---|---|
| Stockholm | 2025 | 104200 |
| Stockholm | 2026 | 105100 |
How it works
- 1
Fetch the .px statistical matrix file
Download public .px exports from national statistical agency endpoints with proper character encoding.
- 2
Expand cubes via official.pcaxis_px
Pin official.pcaxis_px@1.0.0 to unpack stub and heading dimension labels and align every numeric cell.
- 3
Normalize and publish tidy tables
Parse periods and handle suppressed statistical flags in DuckDB SQL before serving via Parquet, REST API, and MCP.
Try with an agent
Pre-loads PC-Axis (.px) in chatLoad Nordic housing price statistics
Read PC-Axis (.px) regional housing price tables from Statistics Sweden and publish a clean time series.
Common use cases
- Statistics Sweden, Statistics Norway, and StatFin releases
- Regional demographic, housing, and energy cubes
- Converting .px files without custom parsers
Details
- Category
- Format Readers
- Identifier
- pc-axis
- Inputs
- .px (PC-Axis)
- Outputs
- Tidy dimensional tables
- Dataset delivery
- Parquet · CSV · JSON · SQL · REST API · MCP
Frequently asked questions
Are stub and heading codes preserved?
Yes. Both dimension codes and labels are flattened into columns.
How are suppressed or missing cells (like .. or -) handled?
Suppressed statistical markers decode cleanly without breaking numeric column types in DuckDB SQL.
Does it support non-ASCII characters in Nordic region names?
Yes. Encoding declarations in the .px header are respected so Scandinavian and European place names stay intact.