How could the Alternative für Deutschland become so successful?

How could the Alternative für Deutschland become so successful?

An analysis of the electoral success in 2017 based on election and structural data in R.

We had all decided on the data analysis project titled “AfD’s election success”. The Alternative für Deutschland (AfD) is a party that has achieved great success in democratic elections in Germany within the last few years. It relies on an anti-migration and anti-European policy. We wanted to try to understand how such a party could celebrate such successes, although the AfD makes a wrong policy against so many of our convictions. When we sat down together it was clear to us relatively quickly that we wanted to try to gain insights on the basis of the data from the last two Bundestag elections in 2013 and 2017. Within these few years, the party succeeded in moving into the Bundestag and most of the federal state parliaments. At the first glance at the data we noticed that the AfD achieved particularly strong results in some federal states and individual constituencies. Since these peaks are particularly in the eastern states and peripheral areas, which are known to be particularly economically weak, we wanted to supplement the election data with structural data from the individual election areas and thus supplement a well-founded analysis. The data needed for such an analysis were quite easily accessible. The results by constituency are made available by the Federal Election Commissioner as csv files on the website. And the structural data can be accessed via the portal of the “Bundesamt für Bauwesen und Raumordnung” (BBR) individually according to the required structural data. Fortunately, one of our group members had devoted himself to a very similar question in his Bachelor’s thesis and was already able to provide us with suitable and somewhat prepared data sets for our project.

Before Christmas, we formulated five hypotheses that linked the success of the AfD with structural developments and circumstances and decided to use RStudio to gain insights that condensed or refuted these hypotheses. We agreed that each group member should test one of the following hypotheses. In addition, our mentor Nils helped us set up a repository in the GitHub so that we could work flexibly on our own. In this repository, we uploaded the csv files and set up an R-workspace.

Our five original hypotheses take various factors into account.

H1: The electoral success of the AfD can be explained in particular by economic factors such as unemployment, lack of wage increases, etc.

H2: The electoral success of the AfD can be explained particularly on the basis of cultural factors.

H3: The structural weakness and poor (traffic) infrastructure in some counties where citizens feel neglected by politics were decisive for the success of the AfD in the elections

H4: Migration and migration rates played a role in the decision to support AfD (probably similar causal explanation patterns to H3).

H5: The distance and alienation of politics and established parties was a significant factor (possibly measurable by the number of citizen’s offices etc.).

We have seen the TechLabs project as a complement to our Master’s programs and have tried to apply the methods and tools we learned in the Datacamp courses to approach the hypothesis assigned to us and to prepare and analyze the data sources in a way that we have done at university with already prepared data sets.

So, we started by loading the csv files into the Git first and then into the rStudio workspace. Since it was a large and extensive dataset with many features, we had to prepare the files a bit first. Thereby, supposed little things like for German language typical “Umlaute” in the features kept me busy for a while before I could start with the actual analysis.

Then we started to familiarize ourself with the dataset and took a closer look at individual features on their own and in connection between each other. In examining the data, we began to look at the overall election results.

In the following we explain our results, experiences and possible explanations regarding the connection between the election success of the AfD and the unemployment rate first. Afterwards follows our analysis with respect to academic quotes, turn votes and the success of the AfD. In the end we tried find a connection with the migration rate.

In the project we tried first to examine if there is a relationship between the unemployment rate and the success of the AfD. (combination of H1 and H2) Therefore, we used the dataset provided from our colleague Lukas. Next, after getting familiar with the provided data, we tried to analyze the unemployment rate. To do so, we plotted on the X-Axis the AfD-result from the election 2017 and on the Y-Axis the result from the election 2013. Then, we colored the points on the plotted graph differently. Once for the unemployment rate of 2013, then for the unemployment rate of 2017 and finally the change in percentage of the unemployment rate. Interestingly to see, that in constituencies with an high unemployment rate the AfD was tendentially stronger, then in constituencies with a lower unemployment rate. This is familiar with the common thesis, that people voted for AfD, because the think that the traditional parties like CDU/CSU or SPD kind of “forgot” the people in these areas. Next, we colored the points as the change of the unemployment rate. Our thoughts were, if there is a connection, that if the unemployment rate could be reduced from 2013 to 2017, people voted less for the AfD. Unfortunately, we couldn’t find results to support our thesis for several reasons, although in many areas the unemployment rate could be reduced.

Our second little project was to examine the relationship between employed academics in a specific ara and the results of the AfD. Here you can see our results:

