import regions import special_chars from collections import OrderedDict source_json_file = "../source_data/country_profile_2014.json" json_target = "../output/2014/countries.json" xml_target = "../output/2014/countries.xml" json_for_app_target = "../output/2014/countries_for_app.json" xml_for_app_target = "../output/2014/countries_for_app.xml" suggested_actions_text = "Suggested Government Actions" mds = master_data.build(2014) sts = stats.build_ordered(2014) gds = goods.build(2014) csl = ISO_countries.build() regs = regions.build(2014) cps = utility.get_json_data(source_json_file) sp_chars = special_chars.build() def build(): countries = merge(cps, gds, sts, mds) return countries def add_to_country_profiles(profiles): results = [] cpkeys = profiles[0].keys() for profile in profiles:
def set_goods(yr): gds = goods.build(yr)
from collections import OrderedDict csv_2013_target = '../output/2013/complete_goods.csv' xml_2013_target = '../output/2013/complete_goods_by_good.xml' json_2013_target = '../output/2013/complete_goods_by_good.json' csv_2014_target = '../output/2014/complete_goods.csv' xml_2014_target = '../output/2014/complete_goods_by_good.xml' json_2014_target = '../output/2014/complete_goods_by_good.json' global current_year, secs, gds, sp_chars current_year = 2013 secs = sectors.build(current_year) gds = goods.build(current_year) sp_chars = special_chars.build() newline = utility.get_newline() def get_current_year(): return current_year def set_current_year(yr): current_year = yr return def get_goods(): return gds def set_goods(yr):
from collections import OrderedDict csv_2013_target = '../output/2013/complete_goods.csv' xml_2013_target = '../output/2013/complete_goods_by_good.xml' json_2013_target = '../output/2013/complete_goods_by_good.json' csv_2014_target = '../output/2014/complete_goods.csv' xml_2014_target = '../output/2014/complete_goods_by_good.xml' json_2014_target = '../output/2014/complete_goods_by_good.json' global current_year, secs, gds, sp_chars current_year = 2013 secs = sectors.build(current_year) gds = goods.build(current_year) sp_chars = special_chars.build() newline = utility.get_newline() def get_current_year(): return current_year def set_current_year(yr): current_year = yr return def get_goods():
import special_chars from collections import OrderedDict source_json_file = "../source_data/country_profile_2014.json" json_target = "../output/2014/countries.json" xml_target = "../output/2014/countries.xml" json_for_app_target = "../output/2014/countries_for_app.json" xml_for_app_target = "../output/2014/countries_for_app.xml" suggested_actions_text = "Suggested Government Actions" mds = master_data.build(2014) sts = stats.build_ordered(2014) gds = goods.build(2014) csl = ISO_countries.build() regs = regions.build(2014) cps = utility.get_json_data(source_json_file) sp_chars = special_chars.build() def build(): countries = merge(cps, gds, sts, mds) return countries def add_to_country_profiles(profiles): results = [] cpkeys = profiles[0].keys() for profile in profiles: newrec = OrderedDict() cn = profile['country'].encode('utf8')