Giter Club home page Giter Club logo

cia_world_factbook_api's Introduction

CIA World Factbook API

Converts the CIA World Factbook into a json data structure.

Data

  • Latest - approx 3 MB - updated monthly
  • Historical - approx 40 MB - last updated 2020-09-27
  • Html Archives - approx 400 MB - last updated 2020-09-27

Usage

If you just want the latest data, get it using the Latest link above.

If you also want to get the full historical data set, use the Historical link above.

If you want to parse the factbook html into json for yourself:

  • clone this repository to your local machine.
  • download the Html Archives above.
  • edit config.json with the paths to your downloaded html archives.
  • run go run parse_html_to_json.go to convert each country html to a json structure.
  • run go run create_weekly_json_files.go to combine each individual country into a week-by-week data file.

If you want to fetch the html files yourself and then parse them:

  • clone this repository to your local machine.
  • edit config.json with the paths to use for the downloaded html archives.
  • run python fetch.py to fetch the historical html files from archive.org (will take several days).
  • run go run parse_html_to_json.go to convert each country html to a json structure.
  • run go run create_weekly_json_files.go to combine each individual country into a week-by-week data file.

Tests

  • clone this repository to your local machine.
  • cd cwf/src/country
  • go test

Contributing

Contributions are most welcome.

Reporting Issues

Please report issues using the Issues tab at the top of this page.

Pull Requests

If you modify the code please submit a pull request for review.

Most of the parsing logic is in src/country in the files page.go and string_conversions.go.

If the parser is modified, please update the VERSION contant in country/page.go.

License

MIT - see LICENSE

cia_world_factbook_api's People

Contributors

iancoleman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.