We found that in areas with a low/average academic rate (around 10–15 %) the AfD had their highest results. But the interesting thing about that is, that comparing constituencies with the same academic employing rate, the AfD had the highest results in the constituencies where the voter turnout was very low (65 %). In the graphic the turnout rate is colored from black (low) to yellow (high). The tendency the graphic provides is clear. Comparing the constituencies with the same level of academic people, showes, that where the voter turnout was less strong, the AfD was even stronger. For further conclusions, why this is the case etc., it would require more research, because we don’t have access to data, who exactly went to the election in this constituencies (and which academic background they had).

The next analysis we applied, focused on infrastructural data to tackle the H3 hypothesis. Unfortunately, we could not find suitable and for us manageable data that fit our needs regarding infrastructure in the constituencies to the fullest. Under the assumption that the higher the number of people in one area the better the traffic infrastructure, we therefore used population density (“Einwohnerdichte”) as a proxy for infrastructure. The data shows a clear downward trend of the AfD outcome the higher the population density gets. Nevertheless this is just an indication and would need further analysis to uncover all dependencies and characteristics for this finding. In a next step we wondered if we could also implement more information in this graph and used the share of young voters (age between 18–24 years) in the constituency as color gradient.

This reveals a further interesting outcome as it seems that the majority of yellow colored observations, which imply a comparably high share of young voters in the constituency, can be found below 15% AfD voting outcome, whereas almost all black colored observation (low share of young voters) can be found above 15% AfD voting outcome. This finding touches the H2 hypothesis, if we assume that there are distinct cultural differences across different age groups, which seems plausible from a layman’s perspective.

Lastly we took a deeper look on migration rates within the election districts. The AfD appears to the outside world very clearly and extremely as the party that is against migration to Germany and sees migration as a danger to “German culture and the German people”. However, this “danger” is expressed, the AfD should receive a high level of approval, especially where citizens face a high number of migrants. Since the results varied greatly from region to region, we decided to break the 299 constituencies down to the level of the individual federal states. Since there are 16 federal states in Germany and we didn’t want to repeat the same steps so often, we decided to build a function (Unfortunately, the Federal Election Commissioner only outputs the city states Bremen, Hamburg and the capital Berlin as a whole in the data set, so that a plot does not permit any findings here. However, the real structural changes are also more interesting in between rural constituencies).

In the beginning, our idea was to build a single function that would output the appropriate plot depending on the subset of data. Using a dummy variable in the data set, we could divide the constituencies of the individual federal states into subsets. We also created a dataframe with some features for labeling and other necessary information. However, after a few attempts, we realized that the project was too complex, so we decided to customize the function to fit our single needs. And we plotted the individual states and could compare them with each other.

The results were quite interesting. Normally one would expect a xenophobic policy to meet with much approval exactly where there are many foreigners, because people might feel threatened by them. But the data show a completely contrary picture. The gg_smooth-Plot shows a decreasing approval with an increasing migration rate. The AfD is most popular in constituencies with less than 5% migration.

This connection is certainly not linear and only conditional on each other, but certainly a more interesting one. This picture is confirmed when one looks at the individual federal states.

But, of course, further analyses and a look at the connections and real recommendations for action are needed.

To summarize our experience here at TechLabs, we have to say, that we learned a lot, although it was not possible to follow our plans we made at the beginning of the semester. When we started we really were looking forward to the TechLabs experience and project work.

The biggest challenges in the project were quite different from our point of view. On the one hand, it was more time-consuming than expected until we could get started with the analysis and the actual project. The preparation of the data, the smooth setup of the repository and the connection with GitHub cost more time and effort than we had expected.

Another important aspect was the cooperation and coordination within the team. Our project group consisted almost exclusively of master students. When the project was supposed to really get off to a good start in the new year, everyone focused on exams and university projects. And even after the exams, the individual planning differed considerably, making it difficult to work together on the project.

In retrospect, it might have been more effective if one had approached the project for oneself or at least with clearly defined responsibility, because the positive aspects of learning together and supporting each other did not really come to bear as it would be desirable. Nevertheless, the TechLabs project was a lot of fun and worth every effort with many small successes during the learning track and in the project. Although when we originally planned to put more effort and time into the final project, we think that the variables discussed are interesting and important factors when trying to explain the election results of AfD over the last years. The mistakes we made would be avoidable in a second try and we would like to continue the TechLabs experience in the next semester.

We really liked the challenge and interesting meetings at TechLabs and we are grateful for the the knowledge we gained during this last semester.

Sönke Behrens — Data Science Track ( R )

Lukas Koston — Data Science Track ( R )

Ricardo Gomes — Data Science Track ( R )