Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PROGRAM DESCRIPTION

This is a Python script that automatically finds the ISO3166 (or ISO Region Code) from a ZIP code and a country code. It uses the OpenStreetMap Nominatim and GeoNames databases.

HOW TO USE

  1. Clone this repo to your computer.
  2. Prepare a .csv file with your data, as shown in example.csv and in the image below.
  3. Run the main.py file and specify the path (or name, if in the same folder) to your input and output files.
  4. Let the program run until it finished.

Alt Text

DEPENDENCIES

To run this script, you will need Python 3 and the following libraries installed on your computer:

geopy
pgeocode
sys
csv
time

LICENSING

This project is licensed under the GNU General Public License v3.0.

If you use ANY code from this project:

  • You must disclose the source code of your modified work and the source code you used from this project. This means you are not allowed to use code from this project (even partially) in a closed-source project.
  • You must state clearly and obviously to all end users that you are using code from this project.
  • Your application must also be licensed under the same license.

DISCLAIMER

Because the APIs used require a minimum delay between each request, I added a 1.1 second delay for every line. Therefore, the program can take some time to process large files. This project uses free APIs that are not 100% accurate, so it's possible that some of the results provided are incorrect or that some ISO3166 codes are not found. If you're looking for highly accurate results, I recommend paying for APIs such as the Google Maps API.

About

A simple python script that automatically fills a CSV file with the corresponding ISO3166 code from a ZIP CODE and COUNTRY CODE

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages