Idea

On May 25, 2018, voters decided if they wanted to make changes to Ireland’s strict abortion laws, upheld in the Eighth Amendment of the Irish constitution. According to the final numbers, 66% of more than 2 million people who participated in the election voted in favor of ending the constitutional amendment.

In this visualization is pretty clear how each part of the country voted:

Technical implementation

In this small project I decided to use an alluvial diagram to show the final results about Ireland Referendum on the Thirty-sixth Amendment of the Constitution Bill 2018.

0. Data

The very first step is find the data. In http://www.referendum.ie/ are published the final results constituency (federal district) by constituency. An extract of the detailed results is:

Constituency Electorate Total Poll % Turnout Invalid

Ballot

Papers Valid Poll Votes in

Favour Votes

Against % in

Favour % Against Carlow-Kilkenny 112,704 69,860 61.99 231 69,629 44,211 25,418 63.50 36.50 Cavan-Monaghan 91,602 58,067 63.39 163 57,904 32,115 25,789 55.46 44.54 Clare 83,225 53,576 64.37 169 53,407 34,328 19,079 64.28 35.72 Cork East 85,643 54,639 63.80 148 54,491 34,941 19,550 64.12 35.88 Cork North-Central 84,412 52,713 62.45 166 52,547 33,639 18,908 64.02 35.98 Cork North-West 68,830 45,379 65.93 131 45,248 27,194 18,054 60.10 39.90 Cork South-Central 87,524 58,407 66.73 198 58,209 40,071 18,138 68.84 31.16 Cork South-West 60,356 40,648 67.35 114 40,534 26,147 14,387 64.51 35.49 Donegal 118,901 67,839 57.06 189 67,650 32,559 35,091 48.13 51.87

1. Type of visualization

The main idea is create an alluvial diagram using the ggalluvial package.

2. Formatting the data

We need to format the data in order to use an alluvial function. From the previous table we only maintain the columns:

constituency: to show by district the results.

value: to indicate the width of the row

results: yes o no, to categorize the information.

constituency porcentage response Carlow-Kilkenny 63.5 Yes Cavan-Monaghan 55.46 Yes Clare 64.28 Yes Cork East 64.12 Yes Cork North-Central 64.02 Yes Cork North-West 60.1 Yes Cork South-Central 68.84 Yes Cork South-West 64.51 Yes Donegal 48.13 Yes Dublin Bay North 74.69 Yes Dublin Bay South 78.49 Yes Dublin Central 76.51 Yes Dublin Fingal 76.96 Yes Dublin Mid-West 73.27 Yes Dublin North-West 73.08 Yes Dublin Rathdown 76.1 Yes Dublin South-Central 74.79 Yes Dublin South-West 74.91 Yes Dublin West 74.02 Yes Dun Laoghaire 77.06 Yes Galway East 60.19 Yes Galway West 65.95 Yes Kerry 58.27 Yes Kildare North 73.56 Yes Kildare South 70.66 Yes Laois 61.35 Yes Limerick City 66.87 Yes Limerick County 58.08 Yes Longford-Westmeath 58.27 Yes Louth 66.55 Yes Mayo 57.07 Yes Meath East 69.21 Yes Meath West 63.95 Yes Offaly 58.05 Yes Roscommon-Galway 57.21 Yes Sligo-Leitrim 59.38 Yes Tipperary 59.15 Yes Waterford 69.43 Yes Wexford 68.4 Yes Wicklow 74.26 Yes Carlow-Kilkenny 36.5 No Cavan-Monaghan 44.54 No Clare 35.72 No Cork East 35.88 No Cork North-Central 35.98 No Cork North-West 39.9 No Cork South-Central 31.16 No Cork South-West 35.49 No Donegal 51.87 No Dublin Bay North 25.31 No Dublin Bay South 21.51 No Dublin Central 23.49 No Dublin Fingal 23.04 No Dublin Mid-West 26.73 No Dublin North-West 26.92 No Dublin Rathdown 23.9 No Dublin South-Central 25.21 No Dublin South-West 25.09 No Dublin West 25.98 No Dun Laoghaire 22.94 No Galway East 39.81 No Galway West 34.05 No Kerry 41.73 No Kildare North 26.44 No Kildare South 29.34 No Laois 38.65 No Limerick City 33.13 No Limerick County 41.92 No Longford-Westmeath 41.73 No Louth 33.45 No Mayo 42.93 No Meath East 30.79 No Meath West 36.05 No Offaly 41.95 No Roscommon-Galway 42.79 No Sligo-Leitrim 40.62 No Tipperary 40.85 No Waterford 30.57 No Wexford 31.6 No Wicklow 25.74 No

3. Using ggalluvial package

The results of this package are simple and beautiful, and the code is very straigh forward.

ggplot(dataset, aes(weight = porcentage, axis1 =dataset$constituency, axis2 = response)) + geom_alluvium(aes(fill = response, color = response), width = 1/12, alpha = alpha, knot.pos = 0.3,reverse = FALSE)

All the code here.

4. References