pycensus.census.countries.mexico.elections.loader¶
Guadalajara metro (10 AMG municipalities) election results.
Implemented¶
national: 2024 federal election, President (2024-06-02), INE Cómputos Distritales, one row per casilla acta (finest unit; aggregated to electoral sección, the smallest published polygon). Source:https://computos2024.ine.mx/<archivoCorte>.zip(name from/assets/JSON/PRESIDENTE/NACIONAL/Presidente_NACIONAL_AVANCE.json, e.g.20240608_2030_COMPUTOS.zip->..._PRES.zip->PRES_2024.csv, '|' separated). Geometry: INE SECCION shapefile (https://pautas.ine.mx/transparencia/mapas/cob_2025/SECCION.zip, 2025 cut of the marco geoelectoral).- Coalition columns (e.g. PVEM_PT_MORENA) are summed to the candidate they support: Sheinbaum (MORENA, PT, PVEM), Gálvez (PAN, PRI, PRD), Máynez (MC). total_votes = candidate votes + unregistered-candidate write-ins (null votes excluded); turnout = TOTAL_VOTOS_CALCULADOS (incl. null) / LISTA_NOMINAL.
NOT implemented (blocked / not published)¶
state(Jalisco Governor 2024) andmunicipal(Guadalajara/AMG ayuntamientos 2024): the IEPC Jalisco publishes only PDF district actas (https://www2.iepcjalisco.org.mx/proceso-electoral-2024/resultados-gubernatura/); no casilla-level open data was found; the PREP hostprep2024.iepcjalisco.mxno longer resolves;iepcjalisco.org.mxserves an incomplete TLS chain (not bypassed).
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. |
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. |