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 |
None
|
regions
|
Optional[Union[str, List[str]]]
|
Region code(s) -- a parish name or ISO 3166-2:AD code
( |
None
|
level
|
str
|
Standard geometry level name. Only |
'parish'
|
year
|
Union[int, str]
|
Vintage year, or |
'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: |
None
|
cache
|
bool
|
If |
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 |
GeoDataFrame
|
|
GeoDataFrame
|
data: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither |
NotImplementedError
|
If |