# Pulling politicians together, with stiff & flexible springs

The best of Datawrapper charts 2018, part 5

Today I present to you a rather curious chart. I had to look at it for a second longer than usual to understand how it came together. (Hint: It’s a Datawrapper scatterplot.) Follow me in understanding what it shows and how Dr. Andreas Loos created it for the German news site ZEIT Online:

We see politicians having opinions. The German site abgeordnetenwatch.de gave Bavarian politicians some statements before the last Bavarian state election and asked if they agree. Like: “Wealthy people pay enough taxes” – yes or no? Or “There should be more video surveillance in public spaces in Bavaria.” The more opinions two politicians had in common, the closer they appear in the chart above.

Andreas didn’t calculate these distances between politicians himself. He used the Python package NetworkX to create a force-directed layout algorithm; to be correct: the Fruchterman Reingold algorithm.

How does the algorithm place the politicians in Andreas’ chart? Imagine that each politician is made out of steel. Between each politician-couple is a spring if they have at least one answer in common. The more answers they have in common, the stiffer the spring becomes. So the algorithm tries hard to keep politicians with many opinions in common together. But it doesn’t mind a big distance (= an elastic spring) between two politicians with few opinions in common.

Andreas also told me about an interesting design decision. At first, the chart was turned 90 degree and the CSU politicians (in black) appeared on the right. The political position of the CSU is center-right, so the metaphor fits. But the data wasn’t conclusive: Andreas didn’t want readers to assume that the people furthest to the right are the most right-wing politicians. He turned the graph by 90 degrees so that the CSU politicians appear at the bottom of the chart. A great example of ethical data vis.

Make sure to visit this graph in its natural habitat where it’s surrounded by more charts. If you want to see more of Andreas’ data visualizations, visit his author page on ZEIT Online. Showing Andreas’ chart is part of a series about the most innovative user charts of 2018. Find the other parts here: part 1part 2part 3part 4.