kyotoprotocol/kyoto — pull request #2 by sammacbeth (2012-08-02 17:31:13+00:00)
Title: Load CountryData from CSV

Instead of pulling data from a MongoDB, use a CSV file with data for all countries, then sub-select the countries to use as agents from this data. This method has the following advantages:

* Removing a dependency on MongoDB. This is part of the process of allowing other database drivers to be used instead, and to allow simulations to be run without a database set up.
* The country data is factual and invariant. Therefore rather than having to provide this data again for each simulation it's easier to keep one master data set.
* The data set is moved into this repository (previously it was hidden in the UI repo). This decreases the coupling of the two repositories and makes it easier to directly invoke simulations rather than having to use the UI.

The attached changeset makes the required changes to load country data from a csv file and uses [this file] as the data source. There is also some basic unittesting of the new code.

Let me know if these changes seem reasonable.

Sam.

[this file]: https://github.com/kyotoprotocol/KyotoUI/blob/master/admin/csv/defaultdatasim.csv