Colonia (neighbourhood) name from GeoNames -- empty on rows recovered only from SEPOMEX's official code list (no name in that source)
Place Name
admin_name1
string
State (32 federal entities)
Administrative Name 1
admin_code1
string
ISO 3166-2:MX code
Administrative Code 1
admin_name2
string
Municipio, from GeoNames
Administrative Name 2
admin_code2
string
GeoNames municipio code
Administrative Code 2
admin_name3
string
From GeoNames -- equals admin_name2 on roughly a fifth of rows, a distinct sub-municipal value on the rest, per the source
Administrative Name 3
admin_code3
string
From GeoNames
Administrative Code 3
latitude
number
SEPOMEX official polygon centroid where available, else GeoNames-estimated
Latitude
longitude
number
See latitude
Longitude
accuracy
string
POSTAL_CODE where sourced from a SEPOMEX official polygon centroid; otherwise GeoNames' own code (1=estimated, 4=gazetteer match, 6=centroid of addresses/shape)
This dataset contains Mexican postal codes across all states, built by consolidating GeoNames with SEPOMEX's own official code list and boundary polygons.
Column definitions, row count, size and last-updated date are in datapackage.yaml.
Changes made to the source data: postal codes that appear only in the SEPOMEX list are added to the GeoNames records; coordinates are upgraded from a GeoNames estimate to the centroid of the SEPOMEX polygon (reprojected from the source Lambert Conformal Conic projection to WGS84) on every code it covers, labelled accuracy = POSTAL_CODE; admin_code1 is derived to ISO 3166-2:MX from state names rather than GeoNames' INEGI numbering.
Not endorsed by, or affiliated with, GeoNames or SEPOMEX.
Known limitations
Postal codes that come only from SEPOMEX's official list have a verified state and an official polygon-centroid coordinate, but no colonia/municipio name, because SEPOMEX's own data provides none.
Usage
The dataset files are available in CSV format and can be accessed and downloaded using
the links provided in datapackage.yaml.
postal_code and admin_code1 must be read as text (dtype=str) — a naive pd.read_csv() can otherwise mis-handle leading zeros, which some Mexican codes carry.