Skip to content

pycensus.census.countries.andorra.estadisticaad.loader

Loader for Andorra's Departament d'Estadistica population-by-locality table.

Technical aspects

Real data, verified live 2026-08-20 -- see :mod:pycensus.andorra.api module docstring for the exact URLs and how they were found (the estadistica.ad dataset-browser portal is Esri ArcGIS Hub, and its search API lists this as a real, public, keyless FeatureServer item titled "Poblacio 2010-2025").

The source table is per-locality ("poble"), not per-parish: each of the 44 real localities carries a parroquia attribute naming its parish, and one pob_<year> integer column per published year. This loader fetches the whole table once (44 rows, one request) and sums pob_<year> grouped by parish to build parish-level population -- the same locality-sum-to-region pattern as :mod:pycensus.mexico.inegi.loader's municipality aggregation.

One real data quirk, verified live rather than guessed: this source spells one parish's name without the "i" ("Sant Julà de Lòria" instead of the correct "Sant Julià de Lòria") -- handled by :data:pycensus.andorra.constants.PARISH_NAME_ALIASES rather than silently dropping that parish's population.

Cross-check performed 2026-08-20: nationwide pob_2023 (summed across all 44 localities) is exactly 85,101 -- matching Diari d'Andorra's reporting of the Departament d'Estadistica's own published 31-Dec-2023 population figure.

Extended 2026-08-23 with two more real, keyless, live-verified parish-level sources: building-footprint counts (buildingCount, single vintage year 2019, from the "Edificis 2019" FeatureServer) and active-business counts (activeBusinessCount, a live current-state snapshot, from the "REE_Ubicacio" business register FeatureServer). Neither carries a real historical year axis, so both are fetched fresh regardless of the requested year -- see :mod:pycensus.andorra.api module docstring for the exact URLs and verification numbers.

Source

https://sig.govern.ad/server/rest/services/Hosted/Poblaci%C3%B3_2010_2021/FeatureServer/0 https://sig.govern.ad/server/rest/services/Hosted/Edificis_2019/FeatureServer/0 https://sig.govern.ad/server/rest/services/Estadistica/REE_Ubicaci%C3%B3/FeatureServer/1

load(aoi=None, regions=None, level='parish', year='latest', api_key=None, cache_dir=None, cache=True, data_dir=None)

Load Andorra's real population-by-parish data as a common-schema GeoDataFrame.

Parameters:

Name Type Description Default
aoi Optional[GeoDataFrame]

Area of interest. Used to auto-detect regions if not given, and to clip the final result.

None
regions Optional[Union[str, List[str]]]

Region code(s) -- a parish name or ISO 3166-2:AD code ("AD-01".."AD-07"), or "AD"/None for the whole country at level="nation". Derived from aoi if omitted (aoi is then required).

None
level str

Standard geometry level name. Only "nation"/"parish" are implemented (see :mod:pycensus.andorra.geography); other standard levels fall back to "parish" via :data:pycensus.andorra.constants.LEVEL_FALLBACK.

'parish'
year Union[int, str]

Vintage year, or "latest" (resolves to 2025, the newest year this source publishes -- see :data:pycensus.andorra.constants.LATEST_YEAR).

'latest'
api_key Optional[str]

Not used -- this source requires no API key.

None
cache_dir Optional[str]

Root of pyCensus' parquet cache. Defaults to :func:pycensus.cache.default_cache_dir.

None
cache bool

If False, bypass the parquet cache entirely.

True
data_dir Optional[str]

Accepted for interface parity; this loader has no raw on-disk cache of its own (the source is one small live request).

None

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID, geometry, and one

GeoDataFrame

estadisticaad_-prefixed column per logical column in

GeoDataFrame

data:pycensus.andorra.estadisticaad.schema.SCHEMA.

Raises:

Type Description
ValueError

If neither regions nor aoi is given, or if year is not one of the years this source publishes.

NotImplementedError

If level resolves to a level without a real boundary source.