No commit activity in last 3 years
No release in over 3 years
CIA World Factbook crawler
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

TheCountryIdentity

Gem Version Build Status Coverage Status

Introducing the_country_identity, a CIA World Factbook crawler gem, honoring The Bourne Series.

The source of information is a RDF Turtle endpoint served from the D2R Server for the CIA Factbook hosted by the Research Group Data and Web Science at the University of Mannheim, Germany. In case you get no information from an existing country try here or here to see if this server is alive.

This is experimental software, you can use it on production at your own risk.

Installation

Add this line to your application's Gemfile:

gem 'the_country_identity'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install the_country_identity

Usage

> country = TheCountryIdentity::RDF.new('venezuela')
=> #<TheCountryIdentity::RDF:0x007ff9c3350600
   @cache={},
   @country_name="venezuela",
   @url="http://wifo5-03.informatik.uni-mannheim.de/factbook/data/venezuela">

> country.get_property('lifeexpectancyatbirth_totalpopulation')
=> "73.28E0"

You can find all the country property keys here and a running example on a rails application here.

  • Note: properties will be lazy returned, so a request to the RDF server will be fired only at the first execution of get_property method.

Roadmap

  • Implement HTML request approach.

Contributing

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

License

© 2012 by Raul Pino for Alphadeville, published under MIT license.

Some portions of this software corresponds to © 2012 Alex Oberhauser MIT license in a previous version.