Skip to content

pycensus.census.countries.chile.ine

INE Chile Censo 2017 source (via the Esri Chile DPA FeatureServer).

Importing this module registers the gdf.ine GeoDataFrame accessor (see :mod:pycensus.accessors). Use :func:load to fetch data.

Source

https://services.arcgis.com/r7t1P5pnkoOLRdhr/arcgis/rest/services/ Divisi%C3%B3n_Pol%C3%ADtico_Administrativa_y_Censal/FeatureServer (real Censo 2017 data republished by Esri Chile, attributed to INE -- see :mod:pycensus.chile.api module docstring for verification notes).

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

Load INE Chile Censo 2017 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 (via :func:pycensus.chile.geography.regions_in_aoi), 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

Standard geometry level name, resolved through :data:pycensus.chile.constants.LEVEL_FALLBACK. Only "region", "provincia", "comuna", "distrito" are implemented.

'comuna'
year Union[int, str]

Vintage year, or "latest". Only 2017 (Censo 2017, the only vintage this DPA service publishes) is available.

'latest'
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]

Base directory for the raw GeoJSON cache. Defaults to :data:pycensus.chile.constants.DEFAULT_DATA_DIR.

None

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID, geometry, and one ine_-prefixed

GeoDataFrame

column per logical column in :data:pycensus.chile.ine.schema.SCHEMA.

Raises:

Type Description
ValueError

If neither regions nor aoi is given.