Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canadian Postal Codes #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
##################
# Project Specific
##################
*.pyc
backup/
data/

###################
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

############
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
clean-data:
rm -rf data/*
Empty file removed README
Empty file.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Zippopotamus API

The free open source static API for all the worlds postal codes.

See [zippopotam.us](http://zippopotam.us) for how to use the API.

## To Contribute Changes:

Postal codes change a lot! And keeping track is tough. Here is how you can help

Please correct any mistakes or add any new countries that we are missing by editing

`raw/allCountries.txt` : Tab Delimited Dump of All Countries Postal Codes from [geonames.org](http://www.geonames.org)

If adding a new country, you need to add a new line to:

`raw/country.txt` : Tab Delimited file, 2-Letter ISO Country code and Country Name

#### Formatting
The data format is tab-delimited text in utf8 encoding, with the following fields :

- `country code` : iso country code, 2 characters
- `postal code` : varchar(20)
- `place name` : varchar(180)
- `admin name1` : 1. order subdivision (state) varchar(100)
- `admin code1` : 1. order subdivision (state) varchar(20)
- `admin name2` : 2. order subdivision (county/province) varchar(100), **Ignored API**
- `admin code2` : 2. order subdivision (county/province) varchar(20), **Ignored by API**
- `admin name3` : 3. order subdivision (community) varchar(100), **Ignored by API**
- `admin code3` : 3. order subdivision (community) varchar(20), **Ignored by API**
- `latitude` : estimated latitude (wgs84)
- `longitude` : estimated longitude (wgs84)
- `accuracy` : accuracy of lat/lng from 1=estimated to 6=centroid **Ignored by API**

## Exceptions and Caveats:

- `gb` Great Britain : Only supports 'in-codes' no 'out-codes' supported
- `fr` France : CEDEX is supported in the JSON response, queries are only 5 digit numbers
- `ar` Argentina : Only the 4 digit old version is supported at the moment
- `br` Brazil : Only major postal codes are available (Codes ending with -000 and the major code per municipality)
- `sk` Slovak Rep. : Please note that there is a space in the postal code

## Questions?

Submit an issue or contact [Jeff](http://twitter.com/jeffreycrowell) or [Samir](http://twitter.com/samirahmed_27)

© Jeff Crowell - Samir Ahmed 2012
246 changes: 246 additions & 0 deletions license.txt

Large diffs are not rendered by default.

Loading