Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Data and Policy Summer Scholar Program

International Policy

Summer 2022

About the dataset

In this capstone project you will be working with the package called unvotes. It contains the voting history of countries in the United Nations General Assembly, along with information such as date, description, and topics for each vote. It was put together by David Robinson and you can go to this webpage to get more information about it.

The creator responsible for assembling, cleaning, analyzing, and making this dataset public available was the researcher Erik Voeten

The unvotes package contains three datasets:

•  ‘un_votes’:  this dataset contains information on the voting history of the United Nations General Assembly. Contains one row for each country-vote pair;

•  ‘un_roll_calls’: this dataset contains information on each roll call vote of the United Nations General Assembly;

•  ‘un_roll_call_issues’:  this dataset contains the issue (topic) classifications of roll call votes of the United Nations General Assembly. Many votes had no topic, and some have more than one.

UN Resolutions

A United Nations General Assembly Resolution is a decision or declaration voted on by all member states of the United Nations in the General Assembly. For instance, here you can find the UN resolutions for 2015.

The debate of an agenda at the UN is usually followed by the adoption of these resolutions.   However,  the voting session of such resolutions are done electronically by roll-call (countries can vote‘yes’,‘no’and ‘abstain’).  Thus, the voting normally reflects the degree of intergovernmental agreement and the state of global cooperation on a given topic.

Objectives

The goal for this project is two folded:

•    (i) visually explore the dataset so we can have a better understanding of what is the most dis- puted issue in the UN in the 21st century and which countries seem to have the strongest agree- ment/disagreement on such issue;

•   (ii) analyze if and how countries voting pattern are affected for environmental issues.

Question 1

For q1, you will be using the ‘unvotes::un_votes’ dataset.  You will have to perform a first exploratory analysis of the dataset to have a better understanding of its main informations.

a) Load the dataset called‘un_votes’from the unvotes packages to your current R session.

b) To investigate the columns of this dataset, you should:  (i) check how many issues (rcid) the dataset contains; and (ii) create a table that shows how many‘yes’,‘no’, and ‘abstain’votes there are in this dataset.

Hint:  table from (ii) should only contain 3 rows and 2 columns

c) Filter the dataset to keep only countries that have voted more than 100 times.  After that, create a graph showing which countries are among the top ten (10) with a higher share of‘yes’votes and which are among the bottom ten (10) - your graph should contain the most agreeable countries colored in green and most disagreeable countries colored in red (look Hint 1). Briefly describe your results (four or five lines are enough).

Definiton: for our purpose, you can consider a country with higher percentage of yes votes as an agreeable country, and as disagreeable one with a lower percentage of yes

Hint 1: here, you should be trying to reproduce a graph like this but with the data from the capstone project

Hint 2:  slice function can be helpful when filtering the rows

Question 2

a) Import the dataset called‘un_roll_calls’to your R session. Join this newly imported dataset with the one you’ve imported on (q1). Now, produce a graph that displays the percentage of‘yes’votes in the United Nations going from 1946 to 2019.

Hint 1:  a line graph with the data being shown by year is one way of doing it.

Hint 2: for the purpose of visualization, you should try displaying only odd years - that can be accomplished by filtering only those years before plotting

Question 3

a) Import the dataset called‘un_roll_call_issues’ to your R session.  Join this newly imported dataset with the one you joined in (q2a). Filter this dataset, so it keeps only countries that have voted more than ten times.

b) Make a graph displaying the percent of yes votes for these six issues contained in the‘un_roll_call_issues’ dataset, but plot only for the five countries that form part of the United Nations Security Council -    which are: ‘United States’, ‘United Kingdom’,‘France’, ‘China’,‘Russia’.

Hint 1:  remember using the  facet_wrap function.

c) Lastly, you will need to add to your graph from (b) the average percentage of‘yes’from all the other countries that are not members of the United Nations Security Council.  One option to do this is to load the‘world.csv’ dataset we provided you and bind it with the dataset from (b).  Another option is to manually calculate the percentage of‘yes’votes for the ‘World’ (the mean‘yes’votes for every country in the Word) and plot it together with the graph from (b). Briefly describe your results (four or five lines are enough).

Question 4

The purpose of this exercise is to discover what is the issue that is dividing opinions the most in the UN in 21st century.

a) Using the joined‘unvotes’and the‘un_roll_calls’ datasets, filter this joined dataset so it only keeps rcids (roll-calls) that took place after 1999 and have received more than five votes.  After that, you should create a column that take value of 1 when the vote was‘yes’, a value of 0 when the vote was ‘abstain’, and a value of -1 when the vote was‘no’.

b) Now, you need to discover which were the fifty (50) most disputed rcids of the dataset from (a). After that, create a new object that contains the‘un_roll_calls’ but filtered, so it only has these fifty rcids. Now, use the ‘short’column from this dataset to discover which topic was the most disputed in the UN in the 21st century.

Hint:  you can group the data by rcid, and use the  var function to calculate the dispersion of the countries votes.  The rcid with a higher variance will be the rcid with higher dispute voting sessions

c) Now, we will analyze the 50 most disputed topics in the UN in the 21st century and what country had a voting pattern opposite Russia. For this, filter the‘un_votes’dataset, which only contains the fifty disputed topics.  Now you will recreate the column you created for (4a).  After that, you will use the ‘pairwise_cor’function to identify how other countries’ vote relates to Russia.

Hint 1:  load the  widyr package and use the  pairwise_ cor function to find correlations of pairs of items in a column

Hint 2:  the argument inside the pairwise_ cor function should be (country, rcid, vote_value)

d) Finally, create a graph showing which countries are among the top ten (10) with a higher share of correlation with Russia’s pattern of voting for the top fifty disputed issues in the UN and which are among the bottom ten (10).

Question 5

The purpose of this exercise is to analyze if natural disasters of different magnitudes influence how countries - where those disasters took place - vote in UN voting sessions for resolutions concerning environmental issues.

a) Load the‘climate-vote.csv’ file.  This dataset contains information on whether a country’s vote for a given rcid (roll-call) that is related to environmental issues was a pro-climate type of vote or not. Meaning: whether the vote favored a UN resolution aimed to alleviate environmental concerns or not. It also contains one column with information about whether a country abstained from voting or not.

b) Now, load the natural-disaster.csv’ file.   This dataset contains numeric information about natural disasters that took place within one year before a voting session over a UN resolution that concerned environmental issues in the World.

c) Now, you will join both datasets by the two columns they share in common. Finally, design and run a regression that explains how pro-climate vote relates to the number of disasters, and the existence of a disaster one year before a voting session. Briefly describe the design you choose and your results (maximum of fifteen lines). Don’t forget to interpret your coefficient.