pycensus.census.countries.eu.geography¶
EU-wide boundaries from Eurostat GISCO: NUTS 0-3 regions and LAU municipalities.
Technical aspects
One GeoPackage per vintage holds every country (NUTS: ~28 MB for all levels; LAU: ~64-78 MB). Each file is
downloaded once into <data_dir>/raw/gisco_nuts or <data_dir>/raw/gisco_lau and read with a country filter,
so a call for one country never parses the whole continent into memory twice. Output is EPSG:4326 with a
GEOID column: the NUTS id (ES300) or the GISCO LAU id (ES_28079).
nuts_file(year=2024, data_dir=None)
¶
Path of the cached GISCO NUTS GeoPackage of year (downloaded on first use).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
NUTS vintage, one of :data: |
2024
|
data_dir
|
Optional[str]
|
Root of the raw cache (default: the shared pycensus cache, |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
Local path of the GeoPackage. |
nuts(level, countries=None, year=2024, data_dir=None)
¶
NUTS regions of one level.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
int
|
0 (country), 1, 2 or 3. |
required |
countries
|
Eurostat or ISO2 country code(s); |
None
|
|
year
|
int
|
NUTS vintage. |
2024
|
data_dir
|
Optional[str]
|
Root of the raw cache. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with |
lau_file(year, data_dir=None)
¶
Path of the cached GISCO LAU GeoPackage of year (downloaded on first use).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
LAU vintage. |
required |
data_dir
|
Optional[str]
|
Folder of the raw downloads; |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
The GeoPackage path. |
Raises:
| Type | Description |
|---|---|
ValueError
|
For a year not wired. |
lau(countries=None, year=2023, data_dir=None)
¶
LAU municipalities with their GISCO attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
countries
|
Eurostat or ISO2 country code(s); |
None
|
|
year
|
int
|
LAU vintage. |
2023
|
data_dir
|
Optional[str]
|
Root of the raw cache. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with |
GeoDataFrame
|
|