Example #1
0
def set_sectors(yr):
	secs = sectors.build(yr)
	return
Example #2
0
import special_chars
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
Example #3
0
def set_sectors(yr):
    secs = sectors.build(yr)
    return
Example #4
0
import special_chars
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

Example #5
0
json_2014_target_by_country = '../output/2014/extra/goods_by_country_from_XL.json' 
json_2014_target_by_good = '../output/2014/extra/goods_by_good_from_XL.json'

present = "X"
sp_chars = special_chars.build()

mappings = ["Country_Name", 
            "Good_Name", 
            "Child_Labor", 
            "Forced_Labor", 
            "Forced_Child_Labor"]    

csl = ISO_countries.build()   
base_year = 2013
regs = regions.build(base_year)         
secs = sectors.build(base_year)

def get_base_year():
	return base_year

def set_base_year(yr):
	base_year = yr
	return

def  build(year):
	goods = utility.from_excelsheet(utility.get_source_filename(year), 2, 1, mappings)
	results = include_extra(goods, year)
	return results

def set_regions(year):
	regs = regions.build(year)
Example #6
0
xml_2014_target_by_good = '../output/2014/extra/goods_by_good_from_XL.xml'
json_2014_target_by_country = '../output/2014/extra/goods_by_country_from_XL.json'
json_2014_target_by_good = '../output/2014/extra/goods_by_good_from_XL.json'

present = "X"
sp_chars = special_chars.build()

mappings = [
    "Country_Name", "Good_Name", "Child_Labor", "Forced_Labor",
    "Forced_Child_Labor"
]

csl = ISO_countries.build()
base_year = 2013
regs = regions.build(base_year)
secs = sectors.build(base_year)


def get_base_year():
    return base_year


def set_base_year(yr):
    base_year = yr
    return


def build(year):
    goods = utility.from_excelsheet(utility.get_source_filename(year), 2, 1,
                                    mappings)
    results = include_extra(goods, year)