Lorenzo Piccoli of the NCCR on the move has been a guest to the podcast ‘The Borders of Equality’, managed by the University of Leiden. He presented the datasets of the NCCR and discussed some of the work that has been done over the last couple of months.
Data collected in Qualtrics come in a funny way when exported to CSV: the first two lines are headers. Simply using read.csv() will mess things up, because typically we only have one line as header. We can skip empty lines at the beginning, but there is no immediately obvious way to skip only the second line.
Of course there is an R package for that, but when I tried, the qualtRics package was very slow:
raw_data <- readSurvey("qualtrics_survey.csv")
raw_data <- readSurvey("qualtrics_survey_legacy.csv", legacyFormat=T) # if two rows at the top
As an alternative, you could import just the header of your survey, and then join it to an import where you skip the header lines. Actually, here’s a better way of doing just this:
everything = readLines("qualtrics_survey_legacy.csv")
wanted = everything[-2]
mydata = read.csv(textConnection(wanted), header = TRUE, stringsAsFactors = FALSE)
If you get an error “EOF within quoted string”, don’t ignore it: It indicates problems with double quoting, so add
quote = "" to your import code.
If you are willing to violate the principle of not touching the raw data file, you could open the survey in a spreadsheet like Excel or LibreOffice Calc and delete the unwanted rows.
Given all these options, I found the most reliable way (as in: contrary to the above, it hasn’t failed me so far) to get Qualtrics data into R yet another one:
1. export as SPSS (rather than CSV)
2. use library(haven)
In the age of datalinkage, protecting microdata is as relevant as ever. Fortunately, there are R packages available to help:
That’s another excuse for not sharing data busted.
My paper on the political participation of immigrants in the local elections of Geneva is now properly published at Parliamentary Affairs. In the article, I present a new representative survey on participation in the 2015 municipal elections in the Canton of Geneva, Switzerland, and predict electoral participation with logistic regression models (predicted probabilities all around). Most immigrant groups vote less than the majority population. Social origin (resources), political engagement, civic integration and networks, as well as socialization are associated with differences in electoral participation, but contrary to some recent studies, substantive differences between nationalities remain.
The paper has its origins in a commissioned report Rosita Fibbi and I did (in French, executive summary in French). The research question is summarized in the (abbreviated) quote in the title: the sentiment that “we” have given “them” the right to vote in local elections (after 8 years of residence in the country), and yet they “don’t” vote (well not as often than “we” do). Quite fortunately we managed to convince the office of integration of the Geneva to allow us to make the survey data available to the academic community (cleaned version). The survey deliberately re-uses questions from the Swiss Electoral Study to enable a direct comparison, but Rosita and I added questions relevant to the research question and participation at the local level. The article is an independent analysis from the report, having spent more time on the topic that the rushed context of commissioned research allows.
Ruedin, Didier. 2018. ‘Participation in Local Elections: “Why Don”t Immigrants Vote More?’’. Parliamentary Affairs 71 (2): 243–262. https://doi.org/10.1093/pa/gsx024.
A colleague recently commented that he is confused where I stand with regard to the academic use of MIPEX data. Apparently I have been rather critical and quite enthusiastic about it. I guess this sums it up quite well. I’ve always been critical of the (historical) lack of a theoretical base for the indicators used, and the often uncritical use of the aggregate scores as indicators of ‘immigration policy’ in the literature. I’m enthusiastic about its coverage (compared to other indices), the effort to keep it up-to-date, and the availability of the detailed data.
A few years back, I verified that it is OK to use the MIPEX as a scale (as is often done), highlighting redundancy in the items and that such scales could be improved:
In the context of the SOM project, we have demonstrated that it is feasible to expand the MIPEX indicators back in time. We did so for 7 countries back to 1995. I refined these data by using the qualitative descriptions provided to identify the year of the change, giving year-on-year changes since 1995 for the 7 SOM countries. These data are experimental in that they rely on the documentation and not original research. If that’s not enough, Camilla and I have then created a complete time series of the MIPEX indicators in Switzerland since 1848. This showed that we definitely can go back in time, but also that quite a few of the things MIPEX measures were not regulated a century ago.
Even with the short time in the SOM data, these data are quite insightful:
Later I provided a different approach: re-assembling! The idea is generic and does not apply to the MIPEX alone: make use of the many indicators in the database, but use your own theory to pick and choose the ones you consider most appropriate (rather than be constrained by the presentation in the MIPEX publications). I have demonstrated that the MIPEX data can be used to closely approximate the Koopmans et al. data, but immediately cover a wider range of countries and observe changes over time. Now we can have theory and coverage!
And yes, we can apply these data to gain new insights, like the nature of the politicization of immigrant groups: