from cached_property import cached_property
from collections import OrderedDict
from onegov.swissvotes.models.vote import SwissVote


class ColumnMapper(object):
    """ Defines the columns used in the dataset and provides helper functions.

    """

    @cached_property
    def columns(self):
        """ The SwissVote attribute name and its column in the dataset.

        Attribute names starting with an ``!`` are used to indicate JSON
        attributes.
        """
        return OrderedDict((
            ('bfs_number', 'anr'),
            ('date', 'datum'),
            ('legislation_number', 'legislatur'),
            ('legislation_decade', 'legisjahr'),
            ('decade', 'jahrzehnt'),
            ('title', 'titel'),
            ('keyword', 'stichwort'),
            ('votes_on_same_day', 'anzahl'),
            ('_legal_form', 'rechtsform'),
            ('descriptor_1_level_1', 'd1e1'),
            ('descriptor_1_level_2', 'd1e2'),
            ('descriptor_1_level_3', 'd1e3'),
            ('descriptor_2_level_1', 'd2e1'),
            ('descriptor_2_level_2', 'd2e2'),
            ('descriptor_2_level_3', 'd2e3'),
            ('descriptor_3_level_1', 'd3e1'),
            ('descriptor_3_level_2', 'd3e2'),
            ('descriptor_3_level_3', 'd3e3'),
            ('_result_people_accepted', 'volk'),
            ('_result_cantons_accepted', 'stand'),
            ('_result', 'annahme'),
            ('result_eligible_voters', 'berecht'),
            ('result_votes_total', 'stimmen'),
            ('result_turnout', 'bet'),
            ('result_votes_empty', 'leer'),
            ('result_votes_invalid', 'ungultig'),
            ('result_votes_valid', 'gultig'),
            ('result_people_yeas', 'volkja'),
            ('result_people_nays', 'volknein'),
            ('result_people_yeas_p', 'volkja-proz'),
            ('result_cantons_yeas', 'kt-ja'),
            ('result_cantons_nays', 'kt-nein'),
            ('result_cantons_yeas_p', 'ktjaproz'),
            ('result_zh_eligible_voters', 'zh-berecht'),
            ('result_zh_votes_total', 'zh-stimmen'),
            ('result_zh_turnout', 'zh-bet'),
            ('result_zh_votes_valid', 'zh-gultig'),
            ('result_zh_yeas', 'zh-ja'),
            ('result_zh_nays', 'zh-nein'),
            ('result_zh_yeas_p', 'zh-japroz'),
            ('_result_zh_accepted', 'zh-annahme'),
            ('result_be_eligible_voters', 'be-berecht'),
            ('result_be_votes_total', 'be-stimmen'),
            ('result_be_turnout', 'be-bet'),
            ('result_be_votes_valid', 'be-gultig'),
            ('result_be_yeas', 'be-ja'),
            ('result_be_nays', 'be-nein'),
            ('result_be_yeas_p', 'be-japroz'),
            ('_result_be_accepted', 'be-annahme'),
            ('result_lu_eligible_voters', 'lu-berecht'),
            ('result_lu_votes_total', 'lu-stimmen'),
            ('result_lu_turnout', 'lu-bet'),
            ('result_lu_votes_valid', 'lu-gultig'),
            ('result_lu_yeas', 'lu-ja'),
            ('result_lu_nays', 'lu-nein'),
            ('result_lu_yeas_p', 'lu-japroz'),
            ('_result_lu_accepted', 'lu-annahme'),
            ('result_ur_eligible_voters', 'ur-berecht'),
            ('result_ur_votes_total', 'ur-stimmen'),
            ('result_ur_turnout', 'ur-bet'),
            ('result_ur_votes_valid', 'ur-gultig'),
            ('result_ur_yeas', 'ur-ja'),
            ('result_ur_nays', 'ur-nein'),
            ('result_ur_yeas_p', 'ur-japroz'),
            ('_result_ur_accepted', 'ur-annahme'),
            ('result_sz_eligible_voters', 'sz-berecht'),
            ('result_sz_votes_total', 'sz-stimmen'),
            ('result_sz_turnout', 'sz-bet'),
            ('result_sz_votes_valid', 'sz-gultig'),
            ('result_sz_yeas', 'sz-ja'),
            ('result_sz_nays', 'sz-nein'),
            ('result_sz_yeas_p', 'sz-japroz'),
            ('_result_sz_accepted', 'sz-annahme'),
            ('result_ow_eligible_voters', 'ow-berecht'),
            ('result_ow_votes_total', 'ow-stimmen'),
            ('result_ow_turnout', 'ow-bet'),
            ('result_ow_votes_valid', 'ow-gultig'),
            ('result_ow_yeas', 'ow-ja'),
            ('result_ow_nays', 'ow-nein'),
            ('result_ow_yeas_p', 'ow-japroz'),
            ('_result_ow_accepted', 'ow-annahme'),
            ('result_nw_eligible_voters', 'nw-berecht'),
            ('result_nw_votes_total', 'nw-stimmen'),
            ('result_nw_turnout', 'nw-bet'),
            ('result_nw_votes_valid', 'nw-gultig'),
            ('result_nw_yeas', 'nw-ja'),
            ('result_nw_nays', 'nw-nein'),
            ('result_nw_yeas_p', 'nw-japroz'),
            ('_result_nw_accepted', 'nw-annahme'),
            ('result_gl_eligible_voters', 'gl-berecht'),
            ('result_gl_votes_total', 'gl-stimmen'),
            ('result_gl_turnout', 'gl-bet'),
            ('result_gl_votes_valid', 'gl-gultig'),
            ('result_gl_yeas', 'gl-ja'),
            ('result_gl_nays', 'gl-nein'),
            ('result_gl_yeas_p', 'gl-japroz'),
            ('_result_gl_accepted', 'gl-annahme'),
            ('result_zg_eligible_voters', 'zg-berecht'),
            ('result_zg_votes_total', 'zg-stimmen'),
            ('result_zg_turnout', 'zg-bet'),
            ('result_zg_votes_valid', 'zg-gultig'),
            ('result_zg_yeas', 'zg-ja'),
            ('result_zg_nays', 'zg-nein'),
            ('result_zg_yeas_p', 'zg-japroz'),
            ('_result_zg_accepted', 'zg-annahme'),
            ('result_fr_eligible_voters', 'fr-berecht'),
            ('result_fr_votes_total', 'fr-stimmen'),
            ('result_fr_turnout', 'fr-bet'),
            ('result_fr_votes_valid', 'fr-gultig'),
            ('result_fr_yeas', 'fr-ja'),
            ('result_fr_nays', 'fr-nein'),
            ('result_fr_yeas_p', 'fr-japroz'),
            ('_result_fr_accepted', 'fr-annahme'),
            ('result_so_eligible_voters', 'so-berecht'),
            ('result_so_votes_total', 'so-stimmen'),
            ('result_so_turnout', 'so-bet'),
            ('result_so_votes_valid', 'so-gultig'),
            ('result_so_yeas', 'so-ja'),
            ('result_so_nays', 'so-nein'),
            ('result_so_yeas_p', 'so-japroz'),
            ('_result_so_accepted', 'so-annahme'),
            ('result_bs_eligible_voters', 'bs-berecht'),
            ('result_bs_votes_total', 'bs-stimmen'),
            ('result_bs_turnout', 'bs-bet'),
            ('result_bs_votes_valid', 'bs-gultig'),
            ('result_bs_yeas', 'bs-ja'),
            ('result_bs_nays', 'bs-nein'),
            ('result_bs_yeas_p', 'bs-japroz'),
            ('_result_bs_accepted', 'bs-annahme'),
            ('result_bl_eligible_voters', 'bl-berecht'),
            ('result_bl_votes_total', 'bl-stimmen'),
            ('result_bl_turnout', 'bl-bet'),
            ('result_bl_votes_valid', 'bl-gultig'),
            ('result_bl_yeas', 'bl-ja'),
            ('result_bl_nays', 'bl-nein'),
            ('result_bl_yeas_p', 'bl-japroz'),
            ('_result_bl_accepted', 'bl-annahme'),
            ('result_sh_eligible_voters', 'sh-berecht'),
            ('result_sh_votes_total', 'sh-stimmen'),
            ('result_sh_turnout', 'sh-bet'),
            ('result_sh_votes_valid', 'sh-gultig'),
            ('result_sh_yeas', 'sh-ja'),
            ('result_sh_nays', 'sh-nein'),
            ('result_sh_yeas_p', 'sh-japroz'),
            ('_result_sh_accepted', 'sh-annahme'),
            ('result_ar_eligible_voters', 'ar-berecht'),
            ('result_ar_votes_total', 'ar-stimmen'),
            ('result_ar_turnout', 'ar-bet'),
            ('result_ar_votes_valid', 'ar-gultig'),
            ('result_ar_yeas', 'ar-ja'),
            ('result_ar_nays', 'ar-nein'),
            ('result_ar_yeas_p', 'ar-japroz'),
            ('_result_ar_accepted', 'ar-annahme'),
            ('result_ai_eligible_voters', 'ai-berecht'),
            ('result_ai_votes_total', 'ai-stimmen'),
            ('result_ai_turnout', 'ai-bet'),
            ('result_ai_votes_valid', 'ai-gultig'),
            ('result_ai_yeas', 'ai-ja'),
            ('result_ai_nays', 'ai-nein'),
            ('result_ai_yeas_p', 'ai-japroz'),
            ('_result_ai_accepted', 'ai-annahme'),
            ('result_sg_eligible_voters', 'sg-berecht'),
            ('result_sg_votes_total', 'sg-stimmen'),
            ('result_sg_turnout', 'sg-bet'),
            ('result_sg_votes_valid', 'sg-gultig'),
            ('result_sg_yeas', 'sg-ja'),
            ('result_sg_nays', 'sg-nein'),
            ('result_sg_yeas_p', 'sg-japroz'),
            ('_result_sg_accepted', 'sg-annahme'),
            ('result_gr_eligible_voters', 'gr-berecht'),
            ('result_gr_votes_total', 'gr-stimmen'),
            ('result_gr_turnout', 'gr-bet'),
            ('result_gr_votes_valid', 'gr-gultig'),
            ('result_gr_yeas', 'gr-ja'),
            ('result_gr_nays', 'gr-nein'),
            ('result_gr_yeas_p', 'gr-japroz'),
            ('_result_gr_accepted', 'gr-annahme'),
            ('result_ag_eligible_voters', 'ag-berecht'),
            ('result_ag_votes_total', 'ag-stimmen'),
            ('result_ag_turnout', 'ag-bet'),
            ('result_ag_votes_valid', 'ag-gultig'),
            ('result_ag_yeas', 'ag-ja'),
            ('result_ag_nays', 'ag-nein'),
            ('result_ag_yeas_p', 'ag-japroz'),
            ('_result_ag_accepted', 'ag-annahme'),
            ('result_tg_eligible_voters', 'tg-berecht'),
            ('result_tg_votes_total', 'tg-stimmen'),
            ('result_tg_turnout', 'tg-bet'),
            ('result_tg_votes_valid', 'tg-gultig'),
            ('result_tg_yeas', 'tg-ja'),
            ('result_tg_nays', 'tg-nein'),
            ('result_tg_yeas_p', 'tg-japroz'),
            ('_result_tg_accepted', 'tg-annahme'),
            ('result_ti_eligible_voters', 'ti-berecht'),
            ('result_ti_votes_total', 'ti-stimmen'),
            ('result_ti_turnout', 'ti-bet'),
            ('result_ti_votes_valid', 'ti-gultig'),
            ('result_ti_yeas', 'ti-ja'),
            ('result_ti_nays', 'ti-nein'),
            ('result_ti_yeas_p', 'ti-japroz'),
            ('_result_ti_accepted', 'ti-annahme'),
            ('result_vd_eligible_voters', 'vd-berecht'),
            ('result_vd_votes_total', 'vd-stimmen'),
            ('result_vd_turnout', 'vd-bet'),
            ('result_vd_votes_valid', 'vd-gultig'),
            ('result_vd_yeas', 'vd-ja'),
            ('result_vd_nays', 'vd-nein'),
            ('result_vd_yeas_p', 'vd-japroz'),
            ('_result_vd_accepted', 'vd-annahme'),
            ('result_vs_eligible_voters', 'vs-berecht'),
            ('result_vs_votes_total', 'vs-stimmen'),
            ('result_vs_turnout', 'vs-bet'),
            ('result_vs_votes_valid', 'vs-gultig'),
            ('result_vs_yeas', 'vs-ja'),
            ('result_vs_nays', 'vs-nein'),
            ('result_vs_yeas_p', 'vs-japroz'),
            ('_result_vs_accepted', 'vs-annahme'),
            ('result_ne_eligible_voters', 'ne-berecht'),
            ('result_ne_votes_total', 'ne-stimmen'),
            ('result_ne_turnout', 'ne-bet'),
            ('result_ne_votes_valid', 'ne-gultig'),
            ('result_ne_yeas', 'ne-ja'),
            ('result_ne_nays', 'ne-nein'),
            ('result_ne_yeas_p', 'ne-japroz'),
            ('_result_ne_accepted', 'ne-annahme'),
            ('result_ge_eligible_voters', 'ge-berecht'),
            ('result_ge_votes_total', 'ge-stimmen'),
            ('result_ge_turnout', 'ge-bet'),
            ('result_ge_votes_valid', 'ge-gultig'),
            ('result_ge_yeas', 'ge-ja'),
            ('result_ge_nays', 'ge-nein'),
            ('result_ge_yeas_p', 'ge-japroz'),
            ('_result_ge_accepted', 'ge-annahme'),
            ('result_ju_eligible_voters', 'ju-berecht'),
            ('result_ju_votes_total', 'ju-stimmen'),
            ('result_ju_turnout', 'ju-bet'),
            ('result_ju_votes_valid', 'ju-gultig'),
            ('result_ju_yeas', 'ju-ja'),
            ('result_ju_nays', 'ju-nein'),
            ('result_ju_yeas_p', 'ju-japroz'),
            ('_result_ju_accepted', 'ju-annahme'),
            ('_department_in_charge', 'dep'),
            ('procedure_number', 'gesch_nr'),
            ('_position_federal_council', 'br-pos'),
            ('_position_parliament', 'bv-pos'),
            ('_position_national_council', 'nr-pos'),
            ('position_national_council_yeas', 'nrja'),
            ('position_national_council_nays', 'nrnein'),
            ('_position_council_of_states', 'sr-pos'),
            ('position_council_of_states_yeas', 'srja'),
            ('position_council_of_states_nays', 'srnein'),
            ('duration_federal_assembly', 'dauer_bv'),
            ('duration_post_federal_assembly', 'dauer_abst'),
            ('duration_initative_collection', 'i-dauer_samm'),
            ('duration_initative_federal_council', 'i-dauer_br'),
            ('duration_initative_total', 'i-dauer_tot'),
            ('duration_referendum_collection', 'fr-dauer_samm'),
            ('duration_referendum_total', 'fr-dauer_tot'),
            ('signatures_valid', 'unter_g'),
            ('signatures_invalid', 'unter_u'),
            ('!recommendations!fdp', 'p-fdp'),
            ('!recommendations!cvp', 'p-cvp'),
            ('!recommendations!sps', 'p-sps'),
            ('!recommendations!svp', 'p-svp'),
            ('!recommendations!evp', 'p-evp'),
            ('!recommendations!csp', 'p-ucsp'),
            ('!recommendations!pda', 'p-pda'),
            ('!recommendations!gps', 'p-gps'),
            ('!recommendations!sd', 'p-sd'),
            ('!recommendations!edu', 'p-edu'),
            ('!recommendations!fps', 'p-fps'),
            ('!recommendations!lega', 'p-lega'),
            ('!recommendations!kvp', 'p-kvp'),
            ('!recommendations!glp', 'p-glp'),
            ('!recommendations!bdp', 'p-bdp'),
            ('!recommendations!mcg', 'p-mcg'),
            ('!recommendations!lps', 'p-lps'),
            ('!recommendations!ldu', 'p-ldu'),
            ('!recommendations!poch', 'p-poch'),
            ('!recommendations!rep', 'p-rep'),
            ('!recommendations!sav', 'p-sav'),
            ('!recommendations!eco', 'p-eco'),
            ('!recommendations!sgv', 'p-sgv'),
            ('!recommendations!sbv-usp', 'p-sbv'),
            ('!recommendations!sgb', 'p-sgb'),
            ('!recommendations!travs', 'p-travs'),
            ('!recommendations!vsa', 'p-vsa'),
            ('!recommendations!vpod', 'p-vpod'),
            ('!recommendations!voev', 'p-voev'),
            ('!recommendations!tcs', 'p-tcs'),
            ('!recommendations!vcs', 'p-vcs'),
            ('!recommendations!acs', 'p-acs'),
            ('!recommendations!sbk', 'p-sbk'),
            ('!recommendations!ssv', 'p-ssv'),
            ('!recommendations!gem', 'p-gem'),
            ('!recommendations!kdk', 'p-kdk'),
            ('!recommendations!kkjpd', 'p-kkjpd'),
            ('!recommendations!gdk', 'p-gdk'),
            ('!recommendations!ldk', 'p-ldk'),
            ('!recommendations!vdk', 'p-vdk'),
            ('!recommendations!sodk', 'p-sodk'),
            ('!recommendations!endk', 'p-endk'),
            ('!recommendations!fdk', 'p-fdk'),
            ('!recommendations!edk', 'p-edk'),
            ('!recommendations!bpuk', 'p-bpuk'),
            ('recommendations_other_yes', 'p-others_yes'),
            ('recommendations_other_no', 'p-others_no'),
            ('recommendations_other_free', 'p-others_free'),
            ('!recommendations_divergent!bdp_ag', 'pdev-bdp_AG'),
            ('!recommendations_divergent!bdp_ai', 'pdev-bdp_AI'),
            ('!recommendations_divergent!bdp_ar', 'pdev-bdp_AR'),
            ('!recommendations_divergent!bdp_be', 'pdev-bdp_BE'),
            ('!recommendations_divergent!bdp_bl', 'pdev-bdp_BL'),
            ('!recommendations_divergent!bdp_bs', 'pdev-bdp_BS'),
            ('!recommendations_divergent!bdp_fr', 'pdev-bdp_FR'),
            ('!recommendations_divergent!bdp_ge', 'pdev-bdp_GE'),
            ('!recommendations_divergent!bdp_gl', 'pdev-bdp_GL'),
            ('!recommendations_divergent!bdp_gr', 'pdev-bdp_GR'),
            ('!recommendations_divergent!bdp_ju', 'pdev-bdp_JU'),
            ('!recommendations_divergent!bdp_lu', 'pdev-bdp_LU'),
            ('!recommendations_divergent!bdp_ne', 'pdev-bdp_NE'),
            ('!recommendations_divergent!bdp_nw', 'pdev-bdp_NW'),
            ('!recommendations_divergent!bdp_ow', 'pdev-bdp_OW'),
            ('!recommendations_divergent!bdp_sg', 'pdev-bdp_SG'),
            ('!recommendations_divergent!bdp_sh', 'pdev-bdp_SH'),
            ('!recommendations_divergent!bdp_so', 'pdev-bdp_SO'),
            ('!recommendations_divergent!bdp_sz', 'pdev-bdp_SZ'),
            ('!recommendations_divergent!bdp_tg', 'pdev-bdp_TG'),
            ('!recommendations_divergent!bdp_ti', 'pdev-bdp_TI'),
            ('!recommendations_divergent!bdp_ur', 'pdev-bdp_UR'),
            ('!recommendations_divergent!bdp_vd', 'pdev-bdp_VD'),
            ('!recommendations_divergent!bdp_vs', 'pdev-bdp_VS'),
            ('!recommendations_divergent!bdp_vsr', 'pdev-bdp_VSr'),
            ('!recommendations_divergent!bdp_vso', 'pdev-bdp_VSo'),
            ('!recommendations_divergent!bdp_zg', 'pdev-bdp_ZG'),
            ('!recommendations_divergent!bdp_zh', 'pdev-bdp_ZH'),
            ('!recommendations_divergent!jbdp_ch', 'pdev-jbdp_CH'),
            ('!recommendations_divergent!csp_fr', 'pdev-csp_FR'),
            ('!recommendations_divergent!csp_gr', 'pdev-csp_GR'),
            ('!recommendations_divergent!csp_ju', 'pdev-csp_JU'),
            ('!recommendations_divergent!csp_lu', 'pdev-csp_LU'),
            ('!recommendations_divergent!csp_ow', 'pdev-csp_OW'),
            ('!recommendations_divergent!csp_sg', 'pdev-csp_SG'),
            ('!recommendations_divergent!csp_vs', 'pdev-csp_VS'),
            ('!recommendations_divergent!csp_vsr', 'pdev-csp_VSr'),
            ('!recommendations_divergent!csp_vso', 'pdev-csp_VSo'),
            ('!recommendations_divergent!csp_zh', 'pdev-csp_ZH'),
            ('!recommendations_divergent!cvp-fr_ch', 'pdev-cvp_frauen'),
            ('!recommendations_divergent!cvp_ag', 'pdev-cvp_AG'),
            ('!recommendations_divergent!cvp_ai', 'pdev-cvp_AI'),
            ('!recommendations_divergent!cvp_ar', 'pdev-cvp_AR'),
            ('!recommendations_divergent!cvp_be', 'pdev-cvp_BE'),
            ('!recommendations_divergent!cvp_bl', 'pdev-cvp_BL'),
            ('!recommendations_divergent!cvp_bs', 'pdev-cvp_BS'),
            ('!recommendations_divergent!cvp_fr', 'pdev-cvp_FR'),
            ('!recommendations_divergent!cvp_ge', 'pdev-cvp_GE'),
            ('!recommendations_divergent!cvp_gl', 'pdev-cvp_GL'),
            ('!recommendations_divergent!cvp_gr', 'pdev-cvp_GR'),
            ('!recommendations_divergent!cvp_ju', 'pdev-cvp_JU'),
            ('!recommendations_divergent!cvp_lu', 'pdev-cvp_LU'),
            ('!recommendations_divergent!cvp_ne', 'pdev-cvp_NE'),
            ('!recommendations_divergent!cvp_nw', 'pdev-cvp_NW'),
            ('!recommendations_divergent!cvp_ow', 'pdev-cvp_OW'),
            ('!recommendations_divergent!cvp_sg', 'pdev-cvp_SG'),
            ('!recommendations_divergent!cvp_sh', 'pdev-cvp_SH'),
            ('!recommendations_divergent!cvp_so', 'pdev-cvp_SO'),
            ('!recommendations_divergent!cvp_sz', 'pdev-cvp_SZ'),
            ('!recommendations_divergent!cvp_tg', 'pdev-cvp_TG'),
            ('!recommendations_divergent!cvp_ti', 'pdev-cvp_TI'),
            ('!recommendations_divergent!cvp_ur', 'pdev-cvp_UR'),
            ('!recommendations_divergent!cvp_vd', 'pdev-cvp_VD'),
            ('!recommendations_divergent!cvp_vs', 'pdev-cvp_VS'),
            ('!recommendations_divergent!cvp_vsr', 'pdev-cvp_VSr'),
            ('!recommendations_divergent!cvp_vso', 'pdev-cvp_VSo'),
            ('!recommendations_divergent!cvp_zg', 'pdev-cvp_ZG'),
            ('!recommendations_divergent!cvp_zh', 'pdev-cvp_ZH'),
            ('!recommendations_divergent!jcvp_ch', 'pdev-jcvp_CH'),
            ('!recommendations_divergent!jcvp_ag', 'pdev-jcvp_AG'),
            ('!recommendations_divergent!jcvp_be', 'pdev-jcvp_BE'),
            ('!recommendations_divergent!jcvp_gr', 'pdev-jcvp_GR'),
            ('!recommendations_divergent!jcvp_lu', 'pdev-jcvp_LU'),
            ('!recommendations_divergent!jcvp_so', 'pdev-jcvp_SO'),
            ('!recommendations_divergent!jcvp_zh', 'pdev-jcvp_ZH'),
            ('!recommendations_divergent!edu_ag', 'pdev-edu_AG'),
            ('!recommendations_divergent!edu_ai', 'pdev-edu_AI'),
            ('!recommendations_divergent!edu_ar', 'pdev-edu_AR'),
            ('!recommendations_divergent!edu_be', 'pdev-edu_BE'),
            ('!recommendations_divergent!edu_bl', 'pdev-edu_BL'),
            ('!recommendations_divergent!edu_bs', 'pdev-edu_BS'),
            ('!recommendations_divergent!edu_fr', 'pdev-edu_FR'),
            ('!recommendations_divergent!edu_ge', 'pdev-edu_GE'),
            ('!recommendations_divergent!edu_gl', 'pdev-edu_GL'),
            ('!recommendations_divergent!edu_gr', 'pdev-edu_GR'),
            ('!recommendations_divergent!edu_ju', 'pdev-edu_JU'),
            ('!recommendations_divergent!edu_lu', 'pdev-edu_LU'),
            ('!recommendations_divergent!edu_ne', 'pdev-edu_NE'),
            ('!recommendations_divergent!edu_nw', 'pdev-edu_NW'),
            ('!recommendations_divergent!edu_ow', 'pdev-edu_OW'),
            ('!recommendations_divergent!edu_sg', 'pdev-edu_SG'),
            ('!recommendations_divergent!edu_sh', 'pdev-edu_SH'),
            ('!recommendations_divergent!edu_so', 'pdev-edu_SO'),
            ('!recommendations_divergent!edu_sz', 'pdev-edu_SZ'),
            ('!recommendations_divergent!edu_tg', 'pdev-edu_TG'),
            ('!recommendations_divergent!edu_ti', 'pdev-edu_TI'),
            ('!recommendations_divergent!edu_ur', 'pdev-edu_UR'),
            ('!recommendations_divergent!edu_vd', 'pdev-edu_VD'),
            ('!recommendations_divergent!edu_vs', 'pdev-edu_VS'),
            ('!recommendations_divergent!edu_vsr', 'pdev-edu_VSr'),
            ('!recommendations_divergent!edu_vso', 'pdev-edu_VSo'),
            ('!recommendations_divergent!edu_zg', 'pdev-edu_ZG'),
            ('!recommendations_divergent!edu_zh', 'pdev-edu_ZH'),
            ('!recommendations_divergent!evp_ag', 'pdev-evp_AG'),
            ('!recommendations_divergent!evp_ai', 'pdev-evp_AI'),
            ('!recommendations_divergent!evp_ar', 'pdev-evp_AR'),
            ('!recommendations_divergent!evp_be', 'pdev-evp_BE'),
            ('!recommendations_divergent!evp_bl', 'pdev-evp_BL'),
            ('!recommendations_divergent!evp_bs', 'pdev-evp_BS'),
            ('!recommendations_divergent!evp_fr', 'pdev-evp_FR'),
            ('!recommendations_divergent!evp_ge', 'pdev-evp_GE'),
            ('!recommendations_divergent!evp_gl', 'pdev-evp_GL'),
            ('!recommendations_divergent!evp_gr', 'pdev-evp_GR'),
            ('!recommendations_divergent!evp_ju', 'pdev-evp_JU'),
            ('!recommendations_divergent!evp_lu', 'pdev-evp_LU'),
            ('!recommendations_divergent!evp_ne', 'pdev-evp_NE'),
            ('!recommendations_divergent!evp_nw', 'pdev-evp_NW'),
            ('!recommendations_divergent!evp_ow', 'pdev-evp_OW'),
            ('!recommendations_divergent!evp_sg', 'pdev-evp_SG'),
            ('!recommendations_divergent!evp_sh', 'pdev-evp_SH'),
            ('!recommendations_divergent!evp_so', 'pdev-evp_SO'),
            ('!recommendations_divergent!evp_sz', 'pdev-evp_SZ'),
            ('!recommendations_divergent!evp_tg', 'pdev-evp_TG'),
            ('!recommendations_divergent!evp_ti', 'pdev-evp_TI'),
            ('!recommendations_divergent!evp_ur', 'pdev-evp_UR'),
            ('!recommendations_divergent!evp_vd', 'pdev-evp_VD'),
            ('!recommendations_divergent!evp_vs', 'pdev-evp_VS'),
            ('!recommendations_divergent!evp_zg', 'pdev-evp_ZG'),
            ('!recommendations_divergent!evp_zh', 'pdev-evp_ZH'),
            ('!recommendations_divergent!jevp_ch', 'pdev-jevp_CH'),
            ('!recommendations_divergent!fdp-fr_ch', 'pdev-fdp_Frauen'),
            ('!recommendations_divergent!fdp_ag', 'pdev-fdp_AG'),
            ('!recommendations_divergent!fdp_ai', 'pdev-fdp_AI'),
            ('!recommendations_divergent!fdp_ar', 'pdev-fdp_AR'),
            ('!recommendations_divergent!fdp_be', 'pdev-fdp_BE'),
            ('!recommendations_divergent!fdp_bl', 'pdev-fdp_BL'),
            ('!recommendations_divergent!fdp_bs', 'pdev-fdp_BS'),
            ('!recommendations_divergent!fdp_fr', 'pdev-fdp_FR'),
            ('!recommendations_divergent!fdp_ge', 'pdev-fdp_GE'),
            ('!recommendations_divergent!fdp_gl', 'pdev-fdp_GL'),
            ('!recommendations_divergent!fdp_gr', 'pdev-fdp_GR'),
            ('!recommendations_divergent!fdp_ju', 'pdev-fdp_JU'),
            ('!recommendations_divergent!fdp_lu', 'pdev-fdp_LU'),
            ('!recommendations_divergent!fdp_ne', 'pdev-fdp_NE'),
            ('!recommendations_divergent!fdp_nw', 'pdev-fdp_NW'),
            ('!recommendations_divergent!fdp_ow', 'pdev-fdp_OW'),
            ('!recommendations_divergent!fdp_sg', 'pdev-fdp_SG'),
            ('!recommendations_divergent!fdp_sh', 'pdev-fdp_SH'),
            ('!recommendations_divergent!fdp_so', 'pdev-fdp_SO'),
            ('!recommendations_divergent!fdp_sz', 'pdev-fdp_SZ'),
            ('!recommendations_divergent!fdp_tg', 'pdev-fdp_TG'),
            ('!recommendations_divergent!fdp_ti', 'pdev-fdp_TI'),
            ('!recommendations_divergent!fdp_ur', 'pdev-fdp_UR'),
            ('!recommendations_divergent!fdp_vd', 'pdev-fdp_VD'),
            ('!recommendations_divergent!fdp_vs', 'pdev-fdp_VS'),
            ('!recommendations_divergent!fdp_vsr', 'pdev-fdp_VSr'),
            ('!recommendations_divergent!fdp_vso', 'pdev-fdp_Vso'),
            ('!recommendations_divergent!fdp_zg', 'pdev-fdp_ZG'),
            ('!recommendations_divergent!fdp_zh', 'pdev-fdp_ZH'),
            ('!recommendations_divergent!jfdp_ch', 'pdev-jfdp_CH'),
            ('!recommendations_divergent!jfdp_ag', 'pdev-jfdp_AG'),
            ('!recommendations_divergent!jfdp_bl', 'pdev-jfdp_BL'),
            ('!recommendations_divergent!jfdp_fr', 'pdev-jfdp_FR'),
            ('!recommendations_divergent!jfdp_gr', 'pdev-jfdp_GR'),
            ('!recommendations_divergent!jfdp_ju', 'pdev-jfdp_JU'),
            ('!recommendations_divergent!jfdp_lu', 'pdev-jfdp_LU'),
            ('!recommendations_divergent!jfdp_sh', 'pdev-jfdp_SH'),
            ('!recommendations_divergent!jfdp_ti', 'pdev-jfdp_TI'),
            ('!recommendations_divergent!jfdp_vd', 'pdev-jfdp_VD'),
            ('!recommendations_divergent!jfdp_zh', 'pdev-jfdp_ZH'),
            ('!recommendations_divergent!fps_ag', 'pdev-fps_AG'),
            ('!recommendations_divergent!fps_ai', 'pdev-fps_AI'),
            ('!recommendations_divergent!fps_be', 'pdev-fps_BE'),
            ('!recommendations_divergent!fps_bl', 'pdev-fps_BL'),
            ('!recommendations_divergent!fps_bs', 'pdev-fps_BS'),
            ('!recommendations_divergent!fps_sg', 'pdev-fps_SG'),
            ('!recommendations_divergent!fps_sh', 'pdev-fps_SH'),
            ('!recommendations_divergent!fps_so', 'pdev-fps_SO'),
            ('!recommendations_divergent!fps_tg', 'pdev-fps_TG'),
            ('!recommendations_divergent!fps_zh', 'pdev-fps_ZH'),
            ('!recommendations_divergent!glp_ag', 'pdev-glp_AG'),
            ('!recommendations_divergent!glp_ai', 'pdev-glp_AI'),
            ('!recommendations_divergent!glp_ar', 'pdev-glp_AR'),
            ('!recommendations_divergent!glp_be', 'pdev-glp_BE'),
            ('!recommendations_divergent!glp_bl', 'pdev-glp_BL'),
            ('!recommendations_divergent!glp_bs', 'pdev-glp_BS'),
            ('!recommendations_divergent!glp_fr', 'pdev-glp_FR'),
            ('!recommendations_divergent!glp_ge', 'pdev-glp_GE'),
            ('!recommendations_divergent!glp_gl', 'pdev-glp_GL'),
            ('!recommendations_divergent!glp_gr', 'pdev-glp_GR'),
            ('!recommendations_divergent!glp_ju', 'pdev-glp_JU'),
            ('!recommendations_divergent!glp_lu', 'pdev-glp_LU'),
            ('!recommendations_divergent!glp_ne', 'pdev-glp_NE'),
            ('!recommendations_divergent!glp_nw', 'pdev-glp_NW'),
            ('!recommendations_divergent!glp_ow', 'pdev-glp_OW'),
            ('!recommendations_divergent!glp_sg', 'pdev-glp_SG'),
            ('!recommendations_divergent!glp_sh', 'pdev-glp_SH'),
            ('!recommendations_divergent!glp_so', 'pdev-glp_SO'),
            ('!recommendations_divergent!glp_sz', 'pdev-glp_SZ'),
            ('!recommendations_divergent!glp_tg', 'pdev-glp_TG'),
            ('!recommendations_divergent!glp_ti', 'pdev-glp_TI'),
            ('!recommendations_divergent!glp_ur', 'pdev-glp_UR'),
            ('!recommendations_divergent!glp_vd', 'pdev-glp_VD'),
            ('!recommendations_divergent!glp_vs', 'pdev-glp_VS'),
            ('!recommendations_divergent!glp_vsr', 'pdev-glp_VSr'),
            ('!recommendations_divergent!glp_vso', 'pdev-glp_VSo'),
            ('!recommendations_divergent!glp_zg', 'pdev-glp_ZG'),
            ('!recommendations_divergent!glp_zh', 'pdev-glp_ZH'),
            ('!recommendations_divergent!jglp_ch', 'pdev-jglp_CH'),
            ('!recommendations_divergent!gps_ag', 'pdev-gps_AG'),
            ('!recommendations_divergent!gps_ai', 'pdev-gps_AI'),
            ('!recommendations_divergent!gps_ar', 'pdev-gps_AR'),
            ('!recommendations_divergent!gps_be', 'pdev-gps_BE'),
            ('!recommendations_divergent!gps_bl', 'pdev-gps_BL'),
            ('!recommendations_divergent!gps_bs', 'pdev-gps_BS'),
            ('!recommendations_divergent!gps_fr', 'pdev-gps_FR'),
            ('!recommendations_divergent!gps_ge', 'pdev-gps_GE'),
            ('!recommendations_divergent!gps_gl', 'pdev-gps_GL'),
            ('!recommendations_divergent!gps_gr', 'pdev-gps_GR'),
            ('!recommendations_divergent!gps_ju', 'pdev-gps_JU'),
            ('!recommendations_divergent!gps_lu', 'pdev-gps_LU'),
            ('!recommendations_divergent!gps_ne', 'pdev-gps_NE'),
            ('!recommendations_divergent!gps_nw', 'pdev-gps_NW'),
            ('!recommendations_divergent!gps_ow', 'pdev-gps_OW'),
            ('!recommendations_divergent!gps_sg', 'pdev-gps_SG'),
            ('!recommendations_divergent!gps_sh', 'pdev-gps_SH'),
            ('!recommendations_divergent!gps_so', 'pdev-gps_SO'),
            ('!recommendations_divergent!gps_sz', 'pdev-gps_SZ'),
            ('!recommendations_divergent!gps_tg', 'pdev-gps_TG'),
            ('!recommendations_divergent!gps_ti', 'pdev-gps_TI'),
            ('!recommendations_divergent!gps_ur', 'pdev-gps_UR'),
            ('!recommendations_divergent!gps_vd', 'pdev-gps_VD'),
            ('!recommendations_divergent!gps_vs', 'pdev-gps_VS'),
            ('!recommendations_divergent!gps_vsr', 'pdev-gps_VSr'),
            ('!recommendations_divergent!gps_vso', 'pdev-gps_VSo'),
            ('!recommendations_divergent!gps_zg', 'pdev-gps_ZG'),
            ('!recommendations_divergent!gps_zh', 'pdev-gps_ZH'),
            ('!recommendations_divergent!jgps_ch', 'pdev-jgps_CH'),
            ('!recommendations_divergent!kvp_sg', 'pdev-kvp_SG'),
            ('!recommendations_divergent!lps_be', 'pdev-lps_BE'),
            ('!recommendations_divergent!lps_bl', 'pdev-lps_BL'),
            ('!recommendations_divergent!lps_bs', 'pdev-lps_BS'),
            ('!recommendations_divergent!lps_fr', 'pdev-lps_FR'),
            ('!recommendations_divergent!lps_ge', 'pdev-lps_GE'),
            ('!recommendations_divergent!lps_ju', 'pdev-lps_JU'),
            ('!recommendations_divergent!lps_ne', 'pdev-lps_NE'),
            ('!recommendations_divergent!lps_sg', 'pdev-lps_SG'),
            ('!recommendations_divergent!lps_ti', 'pdev-lps_TI'),
            ('!recommendations_divergent!lps_vd', 'pdev-lps_VD'),
            ('!recommendations_divergent!lps_vs', 'pdev-lps_VS'),
            ('!recommendations_divergent!lps_zh', 'pdev-lps_ZH'),
            ('!recommendations_divergent!jlps_ch', 'pdev-jlps_CH'),
            ('!recommendations_divergent!jlps_so', 'pdev-jlps_SO'),
            ('!recommendations_divergent!jlps_ti', 'pdev-jlps_TI'),
            ('!recommendations_divergent!ldu_ag', 'pdev-ldu_AG'),
            ('!recommendations_divergent!ldu_ar', 'pdev-ldu_AR'),
            ('!recommendations_divergent!ldu_be', 'pdev-ldu_BE'),
            ('!recommendations_divergent!ldu_bl', 'pdev-ldu_BL'),
            ('!recommendations_divergent!ldu_bs', 'pdev-ldu_BS'),
            ('!recommendations_divergent!ldu_gr', 'pdev-ldu_GR'),
            ('!recommendations_divergent!ldu_lu', 'pdev-ldu_LU'),
            ('!recommendations_divergent!ldu_ne', 'pdev-ldu_NE'),
            ('!recommendations_divergent!ldu_sg', 'pdev-ldu_SG'),
            ('!recommendations_divergent!ldu_sh', 'pdev-ldu_SH'),
            ('!recommendations_divergent!ldu_so', 'pdev-ldu_SO'),
            ('!recommendations_divergent!ldu_tg', 'pdev-ldu_TG'),
            ('!recommendations_divergent!ldu_vd', 'pdev-ldu_VD'),
            ('!recommendations_divergent!ldu_zg', 'pdev-ldu_ZG'),
            ('!recommendations_divergent!ldu_zh', 'pdev-ldu_ZH'),
            ('!recommendations_divergent!jldu_ch', 'pdev-jldu_CH'),
            ('!recommendations_divergent!poch_so', 'pdev-poch_SO'),
            ('!recommendations_divergent!poch_zh', 'pdev-poch_ZH'),
            ('!recommendations_divergent!pda_be', 'pdev-pda_BE'),
            ('!recommendations_divergent!pda_bl', 'pdev-pda_BL'),
            ('!recommendations_divergent!pda_bs', 'pdev-pda_BS'),
            ('!recommendations_divergent!pda_ge', 'pdev-pda_GE'),
            ('!recommendations_divergent!pda_ju', 'pdev-pda_JU'),
            ('!recommendations_divergent!pda_ne', 'pdev-pda_NE'),
            ('!recommendations_divergent!pda_sg', 'pdev-pda_SG'),
            ('!recommendations_divergent!pda_ti', 'pdev-pda_TI'),
            ('!recommendations_divergent!pda_vd', 'pdev-pda_VD'),
            ('!recommendations_divergent!pda_zh', 'pdev-pda_ZH'),
            ('!recommendations_divergent!jpda_ch', 'pdev-jpda_CH'),
            ('!recommendations_divergent!rep_ag', 'pdev-rep_AG'),
            ('!recommendations_divergent!rep_ge', 'pdev-rep_GE'),
            ('!recommendations_divergent!rep_ne', 'pdev-rep_NE'),
            ('!recommendations_divergent!rep_tg', 'pdev-rep_TG'),
            ('!recommendations_divergent!rep_vd', 'pdev-rep_VD'),
            ('!recommendations_divergent!rep_zh', 'pdev-rep_ZH'),
            ('!recommendations_divergent!sd_ag', 'pdev-sd_AG'),
            ('!recommendations_divergent!sd_be', 'pdev-sd_BE'),
            ('!recommendations_divergent!sd_bl', 'pdev-sd_BL'),
            ('!recommendations_divergent!sd_bs', 'pdev-sd_BS'),
            ('!recommendations_divergent!sd_fr', 'pdev-sd_FR'),
            ('!recommendations_divergent!sd_ge', 'pdev-sd_GE'),
            ('!recommendations_divergent!sd_gr', 'pdev-sd_GR'),
            ('!recommendations_divergent!sd_lu', 'pdev-sd_LU'),
            ('!recommendations_divergent!sd_ne', 'pdev-sd_NE'),
            ('!recommendations_divergent!sd_sg', 'pdev-sd_SG'),
            ('!recommendations_divergent!sd_so', 'pdev-sd_SO'),
            ('!recommendations_divergent!sd_tg', 'pdev-sd_TG'),
            ('!recommendations_divergent!sd_ti', 'pdev-sd_TI'),
            ('!recommendations_divergent!sd_vd', 'pdev-sd_VD'),
            ('!recommendations_divergent!sd_zh', 'pdev-sd_ZH'),
            ('!recommendations_divergent!jsd_ch', 'pdev-jsd_CH'),
            ('!recommendations_divergent!sps_ag', 'pdev-sps_AG'),
            ('!recommendations_divergent!sps_ai', 'pdev-sps_AI'),
            ('!recommendations_divergent!sps_ar', 'pdev-sps_AR'),
            ('!recommendations_divergent!sps_be', 'pdev-sps_BE'),
            ('!recommendations_divergent!sps_bl', 'pdev-sps_BL'),
            ('!recommendations_divergent!sps_bs', 'pdev-sps_BS'),
            ('!recommendations_divergent!sps_fr', 'pdev-sps_FR'),
            ('!recommendations_divergent!sps_ge', 'pdev-sps_GE'),
            ('!recommendations_divergent!sps_gl', 'pdev-sps_GL'),
            ('!recommendations_divergent!sps_gr', 'pdev-sps_GR'),
            ('!recommendations_divergent!sps_ju', 'pdev-sps_JU'),
            ('!recommendations_divergent!sps_lu', 'pdev-sps_LU'),
            ('!recommendations_divergent!sps_ne', 'pdev-sps_NE'),
            ('!recommendations_divergent!sps_nw', 'pdev-sps_NW'),
            ('!recommendations_divergent!sps_ow', 'pdev-sps_OW'),
            ('!recommendations_divergent!sps_sg', 'pdev-sps_SG'),
            ('!recommendations_divergent!sps_sh', 'pdev-sps_SH'),
            ('!recommendations_divergent!sps_so', 'pdev-sps_SO'),
            ('!recommendations_divergent!sps_sz', 'pdev-sps_SZ'),
            ('!recommendations_divergent!sps_tg', 'pdev-sps_TG'),
            ('!recommendations_divergent!sps_ti', 'pdev-sps_TI'),
            ('!recommendations_divergent!sps_ur', 'pdev-sps_UR'),
            ('!recommendations_divergent!sps_vd', 'pdev-sps_VD'),
            ('!recommendations_divergent!sps_vs', 'pdev-sps_VS'),
            ('!recommendations_divergent!sps_vsr', 'pdev-sps_VSr'),
            ('!recommendations_divergent!sps_vso', 'pdev-sps_VSo'),
            ('!recommendations_divergent!sps_zg', 'pdev-sps_ZG'),
            ('!recommendations_divergent!sps_zh', 'pdev-sps_ZH'),
            ('!recommendations_divergent!juso_ch', 'pdev-juso_CH'),
            ('!recommendations_divergent!juso_be', 'pdev-juso_BE'),
            ('!recommendations_divergent!juso_ge', 'pdev-juso_GE'),
            ('!recommendations_divergent!juso_ju', 'pdev-juso_JU'),
            ('!recommendations_divergent!juso_ti', 'pdev-juso_TI'),
            ('!recommendations_divergent!juso_vs', 'pdev-juso_VS'),
            ('!recommendations_divergent!juso_zh', 'pdev-juso_ZH'),
            ('!recommendations_divergent!svp_ag', 'pdev-svp_AG'),
            ('!recommendations_divergent!svp_ai', 'pdev-svp_AI'),
            ('!recommendations_divergent!svp_ar', 'pdev-svp_AR'),
            ('!recommendations_divergent!svp_be', 'pdev-svp_BE'),
            ('!recommendations_divergent!svp_bl', 'pdev-svp_BL'),
            ('!recommendations_divergent!svp_bs', 'pdev-svp_BS'),
            ('!recommendations_divergent!svp_fr', 'pdev-svp_FR'),
            ('!recommendations_divergent!svp_ge', 'pdev-svp_GE'),
            ('!recommendations_divergent!svp_gl', 'pdev-svp_GL'),
            ('!recommendations_divergent!svp_gr', 'pdev-svp_GR'),
            ('!recommendations_divergent!svp_ju', 'pdev-svp_JU'),
            ('!recommendations_divergent!svp_lu', 'pdev-svp_LU'),
            ('!recommendations_divergent!svp_ne', 'pdev-svp_NE'),
            ('!recommendations_divergent!svp_nw', 'pdev-svp_NW'),
            ('!recommendations_divergent!svp_ow', 'pdev-svp_OW'),
            ('!recommendations_divergent!svp_sg', 'pdev-svp_SG'),
            ('!recommendations_divergent!svp_sh', 'pdev-svp_SH'),
            ('!recommendations_divergent!svp_so', 'pdev-svp_SO'),
            ('!recommendations_divergent!svp_sz', 'pdev-svp_SZ'),
            ('!recommendations_divergent!svp_tg', 'pdev-svp_TG'),
            ('!recommendations_divergent!svp_ti', 'pdev-svp_TI'),
            ('!recommendations_divergent!svp_ur', 'pdev-svp_UR'),
            ('!recommendations_divergent!svp_vd', 'pdev-svp_VD'),
            ('!recommendations_divergent!svp_vs', 'pdev-svp_VS'),
            ('!recommendations_divergent!svp_vsr', 'pdev-svp_VSr'),
            ('!recommendations_divergent!svp_vso', 'pdev-svp_VSo'),
            ('!recommendations_divergent!svp_zg', 'pdev-svp_ZG'),
            ('!recommendations_divergent!svp_zh', 'pdev-svp_ZH'),
            ('!recommendations_divergent!jsvp_ch', 'pdev-jsvp_CH'),
            ('!recommendations_divergent!jsvp_ag', 'pdev-jsvp_AG'),
            ('!recommendations_divergent!jsvp_be', 'pdev-jsvp_BE'),
            ('!recommendations_divergent!jsvp_ge', 'pdev-jsvp_GE'),
            ('!recommendations_divergent!jsvp_sh', 'pdev-jsvp_SH'),
            ('!recommendations_divergent!jsvp_ur', 'pdev-jsvp_UR'),
            ('!recommendations_divergent!jsvp_zh', 'pdev-jsvp_ZH'),
            ('!recommendations_divergent!sgb_ag', 'pdev-sgb_AG'),
            ('!recommendations_divergent!sgb_ju', 'pdev-sgb_JU'),
            ('!recommendations_divergent!sgb_vs', 'pdev-sgb_VS'),
            ('!recommendations_divergent!sgv_ag', 'pdev-sgv_AG'),
            ('!recommendations_divergent!sgv_bs', 'pdev-sgv_BS'),
            ('!recommendations_divergent!sgv_sh', 'pdev-sgv_SH'),
            ('!recommendations_divergent!vpod_ge', 'pdev-vpod_GE'),
            ('!recommendations_divergent!vpod_vd', 'pdev-vpod_VD'),
            ('national_council_election_year', 'nr-wahl'),
            ('national_council_share_fdp', 'w-fdp'),
            ('national_council_share_cvp', 'w-cvp'),
            ('national_council_share_sp', 'w-sp'),
            ('national_council_share_svp', 'w-svp'),
            ('national_council_share_lps', 'w-lps'),
            ('national_council_share_ldu', 'w-ldu'),
            ('national_council_share_evp', 'w-evp'),
            ('national_council_share_csp', 'w-csp'),
            ('national_council_share_pda', 'w-pda'),
            ('national_council_share_poch', 'w-poch'),
            ('national_council_share_gps', 'w-gps'),
            ('national_council_share_sd', 'w-sd'),
            ('national_council_share_rep', 'w-rep'),
            ('national_council_share_edu', 'w-edu'),
            ('national_council_share_fps', 'w-fps'),
            ('national_council_share_lega', 'w-lega'),
            ('national_council_share_kvp', 'w-kvp'),
            ('national_council_share_glp', 'w-glp'),
            ('national_council_share_bdp', 'w-bdp'),
            ('national_council_share_mcg', 'w-mcg'),
            ('national_council_share_ubrige', 'w-ubrige'),
            ('national_council_share_yeas', 'ja-lager'),
            ('national_council_share_nays', 'nein-lager'),
            ('national_council_share_neutral', 'neutral'),
            ('national_council_share_vague', 'unbestimmt'),
            ('initiator', 'urheber'),
            ('anneepolitique', 'anneepolitique'),
            ('bfs_map_de', 'bfsmap-de'),
            ('bfs_map_fr', 'bfsmap-fr'),
        ))

    def set_value(self, vote, attribute, value):
        """ Set the given value of a vote. """
        if attribute.startswith('!'):
            unused, attribute, key = attribute.split('!')
            if getattr(vote, attribute) is None:
                setattr(vote, attribute, {})
            getattr(vote, attribute)[key] = value
        else:
            setattr(vote, attribute, value)

    def get_value(self, vote, attribute):
        """ Get the given value of a vote. """
        if attribute.startswith('!'):
            unused, attribute, key = attribute.split('!')
            return (getattr(vote, attribute) or {}).get(key)
        return getattr(vote, attribute)

    def get_values(self, vote):
        """ Get all values of a vote in order. """
        for attribute in self.columns.keys():
            yield self.get_value(vote, attribute)

    def get_items(self, vote):
        """ Get all names and values of a vote in order. """
        for attribute in self.columns.keys():
            yield attribute, self.get_value(vote, attribute)

    def items(self):
        """ Returns the attributes and column names together with additional
        information (type, nullable, precision, scale).

        """
        for attribute, column in self.columns.items():
            if attribute.startswith('!'):
                type_ = 'INTEGER'
                nullable = True
                precision = None
                scale = None
            else:
                name = attribute.lstrip('_')
                table_column = SwissVote.__table__.columns[name]
                type_ = str(table_column.type)
                nullable = table_column.nullable
                precision = getattr(table_column.type, 'precision', None)
                scale = getattr(table_column.type, 'scale', None)
            yield attribute, column, type_, nullable, precision, scale
