Sha256: 7e5716a98fe7e2e57b15cd53fc5b0bd12a1c1ea481a96c21d4688959bf2d9b58

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

# Geolookup [![Build Status](https://travis-ci.org/Spokeo/geolookup.png?branch=master)](https://travis-ci.org/Spokeo/geolookup)

This gem wraps very common Geo lookups to either FIPS data or the collection of international data lookups.

## Installation

Add this line to your application's Gemfile:

    gem 'geolookup'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install geolookup

## Usage

There are functions within fips and country_info to convert codes to Country and US states.

## Examples

```ruby
# FIPS Examples:
#
# Code to US state abbreviation
Geolookup::FIPS.code_to_state_abbreviation(1)
# => "AL"

# Code to US state name
Geolookup::FIPS.code_to_full_name(1)
# => "Alabama"


# Country Examples:

Geolookup::Country.name_to_code("American Samoa")
# => "AS"

Geolookup::Country.code_to_name("AS")
# => "American Samoa"

Geolookup::Country.lat_long("American Samoa")
# => [ -14333300, -170000000 ]
```

For additional functions and documentation please look in geolookup/fips.rb and geolookup/country.rb.

## Contributing

1. Fork it ( http://github.com/Spokeo/geolookup/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write specs!
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request



## Running the Specs
    -> rake

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geolookup-0.3.0 README.md