You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"source": "# Identifying Close Votes on Amendments\n\nIn this tutorial we will learn how to identify amendments that were adopted or rejected with a very close majority using the HowTheyVote.eu data set. Amendments that are either passed or rejected with a close margin are probable to have some amount of controversy about their contents. Identifying those can be a first step in finding interesting debates in Parliament.\n\nTo follow allong with the tutorial, you should already be familiar with data analysis in Python using `pandas`. You don’t need prior knowledge about the European Parliament.\n",
31
5
"metadata": {
32
6
"id": "BO2vOh8UMOmf"
33
-
}
7
+
},
8
+
"source": [
9
+
"# Identifying Close Votes on Amendments\n",
10
+
"\n",
11
+
"In this tutorial we will learn how to identify amendments that were adopted or rejected with a very close majority using the HowTheyVote.eu data set. Amendments that are either passed or rejected with a close margin are probable to have some amount of controversy about their contents. Identifying those can be a first step in finding interesting debates in Parliament.\n",
12
+
"\n",
13
+
"To follow allong with the tutorial, you should already be familiar with data analysis in Python using `pandas`. You don’t need prior knowledge about the European Parliament.\n"
14
+
]
34
15
},
35
16
{
36
17
"cell_type": "markdown",
37
-
"source": "## Context: Amendments in the European Parliament\n\nBefore a text becomes the official position of the European Parliament, the Parliament's Plenary must vote on it.\n\nUsually, Members of Parliament hold multiple votes on a text, due to the process with which Parliaments position is established. At different points in this process, committees and political groups of the Parliament can propose amendments to texts. Each amendment proposes one or many changes to the original document, either exchanging, removing, or adding content. The Plenary then votes on all amendments, either adopting or rejecting them.\n\nOnce the Plenary has decided on all amendments, it votes on the final wording of the text. If the majority approves the text, it becomes the official position of the European Parliament. If not, the text is rejected.",
38
18
"metadata": {
39
19
"id": "PQRf2gM3Iyh_"
40
-
}
20
+
},
21
+
"source": [
22
+
"## Context: Amendments in the European Parliament\n",
23
+
"\n",
24
+
"Before a text becomes the official position of the European Parliament, the Parliament's Plenary must vote on it.\n",
25
+
"\n",
26
+
"Usually, Members of Parliament hold multiple votes on a text, due to the process with which Parliaments position is established. At different points in this process, committees and political groups of the Parliament can propose amendments to texts. Each amendment proposes one or many changes to the original document, either exchanging, removing, or adding content. The Plenary then votes on all amendments, either adopting or rejecting them.\n",
27
+
"\n",
28
+
"Once the Plenary has decided on all amendments, it votes on the final wording of the text. If the majority approves the text, it becomes the official position of the European Parliament. If not, the text is rejected."
29
+
]
41
30
},
42
31
{
43
32
"cell_type": "markdown",
44
-
"source": "## Finding all Votes on a Specific Text\n\nThroughout this tutorial, we will use Parliaments resolution condemning [The Russian aggression against Ukraine](https://howtheyvote.eu/votes/140111) from March 2022.\n\nAs a first step, we need the `votes` table from the HowTheyVote.eu data set:",
45
33
"metadata": {
46
34
"id": "ljA_CkomH1qx"
47
-
}
35
+
},
36
+
"source": [
37
+
"## Finding all Votes on a Specific Text\n",
38
+
"\n",
39
+
"Throughout this tutorial, we will use Parliaments resolution condemning [The Russian aggression against Ukraine](https://howtheyvote.eu/votes/140111) from March 2022.\n",
40
+
"\n",
41
+
"As a first step, we need the `votes` table from the HowTheyVote.eu data set:"
42
+
]
48
43
},
49
44
{
50
45
"cell_type": "code",
51
-
"source": "import pandas as pd\n\nvotes_df = pd.read_csv('data/votes.csv')\nvotes_df.head()",
46
+
"execution_count": null,
52
47
"metadata": {
53
48
"id": "da7W2nn-MLX3",
54
49
"trusted": true
55
50
},
56
51
"outputs": [],
57
-
"execution_count": null
52
+
"source": [
53
+
"import pandas as pd\n",
54
+
"\n",
55
+
"votes_df = pd.read_csv('data/votes.csv')\n",
56
+
"votes_df.head()"
57
+
]
58
58
},
59
59
{
60
60
"cell_type": "markdown",
61
-
"source": "The `votes` table contains one row for each vote that takes place in the Plenary. Therefore, there might be multiple rows for a given text. There are multiple fields in the `votes` table that we could use to identify all votes that belong to the same report, but we advise to use the `reference` column. It contains the official document reference for the report used by the Parliament.\n\n",
62
61
"metadata": {
63
62
"id": "UjDAJvApMrLx"
64
-
}
63
+
},
64
+
"source": [
65
+
"The `votes` table contains one row for each vote that takes place in the Plenary. Therefore, there might be multiple rows for a given text. There are multiple fields in the `votes` table that we could use to identify all votes that belong to the same report, but we advise to use the `reference` column. It contains the official document reference for the report used by the Parliament.\n",
"source": "77 plenary votes took place concerned with this specific resolution. From the `description` field, we can get a (very basic) first glance which part of the report each amendment targeted: For example, \"§ 3 - Am 4\" means that Amendment 4 contained changes to § 3 of the resolution.",
89
96
"metadata": {
90
97
"id": "_gEWmkO4OzZ6"
91
-
}
98
+
},
99
+
"source": [
100
+
"77 plenary votes took place concerned with this specific resolution. From the `description` field, we can get a (very basic) first glance which part of the report each amendment targeted: For example, \"§ 3 - Am 4\" means that Amendment 4 contained changes to § 3 of the resolution."
101
+
]
92
102
},
93
103
{
94
104
"cell_type": "markdown",
95
-
"source": "As mentioned in the very beginning, after decising on the amendments, the final text will usually be voted on. This is indicated in our data schame by the `is_main` column. Therefore, the following will retrieve the vote on the final, unified version of the report:",
96
105
"metadata": {
97
106
"id": "GvAkKulQQC2h"
98
-
}
107
+
},
108
+
"source": [
109
+
"As mentioned in the very beginning, after decising on the amendments, the final text will usually be voted on. This is indicated in our data schame by the `is_main` column. Therefore, the following will retrieve the vote on the final, unified version of the report:"
"source": "## Identifying Votes With a Close Margin",
113
126
"metadata": {
114
127
"id": "bLnTFrV8JX7n"
115
-
}
128
+
},
129
+
"source": [
130
+
"## Identifying Votes With a Close Margin"
131
+
]
116
132
},
117
133
{
118
134
"cell_type": "markdown",
119
-
"source": "In the columns `count_for`, `count_against`, `count_abstention`, and `count_did_not_vote` we can see the number of Members of Parliament (MEP) who voted in a specific way on the entirety of this text or who did not partook in the vote. In contrast to not voting at all, MEPs also have the option to actively vote abstain in each vote.",
120
135
"metadata": {
121
136
"id": "CKEayYaDLFW_"
122
-
}
137
+
},
138
+
"source": [
139
+
"In the columns `count_for`, `count_against`, `count_abstention`, and `count_did_not_vote` we can see the number of Members of Parliament (MEP) who voted in a specific way on the entirety of this text or who did not partook in the vote. In contrast to not voting at all, MEPs also have the option to actively vote abstain in each vote."
"source": "Note, that this does not give us any information about which specific MEPs voted in which way.",
137
156
"metadata": {
138
157
"id": "c8dUButsLy6h"
139
-
}
158
+
},
159
+
"source": [
160
+
"Note, that this does not give us any information about which specific MEPs voted in which way."
161
+
]
140
162
},
141
163
{
142
164
"cell_type": "markdown",
143
-
"source": "In order to identify the amendments that got accepted or rejected with a very close margin, we are interested in the difference between votes in favour and votes against. Note, that we calculate this on the basis of a simple majority in this tutorial, i.e., as long as more MEPs voted in favor than against an amendment, it is accepted. This is always true for amendments regarding resolutions.\n\nIn cases where an amendment was accepted, this difference will be a positive number (as the number of votes in favour will be larger then that of votes against). However, when amendments are narrowly rejected, the opposite will be true, resulting in a negative number for the difference.\n\nAs we are interested in narrow decisions in general, we will use the absolute difference between votes in favour and against.",
144
165
"metadata": {
145
166
"id": "mHPsBVfxlCQp"
146
-
}
167
+
},
168
+
"source": [
169
+
"In order to identify the amendments that got accepted or rejected with a very close margin, we are interested in the difference between votes in favour and votes against. Note, that we calculate this on the basis of a simple majority in this tutorial, i.e., as long as more MEPs voted in favor than against an amendment, it is accepted. This is always true for amendments regarding resolutions.\n",
170
+
"\n",
171
+
"In cases where an amendment was accepted, this difference will be a positive number (as the number of votes in favour will be larger then that of votes against). However, when amendments are narrowly rejected, the opposite will be true, resulting in a negative number for the difference.\n",
172
+
"\n",
173
+
"As we are interested in narrow decisions in general, we will use the absolute difference between votes in favour and against."
"source": "The closest amendment had an absolute difference of 19 votes against versus votes in favour. Although this seems not extremely close, we can also see a substantive difference between the first four votes, which all have margins below 40, and the following ones, which are close to differences of 100 votes and more.\n\n## Wrapping Up\n\nIdentifying these close amendments can be a good starting point to figure out which parts of a text were most controversial in Parliament. Using the `votes` table, those can be identified quite fast, by finding all votes corresponding to a specific text and afterwards finding the narrowest of these decisions.\n\nWith this information in hand it is now possible to continue with substantive research on the specific amendments, or to take a look at which MEPs and groups voted which way.",
161
191
"metadata": {
162
192
"id": "fANPqkNvpWKB"
163
-
}
193
+
},
194
+
"source": [
195
+
"The closest amendment had an absolute difference of 19 votes against versus votes in favour. Although this seems not extremely close, we can also see a substantive difference between the first four votes, which all have margins below 40, and the following ones, which are close to differences of 100 votes and more.\n",
196
+
"\n",
197
+
"## Wrapping Up\n",
198
+
"\n",
199
+
"Identifying these close amendments can be a good starting point to figure out which parts of a text were most controversial in Parliament. Using the `votes` table, those can be identified quite fast, by finding all votes corresponding to a specific text and afterwards finding the narrowest of these decisions.\n",
200
+
"\n",
201
+
"With this information in hand it is now possible to continue with substantive research on the specific amendments, or to take a look at which MEPs and groups voted which way."
202
+
]
164
203
},
165
204
{
166
205
"cell_type": "markdown",
167
-
"source": "## Feedback?\n\nWas this tutorial helpful? Do you have any feedback for us how to further improve it? Do you have requests for specific tutorials we should provide in the future? Let us know by filling out [this (very short) form](https://tally.so/r/nrbogMs)!",
168
-
"metadata": {}
206
+
"metadata": {},
207
+
"source": [
208
+
"## Feedback?\n",
209
+
"\n",
210
+
"Was this tutorial helpful? Do you have any feedback for us how to further improve it? Do you have requests for specific tutorials we should provide in the future? Let us know by filling out [this (very short) form](https://tally.so/r/nrbogM)!"
0 commit comments