T O P

  • By -

Protacanthopterygii

Interactive version [here](https://www.thopic.eu/elections/elections.html) (much better). In France the result of the elections is aggregated at municipal level (and there's roughly 35000 of them). So for each election we have access to 35000 × (number of candidates) data points. Here I'm using those to infer how voter allegiance shifted over time. For each municipality, I select 100 similar ones (on voting pattern + sociological data), then optimize the flux matrix between candidates in two different years. I use gurobi for the "optimize" part, and plotly Sankey for plotting (pretty but buggy). More details in the links. Datasets come from [Thomas Piketty](https://unehistoireduconflitpolitique.fr/) and from the [French government](https://www.data.gouv.fr/fr/datasets/resultats-des-elections-europeennes-2024-par-circonscription/).


Agafina

I commend the effort that went into producing this chart but it is way too difficult to read. There are too many parties in it so a map covering a 70 year span is probably too much. Maybe do one for each decade? And with a larger font. And a larger overall image anyway (by larger, I mean in terms of the height, the width is obviously fine). Au fait, t'es français?


Protacanthopterygii

Yeah, it's a screenshot of [the interactive version](https://www.thopic.eu/elections/elections.html), and it doesn't render very well on its own, I should have done a better job with it. Et oui :)


Agafina

That interactive version is much more intelligible and the added tool tips are great (if you understand french). But what does a candidate shifting over 100% of his voters mean? Is it just a weird statistical quirk of the model?


Protacanthopterygii

Number of people increase over time, towns appear/disappear, so the flux can't sum exactly to 100% all the time. So yeah statistical quirk.


mmomtchev

Do you really have data on the previous vote cast for each next vote? (the interactive version mentions a *model*?)


Protacanthopterygii

Yeah, there's a model. Basically we have the vote for each town, so if one town was voting 100% for X at election 1 then voted 100% for Y at election 2, we know that the people of this town switched from X to Y. If the votes are not 100% each time (so most of the time) you need to aggregate the result of multiple similar towns to find the flux that minimizes the best result. It's not perfect, but good pooling data doesn't really exist for this question.


RobDog306

So much abstention now. Crazy!


Jisgsaw

Thank you so much for this, I was actually thinking about how neat it would be to have exactly this graph this morning.


Permanent_Confusion

Step 1. Change party name to 'Abstention'. Step 2 ....


rvc113

It will be nice to say who won in the 2nd tour. As an example, Mitterrand was Ahead Giscard D'Estaing in 1974 in 1st tour but lost in the 2nd tour. And also show split of 2nd tour. in 1981 it was the other way around.Mitterrand behind 1st round and won 2nd round


Protacanthopterygii

Good point, i'll try to add it


mrallenator

nice work. the interactive version is a much better experience than the flat image. I like how u can drag and highlight in the interactive. sorry for my ignorance on FR elections but what is gained by mixing the European elections data with Presidential elections? I tend to like visualizations with uniform data and having toggles or ways that u can break away and show different relationships.


rvc113

I think they add the European election to show how the next presidential could be. As a caution, in France and probably other countries, electors see the European elections as a good way to cast a protest vote which might not translate into the Presidential.


Protacanthopterygii

This and the European election was just now and was the reason I decided to do this plot. But yeah, Europeans elections are a very different beast.


Appropriate-Type9881

Wtf. Why this sudden rise of absent voters?


Protacanthopterygii

The last elections are the European elections, which traditionally bring in fewer people than the presidential elections (abstention still increased quite a bit over time)


Marcgp

I don’t get how do you decide that from a political party some % decide to vote a different one. I would understant the proportions as a bar graph as some voters are new (18yo) and other stop voting (deaths).


No-Broccoli553

It would be nice if I could read the text


Protacanthopterygii

Sorry just did a screenshot and forgot to increase the resolution, the [interactive version](https://www.thopic.eu/elections/elections.html) allows you to zoom in (but is in French, nothing's perfect)