This lab journal is created for the Summer-School project BIGSSS - Segregation and Polarization.
In this section we determine the political positions of Dutch parties. We use multiple data sources/approaches to determining party positions. The end product is your own custom dataframe of the political positions of Dutch parties!
rm(list = ls())
fpackage.check
: Check if packages are installed (and install if not) in R (source).fsave
: Function to save data with time stamp in correct directoryfsave <- function(x, file, location = "./data/processed/", ...) {
if (!dir.exists(location))
dir.create(location)
datename <- substr(gsub("[:-]", "", Sys.time()), 1, 8)
totalname <- paste(location, datename, file, sep = "")
print(paste("SAVED: ", totalname, sep = ""))
save(x, file = totalname)
}
fpackage.check <- function(packages) {
lapply(packages, FUN = function(x) {
if (!require(x, character.only = TRUE)) {
install.packages(x, dependencies = TRUE)
library(x, character.only = TRUE)
}
})
}
colorize <- function(x, color) {
sprintf("<span style='color: %s;'>%s</span>", color, x)
}
haven
: Read and write various data formats used by other statistical packages (eg, Stata and SPSS)tidyverse
: for data handling.packages <- c("haven", "tidyverse")
fpackage.check(packages)
We use 3 data sources / approaches to determining party positions:
Election Tool Dutch Kieskompas (Vote compass) data. Using the Vote compass, individuals can see how their views align with parties running for election. Users are presented with approximately 30 statements, divided over 8 themes. The result appears in a two-dimensional axis system (or spectrum), positioned between the different political parties. We have prepared a dataset based on Kieskompas, Download kieskompas_df.csv and place it in folder ./data/
.1
Expert surveys: positions of parties with respect to multiple political issues are evaluated by multiple political experts. We use:
./data/
. There are many datasets on the website of CHES. Dowload the correct one. :-)expert_data_stata.dta
in your ./data/
Voter survey data of the Dutch Parliamentary Election Study (DPES) (Jacobs et al. 2022). We are allowed to use this dataset for the summerschool. Normally, individual researchers have to ask for permission. Thus DO NOT DISTRIBUTE THIS DATASET, DO NOT PUBLISH THIS DATASET ON GIT!!. In this dataset respondent’s political attitudes and expectations of the government are covered. You may download the data