superjustin / zip-codes-for-rails

Zip Code Database for Ruby and Rails - Store in your /config/initializer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zip Code Database

Description

Utilize this YAML file of zip codes to lookup zip-codes in memory. No more unnecessary calls to your database, but you do need to have the necessary ram in your VM.

How to setup

cp zip_code_lookups.* to your Rails.root/config/initializers

How to use

ZIP_CODE.find()

Example

ZIP_CODE.find(‘53012’)
=> {"city"=>"CEDARBURG", “latitude”=>"+43.321475", “county”=>"OZAUKEE", “longitude”=>"-088.004033", “state”=>"WI"}

Want to contribute?

Have you found this zip code database useful? Well, as you can see, it’s pretty old! Please update me with a newer dataset of zip codes!

Enjoy!

About

Zip Code Database for Ruby and Rails - Store in your /config/initializer


Languages

Language:Ruby 100.0%