UN-LOCODE Codelist

FilesSizeFormatCreatedUpdatedLicenseSource
67.64 MBcsv3 months agoOpen Data Commons Public Domain Dedication and License v1.0UNECE

The United Nations Code for Trade and Transport Locations is a code list mantained by UNECE, United Nations agency, to facilitate trade. Data comes from the UNECE page, released at least once a yea...

Read more

Data Files

FileDescriptionSizeLast modifiedDownload
code-list
7.39 MB7 days ago
code-list
country-codes
4.18 kB3 months ago
country-codes
function-classifiers
300 B3 months ago
function-classifiers
status-indicators
827 B3 months ago
status-indicators
subdivision-codes
233 kB7 days ago
subdivision-codes
alias
4.77 kB7 days ago
alias

Data Previews

code-list

Schema

nametypedescriptionpattern
Changestring+ (newly added); X (to be removed); | (changed); # (name changed); = (reference entry); ! (US location with duplicate IATA code)
CountrystringISO 3166 alpha-2 Country Code, defined in countryCodes.csv[A-Z]{2}
Locationstring[A-Z2-9]{3}
Namestring
NameWoDiacriticsstring
SubdivisionstringDefined in subdivisionCodes.csv
StatusstringDefined in statusIndicators.csv
FunctionstringDefined in functionClassifiers.csv[01-][2-][3-][4-][5-][6-][7-][B-]
Datestringym[0-9]{4}
IATAstringIATA code if different from LOCODE
CoordinatesstringDDMM[N/S] DDDMM[W/E][0-9]{4}[NS] [0-9]{5}[WE]
Remarksstring

country-codes

Schema

nametype
CountryCodestring
CountryNamestring

function-classifiers

Schema

nametype
FunctionCodestring
FunctionDescriptionstring

status-indicators

Schema

nametype
STStatusstring
STDescriptionstring

subdivision-codes

Schema

nametype
SUCountrystring
SUCodestring
SUNamestring

badge

The United Nations Code for Trade and Transport Locations is a code list mantained by UNECE, United Nations agency, to facilitate trade.

Data

Data comes from the UNECE page, released at least once a year.

Preparation

As the original release files have encoding problems, we need to process both the mdb and the csv release. To build the dataset we use the csv version of the current edition.

Tools needed: MDBTools and CSVKit. Download the current edition from UNECE and put it into the root directory. Then execute bash scripts/prepare_edition_mdb.sh loc{ed}mdb.zip, where {ed} identify the release.

To integrate the data from the csv then run the python file

Prerequisites:

pip install pandas titlecase

Run:

python scripts/integrate.py loc232csv.zip

The provided prepare.py file would work alone when the original csv file will be fixed upstream.

License

All data is licensed under the ODC Public Domain Dedication and Licence (PDDL).

© 2024 All rights reservedBuilt with Find, Share and Publish Quality Data with Datahub