This appendix tries to make the construction of the raw data-set reproducible. It lists the code that I used to create and transform the data. It also hints at other data files, e.g. from the qualitative data coding and more detailed data-sets, e.g. on the participation of NGOs or the budgets of the organizations. These files are available in the electronic data appendix.
For the analysis, I used the following R packages:1
library(knitr)
library(XML)
library(dplyr)
library(ineq)
library(reshape2)
library(countrycode)
library(psData)
library(ggplot2)
library(RCurl)
library(RJSONIO)
library(pander)
library(xtable)
library(lubridate)
library(tm)
First, I collected a number of dependent variables on transparency and participation in intergovernmental organizations. Below, I will document how I created the individual variables and how I collected and transformed the data. In most cases, the same steps are necessary to create the data for both IAEA and OPCW. If this is not the case, I document the different procedures.
#create empty data-set
data <- data.frame(IO=c(rep("IAEA", 55), rep("OPCW", 15)),
Year = c(1957:2011, 1997:2011),
Decade = c(
rep("1950s", 4),
rep("1960s", 10),
rep("1970s", 10),
rep("1980s", 10),
rep("1990s", 10),
rep("2000s", 10), "2010s",
rep("1990s", 4),
rep("2000s", 10),
"2010s"))
# import codings from RQDA file
## this is commented here, as it breaks the knitr chain
#library(RQDA)
#RQDA::openProject("../data/IAEA.rqda")
#iaea_codings <- RQDA::getCodingTable()
#iaea_summary <- iaea_codings %>% group_by(filename, codename) %>% summarise(n = n())
#save(iaea_summary, file = "iaea_summary")
load("../data/iaea_summary")
# filter for relevant codings and add to dataset
iaea_part <- as.data.frame(filter(iaea_summary,
codename == "TALK-Participation"))$n
# replace "missings" with 0 because they are true zeros
data$TALK.Part <- rep(NA, 70)
data$TALK.Part[which(data$IO == "IAEA")] <-
c(iaea_part[1:5], rep(0, 2),
iaea_part[6], rep(0, 4),
iaea_part[7], rep(0, 16),
iaea_part[8:9], rep(0, 2),
iaea_part[10], rep(0,2),
iaea_part[11:14], 0,
iaea_part[15:28])
# import my codings data from RQDA
#RQDA::openProject("../data/OPCW.rqda")
#codings <- RQDA::getCodingTable()
#opcw_summary <- codings %>% group_by(filename, codename) %>% summarise(n = n())
#save(opcw_summary, file = "opcw_summary")
load("../data/opcw_summary")
# filter for relevant codings and add to dataset
opcw_part <- as.data.frame(filter(opcw_summary,
codename == "TALK-Participation"))$n
# replace "missings" with 0 because they are true zeros
data$TALK.Part[which(data$IO == "OPCW")] <-
c(0, opcw_part[1:7], 0,
opcw_part[8:13])
# filter for relevant codings and add to dataset
iaea_trans <- as.data.frame(filter(iaea_summary,
codename == "TALK-Transparency"))$n
data$TALK.Trans <- rep(NA, 70)
data$TALK.Trans[which(data$IO == "IAEA")] <-
c(rep(0, 36), iaea_trans[1], 0,
iaea_trans[2], 0, iaea_trans[3:4], 0,
iaea_trans[5:11], 0, iaea_trans[12:13], 0,
iaea_trans[14])
# filter for relevant codings and add to dataset
opcw_trans <- as.data.frame(filter(opcw_summary,
codename == "TALK-Transparency"))$n
data$TALK.Trans[which(data$IO == "OPCW")] <-
c(0, opcw_trans[1:6], 0, opcw_trans[7],
0, opcw_trans[8:12])
2 Levels:
data$DEC.Part <- rep(NA, 70)
data$DEC.Part[which(data$IO == "IAEA")] <-
c(rep(1, 18), rep(2, 37))
3 levels:
data$DEC.Part[which(data$IO == "OPCW")] <-
c(rep(1, 3), rep(2, 3), rep(3, 9))
From the AR research, I propose the following 12 phases of transparency relevant decisions.
data$DEC.Trans <- rep(NA, 70)
data$DEC.Trans[which(data$IO == "IAEA")] <-
c(rep(1, 29), rep(2, 3), 3, rep(4, 3),
5, 5, 6, 7, 7, 8, 8, 9, 9, rep(10, 5),
11, 11, 11, 12, 12)
There are the following levels of increased transparency decisions, taken from the Annual Reports and CoSP-Resolutions
data$DEC.Trans[which(data$IO == "OPCW")] <-
c(1, 2, 3, 4, 4, 5, rep(6, 5), 7, 7, 8, 8)
# importing my data-set on IAEA GC participation
iaea_gc_ngo <- read.csv('../data/IAEA-GC-NGOs.csv