Example #1
0
    if in_eu_rect(WorldMapPlot.get_centroid(country)) and country != "TUR":
        worldmaps["export-eu"].add_tiny_barchart(country, value_pairs)
    else:
        worldmaps["export"].add_tiny_barchart(country, value_pairs)


worldmaps = {}

if use_levels:
    group = "wiod-sda"
else:
    group = "wiod-sda-intensity"

for fdtype in ("export", "pce"):
    world_plot = WorldMapPlot(fdtype, "", group)

    worldmaps[fdtype] = world_plot

    eu_plot = WorldMapPlot(fdtype + "-eu", "", group)
    eu_plot.xrange = eu_xrange
    eu_plot.yrange = eu_yrange

    worldmaps[fdtype + "-eu"] = eu_plot

bubblecharts = {}
for sector in intense_sectors:
    bubblecharts[sector] = BubblePlot(sector, "", "wiod-descriptive")

for country in config.country_rough_sort:
    if country in config.bad_data_blacklist:
Example #2
0
import sys

import_dollar_series = "Import share of GDP"
emission_series = "Actual imported emissions"
self_emission_series = "Imported emissions under DTA"

export_dollar_series = "Export share of GDP"
export_emissions_series = "Exported emissions"

balance_plots = {}
dta_plots = {}

minyear = min(config.STUDY_YEARS)
maxyear = max(config.STUDY_YEARS)
worldmap = {
    minyear: WorldMapPlot("balance-map-%d" % minyear, "", "wiod"),
    maxyear: WorldMapPlot("balance-map-%d" % maxyear, "", "wiod"),
}


class TradeResultsTable:

    __active = False
    __sqltable = None

    def activate():
        TradeResultsTable.__active = True
        TradeResultsTable.__sqltable = SQLTable(
            "trade_results",
            ["year", "country", "is_export", "industry", "value"],
            ["int", "char(3)", "bool", "varchar(15)", "float"])