Exemple #1
0
def countries_with_no_master_data(mdlist, regs):
    tab5 = utility.grab_values_for_tag(mdlist, "Country_Name")
    tab1 = utility.grab_values_for_tag(regs, "Country_Name")
    diff = utility.set_difference(tab1, tab5)
    return diff
Exemple #2
0
    result = regions.find_X_from_Y("Country_Name", "Country_ISO3", regs, iso3)
    return result


if __name__ == '__main__':

    mdlist_2013 = build(2013)

    to_xml(xml_2013_target, mdlist_2013)
    to_json(json_2013_target, mdlist_2013)
    to_csv(csv_2013_target, mdlist_2013)

    set_regions(2013)
    tab4_2013 = utility.grab_values_for_tag(mdlist_2013, "Country_ISO3")
    tab1_2013 = utility.grab_values_for_tag(regs, "Country_ISO3")
    diff_2013 = utility.set_difference(tab1_2013, tab4_2013)
    print "\nCountries with no master data (for 2013): ", prettify(
        map(get_country_name, diff_2013), "\n")

    mdlist_2014 = build(2014)

    to_xml(xml_2014_target, mdlist_2014)
    to_json(json_2014_target, mdlist_2014)
    to_csv(csv_2014_target, mdlist_2014)

    set_regions(2014)
    tab4_2014 = utility.grab_values_for_tag(mdlist_2014, "Country_ISO3")
    tab1_2014 = utility.grab_values_for_tag(regs, "Country_ISO3")
    diff_2014 = utility.set_difference(tab1_2014, tab4_2014)
    print "\nCountries with no master data (for 2014): ", prettify(
        map(get_country_name, diff_2014), "\n")
Exemple #3
0
def get_country_name(iso3):
	result = regions.find_X_from_Y("Country_Name", "Country_ISO3", regs, iso3)
	return result


if __name__ == '__main__':
	
	mdlist_2013 = build(2013)
	mdlist_2014 = build(2014)

	to_xml(xml_2013_target, mdlist_2013)
	to_json(json_2013_target, mdlist_2013)
	to_csv(csv_2013_target, mdlist_2013)

	to_xml(xml_2014_target, mdlist_2014)
	to_json(json_2014_target, mdlist_2014)
	to_csv(csv_2014_target, mdlist_2014)
	
	set_regions(2013)
	tab4_2013 = utility.grab_values_for_tag(mdlist_2013, "Country_ISO3")
	tab1_2013 = utility.grab_values_for_tag(regs, "Country_ISO3")
	diff_2013 = utility.set_difference(tab1_2013, tab4_2013)
	print "\nCountries with no stats (for 2013): ", prettify(map(get_country_name, diff_2013), "\n")
	
	set_regions(2014)
	tab4_2014 = utility.grab_values_for_tag(mdlist_2014, "Country_ISO3")
	tab1_2014 = utility.grab_values_for_tag(regs, "Country_ISO3")
	diff_2014 = utility.set_difference(tab1_2014, tab4_2014)
	print "\nCountries with no stats (for 2014): ", prettify( map(get_country_name, diff_2014), "\n")

	
Exemple #4
0
def country_with_no_stats(mdlist, regs):
	tab4 = utility.grab_values_for_tag(mdlist, "Country_Name")
	tab1 = utility.grab_values_for_tag(regs, "Country_Name")
	diff = utility.set_difference(tab1, tab4)
	return diff
Exemple #5
0
def country_with_no_stats(mdlist, regs):
    tab4 = utility.grab_values_for_tag(mdlist, "Country_Name")
    tab1 = utility.grab_values_for_tag(regs, "Country_Name")
    diff = utility.set_difference(tab1, tab4)
    return diff