pycensus.census.countries.eu.lau.loader¶
Loader for Eurostat GISCO LAU (municipality) boundaries with their population, EU-wide.
Technical aspects
GISCO publishes one LAU file per year (https://gisco-services.ec.europa.eu/distribution/v2/lau/) with the
columns GISCO_ID, CNTR_CODE, LAU_ID, LAU_NAME, POP_<year>, POP_DENS_<year>, AREA_KM2, YEAR. Not every country
reports every year: checked 2026-11-17, LAU 2024 has 0 population for all 8,132 Spanish and 34,946 French LAUs,
while LAU 2023 has them. :func:load therefore picks, per country, the latest vintage in which at least 95 % of
the country's LAUs have population, using the small CSV of each vintage, and then reads only that country's
geometry from the vintage's GeoPackage.
The area is computed from the boundary in ETRS89-LAEA rather than read from GISCO's AREA_KM2, which is wrong
in LAU 2023 for Spain (Barcelona 16,843 km2 instead of 99 km2; 97 % of Spanish LAUs off by more than 10 %).
Countries without population in any wired vintage (Iceland, Serbia, Albania in 2021-2024) raise an error rather than return zeros.
Resolution class: low (municipal units, :mod:pycensus.resolution): usable for boundaries and as a fallback,
never for regressions or the census tab.
vintage_by_country(data_dir=None)
¶
For every country, the latest LAU vintage in which it reported population.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_dir
|
Optional[str]
|
Root of the raw cache. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, int]
|
|
load(countries, year=None, data_dir=None)
¶
LAU municipalities of countries with population and area.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
countries
|
Union[str, Iterable[str]]
|
Eurostat or ISO2 code(s). |
required |
year
|
Optional[int]
|
a fixed LAU vintage; |
None
|
data_dir
|
Optional[str]
|
Root of the raw cache. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with |
GeoDataFrame
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
if a country has no population in the requested (or any wired) vintage. |