Skip to content

pycensus.census.countries.chile.sii.loader

Loader for Chile's SII comunal jobs-by-workplace statistics, returning a common-schema GeoDataFrame.

Technical aspects

Mirrors :mod:pycensus.census.countries.chile.casen.loader's shape (real bulk .xlsx download, fetched once and filtered per region -- see :mod:pycensus.census.countries.chile.sii.api).

SII's raw table identifies comunas by free-text Spanish name (e.g. "CONCEPCION"), not by CUT code, so this loader builds a live name->CUT-code crosswalk from the same verified DPA FeatureServer already used for Chile's boundaries (:mod:pycensus.census.countries.chile.api, NOM_COMUNA/COMUNA fields on the comuna layer) instead of hardcoding a name table -- comuna names are matched after stripping accents/case (SII's names are unaccented ASCII, DPA's are accented). Region is resolved from SII's free-text id_region (e.g. "VIII DEL BIO BIO") via its leading roman-numeral token against :data:pycensus.census.countries.chile.constants.REGION_ABBR, with a special case for "METROPOLITANA" (Region 13, abbreviated "RM" rather than a roman numeral).

Live-verified 2026-08-23: region "08" (Bio-Bio) -- all 33 real SII comuna rows matched a real DPA GEOID (100% match rate, no silent drops); comuna Concepcion (GEOID 08101) resolved to 154,065 jobsTotal.

Only "comuna" is implemented -- this is the only level SII's comunal workbook publishes.

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

Load Chile SII comunal jobs-by-workplace 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 name(s)/code(s) to load. Derived from aoi if omitted (aoi is then required).

None
level str

Must resolve to "comuna" -- the only level SII's comunal workbook publishes.

'comuna'
year Union[int, str]

Ignored -- SII's file only carries data through commercial year 2015 (the latest available row is always used). See :mod:pycensus.census.countries.chile.sii.api module docstring.

'latest'
cache_dir Optional[str]

Root of pyCensus' parquet cache.

None
cache bool

If False, bypass the parquet cache entirely.

True
data_dir Optional[str]

Base directory for the raw .xlsx/.geojson cache.

None

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID, geometry, and sii_cl_jobsTotal.

Raises:

Type Description
ValueError

If neither regions nor aoi is given.