RubyFlow The Ruby and Rails community linklog

factbook gem - Turn World Factbook Public Domain Country Profiles into Open Data (e.g JSON)

Hello, I’ve put together a factbook gem that lets you read in World Factbook country profile pages (in HTML) and returns a structured Ruby hash that you can save, for example, as a pretty printed JSON file e.g. For Brazil use: Factbook::Page.new( 'br' ).to_json Find ready-to-use country profile in JSON in the openmundi/factbook.json repo. Thanks to the CIA for the great service (and public domain data - no rights reserved, no copyright). Cheers.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in