• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 11 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Identify city and state for given zip code

ZipCodes Gem Version

Simple gem to get city, state, and time zone for a given zip code. It has a yaml database bundled with it, so you need several mb of memory for the whole hash.

The gem currently supports only US zip codes. The data origin is https://download.geonames.org/export/zip/

The main maintainer is https://github.com/brodyhoskins

Installation

Add this line to your application's Gemfile:

gem 'zip-codes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install zip-codes

Usage

ZipCodes.identify('30301')
# => {:state_code=>"GA", :state_name=>"Georgia", :city=>"Atlanta", :time_zone=>"America/New_York"}
# First run will take a while, as the yaml has to be loaded

If you are using Rails, you can load the hash on app startup for production and staging.

# config/initializers/load_zip_codes.rb
ZipCodes.load unless Rails.env.development?

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Repositories

1

rails-event-sourcing-example

Rails event sourcing with RabbitMQ
Ruby
101
star
2

terraform-bootstrap-example

Template repo for new projects
HCL
91
star
3

grape-rails-cache

HTTP and server side cache integration for Grape and Rails
Ruby
86
star
4

angular-mighty-datepicker

CoffeeScript
82
star
5

guidelines

[DEPRECATED] We are Ruby on Rails experts from Poland. Think hussars. Solid & winged. These are our guidelines.
71
star
6

angular-date-range-picker

Pure Angular date range picker, no jQuery
CoffeeScript
70
star
7

rails-angular-karma-example

Example rails app with angular.js and karma test runner
Ruby
51
star
8

angular-faye

Faye client wrapper for angular
CoffeeScript
46
star
9

angular-tagger

Pure Angular autocomplete with tags, no jQuery
CoffeeScript
46
star
10

atom-vue-hyperclick

atom hyperclick plugin for vue components
JavaScript
43
star
11

angularjs-and-rails-marriage

Ruby
41
star
12

vueconf

VueConf 2017 Website
Vue
35
star
13

faye-redis-delayed

Delayed Redis engine backend for Faye
Ruby
32
star
14

react-native-ios-app-clips

React Native iOS 14 App Clips
Objective-C
32
star
15

rails_sso

Single Sign On solution for Ruby on Rails
Ruby
30
star
16

grape-doorkeeper-implicit-grant-example

Ruby
29
star
17

ghcr

[Project discontinued] GitHub Code Review Extension
CoffeeScript
27
star
18

gate

Handling user input with ease
Ruby
27
star
19

elasticsearch-analysis-morfologik

Morfologik (Polish) Analysis Plugin for ElasticSearch
Java
24
star
20

montelearn

A headless platform for building e-learning apps. Open-source, MIT license. To join as a contributor, simply start creating pull requests. Sample front-end is available here:
Python
18
star
21

rspec-query-limit

Ruby
17
star
22

angular-blocking-click

JavaScript
12
star
23

intelligence

Swift
11
star
24

monteway-flutter

Monterail Flutter starter template
Dart
11
star
25

angular-global-spinner

Angular global HTTP spinner
CoffeeScript
10
star
26

bloc_event_transformers

Ready-made, configurable event transformers for bloc events (bloclibrary.dev)
Dart
8
star
27

ghcr-api

GitHub Code Review API
Ruby
7
star
28

angular-ujs

Angular replacement for jQueryUJS data-method
CoffeeScript
7
star
29

agora

GitHub Data Challenge 2014 submission
Ruby
6
star
30

rails-grape-example

Example app for http://codetunes.com/2014/introduction-to-building-apis-with-grape
JavaScript
6
star
31

workload

Distribute simple tasks to multiple threads with ease
Ruby
6
star
32

Skype-Call-HipChat-Status

Set HipChat status based on Skype call in progress
JavaScript
6
star
33

flutter-action

Flutter and Dart in your GitHub Actions.
Shell
6
star
34

knight

scalac plugin that fights with case classes with default arguments, Java Refleciton API and NullPointerExpection problem
Scala
5
star
35

hotels_pro

HotelsPro API wrapper in Ruby
Ruby
5
star
36

sanelint

Ruby
4
star
37

swift-todoapp-example

Swift
3
star
38

shopper

Simple online shopping app developed during Monterail Academy
Ruby
2
star
39

kbm-shared

Knowledge Base for Monteralians and friends
2
star
40

hashie_walker

Handy hash traverse and transform tool
Ruby
2
star
41

vue-newsletter

The website
HTML
1
star
42

flutter-notes

iOS Notes app recreation in Flutter
Dart
1
star
43

github-actions

Reusable Github Actions for Monterail projects
JavaScript
1
star
44

jimson

Ruby
1
star
45

sendria

Dockerfile
1
star
46

active_forms

Ruby wrapper for Active Forms
Ruby
1
star
47

vuelidate-bot

JavaScript
1
star
48

wing

Convert github markdown with mermaid diagrams to beautiful PDF
CSS
1
star
49

circle-example

Ruby
1
star
50

zeppelins-fullfrontend

PoC project to test backendless approach. NuxtJS + Supabase
Vue
1
star
51

vs-code-flutter-tests

TypeScript
1
star