pycensus.census.countries.eu.eurostat.loader¶
Loader for Eurostat regional statistics (NUTS 2 / NUTS 3), EU-wide, through the keyless dissemination API.
Technical aspects
The curated tables are the features of schema/eurostat_schema.json: each carries its Eurostat dataset code,
the filters that fix every dimension but geo/time, the NUTS level it is published at and a scale (rates
published in % are stored as 0-1 shares). :func:load fetches the requested features for the NUTS regions of the
requested countries, keeps for each region the latest year with a value (the year is returned per feature as
<feature>_year) and joins them to the GISCO NUTS 2024 boundaries. Regions are matched by NUTS id; ids of other
NUTS versions that do not exist in the 2024 boundaries are dropped (and counted in the returned attrs).
:func:load_dataset does the same for any Eurostat table and filters (not only the curated ones).
Verified live 2026-11-17: Comunidad de Madrid (ES30) household disposable income 21,900 PPS per person (2022), unemployment 9.0 % (2024), passenger cars 614 per 1,000 (2024); Madrid NUTS 3 (ES300) GDP 47,900 PPS per person (2024).
Resolution class: low (regions much larger than municipalities, :mod:pycensus.resolution): context columns
only, never for regressions or the census tab.
tables()
¶
The curated tables: {feature name: {"dataset", "filters", "nuts_level", "scale"}}.
load_dataset(dataset, filters, nuts_level, countries, name='value', scale=1.0, year=None, since=2010, data_dir=None)
¶
Any Eurostat table on the NUTS regions of countries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset
|
str
|
Eurostat dataset code. |
required |
filters
|
Dict[str, str]
|
|
required |
nuts_level
|
int
|
NUTS level of the regions (0-3). |
required |
countries
|
Union[str, Iterable[str]]
|
Eurostat or ISO2 code(s). |
required |
name
|
str
|
output column name. |
'value'
|
scale
|
float
|
multiplier applied to the values (0.01 turns % into shares). |
1.0
|
year
|
Optional[int]
|
a fixed year; |
None
|
since
|
int
|
first year fetched when |
2010
|
data_dir
|
Optional[str]
|
Root of the raw cache (boundaries). |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame |
load(countries, features=None, level=None, year=None, data_dir=None)
¶
Curated Eurostat features on the NUTS regions of countries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
countries
|
Union[str, Iterable[str]]
|
Eurostat or ISO2 code(s). |
required |
features
|
Optional[List[str]]
|
feature names of :func: |
None
|
level
|
Optional[int]
|
NUTS level of the output (2 or 3). Features published at a coarser level are repeated on each finer region of it (a NUTS 2 rate copied to its NUTS 3 regions); finer features cannot be requested at a coarser level. Default: the finest level among the requested features. |
None
|
year
|
Optional[int]
|
a fixed year; |
None
|
data_dir
|
Optional[str]
|
Root of the raw cache. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame |