pycensus.census.countries.spain.censo2021¶
Spain Censo de Poblacion y Viviendas 2021 (SDC21) source.
See :mod:pycensus.census.countries.spain.censo2021.api and loader.py module
docstrings for the real, live-verified source details and exactly which
fields are implemented.
load(aoi=None, regions=None, level='section', year='latest', api_key=None, cache_dir=None, cache=True, data_dir=None)
¶
Load INE's Censo 2021 (SDC21) 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) -- autonomous community code, province
code, or 5-digit municipality code, matching |
None
|
level
|
str
|
Standard geometry level name. Uses the same real,
live-verified boundary levels as |
'section'
|
year
|
Union[int, str]
|
Vintage year. SDC21's 2021 census is the only vintage (accepted for interface parity; not otherwise used). |
'latest'
|
api_key
|
Optional[str]
|
Not used -- SDC21's API requires no API key. |
None
|
cache_dir
|
Optional[str]
|
Root of pyCensus' parquet cache. |
None
|
cache
|
bool
|
If |
True
|
data_dir
|
Optional[str]
|
Root directory for raw SDC21 downloads. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with |
GeoDataFrame
|
(canonicalized where a bare global-schema name applies) column per |
GeoDataFrame
|
logical column implemented in |
GeoDataFrame
|
mod: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither |
NotImplementedError
|
If |