0.01
No commit activity in last 3 years
No release in over 3 years
Geopolitical models for mongoid as a rails engine.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Geopolitical

Gem Version Code Climate Coverage Status Dependency Status Build Status

Geopolitical models ready to use!

With

gem "geopolitical"

I have

DB Pattern

Nation > Region > City > Hood all with:

  • Names (with i18n and sanitized version)
  • ISO codes and abbreviations (Nations & Regions)
  • Hierarchy (Hood.first.city.region.nation.abbr # BR)
  • Languages
  • Geometries
  • Postal codes
  • Phone codes

Geopolitical

ISO 3366-1

Two letter code: BR, DE, UK, US...

ISO 3366-2

Region/Province state code: BR-SP, BR-RJ, BR-MG, US-NY, US-WA, US-CA

Geometries

Areas and points.

Phone codes

With the help of phonie, it's now easy to two way map entities and phone codes.

Postal codes

Great for address validation and form pre-population.

Outside Rails

require 'geopolitical/models'

Naming

  • Nation -> Country
    • Region -> State/Province
      • City -> District/Microregion
        • Hood -> Zone/Neighbourhood

Each must be inside the former.

Populate

Use Geonames_local to populate data easily! "geonames_local"(https://github.com/fireho/geonames_local)

Links

http://download.geonames.org/export/dump/ http://www.statoids.com/ubr.html

This project rocks and uses MIT-LICENSE.