Skip to content

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:constants.NUTS_YEARS.

2024
data_dir Optional[str]

Root of the raw cache (default: the shared pycensus cache, data/eu).

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 for every country in the file.

None
year int

NUTS vintage.

2024
data_dir Optional[str]

Root of the raw cache.

None

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID (NUTS id), country, name, nuts_level, geometry (EPSG:4326).

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 = the pycensus cache.

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 for all.

None
year int

LAU vintage.

2023
data_dir Optional[str]

Root of the raw cache.

None

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID (GISCO id, e.g. ES_28079), country, lau_id, name, the vintage's

GeoDataFrame

POP_<year> / POP_DENS_<year> / AREA_KM2 columns and geometry (EPSG:4326).