Skip to content

pycensus.census.countries.andorra.estadisticaad

Andorra's Departament d'Estadistica: population by parish/year.

See :mod:pycensus.andorra.estadisticaad.loader for the real, verified source and :mod:pycensus.andorra.api for the underlying ArcGIS endpoints.

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.