diff --git a/voting_lib/political_compass.py b/voting_lib/political_compass.py index 7832978..11e794b 100644 --- a/voting_lib/political_compass.py +++ b/voting_lib/political_compass.py @@ -14,19 +14,15 @@ def get_compass_parties(year=2017, country='de'): else: raise Exception("Year " + str(year) + " does not exist for " + country) elif country == 'uk': - if year == 2017: - # TODO: add data - data = [] - index = [] + if year == 2019: + data = [[9.5, 7], [7, 8], [-3, -5], [-4.5, -1.5], [4, 2.5], [-0.5, -0.5], [-2, 1.5], [-0.5, -0.5]] + index = ['Conservative', 'Democratic Unionist Party', 'Green Party', 'Labour', 'Liberal Democrat', 'Plaid Cymru', 'Scottish National Party', 'Social Democratic & Labour Party'] + elif year == 2017: + data = [[8.5, 7.5], [5.5, 8], [-2.5, -4.5], [-4, -2], [3.5, 1], [-0.5, -1.5], [-1.5, 1.5]] + index = ['Conservative', 'Democratic Unionist Party', 'Green Party', 'Labour', 'Liberal Democrat', 'Plaid Cymru', 'Scottish National Party'] elif year == 2015: - # TODO: add data - data = [] - index = [] - elif year == 2011: - # TODO: add data - data = [] - index = [] - pass + data = [[9, 6.5], [5, 8.5], [-4, -5], [4, 5.5], [5, 2.5], [-2.5, -1], [-0.5, 1.5], [-2, 4], [-2.5, -0.5], [8, 8]] + index = ['Conservative', 'Democratic Unionist Party', 'Green Party', 'Labour', 'Liberal Democrat', 'Plaid Cymru', 'Scottish National Party', 'Sinn Féin', 'Social Democratic & Labour Party', 'UK Independence Party'] else: raise Exception("Year " + str(year) + " does not exist for " + country) else: