README.md in geolookup-0.3.0 vs README.md in geolookup-0.5.0
- old
+ new
@@ -1,8 +1,8 @@
# 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.
+This gem wraps very common Geo lookups to either FIPS data or the collection of international data lookups. All codes on the app are FIPS codes.
## Installation
Add this line to your application's Gemfile:
@@ -21,21 +21,54 @@
There are functions within fips and country_info to convert codes to Country and US states.
## Examples
```ruby
-# FIPS Examples:
-#
+# US State Examples:
+
# Code to US state abbreviation
-Geolookup::FIPS.code_to_state_abbreviation(1)
+Geolookup::USA::State.code_to_abbreviation(1)
# => "AL"
# Code to US state name
-Geolookup::FIPS.code_to_full_name(1)
+Geolookup::USA::State.code_to_name(1)
# => "Alabama"
+# US State Name to US state code
+Geolookup::USA::State.name_to_code("Alabama")
+# => 1
+# US State abbreviation to name
+Geolookup::USA::State.abbreviation_to_name("AL")
+# => "Alabama"
+
+# US State name / Abbreviation to lat and long
+Geolookup::USA::State.name_to_lat_long("Alabama")
+# => [ 32318231, -86602298]
+
+Geolookup::USA::State.abbreviation_to_lat_long("AL")
+# => [ 32318231, -86602298]
+
+# US State Code to Lat and Long
+Geolookup::USA::State.code_to_lat_long(1)
+# => [ 32318231, -86602298]
+
+# US County Examples:
+
+# Given a state code and county code return the county name
+Geolookup::USA::County.code_to_name(1, 1)
+# => "AUTAUGA"
+
+# Given a state code and county code return the lat and long for that county
+Geolookup::USA::County.code_to_lat_long(1, 1)
+# => [32534930, -86642790]
+
+# Given a state code and county name return the county code
+Geolookup::USA::County.name_to_code(1, 'Autauga')
+# => 1
+
+
# Country Examples:
Geolookup::Country.name_to_code("American Samoa")
# => "AS"
@@ -55,9 +88,7 @@
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
+ $ rake
\ No newline at end of file