pycensus.census.countries.mexico.elections¶
Mexico election results (federal 2024 President, casilla level) for the Guadalajara metro, resampled to H3 res 8 and AGEB / manzana.
load(scope='national', level='ageb', **kw)
¶
Example: load("national", level="ageb", aoi=gdf); levels ageb, manzana, h3, seccion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
str
|
Only |
'national'
|
level
|
str
|
|
'ageb'
|
**kw
|
Passed to :func: |
{}
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
The frame of that level. |
load_all(scope='national', census_geometry=None, aoi=None, worldpop_path=None, cache_dir=None)
¶
{"seccion", "h3", "ageb", "manzana"} frames. aoi: GeoDataFrame of the study area (e.g. Guadalajara AOI) to select sections.
census_geometry: {"ageb": gdf, "manzana": gdf} with GEOID + geometry (INEGI MGN 2020, Jalisco).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
str
|
Only |
'national'
|
census_geometry
|
Optional[Dict[str, GeoDataFrame]]
|
|
None
|
aoi
|
Optional[GeoDataFrame]
|
Study area. |
None
|
worldpop_path
|
Optional[str]
|
Explicit WorldPop raster. |
None
|
cache_dir
|
Optional[str]
|
Cache folder; |
None
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
For another scope. |